halo-fe 1.0.31 → 1.0.32
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.js +437 -429
- package/dist/style.css +1 -1
- package/esm/coms/layouts/Container.vue.d.ts +6 -2
- package/esm/drivers/cryptors/Cryptor.d.ts +11 -0
- package/esm/drivers/cryptors/CryptorFactory.d.ts +13 -0
- package/esm/drivers/cryptors/ICryptor.d.ts +15 -0
- package/esm/drivers/cryptors/implements/AesCryptor.d.ts +10 -0
- package/esm/drivers/cryptors/index.d.ts +3 -0
- package/esm/drivers/https/implements/EiHttp.d.ts +2 -2
- package/esm/drivers/index.d.ts +1 -1
- package/esm/drivers/providers/IProvider.d.ts +1 -1
- package/esm/drivers/providers/Provider.d.ts +10 -10
- package/esm/drivers/providers/ProviderFactory.d.ts +3 -3
- package/esm/drivers/providers/implements/CookieProvider.d.ts +7 -11
- package/esm/drivers/providers/implements/IndexedDbProvider.d.ts +10 -13
- package/esm/drivers/providers/implements/StorageProvider.d.ts +11 -11
- package/esm/drivers/util/implements/TimeUtil.d.ts +18 -18
- package/esm/factory/Factories.d.ts +2 -2
- package/package.json +1 -1
package/dist/main.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
var ut = Object.defineProperty;
|
2
2
|
var ct = (u, i, e) => i in u ? ut(u, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[i] = e;
|
3
3
|
var n = (u, i, e) => ct(u, typeof i != "symbol" ? i + "" : i, e);
|
4
|
-
import { reactive as Te, defineAsyncComponent as dt, watch as
|
4
|
+
import { reactive as Te, defineAsyncComponent as dt, watch as z, defineComponent as P, toRefs as q, openBlock as S, createElementBlock as C, createElementVNode as T, toDisplayString as N, unref as f, renderSlot as Q, createCommentVNode as ce, ref as H, onMounted as ie, onUnmounted as ae, normalizeStyle as ee, normalizeClass as oe, createTextVNode as me, createBlock as Ne, withCtx as re, mergeModels as Oe, useModel as Ve, nextTick as Ue, withDirectives as pt, createStaticVNode as ht, vShow as gt, createVNode as X, isRef as we, Fragment as qe, renderList as We, computed as ye } from "vue";
|
5
5
|
import { L as ft } from "./assets/liquidjs-BfOWWjtJ.js";
|
6
6
|
import { _ as ke } from "./assets/underscore-B0BCaBxV.js";
|
7
7
|
import { F as yt } from "./assets/file-saver-Cnua3zoa.js";
|
8
8
|
import { a as mt } from "./assets/clone-DtpAsLoe.js";
|
9
9
|
import { _ as vt } from "./assets/underscore.string-oDfap0sE.js";
|
10
|
-
import { h as
|
10
|
+
import { h as fe } from "./assets/moment-h96o7c8I.js";
|
11
11
|
class D {
|
12
12
|
constructor() {
|
13
13
|
//#region 属性
|
@@ -91,7 +91,7 @@ class D {
|
|
91
91
|
}
|
92
92
|
//#endregion
|
93
93
|
}
|
94
|
-
class
|
94
|
+
class ze {
|
95
95
|
constructor() {
|
96
96
|
n(this, "type");
|
97
97
|
}
|
@@ -161,7 +161,7 @@ class d {
|
|
161
161
|
return y.util.sign;
|
162
162
|
}
|
163
163
|
}
|
164
|
-
class bt extends
|
164
|
+
class bt extends ze {
|
165
165
|
constructor() {
|
166
166
|
super(...arguments);
|
167
167
|
//#region 属性
|
@@ -202,7 +202,7 @@ class bt extends qe {
|
|
202
202
|
*/
|
203
203
|
n(this, "triggerRefresh", (e) => {
|
204
204
|
if (e == null || e.onRefresh == null)
|
205
|
-
return
|
205
|
+
return se.notify(de("common.tips"), "要实现自定义刷新功能,请在组件内部定义并暴露onRefresh方法即可", "warning"), !1;
|
206
206
|
e.onRefresh();
|
207
207
|
});
|
208
208
|
/**
|
@@ -248,7 +248,7 @@ class bt extends qe {
|
|
248
248
|
let l = s.control.tooltip, a = `${e}.${s.name}.tooltip`;
|
249
249
|
for (let p of l.fields)
|
250
250
|
a += `.${t[p]}`;
|
251
|
-
let o =
|
251
|
+
let o = de(a), c = d.json.deserialize(o);
|
252
252
|
c == null ? (l.title = null, l.content = null) : (l.title = c.title, l.content = d.json.serializeWithoutString(c.content, !0));
|
253
253
|
}
|
254
254
|
}
|
@@ -297,7 +297,7 @@ class bt extends qe {
|
|
297
297
|
}
|
298
298
|
//#endregion
|
299
299
|
}
|
300
|
-
class wt extends
|
300
|
+
class wt extends ze {
|
301
301
|
constructor() {
|
302
302
|
super(...arguments);
|
303
303
|
//#region 属性
|
@@ -548,7 +548,7 @@ class Ye extends Je {
|
|
548
548
|
* 获取本地配置
|
549
549
|
*/
|
550
550
|
async getAsync(e, t) {
|
551
|
-
return await (await y.provider.
|
551
|
+
return await (await y.provider.getDbAsync(e)).getAsync(e, t);
|
552
552
|
}
|
553
553
|
/**
|
554
554
|
* 设置背景
|
@@ -587,7 +587,7 @@ class Ye extends Je {
|
|
587
587
|
* 全量保存用户配置
|
588
588
|
*/
|
589
589
|
async saveAsync(e, t, r, s = !0) {
|
590
|
-
return s && await (await y.provider.
|
590
|
+
return s && await (await y.provider.getDbAsync(e)).saveAsync(e, t, r), _.post(`/config/save?kind=${e}&type=${t}`, r).then((l) => Promise.resolve(!0));
|
591
591
|
}
|
592
592
|
/**
|
593
593
|
* 部分保存用户配置
|
@@ -629,7 +629,7 @@ class $t {
|
|
629
629
|
* 手动添加日志
|
630
630
|
*/
|
631
631
|
add(i, e, t, r = null) {
|
632
|
-
let s = d.time.
|
632
|
+
let s = d.time.formatTime();
|
633
633
|
this.logs.unshift({ time: s, code: i, message: e, stack: t, elapsed: r });
|
634
634
|
}
|
635
635
|
/**
|
@@ -754,19 +754,19 @@ class Ht {
|
|
754
754
|
* 获取本地缓存中的用户信息;好处:即使手动更改storage数据,也可以里面获取到
|
755
755
|
*/
|
756
756
|
async getSso() {
|
757
|
-
return await (await y.provider.
|
757
|
+
return await (await y.provider.getDbAsync("user")).getEntityAsync("user", "sso");
|
758
758
|
}
|
759
759
|
/**
|
760
760
|
* 未登录,获取匿名登录信息
|
761
761
|
*/
|
762
762
|
async getAnonymous() {
|
763
|
-
await
|
763
|
+
await Z.bindAsync([]);
|
764
764
|
}
|
765
765
|
/**
|
766
766
|
* 登录后,获取用户信息
|
767
767
|
*/
|
768
768
|
async loadInfo() {
|
769
|
-
return _.get("/user/info").then(async ({ data: i }) => (await
|
769
|
+
return _.get("/user/info").then(async ({ data: i }) => (await Z.bindAsync(i.configs), this.user = i, this.debugger = i.debugger, Promise.resolve(i)));
|
770
770
|
}
|
771
771
|
//#endregion
|
772
772
|
//#region 菜单
|
@@ -824,7 +824,7 @@ class Qe extends Je {
|
|
824
824
|
}
|
825
825
|
//#endregion
|
826
826
|
}
|
827
|
-
class
|
827
|
+
class Rt extends D {
|
828
828
|
open() {
|
829
829
|
super.open(), super.register({
|
830
830
|
Config: Ye,
|
@@ -842,7 +842,7 @@ class Ot extends D {
|
|
842
842
|
}
|
843
843
|
}
|
844
844
|
let Cl = () => {
|
845
|
-
}, Xe = Te(new Dt()),
|
845
|
+
}, Xe = Te(new Dt()), Z = new Ye(), Tl = Te(new Qe()), El = new jt(), Le = new $t(), Ot = new Ht();
|
846
846
|
class y {
|
847
847
|
//#endregion
|
848
848
|
//#region 驱动工厂
|
@@ -856,7 +856,7 @@ class y {
|
|
856
856
|
* CDN工厂
|
857
857
|
*/
|
858
858
|
static get cdn() {
|
859
|
-
return this.create(
|
859
|
+
return this.create(qt);
|
860
860
|
}
|
861
861
|
/**
|
862
862
|
* 编码器工厂
|
@@ -934,7 +934,7 @@ class y {
|
|
934
934
|
* SSO工厂
|
935
935
|
*/
|
936
936
|
static get sso() {
|
937
|
-
return this.create(
|
937
|
+
return this.create(Ur);
|
938
938
|
}
|
939
939
|
/**
|
940
940
|
* Task工厂
|
@@ -974,7 +974,7 @@ class y {
|
|
974
974
|
* 服务工厂
|
975
975
|
*/
|
976
976
|
static get svc() {
|
977
|
-
return this.create(
|
977
|
+
return this.create(Rt);
|
978
978
|
}
|
979
979
|
//#endregion
|
980
980
|
//#region 创建
|
@@ -997,7 +997,7 @@ class ve {
|
|
997
997
|
n(this, "type");
|
998
998
|
}
|
999
999
|
}
|
1000
|
-
class
|
1000
|
+
class Ut extends ve {
|
1001
1001
|
constructor() {
|
1002
1002
|
super(...arguments);
|
1003
1003
|
n(this, "type", "Json");
|
@@ -1009,7 +1009,7 @@ class Lt extends ve {
|
|
1009
1009
|
return d.json.serialize(e.rows, !0);
|
1010
1010
|
}
|
1011
1011
|
}
|
1012
|
-
class
|
1012
|
+
class Lt extends ve {
|
1013
1013
|
constructor() {
|
1014
1014
|
super(...arguments);
|
1015
1015
|
n(this, "type", "Mongo");
|
@@ -1043,13 +1043,21 @@ class Ee {
|
|
1043
1043
|
async openAsync(i) {
|
1044
1044
|
d.json.mergeTo(this, i);
|
1045
1045
|
}
|
1046
|
+
async createAsync(i) {
|
1047
|
+
}
|
1046
1048
|
async replaceEntityAsync(i, e, t) {
|
1047
1049
|
let r = await this.getAsync(i, e);
|
1048
1050
|
return await this.saveEntity(i, t, r), await this.deleteAsync(i, e), r;
|
1049
1051
|
}
|
1050
1052
|
//#endregion
|
1053
|
+
//#region 提交释放
|
1054
|
+
commit() {
|
1055
|
+
}
|
1056
|
+
dispose() {
|
1057
|
+
}
|
1058
|
+
//#endregion
|
1051
1059
|
}
|
1052
|
-
const
|
1060
|
+
const ue = class ue extends Ee {
|
1053
1061
|
constructor() {
|
1054
1062
|
super(...arguments);
|
1055
1063
|
//#region 属性
|
@@ -1070,7 +1078,7 @@ const ie = class ie extends Ee {
|
|
1070
1078
|
n(this, "deleteAsync", async (e, t) => {
|
1071
1079
|
if (!(t == null || Object.is(t, NaN)))
|
1072
1080
|
return new Promise(async (r, s) => {
|
1073
|
-
let l = await this.openDbAsync(), c = (await this.openTransAsync(e, "readwrite"
|
1081
|
+
let l = await this.openDbAsync(), c = (await this.openTransAsync(l, e, "readwrite")).objectStore(e).delete(t);
|
1074
1082
|
c.onsuccess = (p) => {
|
1075
1083
|
let h = p.target.result;
|
1076
1084
|
r(h);
|
@@ -1087,62 +1095,26 @@ const ie = class ie extends Ee {
|
|
1087
1095
|
* 进行数据库初始化 或 从现有数据库中得到最新版本号(数据库首次初始化和open是版本号升级时,会触发升级事件)
|
1088
1096
|
*/
|
1089
1097
|
async openAsync(e) {
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
let a = l.target.result;
|
1094
|
-
ie.version = a.version, this.objectStoreNames = a.objectStoreNames, t();
|
1095
|
-
}, s.onerror = (l) => {
|
1096
|
-
r(l.target);
|
1097
|
-
};
|
1098
|
-
});
|
1098
|
+
await super.openAsync(e);
|
1099
|
+
let t = await this.openDbAsync();
|
1100
|
+
ue.version = t.version, this.objectStoreNames = t.objectStoreNames, t.close();
|
1099
1101
|
}
|
1100
1102
|
/**
|
1101
1103
|
* 保证创建存储Store
|
1102
1104
|
*/
|
1103
1105
|
async createAsync(e) {
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
r(l);
|
1113
|
-
};
|
1114
|
-
});
|
1115
|
-
}
|
1116
|
-
/**
|
1117
|
-
* 打开数据库(不升级,用于执行命令)
|
1118
|
-
*/
|
1119
|
-
async openDbAsync() {
|
1120
|
-
return new Promise((e, t) => {
|
1121
|
-
let r = indexedDB.open(this.database, ie.version);
|
1122
|
-
r.onsuccess = (s) => {
|
1123
|
-
let l = s.target.result;
|
1124
|
-
e(l);
|
1125
|
-
}, r.onerror = (s) => {
|
1126
|
-
t(s.target);
|
1127
|
-
};
|
1128
|
-
});
|
1129
|
-
}
|
1130
|
-
/**
|
1131
|
-
* 开启事务
|
1132
|
-
*/
|
1133
|
-
async openTransAsync(e, t, r) {
|
1134
|
-
return new Promise((s, l) => {
|
1135
|
-
let a = r.transaction(e, t);
|
1136
|
-
a.oncomplete = (o) => {
|
1137
|
-
r.close();
|
1138
|
-
}, a.onerror = (o) => {
|
1139
|
-
l(o);
|
1140
|
-
}, s(a);
|
1141
|
-
});
|
1106
|
+
if (e == null)
|
1107
|
+
return Promise.resolve();
|
1108
|
+
if (this.objectStoreNames.contains(e))
|
1109
|
+
return Promise.resolve(!0);
|
1110
|
+
let t = await this.upgradeDbAsync(++ue.version);
|
1111
|
+
if (t.objectStoreNames.contains(e))
|
1112
|
+
return Promise.resolve(!0);
|
1113
|
+
t.createObjectStore(e), this.objectStoreNames = t.objectStoreNames;
|
1142
1114
|
}
|
1143
1115
|
//#endregion
|
1144
1116
|
//#region 查询
|
1145
|
-
async
|
1117
|
+
async getEntityAsync(e, t) {
|
1146
1118
|
return await this.getAsync(e, t);
|
1147
1119
|
}
|
1148
1120
|
/**
|
@@ -1150,7 +1122,7 @@ const ie = class ie extends Ee {
|
|
1150
1122
|
*/
|
1151
1123
|
async getAsync(e, t) {
|
1152
1124
|
return t == null ? Promise.resolve(null) : new Promise(async (r, s) => {
|
1153
|
-
let l = await this.openDbAsync(), c = (await this.openTransAsync(e, "readonly"
|
1125
|
+
let l = await this.openDbAsync(), c = (await this.openTransAsync(l, e, "readonly")).objectStore(e).get(t);
|
1154
1126
|
c.onsuccess = (p) => {
|
1155
1127
|
let h = p.target.result;
|
1156
1128
|
r(h);
|
@@ -1161,7 +1133,7 @@ const ie = class ie extends Ee {
|
|
1161
1133
|
}
|
1162
1134
|
async getKeysAsync(e) {
|
1163
1135
|
return e == null ? Promise.resolve([]) : new Promise(async (t, r) => {
|
1164
|
-
let s = await this.openDbAsync(), o = (await this.openTransAsync(e, "readonly"
|
1136
|
+
let s = await this.openDbAsync(), o = (await this.openTransAsync(s, e, "readonly")).objectStore(e).getAllKeys();
|
1165
1137
|
o.onsuccess = (c) => {
|
1166
1138
|
let p = c.target.result;
|
1167
1139
|
t(p);
|
@@ -1180,7 +1152,7 @@ const ie = class ie extends Ee {
|
|
1180
1152
|
return;
|
1181
1153
|
let s = await this.openDbAsync();
|
1182
1154
|
return new Promise(async (l, a) => {
|
1183
|
-
let p = (await this.openTransAsync(e, "readwrite"
|
1155
|
+
let p = (await this.openTransAsync(s, e, "readwrite")).objectStore(e).add(r, t);
|
1184
1156
|
p.onsuccess = (h) => {
|
1185
1157
|
let g = h.target.result;
|
1186
1158
|
l(g);
|
@@ -1208,7 +1180,7 @@ const ie = class ie extends Ee {
|
|
1208
1180
|
return;
|
1209
1181
|
let s = await this.openDbAsync();
|
1210
1182
|
return new Promise(async (l, a) => {
|
1211
|
-
let o = await this.openTransAsync(e, "readwrite"
|
1183
|
+
let o = await this.openTransAsync(s, e, "readwrite"), c = d.object.clone(r), h = o.objectStore(e).put(c, t);
|
1212
1184
|
h.onsuccess = (g) => {
|
1213
1185
|
let m = g.target.result;
|
1214
1186
|
l(m);
|
@@ -1219,24 +1191,60 @@ const ie = class ie extends Ee {
|
|
1219
1191
|
});
|
1220
1192
|
}
|
1221
1193
|
//#endregion
|
1222
|
-
//#region
|
1194
|
+
//#region 辅助
|
1223
1195
|
/**
|
1224
|
-
*
|
1196
|
+
* 升级数据库版本
|
1197
|
+
* VIP:无需手动关闭数据空连接,系统在onsuccess中会自动关闭连接
|
1225
1198
|
*/
|
1226
|
-
|
1199
|
+
async upgradeDbAsync(e) {
|
1200
|
+
return new Promise((t, r) => {
|
1201
|
+
let s = indexedDB.open(this.database, e);
|
1202
|
+
s.onupgradeneeded = (l) => {
|
1203
|
+
let o = l.target.result;
|
1204
|
+
t(o);
|
1205
|
+
}, s.onsuccess = (l) => {
|
1206
|
+
l.target.result.close();
|
1207
|
+
}, s.onblocked = (l) => {
|
1208
|
+
console.error(`IndexedDB连接被占用:${l.type}`);
|
1209
|
+
}, s.onerror = (l) => {
|
1210
|
+
r(l.target);
|
1211
|
+
};
|
1212
|
+
});
|
1227
1213
|
}
|
1228
1214
|
/**
|
1229
|
-
*
|
1215
|
+
* 打开数据库(不升级,用于执行命令)
|
1230
1216
|
*/
|
1231
|
-
|
1217
|
+
async openDbAsync() {
|
1218
|
+
return new Promise((e, t) => {
|
1219
|
+
let r = indexedDB.open(this.database);
|
1220
|
+
r.onsuccess = (s) => {
|
1221
|
+
let a = s.target.result;
|
1222
|
+
e(a);
|
1223
|
+
}, r.onerror = (s) => {
|
1224
|
+
t(s.target);
|
1225
|
+
};
|
1226
|
+
});
|
1227
|
+
}
|
1228
|
+
/**
|
1229
|
+
* 开启事务
|
1230
|
+
*/
|
1231
|
+
async openTransAsync(e, t, r) {
|
1232
|
+
return new Promise((s, l) => {
|
1233
|
+
let a = e.transaction(t, r);
|
1234
|
+
a.oncomplete = (o) => {
|
1235
|
+
e.close();
|
1236
|
+
}, a.onerror = (o) => {
|
1237
|
+
l(o);
|
1238
|
+
}, s(a);
|
1239
|
+
});
|
1232
1240
|
}
|
1233
1241
|
//#endregion
|
1234
1242
|
};
|
1235
1243
|
/**
|
1236
1244
|
* 静态版本,保证所有数据库实例拿到最新版本信息
|
1237
1245
|
*/
|
1238
|
-
n(
|
1239
|
-
let Ae =
|
1246
|
+
n(ue, "version", null);
|
1247
|
+
let Ae = ue;
|
1240
1248
|
class It extends Ee {
|
1241
1249
|
constructor() {
|
1242
1250
|
super(...arguments);
|
@@ -1248,10 +1256,10 @@ class It extends Ee {
|
|
1248
1256
|
* 以5M为基准,获取剩余可用容量(KB)
|
1249
1257
|
*/
|
1250
1258
|
n(this, "getLeftStorage", () => {
|
1251
|
-
let e = 0;
|
1252
|
-
|
1253
|
-
e += localStorage.getItem(
|
1254
|
-
|
1259
|
+
let e = 0, t = Object.keys(localStorage);
|
1260
|
+
for (let l of t)
|
1261
|
+
e += localStorage.getItem(l).length;
|
1262
|
+
return 1e-4 * 1024 - e / 1024;
|
1255
1263
|
});
|
1256
1264
|
/**
|
1257
1265
|
* 判断指定值是否能够存储到storage中
|
@@ -1262,25 +1270,17 @@ class It extends Ee {
|
|
1262
1270
|
});
|
1263
1271
|
}
|
1264
1272
|
//#endregion
|
1265
|
-
//#region 开启
|
1266
|
-
openAsync(e) {
|
1267
|
-
return Promise.resolve();
|
1268
|
-
}
|
1269
|
-
//#endregion
|
1270
|
-
//#region 创建
|
1271
|
-
createAsync(e) {
|
1272
|
-
return Promise.resolve(void 0);
|
1273
|
-
}
|
1274
|
-
//#endregion
|
1275
1273
|
//#region 查询
|
1276
|
-
|
1277
|
-
|
1274
|
+
async getEntityAsync(e, t) {
|
1275
|
+
let r = await this.getAsync(e, t);
|
1276
|
+
return JSON.parse(r);
|
1278
1277
|
}
|
1279
1278
|
async getAsync(e, t) {
|
1280
|
-
|
1279
|
+
let r = this.getKey(e, t);
|
1280
|
+
return localStorage.getItem(r);
|
1281
1281
|
}
|
1282
|
-
|
1283
|
-
return
|
1282
|
+
getKeysAsync(e) {
|
1283
|
+
return Promise.resolve([]);
|
1284
1284
|
}
|
1285
1285
|
//#endregion
|
1286
1286
|
//#region 添加
|
@@ -1290,10 +1290,12 @@ class It extends Ee {
|
|
1290
1290
|
//#endregion
|
1291
1291
|
//#region 更新
|
1292
1292
|
async saveEntity(e, t, r) {
|
1293
|
-
|
1293
|
+
let s = d.json.serialize(r);
|
1294
|
+
return await this.saveAsync(e, t, s);
|
1294
1295
|
}
|
1295
1296
|
async saveAsync(e, t, r) {
|
1296
|
-
|
1297
|
+
let s = this.getKey(e, t);
|
1298
|
+
localStorage.setItem(s, r);
|
1297
1299
|
}
|
1298
1300
|
updateAsync(e, t, r) {
|
1299
1301
|
return Promise.resolve(void 0);
|
@@ -1303,11 +1305,11 @@ class It extends Ee {
|
|
1303
1305
|
async deleteAsync(e, t) {
|
1304
1306
|
localStorage.removeItem(t);
|
1305
1307
|
}
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1308
|
+
/**
|
1309
|
+
* 获取唯一键
|
1310
|
+
*/
|
1311
|
+
getKey(e, t) {
|
1312
|
+
return `${e}.${t}`;
|
1311
1313
|
}
|
1312
1314
|
//#endregion
|
1313
1315
|
}
|
@@ -1318,24 +1320,16 @@ class Mt extends Ee {
|
|
1318
1320
|
n(this, "type", "Cookie");
|
1319
1321
|
}
|
1320
1322
|
//#endregion
|
1321
|
-
//#region 开启
|
1322
|
-
openAsync(e) {
|
1323
|
-
return Promise.resolve();
|
1324
|
-
}
|
1325
|
-
//#endregion
|
1326
1323
|
getKeysAsync(e) {
|
1327
1324
|
return Promise.resolve([]);
|
1328
1325
|
}
|
1329
|
-
createAsync(e) {
|
1330
|
-
return Promise.resolve(void 0);
|
1331
|
-
}
|
1332
1326
|
deleteAsync(e, t) {
|
1333
1327
|
return Promise.resolve(void 0);
|
1334
1328
|
}
|
1335
1329
|
getAsync(e, t) {
|
1336
1330
|
return Promise.resolve(void 0);
|
1337
1331
|
}
|
1338
|
-
|
1332
|
+
getEntityAsync(e, t) {
|
1339
1333
|
return Promise.resolve(void 0);
|
1340
1334
|
}
|
1341
1335
|
insertAsync(e, t, r) {
|
@@ -1350,19 +1344,17 @@ class Mt extends Ee {
|
|
1350
1344
|
updateAsync(e, t, r) {
|
1351
1345
|
return Promise.resolve(void 0);
|
1352
1346
|
}
|
1353
|
-
//#region 提交/释放
|
1354
|
-
commit() {
|
1355
|
-
}
|
1356
|
-
dispose() {
|
1357
|
-
}
|
1358
|
-
//#endregion
|
1359
1347
|
}
|
1360
1348
|
class Bt extends D {
|
1361
1349
|
constructor() {
|
1362
1350
|
super(...arguments);
|
1351
|
+
//#region 属性
|
1363
1352
|
n(this, "type", "Provider");
|
1353
|
+
//#endregion
|
1364
1354
|
n(this, "_default");
|
1365
1355
|
}
|
1356
|
+
//#endregion
|
1357
|
+
//#region 开启
|
1366
1358
|
open() {
|
1367
1359
|
super.open(), super.register({
|
1368
1360
|
IndexedDb: Ae,
|
@@ -1371,9 +1363,9 @@ class Bt extends D {
|
|
1371
1363
|
});
|
1372
1364
|
}
|
1373
1365
|
/**
|
1374
|
-
*
|
1366
|
+
* 获取IndeedDb驱动程序,并自动决定创建指定名称的仓储
|
1375
1367
|
*/
|
1376
|
-
async
|
1368
|
+
async getDbAsync(e) {
|
1377
1369
|
if (this._default != null)
|
1378
1370
|
return await this._default.createAsync(e), this._default;
|
1379
1371
|
this._default = super.create("IndexedDb");
|
@@ -1383,8 +1375,9 @@ class Bt extends D {
|
|
1383
1375
|
/**
|
1384
1376
|
* 获取默认Storage提供程序
|
1385
1377
|
*/
|
1386
|
-
|
1387
|
-
|
1378
|
+
async getStorageAsync() {
|
1379
|
+
let e = super.create("Storage");
|
1380
|
+
return await e.openAsync(), e;
|
1388
1381
|
}
|
1389
1382
|
}
|
1390
1383
|
class Ie {
|
@@ -1419,10 +1412,10 @@ class Se extends ve {
|
|
1419
1412
|
`, a += "(";
|
1420
1413
|
let m = Object.keys(g);
|
1421
1414
|
for (let k = 0; k < m.length; k++) {
|
1422
|
-
let
|
1423
|
-
if (l != null && l.name ==
|
1415
|
+
let R = m[k];
|
1416
|
+
if (l != null && l.name == R)
|
1424
1417
|
continue;
|
1425
|
-
let M = g[
|
1418
|
+
let M = g[R];
|
1426
1419
|
a += `${Ie.getValue(M)}`, k != m.length - 1 && (a += ", ");
|
1427
1420
|
}
|
1428
1421
|
a += ")", h != s.length - 1 && (a += `\r
|
@@ -1454,8 +1447,8 @@ class Ft extends D {
|
|
1454
1447
|
}
|
1455
1448
|
open() {
|
1456
1449
|
super.open(), super.register({
|
1457
|
-
Json:
|
1458
|
-
Mongo:
|
1450
|
+
Json: Ut,
|
1451
|
+
Mongo: Lt,
|
1459
1452
|
MySql: Pt,
|
1460
1453
|
Sql: Se
|
1461
1454
|
});
|
@@ -1658,7 +1651,7 @@ class Vt extends Ge {
|
|
1658
1651
|
return await super.loadFilesAsync(`${this.jdCdn}/xlsx-js-style@1.2.0`, e), window.XLSX;
|
1659
1652
|
}
|
1660
1653
|
}
|
1661
|
-
class
|
1654
|
+
class qt extends D {
|
1662
1655
|
constructor() {
|
1663
1656
|
super(...arguments);
|
1664
1657
|
n(this, "type", "Cdn");
|
@@ -1692,7 +1685,7 @@ class Ze {
|
|
1692
1685
|
return JSON.parse(e);
|
1693
1686
|
}
|
1694
1687
|
}
|
1695
|
-
class
|
1688
|
+
class Wt extends Ze {
|
1696
1689
|
constructor() {
|
1697
1690
|
super(...arguments);
|
1698
1691
|
//#region 属性
|
@@ -1702,7 +1695,7 @@ class zt extends Ze {
|
|
1702
1695
|
//#endregion
|
1703
1696
|
//#region 开启
|
1704
1697
|
async openAsync(e) {
|
1705
|
-
this.crypto = await
|
1698
|
+
this.crypto = await te.getCrypto();
|
1706
1699
|
}
|
1707
1700
|
//#endregion
|
1708
1701
|
encodeString(e) {
|
@@ -1714,7 +1707,7 @@ class zt extends Ze {
|
|
1714
1707
|
return this.crypto.enc.Utf8.stringify(t);
|
1715
1708
|
}
|
1716
1709
|
}
|
1717
|
-
class
|
1710
|
+
class zt extends Ze {
|
1718
1711
|
constructor() {
|
1719
1712
|
super(...arguments);
|
1720
1713
|
n(this, "type", "Url");
|
@@ -1733,8 +1726,8 @@ class Kt extends D {
|
|
1733
1726
|
}
|
1734
1727
|
open() {
|
1735
1728
|
super.open(), super.register({
|
1736
|
-
Base64:
|
1737
|
-
Url:
|
1729
|
+
Base64: Wt,
|
1730
|
+
Url: zt
|
1738
1731
|
});
|
1739
1732
|
}
|
1740
1733
|
/**
|
@@ -1775,11 +1768,20 @@ class Yt extends Jt {
|
|
1775
1768
|
//#endregion
|
1776
1769
|
//#region 开启
|
1777
1770
|
async openAsync(e) {
|
1778
|
-
await super.openAsync(e), this.crypto = await
|
1771
|
+
await super.openAsync(e), this.crypto = await te.getCrypto();
|
1779
1772
|
}
|
1780
1773
|
//#endregion
|
1781
1774
|
encryptString(e, t) {
|
1782
|
-
|
1775
|
+
this.crypto.enc.Hex.parse("000102030405060708090a0b0c0d0e0f");
|
1776
|
+
debugger;
|
1777
|
+
let r = this.crypto.enc.Hex.parse(), s = {
|
1778
|
+
mode: this.crypto.mode.CBC,
|
1779
|
+
//默认加密模式
|
1780
|
+
padding: this.crypto.pad.Pkcs7,
|
1781
|
+
//默认填充方式
|
1782
|
+
iv: r
|
1783
|
+
};
|
1784
|
+
return this.crypto.AES.encrypt(e, t, s).toString();
|
1783
1785
|
}
|
1784
1786
|
}
|
1785
1787
|
class Qt extends D {
|
@@ -1811,7 +1813,7 @@ class Gt extends Xt {
|
|
1811
1813
|
//#endregion
|
1812
1814
|
//#region 开启
|
1813
1815
|
async openAsync(e) {
|
1814
|
-
this.xlsx = await
|
1816
|
+
this.xlsx = await te.getXlsx();
|
1815
1817
|
}
|
1816
1818
|
//#endregion
|
1817
1819
|
export(e, t) {
|
@@ -1996,7 +1998,7 @@ class or extends et {
|
|
1996
1998
|
//#endregion
|
1997
1999
|
//#region 开启
|
1998
2000
|
async openAsync(e) {
|
1999
|
-
this.crypto = await
|
2001
|
+
this.crypto = await te.getCrypto();
|
2000
2002
|
}
|
2001
2003
|
}
|
2002
2004
|
class ur extends D {
|
@@ -2193,7 +2195,7 @@ class be {
|
|
2193
2195
|
let e = i.variables;
|
2194
2196
|
if (e == null || e.length == 0)
|
2195
2197
|
return;
|
2196
|
-
let t = this.encoder.encode(e), r = d.time.getTimestamp(), s = d.time.formatDateTime(
|
2198
|
+
let t = this.encoder.encode(e), r = d.time.getTimestamp(), s = d.time.formatDateTime(), l = new cr();
|
2197
2199
|
l.request = i, l.model = e, l.encoded = t, l.timestamp = r, l.time = s, i.path = await this.template.renderAsync(i.path, l), i.body = await this.template.renderAsync(i.body, l);
|
2198
2200
|
}
|
2199
2201
|
}
|
@@ -2418,9 +2420,9 @@ class hr extends be {
|
|
2418
2420
|
n(this, "handleError", (e) => {
|
2419
2421
|
if (e instanceof Object) {
|
2420
2422
|
let t = e.message;
|
2421
|
-
e.message == "Network Error" && (d.url.httpOrHttps(e.config.url) ? t = "接口网络错误: " + e.config.url : t = "接口网络错误: " + e.config.baseURL + e.config.url),
|
2423
|
+
e.message == "Network Error" && (d.url.httpOrHttps(e.config.url) ? t = "接口网络错误: " + e.config.url : t = "接口网络错误: " + e.config.baseURL + e.config.url), se.error(t);
|
2422
2424
|
} else
|
2423
|
-
|
2425
|
+
se.error(e.message);
|
2424
2426
|
return Promise.reject(e);
|
2425
2427
|
});
|
2426
2428
|
}
|
@@ -2975,7 +2977,7 @@ class jr {
|
|
2975
2977
|
//#endregion
|
2976
2978
|
//#region 开启
|
2977
2979
|
async openAsync(i) {
|
2978
|
-
this.provider = await y.provider.
|
2980
|
+
this.provider = await y.provider.getDbAsync("user");
|
2979
2981
|
}
|
2980
2982
|
//#endregion
|
2981
2983
|
async login(i) {
|
@@ -2985,7 +2987,7 @@ class jr {
|
|
2985
2987
|
return "";
|
2986
2988
|
}
|
2987
2989
|
async getUser() {
|
2988
|
-
return await this.provider.
|
2990
|
+
return await this.provider.getEntityAsync("user", "sso");
|
2989
2991
|
}
|
2990
2992
|
getAuth(i, e, t, r = "", s = "") {
|
2991
2993
|
let l = `${this.type} ${i} ${e} ${t} ${r}`;
|
@@ -3009,7 +3011,7 @@ class $r {
|
|
3009
3011
|
//#endregion
|
3010
3012
|
//#region 开启
|
3011
3013
|
async openAsync(i) {
|
3012
|
-
this.url = i.url, this.app_id = i.app_id, this.provider = await y.provider.
|
3014
|
+
this.url = i.url, this.app_id = i.app_id, this.provider = await y.provider.getDbAsync("user");
|
3013
3015
|
}
|
3014
3016
|
//#endregion
|
3015
3017
|
async login(i) {
|
@@ -3076,7 +3078,7 @@ class Hr {
|
|
3076
3078
|
n(this, "type");
|
3077
3079
|
}
|
3078
3080
|
}
|
3079
|
-
class
|
3081
|
+
class Rr extends Hr {
|
3080
3082
|
constructor() {
|
3081
3083
|
super(...arguments);
|
3082
3084
|
//#region 属性
|
@@ -3088,7 +3090,7 @@ class Or extends Hr {
|
|
3088
3090
|
}
|
3089
3091
|
//#endregion
|
3090
3092
|
async openAsync(e) {
|
3091
|
-
this.provider = await y.provider.
|
3093
|
+
this.provider = await y.provider.getDbAsync("user");
|
3092
3094
|
}
|
3093
3095
|
async login(e) {
|
3094
3096
|
}
|
@@ -3111,7 +3113,7 @@ class Or extends Hr {
|
|
3111
3113
|
await this.provider.deleteAsync("anonymous", "anonymous");
|
3112
3114
|
}
|
3113
3115
|
}
|
3114
|
-
class
|
3116
|
+
class Or {
|
3115
3117
|
constructor() {
|
3116
3118
|
//#region 属性
|
3117
3119
|
n(this, "type", "Secret");
|
@@ -3122,7 +3124,7 @@ class Ur {
|
|
3122
3124
|
}
|
3123
3125
|
//#endregion
|
3124
3126
|
async openAsync(i) {
|
3125
|
-
this.provider = await y.provider.
|
3127
|
+
this.provider = await y.provider.getDbAsync("user");
|
3126
3128
|
}
|
3127
3129
|
async login(i) {
|
3128
3130
|
return _.post(`/user/login?type=${this.type}`, i).then(async (e) => {
|
@@ -3134,7 +3136,7 @@ class Ur {
|
|
3134
3136
|
return "";
|
3135
3137
|
}
|
3136
3138
|
async getUser() {
|
3137
|
-
return await this.provider.
|
3139
|
+
return await this.provider.getEntityAsync("user", "user");
|
3138
3140
|
}
|
3139
3141
|
getAuth(i, e, t, r) {
|
3140
3142
|
return `${this.type} ${i} ${e} ${t} pc`;
|
@@ -3143,7 +3145,7 @@ class Ur {
|
|
3143
3145
|
await this.provider.deleteAsync("user");
|
3144
3146
|
}
|
3145
3147
|
}
|
3146
|
-
class
|
3148
|
+
class Ur extends D {
|
3147
3149
|
constructor() {
|
3148
3150
|
super(...arguments);
|
3149
3151
|
n(this, "type", "Sso");
|
@@ -3153,11 +3155,11 @@ class Lr extends D {
|
|
3153
3155
|
*/
|
3154
3156
|
open() {
|
3155
3157
|
super.open(), super.register({
|
3156
|
-
Secret:
|
3158
|
+
Secret: Or,
|
3157
3159
|
Nio: $r,
|
3158
3160
|
WeiXin: Dr,
|
3159
3161
|
Bearer: jr,
|
3160
|
-
Anonymous:
|
3162
|
+
Anonymous: Rr
|
3161
3163
|
});
|
3162
3164
|
}
|
3163
3165
|
/**
|
@@ -3168,7 +3170,7 @@ class Lr extends D {
|
|
3168
3170
|
return await l.openAsync(s), l;
|
3169
3171
|
}
|
3170
3172
|
}
|
3171
|
-
class
|
3173
|
+
class Lr {
|
3172
3174
|
constructor() {
|
3173
3175
|
//#region 属性
|
3174
3176
|
n(this, "type");
|
@@ -3176,7 +3178,7 @@ class Rr {
|
|
3176
3178
|
}
|
3177
3179
|
//#endregion
|
3178
3180
|
}
|
3179
|
-
class Ir extends
|
3181
|
+
class Ir extends Lr {
|
3180
3182
|
constructor() {
|
3181
3183
|
super(...arguments);
|
3182
3184
|
//#region 属性
|
@@ -3286,9 +3288,9 @@ class Nr extends D {
|
|
3286
3288
|
super.open(), super.register({
|
3287
3289
|
Array: Vr,
|
3288
3290
|
Browser: os,
|
3289
|
-
Component:
|
3290
|
-
Dictionary:
|
3291
|
-
Dom:
|
3291
|
+
Component: qr,
|
3292
|
+
Dictionary: zr,
|
3293
|
+
Dom: Wr,
|
3292
3294
|
Event: Kr,
|
3293
3295
|
File: Jr,
|
3294
3296
|
Html: Yr,
|
@@ -3371,12 +3373,12 @@ class Nr extends D {
|
|
3371
3373
|
return super.createWithCache("sign");
|
3372
3374
|
}
|
3373
3375
|
}
|
3374
|
-
class
|
3376
|
+
class O {
|
3375
3377
|
constructor() {
|
3376
3378
|
n(this, "type");
|
3377
3379
|
}
|
3378
3380
|
}
|
3379
|
-
class Vr extends
|
3381
|
+
class Vr extends O {
|
3380
3382
|
constructor() {
|
3381
3383
|
super(...arguments);
|
3382
3384
|
n(this, "type", "array");
|
@@ -3683,7 +3685,7 @@ class Vr extends U {
|
|
3683
3685
|
}
|
3684
3686
|
//#endregion
|
3685
3687
|
}
|
3686
|
-
class
|
3688
|
+
class qr extends O {
|
3687
3689
|
constructor() {
|
3688
3690
|
super(...arguments);
|
3689
3691
|
n(this, "type", "component");
|
@@ -3725,7 +3727,7 @@ class Wr extends U {
|
|
3725
3727
|
}, 100);
|
3726
3728
|
}
|
3727
3729
|
}
|
3728
|
-
class
|
3730
|
+
class Wr extends O {
|
3729
3731
|
constructor() {
|
3730
3732
|
super(...arguments);
|
3731
3733
|
n(this, "type", "dom");
|
@@ -3969,8 +3971,8 @@ class zr extends U {
|
|
3969
3971
|
let o = {}, c = e.getBoundingClientRect(), p = s.getBoundingClientRect(), g = e.querySelector(t).getBoundingClientRect(), m = a.getBoundingClientRect(), k = p.height - g.top;
|
3970
3972
|
if (l == "right") {
|
3971
3973
|
o.left = `${c.left + c.width}px`;
|
3972
|
-
let
|
3973
|
-
m.height > p.height ?
|
3974
|
+
let R;
|
3975
|
+
m.height > p.height ? R = p.height : R = m.height, o.height = `${R}px`, R + g.top > p.height ? (o.top = "initial", o.bottom = "0px") : o.top = `${c.top}px`;
|
3974
3976
|
} else if (l == "bottom")
|
3975
3977
|
k -= g.height, o.left = `${c.left}px`, o.top = `${c.top + c.height}px`, k < m.height ? o.height = `${k}px` : o.height = `${m.height}px`;
|
3976
3978
|
else
|
@@ -4051,7 +4053,7 @@ class zr extends U {
|
|
4051
4053
|
}
|
4052
4054
|
//#endregion
|
4053
4055
|
}
|
4054
|
-
class
|
4056
|
+
class zr extends O {
|
4055
4057
|
constructor() {
|
4056
4058
|
super(...arguments);
|
4057
4059
|
n(this, "type", "dictionary");
|
@@ -4128,7 +4130,7 @@ class qr extends U {
|
|
4128
4130
|
}
|
4129
4131
|
//#endregion
|
4130
4132
|
}
|
4131
|
-
class Kr extends
|
4133
|
+
class Kr extends O {
|
4132
4134
|
constructor() {
|
4133
4135
|
super(...arguments);
|
4134
4136
|
n(this, "type", "event");
|
@@ -4174,7 +4176,7 @@ class Kr extends U {
|
|
4174
4176
|
});
|
4175
4177
|
}
|
4176
4178
|
}
|
4177
|
-
class Jr extends
|
4179
|
+
class Jr extends O {
|
4178
4180
|
constructor() {
|
4179
4181
|
super(...arguments);
|
4180
4182
|
n(this, "type", "file");
|
@@ -4211,7 +4213,7 @@ class Jr extends U {
|
|
4211
4213
|
});
|
4212
4214
|
}
|
4213
4215
|
}
|
4214
|
-
class Yr extends
|
4216
|
+
class Yr extends O {
|
4215
4217
|
constructor() {
|
4216
4218
|
super(...arguments);
|
4217
4219
|
n(this, "type", "html");
|
@@ -4232,7 +4234,7 @@ class Yr extends U {
|
|
4232
4234
|
});
|
4233
4235
|
}
|
4234
4236
|
}
|
4235
|
-
class Qr extends
|
4237
|
+
class Qr extends O {
|
4236
4238
|
constructor() {
|
4237
4239
|
super(...arguments);
|
4238
4240
|
n(this, "type", "image");
|
@@ -4242,7 +4244,7 @@ class Qr extends U {
|
|
4242
4244
|
n(this, "base64", (e) => "data:image/png;base64," + e);
|
4243
4245
|
}
|
4244
4246
|
}
|
4245
|
-
class Xr extends
|
4247
|
+
class Xr extends O {
|
4246
4248
|
constructor() {
|
4247
4249
|
super(...arguments);
|
4248
4250
|
n(this, "type", "math");
|
@@ -4340,7 +4342,7 @@ class Xr extends U {
|
|
4340
4342
|
return e;
|
4341
4343
|
}
|
4342
4344
|
}
|
4343
|
-
class Gr extends
|
4345
|
+
class Gr extends O {
|
4344
4346
|
constructor() {
|
4345
4347
|
super(...arguments);
|
4346
4348
|
n(this, "type", "micro");
|
@@ -4351,7 +4353,7 @@ class Gr extends U {
|
|
4351
4353
|
});
|
4352
4354
|
}
|
4353
4355
|
}
|
4354
|
-
class Zr extends
|
4356
|
+
class Zr extends O {
|
4355
4357
|
constructor() {
|
4356
4358
|
super(...arguments);
|
4357
4359
|
n(this, "type", "mount");
|
@@ -4373,7 +4375,7 @@ class Zr extends U {
|
|
4373
4375
|
});
|
4374
4376
|
}
|
4375
4377
|
}
|
4376
|
-
class es extends
|
4378
|
+
class es extends O {
|
4377
4379
|
constructor() {
|
4378
4380
|
super(...arguments);
|
4379
4381
|
n(this, "type", "object");
|
@@ -4536,7 +4538,7 @@ class es extends U {
|
|
4536
4538
|
}
|
4537
4539
|
//#endregion
|
4538
4540
|
}
|
4539
|
-
class ts extends
|
4541
|
+
class ts extends O {
|
4540
4542
|
constructor() {
|
4541
4543
|
super(...arguments);
|
4542
4544
|
n(this, "type", "string");
|
@@ -4746,7 +4748,7 @@ class ts extends U {
|
|
4746
4748
|
}
|
4747
4749
|
//#endregion
|
4748
4750
|
}
|
4749
|
-
class rs extends
|
4751
|
+
class rs extends O {
|
4750
4752
|
constructor() {
|
4751
4753
|
super(...arguments);
|
4752
4754
|
n(this, "type", "task");
|
@@ -4804,75 +4806,79 @@ class Hl {
|
|
4804
4806
|
n(this, "value");
|
4805
4807
|
}
|
4806
4808
|
}
|
4807
|
-
class ss extends
|
4809
|
+
class ss extends O {
|
4808
4810
|
constructor() {
|
4809
4811
|
super(...arguments);
|
4810
4812
|
n(this, "type", "time");
|
4813
|
+
//#region 获取时间
|
4811
4814
|
/**
|
4812
4815
|
* 获取相对于1970年1月1日的时间戳(ms),不同时区结果相同
|
4813
4816
|
*/
|
4814
|
-
n(this, "getTimestamp", (e = null) => (e
|
4817
|
+
n(this, "getTimestamp", (e = null) => this.getTime(e).getTime());
|
4815
4818
|
/**
|
4816
4819
|
* 根据字符串获取可对比的时间
|
4817
4820
|
*/
|
4818
4821
|
n(this, "getTime", (e = null) => e == null ? /* @__PURE__ */ new Date() : new Date(e));
|
4822
|
+
//#endregion
|
4819
4823
|
//#region 格式化
|
4820
|
-
/**
|
4821
|
-
* 格式化时间
|
4822
|
-
*/
|
4823
|
-
n(this, "format", (e, t) => Y(e).format(t));
|
4824
4824
|
/**
|
4825
4825
|
* 对时间值进行时间格式化
|
4826
4826
|
*/
|
4827
|
-
n(this, "
|
4827
|
+
n(this, "formatMillisecondTime", (e = null) => this.format(e, "YYYY-MM-DD HH:mm:ss SSS"));
|
4828
4828
|
/**
|
4829
4829
|
* 对时间值进行时间格式化
|
4830
4830
|
*/
|
4831
|
-
n(this, "
|
4831
|
+
n(this, "formatSecondTime", (e = null) => this.format(e, "YYYY-MM-DD HH:mm:ss"));
|
4832
4832
|
/**
|
4833
4833
|
* 格式化成24小时时间格式
|
4834
4834
|
*/
|
4835
|
-
n(this, "formatTime", (e) =>
|
4835
|
+
n(this, "formatTime", (e = null) => this.format(e, "HH:mm:ss SSS"));
|
4836
4836
|
/**
|
4837
4837
|
* 对时间值进行日期格式化
|
4838
4838
|
*/
|
4839
|
-
n(this, "formatDate", (e) =>
|
4839
|
+
n(this, "formatDate", (e = null) => this.format(e, "YYYY-MM-DD"));
|
4840
4840
|
/**
|
4841
4841
|
* 格式化时间 YYYY-MM-DD HH:mm:ss
|
4842
4842
|
*/
|
4843
|
-
n(this, "formatDateTime", (e) =>
|
4844
|
-
//#endregion
|
4843
|
+
n(this, "formatDateTime", (e = null) => this.format(e, "YYYY-MM-DD HH:mm:ss"));
|
4845
4844
|
/**
|
4846
|
-
*
|
4845
|
+
* 格式化时间
|
4847
4846
|
*/
|
4848
|
-
n(this, "
|
4847
|
+
n(this, "format", (e, t) => fe(e ?? /* @__PURE__ */ new Date()).format(t));
|
4848
|
+
//#endregion
|
4849
|
+
//#region 时间修改
|
4849
4850
|
/**
|
4850
|
-
*
|
4851
|
+
* 添加小时
|
4851
4852
|
*/
|
4852
|
-
n(this, "
|
4853
|
+
n(this, "addHours", (e, t) => this.add(e, t, "hours"));
|
4853
4854
|
/**
|
4854
|
-
*
|
4855
|
+
* 添加天数
|
4855
4856
|
*/
|
4856
|
-
n(this, "
|
4857
|
+
n(this, "addDays", (e, t) => this.add(e, t, "days"));
|
4857
4858
|
/**
|
4858
4859
|
* 添加天数
|
4859
4860
|
*/
|
4860
|
-
n(this, "
|
4861
|
+
n(this, "addWeeks", (e, t) => this.add(e, t, "weeks"));
|
4861
4862
|
/**
|
4862
4863
|
* 添加月份
|
4863
4864
|
*/
|
4864
|
-
n(this, "addMonths", (e, t) =>
|
4865
|
+
n(this, "addMonths", (e, t) => this.add(e, t, "months"));
|
4865
4866
|
/**
|
4866
|
-
*
|
4867
|
+
* 添加年份
|
4868
|
+
*/
|
4869
|
+
n(this, "addYears", (e, t) => this.add(e, t, "years"));
|
4870
|
+
/**
|
4871
|
+
* 添加时间
|
4867
4872
|
*/
|
4868
|
-
n(this, "
|
4873
|
+
n(this, "add", (e, t, r) => e == null ? null : fe(e).add(t, r).toDate());
|
4874
|
+
//#endregion
|
4869
4875
|
/**
|
4870
4876
|
* 判断指定时间是否是周末
|
4871
4877
|
*/
|
4872
4878
|
n(this, "isWeekend", (e) => {
|
4873
4879
|
if (!e)
|
4874
4880
|
return !1;
|
4875
|
-
let t =
|
4881
|
+
let t = fe(e).format("d");
|
4876
4882
|
return t == "6" || t == "0";
|
4877
4883
|
});
|
4878
4884
|
/**
|
@@ -4882,11 +4888,11 @@ class ss extends U {
|
|
4882
4888
|
if (!e)
|
4883
4889
|
return null;
|
4884
4890
|
let r = (/* @__PURE__ */ new Date()).getTimezoneOffset() + 480;
|
4885
|
-
return
|
4891
|
+
return fe(e).add(r, "minutes").toDate();
|
4886
4892
|
});
|
4887
4893
|
}
|
4888
4894
|
}
|
4889
|
-
class ls extends
|
4895
|
+
class ls extends O {
|
4890
4896
|
constructor() {
|
4891
4897
|
super(...arguments);
|
4892
4898
|
n(this, "type", "tree");
|
@@ -5063,7 +5069,7 @@ function _e(u, i, e) {
|
|
5063
5069
|
}
|
5064
5070
|
return e;
|
5065
5071
|
}
|
5066
|
-
class ns extends
|
5072
|
+
class ns extends O {
|
5067
5073
|
constructor() {
|
5068
5074
|
super(...arguments);
|
5069
5075
|
n(this, "type", "scroll");
|
@@ -5094,7 +5100,7 @@ class is {
|
|
5094
5100
|
n(this, "beautify", !1);
|
5095
5101
|
}
|
5096
5102
|
}
|
5097
|
-
class as extends
|
5103
|
+
class as extends O {
|
5098
5104
|
constructor() {
|
5099
5105
|
super(...arguments);
|
5100
5106
|
n(this, "type", "json");
|
@@ -5232,7 +5238,7 @@ class as extends U {
|
|
5232
5238
|
let o = e[a], c = s(o);
|
5233
5239
|
c.type == "array" ? (c.remark && (l += this.fillSpace(2 * r) + "//" + c.remark + `
|
5234
5240
|
`), l += this.fillKey(2 * r, c.key) + "[", l += this.buildObjectLevel(o[t], t, r + 1, s), l += "]", a != e.length - 1 && (l += ",")) : c.type == "object" ? (c.remark && (l += this.fillSpace(2 * r) + "//" + c.remark + `
|
5235
|
-
`), l += this.fillKey(2 * r, c.key), l += this.buildObjectLevel(o[t], t, r + 1, s), a != e.length - 1 && (l += ",")) : (l += this.fillKey(2 * r, c.key), c.type == "string" ? l += '""' : c.type == "date" ? l += `"${d.time.
|
5241
|
+
`), l += this.fillKey(2 * r, c.key), l += this.buildObjectLevel(o[t], t, r + 1, s), a != e.length - 1 && (l += ",")) : (l += this.fillKey(2 * r, c.key), c.type == "string" ? l += '""' : c.type == "date" ? l += `"${d.time.formatSecondTime()}"` : c.type == "int" || c.type == "number" ? l += "0" : c.type == "boolean" ? l += "false" : l += null, a != e.length - 1 && (l += ","), c.remark && (l += " //" + c.remark)), l += `
|
5236
5242
|
`;
|
5237
5243
|
}
|
5238
5244
|
return l += this.fillSpace(2 * (r - 1)), l += "}", l;
|
@@ -5255,7 +5261,7 @@ class as extends U {
|
|
5255
5261
|
}
|
5256
5262
|
//#endregion
|
5257
5263
|
}
|
5258
|
-
class os extends
|
5264
|
+
class os extends O {
|
5259
5265
|
constructor() {
|
5260
5266
|
super(...arguments);
|
5261
5267
|
n(this, "type", "browser");
|
@@ -5267,7 +5273,7 @@ class os extends U {
|
|
5267
5273
|
return navigator.language == "zh-CN" ? "zh-cn" : "en";
|
5268
5274
|
}
|
5269
5275
|
}
|
5270
|
-
class us extends
|
5276
|
+
class us extends O {
|
5271
5277
|
constructor() {
|
5272
5278
|
super(...arguments);
|
5273
5279
|
n(this, "type", "url");
|
@@ -5481,7 +5487,7 @@ class us extends U {
|
|
5481
5487
|
}
|
5482
5488
|
//#endregion
|
5483
5489
|
}
|
5484
|
-
class cs extends
|
5490
|
+
class cs extends O {
|
5485
5491
|
constructor() {
|
5486
5492
|
super(...arguments);
|
5487
5493
|
n(this, "type", "sign");
|
@@ -5523,7 +5529,7 @@ class ds extends nt {
|
|
5523
5529
|
n(this, "affix");
|
5524
5530
|
}
|
5525
5531
|
}
|
5526
|
-
class
|
5532
|
+
class Rl extends nt {
|
5527
5533
|
constructor(e, t, r, s) {
|
5528
5534
|
super(e, t);
|
5529
5535
|
n(this, "width");
|
@@ -5531,12 +5537,12 @@ class Ol extends nt {
|
|
5531
5537
|
this.width = r, this.height = s;
|
5532
5538
|
}
|
5533
5539
|
}
|
5534
|
-
class
|
5540
|
+
class le {
|
5535
5541
|
constructor() {
|
5536
5542
|
n(this, "type");
|
5537
5543
|
}
|
5538
5544
|
}
|
5539
|
-
class $e extends
|
5545
|
+
class $e extends le {
|
5540
5546
|
constructor() {
|
5541
5547
|
super();
|
5542
5548
|
//#region 大小调整
|
@@ -5679,7 +5685,7 @@ class $e extends ne {
|
|
5679
5685
|
}
|
5680
5686
|
//#endregion
|
5681
5687
|
}
|
5682
|
-
class ps extends
|
5688
|
+
class ps extends le {
|
5683
5689
|
constructor() {
|
5684
5690
|
super(...arguments);
|
5685
5691
|
n(this, "events", {});
|
@@ -5802,14 +5808,14 @@ class ps extends ne {
|
|
5802
5808
|
clearTimeout(this.timer);
|
5803
5809
|
}
|
5804
5810
|
}
|
5805
|
-
class hs extends
|
5811
|
+
class hs extends le {
|
5806
5812
|
/**
|
5807
5813
|
* 对比数据变动
|
5808
5814
|
*/
|
5809
5815
|
delta(i, e, t, r) {
|
5810
5816
|
}
|
5811
5817
|
}
|
5812
|
-
class gs extends
|
5818
|
+
class gs extends le {
|
5813
5819
|
/**
|
5814
5820
|
* 初始化,并绑定自动关闭上下文菜单事件
|
5815
5821
|
*/
|
@@ -5849,7 +5855,7 @@ class gs extends ne {
|
|
5849
5855
|
}
|
5850
5856
|
}
|
5851
5857
|
}
|
5852
|
-
class fs extends
|
5858
|
+
class fs extends le {
|
5853
5859
|
constructor() {
|
5854
5860
|
super(...arguments);
|
5855
5861
|
//#region 属性
|
@@ -5907,7 +5913,7 @@ class fs extends ne {
|
|
5907
5913
|
return this.current != null && this.history.push(e), this.current = this.history.length, e;
|
5908
5914
|
}
|
5909
5915
|
}
|
5910
|
-
const
|
5916
|
+
const ne = class ne extends le {
|
5911
5917
|
constructor() {
|
5912
5918
|
super(...arguments);
|
5913
5919
|
/**
|
@@ -5946,16 +5952,16 @@ const ae = class ae extends ne {
|
|
5946
5952
|
*/
|
5947
5953
|
async openAsync(e, t, r) {
|
5948
5954
|
this.kind = e, this.task = y.task.create("Memory");
|
5949
|
-
let s =
|
5950
|
-
s == null && (s = [],
|
5951
|
-
let l = await y.provider.
|
5955
|
+
let s = ne.opened[e];
|
5956
|
+
s == null && (s = [], ne.opened[e] = s);
|
5957
|
+
let l = await y.provider.getDbAsync(e);
|
5952
5958
|
this.key = t;
|
5953
5959
|
let a = await l.getAsync(e, this.key);
|
5954
5960
|
if (a == null) {
|
5955
5961
|
let c = (await l.getKeysAsync(e)).filter((p) => isNaN(p) && !s.includes(p));
|
5956
5962
|
c.length > 0 && (this.oldKey = c[0], a = await l.replaceEntityAsync(e, this.oldKey, this.key));
|
5957
5963
|
}
|
5958
|
-
return s.includes(this.key) || s.push(this.key), a != null && d.object.mergeTo(r, a),
|
5964
|
+
return s.includes(this.key) || s.push(this.key), a != null && d.object.mergeTo(r, a), z(() => JSON.stringify(r), (o, c) => {
|
5959
5965
|
l != null && this.task.debounce(async () => {
|
5960
5966
|
let p = JSON.parse(o), h = JSON.parse(c);
|
5961
5967
|
this.form = p, await this.saveAsync(p), this.handler != null && await this.handler(p, h);
|
@@ -5983,7 +5989,7 @@ const ae = class ae extends ne {
|
|
5983
5989
|
*/
|
5984
5990
|
async dispose(e = !1) {
|
5985
5991
|
this.task = null;
|
5986
|
-
let t =
|
5992
|
+
let t = ne.opened[this.kind], r = t.indexOf(this.key);
|
5987
5993
|
if (t.splice(r, 1), this.oldKey != null) {
|
5988
5994
|
let s = `/config/delete?kind=${this.kind}&type=${this.oldKey}`;
|
5989
5995
|
await _.post(s);
|
@@ -6004,9 +6010,9 @@ const ae = class ae extends ne {
|
|
6004
6010
|
* 已开启窗口
|
6005
6011
|
* 使用静态对象记录各自工具类开启的窗口,保证同一个kind工具类,被窗口多开时,能够杜绝异步方法导致的变量不一致问题
|
6006
6012
|
*/
|
6007
|
-
n(
|
6008
|
-
let Ce =
|
6009
|
-
class ys extends
|
6013
|
+
n(ne, "opened", {});
|
6014
|
+
let Ce = ne;
|
6015
|
+
class ys extends le {
|
6010
6016
|
/**
|
6011
6017
|
* 初始化
|
6012
6018
|
*/
|
@@ -6062,7 +6068,7 @@ class ms extends D {
|
|
6062
6068
|
return new Ce();
|
6063
6069
|
}
|
6064
6070
|
}
|
6065
|
-
class
|
6071
|
+
class Ol extends D {
|
6066
6072
|
constructor() {
|
6067
6073
|
super(...arguments);
|
6068
6074
|
n(this, "type", "Video");
|
@@ -6111,7 +6117,7 @@ class bs extends it {
|
|
6111
6117
|
return "";
|
6112
6118
|
}
|
6113
6119
|
}
|
6114
|
-
class
|
6120
|
+
class Ul extends D {
|
6115
6121
|
constructor() {
|
6116
6122
|
super(...arguments);
|
6117
6123
|
n(this, "type", "Voice");
|
@@ -6123,13 +6129,13 @@ class Ll extends D {
|
|
6123
6129
|
});
|
6124
6130
|
}
|
6125
6131
|
}
|
6126
|
-
let ws = {},
|
6127
|
-
let e = await (await y.provider.
|
6128
|
-
(e == null ? void 0 : e.cdn) != null && (u.cdn = e.cdn),
|
6132
|
+
let ws = {}, te = {}, _ = {}, Be = {}, at = {}, De = {}, ks = {}, se = {}, xs = async (u) => {
|
6133
|
+
let e = await (await y.provider.getDbAsync("sys")).getAsync("sys", "app");
|
6134
|
+
(e == null ? void 0 : e.cdn) != null && (u.cdn = e.cdn), te = await y.cdn.createWithCacheAsync(u.cdn), ws = await y.encoder.getBase64(), _ = y.http.halo, De = y.socket.default, Be = await y.i18n.createWithCacheAsync("Default", async (t) => {
|
6129
6135
|
let r = (e == null ? void 0 : e.language) ?? d.browser.getLanguage(), s = d.json.serialize({ lang: r });
|
6130
|
-
await t.openAsync(s),
|
6131
|
-
}), Be.addMessages(u.lang), at = await y.hasher.getMd5Async(), ks = y.template.create("Liquid"), u.messenger == null ?
|
6132
|
-
},
|
6136
|
+
await t.openAsync(s), de = t.t, As = t.t_exists, Ss = t.t_sys, _s = t.t_enum, Cs = t.t_field, Ts = t.t_field_choose_placeholder, Es = t.t_field_placeholder, js = t.t_table, $s = t.t_module, Ds = t.t_menu;
|
6137
|
+
}), Be.addMessages(u.lang), at = await y.hasher.getMd5Async(), ks = y.template.create("Liquid"), u.messenger == null ? se = await y.messenger.getConsole() : se = u.messenger;
|
6138
|
+
}, de = {}, As = {}, Ss = {}, _s = {}, Cs = {}, Ts = {}, Es = {}, js = {}, $s = {}, Ds = {};
|
6133
6139
|
class Hs {
|
6134
6140
|
constructor() {
|
6135
6141
|
/**
|
@@ -6154,29 +6160,29 @@ class Hs {
|
|
6154
6160
|
n(this, "cdn", "Local");
|
6155
6161
|
}
|
6156
6162
|
}
|
6157
|
-
const
|
6163
|
+
const Rs = { class: "ha-empty" }, Os = { class: "empty-message" }, Us = {
|
6158
6164
|
key: 0,
|
6159
6165
|
class: "empty-content"
|
6160
|
-
},
|
6166
|
+
}, Ll = /* @__PURE__ */ P({
|
6161
6167
|
__name: "Empty",
|
6162
6168
|
props: {
|
6163
6169
|
message: { type: String, default: "暂无数据" },
|
6164
6170
|
hasData: Boolean
|
6165
6171
|
},
|
6166
6172
|
setup(u) {
|
6167
|
-
let i = u, { message: e, hasData: t } =
|
6168
|
-
return (r, s) => (S(), C("div",
|
6169
|
-
T("div",
|
6170
|
-
f(t) ? (S(), C("div",
|
6171
|
-
|
6172
|
-
])) :
|
6173
|
+
let i = u, { message: e, hasData: t } = q(i);
|
6174
|
+
return (r, s) => (S(), C("div", Rs, [
|
6175
|
+
T("div", Os, N(f(e)), 1),
|
6176
|
+
f(t) ? (S(), C("div", Us, [
|
6177
|
+
Q(r.$slots, "default")
|
6178
|
+
])) : ce("", !0)
|
6173
6179
|
]));
|
6174
6180
|
}
|
6175
|
-
}),
|
6181
|
+
}), Ls = /* @__PURE__ */ P({
|
6176
6182
|
__name: "Fill",
|
6177
6183
|
emits: ["resize"],
|
6178
6184
|
setup(u, { emit: i }) {
|
6179
|
-
let e = i, t =
|
6185
|
+
let e = i, t = H(), r = H(), s = H(), l = new $e(), a = () => {
|
6180
6186
|
let p = d.dom.siblings(t.value);
|
6181
6187
|
s.value = d.dom.getHeight(p);
|
6182
6188
|
}, o = () => {
|
@@ -6184,17 +6190,17 @@ const Os = { class: "ha-empty" }, Us = { class: "empty-message" }, Ls = {
|
|
6184
6190
|
}, c = () => {
|
6185
6191
|
o();
|
6186
6192
|
};
|
6187
|
-
return
|
6193
|
+
return ie(() => {
|
6188
6194
|
a(), o(), l.resize(t.value, c);
|
6189
|
-
}),
|
6195
|
+
}), ae(() => {
|
6190
6196
|
l.dispose();
|
6191
6197
|
}), (p, h) => (S(), C("div", {
|
6192
6198
|
class: "ha-fill",
|
6193
6199
|
ref_key: "fillRef",
|
6194
6200
|
ref: t,
|
6195
|
-
style:
|
6201
|
+
style: ee({ height: `calc(100% - ${f(s)}px)` })
|
6196
6202
|
}, [
|
6197
|
-
|
6203
|
+
Q(p.$slots, "default")
|
6198
6204
|
], 4));
|
6199
6205
|
}
|
6200
6206
|
}), Is = /* @__PURE__ */ P({
|
@@ -6204,7 +6210,7 @@ const Os = { class: "ha-empty" }, Us = { class: "empty-message" }, Ls = {
|
|
6204
6210
|
},
|
6205
6211
|
emits: ["scroll"],
|
6206
6212
|
setup(u, { expose: i, emit: e }) {
|
6207
|
-
let t = e, r = u, { options: s } =
|
6213
|
+
let t = e, r = u, { options: s } = q(r), l = H(), a = H(), o = H(), c = H(), p = H(!1), h = null, g = null, m = new $e(), k = H({ top: null, height: null }), R = (b) => {
|
6208
6214
|
if (g == 0)
|
6209
6215
|
return 0;
|
6210
6216
|
let w = g - h;
|
@@ -6221,23 +6227,23 @@ const Os = { class: "ha-empty" }, Us = { class: "empty-message" }, Ls = {
|
|
6221
6227
|
let w = h * b;
|
6222
6228
|
return d.math.between(w, 80, 500);
|
6223
6229
|
}, J = (b, w) => {
|
6224
|
-
let E =
|
6230
|
+
let E = R(b), V = (h - w) * E;
|
6225
6231
|
return d.math.between(V, 0, h - w);
|
6226
6232
|
}, j = (b) => {
|
6227
6233
|
let w = K();
|
6228
6234
|
return { top: J(b, w), height: w };
|
6229
6235
|
}, F = (b) => {
|
6230
6236
|
}, A = (b) => {
|
6231
|
-
let w =
|
6232
|
-
|
6233
|
-
},
|
6237
|
+
let w = R(b);
|
6238
|
+
L(w);
|
6239
|
+
}, L = (b) => {
|
6234
6240
|
let w = d.math.between(b, 0, 1), E = h - k.value.height;
|
6235
6241
|
k.value.top = E * w;
|
6236
|
-
let
|
6237
|
-
s.value.scrollTop =
|
6238
|
-
},
|
6239
|
-
let w = b.target, E =
|
6240
|
-
|
6242
|
+
let W = (g - h) * w;
|
6243
|
+
s.value.scrollTop = W, a.value.scrollTop != W && (a.value.scrollTop = W);
|
6244
|
+
}, Y = (b) => {
|
6245
|
+
let w = b.target, E = R(w.scrollTop);
|
6246
|
+
L(E), t("scroll", w);
|
6241
6247
|
}, v = () => {
|
6242
6248
|
let b = s.value.scrollTop;
|
6243
6249
|
k.value = j(b), A(b);
|
@@ -6249,31 +6255,31 @@ const Os = { class: "ha-empty" }, Us = { class: "empty-message" }, Ls = {
|
|
6249
6255
|
let w = b.target;
|
6250
6256
|
return parseInt(w.style.top);
|
6251
6257
|
}, B = (b, w, E, V) => {
|
6252
|
-
let
|
6253
|
-
|
6258
|
+
let W = b.y - w.y, he = E + W, G = M(he);
|
6259
|
+
L(G);
|
6254
6260
|
}, I = (b) => {
|
6255
6261
|
p.value = !0;
|
6256
|
-
},
|
6262
|
+
}, U = (b) => {
|
6257
6263
|
p.value = !1;
|
6258
6264
|
};
|
6259
|
-
return
|
6260
|
-
v(), m.scroll(a.value,
|
6261
|
-
}),
|
6265
|
+
return ie(() => {
|
6266
|
+
v(), m.scroll(a.value, Y), m.drag(c.value, { init: $, handler: B }), m.observe(a.value, x), m.mouseDown(c.value, I, U);
|
6267
|
+
}), ae(() => {
|
6262
6268
|
m.dispose();
|
6263
|
-
}),
|
6264
|
-
let E =
|
6265
|
-
|
6269
|
+
}), z(() => s.value.scrollTop, (b, w) => {
|
6270
|
+
let E = R(b);
|
6271
|
+
L(E);
|
6266
6272
|
}), i({ scrollTo: A, update: v }), (b, w) => (S(), C("div", {
|
6267
6273
|
ref_key: "scrollerRef",
|
6268
6274
|
ref: l,
|
6269
|
-
class:
|
6275
|
+
class: oe(["ha-scroller", { hover: f(p) }])
|
6270
6276
|
}, [
|
6271
6277
|
T("div", {
|
6272
6278
|
ref_key: "containerRef",
|
6273
6279
|
ref: a,
|
6274
6280
|
class: "scroller-container"
|
6275
6281
|
}, [
|
6276
|
-
|
6282
|
+
Q(b.$slots, "default")
|
6277
6283
|
], 512),
|
6278
6284
|
T("div", {
|
6279
6285
|
ref_key: "trackRef",
|
@@ -6286,7 +6292,7 @@ const Os = { class: "ha-empty" }, Us = { class: "empty-message" }, Ls = {
|
|
6286
6292
|
ref_key: "thumbRef",
|
6287
6293
|
ref: c,
|
6288
6294
|
class: "scroller-thumb",
|
6289
|
-
style:
|
6295
|
+
style: ee({ top: `${f(k).top}px`, height: `${f(k).height}px` })
|
6290
6296
|
}, N(f(s).scrollTop), 5)
|
6291
6297
|
], 512)
|
6292
6298
|
], 2));
|
@@ -6295,7 +6301,7 @@ const Os = { class: "ha-empty" }, Us = { class: "empty-message" }, Ls = {
|
|
6295
6301
|
__name: "Timer",
|
6296
6302
|
emits: ["change"],
|
6297
6303
|
setup(u, { expose: i, emit: e }) {
|
6298
|
-
let t = e, r = -8 * 60 * 60 * 1e3, s =
|
6304
|
+
let t = e, r = -8 * 60 * 60 * 1e3, s = H(r), l = null, a = 5, o = () => {
|
6299
6305
|
l == null && (l = setInterval(() => {
|
6300
6306
|
s.value += a, t("change", s.value);
|
6301
6307
|
}, a));
|
@@ -6306,14 +6312,14 @@ const Os = { class: "ha-empty" }, Us = { class: "empty-message" }, Ls = {
|
|
6306
6312
|
}, h = () => {
|
6307
6313
|
clearInterval(l), s.value = r;
|
6308
6314
|
};
|
6309
|
-
return
|
6315
|
+
return ae(() => {
|
6310
6316
|
clearInterval(l);
|
6311
6317
|
}), i({ restart: c, start: o, stop: p, reset: h }), (g, m) => (S(), C("span", null, [
|
6312
|
-
|
6318
|
+
Q(g.$slots, "default"),
|
6313
6319
|
me(N(f(d).time.format(f(s), "HH:mm:ss SSS")), 1)
|
6314
6320
|
]));
|
6315
6321
|
}
|
6316
|
-
}),
|
6322
|
+
}), pe = (u, i) => {
|
6317
6323
|
const e = u.__vccOpts || u;
|
6318
6324
|
for (const [t, r] of i)
|
6319
6325
|
e[t] = r;
|
@@ -6321,10 +6327,10 @@ const Os = { class: "ha-empty" }, Us = { class: "empty-message" }, Ls = {
|
|
6321
6327
|
}, Ms = {}, Bs = { class: "ha-card" };
|
6322
6328
|
function Ps(u, i) {
|
6323
6329
|
return S(), C("div", Bs, [
|
6324
|
-
|
6330
|
+
Q(u.$slots, "default")
|
6325
6331
|
]);
|
6326
6332
|
}
|
6327
|
-
const Pe = /* @__PURE__ */
|
6333
|
+
const Pe = /* @__PURE__ */ pe(Ms, [["render", Ps]]), Ml = /* @__PURE__ */ P({
|
6328
6334
|
__name: "Code",
|
6329
6335
|
props: {
|
6330
6336
|
options: { default: {} },
|
@@ -6333,30 +6339,30 @@ const Pe = /* @__PURE__ */ he(Ms, [["render", Ps]]), Ml = /* @__PURE__ */ P({
|
|
6333
6339
|
},
|
6334
6340
|
emits: ["mounted", "change", "scroll", "update:modelValue"],
|
6335
6341
|
setup(u, { expose: i, emit: e }) {
|
6336
|
-
let t = e, r = u, { options: s, border: l, modelValue: a } =
|
6342
|
+
let t = e, r = u, { options: s, border: l, modelValue: a } = q(r), o = null, c = null, p = null, h = { completion: null, hover: null }, g = H(), { app: m } = Z.sys, k = (v, x) => {
|
6337
6343
|
h.completion != null && h.completion.dispose();
|
6338
6344
|
let $ = d.array.distinct(x, (B) => B);
|
6339
|
-
h.completion =
|
6340
|
-
},
|
6345
|
+
h.completion = R(v, $);
|
6346
|
+
}, R = (v, x) => v == null || o == null ? null : o.languages.registerCompletionItemProvider(v, {
|
6341
6347
|
provideCompletionItems: (B, I) => {
|
6342
|
-
let
|
6348
|
+
let U = B.getWordUntilPosition(I), b = new o.Range(I.lineNumber, U.startColumn, I.lineNumber, U.endColumn), w = [];
|
6343
6349
|
for (let E = 0; E < x.length; E++) {
|
6344
|
-
let V = x[E],
|
6350
|
+
let V = x[E], W = {
|
6345
6351
|
label: V,
|
6346
6352
|
kind: o.languages.CompletionItemKind.Keyword,
|
6347
6353
|
insertText: V,
|
6348
6354
|
detail: V,
|
6349
6355
|
range: b
|
6350
6356
|
};
|
6351
|
-
w.push(
|
6357
|
+
w.push(W);
|
6352
6358
|
}
|
6353
6359
|
return { suggestions: w };
|
6354
6360
|
}
|
6355
6361
|
}), M = async (v) => {
|
6356
|
-
let x =
|
6362
|
+
let x = Z.editor.intelli;
|
6357
6363
|
if (x[v] != null)
|
6358
6364
|
return;
|
6359
|
-
let $ = o.languages.getLanguages().find((
|
6365
|
+
let $ = o.languages.getLanguages().find((U) => U.id == v);
|
6360
6366
|
if ($ == null)
|
6361
6367
|
return;
|
6362
6368
|
let B = $.loader;
|
@@ -6367,22 +6373,22 @@ const Pe = /* @__PURE__ */ he(Ms, [["render", Ps]]), Ml = /* @__PURE__ */ P({
|
|
6367
6373
|
}, K = (v, x) => {
|
6368
6374
|
const $ = ["builtinFunctions", "keywords", "operators"];
|
6369
6375
|
return o.languages.registerCompletionItemProvider(v, {
|
6370
|
-
provideCompletionItems: (I,
|
6371
|
-
let b = I.getWordUntilPosition(
|
6376
|
+
provideCompletionItems: (I, U) => {
|
6377
|
+
let b = I.getWordUntilPosition(U), w = new o.Range(U.lineNumber, b.startColumn, U.lineNumber, b.endColumn), E = [];
|
6372
6378
|
for (let V of $) {
|
6373
|
-
let
|
6374
|
-
if (
|
6379
|
+
let W = x.language[V];
|
6380
|
+
if (W == null)
|
6375
6381
|
continue;
|
6376
|
-
let
|
6377
|
-
V == "keywords" ? (
|
6378
|
-
for (let He of
|
6379
|
-
let
|
6380
|
-
label:
|
6382
|
+
let he = j(V), G, ge;
|
6383
|
+
V == "keywords" ? (G = o.languages.CompletionItemKind.Keyword, ge = " ") : V == "operators" ? (G = o.languages.CompletionItemKind.Operator, ge = " ") : (G = o.languages.CompletionItemKind.Function, ge = "()");
|
6384
|
+
for (let He of W) {
|
6385
|
+
let Re = He.toLowerCase(), ot = {
|
6386
|
+
label: Re,
|
6381
6387
|
documentation: He,
|
6382
6388
|
range: w,
|
6383
|
-
kind:
|
6384
|
-
insertText:
|
6385
|
-
detail:
|
6389
|
+
kind: G,
|
6390
|
+
insertText: Re + ge,
|
6391
|
+
detail: he
|
6386
6392
|
};
|
6387
6393
|
E.push(ot);
|
6388
6394
|
}
|
@@ -6393,20 +6399,20 @@ const Pe = /* @__PURE__ */ he(Ms, [["render", Ps]]), Ml = /* @__PURE__ */ P({
|
|
6393
6399
|
}, J = (v, x) => {
|
6394
6400
|
const $ = ["builtinFunctions", "keywords", "operators"];
|
6395
6401
|
return o.languages.registerHoverProvider(v, {
|
6396
|
-
provideHover: (I,
|
6397
|
-
let b = I.getWordAtPosition(
|
6402
|
+
provideHover: (I, U) => {
|
6403
|
+
let b = I.getWordAtPosition(U);
|
6398
6404
|
if (!b)
|
6399
6405
|
return null;
|
6400
6406
|
for (let w of $) {
|
6401
6407
|
let E = x.language[w];
|
6402
|
-
if (E == null || E.find((
|
6408
|
+
if (E == null || E.find((G) => G == b.word.toUpperCase()) == null)
|
6403
6409
|
continue;
|
6404
|
-
let
|
6410
|
+
let W = j(w);
|
6405
6411
|
return {
|
6406
|
-
range: new o.Range(
|
6412
|
+
range: new o.Range(U.lineNumber, U.lineNumber, b.startColumn, b.endColumn),
|
6407
6413
|
contents: [
|
6408
6414
|
{ value: "**" + b.word + "**" },
|
6409
|
-
{ value:
|
6415
|
+
{ value: W }
|
6410
6416
|
]
|
6411
6417
|
};
|
6412
6418
|
}
|
@@ -6420,13 +6426,13 @@ const Pe = /* @__PURE__ */ he(Ms, [["render", Ps]]), Ml = /* @__PURE__ */ P({
|
|
6420
6426
|
if (g.value == null)
|
6421
6427
|
return;
|
6422
6428
|
let v = null;
|
6423
|
-
s.value.schema && (v = s.value.category + "/" + d.string.getUniqueId(),
|
6429
|
+
s.value.schema && (v = s.value.category + "/" + d.string.getUniqueId(), Z.tryAddSchema(v, s.value.category, s.value.schema));
|
6424
6430
|
let x = {
|
6425
6431
|
validate: !0,
|
6426
6432
|
allowComments: !0,
|
6427
6433
|
//允许配置注释
|
6428
6434
|
//保证架构配置在当前控件生效,所以需要绑定匹配哪个文件时使用架构
|
6429
|
-
schemas: d.object.clone(
|
6435
|
+
schemas: d.object.clone(Z.editor.schemas),
|
6430
6436
|
trailingCommas: "ignore"
|
6431
6437
|
//允许末尾逗号
|
6432
6438
|
};
|
@@ -6452,50 +6458,50 @@ const Pe = /* @__PURE__ */ he(Ms, [["render", Ps]]), Ml = /* @__PURE__ */ P({
|
|
6452
6458
|
c = o.editor.create(g.value, B), s.value.scrollTop && c.setScrollTop(s.value.scrollTop);
|
6453
6459
|
let I = s.value.selection;
|
6454
6460
|
if (I) {
|
6455
|
-
let
|
6461
|
+
let U = {
|
6456
6462
|
startLineNumber: I.startLine,
|
6457
6463
|
endLineNumber: I.endLine,
|
6458
6464
|
startColumn: I.startColumn,
|
6459
6465
|
endColumn: I.endColumn
|
6460
6466
|
};
|
6461
|
-
c.setSelection(
|
6467
|
+
c.setSelection(U);
|
6462
6468
|
}
|
6463
|
-
c.onDidScrollChange((
|
6464
|
-
s.value.scrollTop =
|
6465
|
-
}), c.onDidChangeModelContent((
|
6469
|
+
c.onDidScrollChange((U) => {
|
6470
|
+
s.value.scrollTop = U.scrollTop, t("scroll", U.scrollTop);
|
6471
|
+
}), c.onDidChangeModelContent((U) => {
|
6466
6472
|
let b = c.getValue();
|
6467
6473
|
t("update:modelValue", b), t("change", b);
|
6468
6474
|
});
|
6469
6475
|
};
|
6470
|
-
|
6471
|
-
o = await
|
6472
|
-
}),
|
6476
|
+
ie(async () => {
|
6477
|
+
o = await te.getMonaco(), await A(), t("mounted", o, c);
|
6478
|
+
}), ae(() => {
|
6473
6479
|
var v;
|
6474
6480
|
p == null || p.dispose(), c == null || c.dispose(), (v = h.completion) == null || v.dispose();
|
6475
6481
|
});
|
6476
|
-
let
|
6482
|
+
let L = () => {
|
6477
6483
|
c == null || c.layout();
|
6478
|
-
},
|
6479
|
-
return
|
6484
|
+
}, Y = () => c;
|
6485
|
+
return z(() => m.theme, (v, x) => {
|
6480
6486
|
let $ = F(v);
|
6481
6487
|
o.editor.setTheme($);
|
6482
|
-
}),
|
6483
|
-
}),
|
6488
|
+
}), z(() => m.language, (v, x) => {
|
6489
|
+
}), z(() => a.value, (v, x) => {
|
6484
6490
|
if (!c)
|
6485
6491
|
return;
|
6486
6492
|
let $ = c.getValue();
|
6487
6493
|
v != $ && c.setValue(v ?? "");
|
6488
|
-
}),
|
6494
|
+
}), z(() => s.value.language, async (v, x) => {
|
6489
6495
|
if (!c)
|
6490
6496
|
return;
|
6491
6497
|
let $ = c.getModel();
|
6492
6498
|
o.editor.setModelLanguage($, v), await M(v);
|
6493
|
-
}), i({ layout:
|
6494
|
-
default:
|
6499
|
+
}), i({ layout: L, getEditor: Y, registerIntelli: k }), (v, x) => (S(), Ne(Ls, null, {
|
6500
|
+
default: re(() => [
|
6495
6501
|
T("div", {
|
6496
6502
|
ref_key: "editorRef",
|
6497
6503
|
ref: g,
|
6498
|
-
class:
|
6504
|
+
class: oe(["ha-code", { border: f(l) }])
|
6499
6505
|
}, null, 2)
|
6500
6506
|
]),
|
6501
6507
|
_: 1
|
@@ -6511,7 +6517,7 @@ const Pe = /* @__PURE__ */ he(Ms, [["render", Ps]]), Ml = /* @__PURE__ */ P({
|
|
6511
6517
|
},
|
6512
6518
|
emits: ["update:modelValue", "update:original", "change"],
|
6513
6519
|
setup(u, { emit: i }) {
|
6514
|
-
let e = i, t = u, { inline: r, language: s, original: l, modelValue: a } =
|
6520
|
+
let e = i, t = u, { inline: r, language: s, original: l, modelValue: a } = q(t), o = null, c = null, p = null, h = null, g = null, m = null, k = H(), R = H(), { app: M } = Z.sys, K = (j) => j == "default" ? null : "vs-dark", J = (j) => {
|
6515
6521
|
c = j.editor.createModel(l.value, s.value), p = j.editor.createModel(a.value, s.value), o = j.editor.createDiffEditor(k.value, {
|
6516
6522
|
originalEditable: !0,
|
6517
6523
|
automaticLayout: !0,
|
@@ -6526,19 +6532,19 @@ const Pe = /* @__PURE__ */ he(Ms, [["render", Ps]]), Ml = /* @__PURE__ */ P({
|
|
6526
6532
|
e("update:modelValue", A);
|
6527
6533
|
});
|
6528
6534
|
};
|
6529
|
-
return
|
6530
|
-
m = await
|
6531
|
-
}),
|
6535
|
+
return ie(async () => {
|
6536
|
+
m = await te.getMonaco(), J(m);
|
6537
|
+
}), z(() => M.theme, (j, F) => {
|
6532
6538
|
let A = K(j);
|
6533
6539
|
m.editor.setTheme(A);
|
6534
|
-
}),
|
6540
|
+
}), z(() => s.value, (j, F) => {
|
6535
6541
|
c && m.editor.setModelLanguage(c, j), p && m.editor.setModelLanguage(p, j);
|
6536
|
-
}),
|
6542
|
+
}), z(() => l.value, (j, F) => {
|
6537
6543
|
if (!c)
|
6538
6544
|
return;
|
6539
6545
|
let A = c.getValue();
|
6540
6546
|
j != A && c.setValue(j ?? "");
|
6541
|
-
}),
|
6547
|
+
}), z(() => a.value, (j, F) => {
|
6542
6548
|
if (!p)
|
6543
6549
|
return;
|
6544
6550
|
let A = p.getValue();
|
@@ -6547,7 +6553,7 @@ const Pe = /* @__PURE__ */ he(Ms, [["render", Ps]]), Ml = /* @__PURE__ */ P({
|
|
6547
6553
|
ref_key: "compareRef",
|
6548
6554
|
ref: k,
|
6549
6555
|
class: "ha-compare",
|
6550
|
-
style:
|
6556
|
+
style: ee(f(R))
|
6551
6557
|
}, null, 4));
|
6552
6558
|
}
|
6553
6559
|
}), Fs = {}, Ns = { class: "ha-input" };
|
@@ -6556,29 +6562,29 @@ function Vs(u, i) {
|
|
6556
6562
|
T("input", { type: "text" }, null, -1)
|
6557
6563
|
]));
|
6558
6564
|
}
|
6559
|
-
const Pl = /* @__PURE__ */
|
6560
|
-
function
|
6561
|
-
return S(), C("div",
|
6565
|
+
const Pl = /* @__PURE__ */ pe(Fs, [["render", Vs]]), qs = {}, Ws = { class: "ha-option" };
|
6566
|
+
function zs(u, i) {
|
6567
|
+
return S(), C("div", Ws, "选项");
|
6562
6568
|
}
|
6563
|
-
const Ks = /* @__PURE__ */
|
6569
|
+
const Ks = /* @__PURE__ */ pe(qs, [["render", zs]]), Js = { class: "ha-rich-text" }, Fl = /* @__PURE__ */ P({
|
6564
6570
|
__name: "RichText",
|
6565
|
-
props: /* @__PURE__ */
|
6571
|
+
props: /* @__PURE__ */ Oe({
|
6566
6572
|
options: {}
|
6567
6573
|
}, {
|
6568
6574
|
modelValue: {},
|
6569
6575
|
modelModifiers: {}
|
6570
6576
|
}),
|
6571
|
-
emits: /* @__PURE__ */
|
6577
|
+
emits: /* @__PURE__ */ Oe(["change", "scroll"], ["update:modelValue"]),
|
6572
6578
|
setup(u, { expose: i, emit: e }) {
|
6573
|
-
let t = e, r = u, { options: s } =
|
6574
|
-
let
|
6579
|
+
let t = e, r = u, { options: s } = q(r), l = Ve(u, "modelValue"), a, o = null, c = null, p = !1, h = !1, g = H(), m = H(), k = H(), R = H(!1), M = H({ style: null, options: { scrollTop: 0 } }), K = (A) => {
|
6580
|
+
let L = d.time.formatDate(), Y = getSelection(), v = Y.getRangeAt(0), x = v.startContainer;
|
6575
6581
|
if (x.nodeName == "#text")
|
6576
|
-
x.insertData(v.startOffset,
|
6582
|
+
x.insertData(v.startOffset, L), v.setStart(x, v.startOffset + L.length), Y.removeAllRanges(), Y.addRange(v);
|
6577
6583
|
else {
|
6578
|
-
let $ = document.createTextNode(
|
6584
|
+
let $ = document.createTextNode(L);
|
6579
6585
|
x.appendChild($);
|
6580
6586
|
let B = document.createRange();
|
6581
|
-
B.selectNodeContents($), B.setStart($, B.startOffset +
|
6587
|
+
B.selectNodeContents($), B.setStart($, B.startOffset + L.length), Y.removeAllRanges(), Y.addRange(B);
|
6582
6588
|
}
|
6583
6589
|
}, J = (A) => {
|
6584
6590
|
if (o.scrollTop = A.scrollTop, p || h) {
|
@@ -6587,7 +6593,7 @@ const Ks = /* @__PURE__ */ he(Ws, [["render", qs]]), Js = { class: "ha-rich-text
|
|
6587
6593
|
}
|
6588
6594
|
c = A, t("scroll", A);
|
6589
6595
|
}, j = () => `height: calc(100% - ${d.dom.getHeight(m.value)}px)`, F = async () => {
|
6590
|
-
let A = await
|
6596
|
+
let A = await te.getQuill();
|
6591
6597
|
a = new A(g.value, {
|
6592
6598
|
modules: {
|
6593
6599
|
toolbar: {
|
@@ -6596,42 +6602,42 @@ const Ks = /* @__PURE__ */ he(Ws, [["render", qs]]), Js = { class: "ha-rich-text
|
|
6596
6602
|
}
|
6597
6603
|
},
|
6598
6604
|
theme: "snow"
|
6599
|
-
}),
|
6605
|
+
}), R.value = !0, Ue(() => {
|
6600
6606
|
M.value.style = j();
|
6601
|
-
}), s.value.readonly && a.disable(), o = g.value.querySelector(".ql-editor"), o.innerHTML = l.value, M.value.options.scrollTop = s.value.scrollTop, a.on("text-change", (
|
6607
|
+
}), s.value.readonly && a.disable(), o = g.value.querySelector(".ql-editor"), o.innerHTML = l.value, M.value.options.scrollTop = s.value.scrollTop, a.on("text-change", (L, Y, v) => {
|
6602
6608
|
o.innerHTML != l.value && (p = !0, l.value = o.innerHTML);
|
6603
|
-
}), o.addEventListener("paste", (
|
6609
|
+
}), o.addEventListener("paste", (L) => {
|
6604
6610
|
h = !0;
|
6605
6611
|
});
|
6606
6612
|
};
|
6607
|
-
return
|
6613
|
+
return ie(() => {
|
6608
6614
|
F();
|
6609
|
-
}),
|
6615
|
+
}), ae(() => {
|
6610
6616
|
a = null;
|
6611
|
-
}),
|
6617
|
+
}), z(() => l.value, (A, L) => {
|
6612
6618
|
o && o.innerHTML != A && (o.innerHTML = A);
|
6613
|
-
}),
|
6614
|
-
A != null && (c == null ? void 0 : c.scrollTop) != A &&
|
6619
|
+
}), z(() => s.value.scrollTop, (A, L) => {
|
6620
|
+
A != null && (c == null ? void 0 : c.scrollTop) != A && Ue(() => {
|
6615
6621
|
M.value.options.scrollTop = A;
|
6616
6622
|
});
|
6617
|
-
}), i({}), (A,
|
6623
|
+
}), i({}), (A, L) => (S(), C("div", Js, [
|
6618
6624
|
pt(T("div", {
|
6619
6625
|
ref_key: "toolbarRef",
|
6620
6626
|
ref: m
|
6621
|
-
},
|
6627
|
+
}, L[0] || (L[0] = [
|
6622
6628
|
ht('<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)
|
6623
6629
|
]), 512), [
|
6624
|
-
[gt, f(
|
6630
|
+
[gt, f(R)]
|
6625
6631
|
]),
|
6626
|
-
|
6632
|
+
X(f(Is), {
|
6627
6633
|
ref_key: "scrollerRef",
|
6628
6634
|
ref: k,
|
6629
6635
|
class: "ql-body",
|
6630
6636
|
options: f(M).options,
|
6631
6637
|
onScroll: f(J),
|
6632
|
-
style:
|
6638
|
+
style: ee(f(M).style)
|
6633
6639
|
}, {
|
6634
|
-
default:
|
6640
|
+
default: re(() => [
|
6635
6641
|
T("div", {
|
6636
6642
|
ref_key: "editorRef",
|
6637
6643
|
ref: g
|
@@ -6650,7 +6656,7 @@ function Xs(u, i) {
|
|
6650
6656
|
], -1)
|
6651
6657
|
]));
|
6652
6658
|
}
|
6653
|
-
const xe = /* @__PURE__ */
|
6659
|
+
const xe = /* @__PURE__ */ pe(Ys, [["render", Xs]]);
|
6654
6660
|
class Nl {
|
6655
6661
|
/**
|
6656
6662
|
* 初始化
|
@@ -6683,22 +6689,22 @@ const Gs = { class: "ha-condition" }, Zs = /* @__PURE__ */ P({
|
|
6683
6689
|
value: {}
|
6684
6690
|
},
|
6685
6691
|
setup(u) {
|
6686
|
-
let i = u, { name: e, operator: t, value: r } =
|
6692
|
+
let i = u, { name: e, operator: t, value: r } = q(i);
|
6687
6693
|
return (s, l) => (S(), C("div", Gs, [
|
6688
|
-
|
6694
|
+
X(f(xe), {
|
6689
6695
|
modelValue: f(e),
|
6690
6696
|
"onUpdate:modelValue": l[0] || (l[0] = (a) => we(e) ? e.value = a : e = a)
|
6691
6697
|
}, null, 8, ["modelValue"]),
|
6692
|
-
|
6698
|
+
X(f(xe), {
|
6693
6699
|
modelValue: f(t),
|
6694
6700
|
"onUpdate:modelValue": l[1] || (l[1] = (a) => we(t) ? t.value = a : t = a)
|
6695
6701
|
}, {
|
6696
|
-
default:
|
6697
|
-
|
6702
|
+
default: re(() => [
|
6703
|
+
X(f(Ks))
|
6698
6704
|
]),
|
6699
6705
|
_: 1
|
6700
6706
|
}, 8, ["modelValue"]),
|
6701
|
-
|
6707
|
+
X(f(xe), {
|
6702
6708
|
modelValue: f(r),
|
6703
6709
|
"onUpdate:modelValue": l[2] || (l[2] = (a) => we(r) ? r.value = a : r = a)
|
6704
6710
|
}, null, 8, ["modelValue"])
|
@@ -6710,9 +6716,9 @@ const Gs = { class: "ha-condition" }, Zs = /* @__PURE__ */ P({
|
|
6710
6716
|
conditions: {}
|
6711
6717
|
},
|
6712
6718
|
setup(u) {
|
6713
|
-
let i = u, { conditions: e } =
|
6719
|
+
let i = u, { conditions: e } = q(i);
|
6714
6720
|
return (t, r) => (S(), C("div", el, [
|
6715
|
-
(S(!0), C(
|
6721
|
+
(S(!0), C(qe, null, We(f(e), (s) => (S(), Ne(f(Zs), {
|
6716
6722
|
name: s.name,
|
6717
6723
|
operator: s.operator,
|
6718
6724
|
value: s.value
|
@@ -6722,40 +6728,42 @@ const Gs = { class: "ha-condition" }, Zs = /* @__PURE__ */ P({
|
|
6722
6728
|
}), tl = {}, rl = { class: "ha-col" };
|
6723
6729
|
function sl(u, i) {
|
6724
6730
|
return S(), C("div", rl, [
|
6725
|
-
|
6731
|
+
Q(u.$slots, "default")
|
6726
6732
|
]);
|
6727
6733
|
}
|
6728
|
-
const
|
6734
|
+
const ql = /* @__PURE__ */ pe(tl, [["render", sl]]), Wl = /* @__PURE__ */ P({
|
6729
6735
|
__name: "Container",
|
6730
6736
|
props: {
|
6731
6737
|
container: { type: Boolean, default: !0 }
|
6732
6738
|
},
|
6733
|
-
setup(u) {
|
6734
|
-
let
|
6735
|
-
return (
|
6736
|
-
class:
|
6739
|
+
setup(u, { expose: i }) {
|
6740
|
+
let e = u, { container: t } = q(e), r = H();
|
6741
|
+
return i({ ref: r }), (s, l) => (S(), C("div", {
|
6742
|
+
class: oe({ "ha-container": f(t) }),
|
6743
|
+
ref_key: "containerRef",
|
6744
|
+
ref: r
|
6737
6745
|
}, [
|
6738
|
-
|
6746
|
+
Q(s.$slots, "default")
|
6739
6747
|
], 2));
|
6740
6748
|
}
|
6741
|
-
}),
|
6749
|
+
}), zl = /* @__PURE__ */ P({
|
6742
6750
|
__name: "Row",
|
6743
6751
|
props: {
|
6744
6752
|
gap: {},
|
6745
6753
|
direction: {}
|
6746
6754
|
},
|
6747
6755
|
setup(u, { expose: i }) {
|
6748
|
-
let e = u, { gap: t, direction: r } =
|
6756
|
+
let e = u, { gap: t, direction: r } = q(e), s = H(), l = ye(() => {
|
6749
6757
|
let a = { gap: null };
|
6750
6758
|
return t.value && (a.gap = t.value + "px"), a;
|
6751
6759
|
});
|
6752
6760
|
return i({ ref: s }), (a, o) => (S(), C("div", {
|
6753
6761
|
ref_key: "rowRef",
|
6754
6762
|
ref: s,
|
6755
|
-
class:
|
6756
|
-
style:
|
6763
|
+
class: oe(["ha-row", f(r)]),
|
6764
|
+
style: ee(f(l))
|
6757
6765
|
}, [
|
6758
|
-
|
6766
|
+
Q(a.$slots, "default")
|
6759
6767
|
], 6));
|
6760
6768
|
}
|
6761
6769
|
}), Kl = /* @__PURE__ */ P({
|
@@ -6766,7 +6774,7 @@ const Wl = /* @__PURE__ */ he(tl, [["render", sl]]), zl = /* @__PURE__ */ P({
|
|
6766
6774
|
},
|
6767
6775
|
emits: ["update:modelValue"],
|
6768
6776
|
setup(u) {
|
6769
|
-
let i = Ve(u, "modelValue"), e =
|
6777
|
+
let i = Ve(u, "modelValue"), e = H(!0), t = H(0), r = null, s = () => {
|
6770
6778
|
t.value = 0, e.value = !0, r = setInterval(() => {
|
6771
6779
|
if (t.value < 100) {
|
6772
6780
|
t.value++;
|
@@ -6782,17 +6790,17 @@ const Wl = /* @__PURE__ */ he(tl, [["render", sl]]), zl = /* @__PURE__ */ P({
|
|
6782
6790
|
}, 200));
|
6783
6791
|
}, c);
|
6784
6792
|
};
|
6785
|
-
return
|
6793
|
+
return ie(() => {
|
6786
6794
|
i.value && s();
|
6787
|
-
}),
|
6795
|
+
}), ae(() => {
|
6788
6796
|
clearInterval(r);
|
6789
|
-
}),
|
6797
|
+
}), z(() => i.value, (a, o) => {
|
6790
6798
|
a ? s() : l();
|
6791
6799
|
}), (a, o) => f(e) ? (S(), C("div", {
|
6792
6800
|
key: 0,
|
6793
6801
|
class: "ha-progress",
|
6794
|
-
style:
|
6795
|
-
}, null, 4)) :
|
6802
|
+
style: ee({ width: f(t) + "%" })
|
6803
|
+
}, null, 4)) : ce("", !0);
|
6796
6804
|
}
|
6797
6805
|
}), Fe = /* @__PURE__ */ P({
|
6798
6806
|
__name: "Index",
|
@@ -6800,11 +6808,11 @@ const Wl = /* @__PURE__ */ he(tl, [["render", sl]]), zl = /* @__PURE__ */ P({
|
|
6800
6808
|
type: {}
|
6801
6809
|
},
|
6802
6810
|
setup(u) {
|
6803
|
-
let i = u, { type: e } =
|
6811
|
+
let i = u, { type: e } = q(i);
|
6804
6812
|
return (t, r) => (S(), C("div", {
|
6805
|
-
class:
|
6813
|
+
class: oe(["progress-tip", f(e)])
|
6806
6814
|
}, [
|
6807
|
-
|
6815
|
+
Q(t.$slots, "default")
|
6808
6816
|
], 2));
|
6809
6817
|
}
|
6810
6818
|
}), ll = { class: "progress-bar" }, nl = { class: "progress-info" }, il = { key: 0 }, al = { key: 1 }, ol = { class: "progress-text" }, Jl = /* @__PURE__ */ P({
|
@@ -6815,25 +6823,25 @@ const Wl = /* @__PURE__ */ he(tl, [["render", sl]]), zl = /* @__PURE__ */ P({
|
|
6815
6823
|
progress: {}
|
6816
6824
|
},
|
6817
6825
|
setup(u) {
|
6818
|
-
let i = u, { title: e, current: t, progress: r } =
|
6826
|
+
let i = u, { title: e, current: t, progress: r } = q(i), s = ye(() => d.math.getPercentage(r.value.handled, r.value.total)), l = ye(() => `${r.value.handled ?? "-"}/${r.value.total ?? "-"}`), a = ye(() => d.math.getPercentageText(r.value.handled, r.value.total));
|
6819
6827
|
return (o, c) => (S(), C("div", {
|
6820
|
-
class:
|
6828
|
+
class: oe(["ha-socket-progress", {
|
6821
6829
|
error: f(r).errored > 0 && f(r).errored == f(r).handled,
|
6822
6830
|
warning: f(r).errored > 0 && f(r).errored < f(r).handled
|
6823
6831
|
}])
|
6824
6832
|
}, [
|
6825
|
-
|
6826
|
-
default:
|
6833
|
+
X(f(Pe), { class: "progress-chart" }, {
|
6834
|
+
default: re(() => {
|
6827
6835
|
var p;
|
6828
6836
|
return [
|
6829
6837
|
T("div", ll, [
|
6830
6838
|
T("div", {
|
6831
6839
|
class: "progress-percentage",
|
6832
|
-
style:
|
6840
|
+
style: ee({ width: f(s) + "%" })
|
6833
6841
|
}, null, 4),
|
6834
6842
|
T("div", nl, [
|
6835
|
-
f(e) ? (S(), C("div", il, N(f(e)) + ":" + N(((p = f(r).current) == null ? void 0 : p[f(t)]) ?? "-"), 1)) :
|
6836
|
-
f(r).elapsed ? (S(), C("div", al, "耗时:" + N(f(d).math.round(f(r).elapsed / 1e3, 2)) + "s", 1)) :
|
6843
|
+
f(e) ? (S(), C("div", il, N(f(e)) + ":" + N(((p = f(r).current) == null ? void 0 : p[f(t)]) ?? "-"), 1)) : ce("", !0),
|
6844
|
+
f(r).elapsed ? (S(), C("div", al, "耗时:" + N(f(d).math.round(f(r).elapsed / 1e3, 2)) + "s", 1)) : ce("", !0),
|
6837
6845
|
T("div", null, "进度:" + N(f(l)), 1)
|
6838
6846
|
])
|
6839
6847
|
]),
|
@@ -6842,21 +6850,21 @@ const Wl = /* @__PURE__ */ he(tl, [["render", sl]]), zl = /* @__PURE__ */ P({
|
|
6842
6850
|
}),
|
6843
6851
|
_: 1
|
6844
6852
|
}),
|
6845
|
-
|
6846
|
-
default:
|
6847
|
-
|
6848
|
-
default:
|
6853
|
+
X(f(Pe), { class: "progress-tips" }, {
|
6854
|
+
default: re(() => [
|
6855
|
+
X(f(Fe), { type: "success" }, {
|
6856
|
+
default: re(() => [
|
6849
6857
|
me("成功 " + N(f(r).succeed ?? "-"), 1)
|
6850
6858
|
]),
|
6851
6859
|
_: 1
|
6852
6860
|
}),
|
6853
|
-
|
6854
|
-
default:
|
6861
|
+
X(f(Fe), { type: "error" }, {
|
6862
|
+
default: re(() => [
|
6855
6863
|
me("异常 " + N(f(r).errored ?? "-"), 1)
|
6856
6864
|
]),
|
6857
6865
|
_: 1
|
6858
6866
|
}),
|
6859
|
-
|
6867
|
+
Q(o.$slots, "default")
|
6860
6868
|
]),
|
6861
6869
|
_: 3
|
6862
6870
|
})
|
@@ -6881,7 +6889,7 @@ const Wl = /* @__PURE__ */ he(tl, [["render", sl]]), zl = /* @__PURE__ */ P({
|
|
6881
6889
|
},
|
6882
6890
|
emits: ["retry"],
|
6883
6891
|
setup(u, { emit: i }) {
|
6884
|
-
let e = i, t = u, { title: r, content: s } =
|
6892
|
+
let e = i, t = u, { title: r, content: s } = q(t), l = () => {
|
6885
6893
|
e("retry");
|
6886
6894
|
};
|
6887
6895
|
return (a, o) => f(r) || f(s) ? (S(), C("div", ul, [
|
@@ -6891,11 +6899,11 @@ const Wl = /* @__PURE__ */ he(tl, [["render", sl]]), zl = /* @__PURE__ */ P({
|
|
6891
6899
|
class: "retry",
|
6892
6900
|
onClick: o[0] || (o[0] = //@ts-ignore
|
6893
6901
|
(...c) => f(l) && f(l)(...c))
|
6894
|
-
}, N(f(
|
6902
|
+
}, N(f(de)("common.retry")), 1)
|
6895
6903
|
]),
|
6896
6904
|
f(s) ? (S(), C("div", dl, [
|
6897
6905
|
T("div", pl, N(f(s)), 1)
|
6898
|
-
])) :
|
6906
|
+
])) : ce("", !0)
|
6899
6907
|
])) : (S(), C("div", hl, [
|
6900
6908
|
T("div", gl, [
|
6901
6909
|
o[1] || (o[1] = T("div", { class: "spinner-dots" }, [
|
@@ -6904,7 +6912,7 @@ const Wl = /* @__PURE__ */ he(tl, [["render", sl]]), zl = /* @__PURE__ */ P({
|
|
6904
6912
|
T("i"),
|
6905
6913
|
T("i")
|
6906
6914
|
], -1)),
|
6907
|
-
T("div", fl, N(f(
|
6915
|
+
T("div", fl, N(f(de)("common.loading")) + "...", 1)
|
6908
6916
|
])
|
6909
6917
|
]));
|
6910
6918
|
}
|
@@ -6915,7 +6923,7 @@ const Wl = /* @__PURE__ */ he(tl, [["render", sl]]), zl = /* @__PURE__ */ P({
|
|
6915
6923
|
destroy: { type: Boolean }
|
6916
6924
|
},
|
6917
6925
|
setup(u) {
|
6918
|
-
return
|
6926
|
+
return q(u), (e, t) => (S(), C("div", yl, t[0] || (t[0] = [
|
6919
6927
|
T("div", { class: "tab-header" }, null, -1),
|
6920
6928
|
T("div", { class: "tab-body" }, null, -1)
|
6921
6929
|
])));
|
@@ -6927,23 +6935,23 @@ const Wl = /* @__PURE__ */ he(tl, [["render", sl]]), zl = /* @__PURE__ */ P({
|
|
6927
6935
|
delay: { default: 0 }
|
6928
6936
|
},
|
6929
6937
|
setup(u) {
|
6930
|
-
let i = u, { text: e, delay: t } =
|
6938
|
+
let i = u, { text: e, delay: t } = q(i);
|
6931
6939
|
return (r, s) => (S(), C("div", ml, [
|
6932
|
-
(S(!0), C(
|
6940
|
+
(S(!0), C(qe, null, We(f(e), (l, a) => (S(), C("div", {
|
6933
6941
|
class: "char",
|
6934
|
-
style:
|
6942
|
+
style: ee({ animationDelay: `${f(t) + a * 0.1}s` })
|
6935
6943
|
}, N(l), 5))), 256))
|
6936
6944
|
]));
|
6937
6945
|
}
|
6938
6946
|
});
|
6939
6947
|
let Gl = async (u) => {
|
6940
6948
|
u == null && (u = new Hs()), await xs(u), await Ct();
|
6941
|
-
let i = await
|
6949
|
+
let i = await Ot.getSso(), e = Z.sys.app, t = { baseUrl: u.baseUrl, language: e.language, user: i, platform: "pc" }, r = d.json.serialize(t);
|
6942
6950
|
await _.openAsync(r);
|
6943
6951
|
let s = { url: u.socketUrl }, l = d.json.serialize(s);
|
6944
6952
|
await De.openAsync(l), _.onResponse = async (a) => {
|
6945
6953
|
let { ok: o, status: c, data: p } = a;
|
6946
|
-
return o == !1 ? (
|
6954
|
+
return o == !1 ? (Le.add(c.toString(), a.message, "网络错误", a.elapsed), se.error(a.message), Promise.reject(a)) : p.code == null || (Le.add(p.code, p.message, p.stack, p.elapsed), p.code == "Ok") ? Promise.resolve() : (se.error(p.message), Promise.reject(p));
|
6947
6955
|
};
|
6948
6956
|
};
|
6949
6957
|
export {
|
@@ -6951,15 +6959,15 @@ export {
|
|
6951
6959
|
os as BrowserUtil,
|
6952
6960
|
Ft as BuilderFactory,
|
6953
6961
|
Ge as Cdn,
|
6954
|
-
|
6955
|
-
|
6962
|
+
qt as CdnFactory,
|
6963
|
+
qr as ComponentUtil,
|
6956
6964
|
Hs as CreateFeOptions,
|
6965
|
+
Qt as CryptorFactory,
|
6957
6966
|
hs as DeltaUtility,
|
6958
|
-
|
6959
|
-
|
6967
|
+
zr as DictionaryUtil,
|
6968
|
+
Wr as DomUtil,
|
6960
6969
|
ds as DragEvent,
|
6961
6970
|
Kt as EncoderFactory,
|
6962
|
-
Qt as EncryptorFactory,
|
6963
6971
|
Kr as EventUtil,
|
6964
6972
|
$e as EventUtility,
|
6965
6973
|
Zt as ExcelFactory,
|
@@ -6970,19 +6978,19 @@ export {
|
|
6970
6978
|
Jr as FileUtil,
|
6971
6979
|
Pe as HaCard,
|
6972
6980
|
Ml as HaCode,
|
6973
|
-
|
6981
|
+
ql as HaCol,
|
6974
6982
|
Bl as HaCompare,
|
6975
6983
|
Zs as HaCondition,
|
6976
6984
|
Vl as HaConditionGroup,
|
6977
|
-
|
6985
|
+
Wl as HaContainer,
|
6978
6986
|
Xl as HaDance,
|
6979
|
-
|
6980
|
-
|
6987
|
+
Ll as HaEmpty,
|
6988
|
+
Ls as HaFill,
|
6981
6989
|
Pl as HaInput,
|
6982
6990
|
Ks as HaOption,
|
6983
6991
|
Kl as HaProgress,
|
6984
6992
|
Fl as HaRichText,
|
6985
|
-
|
6993
|
+
zl as HaRow,
|
6986
6994
|
Is as HaScroller,
|
6987
6995
|
xe as HaSelect,
|
6988
6996
|
Jl as HaSocketProgress,
|
@@ -7014,7 +7022,7 @@ export {
|
|
7014
7022
|
jl as ProviderTable,
|
7015
7023
|
fs as RandomUtility,
|
7016
7024
|
Nl as Range,
|
7017
|
-
|
7025
|
+
Rl as Rect,
|
7018
7026
|
Hl as Ref,
|
7019
7027
|
xt as RepoFactory,
|
7020
7028
|
Ce as SaveUtility,
|
@@ -7025,10 +7033,10 @@ export {
|
|
7025
7033
|
br as SocketProgress,
|
7026
7034
|
$l as SocketResponse,
|
7027
7035
|
Ie as SqlHelper,
|
7028
|
-
|
7036
|
+
Ur as SsoFactory,
|
7029
7037
|
st as SsoUser,
|
7030
7038
|
ts as StringUtil,
|
7031
|
-
|
7039
|
+
Rt as SvcFactory,
|
7032
7040
|
Mr as TaskFactory,
|
7033
7041
|
rs as TaskUtil,
|
7034
7042
|
Fr as TemplateFactory,
|
@@ -7038,11 +7046,11 @@ export {
|
|
7038
7046
|
Nr as UtilFactory,
|
7039
7047
|
ms as UtilityFactory,
|
7040
7048
|
d as Utils,
|
7041
|
-
|
7042
|
-
|
7049
|
+
Ol as VideoFactory,
|
7050
|
+
Ul as VoiceFactory,
|
7043
7051
|
ws as base64,
|
7044
|
-
|
7045
|
-
|
7052
|
+
te as cdn,
|
7053
|
+
Z as configSvc,
|
7046
7054
|
Gl as createFe,
|
7047
7055
|
Tl as driverSvc,
|
7048
7056
|
El as envSvc,
|
@@ -7051,16 +7059,16 @@ export {
|
|
7051
7059
|
xs as initDriverAsync,
|
7052
7060
|
Ct as initRepoAsync,
|
7053
7061
|
Cl as initSvcAsync,
|
7054
|
-
|
7062
|
+
Le as logSvc,
|
7055
7063
|
at as md5,
|
7056
|
-
|
7064
|
+
se as messenger,
|
7057
7065
|
St as moduleRepo,
|
7058
|
-
|
7066
|
+
fe as moment,
|
7059
7067
|
_t as queryRepo,
|
7060
7068
|
Ke as settingRepo,
|
7061
7069
|
Xe as settingSvc,
|
7062
7070
|
De as socket,
|
7063
|
-
|
7071
|
+
de as t,
|
7064
7072
|
_s as t_enum,
|
7065
7073
|
As as t_exists,
|
7066
7074
|
Cs as t_field,
|
@@ -7071,5 +7079,5 @@ export {
|
|
7071
7079
|
Ss as t_sys,
|
7072
7080
|
js as t_table,
|
7073
7081
|
ks as template,
|
7074
|
-
|
7082
|
+
Ot as userSvc
|
7075
7083
|
};
|