halo-fe 1.0.19 → 1.0.21
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.js +676 -667
- package/esm/@types/CreateFeOptions.d.ts +25 -0
- package/esm/@types/index.d.ts +2 -0
- package/esm/coms/@types/ScrollerProps.d.ts +15 -0
- package/esm/coms/@types/index.d.ts +2 -0
- package/esm/coms/Scroller.vue.d.ts +1 -1
- 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/conditions/Condition.vue.d.ts +1 -1
- package/esm/coms/conditions/Index.vue.d.ts +1 -1
- package/esm/coms/controls/@types/CodeEmit.d.ts +23 -0
- 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/RichTextOptions.d.ts +14 -0
- package/esm/coms/controls/@types/RichTextProps.d.ts +12 -0
- package/esm/coms/controls/@types/index.d.ts +6 -0
- package/esm/coms/controls/Code.vue.d.ts +1 -1
- package/esm/coms/controls/RichText.vue.d.ts +1 -1
- package/esm/coms/controls/index.d.ts +1 -1
- package/esm/coms/index.d.ts +1 -1
- package/esm/coms/layouts/@types/RowProps.d.ts +14 -0
- package/esm/coms/layouts/@types/index.d.ts +2 -0
- package/esm/coms/layouts/Row.vue.d.ts +1 -1
- package/esm/coms/layouts/index.d.ts +1 -1
- package/esm/coms/progresses/@types/SocketProgressProps.d.ts +23 -0
- package/esm/coms/progresses/@types/index.d.ts +2 -0
- package/esm/coms/progresses/SocketProgress.vue.d.ts +1 -1
- package/esm/coms/tabs/@types/TabProps.d.ts +7 -0
- package/esm/coms/tabs/@types/index.d.ts +2 -0
- package/esm/coms/tabs/Tab.vue.d.ts +1 -1
- package/esm/drivers/@types/IDispose.d.ts +10 -0
- package/esm/drivers/@types/IDriver.d.ts +10 -0
- package/esm/drivers/@types/IOpen.d.ts +10 -0
- package/esm/drivers/@types/index.d.ts +4 -0
- package/esm/drivers/bridges/IBridge.d.ts +1 -1
- package/esm/drivers/builders/IBuilder.d.ts +1 -1
- package/esm/drivers/cdns/ICdn.d.ts +1 -1
- package/esm/drivers/excels/IExcel.d.ts +1 -1
- package/esm/drivers/explainers/IExplainer.d.ts +1 -1
- package/esm/drivers/features/IFeature.d.ts +1 -1
- package/esm/drivers/https/Http.d.ts +15 -9
- package/esm/drivers/https/IHttp.d.ts +1 -1
- package/esm/drivers/https/implements/DefaultHttp.d.ts +6 -0
- package/esm/drivers/https/implements/HaloHttp.d.ts +3 -8
- package/esm/drivers/https/implements/MkHttp.d.ts +1 -6
- package/esm/drivers/i18ns/I18n.d.ts +0 -3
- package/esm/drivers/i18ns/I18nFactory.d.ts +0 -4
- package/esm/drivers/i18ns/II18n.d.ts +16 -2
- package/esm/drivers/index.d.ts +1 -1
- package/esm/drivers/messengers/IMessenger.d.ts +1 -1
- package/esm/drivers/providers/IProvider.d.ts +1 -1
- package/esm/drivers/signers/Signer.d.ts +3 -0
- package/esm/drivers/ssos/ISso.d.ts +1 -1
- package/esm/drivers/tasks/ITask.d.ts +1 -1
- package/esm/drivers/templates/ITemplate.d.ts +1 -1
- package/esm/drivers/videos/IVideo.d.ts +1 -1
- package/esm/drivers/voices/IVoice.d.ts +1 -1
- package/esm/factorying/Factory.d.ts +1 -1
- package/esm/factorying/index.d.ts +3 -7
- package/esm/helpers/@types/JsonConfig.d.ts +10 -0
- package/esm/helpers/@types/TreeNodeProp.d.ts +9 -0
- package/esm/helpers/@types/index.d.ts +3 -0
- package/esm/helpers/JsonHelper.d.ts +1 -1
- package/esm/main.d.ts +2 -2
- package/esm/svcs/@types/Dictionary.d.ts +4 -0
- package/esm/svcs/@types/index.d.ts +1 -0
- package/esm/svcs/implement/ConfigSvc.d.ts +2 -2
- package/esm/svcs/implement/LogSvc.d.ts +3 -0
- package/esm/svcs/index.d.ts +1 -1
- package/esm/utilities/@types/DragEvent.d.ts +11 -0
- package/esm/utilities/@types/DragOptions.d.ts +28 -0
- package/esm/utilities/@types/Position.d.ts +15 -0
- package/esm/utilities/@types/Rect.d.ts +10 -0
- package/esm/utilities/@types/index.d.ts +5 -0
- package/esm/utilities/EventUtility.d.ts +1 -1
- package/esm/utilities/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
@@ -2,34 +2,34 @@ var vt = Object.defineProperty;
|
|
2
2
|
var wt = (u, t, e) => t in u ? vt(u, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[t] = e;
|
3
3
|
var n = (u, t, e) => wt(u, typeof t != "symbol" ? t + "" : t, e);
|
4
4
|
import { _ as Re } from "./assets/underscore-B0BCaBxV.js";
|
5
|
-
import { defineAsyncComponent as bt, reactive as Ge, defineComponent as Q, toRefs as
|
5
|
+
import { defineAsyncComponent as bt, reactive as Ge, defineComponent as Q, toRefs as te, openBlock as O, createElementBlock as B, createElementVNode as D, toDisplayString as he, unref as y, renderSlot as pe, createCommentVNode as Ze, watch as J, ref as I, onMounted as we, onUnmounted as be, normalizeStyle as fe, normalizeClass as Le, createTextVNode as xt, createBlock as He, withCtx as qe, mergeModels as Ke, useModel as et, nextTick as We, withDirectives as kt, vShow as St, createVNode as Ce, createStaticVNode as Ct, isRef as je, Fragment as Et, renderList as Tt, computed as Ee } from "vue";
|
6
6
|
import { _ as $t } from "./assets/underscore.string-oDfap0sE.js";
|
7
7
|
import { a as Lt } from "./assets/clone-DtpAsLoe.js";
|
8
8
|
import { F as At } from "./assets/file-saver-Cnua3zoa.js";
|
9
|
-
import { h as
|
9
|
+
import { h as H } from "./assets/moment-h96o7c8I.js";
|
10
10
|
import { L as Dt } from "./assets/liquidjs-C-LVcoaY.js";
|
11
|
-
class
|
11
|
+
class F {
|
12
12
|
}
|
13
13
|
/**
|
14
14
|
* 判断输入类型是否是字符串类型 null -> false
|
15
15
|
*/
|
16
|
-
n(
|
16
|
+
n(F, "isString", (t) => Object.prototype.toString.call(t) == "[object String]"), /**
|
17
17
|
* 判断输入类型是否是Object类型
|
18
18
|
*/
|
19
|
-
n(
|
19
|
+
n(F, "isObject", (t) => Object.prototype.toString.call(t) == "[object Object]"), /**
|
20
20
|
* 判断输入类型是否是Array类型
|
21
21
|
*/
|
22
|
-
n(
|
22
|
+
n(F, "isArray", (t) => Object.prototype.toString.call(t) == "[object Array]"), /**
|
23
23
|
* 判断输入类型是否是Number类型,null -> false
|
24
24
|
*/
|
25
|
-
n(
|
25
|
+
n(F, "isNumber", (t) => {
|
26
26
|
let e = Object.prototype.toString.call(t);
|
27
27
|
return e == "[object Number]" || e == "[object BigInt]";
|
28
28
|
}), /**
|
29
29
|
* 判断输入类型是否是isBoolean类型
|
30
30
|
*/
|
31
|
-
n(
|
32
|
-
const
|
31
|
+
n(F, "isBoolean", (t) => Object.prototype.toString.call(t) == "[object Boolean]");
|
32
|
+
const M = class M {
|
33
33
|
/**
|
34
34
|
* 获取最大值
|
35
35
|
*/
|
@@ -69,64 +69,64 @@ const F = class F {
|
|
69
69
|
/**
|
70
70
|
* 过滤某一页数据
|
71
71
|
*/
|
72
|
-
n(
|
72
|
+
n(M, "filterPage", (t, e, s) => {
|
73
73
|
let l = (e - 1) * s, r = e * s;
|
74
74
|
return t.filter((a, o) => o >= l && o < r);
|
75
75
|
}), /**
|
76
76
|
* 总页数
|
77
77
|
*/
|
78
|
-
n(
|
78
|
+
n(M, "pageCount", (t, e) => Math.ceil(t / e)), //#endregion
|
79
79
|
//#region 求值
|
80
80
|
/**
|
81
81
|
* 四舍五入
|
82
82
|
*/
|
83
|
-
n(
|
83
|
+
n(M, "round", (t, e) => t.toFixed(e)), /**
|
84
84
|
* 天花板函数
|
85
85
|
*/
|
86
|
-
n(
|
86
|
+
n(M, "ceil", (t) => Math.ceil(t)), //#endregion
|
87
87
|
//#region 进度
|
88
88
|
/**
|
89
89
|
* 获取百分比
|
90
90
|
*/
|
91
|
-
n(
|
91
|
+
n(M, "getPercentage", (t, e) => {
|
92
92
|
if (!t || !e)
|
93
93
|
return 0;
|
94
|
-
let s = t / e * 100, l =
|
94
|
+
let s = t / e * 100, l = M.round(s, 2);
|
95
95
|
return parseFloat(l);
|
96
96
|
}), /**
|
97
97
|
* 获取进度文本
|
98
98
|
*/
|
99
|
-
n(
|
99
|
+
n(M, "getProgressText", (t, e) => `${t ?? "-"}/${e ?? "-"}`), /**
|
100
100
|
* 获取百分比,保留2位小数
|
101
101
|
*/
|
102
|
-
n(
|
102
|
+
n(M, "getPercentageText", (t, e) => M.getPercentage(t, e).toFixed(2)), //#endregion
|
103
103
|
/**
|
104
104
|
* 获取大小
|
105
105
|
*/
|
106
|
-
n(
|
106
|
+
n(M, "size", (t) => {
|
107
107
|
if (!t)
|
108
108
|
return "OKB";
|
109
109
|
let e = 1024, s = e * 1024;
|
110
110
|
if (t < s)
|
111
|
-
return
|
111
|
+
return M.round(t / e, 2) + "KB";
|
112
112
|
let l = s * 1024;
|
113
113
|
if (t < l)
|
114
|
-
return
|
114
|
+
return M.round(t / s, 2) + "MB";
|
115
115
|
let r = l * 1024;
|
116
116
|
if (t < r)
|
117
|
-
return
|
117
|
+
return M.round(t / l, 2) + "GB";
|
118
118
|
let i = r * 1024;
|
119
119
|
if (t < i)
|
120
|
-
return
|
120
|
+
return M.round(t / r, 2) + "TB";
|
121
121
|
throw new Error("暂未支持比TB更大的大小");
|
122
122
|
});
|
123
|
-
let
|
123
|
+
let re = M;
|
124
124
|
const S = class S {
|
125
125
|
/**
|
126
126
|
* 获取分成指定片数量后的集合
|
127
127
|
*/
|
128
128
|
static getChunksByCount(t, e) {
|
129
|
-
let s = [], l =
|
129
|
+
let s = [], l = re.ceil(t.length / e);
|
130
130
|
for (let r = 0; r < t.length; r += l) {
|
131
131
|
let i = this.getRange(t, r, l);
|
132
132
|
s.push(i);
|
@@ -341,9 +341,9 @@ n(S, "pushIfNotExist", (t, e) => {
|
|
341
341
|
* 删除执行数组中的指定对象或者集合
|
342
342
|
*/
|
343
343
|
n(S, "remove", (t, e) => {
|
344
|
-
if (
|
344
|
+
if (F.isNumber(e))
|
345
345
|
t.splice(e, 1);
|
346
|
-
else if (
|
346
|
+
else if (F.isArray(e))
|
347
347
|
for (let s = 0; s < e.length; s++)
|
348
348
|
S.remove(t, e[s]);
|
349
349
|
else
|
@@ -398,7 +398,7 @@ n(S, "groupByArray", (t, e) => {
|
|
398
398
|
i == null && (i = { key: r, value: [] }, s.push(i)), i.value.push(l);
|
399
399
|
}), s;
|
400
400
|
});
|
401
|
-
let
|
401
|
+
let oe = S;
|
402
402
|
const x = class x {
|
403
403
|
/**
|
404
404
|
* 根据字符串或数组,自动返回数组
|
@@ -488,7 +488,7 @@ n(x, "isJson", (t) => {
|
|
488
488
|
if (!t)
|
489
489
|
return !1;
|
490
490
|
let e = JSON.parse(t);
|
491
|
-
return
|
491
|
+
return F.isObject(e);
|
492
492
|
} catch {
|
493
493
|
return !1;
|
494
494
|
}
|
@@ -547,7 +547,7 @@ n(x, "getBetween", (t, e, s) => {
|
|
547
547
|
*/
|
548
548
|
n(x, "padStart", (t, e, s) => t.padStart(e, s));
|
549
549
|
let W = x;
|
550
|
-
const
|
550
|
+
const Te = class Te {
|
551
551
|
//#region 净化
|
552
552
|
/**
|
553
553
|
* 净化对象,返回不带默认属性的对象
|
@@ -556,7 +556,7 @@ const $e = class $e {
|
|
556
556
|
let e = {}, s = Object.keys(t);
|
557
557
|
for (let l = 0; l < s.length; l++) {
|
558
558
|
let r = s[l], i = t[r];
|
559
|
-
i != null && (
|
559
|
+
i != null && (F.isObject(i) ? e[r] = this.pure(i) : e[r] = t[r]);
|
560
560
|
}
|
561
561
|
return e;
|
562
562
|
}
|
@@ -605,10 +605,10 @@ const $e = class $e {
|
|
605
605
|
let s = Lt(t, !0);
|
606
606
|
if (e == null)
|
607
607
|
return s;
|
608
|
-
if (
|
608
|
+
if (F.isArray(t))
|
609
609
|
for (let l = 0; l < s.length; l++)
|
610
610
|
e(s[l]);
|
611
|
-
else
|
611
|
+
else F.isObject(t) && e(s);
|
612
612
|
return s;
|
613
613
|
}
|
614
614
|
//#endregion
|
@@ -617,9 +617,9 @@ const $e = class $e {
|
|
617
617
|
* 合并来源对象到目标对象上
|
618
618
|
*/
|
619
619
|
static mergeTo(t, e) {
|
620
|
-
return t == null ? e : e == null ? t :
|
620
|
+
return t == null ? e : e == null ? t : F.isArray(e) ? e.slice() : (Object.keys(e).forEach((l) => {
|
621
621
|
let r = e[l];
|
622
|
-
typeof r == "object" ? t[l] =
|
622
|
+
typeof r == "object" ? t[l] = Te.mergeTo(t[l], r) : t[l] = r;
|
623
623
|
}), t);
|
624
624
|
}
|
625
625
|
//#endregion
|
@@ -645,9 +645,9 @@ const $e = class $e {
|
|
645
645
|
/**
|
646
646
|
* 手动复制,并对字段执行指定自定义处理
|
647
647
|
*/
|
648
|
-
n(
|
648
|
+
n(Te, "copy", (t, e = null) => {
|
649
649
|
let s = [];
|
650
|
-
|
650
|
+
F.isObject(t) && s.push(t);
|
651
651
|
let l = [];
|
652
652
|
for (let r = 0; r < s.length; r++) {
|
653
653
|
let i = s[r], a = {};
|
@@ -656,21 +656,21 @@ n($e, "copy", (t, e = null) => {
|
|
656
656
|
e && e[o] ? a[o] = e[o]() : a[o] = c;
|
657
657
|
}), l.push(a);
|
658
658
|
}
|
659
|
-
return
|
659
|
+
return F.isObject(t) ? l[0] : l;
|
660
660
|
}), //#endregion
|
661
661
|
//#region 赋值
|
662
662
|
/**
|
663
663
|
* 给对象添加多层属性,并赋值
|
664
664
|
*/
|
665
|
-
n(
|
665
|
+
n(Te, "addProperties", (t, e, s) => {
|
666
666
|
let l = t;
|
667
667
|
for (let r = 0; r < e.length; r++) {
|
668
668
|
let i = e[r];
|
669
669
|
r == e.length - 1 ? l[i] = s : (l[i] || (l[i] = {}), l = l[i]);
|
670
670
|
}
|
671
671
|
});
|
672
|
-
let
|
673
|
-
class
|
672
|
+
let X = Te;
|
673
|
+
class Be {
|
674
674
|
//#region 取值
|
675
675
|
/**
|
676
676
|
* 从指定字典中提取忽略大小写的key的值
|
@@ -860,7 +860,7 @@ const z = class z {
|
|
860
860
|
*/
|
861
861
|
static serialize(t, e = !0) {
|
862
862
|
let s = (r) => e ? encodeURIComponent(r) : r;
|
863
|
-
return
|
863
|
+
return Be.join(t, s, "=", "&");
|
864
864
|
}
|
865
865
|
//endregion
|
866
866
|
//region 编码和解码
|
@@ -888,13 +888,13 @@ n(z, "handleQueryValue", (t, e) => {
|
|
888
888
|
if (t instanceof Array) {
|
889
889
|
if (t.length > 0)
|
890
890
|
for (let l = 0; l < t.length; l++) {
|
891
|
-
let r =
|
891
|
+
let r = X.clone(e);
|
892
892
|
r.push(""), s += z.handleQueryValue(t[l], r);
|
893
893
|
}
|
894
894
|
} else if (t instanceof Object) {
|
895
895
|
let l = Object.keys(t);
|
896
896
|
for (let r of l) {
|
897
|
-
let i =
|
897
|
+
let i = X.clone(e);
|
898
898
|
i.push(r), s += z.handleQueryValue(t[r], i);
|
899
899
|
}
|
900
900
|
} else {
|
@@ -918,7 +918,7 @@ n(z, "getUrl", (t, e = null) => {
|
|
918
918
|
return null;
|
919
919
|
if (e == null)
|
920
920
|
return t;
|
921
|
-
let s = z.deserialize(t), l =
|
921
|
+
let s = z.deserialize(t), l = X.mergeTo(s, e);
|
922
922
|
return z.getPath(t) + "?" + z.getQuery(l);
|
923
923
|
}), /**
|
924
924
|
* 获取超链接配置对象
|
@@ -966,12 +966,12 @@ n(It, "getName", (t, e) => {
|
|
966
966
|
let s = K.getPath(t);
|
967
967
|
return s ? s == "/" ? e : e + s.replace(/\//g, "-").toLowerCase() : null;
|
968
968
|
});
|
969
|
-
const
|
969
|
+
const ae = class ae {
|
970
970
|
};
|
971
971
|
/**
|
972
972
|
* 保存文件
|
973
973
|
*/
|
974
|
-
n(
|
974
|
+
n(ae, "save", (t, e) => {
|
975
975
|
let s = window.atob(t), l = s.length, r = new Uint8Array(l);
|
976
976
|
for (; l--; )
|
977
977
|
r[l] = s.charCodeAt(l);
|
@@ -980,24 +980,24 @@ n(oe, "save", (t, e) => {
|
|
980
980
|
}), /**
|
981
981
|
* 获取文件扩展名
|
982
982
|
*/
|
983
|
-
n(
|
983
|
+
n(ae, "getExtension", (t) => {
|
984
984
|
let e = t.lastIndexOf(".");
|
985
985
|
return e == -1 ? "" : t.substring(e).split("?")[0];
|
986
986
|
}), /**
|
987
987
|
* 判断当前文件名是否是excel文件
|
988
988
|
*/
|
989
|
-
n(
|
990
|
-
let e =
|
989
|
+
n(ae, "isExcel", (t) => {
|
990
|
+
let e = ae.getExtension(t);
|
991
991
|
return [".xls", ".xlsx"].indexOf(e) > -1;
|
992
992
|
}), /**
|
993
993
|
* 判断当前文件是否是图片文件
|
994
994
|
*/
|
995
|
-
n(
|
996
|
-
let e =
|
995
|
+
n(ae, "isImage", (t) => {
|
996
|
+
let e = ae.getExtension(t);
|
997
997
|
return [".png", ".jpg", ".jpeg", ".bmp", ".gif"].indexOf(e) > -1;
|
998
998
|
});
|
999
|
-
let
|
1000
|
-
const
|
999
|
+
let De = ae;
|
1000
|
+
const Y = class Y {
|
1001
1001
|
//#region 颜色
|
1002
1002
|
/**
|
1003
1003
|
* 根据字符串Ascii码得到固定颜色字典
|
@@ -1214,13 +1214,13 @@ const G = class G {
|
|
1214
1214
|
* 获取行内标签,如: style(非link)
|
1215
1215
|
*/
|
1216
1216
|
static getInlineTagByUrl(t) {
|
1217
|
-
return
|
1217
|
+
return De.getExtension(t) == ".css" ? "style" : "script";
|
1218
1218
|
}
|
1219
1219
|
/**
|
1220
1220
|
* 获取资源标签,如: link
|
1221
1221
|
*/
|
1222
1222
|
static getTagByUrl(t) {
|
1223
|
-
return
|
1223
|
+
return De.getExtension(t) == ".css" ? "link" : "script";
|
1224
1224
|
}
|
1225
1225
|
//#endregion
|
1226
1226
|
//#region 文本
|
@@ -1238,7 +1238,7 @@ const G = class G {
|
|
1238
1238
|
/**
|
1239
1239
|
* 添加类
|
1240
1240
|
*/
|
1241
|
-
n(
|
1241
|
+
n(Y, "addClass", (t, e, s = null) => {
|
1242
1242
|
let l;
|
1243
1243
|
if (e == null || e == "") {
|
1244
1244
|
if (s == null || s == "")
|
@@ -1250,7 +1250,7 @@ n(G, "addClass", (t, e, s = null) => {
|
|
1250
1250
|
}), /**
|
1251
1251
|
* 删除类
|
1252
1252
|
*/
|
1253
|
-
n(
|
1253
|
+
n(Y, "removeClass", (t, e, s = null) => {
|
1254
1254
|
if (e == null || e == "")
|
1255
1255
|
return;
|
1256
1256
|
let l = [];
|
@@ -1268,7 +1268,7 @@ n(G, "removeClass", (t, e, s = null) => {
|
|
1268
1268
|
/**
|
1269
1269
|
* 获取dom宽度或高度
|
1270
1270
|
*/
|
1271
|
-
n(
|
1271
|
+
n(Y, "getWidthOrHeight", (t, e, s = null) => {
|
1272
1272
|
let l = 0, r = [];
|
1273
1273
|
t instanceof Array && r.push(...t), t instanceof HTMLCollection ? r.push(...t) : r.push(t);
|
1274
1274
|
for (let i = 0; i < r.length; i++) {
|
@@ -1282,21 +1282,21 @@ n(G, "getWidthOrHeight", (t, e, s = null) => {
|
|
1282
1282
|
}), /**
|
1283
1283
|
* 根据路径获取标签(无src)
|
1284
1284
|
*/
|
1285
|
-
n(
|
1286
|
-
let e =
|
1285
|
+
n(Y, "createEmptyByUrl", (t) => {
|
1286
|
+
let e = Y.getInlineTagByUrl(t);
|
1287
1287
|
return document.createElement(e);
|
1288
1288
|
}), /**
|
1289
1289
|
* 根据路径获取待加载的元素,同时包含Url
|
1290
1290
|
*/
|
1291
|
-
n(
|
1292
|
-
let e =
|
1291
|
+
n(Y, "createByUrl", (t) => {
|
1292
|
+
let e = Y.getTagByUrl(t), s = document.createElement(e);
|
1293
1293
|
return s instanceof HTMLLinkElement ? (s.href = t, s.rel = "stylesheet") : s instanceof HTMLScriptElement && (s.src = t), s;
|
1294
1294
|
}), /**
|
1295
1295
|
* 根据路径获取元素
|
1296
1296
|
* VIP:已废弃,不能用改方法判断资源是否加载完毕,因为可能只是脚本创建,资源还未加载完毕
|
1297
1297
|
*/
|
1298
|
-
n(
|
1299
|
-
let e =
|
1298
|
+
n(Y, "getByUrl", (t) => {
|
1299
|
+
let e = Y.getTagByUrl(t), s = document.querySelectorAll(e);
|
1300
1300
|
for (let l of s) {
|
1301
1301
|
if (l instanceof HTMLLinkElement && l.href == t)
|
1302
1302
|
return l;
|
@@ -1309,46 +1309,46 @@ n(G, "getByUrl", (t) => {
|
|
1309
1309
|
/**
|
1310
1310
|
* 判断选择器内容是否溢出
|
1311
1311
|
*/
|
1312
|
-
n(
|
1312
|
+
n(Y, "isEllipsis", (t) => {
|
1313
1313
|
let e = document.querySelector(t);
|
1314
1314
|
return e.clientWidth < e.scrollWidth;
|
1315
1315
|
});
|
1316
|
-
let
|
1317
|
-
class
|
1316
|
+
let j = Y;
|
1317
|
+
class ie {
|
1318
1318
|
}
|
1319
1319
|
/**
|
1320
1320
|
* 批量绑定事件,执行指定处理函数
|
1321
1321
|
*/
|
1322
|
-
n(
|
1322
|
+
n(ie, "bind", (t, e, s) => {
|
1323
1323
|
e && t.forEach((l) => {
|
1324
1324
|
e.addEventListener(l, s, !0);
|
1325
1325
|
});
|
1326
1326
|
}), /**
|
1327
1327
|
* 批量绑定事件,执行指定处理函数
|
1328
1328
|
*/
|
1329
|
-
n(
|
1329
|
+
n(ie, "unbind", (t, e, s) => {
|
1330
1330
|
e && t.forEach((l) => {
|
1331
1331
|
e.removeEventListener(l, s, !0);
|
1332
1332
|
});
|
1333
1333
|
}), /**
|
1334
1334
|
* 绑定点击处理函数
|
1335
1335
|
*/
|
1336
|
-
n(
|
1336
|
+
n(ie, "click", (t, e) => {
|
1337
1337
|
t && t.addEventListener("click", e, !0);
|
1338
1338
|
}), /**
|
1339
1339
|
* 解除点击监听
|
1340
1340
|
*/
|
1341
|
-
n(
|
1341
|
+
n(ie, "unclick", (t, e) => {
|
1342
1342
|
t && t.removeEventListener("click", e, !0);
|
1343
1343
|
}), /**
|
1344
1344
|
* 绑定滚动处理函数
|
1345
1345
|
*/
|
1346
|
-
n(
|
1346
|
+
n(ie, "scroll", (t, e) => {
|
1347
1347
|
t && t.addEventListener("scroll", e, !0);
|
1348
1348
|
}), /**
|
1349
1349
|
* 移除滚动处理函数,防止内存泄漏
|
1350
1350
|
*/
|
1351
|
-
n(
|
1351
|
+
n(ie, "unscroll", (t, e) => {
|
1352
1352
|
t && t.removeEventListener("scroll", e, !0);
|
1353
1353
|
});
|
1354
1354
|
class Qe {
|
@@ -1356,13 +1356,13 @@ class Qe {
|
|
1356
1356
|
/**
|
1357
1357
|
* 获取Html内容
|
1358
1358
|
*/
|
1359
|
-
n(Qe, "getHtml", (t) =>
|
1359
|
+
n(Qe, "getHtml", (t) => F.isNumber(t) ? t : t && t.replace(/\n/g, "<br/>")), /**
|
1360
1360
|
* 获取Html中的文字
|
1361
1361
|
*/
|
1362
1362
|
n(Qe, "getText", (t) => {
|
1363
1363
|
if (!t)
|
1364
1364
|
return null;
|
1365
|
-
if (!
|
1365
|
+
if (!F.isString(t))
|
1366
1366
|
return t;
|
1367
1367
|
let e = new RegExp("<[^<>]+>", "g");
|
1368
1368
|
return t.replace(e, "");
|
@@ -1373,40 +1373,40 @@ class Ot {
|
|
1373
1373
|
* 获取base64图片地址
|
1374
1374
|
*/
|
1375
1375
|
n(Ot, "base64", (t) => "data:image/png;base64," + t);
|
1376
|
-
class
|
1376
|
+
class Rt {
|
1377
1377
|
}
|
1378
1378
|
/**
|
1379
1379
|
* 加载乾坤子应用
|
1380
1380
|
*/
|
1381
|
-
n(
|
1381
|
+
n(Rt, "load", function(t, e, s, l) {
|
1382
1382
|
});
|
1383
|
-
const
|
1383
|
+
const $e = class $e {
|
1384
1384
|
};
|
1385
1385
|
/**
|
1386
1386
|
* 激发主框架事件
|
1387
1387
|
*/
|
1388
|
-
n(
|
1389
|
-
|
1388
|
+
n($e, "emit", (t, e) => {
|
1389
|
+
$e.emits({ [t]: e });
|
1390
1390
|
}), /**
|
1391
1391
|
* 批量激发主框架事件
|
1392
1392
|
*/
|
1393
|
-
n(
|
1393
|
+
n($e, "emits", (t) => {
|
1394
1394
|
var s, l;
|
1395
1395
|
let e = (l = (s = window.parent) == null ? void 0 : s.window) == null ? void 0 : l.emit;
|
1396
1396
|
e && Object.keys(t).forEach((r) => {
|
1397
1397
|
e(r, t[r]);
|
1398
1398
|
});
|
1399
1399
|
});
|
1400
|
-
let
|
1401
|
-
class
|
1400
|
+
let ve = $e;
|
1401
|
+
class Se {
|
1402
1402
|
}
|
1403
1403
|
/**
|
1404
1404
|
* 延时指定ms后执行指定任务
|
1405
1405
|
*/
|
1406
|
-
n(
|
1406
|
+
n(Se, "delay", (t, e) => setTimeout(t, e)), /**
|
1407
1407
|
* 在执行指定延时后,每隔指定ms执行指定任务
|
1408
1408
|
*/
|
1409
|
-
n(
|
1409
|
+
n(Se, "execute", (t, e, s) => {
|
1410
1410
|
if (!s) {
|
1411
1411
|
let l = setInterval(t, e);
|
1412
1412
|
return Promise.resolve(l);
|
@@ -1420,12 +1420,12 @@ n(Ee, "execute", (t, e, s) => {
|
|
1420
1420
|
}), /**
|
1421
1421
|
* 清空定时器
|
1422
1422
|
*/
|
1423
|
-
n(
|
1423
|
+
n(Se, "clearInterval", (t) => {
|
1424
1424
|
clearInterval(t);
|
1425
1425
|
}), /**
|
1426
1426
|
* 防抖(指定时间内只触发一次)
|
1427
1427
|
*/
|
1428
|
-
n(
|
1428
|
+
n(Se, "debounce", (t, e) => {
|
1429
1429
|
let s = null;
|
1430
1430
|
return (l) => {
|
1431
1431
|
s && clearTimeout(s), s = setTimeout(t, e, l);
|
@@ -1433,7 +1433,7 @@ n(Ee, "debounce", (t, e) => {
|
|
1433
1433
|
}), /**
|
1434
1434
|
* 节流:https://segmentfault.com/a/1190000018428170
|
1435
1435
|
*/
|
1436
|
-
n(
|
1436
|
+
n(Se, "throttle", (t, e) => {
|
1437
1437
|
let s = !0;
|
1438
1438
|
return (l) => {
|
1439
1439
|
if (!s)
|
@@ -1443,7 +1443,7 @@ n(Ee, "throttle", (t, e) => {
|
|
1443
1443
|
}, e, l);
|
1444
1444
|
};
|
1445
1445
|
});
|
1446
|
-
class
|
1446
|
+
class jt {
|
1447
1447
|
constructor() {
|
1448
1448
|
n(this, "value");
|
1449
1449
|
}
|
@@ -1459,7 +1459,7 @@ n(A, "getTimestamp", (t = null) => (t ? new Date(t) : /* @__PURE__ */ new Date()
|
|
1459
1459
|
n(A, "getTime", (t = null) => t ? new Date(t) : /* @__PURE__ */ new Date()), /**
|
1460
1460
|
* 格式化时间
|
1461
1461
|
*/
|
1462
|
-
n(A, "format", (t, e) =>
|
1462
|
+
n(A, "format", (t, e) => H(t).format(e)), /**
|
1463
1463
|
* 获取当前日期时间的字符串
|
1464
1464
|
*/
|
1465
1465
|
n(A, "getDateTimeString", () => A.formatSecondTime(/* @__PURE__ */ new Date())), /**
|
@@ -1471,31 +1471,31 @@ n(A, "getDateString", () => A.formatDate(/* @__PURE__ */ new Date())), /**
|
|
1471
1471
|
n(A, "getTimeString", () => A.formatTime(/* @__PURE__ */ new Date())), /**
|
1472
1472
|
* 对时间值进行时间格式化
|
1473
1473
|
*/
|
1474
|
-
n(A, "formatSecondTime", (t) =>
|
1474
|
+
n(A, "formatSecondTime", (t) => H(t).format("YYYY-MM-DD HH:mm:ss")), /**
|
1475
1475
|
* 对时间值进行时间格式化
|
1476
1476
|
*/
|
1477
|
-
n(A, "formatMillisecondTime", (t) => t ?
|
1477
|
+
n(A, "formatMillisecondTime", (t) => t ? H(t).format("YYYY-MM-DD HH:mm:ss SSS") : null), /**
|
1478
1478
|
* 格式化成24小时时间格式
|
1479
1479
|
*/
|
1480
|
-
n(A, "formatTime", (t) => t ?
|
1480
|
+
n(A, "formatTime", (t) => t ? H(t).format("HH:mm:ss SSS") : null), /**
|
1481
1481
|
* 对时间值进行日期格式化
|
1482
1482
|
*/
|
1483
|
-
n(A, "formatDate", (t) => t ?
|
1483
|
+
n(A, "formatDate", (t) => t ? H(t).format("YYYY-MM-DD") : null), /**
|
1484
1484
|
* 添加天数
|
1485
1485
|
*/
|
1486
|
-
n(A, "addDays", (t, e) => t ?
|
1486
|
+
n(A, "addDays", (t, e) => t ? H(t).add(e, "days").toDate() : null), /**
|
1487
1487
|
* 添加月份
|
1488
1488
|
*/
|
1489
|
-
n(A, "addMonths", (t, e) => t ?
|
1489
|
+
n(A, "addMonths", (t, e) => t ? H(t).add(e, "months").toDate() : null), /**
|
1490
1490
|
* 添加小时
|
1491
1491
|
*/
|
1492
|
-
n(A, "addHours", (t, e) => t ?
|
1492
|
+
n(A, "addHours", (t, e) => t ? H(t).add(e, "hours").toDate() : null), /**
|
1493
1493
|
* 判断指定时间是否是周末
|
1494
1494
|
*/
|
1495
1495
|
n(A, "isWeekend", (t) => {
|
1496
1496
|
if (!t)
|
1497
1497
|
return !1;
|
1498
|
-
let e =
|
1498
|
+
let e = H(t).format("d");
|
1499
1499
|
return e == "6" || e == "0";
|
1500
1500
|
}), /**
|
1501
1501
|
* 把中国时间,转换为当地时间
|
@@ -1504,9 +1504,9 @@ n(A, "localeTime", (t) => {
|
|
1504
1504
|
if (!t)
|
1505
1505
|
return null;
|
1506
1506
|
let s = (/* @__PURE__ */ new Date()).getTimezoneOffset() + 480;
|
1507
|
-
return
|
1507
|
+
return H(t).add(s, "minutes").toDate();
|
1508
1508
|
});
|
1509
|
-
let
|
1509
|
+
let ee = A;
|
1510
1510
|
const k = class k {
|
1511
1511
|
};
|
1512
1512
|
/**
|
@@ -1530,7 +1530,7 @@ n(k, "getById", (t, e, s, l) => {
|
|
1530
1530
|
* 树节点
|
1531
1531
|
*/
|
1532
1532
|
n(k, "getByIds", (t, e, s, l) => {
|
1533
|
-
let r =
|
1533
|
+
let r = oe.distinct(t, (a) => a), i = [];
|
1534
1534
|
return r.forEach((a) => {
|
1535
1535
|
let o = k.getById(a, e, s, l);
|
1536
1536
|
i.push(o);
|
@@ -1574,13 +1574,13 @@ n(k, "getParentsById", (t, e, s, l, r = !1) => {
|
|
1574
1574
|
*/
|
1575
1575
|
n(k, "getChildrenById", (t, e, s, l, r = !1) => {
|
1576
1576
|
let i = k.getById(t, e, s, l), a = [];
|
1577
|
-
return r && a.push(i),
|
1577
|
+
return r && a.push(i), Pe(i, l, a), a;
|
1578
1578
|
}), /**
|
1579
1579
|
* 获取当前节点的所有孩子节点的集合
|
1580
1580
|
*/
|
1581
1581
|
n(k, "getChildren", (t, e, s = !1) => {
|
1582
1582
|
let l = [];
|
1583
|
-
return s && l.push(t),
|
1583
|
+
return s && l.push(t), Pe(t, e, l), l;
|
1584
1584
|
}), /**
|
1585
1585
|
* 搜索指定文本的树结构
|
1586
1586
|
*/
|
@@ -1588,7 +1588,7 @@ n(k, "searchTree", (t, e, s, l) => {
|
|
1588
1588
|
let r = [];
|
1589
1589
|
if (!e)
|
1590
1590
|
return r;
|
1591
|
-
let i = t ? t.toUpperCase() : "", a =
|
1591
|
+
let i = t ? t.toUpperCase() : "", a = F.isString(l) ? [l] : l;
|
1592
1592
|
for (let o of e) {
|
1593
1593
|
let c = !1, h = k.getChildren(o, s, !0);
|
1594
1594
|
for (let d of h) {
|
@@ -1614,11 +1614,11 @@ n(k, "searchTree", (t, e, s, l) => {
|
|
1614
1614
|
n(k, "removeById", (t, e, s, l) => {
|
1615
1615
|
let r = k.getById(t, e, s, l), i = k.getParentsById(t, e, s, l);
|
1616
1616
|
if (i.length == 0) {
|
1617
|
-
|
1617
|
+
oe.remove(s, r);
|
1618
1618
|
return;
|
1619
1619
|
}
|
1620
1620
|
let a = i[i.length - 1];
|
1621
|
-
|
1621
|
+
oe.remove(a[l], r);
|
1622
1622
|
}), /**
|
1623
1623
|
* 获取树结构扁平化后的节点信息
|
1624
1624
|
*/
|
@@ -1648,7 +1648,7 @@ n(k, "map", (t, e, s, l) => {
|
|
1648
1648
|
}
|
1649
1649
|
return r;
|
1650
1650
|
});
|
1651
|
-
let
|
1651
|
+
let Ie = k;
|
1652
1652
|
function tt(u, t, e, s, l, r) {
|
1653
1653
|
for (let i = 0; i < e.length; i++) {
|
1654
1654
|
let a = e[i];
|
@@ -1656,17 +1656,17 @@ function tt(u, t, e, s, l, r) {
|
|
1656
1656
|
r && l.push(a);
|
1657
1657
|
break;
|
1658
1658
|
} else
|
1659
|
-
|
1659
|
+
Ie.getById(u, t, a[s], s) != null && (l.push(a), tt(u, t, a[s], s, l, r));
|
1660
1660
|
}
|
1661
1661
|
return l;
|
1662
1662
|
}
|
1663
|
-
function
|
1663
|
+
function Pe(u, t, e) {
|
1664
1664
|
let s = u[t];
|
1665
1665
|
if (!s || s.length == 0)
|
1666
1666
|
return e;
|
1667
1667
|
for (let l = 0; l < s.length; l++) {
|
1668
1668
|
let r = s[l];
|
1669
|
-
e.push(r),
|
1669
|
+
e.push(r), Pe(r, t, e);
|
1670
1670
|
}
|
1671
1671
|
return e;
|
1672
1672
|
}
|
@@ -1696,13 +1696,13 @@ class _t {
|
|
1696
1696
|
n(this, "beautify", !1);
|
1697
1697
|
}
|
1698
1698
|
}
|
1699
|
-
class
|
1699
|
+
class _ {
|
1700
1700
|
//#region 序列化
|
1701
1701
|
/**
|
1702
1702
|
* 对非字符串进行序列化
|
1703
1703
|
*/
|
1704
1704
|
static serializeWithoutString(t) {
|
1705
|
-
return typeof t == "string" ? t :
|
1705
|
+
return typeof t == "string" ? t : _.serialize(t, !0);
|
1706
1706
|
}
|
1707
1707
|
/**
|
1708
1708
|
* 把对象格式化为Json字符串
|
@@ -1713,7 +1713,7 @@ class M {
|
|
1713
1713
|
e == null && (e = new _t());
|
1714
1714
|
let l = (typeof e == "boolean" ? e : e.beautify) ? 2 : null, r;
|
1715
1715
|
if (typeof t == "string") {
|
1716
|
-
let a =
|
1716
|
+
let a = _.deserialize(t);
|
1717
1717
|
if (a == null)
|
1718
1718
|
return t;
|
1719
1719
|
r = a;
|
@@ -1800,7 +1800,7 @@ class M {
|
|
1800
1800
|
let a = t[i], o = l(a);
|
1801
1801
|
o.type == "array" ? (o.remark && (r += this.fillSpace(2 * s) + "//" + o.remark + `
|
1802
1802
|
`), r += this.fillKey(2 * s, o.key) + "[", r += this.buildObjectLevel(a[e], e, s + 1, l), r += "]", i != t.length - 1 && (r += ",")) : o.type == "object" ? (o.remark && (r += this.fillSpace(2 * s) + "//" + o.remark + `
|
1803
|
-
`), r += this.fillKey(2 * s, o.key), r += this.buildObjectLevel(a[e], e, s + 1, l), i != t.length - 1 && (r += ",")) : (r += this.fillKey(2 * s, o.key), o.type == "string" ? r += '""' : o.type == "date" ? r += `"${
|
1803
|
+
`), r += this.fillKey(2 * s, o.key), r += this.buildObjectLevel(a[e], e, s + 1, l), i != t.length - 1 && (r += ",")) : (r += this.fillKey(2 * s, o.key), o.type == "string" ? r += '""' : o.type == "date" ? r += `"${ee.getDateTimeString()}"` : o.type == "int" || o.type == "number" ? r += "0" : o.type == "boolean" ? r += "false" : r += null, i != t.length - 1 && (r += ","), o.remark && (r += " //" + o.remark)), r += `
|
1804
1804
|
`;
|
1805
1805
|
}
|
1806
1806
|
return r += this.fillSpace(2 * (s - 1)), r += "}", r;
|
@@ -1847,7 +1847,7 @@ class Bt {
|
|
1847
1847
|
return this.clean(t), K.serialize(t, e);
|
1848
1848
|
}
|
1849
1849
|
}
|
1850
|
-
class
|
1850
|
+
class P {
|
1851
1851
|
constructor() {
|
1852
1852
|
//#region 属性
|
1853
1853
|
/**
|
@@ -1924,24 +1924,24 @@ class B {
|
|
1924
1924
|
}
|
1925
1925
|
//#endregion
|
1926
1926
|
}
|
1927
|
-
class
|
1927
|
+
class Oe {
|
1928
1928
|
constructor() {
|
1929
1929
|
n(this, "type");
|
1930
1930
|
}
|
1931
1931
|
}
|
1932
|
-
class Pt extends
|
1932
|
+
class Pt extends Oe {
|
1933
1933
|
constructor() {
|
1934
1934
|
super(...arguments);
|
1935
1935
|
n(this, "type", "Json");
|
1936
1936
|
}
|
1937
1937
|
insert(e) {
|
1938
|
-
return
|
1938
|
+
return _.serialize(e.rows, !0);
|
1939
1939
|
}
|
1940
1940
|
update(e) {
|
1941
|
-
return
|
1941
|
+
return _.serialize(e.rows, !0);
|
1942
1942
|
}
|
1943
1943
|
}
|
1944
|
-
class Ut extends
|
1944
|
+
class Ut extends Oe {
|
1945
1945
|
constructor() {
|
1946
1946
|
super(...arguments);
|
1947
1947
|
n(this, "type", "Mongo");
|
@@ -1949,7 +1949,7 @@ class Ut extends je {
|
|
1949
1949
|
insert(e) {
|
1950
1950
|
let { name: s, columns: l, rows: r } = e, i = "";
|
1951
1951
|
for (let a = 0; a < r.length; a++) {
|
1952
|
-
let o = r[a], c =
|
1952
|
+
let o = r[a], c = _.serialize(o, !0);
|
1953
1953
|
i += `db.${s}.insert(${c})`, a != r.length - 1 && (i += `\r
|
1954
1954
|
`);
|
1955
1955
|
}
|
@@ -1958,19 +1958,19 @@ class Ut extends je {
|
|
1958
1958
|
update(e) {
|
1959
1959
|
let { name: s, columns: l, rows: r } = e, i = "", a = l.filter((o) => o.key).map((o) => o.name);
|
1960
1960
|
for (let o = 0; o < r.length; o++) {
|
1961
|
-
let c = r[o], h =
|
1961
|
+
let c = r[o], h = X.extract(c, a), d = _.serialize(h, !0), p = _.serialize(c, !0);
|
1962
1962
|
i += `db.${s}.update(${d},{$set:${p})`, o != r.length - 1 && (i += `\r
|
1963
1963
|
`);
|
1964
1964
|
}
|
1965
1965
|
return i;
|
1966
1966
|
}
|
1967
1967
|
}
|
1968
|
-
class
|
1968
|
+
class Ne {
|
1969
1969
|
constructor() {
|
1970
1970
|
n(this, "type");
|
1971
1971
|
}
|
1972
1972
|
}
|
1973
|
-
const
|
1973
|
+
const de = class de extends Ne {
|
1974
1974
|
constructor() {
|
1975
1975
|
super(...arguments);
|
1976
1976
|
//#region 属性
|
@@ -1989,7 +1989,7 @@ const he = class he extends Ve {
|
|
1989
1989
|
let r = indexedDB.open(e);
|
1990
1990
|
r.onsuccess = (i) => {
|
1991
1991
|
let a = i.target.result;
|
1992
|
-
|
1992
|
+
de.version = a.version, this.objectStoreNames = a.objectStoreNames, s(de.version);
|
1993
1993
|
}, r.onerror = (i) => {
|
1994
1994
|
l(i.target);
|
1995
1995
|
};
|
@@ -2000,7 +2000,7 @@ const he = class he extends Ve {
|
|
2000
2000
|
*/
|
2001
2001
|
async createAsync(e) {
|
2002
2002
|
return this.store = e, this.objectStoreNames.contains(e) ? Promise.resolve(!0) : new Promise((s, l) => {
|
2003
|
-
let r = indexedDB.open(this.database, ++
|
2003
|
+
let r = indexedDB.open(this.database, ++de.version);
|
2004
2004
|
r.onupgradeneeded = (i) => {
|
2005
2005
|
let a = i.target.result;
|
2006
2006
|
a.objectStoreNames.contains(this.store) || a.createObjectStore(this.store);
|
@@ -2016,7 +2016,7 @@ const he = class he extends Ve {
|
|
2016
2016
|
*/
|
2017
2017
|
async openDbAsync() {
|
2018
2018
|
return new Promise((e, s) => {
|
2019
|
-
let l = indexedDB.open(this.database,
|
2019
|
+
let l = indexedDB.open(this.database, de.version);
|
2020
2020
|
l.onsuccess = (r) => {
|
2021
2021
|
let i = r.target.result;
|
2022
2022
|
e(i);
|
@@ -2102,7 +2102,7 @@ const he = class he extends Ve {
|
|
2102
2102
|
}, a.onerror = (d) => {
|
2103
2103
|
i(d);
|
2104
2104
|
};
|
2105
|
-
let o =
|
2105
|
+
let o = X.clone(s), h = a.objectStore(this.store).put(o, e);
|
2106
2106
|
h.onsuccess = (d) => {
|
2107
2107
|
let p = d.target.result;
|
2108
2108
|
r(p);
|
@@ -2158,9 +2158,9 @@ const he = class he extends Ve {
|
|
2158
2158
|
/**
|
2159
2159
|
* 静态版本,保证所有数据库实例拿到最新版本信息
|
2160
2160
|
*/
|
2161
|
-
n(
|
2162
|
-
let
|
2163
|
-
class Ft extends
|
2161
|
+
n(de, "version", null);
|
2162
|
+
let Ue = de;
|
2163
|
+
class Ft extends Ne {
|
2164
2164
|
constructor() {
|
2165
2165
|
super(...arguments);
|
2166
2166
|
//#region 属性
|
@@ -2231,7 +2231,7 @@ class Ft extends Ve {
|
|
2231
2231
|
}
|
2232
2232
|
//#endregion
|
2233
2233
|
}
|
2234
|
-
class Mt extends
|
2234
|
+
class Mt extends Ne {
|
2235
2235
|
constructor() {
|
2236
2236
|
super(...arguments);
|
2237
2237
|
n(this, "type", "Cookie");
|
@@ -2268,13 +2268,13 @@ class Mt extends Ve {
|
|
2268
2268
|
dispose() {
|
2269
2269
|
}
|
2270
2270
|
}
|
2271
|
-
class
|
2271
|
+
class qt extends P {
|
2272
2272
|
constructor() {
|
2273
2273
|
super(...arguments);
|
2274
2274
|
n(this, "_default");
|
2275
2275
|
}
|
2276
2276
|
get instances() {
|
2277
|
-
return [new
|
2277
|
+
return [new Ue(), new Ft(), new Mt()];
|
2278
2278
|
}
|
2279
2279
|
/**
|
2280
2280
|
* 获取指定类型的提供程序
|
@@ -2310,10 +2310,10 @@ class Xe {
|
|
2310
2310
|
if (t == null)
|
2311
2311
|
return "null";
|
2312
2312
|
let e = typeof t;
|
2313
|
-
return e == "number" || e == "boolean" ? t : e == "object" || e == "string" ? `'${(e == "object" ?
|
2313
|
+
return e == "number" || e == "boolean" ? t : e == "object" || e == "string" ? `'${(e == "object" ? _.serialize(t) : t).replace(/'/g, "''")}'` : t;
|
2314
2314
|
}
|
2315
2315
|
}
|
2316
|
-
class
|
2316
|
+
class Fe extends Oe {
|
2317
2317
|
constructor() {
|
2318
2318
|
super(...arguments);
|
2319
2319
|
n(this, "type", "Sql");
|
@@ -2328,11 +2328,11 @@ class Me extends je {
|
|
2328
2328
|
`, a += "(";
|
2329
2329
|
let g = Object.keys(p);
|
2330
2330
|
for (let b = 0; b < g.length; b++) {
|
2331
|
-
let
|
2332
|
-
if (i != null && i.name ==
|
2331
|
+
let q = g[b];
|
2332
|
+
if (i != null && i.name == q)
|
2333
2333
|
continue;
|
2334
|
-
let
|
2335
|
-
a += `${Xe.getValue(
|
2334
|
+
let N = p[q];
|
2335
|
+
a += `${Xe.getValue(N)}`, b != g.length - 1 && (a += ", ");
|
2336
2336
|
}
|
2337
2337
|
a += ")", d != r.length - 1 && (a += `\r
|
2338
2338
|
\r
|
@@ -2344,24 +2344,24 @@ class Me extends je {
|
|
2344
2344
|
return "";
|
2345
2345
|
}
|
2346
2346
|
}
|
2347
|
-
class
|
2347
|
+
class Nt extends Oe {
|
2348
2348
|
constructor() {
|
2349
2349
|
super(...arguments);
|
2350
2350
|
n(this, "type", "MySql");
|
2351
2351
|
}
|
2352
2352
|
insert(e) {
|
2353
|
-
return new
|
2353
|
+
return new Fe().insert(e);
|
2354
2354
|
}
|
2355
2355
|
update(e) {
|
2356
|
-
return new
|
2356
|
+
return new Fe().update(e);
|
2357
2357
|
}
|
2358
2358
|
}
|
2359
|
-
class
|
2359
|
+
class Vt extends P {
|
2360
2360
|
open() {
|
2361
|
-
super.open(), super.instances = [new Pt(), new Ut(), new
|
2361
|
+
super.open(), super.instances = [new Pt(), new Ut(), new Nt(), new Fe()];
|
2362
2362
|
}
|
2363
2363
|
}
|
2364
|
-
class
|
2364
|
+
class er {
|
2365
2365
|
constructor() {
|
2366
2366
|
/**
|
2367
2367
|
* 表名
|
@@ -2400,7 +2400,7 @@ class lt {
|
|
2400
2400
|
let c = new XMLHttpRequest();
|
2401
2401
|
c.open("GET", r, !1), c.onreadystatechange = () => {
|
2402
2402
|
if (c.readyState == 4 && c.status == 200) {
|
2403
|
-
let h =
|
2403
|
+
let h = j.createEmptyByUrl(r);
|
2404
2404
|
h.appendChild(document.createTextNode(c.responseText)), document.head.appendChild(h), a();
|
2405
2405
|
}
|
2406
2406
|
}, c.onerror = () => {
|
@@ -2418,8 +2418,8 @@ class lt {
|
|
2418
2418
|
let e = W.getArray(t), s = [];
|
2419
2419
|
for (let r of e) {
|
2420
2420
|
let i = new Promise((a, o) => {
|
2421
|
-
let c =
|
2422
|
-
c != null ? a(c) : (c =
|
2421
|
+
let c = j.getByUrl(r);
|
2422
|
+
c != null ? a(c) : (c = j.createByUrl(r), document.head.appendChild(c), c.onload = (h) => {
|
2423
2423
|
a(c);
|
2424
2424
|
}, c.onerror = (h) => {
|
2425
2425
|
o(h);
|
@@ -2435,7 +2435,7 @@ class lt {
|
|
2435
2435
|
//#endregion
|
2436
2436
|
//#region 开启
|
2437
2437
|
async open(t) {
|
2438
|
-
this.task = await
|
2438
|
+
this.task = await C.task.create("Memory"), this.task.taskLimit = 1;
|
2439
2439
|
}
|
2440
2440
|
async getMonaco(t = null) {
|
2441
2441
|
let e = window.monaco;
|
@@ -2489,32 +2489,32 @@ class zt extends lt {
|
|
2489
2489
|
//#endregion
|
2490
2490
|
async getCrypto() {
|
2491
2491
|
let e = ["/crypto-js.js"];
|
2492
|
-
return await super.loadFilesAsync("/assets/crypto-js", e), window.CryptoJS;
|
2492
|
+
return await super.loadFilesAsync("/assets/crypto-js@4.2.0", e), window.CryptoJS;
|
2493
2493
|
}
|
2494
2494
|
async getECharts() {
|
2495
|
-
let e = ["/echarts.min.js"];
|
2496
|
-
return await super.loadFilesAsync("/assets/echarts", e), window.echarts;
|
2495
|
+
let e = ["/dist/echarts.min.js"];
|
2496
|
+
return await super.loadFilesAsync("/assets/echarts@5.5.1", e), window.echarts;
|
2497
2497
|
}
|
2498
2498
|
async getElementPlus() {
|
2499
|
-
let e = ["/index.css", "/theme-chalk/dark/css-vars.css"];
|
2500
|
-
await super.loadFilesAsync("/assets/element-plus", e);
|
2499
|
+
let e = ["/dist/index.css", "/theme-chalk/dark/css-vars.css"];
|
2500
|
+
await super.loadFilesAsync("/assets/element-plus@2.7.8", e);
|
2501
2501
|
}
|
2502
2502
|
async getFortAwesome() {
|
2503
2503
|
let e = ["/css/all.min.css"];
|
2504
|
-
await super.loadFilesAsync("/assets/@fortawesome/fontawesome-free", e);
|
2504
|
+
await super.loadFilesAsync("/assets/@fortawesome@6.5.2/fontawesome-free", e);
|
2505
2505
|
}
|
2506
2506
|
async getMonaco() {
|
2507
|
-
return await super.getMonaco("/assets/monaco-editor/min/vs");
|
2507
|
+
return await super.getMonaco("/assets/monaco-editor@0.50.0/min/vs");
|
2508
2508
|
}
|
2509
2509
|
async getQuill() {
|
2510
|
-
return await super.getQuill("/assets/quill");
|
2510
|
+
return await super.getQuill("/assets/quill@2.0.2/dist");
|
2511
2511
|
}
|
2512
2512
|
async getWeiXin() {
|
2513
2513
|
return Promise.resolve(void 0);
|
2514
2514
|
}
|
2515
2515
|
async getXlsx() {
|
2516
|
-
let e = ["/xlsx.min.js"];
|
2517
|
-
return await super.loadFilesAsync("/assets/xlsx-js-style", e), window.XLSX;
|
2516
|
+
let e = ["/dist/xlsx.min.js"];
|
2517
|
+
return await super.loadFilesAsync("/assets/xlsx-js-style@1.2.0", e), window.XLSX;
|
2518
2518
|
}
|
2519
2519
|
}
|
2520
2520
|
class Kt extends lt {
|
@@ -2565,7 +2565,7 @@ class Kt extends lt {
|
|
2565
2565
|
return await super.loadFilesAsync(`${this.jdCdn}/xlsx-js-style@1.2.0`, e), window.XLSX;
|
2566
2566
|
}
|
2567
2567
|
}
|
2568
|
-
class Wt extends
|
2568
|
+
class Wt extends P {
|
2569
2569
|
open() {
|
2570
2570
|
super.open(), super.instances = [new zt(), new Kt()];
|
2571
2571
|
}
|
@@ -2600,7 +2600,7 @@ class Jt extends Qt {
|
|
2600
2600
|
//#endregion
|
2601
2601
|
//#region 开启
|
2602
2602
|
async open(e) {
|
2603
|
-
this.crypto = await
|
2603
|
+
this.crypto = await ge.getCrypto();
|
2604
2604
|
}
|
2605
2605
|
//#endregion
|
2606
2606
|
encodeString(e) {
|
@@ -2612,7 +2612,7 @@ class Jt extends Qt {
|
|
2612
2612
|
return this.crypto.enc.Utf8.stringify(s);
|
2613
2613
|
}
|
2614
2614
|
}
|
2615
|
-
class Xt extends
|
2615
|
+
class Xt extends P {
|
2616
2616
|
get instances() {
|
2617
2617
|
return [new Jt()];
|
2618
2618
|
}
|
@@ -2645,7 +2645,7 @@ class Gt extends Yt {
|
|
2645
2645
|
//#endregion
|
2646
2646
|
//#region 开启
|
2647
2647
|
async open(e) {
|
2648
|
-
this.xlsx = await
|
2648
|
+
this.xlsx = await ge.getXlsx();
|
2649
2649
|
}
|
2650
2650
|
//#endregion
|
2651
2651
|
export(e, s) {
|
@@ -2682,7 +2682,7 @@ class Gt extends Yt {
|
|
2682
2682
|
}), o["!cols"] = h, this.xlsx.writeFile(a, s);
|
2683
2683
|
}
|
2684
2684
|
}
|
2685
|
-
class Zt extends
|
2685
|
+
class Zt extends P {
|
2686
2686
|
get instances() {
|
2687
2687
|
return [new Gt()];
|
2688
2688
|
}
|
@@ -2701,7 +2701,7 @@ class Ht {
|
|
2701
2701
|
}
|
2702
2702
|
class es extends Ht {
|
2703
2703
|
}
|
2704
|
-
class ts extends
|
2704
|
+
class ts extends P {
|
2705
2705
|
get instances() {
|
2706
2706
|
return [new es()];
|
2707
2707
|
}
|
@@ -2757,7 +2757,7 @@ class rs {
|
|
2757
2757
|
copy(t, e, s) {
|
2758
2758
|
}
|
2759
2759
|
}
|
2760
|
-
class ns extends
|
2760
|
+
class ns extends P {
|
2761
2761
|
get instances() {
|
2762
2762
|
return [new ss(), new ls(), new rs()];
|
2763
2763
|
}
|
@@ -2800,7 +2800,7 @@ class as extends rt {
|
|
2800
2800
|
//#endregion
|
2801
2801
|
//#region 开启
|
2802
2802
|
async open(e) {
|
2803
|
-
this.crypto = await
|
2803
|
+
this.crypto = await ge.getCrypto();
|
2804
2804
|
}
|
2805
2805
|
//#endregion
|
2806
2806
|
compute(e) {
|
@@ -2808,7 +2808,7 @@ class as extends rt {
|
|
2808
2808
|
return Promise.resolve(s);
|
2809
2809
|
}
|
2810
2810
|
}
|
2811
|
-
class os extends
|
2811
|
+
class os extends P {
|
2812
2812
|
get instances() {
|
2813
2813
|
return [new is(), new as()];
|
2814
2814
|
}
|
@@ -2857,7 +2857,7 @@ class nt {
|
|
2857
2857
|
getHeader(t) {
|
2858
2858
|
if (this.headers == null)
|
2859
2859
|
return null;
|
2860
|
-
let e =
|
2860
|
+
let e = X.getKey(this.headers, t);
|
2861
2861
|
return e ? this.headers[e] : null;
|
2862
2862
|
}
|
2863
2863
|
/**
|
@@ -2881,7 +2881,7 @@ class nt {
|
|
2881
2881
|
* 不能放在getRequest中处理,因为外部会直接调用当前send方法,而不走getRequest
|
2882
2882
|
*/
|
2883
2883
|
prepare() {
|
2884
|
-
this.time = /* @__PURE__ */ new Date(), this.body == null && this.data != null && this.contentType == "application/json" && (this.body =
|
2884
|
+
this.time = /* @__PURE__ */ new Date(), this.body == null && this.data != null && this.contentType == "application/json" && (this.body = _.serializeWithoutString(this.data)), this.data == null && this.body != null && this.contentType == "application/json" && (this.data = _.deserialize(this.body)), this.contentType != null && this.addHeader("content-type", this.contentType);
|
2885
2885
|
}
|
2886
2886
|
//#endregion
|
2887
2887
|
}
|
@@ -2903,46 +2903,54 @@ class it extends nt {
|
|
2903
2903
|
this.id = W.getUniqueId(8);
|
2904
2904
|
}
|
2905
2905
|
}
|
2906
|
-
class
|
2906
|
+
class Ve {
|
2907
2907
|
constructor() {
|
2908
2908
|
//#region 属性
|
2909
2909
|
n(this, "type");
|
2910
|
-
|
2911
|
-
|
2910
|
+
/**
|
2911
|
+
* 默认请求器
|
2912
|
+
*/
|
2913
|
+
n(this, "http");
|
2914
|
+
//#endregion
|
2915
|
+
n(this, "get", async (t, e) => (await this.sendGet(t, e)).data);
|
2916
|
+
n(this, "sendGet", async (t, e) => {
|
2917
|
+
let s = K.getUrl(t, e), l = this.getRequest("GET", "application/json", s);
|
2918
|
+
return await this.send(l);
|
2919
|
+
});
|
2920
|
+
n(this, "post", async (t, e) => (await this.sendPost(t, e)).data);
|
2921
|
+
n(this, "sendPost", async (t, e) => {
|
2922
|
+
let s = this.getRequest("POST", "application/json", t, e);
|
2923
|
+
return await this.send(s);
|
2924
|
+
});
|
2925
|
+
n(this, "patch", async (t) => (await this.sendPatch(t)).data);
|
2926
|
+
n(this, "sendPatch", async (t, e) => {
|
2927
|
+
let s = this.getRequest("PATCH", "application/json", t);
|
2928
|
+
return await this.send(s);
|
2929
|
+
});
|
2930
|
+
/**
|
2931
|
+
* 获取请求消息
|
2932
|
+
*/
|
2933
|
+
n(this, "getRequest", (t, e, s, l = null) => {
|
2934
|
+
let r = new it();
|
2935
|
+
return r.method = t, r.contentType = e, r.path = s, r.body = _.serializeWithoutString(l), r;
|
2936
|
+
});
|
2912
2937
|
}
|
2913
2938
|
//#endregion
|
2914
2939
|
//#region 开启
|
2915
2940
|
async open(t) {
|
2916
|
-
|
2917
|
-
}
|
2918
|
-
//#endregion
|
2919
|
-
async get(t, e) {
|
2920
|
-
return (await this.sendGet(t, e)).data;
|
2921
|
-
}
|
2922
|
-
async sendGet(t, e) {
|
2923
|
-
let s = K.getUrl(t, e), l = this.getRequest("GET", "application/json", s);
|
2924
|
-
return await this.send(l);
|
2925
|
-
}
|
2926
|
-
async post(t, e) {
|
2927
|
-
return (await this.sendPost(t, e)).data;
|
2941
|
+
_.mergeTo(this, t);
|
2928
2942
|
}
|
2929
|
-
|
2930
|
-
|
2931
|
-
return await this.send(s);
|
2943
|
+
get onRequest() {
|
2944
|
+
return this.http == null ? null : this.http.onRequest;
|
2932
2945
|
}
|
2933
|
-
|
2934
|
-
|
2946
|
+
set onRequest(t) {
|
2947
|
+
this.http != null && (this.http.onRequest = t);
|
2935
2948
|
}
|
2936
|
-
|
2937
|
-
|
2938
|
-
return await this.send(s);
|
2949
|
+
get onResponse() {
|
2950
|
+
return this.http == null ? null : this.http.onResponse;
|
2939
2951
|
}
|
2940
|
-
|
2941
|
-
|
2942
|
-
*/
|
2943
|
-
getRequest(t, e, s, l = null) {
|
2944
|
-
let r = new it();
|
2945
|
-
return r.method = t, r.contentType = e, r.path = s, r.body = M.serializeWithoutString(l), r;
|
2952
|
+
set onResponse(t) {
|
2953
|
+
this.http != null && (this.http.onResponse = t);
|
2946
2954
|
}
|
2947
2955
|
}
|
2948
2956
|
class Ye extends nt {
|
@@ -2970,12 +2978,30 @@ class Ye extends nt {
|
|
2970
2978
|
n(this, "request");
|
2971
2979
|
}
|
2972
2980
|
}
|
2973
|
-
class us extends
|
2981
|
+
class us extends Ve {
|
2974
2982
|
constructor() {
|
2975
2983
|
super(...arguments);
|
2984
|
+
//#region 属性
|
2976
2985
|
n(this, "type", "Default");
|
2977
2986
|
n(this, "baseUrl");
|
2987
|
+
n(this, "_onRequest");
|
2988
|
+
n(this, "_onResponse");
|
2989
|
+
}
|
2990
|
+
//#endregion
|
2991
|
+
//#region 开启
|
2992
|
+
get onRequest() {
|
2993
|
+
return this._onRequest;
|
2994
|
+
}
|
2995
|
+
set onRequest(e) {
|
2996
|
+
this._onRequest = e;
|
2997
|
+
}
|
2998
|
+
get onResponse() {
|
2999
|
+
return this._onResponse;
|
2978
3000
|
}
|
3001
|
+
set onResponse(e) {
|
3002
|
+
this._onResponse = e;
|
3003
|
+
}
|
3004
|
+
//#endregion
|
2979
3005
|
async send(e) {
|
2980
3006
|
W.isNullOrEmpty(e.url) && (e.url = this.baseUrl + e.path), e.prepare();
|
2981
3007
|
let s;
|
@@ -3033,7 +3059,7 @@ class us extends qe {
|
|
3033
3059
|
});
|
3034
3060
|
}
|
3035
3061
|
}
|
3036
|
-
class cs extends
|
3062
|
+
class cs extends Ve {
|
3037
3063
|
constructor() {
|
3038
3064
|
super(...arguments);
|
3039
3065
|
//#region 属性
|
@@ -3050,14 +3076,31 @@ class cs extends qe {
|
|
3050
3076
|
* AppSecret
|
3051
3077
|
*/
|
3052
3078
|
n(this, "appSecret", "");
|
3053
|
-
/**
|
3054
|
-
* 默认请求器
|
3055
|
-
*/
|
3056
|
-
n(this, "requester");
|
3057
3079
|
/**
|
3058
3080
|
* Hash计算器
|
3059
3081
|
*/
|
3060
3082
|
n(this, "hasher");
|
3083
|
+
//#endregion
|
3084
|
+
/**
|
3085
|
+
* 危险操作,会暴露敏感信息
|
3086
|
+
*/
|
3087
|
+
n(this, "send", async (e) => {
|
3088
|
+
let s = ee.getTimestamp(), l = {
|
3089
|
+
app_id: this.appId,
|
3090
|
+
hash_type: "sha256",
|
3091
|
+
timestamp: parseInt((s / 1e3).toString())
|
3092
|
+
};
|
3093
|
+
W.isNullOrEmpty(e.body) || (l.jsonBody = e.body);
|
3094
|
+
let r = K.deserialize(e.path);
|
3095
|
+
for (let p in r)
|
3096
|
+
l[p] = r[p];
|
3097
|
+
let i = K.getPath(e.path);
|
3098
|
+
l = Be.sort(l);
|
3099
|
+
let a = Bt.signDictionary(l, !1), o = `POST${i}?${a}${this.appSecret}`, c = await this.hasher.compute(o);
|
3100
|
+
l.sign = c.toLowerCase(), delete l.jsonBody, l = Be.sort(l);
|
3101
|
+
let h = K.serialize(l);
|
3102
|
+
return e.url = K.concatUrl(this.baseUrl, i + "?" + h), await this.http.send(e);
|
3103
|
+
});
|
3061
3104
|
}
|
3062
3105
|
//#endregion
|
3063
3106
|
//#region 开启
|
@@ -3065,31 +3108,10 @@ class cs extends qe {
|
|
3065
3108
|
* 危险操作,会暴露敏感信息
|
3066
3109
|
*/
|
3067
3110
|
async open(e) {
|
3068
|
-
await super.open(e), this.
|
3069
|
-
}
|
3070
|
-
//#endregion
|
3071
|
-
/**
|
3072
|
-
* 危险操作,会暴露敏感信息
|
3073
|
-
*/
|
3074
|
-
async send(e) {
|
3075
|
-
let s = te.getTimestamp(), l = {
|
3076
|
-
app_id: this.appId,
|
3077
|
-
hash_type: "sha256",
|
3078
|
-
timestamp: parseInt((s / 1e3).toString())
|
3079
|
-
};
|
3080
|
-
W.isNullOrEmpty(e.body) || (l.jsonBody = e.body);
|
3081
|
-
let r = K.deserialize(e.path);
|
3082
|
-
for (let p in r)
|
3083
|
-
l[p] = r[p];
|
3084
|
-
let i = K.getPath(e.path);
|
3085
|
-
l = Pe.sort(l);
|
3086
|
-
let a = Bt.signDictionary(l, !1), o = `POST${i}?${a}${this.appSecret}`, c = await this.hasher.compute(o);
|
3087
|
-
l.sign = c.toLowerCase(), delete l.jsonBody, l = Pe.sort(l);
|
3088
|
-
let h = K.serialize(l);
|
3089
|
-
return e.url = K.concatUrl(this.baseUrl, i + "?" + h), await this.requester.send(e);
|
3111
|
+
await super.open(e), this.http = await C.http.getDefault(), this.hasher = await C.hasher.create("Sha256");
|
3090
3112
|
}
|
3091
3113
|
}
|
3092
|
-
class ds extends
|
3114
|
+
class ds extends Ve {
|
3093
3115
|
constructor() {
|
3094
3116
|
super(...arguments);
|
3095
3117
|
//#region 属性
|
@@ -3114,10 +3136,6 @@ class ds extends qe {
|
|
3114
3136
|
* 当前终端
|
3115
3137
|
*/
|
3116
3138
|
n(this, "platform");
|
3117
|
-
/**
|
3118
|
-
* 默认请求器
|
3119
|
-
*/
|
3120
|
-
n(this, "http");
|
3121
3139
|
/**
|
3122
3140
|
* 单点登录配置
|
3123
3141
|
*/
|
@@ -3126,6 +3144,53 @@ class ds extends qe {
|
|
3126
3144
|
* 单点登录配置
|
3127
3145
|
*/
|
3128
3146
|
n(this, "signer");
|
3147
|
+
//#endregion
|
3148
|
+
/**
|
3149
|
+
* 发送请求
|
3150
|
+
*/
|
3151
|
+
n(this, "send", async (e) => {
|
3152
|
+
e.url = K.concatUrl(this.baseUrl, e.path), await this.onRequest(e);
|
3153
|
+
let s = await this.http.send(e);
|
3154
|
+
if (s.status != 200) {
|
3155
|
+
let r;
|
3156
|
+
if (s.status == 0)
|
3157
|
+
r = `网络异常,请检查接口访问是否正常: ${e.method} ${e.url}`;
|
3158
|
+
else {
|
3159
|
+
let i = s.status ? `(${s.status})` : "";
|
3160
|
+
r = `接口加载异常: ${e.method}${i} ${e.url}`;
|
3161
|
+
}
|
3162
|
+
return ye.warning(r), Promise.reject(r);
|
3163
|
+
}
|
3164
|
+
let l = s.data;
|
3165
|
+
return l.code != "Ok" ? (ye.error(l.message), Promise.reject(l)) : s;
|
3166
|
+
});
|
3167
|
+
/**
|
3168
|
+
* 请求预处理
|
3169
|
+
*/
|
3170
|
+
n(this, "beforeRequest", async (e) => {
|
3171
|
+
if (K.httpOrHttps(e.path))
|
3172
|
+
return Promise.resolve();
|
3173
|
+
let s;
|
3174
|
+
if (this.user == null)
|
3175
|
+
s = this.platform;
|
3176
|
+
else {
|
3177
|
+
let r = ee.getTimestamp(), i = await this.signer.getSign(this.user.userId, e.url, e.body, r, this.user.secret);
|
3178
|
+
s = this.sso.getAuth(this.user.identity.token, r, i, this.platform, this.env);
|
3179
|
+
}
|
3180
|
+
let l = {};
|
3181
|
+
l.Authorization = s, e.getHeader("Accept-Language") || (l["Accept-Language"] = this.language), e.addHeaders(l);
|
3182
|
+
});
|
3183
|
+
/**
|
3184
|
+
* 处理网络错误和响应错误场景
|
3185
|
+
*/
|
3186
|
+
n(this, "handleError", (e) => {
|
3187
|
+
if (e instanceof Object) {
|
3188
|
+
let s = e.message;
|
3189
|
+
e.message == "Network Error" && (K.httpOrHttps(e.config.url) ? s = "接口网络错误: " + e.config.url : s = "接口网络错误: " + e.config.baseURL + e.config.url), ye.error(s);
|
3190
|
+
} else
|
3191
|
+
ye.error(e.message);
|
3192
|
+
return Promise.reject(e);
|
3193
|
+
});
|
3129
3194
|
}
|
3130
3195
|
//#endregion
|
3131
3196
|
//#region 开启
|
@@ -3133,57 +3198,10 @@ class ds extends qe {
|
|
3133
3198
|
* 开启
|
3134
3199
|
*/
|
3135
3200
|
async open(e) {
|
3136
|
-
await super.open(e), this.http = await
|
3137
|
-
}
|
3138
|
-
//#endregion
|
3139
|
-
/**
|
3140
|
-
* 发送请求
|
3141
|
-
*/
|
3142
|
-
async send(e) {
|
3143
|
-
e.url = K.concatUrl(this.baseUrl, e.path), await this.onRequest(e);
|
3144
|
-
let s = await this.http.send(e);
|
3145
|
-
if (s.status != 200) {
|
3146
|
-
let r;
|
3147
|
-
if (s.status == 0)
|
3148
|
-
r = `网络异常,请检查接口访问是否正常: ${e.method} ${e.url}`;
|
3149
|
-
else {
|
3150
|
-
let i = s.status ? `(${s.status})` : "";
|
3151
|
-
r = `接口加载异常: ${e.method}${i} ${e.url}`;
|
3152
|
-
}
|
3153
|
-
return ve.warning(r), Promise.reject(r);
|
3154
|
-
}
|
3155
|
-
let l = s.data;
|
3156
|
-
return l.code != "Ok" ? (ve.error(l.message), Promise.reject(l)) : s;
|
3157
|
-
}
|
3158
|
-
/**
|
3159
|
-
* 请求预处理
|
3160
|
-
*/
|
3161
|
-
async beforeRequest(e) {
|
3162
|
-
if (K.httpOrHttps(e.path))
|
3163
|
-
return Promise.resolve();
|
3164
|
-
let s;
|
3165
|
-
if (this.user == null)
|
3166
|
-
s = this.platform;
|
3167
|
-
else {
|
3168
|
-
let r = te.getTimestamp(), i = await this.signer.getSign(this.user.userId, e.url, e.body, r, this.user.secret);
|
3169
|
-
s = this.sso.getAuth(this.user.identity.token, r, i, this.platform, this.env);
|
3170
|
-
}
|
3171
|
-
let l = {};
|
3172
|
-
l.Authorization = s, e.getHeader("Accept-Language") || (l["Accept-Language"] = this.language), e.addHeaders(l);
|
3173
|
-
}
|
3174
|
-
/**
|
3175
|
-
* 处理网络错误和响应错误场景
|
3176
|
-
*/
|
3177
|
-
handleError(e) {
|
3178
|
-
if (e instanceof Object) {
|
3179
|
-
let s = e.message;
|
3180
|
-
e.message == "Network Error" && (K.httpOrHttps(e.config.url) ? s = "接口网络错误: " + e.config.url : s = "接口网络错误: " + e.config.baseURL + e.config.url), ve.error(s);
|
3181
|
-
} else
|
3182
|
-
ve.error(e.message);
|
3183
|
-
return Promise.reject(e);
|
3201
|
+
await super.open(e), this.http = await C.http.getDefault(), this.user != null && (this.sso = await C.sso.create(this.user.type)), this.signer = await C.signer.createIfAbsent("default"), this.onRequest == null && (this.onRequest = this.beforeRequest);
|
3184
3202
|
}
|
3185
3203
|
}
|
3186
|
-
class hs extends
|
3204
|
+
class hs extends P {
|
3187
3205
|
get instances() {
|
3188
3206
|
return [new us(), new cs(), new ds()];
|
3189
3207
|
}
|
@@ -3191,7 +3209,7 @@ class hs extends B {
|
|
3191
3209
|
* 创建并开启
|
3192
3210
|
*/
|
3193
3211
|
async createById(t, e = null) {
|
3194
|
-
e == null && (e = new
|
3212
|
+
e == null && (e = new jt());
|
3195
3213
|
let s = await super.createById(t, e), l = e.value;
|
3196
3214
|
return await s.open(l.Conn), s;
|
3197
3215
|
}
|
@@ -3221,7 +3239,7 @@ class ps {
|
|
3221
3239
|
return null;
|
3222
3240
|
if (!this.t_exists(t)) {
|
3223
3241
|
let s = t.split(".");
|
3224
|
-
return
|
3242
|
+
return oe.getLast(s, 2).join(".");
|
3225
3243
|
}
|
3226
3244
|
return typeof e == "string" ? this.translate(t, [e]) : this.translate(t, e);
|
3227
3245
|
});
|
@@ -3261,9 +3279,6 @@ class ps {
|
|
3261
3279
|
s ? t ? e ? l = `${t}(${e}) - ${s}` : l = `${t} - ${s}` : l = s : e ? l = `${t}(${e})` : l = t, document.title = l;
|
3262
3280
|
});
|
3263
3281
|
//#region 加载
|
3264
|
-
/**
|
3265
|
-
* 添加自定义多语言包
|
3266
|
-
*/
|
3267
3282
|
n(this, "addMessages", (t) => {
|
3268
3283
|
let e = Object.keys(t);
|
3269
3284
|
for (let s of e)
|
@@ -3280,8 +3295,7 @@ class ps {
|
|
3280
3295
|
//#endregion
|
3281
3296
|
//#region 开启
|
3282
3297
|
async open(t) {
|
3283
|
-
|
3284
|
-
this.lang = (s == null ? void 0 : s.language) ?? st.getLanguage();
|
3298
|
+
_.mergeTo(this, t);
|
3285
3299
|
}
|
3286
3300
|
//#endregion
|
3287
3301
|
}
|
@@ -3292,13 +3306,13 @@ class fs extends ps {
|
|
3292
3306
|
//#endregion
|
3293
3307
|
n(this, "translate", (e, s) => {
|
3294
3308
|
let l = this.messages[this.lang], r = e.split(".");
|
3295
|
-
return
|
3309
|
+
return _.getValue(l, r);
|
3296
3310
|
});
|
3297
3311
|
n(this, "t_exists", (e) => {
|
3298
3312
|
if (!e)
|
3299
3313
|
return null;
|
3300
3314
|
let s = this.messages[this.lang], l = e.split(".");
|
3301
|
-
return
|
3315
|
+
return _.hasKey(s, l);
|
3302
3316
|
});
|
3303
3317
|
n(this, "loadI18n", async (e) => {
|
3304
3318
|
e == null && (e = this.lang);
|
@@ -3307,7 +3321,7 @@ class fs extends ps {
|
|
3307
3321
|
return T.post("/i18n", i).then(({ data: a }) => {
|
3308
3322
|
a.forEach((o) => {
|
3309
3323
|
let c = `${e}.${o.Module}.${o.Key}`.split(".");
|
3310
|
-
|
3324
|
+
X.addProperties(this.messages, c, o.Value);
|
3311
3325
|
}), r(a);
|
3312
3326
|
});
|
3313
3327
|
}), l = new Promise((r) => {
|
@@ -3315,7 +3329,7 @@ class fs extends ps {
|
|
3315
3329
|
T.post("/i18n_business", i).then(({ data: a }) => {
|
3316
3330
|
a.forEach((o) => {
|
3317
3331
|
let c = `${e}._business.${o.Table}.${o.Field}.${o.Key}`.split(".");
|
3318
|
-
|
3332
|
+
X.addProperties(this.messages, c, o.Value);
|
3319
3333
|
}), r(a);
|
3320
3334
|
});
|
3321
3335
|
});
|
@@ -3327,20 +3341,12 @@ class fs extends ps {
|
|
3327
3341
|
await super.open(e);
|
3328
3342
|
}
|
3329
3343
|
}
|
3330
|
-
class gs extends
|
3344
|
+
class gs extends P {
|
3331
3345
|
//#region 开启
|
3332
3346
|
open() {
|
3333
3347
|
super.open(), super.addType(new fs());
|
3334
3348
|
}
|
3335
3349
|
//#endregion
|
3336
|
-
/**
|
3337
|
-
* 获取默认多语言
|
3338
|
-
*/
|
3339
|
-
async getDefault() {
|
3340
|
-
return await super.createIfAbsent("Default", "Default", async (e) => {
|
3341
|
-
await e.open();
|
3342
|
-
});
|
3343
|
-
}
|
3344
3350
|
}
|
3345
3351
|
class ms {
|
3346
3352
|
constructor() {
|
@@ -3374,7 +3380,7 @@ class ys extends ms {
|
|
3374
3380
|
console.warn(e);
|
3375
3381
|
}
|
3376
3382
|
}
|
3377
|
-
class vs extends
|
3383
|
+
class vs extends P {
|
3378
3384
|
get instances() {
|
3379
3385
|
return [new ys()];
|
3380
3386
|
}
|
@@ -3409,7 +3415,7 @@ class bs extends ws {
|
|
3409
3415
|
dispose() {
|
3410
3416
|
}
|
3411
3417
|
}
|
3412
|
-
class xs extends
|
3418
|
+
class xs extends P {
|
3413
3419
|
get instances() {
|
3414
3420
|
return [new bs()];
|
3415
3421
|
}
|
@@ -3433,11 +3439,11 @@ class ks {
|
|
3433
3439
|
//#endregion
|
3434
3440
|
//#region 开启
|
3435
3441
|
async open(t) {
|
3436
|
-
this.provider = await
|
3442
|
+
this.provider = await C.provider.getDefault("user");
|
3437
3443
|
}
|
3438
3444
|
//#endregion
|
3439
3445
|
async login(t) {
|
3440
|
-
return T.post(`/user/login?type=${this.type}`, t).then(async (e) => (await this.provider.saveAsync("sso", e.data), T.user = e.data, T.sso = await
|
3446
|
+
return T.post(`/user/login?type=${this.type}`, t).then(async (e) => (await this.provider.saveAsync("sso", e.data), T.user = e.data, T.sso = await C.sso.create(e.data.type), Promise.resolve(e)));
|
3441
3447
|
}
|
3442
3448
|
loginUrl(t) {
|
3443
3449
|
return "";
|
@@ -3467,11 +3473,11 @@ class Ss {
|
|
3467
3473
|
//#endregion
|
3468
3474
|
//#region 开启
|
3469
3475
|
async open(t) {
|
3470
|
-
this.url = t.url, this.app_id = t.app_id, this.provider = await
|
3476
|
+
this.url = t.url, this.app_id = t.app_id, this.provider = await C.provider.getDefault("user");
|
3471
3477
|
}
|
3472
3478
|
//#endregion
|
3473
3479
|
async login(t) {
|
3474
|
-
await this.provider.saveAsync("sso", t), T.user = t, T.sso = await
|
3480
|
+
await this.provider.saveAsync("sso", t), T.user = t, T.sso = await C.sso.create(t.type);
|
3475
3481
|
}
|
3476
3482
|
loginUrl(t) {
|
3477
3483
|
let e = encodeURIComponent(t);
|
@@ -3507,7 +3513,7 @@ class at {
|
|
3507
3513
|
n(this, "identity");
|
3508
3514
|
}
|
3509
3515
|
}
|
3510
|
-
class
|
3516
|
+
class Cs {
|
3511
3517
|
constructor() {
|
3512
3518
|
n(this, "type", "WeiXin");
|
3513
3519
|
}
|
@@ -3529,12 +3535,12 @@ class Es {
|
|
3529
3535
|
return Promise.resolve();
|
3530
3536
|
}
|
3531
3537
|
}
|
3532
|
-
class
|
3538
|
+
class Es {
|
3533
3539
|
constructor() {
|
3534
3540
|
n(this, "type");
|
3535
3541
|
}
|
3536
3542
|
}
|
3537
|
-
class Ts extends
|
3543
|
+
class Ts extends Es {
|
3538
3544
|
constructor() {
|
3539
3545
|
super(...arguments);
|
3540
3546
|
//#region 属性
|
@@ -3546,7 +3552,7 @@ class Ts extends Cs {
|
|
3546
3552
|
}
|
3547
3553
|
//#endregion
|
3548
3554
|
async open(e) {
|
3549
|
-
this.provider = await
|
3555
|
+
this.provider = await C.provider.getDefault("user");
|
3550
3556
|
}
|
3551
3557
|
async login(e) {
|
3552
3558
|
}
|
@@ -3580,7 +3586,7 @@ class $s {
|
|
3580
3586
|
}
|
3581
3587
|
//#endregion
|
3582
3588
|
async open(t) {
|
3583
|
-
this.provider = await
|
3589
|
+
this.provider = await C.provider.getDefault("user");
|
3584
3590
|
}
|
3585
3591
|
async login(t) {
|
3586
3592
|
return T.post(`/user/login?type=${this.type}`, t).then(async (e) => {
|
@@ -3670,18 +3676,18 @@ class ut extends ot {
|
|
3670
3676
|
//#region 开启
|
3671
3677
|
open() {
|
3672
3678
|
let e = this.sys.app;
|
3673
|
-
e.background =
|
3679
|
+
e.background = ce.background, e.theme = ce.theme, e.layout = ce.layout, e.language = ce.language, e.font = ce.font;
|
3674
3680
|
}
|
3675
3681
|
/**
|
3676
3682
|
* 初始化配置值(不一定跟登录用户相关,这也是单独分离的好处)
|
3677
3683
|
*/
|
3678
3684
|
async bind(e) {
|
3679
|
-
for (let
|
3680
|
-
let
|
3681
|
-
|
3685
|
+
for (let r of e) {
|
3686
|
+
let a = await this.get(r.kind, r.type) ?? r.content;
|
3687
|
+
X.addProperties(this, [r.kind, r.type], a);
|
3682
3688
|
}
|
3683
|
-
let s = this.sys.app;
|
3684
|
-
|
3689
|
+
let s = this.sys.app, l = document.documentElement;
|
3690
|
+
j.removeClass(l, ce.theme), j.addClass(l, s.theme), ve.emit("theme", s.theme), j.addClass(l, s.layout), this.setBackground(s.background), j.addStyle(l, "font-family", s.font);
|
3685
3691
|
}
|
3686
3692
|
/**
|
3687
3693
|
* 尝试添加架构
|
@@ -3705,7 +3711,7 @@ class ut extends ot {
|
|
3705
3711
|
* 获取本地配置
|
3706
3712
|
*/
|
3707
3713
|
async get(e, s) {
|
3708
|
-
return await (await
|
3714
|
+
return await (await C.provider.getDefault(e)).getAsync(s);
|
3709
3715
|
}
|
3710
3716
|
/**
|
3711
3717
|
* 设置背景
|
@@ -3722,11 +3728,11 @@ class ut extends ot {
|
|
3722
3728
|
let s = this.sys.app, l = document.documentElement, r = e.layout;
|
3723
3729
|
l.classList.remove(s.layout), l.classList.add(r), s.layout = r;
|
3724
3730
|
let i = e.theme;
|
3725
|
-
|
3731
|
+
j.removeClass(l, s.theme), j.addClass(l, i), s.theme = i, ve.emit("theme", i);
|
3726
3732
|
let a = e.background;
|
3727
|
-
this.setBackground(a),
|
3733
|
+
this.setBackground(a), ve.emit("background", a);
|
3728
3734
|
let o = e.font;
|
3729
|
-
s.font = o,
|
3735
|
+
s.font = o, j.addStyle(l, "font-family", o);
|
3730
3736
|
}
|
3731
3737
|
//#region 配置
|
3732
3738
|
/**
|
@@ -3747,7 +3753,7 @@ class ut extends ot {
|
|
3747
3753
|
* 全量保存用户配置
|
3748
3754
|
*/
|
3749
3755
|
async save(e, s, l, r = !0) {
|
3750
|
-
return r && await (await
|
3756
|
+
return r && await (await C.provider.getDefault(e)).saveAsync(s, l), T.post(`/user/config?kind=${e}&type=${s}`, l).then((i) => Promise.resolve(!0));
|
3751
3757
|
}
|
3752
3758
|
/**
|
3753
3759
|
* 部分保存用户配置
|
@@ -3780,13 +3786,16 @@ class Ds {
|
|
3780
3786
|
}
|
3781
3787
|
class Is {
|
3782
3788
|
constructor() {
|
3789
|
+
/**
|
3790
|
+
* 日志集合
|
3791
|
+
*/
|
3783
3792
|
n(this, "logs", []);
|
3784
3793
|
}
|
3785
3794
|
/**
|
3786
3795
|
* 手动添加日志
|
3787
3796
|
*/
|
3788
3797
|
add(t, e, s, l = null) {
|
3789
|
-
let r =
|
3798
|
+
let r = ee.getTimeString();
|
3790
3799
|
this.logs.unshift({ time: r, code: t, message: e, stack: s, elapsed: l });
|
3791
3800
|
}
|
3792
3801
|
/**
|
@@ -3815,8 +3824,8 @@ class Os {
|
|
3815
3824
|
this[e] = t[e];
|
3816
3825
|
}
|
3817
3826
|
}
|
3818
|
-
let
|
3819
|
-
class
|
3827
|
+
let Ae = new Os();
|
3828
|
+
class Rs {
|
3820
3829
|
constructor() {
|
3821
3830
|
//#region 属性
|
3822
3831
|
n(this, "loaded", !1);
|
@@ -3890,10 +3899,10 @@ class js {
|
|
3890
3899
|
return T.get("/app/setting").then(({ data: t }) => (Object.keys(t).forEach((e) => {
|
3891
3900
|
let s = t[e];
|
3892
3901
|
s && (this[e] = s);
|
3893
|
-
}),
|
3902
|
+
}), j.addClass(document.documentElement, this.theme, Ae.web.theme), ve.emits({ theme: this.theme }), Promise.resolve(t))).catch((t) => Promise.reject(t));
|
3894
3903
|
}
|
3895
3904
|
}
|
3896
|
-
class
|
3905
|
+
class js {
|
3897
3906
|
constructor() {
|
3898
3907
|
//#region 属性
|
3899
3908
|
/**
|
@@ -3918,10 +3927,10 @@ class Rs {
|
|
3918
3927
|
* 登录后,连接Socket
|
3919
3928
|
*/
|
3920
3929
|
async connect() {
|
3921
|
-
if (!
|
3930
|
+
if (!Ae.api.ws)
|
3922
3931
|
return;
|
3923
3932
|
if (this.socket == null || this.reconnect) {
|
3924
|
-
let e =
|
3933
|
+
let e = Ae.api.ws, s = new it();
|
3925
3934
|
s.path = e, s.method = "GET", await T.onRequest(s);
|
3926
3935
|
let l = s.getHeader("Authorization"), r = K.encode(l), i = `${e}?authorization=${r}`;
|
3927
3936
|
this.socket = new WebSocket(i);
|
@@ -3932,7 +3941,7 @@ class Rs {
|
|
3932
3941
|
}, this.socket.onmessage = (e) => {
|
3933
3942
|
this.handler && this.handler(e);
|
3934
3943
|
}, this.socket.onerror = (e) => {
|
3935
|
-
this.reconnect = !0, console.warn(`Socket连接失败:${
|
3944
|
+
this.reconnect = !0, console.warn(`Socket连接失败:${Ae.api.ws}`);
|
3936
3945
|
}, this.socket.onclose = (e) => {
|
3937
3946
|
this.connected = !1, this.reconnect && (t = setTimeout(async () => await this.connect(), 1e3));
|
3938
3947
|
};
|
@@ -3985,19 +3994,19 @@ class _s {
|
|
3985
3994
|
* 获取本地缓存中的用户信息;好处:即使手动更改storage数据,也可以里面获取到
|
3986
3995
|
*/
|
3987
3996
|
async getSso() {
|
3988
|
-
return await (await
|
3997
|
+
return await (await C.provider.getDefault("user")).getEntity("sso");
|
3989
3998
|
}
|
3990
3999
|
/**
|
3991
4000
|
* 登录后,获取用户信息
|
3992
4001
|
*/
|
3993
4002
|
async loadInfo() {
|
3994
|
-
return T.get("/user/info").then(async ({ data: t }) => (await
|
4003
|
+
return T.get("/user/info").then(async ({ data: t }) => (await Z.bind(t.configs), this.user = t, this.debugger = t.debugger, Promise.resolve(t)));
|
3995
4004
|
}
|
3996
4005
|
/**
|
3997
4006
|
* 未登录,获取匿名登录信息
|
3998
4007
|
*/
|
3999
4008
|
async getAnonymous() {
|
4000
|
-
await
|
4009
|
+
await Z.bind([]);
|
4001
4010
|
}
|
4002
4011
|
/**
|
4003
4012
|
* 根据路径获取路由
|
@@ -4010,7 +4019,7 @@ class _s {
|
|
4010
4019
|
* 加载服务端路由
|
4011
4020
|
*/
|
4012
4021
|
async loadMenus() {
|
4013
|
-
return T.get("/user/menu").then(({ data: t }) => (this.menus = t, this.menusFlat =
|
4022
|
+
return T.get("/user/menu").then(({ data: t }) => (this.menus = t, this.menusFlat = Ie.getFlat(t, "children"), Promise.resolve(t)));
|
4014
4023
|
}
|
4015
4024
|
/**
|
4016
4025
|
* 退出登录
|
@@ -4019,7 +4028,7 @@ class _s {
|
|
4019
4028
|
return T.post("/user/logout").then(async () => {
|
4020
4029
|
this.user = null, this.menus = null;
|
4021
4030
|
let t = await this.getSso();
|
4022
|
-
return await (await
|
4031
|
+
return await (await C.sso.create(t.type)).logout(), Us.disconnect(), Promise.resolve();
|
4023
4032
|
});
|
4024
4033
|
}
|
4025
4034
|
}
|
@@ -4075,7 +4084,7 @@ class ct extends ot {
|
|
4075
4084
|
});
|
4076
4085
|
}
|
4077
4086
|
}
|
4078
|
-
class Bs extends
|
4087
|
+
class Bs extends P {
|
4079
4088
|
open() {
|
4080
4089
|
super.open(), super.instances = [
|
4081
4090
|
new ut(),
|
@@ -4092,31 +4101,31 @@ class Bs extends B {
|
|
4092
4101
|
return await super.createIfAbsent("Config");
|
4093
4102
|
}
|
4094
4103
|
}
|
4095
|
-
let
|
4096
|
-
|
4104
|
+
let Z = new ut(), tr = Ge(new ct()), sr = new Ds(), Ps = new Is(), ce = Ge(new Rs()), Us = new js(), Fs = new _s(), Ms = async (u) => {
|
4105
|
+
Z.open();
|
4097
4106
|
};
|
4098
|
-
class
|
4107
|
+
class qs extends P {
|
4099
4108
|
/**
|
4100
4109
|
* 获取实例
|
4101
4110
|
*/
|
4102
4111
|
get instances() {
|
4103
|
-
return [new $s(), new Ss(), new
|
4112
|
+
return [new $s(), new Ss(), new Cs(), new ks(), new Ts()];
|
4104
4113
|
}
|
4105
4114
|
/**
|
4106
4115
|
* 获取指定SSO实例
|
4107
4116
|
*/
|
4108
4117
|
async create(t, e) {
|
4109
|
-
let s =
|
4118
|
+
let s = ce.ssos.find((i) => i.type.toUpperCase() == t.toUpperCase()), l = { url: s == null ? void 0 : s.url, app_id: s == null ? void 0 : s.appId }, r = await super.create(t);
|
4110
4119
|
return await r.open(l), r;
|
4111
4120
|
}
|
4112
4121
|
}
|
4113
|
-
class
|
4122
|
+
class Ns {
|
4114
4123
|
constructor() {
|
4115
4124
|
n(this, "type");
|
4116
4125
|
n(this, "taskLimit");
|
4117
4126
|
}
|
4118
4127
|
}
|
4119
|
-
class
|
4128
|
+
class Vs extends Ns {
|
4120
4129
|
constructor() {
|
4121
4130
|
super(...arguments);
|
4122
4131
|
//#region 属性
|
@@ -4134,7 +4143,7 @@ class qs extends Vs {
|
|
4134
4143
|
async execute(e, s, l) {
|
4135
4144
|
if (e.length == 0)
|
4136
4145
|
return;
|
4137
|
-
let r =
|
4146
|
+
let r = oe.getChunksByCount(e, s), i = oe.create(r, (a, o) => l(a, o));
|
4138
4147
|
await Promise.all(i);
|
4139
4148
|
}
|
4140
4149
|
async executeFrequency(e, s, l, r) {
|
@@ -4170,9 +4179,9 @@ class qs extends Vs {
|
|
4170
4179
|
clearInterval(this.intervalTimeout);
|
4171
4180
|
}
|
4172
4181
|
}
|
4173
|
-
class zs extends
|
4182
|
+
class zs extends P {
|
4174
4183
|
get instances() {
|
4175
|
-
return [new
|
4184
|
+
return [new Vs()];
|
4176
4185
|
}
|
4177
4186
|
}
|
4178
4187
|
class Ks {
|
@@ -4190,12 +4199,12 @@ class Ws extends Ks {
|
|
4190
4199
|
return await l.render(r, s);
|
4191
4200
|
}
|
4192
4201
|
}
|
4193
|
-
class Qs extends
|
4202
|
+
class Qs extends P {
|
4194
4203
|
get instances() {
|
4195
4204
|
return [new Ws()];
|
4196
4205
|
}
|
4197
4206
|
}
|
4198
|
-
class
|
4207
|
+
class lr extends P {
|
4199
4208
|
get instances() {
|
4200
4209
|
return [];
|
4201
4210
|
}
|
@@ -4240,7 +4249,7 @@ class Xs extends dt {
|
|
4240
4249
|
return "";
|
4241
4250
|
}
|
4242
4251
|
}
|
4243
|
-
class
|
4252
|
+
class rr extends P {
|
4244
4253
|
get instances() {
|
4245
4254
|
return [new Xs(), new Js()];
|
4246
4255
|
}
|
@@ -4251,7 +4260,7 @@ class ht {
|
|
4251
4260
|
* Builder工厂
|
4252
4261
|
*/
|
4253
4262
|
static get builder() {
|
4254
|
-
return this.create(
|
4263
|
+
return this.create(Vt);
|
4255
4264
|
}
|
4256
4265
|
/**
|
4257
4266
|
* CDN工厂
|
@@ -4311,7 +4320,7 @@ class ht {
|
|
4311
4320
|
* 提供程序工厂
|
4312
4321
|
*/
|
4313
4322
|
static get provider() {
|
4314
|
-
return this.create(
|
4323
|
+
return this.create(qt);
|
4315
4324
|
}
|
4316
4325
|
/**
|
4317
4326
|
* 签名工厂
|
@@ -4323,7 +4332,7 @@ class ht {
|
|
4323
4332
|
* SSO工厂
|
4324
4333
|
*/
|
4325
4334
|
static get sso() {
|
4326
|
-
return this.create(
|
4335
|
+
return this.create(qs);
|
4327
4336
|
}
|
4328
4337
|
/**
|
4329
4338
|
* Task工厂
|
@@ -4360,14 +4369,15 @@ class ht {
|
|
4360
4369
|
* 工厂缓存
|
4361
4370
|
*/
|
4362
4371
|
n(ht, "mappings", {});
|
4363
|
-
const
|
4364
|
-
let Ys = {},
|
4365
|
-
let e = await (await
|
4366
|
-
(e == null ? void 0 : e.cdn) != null && (u.cdn = e.cdn),
|
4367
|
-
|
4368
|
-
|
4369
|
-
},
|
4370
|
-
|
4372
|
+
const C = ht;
|
4373
|
+
let Ys = {}, ge = {}, T = {}, Me = {}, pt = {}, Gs = {}, ye = {}, Zs = async (u) => {
|
4374
|
+
let e = await (await C.provider.getDefault("sys")).getAsync("app");
|
4375
|
+
(e == null ? void 0 : e.cdn) != null && (u.cdn = e.cdn), ge = await C.cdn.createIfAbsent("Default", u.cdn), Ys = await C.encoder.getBase64(), T = await C.http.getHalo(), Me = await C.i18n.createIfAbsent("Default", "Default", async (s) => {
|
4376
|
+
let l = (e == null ? void 0 : e.language) ?? st.getLanguage(), r = _.serialize({ lang: l });
|
4377
|
+
await s.open(r), Hs = s.t, el = s.t_exists, tl = s.t_sys, sl = s.t_enum, ll = s.t_field, rl = s.t_field_choose_placeholder, nl = s.t_field_placeholder, il = s.t_table, al = s.t_module, ol = s.t_menu;
|
4378
|
+
}), Me.addMessages(u.lang), pt = await C.hasher.getMd5(), Gs = await C.template.create("Liquid"), u.messenger == null ? ye = await C.messenger.getConsole() : ye = u.messenger;
|
4379
|
+
}, Hs = {}, el = {}, tl = {}, sl = {}, ll = {}, rl = {}, nl = {}, il = {}, al = {}, ol = {};
|
4380
|
+
class ul {
|
4371
4381
|
constructor() {
|
4372
4382
|
/**
|
4373
4383
|
* 消息发送对象
|
@@ -4387,21 +4397,21 @@ class cl {
|
|
4387
4397
|
n(this, "cdn", "Local");
|
4388
4398
|
}
|
4389
4399
|
}
|
4390
|
-
const
|
4400
|
+
const cl = { class: "ha-empty" }, dl = { class: "empty-message" }, hl = {
|
4391
4401
|
key: 0,
|
4392
4402
|
class: "empty-content"
|
4393
|
-
},
|
4403
|
+
}, nr = /* @__PURE__ */ Q({
|
4394
4404
|
__name: "Empty",
|
4395
4405
|
props: {
|
4396
4406
|
message: { type: String, default: "暂无数据" },
|
4397
4407
|
hasData: Boolean
|
4398
4408
|
},
|
4399
4409
|
setup(u) {
|
4400
|
-
let t = u, { message: e, hasData: s } =
|
4401
|
-
return (l, r) => (O(),
|
4402
|
-
D("div",
|
4403
|
-
y(s) ? (O(),
|
4404
|
-
|
4410
|
+
let t = u, { message: e, hasData: s } = te(t);
|
4411
|
+
return (l, r) => (O(), B("div", cl, [
|
4412
|
+
D("div", dl, he(y(e)), 1),
|
4413
|
+
y(s) ? (O(), B("div", hl, [
|
4414
|
+
pe(l.$slots, "default")
|
4405
4415
|
])) : Ze("", !0)
|
4406
4416
|
]));
|
4407
4417
|
}
|
@@ -4419,7 +4429,7 @@ class ft {
|
|
4419
4429
|
this.x = t, this.y = e;
|
4420
4430
|
}
|
4421
4431
|
}
|
4422
|
-
class
|
4432
|
+
class pl extends ft {
|
4423
4433
|
constructor() {
|
4424
4434
|
super(...arguments);
|
4425
4435
|
/**
|
@@ -4428,7 +4438,7 @@ class fl extends ft {
|
|
4428
4438
|
n(this, "affix");
|
4429
4439
|
}
|
4430
4440
|
}
|
4431
|
-
class
|
4441
|
+
class ir extends ft {
|
4432
4442
|
constructor(e, s, l, r) {
|
4433
4443
|
super(e, s);
|
4434
4444
|
n(this, "width");
|
@@ -4483,8 +4493,8 @@ class gt {
|
|
4483
4493
|
* 事件防抖: time ms没重复触发才执行指定操作
|
4484
4494
|
*/
|
4485
4495
|
n(this, "debounce", (t, e, s = null) => {
|
4486
|
-
this.lastDebounceTime == null && (this.lastDebounceTime =
|
4487
|
-
let l =
|
4496
|
+
this.lastDebounceTime == null && (this.lastDebounceTime = ee.getTimestamp());
|
4497
|
+
let l = ee.getTimestamp();
|
4488
4498
|
this.lastDebounceTimeout != null && clearTimeout(this.lastDebounceTimeout), this.lastDebounceTimeout = setTimeout(t, e, s), this.lastDebounceTime = l;
|
4489
4499
|
});
|
4490
4500
|
//#endregion
|
@@ -4525,7 +4535,7 @@ class gt {
|
|
4525
4535
|
return;
|
4526
4536
|
this.dragElement = t;
|
4527
4537
|
let s = !1, l = (a) => (s = !0, a.preventDefault(), e.init(a)), r = (a) => {
|
4528
|
-
let o = new
|
4538
|
+
let o = new pl(), c = e.range;
|
4529
4539
|
if (c == null)
|
4530
4540
|
o.x = a.clientX, o.y = a.clientY;
|
4531
4541
|
else {
|
@@ -4588,7 +4598,7 @@ class gt {
|
|
4588
4598
|
}
|
4589
4599
|
//#endregion
|
4590
4600
|
}
|
4591
|
-
class
|
4601
|
+
class ar {
|
4592
4602
|
constructor() {
|
4593
4603
|
n(this, "events", {});
|
4594
4604
|
/**
|
@@ -4710,14 +4720,14 @@ class or {
|
|
4710
4720
|
clearTimeout(this.timer);
|
4711
4721
|
}
|
4712
4722
|
}
|
4713
|
-
class
|
4723
|
+
class or {
|
4714
4724
|
/**
|
4715
4725
|
* 对比数据变动
|
4716
4726
|
*/
|
4717
4727
|
delta(t, e, s, l) {
|
4718
4728
|
}
|
4719
4729
|
}
|
4720
|
-
class
|
4730
|
+
class ur {
|
4721
4731
|
/**
|
4722
4732
|
* 初始化,并绑定自动关闭上下文菜单事件
|
4723
4733
|
*/
|
@@ -4734,7 +4744,7 @@ class cr {
|
|
4734
4744
|
* 根据鼠标事件,显示右键上下文弹窗
|
4735
4745
|
*/
|
4736
4746
|
n(this, "show", (t) => {
|
4737
|
-
let s =
|
4747
|
+
let s = j.parentAbsolute(this.container).getBoundingClientRect(), l = t.clientX - s.left, r = t.clientY - s.top - 2;
|
4738
4748
|
this.container.style.display = "block", this.container.style.left = l + "px", this.container.style.top = r + "px";
|
4739
4749
|
});
|
4740
4750
|
/**
|
@@ -4743,7 +4753,7 @@ class cr {
|
|
4743
4753
|
n(this, "dispose", () => {
|
4744
4754
|
for (let t = 0; t < this.closeTriggers.length; t++) {
|
4745
4755
|
let e = this.closeTriggers[t];
|
4746
|
-
|
4756
|
+
ie.unbind(["click", "scroll"], e, this.close);
|
4747
4757
|
}
|
4748
4758
|
this.container != null && this.container.removeEventListener("click", this.close), this.container = null, this.closeTriggers = [];
|
4749
4759
|
});
|
@@ -4751,18 +4761,18 @@ class cr {
|
|
4751
4761
|
this.closeTriggers.push(...e);
|
4752
4762
|
for (let s = 0; s < this.closeTriggers.length; s++) {
|
4753
4763
|
let l = this.closeTriggers[s];
|
4754
|
-
|
4764
|
+
ie.bind(["click", "scroll"], l, this.close);
|
4755
4765
|
}
|
4756
4766
|
}
|
4757
4767
|
}
|
4758
4768
|
}
|
4759
|
-
class
|
4769
|
+
class cr {
|
4760
4770
|
/**
|
4761
4771
|
* 开启表单监控
|
4762
4772
|
*/
|
4763
4773
|
async open(t, e, s) {
|
4764
|
-
let l = await
|
4765
|
-
r &&
|
4774
|
+
let l = await C.provider.getDefault(e), r = await l.getAsync(s);
|
4775
|
+
r && X.mergeTo(t, r), J(() => t, (i, a) => {
|
4766
4776
|
l && l.saveAsync(s, t);
|
4767
4777
|
}, { deep: !0 });
|
4768
4778
|
}
|
@@ -4772,126 +4782,126 @@ class dr {
|
|
4772
4782
|
dispose() {
|
4773
4783
|
}
|
4774
4784
|
}
|
4775
|
-
const
|
4785
|
+
const fl = /* @__PURE__ */ Q({
|
4776
4786
|
__name: "Fill",
|
4777
4787
|
emits: ["resize"],
|
4778
4788
|
setup(u, { emit: t }) {
|
4779
4789
|
let e = t, s = I(), l = I(), r = I(), i = new gt(), a = () => {
|
4780
|
-
let h =
|
4781
|
-
r.value =
|
4790
|
+
let h = j.siblings(s.value);
|
4791
|
+
r.value = j.getHeight(h);
|
4782
4792
|
}, o = () => {
|
4783
|
-
l.value =
|
4793
|
+
l.value = j.getHeight(s.value), e("resize", l.value);
|
4784
4794
|
}, c = () => {
|
4785
4795
|
o();
|
4786
4796
|
};
|
4787
|
-
return
|
4797
|
+
return we(() => {
|
4788
4798
|
a(), o(), i.resize(s.value, c);
|
4789
|
-
}),
|
4799
|
+
}), be(() => {
|
4790
4800
|
i.dispose();
|
4791
|
-
}), (h, d) => (O(),
|
4801
|
+
}), (h, d) => (O(), B("div", {
|
4792
4802
|
class: "ha-fill",
|
4793
4803
|
ref_key: "fillRef",
|
4794
4804
|
ref: s,
|
4795
|
-
style:
|
4805
|
+
style: fe({ height: `calc(100% - ${y(r)}px)` })
|
4796
4806
|
}, [
|
4797
|
-
|
4807
|
+
pe(h.$slots, "default")
|
4798
4808
|
], 4));
|
4799
4809
|
}
|
4800
|
-
}),
|
4810
|
+
}), gl = /* @__PURE__ */ Q({
|
4801
4811
|
__name: "Scroller",
|
4802
4812
|
props: {
|
4803
4813
|
options: {}
|
4804
4814
|
},
|
4805
4815
|
emits: ["scroll"],
|
4806
4816
|
setup(u, { expose: t, emit: e }) {
|
4807
|
-
let s = e, l = u, { options: r } =
|
4817
|
+
let s = e, l = u, { options: r } = te(l), i = I(), a = I(), o = I(), c = I(), h = I(!1), d = null, p = null, g = new gt(), b = I({ top: null, height: null }), q = (v) => {
|
4808
4818
|
if (p == 0)
|
4809
4819
|
return 0;
|
4810
4820
|
let w = p - d;
|
4811
4821
|
return v / w;
|
4812
|
-
},
|
4822
|
+
}, N = (v) => {
|
4813
4823
|
let w = d - b.value.height;
|
4814
4824
|
return v / w;
|
4815
|
-
},
|
4816
|
-
let w = v.target,
|
4817
|
-
L(
|
4818
|
-
},
|
4825
|
+
}, ue = (v) => {
|
4826
|
+
let w = v.target, R = q(w.scrollTop);
|
4827
|
+
L(R), s("scroll", w);
|
4828
|
+
}, se = () => {
|
4819
4829
|
if (p == 0)
|
4820
4830
|
return 80;
|
4821
4831
|
let v = d / p;
|
4822
4832
|
if (v == 1)
|
4823
4833
|
return 0;
|
4824
4834
|
let w = d * v;
|
4825
|
-
return
|
4835
|
+
return re.between(w, 80, 500);
|
4826
4836
|
}, f = (v, w) => {
|
4827
|
-
let
|
4828
|
-
return
|
4829
|
-
},
|
4830
|
-
let w =
|
4837
|
+
let R = q(v), V = (d - w) * R;
|
4838
|
+
return re.between(V, 0, d - w);
|
4839
|
+
}, E = (v) => {
|
4840
|
+
let w = se();
|
4831
4841
|
return { top: f(v, w), height: w };
|
4832
4842
|
}, m = (v) => {
|
4833
4843
|
}, $ = (v) => {
|
4834
|
-
let w =
|
4844
|
+
let w = q(v);
|
4835
4845
|
L(w);
|
4836
4846
|
}, L = (v) => {
|
4837
|
-
let w =
|
4838
|
-
b.value.top =
|
4839
|
-
let
|
4840
|
-
r.value.scrollTop =
|
4841
|
-
},
|
4847
|
+
let w = re.between(v, 0, 1), R = d - b.value.height;
|
4848
|
+
b.value.top = R * w;
|
4849
|
+
let me = (p - d) * w;
|
4850
|
+
r.value.scrollTop = me, a.value.scrollTop != me && (a.value.scrollTop = me);
|
4851
|
+
}, U = () => {
|
4842
4852
|
let v = r.value.scrollTop;
|
4843
|
-
b.value =
|
4844
|
-
},
|
4845
|
-
d =
|
4846
|
-
let w =
|
4853
|
+
b.value = E(v), $(v);
|
4854
|
+
}, G = (v) => {
|
4855
|
+
d = j.getHeight(a.value), p = a.value.scrollHeight;
|
4856
|
+
let w = se();
|
4847
4857
|
b.value.height = w, b.value.top = f(r.value.scrollTop, w);
|
4848
|
-
},
|
4858
|
+
}, ne = (v) => {
|
4849
4859
|
let w = v.target;
|
4850
4860
|
return parseInt(w.style.top);
|
4851
|
-
},
|
4852
|
-
let
|
4861
|
+
}, le = (v, w, R, V) => {
|
4862
|
+
let me = v.y - w.y, mt = R + me, yt = N(mt);
|
4853
4863
|
L(yt);
|
4854
|
-
},
|
4864
|
+
}, xe = (v) => {
|
4855
4865
|
h.value = !0;
|
4856
|
-
},
|
4866
|
+
}, ke = (v) => {
|
4857
4867
|
h.value = !1;
|
4858
4868
|
};
|
4859
|
-
return
|
4860
|
-
|
4861
|
-
}),
|
4869
|
+
return we(() => {
|
4870
|
+
U(), g.scroll(a.value, ue), g.drag(c.value, { init: ne, handler: le }), g.observe(a.value, G), g.mouseDown(c.value, xe, ke);
|
4871
|
+
}), be(() => {
|
4862
4872
|
g.dispose();
|
4863
|
-
}),
|
4864
|
-
let
|
4865
|
-
L(
|
4866
|
-
}), t({ scrollTo: $, update:
|
4873
|
+
}), J(() => r.value.scrollTop, (v, w) => {
|
4874
|
+
let R = q(v);
|
4875
|
+
L(R);
|
4876
|
+
}), t({ scrollTo: $, update: U }), (v, w) => (O(), B("div", {
|
4867
4877
|
ref_key: "scrollerRef",
|
4868
4878
|
ref: i,
|
4869
|
-
class:
|
4879
|
+
class: Le(["ha-scroller", { hover: y(h) }])
|
4870
4880
|
}, [
|
4871
4881
|
D("div", {
|
4872
4882
|
ref_key: "containerRef",
|
4873
4883
|
ref: a,
|
4874
4884
|
class: "scroller-container"
|
4875
4885
|
}, [
|
4876
|
-
|
4886
|
+
pe(v.$slots, "default")
|
4877
4887
|
], 512),
|
4878
4888
|
D("div", {
|
4879
4889
|
ref_key: "trackRef",
|
4880
4890
|
ref: o,
|
4881
4891
|
class: "scroller-track",
|
4882
4892
|
onClick: w[0] || (w[0] = //@ts-ignore
|
4883
|
-
(...
|
4893
|
+
(...R) => y(m) && y(m)(...R))
|
4884
4894
|
}, [
|
4885
4895
|
D("div", {
|
4886
4896
|
ref_key: "thumbRef",
|
4887
4897
|
ref: c,
|
4888
4898
|
class: "scroller-thumb",
|
4889
|
-
style:
|
4890
|
-
},
|
4899
|
+
style: fe({ top: `${y(b).top}px`, height: `${y(b).height}px` })
|
4900
|
+
}, he(y(r).scrollTop), 5)
|
4891
4901
|
], 512)
|
4892
4902
|
], 2));
|
4893
4903
|
}
|
4894
|
-
}),
|
4904
|
+
}), dr = /* @__PURE__ */ Q({
|
4895
4905
|
__name: "Timer",
|
4896
4906
|
emits: ["change"],
|
4897
4907
|
setup(u, { expose: t, emit: e }) {
|
@@ -4906,14 +4916,14 @@ const gl = /* @__PURE__ */ Q({
|
|
4906
4916
|
}, d = () => {
|
4907
4917
|
clearInterval(i), r.value = l;
|
4908
4918
|
};
|
4909
|
-
return
|
4919
|
+
return be(() => {
|
4910
4920
|
clearInterval(i);
|
4911
|
-
}), t({ restart: c, start: o, stop: h, reset: d }), (p, g) => (O(),
|
4912
|
-
|
4913
|
-
xt(
|
4921
|
+
}), t({ restart: c, start: o, stop: h, reset: d }), (p, g) => (O(), B("span", null, [
|
4922
|
+
pe(p.$slots, "default"),
|
4923
|
+
xt(he(y(ee).format(y(r), "HH:mm:ss SSS")), 1)
|
4914
4924
|
]));
|
4915
4925
|
}
|
4916
|
-
}),
|
4926
|
+
}), hr = /* @__PURE__ */ Q({
|
4917
4927
|
__name: "Code",
|
4918
4928
|
props: {
|
4919
4929
|
config: { default: {} },
|
@@ -4922,54 +4932,54 @@ const gl = /* @__PURE__ */ Q({
|
|
4922
4932
|
},
|
4923
4933
|
emits: ["mounted", "change", "scroll", "update:modelValue"],
|
4924
4934
|
setup(u, { expose: t, emit: e }) {
|
4925
|
-
let s = e, l = u, { config: r, border: i, modelValue: a } =
|
4926
|
-
if (
|
4935
|
+
let s = e, l = u, { config: r, border: i, modelValue: a } = te(l), o = null, c = null, h = null, d = I(), { app: p } = Z.sys, g = (f) => f == "default" ? null : "vs-dark", b = (f) => {
|
4936
|
+
if (Z.editor.completions[f])
|
4927
4937
|
return;
|
4928
|
-
let
|
4929
|
-
if (!
|
4938
|
+
let E = o.languages.getLanguages().find(($) => $.id == f);
|
4939
|
+
if (!E)
|
4930
4940
|
return;
|
4931
|
-
let m =
|
4941
|
+
let m = E.loader;
|
4932
4942
|
m && m().then(($) => {
|
4933
|
-
|
4943
|
+
Z.editor.completions[f] || (q($, f), Z.editor.completions[f] = !0);
|
4934
4944
|
});
|
4935
|
-
},
|
4945
|
+
}, q = (f, E) => o.languages.registerCompletionItemProvider(E, {
|
4936
4946
|
provideCompletionItems: ($, L) => {
|
4937
|
-
let
|
4947
|
+
let U = $.getWordUntilPosition(L), G = {
|
4938
4948
|
startLineNumber: L.lineNumber,
|
4939
4949
|
endLineNumber: L.lineNumber,
|
4940
|
-
startColumn:
|
4941
|
-
endColumn:
|
4942
|
-
},
|
4943
|
-
const
|
4944
|
-
for (let
|
4945
|
-
const
|
4946
|
-
let v = f.language[
|
4950
|
+
startColumn: U.startColumn,
|
4951
|
+
endColumn: U.endColumn
|
4952
|
+
}, ne = [];
|
4953
|
+
const le = ["builtinFunctions", "keywords", "operators"];
|
4954
|
+
for (let xe = 0; xe < le.length; xe++) {
|
4955
|
+
const ke = le[xe];
|
4956
|
+
let v = f.language[ke];
|
4947
4957
|
v && v.forEach((w) => {
|
4948
|
-
let
|
4949
|
-
label:
|
4958
|
+
let R = w.toLowerCase(), V = {
|
4959
|
+
label: R,
|
4950
4960
|
kind: null,
|
4951
|
-
insertText:
|
4952
|
-
range:
|
4961
|
+
insertText: R,
|
4962
|
+
range: G,
|
4953
4963
|
documentation: w
|
4954
4964
|
};
|
4955
|
-
|
4965
|
+
ke == "keywords" ? (V.kind = o.languages.CompletionItemKind.Keyword, V.detail = "关键词") : ke == "operators" ? (V.kind = o.languages.CompletionItemKind.Operator, V.insertText += " ", V.detail = "操作符") : (V.kind = o.languages.CompletionItemKind.Function, V.insertText += "()", V.detail = "函数"), ne.push(V);
|
4956
4966
|
});
|
4957
4967
|
}
|
4958
|
-
return { suggestions:
|
4968
|
+
return { suggestions: ne };
|
4959
4969
|
}
|
4960
|
-
}),
|
4970
|
+
}), N = () => {
|
4961
4971
|
let f = null;
|
4962
|
-
r.value.schema && (f = r.value.category + "/" + W.getUniqueId(),
|
4963
|
-
let
|
4972
|
+
r.value.schema && (f = r.value.category + "/" + W.getUniqueId(), Z.tryAddSchema(f, r.value.category, r.value.schema));
|
4973
|
+
let E = {
|
4964
4974
|
validate: !0,
|
4965
4975
|
allowComments: !0,
|
4966
4976
|
//允许配置注释
|
4967
4977
|
//保证架构配置在当前控件生效,所以需要绑定匹配哪个文件时使用架构
|
4968
|
-
schemas:
|
4978
|
+
schemas: X.clone(Z.editor.schemas),
|
4969
4979
|
trailingCommas: "ignore"
|
4970
4980
|
//允许末尾逗号
|
4971
4981
|
};
|
4972
|
-
o.languages.json.jsonDefaults.setDiagnosticsOptions(
|
4982
|
+
o.languages.json.jsonDefaults.setDiagnosticsOptions(E), b(r.value.language);
|
4973
4983
|
let m = f ? o.Uri.parse(f) : null;
|
4974
4984
|
h = o.editor.createModel(a.value, r.value.language, m);
|
4975
4985
|
let $ = {
|
@@ -4991,55 +5001,55 @@ const gl = /* @__PURE__ */ Q({
|
|
4991
5001
|
c = o.editor.create(d.value, $), r.value.scrollTop && c.setScrollTop(r.value.scrollTop);
|
4992
5002
|
let L = r.value.selection;
|
4993
5003
|
if (L) {
|
4994
|
-
let
|
5004
|
+
let U = {
|
4995
5005
|
startLineNumber: L.startLine,
|
4996
5006
|
endLineNumber: L.endLine,
|
4997
5007
|
startColumn: L.startColumn,
|
4998
5008
|
endColumn: L.endColumn
|
4999
5009
|
};
|
5000
|
-
c.setSelection(
|
5010
|
+
c.setSelection(U);
|
5001
5011
|
}
|
5002
|
-
c.onDidScrollChange((
|
5003
|
-
s("scroll",
|
5004
|
-
}), c.onDidChangeModelContent((
|
5005
|
-
let
|
5006
|
-
s("update:modelValue",
|
5012
|
+
c.onDidScrollChange((U) => {
|
5013
|
+
s("scroll", U.scrollTop);
|
5014
|
+
}), c.onDidChangeModelContent((U) => {
|
5015
|
+
let G = c.getValue();
|
5016
|
+
s("update:modelValue", G), s("change", G);
|
5007
5017
|
});
|
5008
5018
|
};
|
5009
|
-
|
5010
|
-
o = await
|
5019
|
+
we(async () => {
|
5020
|
+
o = await ge.getMonaco(), d.value && (N(), s("mounted", o, c));
|
5011
5021
|
});
|
5012
|
-
let
|
5022
|
+
let ue = () => {
|
5013
5023
|
c == null || c.layout();
|
5014
|
-
},
|
5015
|
-
return
|
5024
|
+
}, se = () => c;
|
5025
|
+
return be(() => {
|
5016
5026
|
h == null || h.dispose(), c == null || c.dispose();
|
5017
|
-
}),
|
5027
|
+
}), J(() => p.theme, (f, E) => {
|
5018
5028
|
let m = g(f);
|
5019
5029
|
o.editor.setTheme(m);
|
5020
|
-
}),
|
5021
|
-
}),
|
5030
|
+
}), J(() => p.language, (f, E) => {
|
5031
|
+
}), J(() => a.value, (f, E) => {
|
5022
5032
|
if (!c)
|
5023
5033
|
return;
|
5024
5034
|
let m = c.getValue();
|
5025
5035
|
f != m && c.setValue(f ?? "");
|
5026
|
-
}),
|
5036
|
+
}), J(() => r.value.language, (f, E) => {
|
5027
5037
|
if (!c)
|
5028
5038
|
return;
|
5029
5039
|
let m = c.getModel();
|
5030
5040
|
o.editor.setModelLanguage(m, f), b(f);
|
5031
|
-
}), t({ layout:
|
5032
|
-
default:
|
5041
|
+
}), t({ layout: ue, getEditor: se }), (f, E) => (O(), He(fl, null, {
|
5042
|
+
default: qe(() => [
|
5033
5043
|
D("div", {
|
5034
5044
|
ref_key: "monacoEditorRef",
|
5035
5045
|
ref: d,
|
5036
|
-
class:
|
5046
|
+
class: Le(["ha-code", { border: y(i) }])
|
5037
5047
|
}, null, 2)
|
5038
5048
|
]),
|
5039
5049
|
_: 1
|
5040
5050
|
}));
|
5041
5051
|
}
|
5042
|
-
}),
|
5052
|
+
}), pr = /* @__PURE__ */ Q({
|
5043
5053
|
__name: "Compare",
|
5044
5054
|
props: {
|
5045
5055
|
inline: { type: Boolean, default: !1 },
|
@@ -5049,43 +5059,43 @@ const gl = /* @__PURE__ */ Q({
|
|
5049
5059
|
},
|
5050
5060
|
emits: ["update:modelValue", "update:original", "change"],
|
5051
5061
|
setup(u, { emit: t }) {
|
5052
|
-
let e = t, s = u, { inline: l, language: r, original: i, modelValue: a } =
|
5062
|
+
let e = t, s = u, { inline: l, language: r, original: i, modelValue: a } = te(s), o = null, c = null, h = null, d = null, p = null, g = null, b = I(), q = I(), { app: N } = Z.sys, ue = (f) => {
|
5053
5063
|
c = f.editor.createModel(i.value, r.value), h = f.editor.createModel(a.value, r.value), o = f.editor.createDiffEditor(b.value, {
|
5054
5064
|
originalEditable: !0,
|
5055
5065
|
automaticLayout: !0,
|
5056
5066
|
renderSideBySide: !l.value,
|
5057
5067
|
//是否启用行内模式
|
5058
|
-
theme:
|
5059
|
-
}), o.setModel({ original: c, modified: h }), d = o.getOriginalEditor(), d.onDidChangeModelContent((
|
5068
|
+
theme: se(N.theme)
|
5069
|
+
}), o.setModel({ original: c, modified: h }), d = o.getOriginalEditor(), d.onDidChangeModelContent((E) => {
|
5060
5070
|
let m = d.getValue();
|
5061
5071
|
e("update:original", m), e("change", m);
|
5062
|
-
}), p = o.getModifiedEditor(), p.onDidChangeModelContent((
|
5072
|
+
}), p = o.getModifiedEditor(), p.onDidChangeModelContent((E) => {
|
5063
5073
|
let m = p.getValue();
|
5064
5074
|
e("update:modelValue", m);
|
5065
5075
|
});
|
5066
|
-
},
|
5067
|
-
return
|
5068
|
-
g = await
|
5069
|
-
}),
|
5070
|
-
let m =
|
5076
|
+
}, se = (f) => f == "default" ? null : "vs-dark";
|
5077
|
+
return we(async () => {
|
5078
|
+
g = await ge.getMonaco(), ue(g);
|
5079
|
+
}), J(() => N.theme, (f, E) => {
|
5080
|
+
let m = se(f);
|
5071
5081
|
g.editor.setTheme(m);
|
5072
|
-
}),
|
5082
|
+
}), J(() => r.value, (f, E) => {
|
5073
5083
|
c && g.editor.setModelLanguage(c, f), h && g.editor.setModelLanguage(h, f);
|
5074
|
-
}),
|
5084
|
+
}), J(() => i.value, (f, E) => {
|
5075
5085
|
if (!c)
|
5076
5086
|
return;
|
5077
5087
|
let m = c.getValue();
|
5078
5088
|
f != m && c.setValue(f ?? "");
|
5079
|
-
}),
|
5089
|
+
}), J(() => a.value, (f, E) => {
|
5080
5090
|
if (!h)
|
5081
5091
|
return;
|
5082
5092
|
let m = h.getValue();
|
5083
5093
|
f != m && h.setValue(f ?? "");
|
5084
|
-
}), (f,
|
5094
|
+
}), (f, E) => (O(), B("div", {
|
5085
5095
|
ref_key: "compareRef",
|
5086
5096
|
ref: b,
|
5087
5097
|
class: "ha-compare",
|
5088
|
-
style:
|
5098
|
+
style: fe(y(q))
|
5089
5099
|
}, null, 4));
|
5090
5100
|
}
|
5091
5101
|
}), ze = (u, t) => {
|
@@ -5093,13 +5103,13 @@ const gl = /* @__PURE__ */ Q({
|
|
5093
5103
|
for (const [s, l] of t)
|
5094
5104
|
e[s] = l;
|
5095
5105
|
return e;
|
5096
|
-
},
|
5097
|
-
function
|
5098
|
-
return O(),
|
5106
|
+
}, ml = {}, yl = { class: "ha-option" };
|
5107
|
+
function vl(u, t) {
|
5108
|
+
return O(), B("div", yl, "选项");
|
5099
5109
|
}
|
5100
|
-
const
|
5101
|
-
|
5102
|
-
],
|
5110
|
+
const wl = /* @__PURE__ */ ze(ml, [["render", vl]]), bl = { class: "ha-rich-text" }, xl = /* @__PURE__ */ Ct('<div class="ql-formats"><button class="ql-bold" data-toggle="tooltip" data-placement="bottom" title="Bold"></button><button class="ql-italic" data-toggle="tooltip" data-placement="bottom" title="Italic <ctrl+i>"></button><button class="ql-date" data-toggle="tooltip" data-placement="bottom" title="Date"></button><button class="ql-underline" data-toggle="tooltip" data-placement="bottom" title="Underline"></button><button class="ql-strike" data-toggle="tooltip" data-placement="bottom" title="Strike"></button></div><div class="ql-formats"><button class="ql-list" data-toggle="tooltip" data-placement="bottom" value="ordered"></button><button class="ql-list" data-toggle="tooltip" data-placement="bottom" value="bullet"></button><select class="ql-color"><option selected></option><option value="#e60000"></option><option value="#ff9900"></option><option value="#ffff00"></option><option value="#008a00"></option><option value="#0066cc"></option><option value="#9933ff"></option><option value="#ffffff"></option><option value="#facccc"></option><option value="#ffebcc"></option><option value="#ffffcc"></option><option value="#cce8cc"></option><option value="#cce0f5"></option><option value="#ebd6ff"></option><option value="#bbbbbb"></option><option value="#f06666"></option><option value="#ffc266"></option><option value="#ffff66"></option><option value="#66b966"></option><option value="#66a3e0"></option><option value="#c285ff"></option><option value="#888888"></option><option value="#a10000"></option><option value="#b26b00"></option><option value="#b2b200"></option><option value="#006100"></option><option value="#0047b2"></option><option value="#6b24b2"></option><option value="#444444"></option><option value="#5c0000"></option><option value="#663d00"></option><option value="#666600"></option><option value="#003700"></option><option value="#002966"></option><option value="#3d1466"></option></select><select class="ql-background"><option selected></option><option value="#e60000"></option><option value="#ff9900"></option><option value="#ffff00"></option><option value="#008a00"></option><option value="#0066cc"></option><option value="#9933ff"></option><option value="#ffffff"></option><option value="#facccc"></option><option value="#ffebcc"></option><option value="#ffffcc"></option><option value="#cce8cc"></option><option value="#cce0f5"></option><option value="#ebd6ff"></option><option value="#bbbbbb"></option><option value="#f06666"></option><option value="#ffc266"></option><option value="#ffff66"></option><option value="#66b966"></option><option value="#66a3e0"></option><option value="#c285ff"></option><option value="#888888"></option><option value="#a10000"></option><option value="#b26b00"></option><option value="#b2b200"></option><option value="#006100"></option><option value="#0047b2"></option><option value="#6b24b2"></option><option value="#444444"></option><option value="#5c0000"></option><option value="#663d00"></option><option value="#666600"></option><option value="#003700"></option><option value="#002966"></option><option value="#3d1466"></option></select></div><div class="ql-formats"><button class="ql-code-block" data-toggle="tooltip" data-placement="bottom" title="Code"></button><button class="ql-blockquote" data-toggle="tooltip" data-placement="bottom" title="Block quote"></button><button class="ql-link" data-toggle="tooltip" data-placement="bottom" title="Link"></button></div><div class="ql-formats"><button class="ql-header" data-toggle="tooltip" data-placement="bottom" value="1"></button><button class="ql-header" data-toggle="tooltip" data-placement="bottom" value="2"></button><select class="ql-align"><option selected></option><option value="center"></option><option value="right"></option><option value="justify"></option></select></div><div class="ql-formats"><select class="ql-size"><option value="small"></option><option selected></option><option value="large"></option><option value="huge"></option></select><select class="ql-header"><option value=""></option><option value="1"></option><option value="2"></option><option value="3"></option><option value="4"></option><option value="5"></option><option value="6"></option></select></div><div class="ql-formats"><select class="ql-font"><option selected></option><option value="serif"></option><option value="monospace"></option></select></div><div class="ql-formats"><button class="ql-image" data-toggle="tooltip" data-placement="bottom" title="Image"></button><button class="ql-video" data-toggle="tooltip" data-placement="bottom" title="Video"></button><button class="ql-clean" data-toggle="tooltip" data-placement="bottom" title="Clean"></button></div>', 7), kl = [
|
5111
|
+
xl
|
5112
|
+
], fr = /* @__PURE__ */ Q({
|
5103
5113
|
__name: "RichText",
|
5104
5114
|
props: /* @__PURE__ */ Ke({
|
5105
5115
|
options: {}
|
@@ -5109,66 +5119,66 @@ const bl = /* @__PURE__ */ ze(yl, [["render", wl]]), xl = { class: "ha-rich-text
|
|
5109
5119
|
}),
|
5110
5120
|
emits: /* @__PURE__ */ Ke(["change", "scroll"], ["update:modelValue"]),
|
5111
5121
|
setup(u, { expose: t, emit: e }) {
|
5112
|
-
let s = e, l = u, { options: r } =
|
5113
|
-
let $ =
|
5114
|
-
if (
|
5115
|
-
|
5122
|
+
let s = e, l = u, { options: r } = te(l), i = et(u, "modelValue"), a, o = null, c = null, h = !1, d = !1, p = I(), g = I(), b = I(), q = I(!1), N = I({ style: null, options: { scrollTop: 0 } }), ue = (m) => {
|
5123
|
+
let $ = ee.getDateString(), L = getSelection(), U = L.getRangeAt(0), G = U.startContainer;
|
5124
|
+
if (G.nodeName == "#text")
|
5125
|
+
G.insertData(U.startOffset, $), U.setStart(G, U.startOffset + $.length), L.removeAllRanges(), L.addRange(U);
|
5116
5126
|
else {
|
5117
|
-
let
|
5118
|
-
|
5119
|
-
let
|
5120
|
-
|
5127
|
+
let ne = document.createTextNode($);
|
5128
|
+
G.appendChild(ne);
|
5129
|
+
let le = document.createRange();
|
5130
|
+
le.selectNodeContents(ne), le.setStart(ne, le.startOffset + $.length), L.removeAllRanges(), L.addRange(le);
|
5121
5131
|
}
|
5122
|
-
},
|
5132
|
+
}, se = (m) => {
|
5123
5133
|
if (o.scrollTop = m.scrollTop, h || d) {
|
5124
5134
|
h = !1, d = !1;
|
5125
5135
|
return;
|
5126
5136
|
}
|
5127
5137
|
c = m, s("scroll", m);
|
5128
|
-
}, f = () => `height: calc(100% - ${
|
5129
|
-
let m = await
|
5138
|
+
}, f = () => `height: calc(100% - ${j.getHeight(g.value)}px)`, E = async () => {
|
5139
|
+
let m = await ge.getQuill();
|
5130
5140
|
a = new m(p.value, {
|
5131
5141
|
modules: {
|
5132
5142
|
toolbar: {
|
5133
5143
|
container: g.value,
|
5134
|
-
handlers: { date:
|
5144
|
+
handlers: { date: ue }
|
5135
5145
|
}
|
5136
5146
|
},
|
5137
5147
|
theme: "snow"
|
5138
|
-
}),
|
5139
|
-
|
5140
|
-
}), r.value.readonly && a.disable(), o = p.value.querySelector(".ql-editor"), o.innerHTML = i.value,
|
5148
|
+
}), q.value = !0, We(() => {
|
5149
|
+
N.value.style = f();
|
5150
|
+
}), r.value.readonly && a.disable(), o = p.value.querySelector(".ql-editor"), o.innerHTML = i.value, N.value.options.scrollTop = r.value.scrollTop, a.on("text-change", ($, L, U) => {
|
5141
5151
|
o.innerHTML != i.value && (h = !0, i.value = o.innerHTML);
|
5142
5152
|
}), o.addEventListener("paste", ($) => {
|
5143
5153
|
d = !0;
|
5144
5154
|
});
|
5145
5155
|
};
|
5146
|
-
return
|
5147
|
-
|
5148
|
-
}),
|
5156
|
+
return we(() => {
|
5157
|
+
E();
|
5158
|
+
}), be(() => {
|
5149
5159
|
a = null;
|
5150
|
-
}),
|
5160
|
+
}), J(() => i.value, (m, $) => {
|
5151
5161
|
o && o.innerHTML != m && (o.innerHTML = m);
|
5152
|
-
}),
|
5162
|
+
}), J(() => r.value.scrollTop, (m, $) => {
|
5153
5163
|
m != null && (c == null ? void 0 : c.scrollTop) != m && We(() => {
|
5154
|
-
|
5164
|
+
N.value.options.scrollTop = m;
|
5155
5165
|
});
|
5156
|
-
}), t({}), (m, $) => (O(),
|
5166
|
+
}), t({}), (m, $) => (O(), B("div", bl, [
|
5157
5167
|
kt(D("div", {
|
5158
5168
|
ref_key: "toolbarRef",
|
5159
5169
|
ref: g
|
5160
|
-
},
|
5161
|
-
[St, y(
|
5170
|
+
}, kl, 512), [
|
5171
|
+
[St, y(q)]
|
5162
5172
|
]),
|
5163
|
-
Ce(y(
|
5173
|
+
Ce(y(gl), {
|
5164
5174
|
ref_key: "scrollerRef",
|
5165
5175
|
ref: b,
|
5166
5176
|
class: "ql-body",
|
5167
|
-
options: y(
|
5168
|
-
onScroll: y(
|
5169
|
-
style:
|
5177
|
+
options: y(N).options,
|
5178
|
+
onScroll: y(se),
|
5179
|
+
style: fe(y(N).style)
|
5170
5180
|
}, {
|
5171
|
-
default:
|
5181
|
+
default: qe(() => [
|
5172
5182
|
D("div", {
|
5173
5183
|
ref_key: "editorRef",
|
5174
5184
|
ref: p
|
@@ -5178,17 +5188,17 @@ const bl = /* @__PURE__ */ ze(yl, [["render", wl]]), xl = { class: "ha-rich-text
|
|
5178
5188
|
}, 8, ["options", "onScroll", "style"])
|
5179
5189
|
]));
|
5180
5190
|
}
|
5181
|
-
}),
|
5191
|
+
}), Sl = {}, Cl = { class: "ha-select" }, El = /* @__PURE__ */ D("div", { class: "select-title" }, "头", -1), Tl = /* @__PURE__ */ D("div", { class: "select-body" }, [
|
5182
5192
|
/* @__PURE__ */ D("input", { type: "text" })
|
5183
|
-
], -1),
|
5184
|
-
|
5185
|
-
|
5193
|
+
], -1), $l = [
|
5194
|
+
El,
|
5195
|
+
Tl
|
5186
5196
|
];
|
5187
|
-
function
|
5188
|
-
return O(),
|
5197
|
+
function Ll(u, t) {
|
5198
|
+
return O(), B("div", Cl, $l);
|
5189
5199
|
}
|
5190
|
-
const
|
5191
|
-
class
|
5200
|
+
const _e = /* @__PURE__ */ ze(Sl, [["render", Ll]]);
|
5201
|
+
class gr {
|
5192
5202
|
/**
|
5193
5203
|
* 初始化
|
5194
5204
|
*/
|
@@ -5212,7 +5222,7 @@ class mr {
|
|
5212
5222
|
this.startLine = t, this.endLine = e, this.startColumn = s, this.endColumn = l;
|
5213
5223
|
}
|
5214
5224
|
}
|
5215
|
-
const
|
5225
|
+
const Al = { class: "ha-condition" }, Dl = /* @__PURE__ */ Q({
|
5216
5226
|
__name: "Condition",
|
5217
5227
|
props: {
|
5218
5228
|
name: {},
|
@@ -5220,80 +5230,80 @@ const Dl = { class: "ha-condition" }, Il = /* @__PURE__ */ Q({
|
|
5220
5230
|
value: {}
|
5221
5231
|
},
|
5222
5232
|
setup(u) {
|
5223
|
-
let t = u, { name: e, operator: s, value: l } =
|
5224
|
-
return (r, i) => (O(),
|
5225
|
-
Ce(y(
|
5233
|
+
let t = u, { name: e, operator: s, value: l } = te(t);
|
5234
|
+
return (r, i) => (O(), B("div", Al, [
|
5235
|
+
Ce(y(_e), {
|
5226
5236
|
modelValue: y(e),
|
5227
|
-
"onUpdate:modelValue": i[0] || (i[0] = (a) =>
|
5237
|
+
"onUpdate:modelValue": i[0] || (i[0] = (a) => je(e) ? e.value = a : e = a)
|
5228
5238
|
}, null, 8, ["modelValue"]),
|
5229
|
-
Ce(y(
|
5239
|
+
Ce(y(_e), {
|
5230
5240
|
modelValue: y(s),
|
5231
|
-
"onUpdate:modelValue": i[1] || (i[1] = (a) =>
|
5241
|
+
"onUpdate:modelValue": i[1] || (i[1] = (a) => je(s) ? s.value = a : s = a)
|
5232
5242
|
}, {
|
5233
|
-
default:
|
5234
|
-
Ce(y(
|
5243
|
+
default: qe(() => [
|
5244
|
+
Ce(y(wl))
|
5235
5245
|
]),
|
5236
5246
|
_: 1
|
5237
5247
|
}, 8, ["modelValue"]),
|
5238
|
-
Ce(y(
|
5248
|
+
Ce(y(_e), {
|
5239
5249
|
modelValue: y(l),
|
5240
|
-
"onUpdate:modelValue": i[2] || (i[2] = (a) =>
|
5250
|
+
"onUpdate:modelValue": i[2] || (i[2] = (a) => je(l) ? l.value = a : l = a)
|
5241
5251
|
}, null, 8, ["modelValue"])
|
5242
5252
|
]));
|
5243
5253
|
}
|
5244
|
-
}),
|
5254
|
+
}), Il = { class: "ha-condition-group" }, mr = /* @__PURE__ */ Q({
|
5245
5255
|
__name: "Index",
|
5246
5256
|
props: {
|
5247
5257
|
conditions: {}
|
5248
5258
|
},
|
5249
5259
|
setup(u) {
|
5250
|
-
let t = u, { conditions: e } =
|
5251
|
-
return (s, l) => (O(),
|
5252
|
-
(O(!0),
|
5260
|
+
let t = u, { conditions: e } = te(t);
|
5261
|
+
return (s, l) => (O(), B("div", Il, [
|
5262
|
+
(O(!0), B(Et, null, Tt(y(e), (r) => (O(), He(y(Dl), {
|
5253
5263
|
name: r.name,
|
5254
5264
|
operator: r.operator,
|
5255
5265
|
value: r.value
|
5256
5266
|
}, null, 8, ["name", "operator", "value"]))), 256))
|
5257
5267
|
]));
|
5258
5268
|
}
|
5259
|
-
}),
|
5260
|
-
function
|
5261
|
-
return O(),
|
5262
|
-
|
5269
|
+
}), Ol = {}, Rl = { class: "ha-col" };
|
5270
|
+
function jl(u, t) {
|
5271
|
+
return O(), B("div", Rl, [
|
5272
|
+
pe(u.$slots, "default")
|
5263
5273
|
]);
|
5264
5274
|
}
|
5265
|
-
const
|
5275
|
+
const yr = /* @__PURE__ */ ze(Ol, [["render", jl]]), vr = /* @__PURE__ */ Q({
|
5266
5276
|
__name: "Container",
|
5267
5277
|
props: {
|
5268
5278
|
container: { type: Boolean, default: !0 }
|
5269
5279
|
},
|
5270
5280
|
setup(u) {
|
5271
|
-
let t = u, { container: e } =
|
5272
|
-
return (s, l) => (O(),
|
5273
|
-
class:
|
5281
|
+
let t = u, { container: e } = te(t);
|
5282
|
+
return (s, l) => (O(), B("div", {
|
5283
|
+
class: Le({ "ha-container": y(e) })
|
5274
5284
|
}, [
|
5275
|
-
|
5285
|
+
pe(s.$slots, "default")
|
5276
5286
|
], 2));
|
5277
5287
|
}
|
5278
|
-
}),
|
5288
|
+
}), wr = /* @__PURE__ */ Q({
|
5279
5289
|
__name: "Row",
|
5280
5290
|
props: {
|
5281
5291
|
gap: {},
|
5282
5292
|
direction: {}
|
5283
5293
|
},
|
5284
5294
|
setup(u) {
|
5285
|
-
let t = u, { gap: e, direction: s } =
|
5295
|
+
let t = u, { gap: e, direction: s } = te(t), l = Ee(() => {
|
5286
5296
|
let r = { gap: null };
|
5287
5297
|
return e.value && (r.gap = e.value + "px"), r;
|
5288
5298
|
});
|
5289
|
-
return (r, i) => (O(),
|
5290
|
-
class:
|
5291
|
-
style:
|
5299
|
+
return (r, i) => (O(), B("div", {
|
5300
|
+
class: Le(["ha-row", y(s)]),
|
5301
|
+
style: fe(y(l))
|
5292
5302
|
}, [
|
5293
|
-
|
5303
|
+
pe(r.$slots, "default")
|
5294
5304
|
], 6));
|
5295
5305
|
}
|
5296
|
-
}),
|
5306
|
+
}), br = /* @__PURE__ */ Q({
|
5297
5307
|
__name: "Progress",
|
5298
5308
|
props: {
|
5299
5309
|
modelValue: { type: Boolean },
|
@@ -5317,103 +5327,103 @@ const vr = /* @__PURE__ */ ze(jl, [["render", _l]]), wr = /* @__PURE__ */ Q({
|
|
5317
5327
|
}, 200));
|
5318
5328
|
}, c);
|
5319
5329
|
};
|
5320
|
-
return
|
5330
|
+
return we(() => {
|
5321
5331
|
t.value && r();
|
5322
|
-
}),
|
5332
|
+
}), be(() => {
|
5323
5333
|
clearInterval(l);
|
5324
|
-
}),
|
5334
|
+
}), J(() => t.value, (a, o) => {
|
5325
5335
|
a ? r() : i();
|
5326
|
-
}), (a, o) => y(e) ? (O(),
|
5336
|
+
}), (a, o) => y(e) ? (O(), B("div", {
|
5327
5337
|
key: 0,
|
5328
5338
|
class: "ha-progress",
|
5329
|
-
style:
|
5339
|
+
style: fe({ width: y(s) + "%" })
|
5330
5340
|
}, null, 4)) : Ze("", !0);
|
5331
5341
|
}
|
5332
|
-
}),
|
5342
|
+
}), _l = { class: "progress-tips" }, Bl = { class: "progress-tip info" }, Pl = { class: "progress-tip success" }, Ul = { class: "progress-tip error" }, Fl = { class: "progress-chart" }, Ml = { class: "progress-bar" }, ql = { class: "progress-text" }, xr = /* @__PURE__ */ Q({
|
5333
5343
|
__name: "SocketProgress",
|
5334
5344
|
props: {
|
5335
5345
|
progress: {}
|
5336
5346
|
},
|
5337
5347
|
setup(u) {
|
5338
|
-
let t = u, { progress: e } =
|
5348
|
+
let t = u, { progress: e } = te(t), s = Ee(() => {
|
5339
5349
|
let a = e.value;
|
5340
5350
|
return (a.succeed ?? 0) + (a.errored ?? 0);
|
5341
|
-
}), l =
|
5342
|
-
return (a, o) => (O(),
|
5343
|
-
class:
|
5351
|
+
}), l = Ee(() => re.getPercentage(s.value, e.value.total)), r = Ee(() => re.getProgressText(s.value, e.value.total)), i = Ee(() => re.getPercentageText(s.value, e.value.total));
|
5352
|
+
return (a, o) => (O(), B("div", {
|
5353
|
+
class: Le(["ha-socket-progress", { error: y(e).errored > 0 }])
|
5344
5354
|
}, [
|
5345
|
-
D("div",
|
5346
|
-
D("div",
|
5347
|
-
D("div",
|
5348
|
-
D("div",
|
5355
|
+
D("div", _l, [
|
5356
|
+
D("div", Bl, "进度:" + he(y(r)), 1),
|
5357
|
+
D("div", Pl, "成功:" + he(y(e).succeed ?? "-"), 1),
|
5358
|
+
D("div", Ul, "异常:" + he(y(e).errored ?? "-"), 1)
|
5349
5359
|
]),
|
5350
|
-
D("div",
|
5351
|
-
D("div",
|
5360
|
+
D("div", Fl, [
|
5361
|
+
D("div", Ml, [
|
5352
5362
|
D("div", {
|
5353
5363
|
class: "progress-percentage",
|
5354
|
-
style:
|
5364
|
+
style: fe({ width: y(l) + "%" })
|
5355
5365
|
}, null, 4)
|
5356
5366
|
]),
|
5357
|
-
D("div",
|
5367
|
+
D("div", ql, he(y(i)) + "%", 1)
|
5358
5368
|
])
|
5359
5369
|
], 2));
|
5360
5370
|
}
|
5361
|
-
}),
|
5362
|
-
|
5363
|
-
|
5364
|
-
],
|
5371
|
+
}), Nl = { class: "ha-tab" }, Vl = /* @__PURE__ */ D("div", { class: "tab-header" }, null, -1), zl = /* @__PURE__ */ D("div", { class: "tab-body" }, null, -1), Kl = [
|
5372
|
+
Vl,
|
5373
|
+
zl
|
5374
|
+
], kr = /* @__PURE__ */ Q({
|
5365
5375
|
__name: "Tab",
|
5366
5376
|
props: {
|
5367
5377
|
destroy: { type: Boolean }
|
5368
5378
|
},
|
5369
5379
|
setup(u) {
|
5370
|
-
return (t, e) => (O(),
|
5380
|
+
return (t, e) => (O(), B("div", Nl, Kl));
|
5371
5381
|
}
|
5372
5382
|
});
|
5373
|
-
let
|
5374
|
-
u == null && (u = new
|
5375
|
-
let t = await Fs.getSso(), e =
|
5376
|
-
await T.open(l),
|
5383
|
+
let Sr = async (u) => {
|
5384
|
+
u == null && (u = new ul()), await Zs(u), await Ms();
|
5385
|
+
let t = await Fs.getSso(), e = Z.sys.app, s = { baseUrl: u.baseUrl, language: e.language, user: t, platform: "pc" }, l = _.serialize(s);
|
5386
|
+
await T.open(l), T.onResponse = async (r) => {
|
5377
5387
|
let i = r.data;
|
5378
5388
|
return Ps.add(i.code, i.message, i.stack, i.elapsed), Promise.resolve();
|
5379
|
-
};
|
5389
|
+
}, await Me.loadI18n();
|
5380
5390
|
};
|
5381
5391
|
export {
|
5382
|
-
|
5392
|
+
oe as ArrayHelper,
|
5383
5393
|
st as BrowserHelper,
|
5384
|
-
|
5394
|
+
Vt as BuilderFactory,
|
5385
5395
|
lt as Cdn,
|
5386
5396
|
Wt as CdnFactory,
|
5387
5397
|
It as ComponentHelper,
|
5388
|
-
|
5389
|
-
|
5390
|
-
|
5391
|
-
|
5398
|
+
ul as CreateFeOptions,
|
5399
|
+
Be as DictionaryHelper,
|
5400
|
+
j as DomHelper,
|
5401
|
+
pl as DragEvent,
|
5392
5402
|
Xt as EncoderFactory,
|
5393
|
-
|
5403
|
+
ie as EventHelper,
|
5394
5404
|
gt as EventUtility,
|
5395
5405
|
Zt as ExcelFactory,
|
5396
5406
|
ts as ExplainerFactory,
|
5397
|
-
|
5407
|
+
C as Factories,
|
5398
5408
|
ns as FeatureFactory,
|
5399
|
-
|
5400
|
-
|
5401
|
-
|
5402
|
-
|
5403
|
-
|
5404
|
-
|
5405
|
-
|
5406
|
-
|
5407
|
-
|
5408
|
-
|
5409
|
-
|
5410
|
-
|
5411
|
-
|
5412
|
-
|
5413
|
-
|
5414
|
-
|
5415
|
-
|
5416
|
-
|
5409
|
+
De as FileHelper,
|
5410
|
+
hr as HaCode,
|
5411
|
+
yr as HaCol,
|
5412
|
+
pr as HaCompare,
|
5413
|
+
Dl as HaCondition,
|
5414
|
+
mr as HaConditionGroup,
|
5415
|
+
vr as HaContainer,
|
5416
|
+
nr as HaEmpty,
|
5417
|
+
fl as HaFill,
|
5418
|
+
wl as HaOption,
|
5419
|
+
br as HaProgress,
|
5420
|
+
fr as HaRichText,
|
5421
|
+
wr as HaRow,
|
5422
|
+
gl as HaScroller,
|
5423
|
+
_e as HaSelect,
|
5424
|
+
xr as HaSocketProgress,
|
5425
|
+
kr as HaTab,
|
5426
|
+
dr as HaTimer,
|
5417
5427
|
ds as HaloHttp,
|
5418
5428
|
os as HasherFactory,
|
5419
5429
|
Qe as HtmlHelper,
|
@@ -5422,68 +5432,67 @@ export {
|
|
5422
5432
|
Ye as HttpResponse,
|
5423
5433
|
gs as I18nFactory,
|
5424
5434
|
Ot as ImageHelper,
|
5425
|
-
|
5426
|
-
|
5427
|
-
|
5428
|
-
|
5435
|
+
_ as JsonHelper,
|
5436
|
+
ar as KeyboardUtility,
|
5437
|
+
or as ListDelta,
|
5438
|
+
re as MathHelper,
|
5429
5439
|
ms as Messenger,
|
5430
5440
|
vs as MessengerFactory,
|
5431
|
-
|
5432
|
-
|
5433
|
-
|
5434
|
-
|
5441
|
+
Rt as MicroHelper,
|
5442
|
+
ve as MountHelper,
|
5443
|
+
ur as MouseUtility,
|
5444
|
+
X as ObjectHelper,
|
5435
5445
|
ft as Position,
|
5436
|
-
|
5437
|
-
|
5438
|
-
|
5439
|
-
|
5440
|
-
|
5441
|
-
|
5446
|
+
qt as ProviderFactory,
|
5447
|
+
er as ProviderTable,
|
5448
|
+
gr as Range,
|
5449
|
+
ir as Rect,
|
5450
|
+
jt as Ref,
|
5451
|
+
cr as SaveUtility,
|
5442
5452
|
Je as ScrollHelper,
|
5443
5453
|
Bt as SignHelper,
|
5444
5454
|
xs as SignerFactory,
|
5445
5455
|
Xe as SqlHelper,
|
5446
|
-
|
5456
|
+
qs as SsoFactory,
|
5447
5457
|
at as SsoUser,
|
5448
5458
|
W as StringHelper,
|
5449
5459
|
Bs as SvcFactory,
|
5450
5460
|
zs as TaskFactory,
|
5451
|
-
|
5461
|
+
Se as TaskHelper,
|
5452
5462
|
Qs as TemplateFactory,
|
5453
|
-
|
5454
|
-
|
5455
|
-
|
5463
|
+
ee as TimeHelper,
|
5464
|
+
Ie as TreeHelper,
|
5465
|
+
F as TypeHelper,
|
5456
5466
|
K as UrlHelper,
|
5457
|
-
|
5458
|
-
|
5467
|
+
lr as VideoFactory,
|
5468
|
+
rr as VoiceFactory,
|
5459
5469
|
Ys as base64,
|
5460
|
-
|
5461
|
-
|
5462
|
-
|
5463
|
-
|
5464
|
-
|
5470
|
+
ge as cdn,
|
5471
|
+
Z as configSvc,
|
5472
|
+
Sr as createFe,
|
5473
|
+
tr as driverSvc,
|
5474
|
+
sr as envSvc,
|
5465
5475
|
T as http,
|
5466
|
-
|
5476
|
+
Me as i18n,
|
5467
5477
|
Zs as initDriver,
|
5468
|
-
Hs as initI18n,
|
5469
5478
|
Ms as initSvc,
|
5470
5479
|
Ps as logSvc,
|
5471
5480
|
pt as md5,
|
5472
|
-
|
5473
|
-
|
5474
|
-
|
5475
|
-
|
5481
|
+
ye as messenger,
|
5482
|
+
H as moment,
|
5483
|
+
Ae as settingRepo,
|
5484
|
+
ce as settingSvc,
|
5476
5485
|
Us as socketSvc,
|
5477
|
-
|
5478
|
-
|
5479
|
-
|
5480
|
-
|
5481
|
-
|
5482
|
-
|
5483
|
-
|
5484
|
-
|
5485
|
-
|
5486
|
-
|
5486
|
+
Hs as t,
|
5487
|
+
sl as t_enum,
|
5488
|
+
el as t_exists,
|
5489
|
+
ll as t_field,
|
5490
|
+
rl as t_field_choose_placeholder,
|
5491
|
+
nl as t_field_placeholder,
|
5492
|
+
ol as t_menu,
|
5493
|
+
al as t_module,
|
5494
|
+
tl as t_sys,
|
5495
|
+
il as t_table,
|
5487
5496
|
Gs as template,
|
5488
5497
|
Fs as userSvc
|
5489
5498
|
};
|