yxuse 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/lib/index.cjs2.js +5 -3
- package/lib/index.cjs2.js.gz +0 -0
- package/lib/index.cjs3.js +1 -1
- package/lib/index.cjs6.js +3 -3
- package/lib/index.cjs6.js.gz +0 -0
- package/lib/index.es.js +5 -5
- package/lib/index.es2.js +870 -810
- package/lib/index.es2.js.gz +0 -0
- package/lib/index.es3.js +66 -45
- package/lib/index.es6.js +873 -860
- package/lib/index.es6.js.gz +0 -0
- package/lib/style.css +1 -1
- package/lib/style.css.gz +0 -0
- package/lib/theme.cjs.js +1 -1
- package/lib/theme.es.js +7 -6
- package/lib/utils.cjs.js +1 -1
- package/lib/utils.es.js +8 -7
- package/package.json +150 -150
- package/types/api/auth/index.d.ts +13 -5
- package/types/components/Toolbar/index.d.ts +4 -0
- package/types/components/YxDialog/index.vue.d.ts +1 -1
- package/types/components/YxDialog/type.d.ts +4 -0
- package/types/components/YxSearchForm/type.d.ts +20 -0
- package/types/components/YxTable/type.d.ts +4 -0
- package/types/theme/config.d.ts +6 -0
- package/types/theme/index.d.ts +9 -9
- package/types/theme/type.d.ts +22 -0
- package/types/utils/common/index.d.ts +5 -0
package/lib/index.es2.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
var Mn = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
2
|
+
var Ze = Object.getOwnPropertySymbols;
|
|
3
|
+
var Rt = Object.prototype.hasOwnProperty, Xt = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var Ht = (t, e, n) => e in t ? Mn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ee = (t, e) => {
|
|
5
5
|
for (var n in e || (e = {}))
|
|
6
|
-
|
|
7
|
-
if (
|
|
8
|
-
for (var n of
|
|
9
|
-
|
|
6
|
+
Rt.call(e, n) && Ht(t, n, e[n]);
|
|
7
|
+
if (Ze)
|
|
8
|
+
for (var n of Ze(e))
|
|
9
|
+
Xt.call(e, n) && Ht(t, n, e[n]);
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
var
|
|
12
|
+
var Yt = (t, e) => {
|
|
13
13
|
var n = {};
|
|
14
14
|
for (var o in t)
|
|
15
|
-
|
|
16
|
-
if (t != null &&
|
|
17
|
-
for (var o of
|
|
18
|
-
e.indexOf(o) < 0 &&
|
|
15
|
+
Rt.call(t, o) && e.indexOf(o) < 0 && (n[o] = t[o]);
|
|
16
|
+
if (t != null && Ze)
|
|
17
|
+
for (var o of Ze(t))
|
|
18
|
+
e.indexOf(o) < 0 && Xt.call(t, o) && (n[o] = t[o]);
|
|
19
19
|
return n;
|
|
20
20
|
};
|
|
21
|
-
var
|
|
21
|
+
var Bn = (t, e, n) => {
|
|
22
22
|
if (!e.has(t))
|
|
23
23
|
throw TypeError("Cannot " + n);
|
|
24
24
|
};
|
|
25
|
-
var
|
|
25
|
+
var Ke = (t, e, n) => (Bn(t, e, "read from private field"), n ? n.call(t) : e.get(t)), jt = (t, e, n) => {
|
|
26
26
|
if (e.has(t))
|
|
27
27
|
throw TypeError("Cannot add the same private member more than once");
|
|
28
28
|
e instanceof WeakSet ? e.add(t) : e.set(t, n);
|
|
29
29
|
};
|
|
30
|
-
var
|
|
30
|
+
var me = (t, e, n) => new Promise((o, r) => {
|
|
31
31
|
var i = (l) => {
|
|
32
32
|
try {
|
|
33
33
|
s(n.next(l));
|
|
@@ -43,16 +43,21 @@ var ye = (t, e, n) => new Promise((o, r) => {
|
|
|
43
43
|
}, s = (l) => l.done ? o(l.value) : Promise.resolve(l.value).then(i, a);
|
|
44
44
|
s((n = n.apply(t, e)).next());
|
|
45
45
|
});
|
|
46
|
-
import { y as rn, u as
|
|
47
|
-
import { i as
|
|
48
|
-
import { g as
|
|
49
|
-
import { d as
|
|
50
|
-
import { w as Jn, a as Qn, v as dn, T as eo, u as to, c as no } from "./index.es6.js";
|
|
51
|
-
import { d as
|
|
52
|
-
const
|
|
46
|
+
import { y as rn, u as $n } from "./index.es3.js";
|
|
47
|
+
import { i as Fn } from "./index.es4.js";
|
|
48
|
+
import { g as Vn, a as an, b as Ln } from "./index.es5.js";
|
|
49
|
+
import { d as Ne, r as Hn, a as Y, o as S, c as H, b as Rn, w as W, e as I, f as O, g as Q, h as sn, i as ln, F as oe, j as J, k as ue, l as k, m as ne, n as xe, u as un, p as Xn, q as xt, s as Yn, t as jn, v as zn, x as Un, y as st, z as Re, A as ie, B as Wn, C as Gn, D as qn, E as Zn, G as cn, H as lt, I as Kn } from "./vue.runtime.esm-bundler.es.js";
|
|
50
|
+
import { w as Jn, a as Qn, v as dn, T as eo, u as to, c as no, s as oo } from "./index.es6.js";
|
|
51
|
+
import { d as ro } from "./index.es7.js";
|
|
52
|
+
const io = "@font-face {font-family: 'YX-TITLE';font-size: 16px; src: url('https://yx-picture.obs.cn-north-4.myhuaweicloud.com/ttc/bucket/1699612675710_ALIBABAPUHUITI-2-105-HEAVY.TTF') format('woff'), url('https://yx-picture.obs.cn-north-4.myhuaweicloud.com/ttc/bucket/1699612675710_ALIBABAPUHUITI-2-105-HEAVY.TTF') format('woff2'); font-style: normal;font-display: swap;}", ao = "@font-face { font-family: 'YX-SP-TITLE'; font-size: 16px; src: url('https://yx-picture.obs.cn-north-4.myhuaweicloud.com/ttc/bucket/1699844184489_bt.ttf') format('woff'),url('https://yx-picture.obs.cn-north-4.myhuaweicloud.com/ttc/bucket/1699844184489_bt.ttf') format('woff2');font-style: normal; font-display: swap;}", so = "@font-face {font-family: 'YX-TEXT'; font-size: 16px;src: url('https://yx-picture.obs.cn-north-4.myhuaweicloud.com/ttc/bucket/1699611032932_ALIBABAPUHUITI-2-65-MEDIUM.TTF') format('woff'),url('https://yx-picture.obs.cn-north-4.myhuaweicloud.com/ttc/bucket/1699611032932_ALIBABAPUHUITI-2-65-MEDIUM.TTF') format('woff2'); font-style: normal; font-display: swap;}", lo = io + ao + so, uo = {
|
|
53
|
+
loginUrl: "/ttc/cloud/#/login",
|
|
54
|
+
homeUrl: "/ttc/cloud/#/cloud",
|
|
55
|
+
lang: "zh",
|
|
56
|
+
environment: "production"
|
|
57
|
+
}, co = { class: "dialog-footer flex justify-end" }, fo = /* @__PURE__ */ Ne({
|
|
53
58
|
__name: "index",
|
|
54
59
|
setup(t, { expose: e }) {
|
|
55
|
-
const n =
|
|
60
|
+
const n = Hn({
|
|
56
61
|
width: "40%",
|
|
57
62
|
show: !1,
|
|
58
63
|
title: "",
|
|
@@ -61,29 +66,31 @@ const ro = "@font-face {font-family: 'YX-TITLE';font-size: 16px; src: url('https
|
|
|
61
66
|
autoClose: !0
|
|
62
67
|
}), o = () => {
|
|
63
68
|
n.show = !1;
|
|
64
|
-
}, r = {}, i = () =>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
}, r = {}, i = () => me(this, null, function* () {
|
|
70
|
+
if (!(r.beforeSubmit && !(yield r.beforeSubmit()))) {
|
|
71
|
+
n.loading = !0;
|
|
72
|
+
try {
|
|
73
|
+
r.submit && (yield r.submit()), n.loading = !1, n.autoClose && o();
|
|
74
|
+
} catch (s) {
|
|
75
|
+
n.loading = !1;
|
|
76
|
+
}
|
|
70
77
|
}
|
|
71
78
|
});
|
|
72
79
|
return e({
|
|
73
|
-
show: ({ width: s, title: l, submit: u, cancel:
|
|
74
|
-
s && (n.width = s), l && (n.title = l),
|
|
80
|
+
show: ({ width: s, title: l, submit: u, cancel: h, showFooter: d, autoClose: g, beforeOpen: T, beforeSubmit: y }) => {
|
|
81
|
+
s && (n.width = s), l && (n.title = l), d !== void 0 && (n.showFooter = d), g !== void 0 && (n.autoClose = g), u && (r.submit = u), h && (r.cancel = h), y && (r.beforeSubmit = y), T && T(), n.show = !0;
|
|
75
82
|
},
|
|
76
83
|
close: o
|
|
77
84
|
}), (s, l) => {
|
|
78
|
-
const u =
|
|
79
|
-
return S(),
|
|
85
|
+
const u = Y("el-button"), h = Y("el-dialog");
|
|
86
|
+
return S(), H(h, {
|
|
80
87
|
"close-on-click-modal": !1,
|
|
81
88
|
attrs: "",
|
|
82
89
|
width: n.width,
|
|
83
90
|
modelValue: n.show,
|
|
84
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
91
|
+
"onUpdate:modelValue": l[0] || (l[0] = (d) => n.show = d),
|
|
85
92
|
title: n.title
|
|
86
|
-
},
|
|
93
|
+
}, Rn({
|
|
87
94
|
default: W(() => [
|
|
88
95
|
sn(s.$slots, "default")
|
|
89
96
|
]),
|
|
@@ -92,24 +99,24 @@ const ro = "@font-face {font-family: 'YX-TITLE';font-size: 16px; src: url('https
|
|
|
92
99
|
n.showFooter ? {
|
|
93
100
|
name: "footer",
|
|
94
101
|
fn: W(() => [
|
|
95
|
-
|
|
96
|
-
|
|
102
|
+
I("span", co, [
|
|
103
|
+
O(u, {
|
|
97
104
|
plain: "",
|
|
98
105
|
class: "cancel-btn dialog-btn flex items-center justify-center mx-10",
|
|
99
106
|
onClick: o
|
|
100
107
|
}, {
|
|
101
108
|
default: W(() => [
|
|
102
|
-
|
|
109
|
+
Q("取消")
|
|
103
110
|
]),
|
|
104
111
|
_: 1
|
|
105
112
|
}),
|
|
106
|
-
|
|
113
|
+
O(u, {
|
|
107
114
|
loading: n.loading,
|
|
108
115
|
class: "dialog-btn flex items-center justify-center",
|
|
109
116
|
onClick: i
|
|
110
117
|
}, {
|
|
111
118
|
default: W(() => [
|
|
112
|
-
|
|
119
|
+
Q("确认")
|
|
113
120
|
]),
|
|
114
121
|
_: 1
|
|
115
122
|
}, 8, ["loading"])
|
|
@@ -120,7 +127,7 @@ const ro = "@font-face {font-family: 'YX-TITLE';font-size: 16px; src: url('https
|
|
|
120
127
|
]), 1032, ["width", "modelValue", "title"]);
|
|
121
128
|
};
|
|
122
129
|
}
|
|
123
|
-
}), fn = /* @__PURE__ */
|
|
130
|
+
}), fn = /* @__PURE__ */ Ne({
|
|
124
131
|
__name: "index",
|
|
125
132
|
props: {
|
|
126
133
|
conf: {},
|
|
@@ -139,20 +146,20 @@ const ro = "@font-face {font-family: 'YX-TITLE';font-size: 16px; src: url('https
|
|
|
139
146
|
}
|
|
140
147
|
), (r, i) => {
|
|
141
148
|
var a, s, l;
|
|
142
|
-
return S(),
|
|
149
|
+
return S(), H(J(`el-${(a = r.conf) == null ? void 0 : a.renderType}`), xe({
|
|
143
150
|
modelValue: r.model[(s = r.conf) == null ? void 0 : s.prop],
|
|
144
151
|
"onUpdate:modelValue": i[0] || (i[0] = (u) => {
|
|
145
|
-
var
|
|
146
|
-
return r.model[(
|
|
152
|
+
var h;
|
|
153
|
+
return r.model[(h = r.conf) == null ? void 0 : h.prop] = u;
|
|
147
154
|
})
|
|
148
155
|
}, (l = r.conf) == null ? void 0 : l.config), {
|
|
149
156
|
default: W(() => {
|
|
150
|
-
var u,
|
|
157
|
+
var u, h, d;
|
|
151
158
|
return [
|
|
152
|
-
r.conf.renderType === "select" ? (S(!0),
|
|
153
|
-
key:
|
|
154
|
-
label:
|
|
155
|
-
value:
|
|
159
|
+
r.conf.renderType === "select" ? (S(!0), k(oe, { key: 0 }, ue((d = (h = (u = r.conf) == null ? void 0 : u.config) == null ? void 0 : h.options) != null ? d : [], (g) => (S(), H(J("el-option"), {
|
|
160
|
+
key: g.value,
|
|
161
|
+
label: g.label,
|
|
162
|
+
value: g.value
|
|
156
163
|
}, null, 8, ["label", "value"]))), 128)) : ne("", !0)
|
|
157
164
|
];
|
|
158
165
|
}),
|
|
@@ -167,7 +174,7 @@ const ro = "@font-face {font-family: 'YX-TITLE';font-size: 16px; src: url('https
|
|
|
167
174
|
* @author owenm <owen23355@gmail.com>
|
|
168
175
|
* @license MIT
|
|
169
176
|
*/
|
|
170
|
-
function
|
|
177
|
+
function zt(t, e) {
|
|
171
178
|
var n = Object.keys(t);
|
|
172
179
|
if (Object.getOwnPropertySymbols) {
|
|
173
180
|
var o = Object.getOwnPropertySymbols(t);
|
|
@@ -177,12 +184,12 @@ function Rt(t, e) {
|
|
|
177
184
|
}
|
|
178
185
|
return n;
|
|
179
186
|
}
|
|
180
|
-
function
|
|
187
|
+
function se(t) {
|
|
181
188
|
for (var e = 1; e < arguments.length; e++) {
|
|
182
189
|
var n = arguments[e] != null ? arguments[e] : {};
|
|
183
|
-
e % 2 ?
|
|
184
|
-
|
|
185
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) :
|
|
190
|
+
e % 2 ? zt(Object(n), !0).forEach(function(o) {
|
|
191
|
+
ho(t, o, n[o]);
|
|
192
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : zt(Object(n)).forEach(function(o) {
|
|
186
193
|
Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(n, o));
|
|
187
194
|
});
|
|
188
195
|
}
|
|
@@ -196,7 +203,7 @@ function nt(t) {
|
|
|
196
203
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
197
204
|
}, nt(t);
|
|
198
205
|
}
|
|
199
|
-
function
|
|
206
|
+
function ho(t, e, n) {
|
|
200
207
|
return e in t ? Object.defineProperty(t, e, {
|
|
201
208
|
value: n,
|
|
202
209
|
enumerable: !0,
|
|
@@ -204,17 +211,17 @@ function co(t, e, n) {
|
|
|
204
211
|
writable: !0
|
|
205
212
|
}) : t[e] = n, t;
|
|
206
213
|
}
|
|
207
|
-
function
|
|
208
|
-
return
|
|
214
|
+
function de() {
|
|
215
|
+
return de = Object.assign || function(t) {
|
|
209
216
|
for (var e = 1; e < arguments.length; e++) {
|
|
210
217
|
var n = arguments[e];
|
|
211
218
|
for (var o in n)
|
|
212
219
|
Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
|
|
213
220
|
}
|
|
214
221
|
return t;
|
|
215
|
-
},
|
|
222
|
+
}, de.apply(this, arguments);
|
|
216
223
|
}
|
|
217
|
-
function
|
|
224
|
+
function po(t, e) {
|
|
218
225
|
if (t == null)
|
|
219
226
|
return {};
|
|
220
227
|
var n = {}, o = Object.keys(t), r, i;
|
|
@@ -222,10 +229,10 @@ function fo(t, e) {
|
|
|
222
229
|
r = o[i], !(e.indexOf(r) >= 0) && (n[r] = t[r]);
|
|
223
230
|
return n;
|
|
224
231
|
}
|
|
225
|
-
function
|
|
232
|
+
function mo(t, e) {
|
|
226
233
|
if (t == null)
|
|
227
234
|
return {};
|
|
228
|
-
var n =
|
|
235
|
+
var n = po(t, e), o, r;
|
|
229
236
|
if (Object.getOwnPropertySymbols) {
|
|
230
237
|
var i = Object.getOwnPropertySymbols(t);
|
|
231
238
|
for (r = 0; r < i.length; r++)
|
|
@@ -233,20 +240,20 @@ function ho(t, e) {
|
|
|
233
240
|
}
|
|
234
241
|
return n;
|
|
235
242
|
}
|
|
236
|
-
var
|
|
237
|
-
function
|
|
243
|
+
var go = "1.15.0";
|
|
244
|
+
function ce(t) {
|
|
238
245
|
if (typeof window != "undefined" && window.navigator)
|
|
239
246
|
return !!/* @__PURE__ */ navigator.userAgent.match(t);
|
|
240
247
|
}
|
|
241
|
-
var
|
|
248
|
+
var fe = ce(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), We = ce(/Edge/i), Ut = ce(/firefox/i), Xe = ce(/safari/i) && !ce(/chrome/i) && !ce(/android/i), hn = ce(/iP(ad|od|hone)/i), pn = ce(/chrome/i) && ce(/android/i), mn = {
|
|
242
249
|
capture: !1,
|
|
243
250
|
passive: !1
|
|
244
251
|
};
|
|
245
|
-
function
|
|
246
|
-
t.addEventListener(e, n, !
|
|
252
|
+
function x(t, e, n) {
|
|
253
|
+
t.addEventListener(e, n, !fe && mn);
|
|
247
254
|
}
|
|
248
|
-
function
|
|
249
|
-
t.removeEventListener(e, n, !
|
|
255
|
+
function D(t, e, n) {
|
|
256
|
+
t.removeEventListener(e, n, !fe && mn);
|
|
250
257
|
}
|
|
251
258
|
function ut(t, e) {
|
|
252
259
|
if (e) {
|
|
@@ -264,10 +271,10 @@ function ut(t, e) {
|
|
|
264
271
|
return !1;
|
|
265
272
|
}
|
|
266
273
|
}
|
|
267
|
-
function
|
|
274
|
+
function vo(t) {
|
|
268
275
|
return t.host && t !== document && t.host.nodeType ? t.host : t.parentNode;
|
|
269
276
|
}
|
|
270
|
-
function
|
|
277
|
+
function re(t, e, n, o) {
|
|
271
278
|
if (t) {
|
|
272
279
|
n = n || document;
|
|
273
280
|
do {
|
|
@@ -275,7 +282,7 @@ function te(t, e, n, o) {
|
|
|
275
282
|
return t;
|
|
276
283
|
if (t === n)
|
|
277
284
|
break;
|
|
278
|
-
} while (t =
|
|
285
|
+
} while (t = vo(t));
|
|
279
286
|
}
|
|
280
287
|
return null;
|
|
281
288
|
}
|
|
@@ -289,7 +296,7 @@ function G(t, e, n) {
|
|
|
289
296
|
t.className = (o + (n ? " " + e : "")).replace(Wt, " ");
|
|
290
297
|
}
|
|
291
298
|
}
|
|
292
|
-
function
|
|
299
|
+
function b(t, e, n) {
|
|
293
300
|
var o = t && t.style;
|
|
294
301
|
if (o) {
|
|
295
302
|
if (n === void 0)
|
|
@@ -297,13 +304,13 @@ function v(t, e, n) {
|
|
|
297
304
|
!(e in o) && e.indexOf("webkit") === -1 && (e = "-webkit-" + e), o[e] = n + (typeof n == "string" ? "" : "px");
|
|
298
305
|
}
|
|
299
306
|
}
|
|
300
|
-
function
|
|
307
|
+
function Oe(t, e) {
|
|
301
308
|
var n = "";
|
|
302
309
|
if (typeof t == "string")
|
|
303
310
|
n = t;
|
|
304
311
|
else
|
|
305
312
|
do {
|
|
306
|
-
var o =
|
|
313
|
+
var o = b(t, "transform");
|
|
307
314
|
o && o !== "none" && (n = o + " " + n);
|
|
308
315
|
} while (!e && (t = t.parentNode));
|
|
309
316
|
var r = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
@@ -319,49 +326,49 @@ function gn(t, e, n) {
|
|
|
319
326
|
}
|
|
320
327
|
return [];
|
|
321
328
|
}
|
|
322
|
-
function
|
|
329
|
+
function ae() {
|
|
323
330
|
var t = document.scrollingElement;
|
|
324
331
|
return t || document.documentElement;
|
|
325
332
|
}
|
|
326
|
-
function
|
|
333
|
+
function V(t, e, n, o, r) {
|
|
327
334
|
if (!(!t.getBoundingClientRect && t !== window)) {
|
|
328
|
-
var i, a, s, l, u,
|
|
329
|
-
if (t !== window && t.parentNode && t !==
|
|
335
|
+
var i, a, s, l, u, h, d;
|
|
336
|
+
if (t !== window && t.parentNode && t !== ae() ? (i = t.getBoundingClientRect(), a = i.top, s = i.left, l = i.bottom, u = i.right, h = i.height, d = i.width) : (a = 0, s = 0, l = window.innerHeight, u = window.innerWidth, h = window.innerHeight, d = window.innerWidth), (e || n) && t !== window && (r = r || t.parentNode, !fe))
|
|
330
337
|
do
|
|
331
|
-
if (r && r.getBoundingClientRect && (
|
|
332
|
-
var
|
|
333
|
-
a -=
|
|
338
|
+
if (r && r.getBoundingClientRect && (b(r, "transform") !== "none" || n && b(r, "position") !== "static")) {
|
|
339
|
+
var g = r.getBoundingClientRect();
|
|
340
|
+
a -= g.top + parseInt(b(r, "border-top-width")), s -= g.left + parseInt(b(r, "border-left-width")), l = a + i.height, u = s + i.width;
|
|
334
341
|
break;
|
|
335
342
|
}
|
|
336
343
|
while (r = r.parentNode);
|
|
337
344
|
if (o && t !== window) {
|
|
338
|
-
var
|
|
339
|
-
|
|
345
|
+
var T = Oe(r || t), y = T && T.a, _ = T && T.d;
|
|
346
|
+
T && (a /= _, s /= y, d /= y, h /= _, l = a + h, u = s + d);
|
|
340
347
|
}
|
|
341
348
|
return {
|
|
342
349
|
top: a,
|
|
343
350
|
left: s,
|
|
344
351
|
bottom: l,
|
|
345
352
|
right: u,
|
|
346
|
-
width:
|
|
347
|
-
height:
|
|
353
|
+
width: d,
|
|
354
|
+
height: h
|
|
348
355
|
};
|
|
349
356
|
}
|
|
350
357
|
}
|
|
351
358
|
function Gt(t, e, n) {
|
|
352
|
-
for (var o =
|
|
353
|
-
var i =
|
|
359
|
+
for (var o = be(t, !0), r = V(t)[e]; o; ) {
|
|
360
|
+
var i = V(o)[n], a = void 0;
|
|
354
361
|
if (n === "top" || n === "left" ? a = r >= i : a = r <= i, !a)
|
|
355
362
|
return o;
|
|
356
|
-
if (o ===
|
|
363
|
+
if (o === ae())
|
|
357
364
|
break;
|
|
358
|
-
o =
|
|
365
|
+
o = be(o, !1);
|
|
359
366
|
}
|
|
360
367
|
return !1;
|
|
361
368
|
}
|
|
362
369
|
function ke(t, e, n, o) {
|
|
363
370
|
for (var r = 0, i = 0, a = t.children; i < a.length; ) {
|
|
364
|
-
if (a[i].style.display !== "none" && a[i] !==
|
|
371
|
+
if (a[i].style.display !== "none" && a[i] !== w.ghost && (o || a[i] !== w.dragged) && re(a[i], n.draggable, t, !1)) {
|
|
365
372
|
if (r === e)
|
|
366
373
|
return a[i];
|
|
367
374
|
r++;
|
|
@@ -371,7 +378,7 @@ function ke(t, e, n, o) {
|
|
|
371
378
|
return null;
|
|
372
379
|
}
|
|
373
380
|
function Nt(t, e) {
|
|
374
|
-
for (var n = t.lastElementChild; n && (n ===
|
|
381
|
+
for (var n = t.lastElementChild; n && (n === w.ghost || b(n, "display") === "none" || e && !ut(n, e)); )
|
|
375
382
|
n = n.previousElementSibling;
|
|
376
383
|
return n || null;
|
|
377
384
|
}
|
|
@@ -380,19 +387,19 @@ function K(t, e) {
|
|
|
380
387
|
if (!t || !t.parentNode)
|
|
381
388
|
return -1;
|
|
382
389
|
for (; t = t.previousElementSibling; )
|
|
383
|
-
t.nodeName.toUpperCase() !== "TEMPLATE" && t !==
|
|
390
|
+
t.nodeName.toUpperCase() !== "TEMPLATE" && t !== w.clone && (!e || ut(t, e)) && n++;
|
|
384
391
|
return n;
|
|
385
392
|
}
|
|
386
393
|
function qt(t) {
|
|
387
|
-
var e = 0, n = 0, o =
|
|
394
|
+
var e = 0, n = 0, o = ae();
|
|
388
395
|
if (t)
|
|
389
396
|
do {
|
|
390
|
-
var r =
|
|
397
|
+
var r = Oe(t), i = r.a, a = r.d;
|
|
391
398
|
e += t.scrollLeft * i, n += t.scrollTop * a;
|
|
392
399
|
} while (t !== o && (t = t.parentNode));
|
|
393
400
|
return [e, n];
|
|
394
401
|
}
|
|
395
|
-
function
|
|
402
|
+
function bo(t, e) {
|
|
396
403
|
for (var n in t)
|
|
397
404
|
if (t.hasOwnProperty(n)) {
|
|
398
405
|
for (var o in e)
|
|
@@ -401,25 +408,25 @@ function go(t, e) {
|
|
|
401
408
|
}
|
|
402
409
|
return -1;
|
|
403
410
|
}
|
|
404
|
-
function
|
|
411
|
+
function be(t, e) {
|
|
405
412
|
if (!t || !t.getBoundingClientRect)
|
|
406
|
-
return
|
|
413
|
+
return ae();
|
|
407
414
|
var n = t, o = !1;
|
|
408
415
|
do
|
|
409
416
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
410
|
-
var r =
|
|
417
|
+
var r = b(n);
|
|
411
418
|
if (n.clientWidth < n.scrollWidth && (r.overflowX == "auto" || r.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (r.overflowY == "auto" || r.overflowY == "scroll")) {
|
|
412
419
|
if (!n.getBoundingClientRect || n === document.body)
|
|
413
|
-
return
|
|
420
|
+
return ae();
|
|
414
421
|
if (o || e)
|
|
415
422
|
return n;
|
|
416
423
|
o = !0;
|
|
417
424
|
}
|
|
418
425
|
}
|
|
419
426
|
while (n = n.parentNode);
|
|
420
|
-
return
|
|
427
|
+
return ae();
|
|
421
428
|
}
|
|
422
|
-
function
|
|
429
|
+
function wo(t, e) {
|
|
423
430
|
if (t && e)
|
|
424
431
|
for (var n in e)
|
|
425
432
|
e.hasOwnProperty(n) && (t[n] = e[n]);
|
|
@@ -428,43 +435,43 @@ function vo(t, e) {
|
|
|
428
435
|
function vt(t, e) {
|
|
429
436
|
return Math.round(t.top) === Math.round(e.top) && Math.round(t.left) === Math.round(e.left) && Math.round(t.height) === Math.round(e.height) && Math.round(t.width) === Math.round(e.width);
|
|
430
437
|
}
|
|
431
|
-
var
|
|
438
|
+
var Ye;
|
|
432
439
|
function vn(t, e) {
|
|
433
440
|
return function() {
|
|
434
|
-
if (!
|
|
441
|
+
if (!Ye) {
|
|
435
442
|
var n = arguments, o = this;
|
|
436
|
-
n.length === 1 ? t.call(o, n[0]) : t.apply(o, n),
|
|
437
|
-
|
|
443
|
+
n.length === 1 ? t.call(o, n[0]) : t.apply(o, n), Ye = setTimeout(function() {
|
|
444
|
+
Ye = void 0;
|
|
438
445
|
}, e);
|
|
439
446
|
}
|
|
440
447
|
};
|
|
441
448
|
}
|
|
442
|
-
function
|
|
443
|
-
clearTimeout(
|
|
449
|
+
function yo() {
|
|
450
|
+
clearTimeout(Ye), Ye = void 0;
|
|
444
451
|
}
|
|
445
452
|
function bn(t, e, n) {
|
|
446
453
|
t.scrollLeft += e, t.scrollTop += n;
|
|
447
454
|
}
|
|
448
|
-
function
|
|
455
|
+
function wn(t) {
|
|
449
456
|
var e = window.Polymer, n = window.jQuery || window.Zepto;
|
|
450
457
|
return e && e.dom ? e.dom(t).cloneNode(!0) : n ? n(t).clone(!0)[0] : t.cloneNode(!0);
|
|
451
458
|
}
|
|
452
459
|
var Z = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
453
|
-
function
|
|
460
|
+
function _o() {
|
|
454
461
|
var t = [], e;
|
|
455
462
|
return {
|
|
456
463
|
captureAnimationState: function() {
|
|
457
464
|
if (t = [], !!this.options.animation) {
|
|
458
465
|
var o = [].slice.call(this.el.children);
|
|
459
466
|
o.forEach(function(r) {
|
|
460
|
-
if (!(
|
|
467
|
+
if (!(b(r, "display") === "none" || r === w.ghost)) {
|
|
461
468
|
t.push({
|
|
462
469
|
target: r,
|
|
463
|
-
rect:
|
|
470
|
+
rect: V(r)
|
|
464
471
|
});
|
|
465
|
-
var i =
|
|
472
|
+
var i = se({}, t[t.length - 1].rect);
|
|
466
473
|
if (r.thisAnimationDuration) {
|
|
467
|
-
var a =
|
|
474
|
+
var a = Oe(r, !0);
|
|
468
475
|
a && (i.top -= a.f, i.left -= a.e);
|
|
469
476
|
}
|
|
470
477
|
r.fromRect = i;
|
|
@@ -476,7 +483,7 @@ function yo() {
|
|
|
476
483
|
t.push(o);
|
|
477
484
|
},
|
|
478
485
|
removeAnimationState: function(o) {
|
|
479
|
-
t.splice(
|
|
486
|
+
t.splice(bo(t, {
|
|
480
487
|
target: o
|
|
481
488
|
}), 1);
|
|
482
489
|
},
|
|
@@ -488,9 +495,9 @@ function yo() {
|
|
|
488
495
|
}
|
|
489
496
|
var i = !1, a = 0;
|
|
490
497
|
t.forEach(function(s) {
|
|
491
|
-
var l = 0, u = s.target,
|
|
492
|
-
|
|
493
|
-
(
|
|
498
|
+
var l = 0, u = s.target, h = u.fromRect, d = V(u), g = u.prevFromRect, T = u.prevToRect, y = s.rect, _ = Oe(u, !0);
|
|
499
|
+
_ && (d.top -= _.f, d.left -= _.e), u.toRect = d, u.thisAnimationDuration && vt(g, d) && !vt(h, d) && // Make sure animatingRect is on line between toRect & fromRect
|
|
500
|
+
(y.top - d.top) / (y.left - d.left) === (h.top - d.top) / (h.left - d.left) && (l = Eo(y, g, T, r.options)), vt(d, h) || (u.prevFromRect = h, u.prevToRect = d, l || (l = r.options.animation), r.animate(u, y, d, l)), l && (i = !0, a = Math.max(a, l), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
|
|
494
501
|
u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
|
|
495
502
|
}, l), u.thisAnimationDuration = l);
|
|
496
503
|
}), clearTimeout(e), i ? e = setTimeout(function() {
|
|
@@ -499,31 +506,31 @@ function yo() {
|
|
|
499
506
|
},
|
|
500
507
|
animate: function(o, r, i, a) {
|
|
501
508
|
if (a) {
|
|
502
|
-
|
|
503
|
-
var s =
|
|
504
|
-
o.animatingX = !!
|
|
505
|
-
|
|
509
|
+
b(o, "transition", ""), b(o, "transform", "");
|
|
510
|
+
var s = Oe(this.el), l = s && s.a, u = s && s.d, h = (r.left - i.left) / (l || 1), d = (r.top - i.top) / (u || 1);
|
|
511
|
+
o.animatingX = !!h, o.animatingY = !!d, b(o, "transform", "translate3d(" + h + "px," + d + "px,0)"), this.forRepaintDummy = So(o), b(o, "transition", "transform " + a + "ms" + (this.options.easing ? " " + this.options.easing : "")), b(o, "transform", "translate3d(0,0,0)"), typeof o.animated == "number" && clearTimeout(o.animated), o.animated = setTimeout(function() {
|
|
512
|
+
b(o, "transition", ""), b(o, "transform", ""), o.animated = !1, o.animatingX = !1, o.animatingY = !1;
|
|
506
513
|
}, a);
|
|
507
514
|
}
|
|
508
515
|
}
|
|
509
516
|
};
|
|
510
517
|
}
|
|
511
|
-
function
|
|
518
|
+
function So(t) {
|
|
512
519
|
return t.offsetWidth;
|
|
513
520
|
}
|
|
514
|
-
function
|
|
521
|
+
function Eo(t, e, n, o) {
|
|
515
522
|
return Math.sqrt(Math.pow(e.top - t.top, 2) + Math.pow(e.left - t.left, 2)) / Math.sqrt(Math.pow(e.top - n.top, 2) + Math.pow(e.left - n.left, 2)) * o.animation;
|
|
516
523
|
}
|
|
517
|
-
var
|
|
524
|
+
var Te = [], bt = {
|
|
518
525
|
initializeByDefault: !0
|
|
519
|
-
},
|
|
526
|
+
}, Ge = {
|
|
520
527
|
mount: function(e) {
|
|
521
528
|
for (var n in bt)
|
|
522
529
|
bt.hasOwnProperty(n) && !(n in e) && (e[n] = bt[n]);
|
|
523
|
-
|
|
530
|
+
Te.forEach(function(o) {
|
|
524
531
|
if (o.pluginName === e.pluginName)
|
|
525
532
|
throw "Sortable: Cannot mount plugin ".concat(e.pluginName, " more than once");
|
|
526
|
-
}),
|
|
533
|
+
}), Te.push(e);
|
|
527
534
|
},
|
|
528
535
|
pluginEvent: function(e, n, o) {
|
|
529
536
|
var r = this;
|
|
@@ -531,20 +538,20 @@ var Ee = [], bt = {
|
|
|
531
538
|
r.eventCanceled = !0;
|
|
532
539
|
};
|
|
533
540
|
var i = e + "Global";
|
|
534
|
-
|
|
535
|
-
n[a.pluginName] && (n[a.pluginName][i] && n[a.pluginName][i](
|
|
541
|
+
Te.forEach(function(a) {
|
|
542
|
+
n[a.pluginName] && (n[a.pluginName][i] && n[a.pluginName][i](se({
|
|
536
543
|
sortable: n
|
|
537
|
-
}, o)), n.options[a.pluginName] && n[a.pluginName][e] && n[a.pluginName][e](
|
|
544
|
+
}, o)), n.options[a.pluginName] && n[a.pluginName][e] && n[a.pluginName][e](se({
|
|
538
545
|
sortable: n
|
|
539
546
|
}, o)));
|
|
540
547
|
});
|
|
541
548
|
},
|
|
542
549
|
initializePlugins: function(e, n, o, r) {
|
|
543
|
-
|
|
550
|
+
Te.forEach(function(s) {
|
|
544
551
|
var l = s.pluginName;
|
|
545
552
|
if (!(!e.options[l] && !s.initializeByDefault)) {
|
|
546
553
|
var u = new s(e, n, e.options);
|
|
547
|
-
u.sortable = e, u.options = e.options, e[l] = u,
|
|
554
|
+
u.sortable = e, u.options = e.options, e[l] = u, de(o, u.defaults);
|
|
548
555
|
}
|
|
549
556
|
});
|
|
550
557
|
for (var i in e.options)
|
|
@@ -555,60 +562,60 @@ var Ee = [], bt = {
|
|
|
555
562
|
},
|
|
556
563
|
getEventProperties: function(e, n) {
|
|
557
564
|
var o = {};
|
|
558
|
-
return
|
|
559
|
-
typeof r.eventProperties == "function" &&
|
|
565
|
+
return Te.forEach(function(r) {
|
|
566
|
+
typeof r.eventProperties == "function" && de(o, r.eventProperties.call(n[r.pluginName], e));
|
|
560
567
|
}), o;
|
|
561
568
|
},
|
|
562
569
|
modifyOption: function(e, n, o) {
|
|
563
570
|
var r;
|
|
564
|
-
return
|
|
571
|
+
return Te.forEach(function(i) {
|
|
565
572
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[n] == "function" && (r = i.optionListeners[n].call(e[i.pluginName], o));
|
|
566
573
|
}), r;
|
|
567
574
|
}
|
|
568
575
|
};
|
|
569
|
-
function
|
|
570
|
-
var e = t.sortable, n = t.rootEl, o = t.name, r = t.targetEl, i = t.cloneEl, a = t.toEl, s = t.fromEl, l = t.oldIndex, u = t.newIndex,
|
|
576
|
+
function To(t) {
|
|
577
|
+
var e = t.sortable, n = t.rootEl, o = t.name, r = t.targetEl, i = t.cloneEl, a = t.toEl, s = t.fromEl, l = t.oldIndex, u = t.newIndex, h = t.oldDraggableIndex, d = t.newDraggableIndex, g = t.originalEvent, T = t.putSortable, y = t.extraEventProperties;
|
|
571
578
|
if (e = e || n && n[Z], !!e) {
|
|
572
|
-
var
|
|
573
|
-
window.CustomEvent && !
|
|
579
|
+
var _, C = e.options, v = "on" + o.charAt(0).toUpperCase() + o.substr(1);
|
|
580
|
+
window.CustomEvent && !fe && !We ? _ = new CustomEvent(o, {
|
|
574
581
|
bubbles: !0,
|
|
575
582
|
cancelable: !0
|
|
576
|
-
}) : (
|
|
577
|
-
var
|
|
578
|
-
for (var
|
|
579
|
-
|
|
580
|
-
n && n.dispatchEvent(
|
|
583
|
+
}) : (_ = document.createEvent("Event"), _.initEvent(o, !0, !0)), _.to = a || n, _.from = s || n, _.item = r || n, _.clone = i, _.oldIndex = l, _.newIndex = u, _.oldDraggableIndex = h, _.newDraggableIndex = d, _.originalEvent = g, _.pullMode = T ? T.lastPutMode : void 0;
|
|
584
|
+
var m = se(se({}, y), Ge.getEventProperties(o, e));
|
|
585
|
+
for (var L in m)
|
|
586
|
+
_[L] = m[L];
|
|
587
|
+
n && n.dispatchEvent(_), C[v] && C[v].call(e, _);
|
|
581
588
|
}
|
|
582
589
|
}
|
|
583
|
-
var
|
|
584
|
-
var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = o.evt, i =
|
|
585
|
-
|
|
586
|
-
dragEl:
|
|
587
|
-
parentEl:
|
|
588
|
-
ghostEl:
|
|
589
|
-
rootEl:
|
|
590
|
-
nextEl:
|
|
590
|
+
var Co = ["evt"], U = function(e, n) {
|
|
591
|
+
var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = o.evt, i = mo(o, Co);
|
|
592
|
+
Ge.pluginEvent.bind(w)(e, n, se({
|
|
593
|
+
dragEl: f,
|
|
594
|
+
parentEl: $,
|
|
595
|
+
ghostEl: E,
|
|
596
|
+
rootEl: N,
|
|
597
|
+
nextEl: Ee,
|
|
591
598
|
lastDownEl: ot,
|
|
592
|
-
cloneEl:
|
|
593
|
-
cloneHidden:
|
|
594
|
-
dragStarted:
|
|
595
|
-
putSortable:
|
|
596
|
-
activeSortable:
|
|
599
|
+
cloneEl: B,
|
|
600
|
+
cloneHidden: ve,
|
|
601
|
+
dragStarted: Ve,
|
|
602
|
+
putSortable: R,
|
|
603
|
+
activeSortable: w.active,
|
|
597
604
|
originalEvent: r,
|
|
598
|
-
oldIndex:
|
|
599
|
-
oldDraggableIndex:
|
|
605
|
+
oldIndex: Ie,
|
|
606
|
+
oldDraggableIndex: je,
|
|
600
607
|
newIndex: q,
|
|
601
|
-
newDraggableIndex:
|
|
608
|
+
newDraggableIndex: ge,
|
|
602
609
|
hideGhostForTarget: En,
|
|
603
610
|
unhideGhostForTarget: Tn,
|
|
604
611
|
cloneNowHidden: function() {
|
|
605
|
-
|
|
612
|
+
ve = !0;
|
|
606
613
|
},
|
|
607
614
|
cloneNowShown: function() {
|
|
608
|
-
|
|
615
|
+
ve = !1;
|
|
609
616
|
},
|
|
610
617
|
dispatchSortableEvent: function(s) {
|
|
611
|
-
|
|
618
|
+
j({
|
|
612
619
|
sortable: n,
|
|
613
620
|
name: s,
|
|
614
621
|
originalEvent: r
|
|
@@ -616,63 +623,63 @@ var Eo = ["evt"], U = function(e, n) {
|
|
|
616
623
|
}
|
|
617
624
|
}, i));
|
|
618
625
|
};
|
|
619
|
-
function
|
|
620
|
-
|
|
621
|
-
putSortable:
|
|
622
|
-
cloneEl:
|
|
623
|
-
targetEl:
|
|
624
|
-
rootEl:
|
|
625
|
-
oldIndex:
|
|
626
|
-
oldDraggableIndex:
|
|
626
|
+
function j(t) {
|
|
627
|
+
To(se({
|
|
628
|
+
putSortable: R,
|
|
629
|
+
cloneEl: B,
|
|
630
|
+
targetEl: f,
|
|
631
|
+
rootEl: N,
|
|
632
|
+
oldIndex: Ie,
|
|
633
|
+
oldDraggableIndex: je,
|
|
627
634
|
newIndex: q,
|
|
628
|
-
newDraggableIndex:
|
|
635
|
+
newDraggableIndex: ge
|
|
629
636
|
}, t));
|
|
630
637
|
}
|
|
631
|
-
var
|
|
638
|
+
var f, $, E, N, Ee, ot, B, ve, Ie, q, je, ge, Je, R, De = !1, ct = !1, dt = [], _e, te, wt, yt, Zt, Kt, Ve, Ce, ze, Ue = !1, Qe = !1, rt, X, _t = [], It = !1, ft = [], gt = typeof document != "undefined", et = hn, Jt = We || fe ? "cssFloat" : "float", Do = gt && !pn && !hn && "draggable" in document.createElement("div"), yn = function() {
|
|
632
639
|
if (gt) {
|
|
633
|
-
if (
|
|
640
|
+
if (fe)
|
|
634
641
|
return !1;
|
|
635
642
|
var t = document.createElement("x");
|
|
636
643
|
return t.style.cssText = "pointer-events:auto", t.style.pointerEvents === "auto";
|
|
637
644
|
}
|
|
638
645
|
}(), _n = function(e, n) {
|
|
639
|
-
var o =
|
|
646
|
+
var o = b(e), r = parseInt(o.width) - parseInt(o.paddingLeft) - parseInt(o.paddingRight) - parseInt(o.borderLeftWidth) - parseInt(o.borderRightWidth), i = ke(e, 0, n), a = ke(e, 1, n), s = i && b(i), l = a && b(a), u = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + V(i).width, h = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + V(a).width;
|
|
640
647
|
if (o.display === "flex")
|
|
641
648
|
return o.flexDirection === "column" || o.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
642
649
|
if (o.display === "grid")
|
|
643
650
|
return o.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
644
651
|
if (i && s.float && s.float !== "none") {
|
|
645
|
-
var
|
|
646
|
-
return a && (l.clear === "both" || l.clear ===
|
|
652
|
+
var d = s.float === "left" ? "left" : "right";
|
|
653
|
+
return a && (l.clear === "both" || l.clear === d) ? "vertical" : "horizontal";
|
|
647
654
|
}
|
|
648
|
-
return i && (s.display === "block" || s.display === "flex" || s.display === "table" || s.display === "grid" || u >= r && o[Jt] === "none" || a && o[Jt] === "none" && u +
|
|
649
|
-
},
|
|
655
|
+
return i && (s.display === "block" || s.display === "flex" || s.display === "table" || s.display === "grid" || u >= r && o[Jt] === "none" || a && o[Jt] === "none" && u + h > r) ? "vertical" : "horizontal";
|
|
656
|
+
}, xo = function(e, n, o) {
|
|
650
657
|
var r = o ? e.left : e.top, i = o ? e.right : e.bottom, a = o ? e.width : e.height, s = o ? n.left : n.top, l = o ? n.right : n.bottom, u = o ? n.width : n.height;
|
|
651
658
|
return r === s || i === l || r + a / 2 === s + u / 2;
|
|
652
|
-
},
|
|
659
|
+
}, Io = function(e, n) {
|
|
653
660
|
var o;
|
|
654
661
|
return dt.some(function(r) {
|
|
655
662
|
var i = r[Z].options.emptyInsertThreshold;
|
|
656
663
|
if (!(!i || Nt(r))) {
|
|
657
|
-
var a =
|
|
664
|
+
var a = V(r), s = e >= a.left - i && e <= a.right + i, l = n >= a.top - i && n <= a.bottom + i;
|
|
658
665
|
if (s && l)
|
|
659
666
|
return o = r;
|
|
660
667
|
}
|
|
661
668
|
}), o;
|
|
662
669
|
}, Sn = function(e) {
|
|
663
670
|
function n(i, a) {
|
|
664
|
-
return function(s, l, u,
|
|
665
|
-
var
|
|
666
|
-
if (i == null && (a ||
|
|
671
|
+
return function(s, l, u, h) {
|
|
672
|
+
var d = s.options.group.name && l.options.group.name && s.options.group.name === l.options.group.name;
|
|
673
|
+
if (i == null && (a || d))
|
|
667
674
|
return !0;
|
|
668
675
|
if (i == null || i === !1)
|
|
669
676
|
return !1;
|
|
670
677
|
if (a && i === "clone")
|
|
671
678
|
return i;
|
|
672
679
|
if (typeof i == "function")
|
|
673
|
-
return n(i(s, l, u,
|
|
674
|
-
var
|
|
675
|
-
return i === !0 || typeof i == "string" && i ===
|
|
680
|
+
return n(i(s, l, u, h), a)(s, l, u, h);
|
|
681
|
+
var g = (a ? s : l).options.group.name;
|
|
682
|
+
return i === !0 || typeof i == "string" && i === g || i.join && i.indexOf(g) > -1;
|
|
676
683
|
};
|
|
677
684
|
}
|
|
678
685
|
var o = {}, r = e.group;
|
|
@@ -680,18 +687,18 @@ var d, B, _, A, Se, ot, F, pe, xe, q, Le, he, Ke, X, Ce = !1, ct = !1, dt = [],
|
|
|
680
687
|
name: r
|
|
681
688
|
}), o.name = r.name, o.checkPull = n(r.pull, !0), o.checkPut = n(r.put), o.revertClone = r.revertClone, e.group = o;
|
|
682
689
|
}, En = function() {
|
|
683
|
-
!
|
|
690
|
+
!yn && E && b(E, "display", "none");
|
|
684
691
|
}, Tn = function() {
|
|
685
|
-
!
|
|
692
|
+
!yn && E && b(E, "display", "");
|
|
686
693
|
};
|
|
687
694
|
gt && !pn && document.addEventListener("click", function(t) {
|
|
688
695
|
if (ct)
|
|
689
696
|
return t.preventDefault(), t.stopPropagation && t.stopPropagation(), t.stopImmediatePropagation && t.stopImmediatePropagation(), ct = !1, !1;
|
|
690
697
|
}, !0);
|
|
691
|
-
var
|
|
692
|
-
if (
|
|
698
|
+
var Se = function(e) {
|
|
699
|
+
if (f) {
|
|
693
700
|
e = e.touches ? e.touches[0] : e;
|
|
694
|
-
var n =
|
|
701
|
+
var n = Io(e.clientX, e.clientY);
|
|
695
702
|
if (n) {
|
|
696
703
|
var o = {};
|
|
697
704
|
for (var r in e)
|
|
@@ -699,13 +706,13 @@ var _e = function(e) {
|
|
|
699
706
|
o.target = o.rootEl = n, o.preventDefault = void 0, o.stopPropagation = void 0, n[Z]._onDragOver(o);
|
|
700
707
|
}
|
|
701
708
|
}
|
|
702
|
-
},
|
|
703
|
-
|
|
709
|
+
}, Po = function(e) {
|
|
710
|
+
f && f.parentNode[Z]._isOutsideThisEl(e.target);
|
|
704
711
|
};
|
|
705
|
-
function
|
|
712
|
+
function w(t, e) {
|
|
706
713
|
if (!(t && t.nodeType && t.nodeType === 1))
|
|
707
714
|
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));
|
|
708
|
-
this.el = t, this.options = e =
|
|
715
|
+
this.el = t, this.options = e = de({}, e), t[Z] = this;
|
|
709
716
|
var n = {
|
|
710
717
|
group: null,
|
|
711
718
|
sort: !0,
|
|
@@ -748,33 +755,33 @@ function b(t, e) {
|
|
|
748
755
|
x: 0,
|
|
749
756
|
y: 0
|
|
750
757
|
},
|
|
751
|
-
supportPointer:
|
|
758
|
+
supportPointer: w.supportPointer !== !1 && "PointerEvent" in window && !Xe,
|
|
752
759
|
emptyInsertThreshold: 5
|
|
753
760
|
};
|
|
754
|
-
|
|
761
|
+
Ge.initializePlugins(this, t, n);
|
|
755
762
|
for (var o in n)
|
|
756
763
|
!(o in e) && (e[o] = n[o]);
|
|
757
764
|
Sn(e);
|
|
758
765
|
for (var r in this)
|
|
759
766
|
r.charAt(0) === "_" && typeof this[r] == "function" && (this[r] = this[r].bind(this));
|
|
760
|
-
this.nativeDraggable = e.forceFallback ? !1 :
|
|
767
|
+
this.nativeDraggable = e.forceFallback ? !1 : Do, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? x(t, "pointerdown", this._onTapStart) : (x(t, "mousedown", this._onTapStart), x(t, "touchstart", this._onTapStart)), this.nativeDraggable && (x(t, "dragover", this), x(t, "dragenter", this)), dt.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), de(this, _o());
|
|
761
768
|
}
|
|
762
|
-
|
|
769
|
+
w.prototype = /** @lends Sortable.prototype */
|
|
763
770
|
{
|
|
764
|
-
constructor:
|
|
771
|
+
constructor: w,
|
|
765
772
|
_isOutsideThisEl: function(e) {
|
|
766
|
-
!this.el.contains(e) && e !== this.el && (
|
|
773
|
+
!this.el.contains(e) && e !== this.el && (Ce = null);
|
|
767
774
|
},
|
|
768
775
|
_getDirection: function(e, n) {
|
|
769
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, n,
|
|
776
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, n, f) : this.options.direction;
|
|
770
777
|
},
|
|
771
778
|
_onTapStart: function(e) {
|
|
772
779
|
if (e.cancelable) {
|
|
773
|
-
var n = this, o = this.el, r = this.options, i = r.preventOnFilter, a = e.type, s = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, l = (s || e).target, u = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || l,
|
|
774
|
-
if (Fo(o), !
|
|
775
|
-
if (
|
|
776
|
-
if (
|
|
777
|
-
|
|
780
|
+
var n = this, o = this.el, r = this.options, i = r.preventOnFilter, a = e.type, s = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, l = (s || e).target, u = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || l, h = r.filter;
|
|
781
|
+
if (Fo(o), !f && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !u.isContentEditable && !(!this.nativeDraggable && Xe && l && l.tagName.toUpperCase() === "SELECT") && (l = re(l, r.draggable, o, !1), !(l && l.animated) && ot !== l)) {
|
|
782
|
+
if (Ie = K(l), je = K(l, r.draggable), typeof h == "function") {
|
|
783
|
+
if (h.call(this, e, l, this)) {
|
|
784
|
+
j({
|
|
778
785
|
sortable: n,
|
|
779
786
|
rootEl: u,
|
|
780
787
|
name: "filter",
|
|
@@ -786,11 +793,11 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
786
793
|
}), i && e.cancelable && e.preventDefault();
|
|
787
794
|
return;
|
|
788
795
|
}
|
|
789
|
-
} else if (
|
|
790
|
-
if (
|
|
791
|
-
return
|
|
796
|
+
} else if (h && (h = h.split(",").some(function(d) {
|
|
797
|
+
if (d = re(u, d.trim(), o, !1), d)
|
|
798
|
+
return j({
|
|
792
799
|
sortable: n,
|
|
793
|
-
rootEl:
|
|
800
|
+
rootEl: d,
|
|
794
801
|
name: "filter",
|
|
795
802
|
targetEl: l,
|
|
796
803
|
fromEl: o,
|
|
@@ -798,44 +805,44 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
798
805
|
}), U("filter", n, {
|
|
799
806
|
evt: e
|
|
800
807
|
}), !0;
|
|
801
|
-
}),
|
|
808
|
+
}), h)) {
|
|
802
809
|
i && e.cancelable && e.preventDefault();
|
|
803
810
|
return;
|
|
804
811
|
}
|
|
805
|
-
r.handle && !
|
|
812
|
+
r.handle && !re(u, r.handle, o, !1) || this._prepareDragStart(e, s, l);
|
|
806
813
|
}
|
|
807
814
|
}
|
|
808
815
|
},
|
|
809
816
|
_prepareDragStart: function(e, n, o) {
|
|
810
817
|
var r = this, i = r.el, a = r.options, s = i.ownerDocument, l;
|
|
811
|
-
if (o && !
|
|
812
|
-
var u =
|
|
813
|
-
if (
|
|
814
|
-
target:
|
|
818
|
+
if (o && !f && o.parentNode === i) {
|
|
819
|
+
var u = V(o);
|
|
820
|
+
if (N = i, f = o, $ = f.parentNode, Ee = f.nextSibling, ot = o, Je = a.group, w.dragged = f, _e = {
|
|
821
|
+
target: f,
|
|
815
822
|
clientX: (n || e).clientX,
|
|
816
823
|
clientY: (n || e).clientY
|
|
817
|
-
}, Zt =
|
|
824
|
+
}, Zt = _e.clientX - u.left, Kt = _e.clientY - u.top, this._lastX = (n || e).clientX, this._lastY = (n || e).clientY, f.style["will-change"] = "all", l = function() {
|
|
818
825
|
if (U("delayEnded", r, {
|
|
819
826
|
evt: e
|
|
820
|
-
}),
|
|
827
|
+
}), w.eventCanceled) {
|
|
821
828
|
r._onDrop();
|
|
822
829
|
return;
|
|
823
830
|
}
|
|
824
|
-
r._disableDelayedDragEvents(), !Ut && r.nativeDraggable && (
|
|
831
|
+
r._disableDelayedDragEvents(), !Ut && r.nativeDraggable && (f.draggable = !0), r._triggerDragStart(e, n), j({
|
|
825
832
|
sortable: r,
|
|
826
833
|
name: "choose",
|
|
827
834
|
originalEvent: e
|
|
828
|
-
}), G(
|
|
829
|
-
}, a.ignore.split(",").forEach(function(
|
|
830
|
-
gn(
|
|
831
|
-
}),
|
|
835
|
+
}), G(f, a.chosenClass, !0);
|
|
836
|
+
}, a.ignore.split(",").forEach(function(h) {
|
|
837
|
+
gn(f, h.trim(), St);
|
|
838
|
+
}), x(s, "dragover", Se), x(s, "mousemove", Se), x(s, "touchmove", Se), x(s, "mouseup", r._onDrop), x(s, "touchend", r._onDrop), x(s, "touchcancel", r._onDrop), Ut && this.nativeDraggable && (this.options.touchStartThreshold = 4, f.draggable = !0), U("delayStart", this, {
|
|
832
839
|
evt: e
|
|
833
|
-
}), a.delay && (!a.delayOnTouchOnly || n) && (!this.nativeDraggable || !(
|
|
834
|
-
if (
|
|
840
|
+
}), a.delay && (!a.delayOnTouchOnly || n) && (!this.nativeDraggable || !(We || fe))) {
|
|
841
|
+
if (w.eventCanceled) {
|
|
835
842
|
this._onDrop();
|
|
836
843
|
return;
|
|
837
844
|
}
|
|
838
|
-
|
|
845
|
+
x(s, "mouseup", r._disableDelayedDrag), x(s, "touchend", r._disableDelayedDrag), x(s, "touchcancel", r._disableDelayedDrag), x(s, "mousemove", r._delayedDragTouchMoveHandler), x(s, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && x(s, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(l, a.delay);
|
|
839
846
|
} else
|
|
840
847
|
l();
|
|
841
848
|
}
|
|
@@ -845,14 +852,14 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
845
852
|
Math.max(Math.abs(n.clientX - this._lastX), Math.abs(n.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
846
853
|
},
|
|
847
854
|
_disableDelayedDrag: function() {
|
|
848
|
-
|
|
855
|
+
f && St(f), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
849
856
|
},
|
|
850
857
|
_disableDelayedDragEvents: function() {
|
|
851
858
|
var e = this.el.ownerDocument;
|
|
852
|
-
|
|
859
|
+
D(e, "mouseup", this._disableDelayedDrag), D(e, "touchend", this._disableDelayedDrag), D(e, "touchcancel", this._disableDelayedDrag), D(e, "mousemove", this._delayedDragTouchMoveHandler), D(e, "touchmove", this._delayedDragTouchMoveHandler), D(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
853
860
|
},
|
|
854
861
|
_triggerDragStart: function(e, n) {
|
|
855
|
-
n = n || e.pointerType == "touch" && e, !this.nativeDraggable || n ? this.options.supportPointer ?
|
|
862
|
+
n = n || e.pointerType == "touch" && e, !this.nativeDraggable || n ? this.options.supportPointer ? x(document, "pointermove", this._onTouchMove) : n ? x(document, "touchmove", this._onTouchMove) : x(document, "mousemove", this._onTouchMove) : (x(f, "dragend", this), x(N, "dragstart", this._onDragStart));
|
|
856
863
|
try {
|
|
857
864
|
document.selection ? it(function() {
|
|
858
865
|
document.selection.empty();
|
|
@@ -861,12 +868,12 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
861
868
|
}
|
|
862
869
|
},
|
|
863
870
|
_dragStarted: function(e, n) {
|
|
864
|
-
if (
|
|
871
|
+
if (De = !1, N && f) {
|
|
865
872
|
U("dragStarted", this, {
|
|
866
873
|
evt: n
|
|
867
|
-
}), this.nativeDraggable &&
|
|
874
|
+
}), this.nativeDraggable && x(document, "dragover", Po);
|
|
868
875
|
var o = this.options;
|
|
869
|
-
!e && G(
|
|
876
|
+
!e && G(f, o.dragClass, !1), G(f, o.ghostClass, !0), w.active = this, e && this._appendGhost(), j({
|
|
870
877
|
sortable: this,
|
|
871
878
|
name: "start",
|
|
872
879
|
originalEvent: n
|
|
@@ -875,17 +882,17 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
875
882
|
this._nulling();
|
|
876
883
|
},
|
|
877
884
|
_emulateDragOver: function() {
|
|
878
|
-
if (
|
|
879
|
-
this._lastX =
|
|
880
|
-
for (var e = document.elementFromPoint(
|
|
885
|
+
if (te) {
|
|
886
|
+
this._lastX = te.clientX, this._lastY = te.clientY, En();
|
|
887
|
+
for (var e = document.elementFromPoint(te.clientX, te.clientY), n = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(te.clientX, te.clientY), e !== n); )
|
|
881
888
|
n = e;
|
|
882
|
-
if (
|
|
889
|
+
if (f.parentNode[Z]._isOutsideThisEl(e), n)
|
|
883
890
|
do {
|
|
884
891
|
if (n[Z]) {
|
|
885
892
|
var o = void 0;
|
|
886
893
|
if (o = n[Z]._onDragOver({
|
|
887
|
-
clientX:
|
|
888
|
-
clientY:
|
|
894
|
+
clientX: te.clientX,
|
|
895
|
+
clientY: te.clientY,
|
|
889
896
|
target: e,
|
|
890
897
|
rootEl: n
|
|
891
898
|
}), o && !this.options.dragoverBubble)
|
|
@@ -897,209 +904,209 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
897
904
|
}
|
|
898
905
|
},
|
|
899
906
|
_onTouchMove: function(e) {
|
|
900
|
-
if (
|
|
901
|
-
var n = this.options, o = n.fallbackTolerance, r = n.fallbackOffset, i = e.touches ? e.touches[0] : e, a =
|
|
902
|
-
if (!
|
|
907
|
+
if (_e) {
|
|
908
|
+
var n = this.options, o = n.fallbackTolerance, r = n.fallbackOffset, i = e.touches ? e.touches[0] : e, a = E && Oe(E, !0), s = E && a && a.a, l = E && a && a.d, u = et && X && qt(X), h = (i.clientX - _e.clientX + r.x) / (s || 1) + (u ? u[0] - _t[0] : 0) / (s || 1), d = (i.clientY - _e.clientY + r.y) / (l || 1) + (u ? u[1] - _t[1] : 0) / (l || 1);
|
|
909
|
+
if (!w.active && !De) {
|
|
903
910
|
if (o && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < o)
|
|
904
911
|
return;
|
|
905
912
|
this._onDragStart(e, !0);
|
|
906
913
|
}
|
|
907
|
-
if (
|
|
908
|
-
a ? (a.e +=
|
|
914
|
+
if (E) {
|
|
915
|
+
a ? (a.e += h - (wt || 0), a.f += d - (yt || 0)) : a = {
|
|
909
916
|
a: 1,
|
|
910
917
|
b: 0,
|
|
911
918
|
c: 0,
|
|
912
919
|
d: 1,
|
|
913
|
-
e:
|
|
914
|
-
f:
|
|
920
|
+
e: h,
|
|
921
|
+
f: d
|
|
915
922
|
};
|
|
916
|
-
var
|
|
917
|
-
|
|
923
|
+
var g = "matrix(".concat(a.a, ",").concat(a.b, ",").concat(a.c, ",").concat(a.d, ",").concat(a.e, ",").concat(a.f, ")");
|
|
924
|
+
b(E, "webkitTransform", g), b(E, "mozTransform", g), b(E, "msTransform", g), b(E, "transform", g), wt = h, yt = d, te = i;
|
|
918
925
|
}
|
|
919
926
|
e.cancelable && e.preventDefault();
|
|
920
927
|
}
|
|
921
928
|
},
|
|
922
929
|
_appendGhost: function() {
|
|
923
|
-
if (!
|
|
924
|
-
var e = this.options.fallbackOnBody ? document.body :
|
|
925
|
-
if (
|
|
926
|
-
for (
|
|
927
|
-
|
|
928
|
-
|
|
930
|
+
if (!E) {
|
|
931
|
+
var e = this.options.fallbackOnBody ? document.body : N, n = V(f, !0, et, !0, e), o = this.options;
|
|
932
|
+
if (et) {
|
|
933
|
+
for (X = e; b(X, "position") === "static" && b(X, "transform") === "none" && X !== document; )
|
|
934
|
+
X = X.parentNode;
|
|
935
|
+
X !== document.body && X !== document.documentElement ? (X === document && (X = ae()), n.top += X.scrollTop, n.left += X.scrollLeft) : X = ae(), _t = qt(X);
|
|
929
936
|
}
|
|
930
|
-
|
|
937
|
+
E = f.cloneNode(!0), G(E, o.ghostClass, !1), G(E, o.fallbackClass, !0), G(E, o.dragClass, !0), b(E, "transition", ""), b(E, "transform", ""), b(E, "box-sizing", "border-box"), b(E, "margin", 0), b(E, "top", n.top), b(E, "left", n.left), b(E, "width", n.width), b(E, "height", n.height), b(E, "opacity", "0.8"), b(E, "position", et ? "absolute" : "fixed"), b(E, "zIndex", "100000"), b(E, "pointerEvents", "none"), w.ghost = E, e.appendChild(E), b(E, "transform-origin", Zt / parseInt(E.style.width) * 100 + "% " + Kt / parseInt(E.style.height) * 100 + "%");
|
|
931
938
|
}
|
|
932
939
|
},
|
|
933
940
|
_onDragStart: function(e, n) {
|
|
934
941
|
var o = this, r = e.dataTransfer, i = o.options;
|
|
935
942
|
if (U("dragStart", this, {
|
|
936
943
|
evt: e
|
|
937
|
-
}),
|
|
944
|
+
}), w.eventCanceled) {
|
|
938
945
|
this._onDrop();
|
|
939
946
|
return;
|
|
940
947
|
}
|
|
941
|
-
U("setupClone", this),
|
|
942
|
-
U("clone", o), !
|
|
948
|
+
U("setupClone", this), w.eventCanceled || (B = wn(f), B.removeAttribute("id"), B.draggable = !1, B.style["will-change"] = "", this._hideClone(), G(B, this.options.chosenClass, !1), w.clone = B), o.cloneId = it(function() {
|
|
949
|
+
U("clone", o), !w.eventCanceled && (o.options.removeCloneOnHide || N.insertBefore(B, f), o._hideClone(), j({
|
|
943
950
|
sortable: o,
|
|
944
951
|
name: "clone"
|
|
945
952
|
}));
|
|
946
|
-
}), !n && G(
|
|
953
|
+
}), !n && G(f, i.dragClass, !0), n ? (ct = !0, o._loopId = setInterval(o._emulateDragOver, 50)) : (D(document, "mouseup", o._onDrop), D(document, "touchend", o._onDrop), D(document, "touchcancel", o._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(o, r, f)), x(document, "drop", o), b(f, "transform", "translateZ(0)")), De = !0, o._dragStartId = it(o._dragStarted.bind(o, n, e)), x(document, "selectstart", o), Ve = !0, Xe && b(document.body, "user-select", "none");
|
|
947
954
|
},
|
|
948
955
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
949
956
|
_onDragOver: function(e) {
|
|
950
|
-
var n = this.el, o = e.target, r, i, a, s = this.options, l = s.group, u =
|
|
957
|
+
var n = this.el, o = e.target, r, i, a, s = this.options, l = s.group, u = w.active, h = Je === l, d = s.sort, g = R || u, T, y = this, _ = !1;
|
|
951
958
|
if (It)
|
|
952
959
|
return;
|
|
953
|
-
function
|
|
954
|
-
U(
|
|
960
|
+
function C(Fe, kn) {
|
|
961
|
+
U(Fe, y, se({
|
|
955
962
|
evt: e,
|
|
956
|
-
isOwner:
|
|
957
|
-
axis:
|
|
963
|
+
isOwner: h,
|
|
964
|
+
axis: T ? "vertical" : "horizontal",
|
|
958
965
|
revert: a,
|
|
959
966
|
dragRect: r,
|
|
960
967
|
targetRect: i,
|
|
961
|
-
canSort:
|
|
962
|
-
fromSortable:
|
|
968
|
+
canSort: d,
|
|
969
|
+
fromSortable: g,
|
|
963
970
|
target: o,
|
|
964
|
-
completed:
|
|
965
|
-
onMove: function(
|
|
966
|
-
return
|
|
971
|
+
completed: m,
|
|
972
|
+
onMove: function(Lt, Nn) {
|
|
973
|
+
return tt(N, n, f, r, Lt, V(Lt), e, Nn);
|
|
967
974
|
},
|
|
968
|
-
changed:
|
|
969
|
-
},
|
|
975
|
+
changed: L
|
|
976
|
+
}, kn));
|
|
970
977
|
}
|
|
971
|
-
function
|
|
972
|
-
|
|
978
|
+
function v() {
|
|
979
|
+
C("dragOverAnimationCapture"), y.captureAnimationState(), y !== g && g.captureAnimationState();
|
|
973
980
|
}
|
|
974
|
-
function
|
|
975
|
-
return
|
|
976
|
-
insertion:
|
|
977
|
-
}),
|
|
978
|
-
|
|
979
|
-
}),
|
|
981
|
+
function m(Fe) {
|
|
982
|
+
return C("dragOverCompleted", {
|
|
983
|
+
insertion: Fe
|
|
984
|
+
}), Fe && (h ? u._hideClone() : u._showClone(y), y !== g && (G(f, R ? R.options.ghostClass : u.options.ghostClass, !1), G(f, s.ghostClass, !0)), R !== y && y !== w.active ? R = y : y === w.active && R && (R = null), g === y && (y._ignoreWhileAnimating = o), y.animateAll(function() {
|
|
985
|
+
C("dragOverAnimationComplete"), y._ignoreWhileAnimating = null;
|
|
986
|
+
}), y !== g && (g.animateAll(), g._ignoreWhileAnimating = null)), (o === f && !f.animated || o === n && !o.animated) && (Ce = null), !s.dragoverBubble && !e.rootEl && o !== document && (f.parentNode[Z]._isOutsideThisEl(e.target), !Fe && Se(e)), !s.dragoverBubble && e.stopPropagation && e.stopPropagation(), _ = !0;
|
|
980
987
|
}
|
|
981
|
-
function
|
|
982
|
-
q = K(
|
|
983
|
-
sortable:
|
|
988
|
+
function L() {
|
|
989
|
+
q = K(f), ge = K(f, s.draggable), j({
|
|
990
|
+
sortable: y,
|
|
984
991
|
name: "change",
|
|
985
992
|
toEl: n,
|
|
986
993
|
newIndex: q,
|
|
987
|
-
newDraggableIndex:
|
|
994
|
+
newDraggableIndex: ge,
|
|
988
995
|
originalEvent: e
|
|
989
996
|
});
|
|
990
997
|
}
|
|
991
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), o =
|
|
992
|
-
return
|
|
993
|
-
if (
|
|
994
|
-
return
|
|
995
|
-
if (ct = !1, u && !s.disabled && (
|
|
996
|
-
if (
|
|
997
|
-
return
|
|
998
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), o = re(o, s.draggable, n, !0), C("dragOver"), w.eventCanceled)
|
|
999
|
+
return _;
|
|
1000
|
+
if (f.contains(e.target) || o.animated && o.animatingX && o.animatingY || y._ignoreWhileAnimating === o)
|
|
1001
|
+
return m(!1);
|
|
1002
|
+
if (ct = !1, u && !s.disabled && (h ? d || (a = $ !== N) : R === this || (this.lastPutMode = Je.checkPull(this, u, f, e)) && l.checkPut(this, u, f, e))) {
|
|
1003
|
+
if (T = this._getDirection(e, o) === "vertical", r = V(f), C("dragOverValid"), w.eventCanceled)
|
|
1004
|
+
return _;
|
|
998
1005
|
if (a)
|
|
999
|
-
return
|
|
1000
|
-
var
|
|
1001
|
-
if (!
|
|
1002
|
-
if (
|
|
1003
|
-
return
|
|
1004
|
-
if (
|
|
1005
|
-
return
|
|
1006
|
-
} else if (
|
|
1007
|
-
var
|
|
1008
|
-
if (
|
|
1009
|
-
return
|
|
1010
|
-
if (o =
|
|
1011
|
-
return
|
|
1006
|
+
return $ = N, v(), this._hideClone(), C("revert"), w.eventCanceled || (Ee ? N.insertBefore(f, Ee) : N.appendChild(f)), m(!0);
|
|
1007
|
+
var A = Nt(n, s.draggable);
|
|
1008
|
+
if (!A || No(e, T, this) && !A.animated) {
|
|
1009
|
+
if (A === f)
|
|
1010
|
+
return m(!1);
|
|
1011
|
+
if (A && n === e.target && (o = A), o && (i = V(o)), tt(N, n, f, r, o, i, e, !!o) !== !1)
|
|
1012
|
+
return v(), A && A.nextSibling ? n.insertBefore(f, A.nextSibling) : n.appendChild(f), $ = n, L(), m(!0);
|
|
1013
|
+
} else if (A && ko(e, T, this)) {
|
|
1014
|
+
var c = ke(n, 0, s, !0);
|
|
1015
|
+
if (c === f)
|
|
1016
|
+
return m(!1);
|
|
1017
|
+
if (o = c, i = V(o), tt(N, n, f, r, o, i, e, !1) !== !1)
|
|
1018
|
+
return v(), n.insertBefore(f, c), $ = n, L(), m(!0);
|
|
1012
1019
|
} else if (o.parentNode === n) {
|
|
1013
|
-
i =
|
|
1014
|
-
var p = 0,
|
|
1015
|
-
|
|
1016
|
-
var
|
|
1020
|
+
i = V(o);
|
|
1021
|
+
var p = 0, P, z = f.parentNode !== n, M = !xo(f.animated && f.toRect || r, o.animated && o.toRect || i, T), we = T ? "top" : "left", he = Gt(o, "top", "top") || Gt(f, "top", "top"), Be = he ? he.scrollTop : void 0;
|
|
1022
|
+
Ce !== o && (P = i[we], Ue = !1, Qe = !M && s.invertSwap || z), p = Mo(e, o, i, T, M ? 1 : s.swapThreshold, s.invertedSwapThreshold == null ? s.swapThreshold : s.invertedSwapThreshold, Qe, Ce === o);
|
|
1023
|
+
var le;
|
|
1017
1024
|
if (p !== 0) {
|
|
1018
|
-
var
|
|
1025
|
+
var ye = K(f);
|
|
1019
1026
|
do
|
|
1020
|
-
|
|
1021
|
-
while (
|
|
1027
|
+
ye -= p, le = $.children[ye];
|
|
1028
|
+
while (le && (b(le, "display") === "none" || le === E));
|
|
1022
1029
|
}
|
|
1023
|
-
if (p === 0 ||
|
|
1024
|
-
return
|
|
1025
|
-
|
|
1026
|
-
var
|
|
1027
|
-
|
|
1028
|
-
var
|
|
1029
|
-
if (
|
|
1030
|
-
return (
|
|
1030
|
+
if (p === 0 || le === o)
|
|
1031
|
+
return m(!1);
|
|
1032
|
+
Ce = o, ze = p;
|
|
1033
|
+
var $e = o.nextElementSibling, pe = !1;
|
|
1034
|
+
pe = p === 1;
|
|
1035
|
+
var qe = tt(N, n, f, r, o, i, e, pe);
|
|
1036
|
+
if (qe !== !1)
|
|
1037
|
+
return (qe === 1 || qe === -1) && (pe = qe === 1), It = !0, setTimeout(Ao, 30), v(), pe && !$e ? n.appendChild(f) : o.parentNode.insertBefore(f, pe ? $e : o), he && bn(he, 0, Be - he.scrollTop), $ = f.parentNode, P !== void 0 && !Qe && (rt = Math.abs(P - V(o)[we])), L(), m(!0);
|
|
1031
1038
|
}
|
|
1032
|
-
if (n.contains(
|
|
1033
|
-
return
|
|
1039
|
+
if (n.contains(f))
|
|
1040
|
+
return m(!1);
|
|
1034
1041
|
}
|
|
1035
1042
|
return !1;
|
|
1036
1043
|
},
|
|
1037
1044
|
_ignoreWhileAnimating: null,
|
|
1038
1045
|
_offMoveEvents: function() {
|
|
1039
|
-
|
|
1046
|
+
D(document, "mousemove", this._onTouchMove), D(document, "touchmove", this._onTouchMove), D(document, "pointermove", this._onTouchMove), D(document, "dragover", Se), D(document, "mousemove", Se), D(document, "touchmove", Se);
|
|
1040
1047
|
},
|
|
1041
1048
|
_offUpEvents: function() {
|
|
1042
1049
|
var e = this.el.ownerDocument;
|
|
1043
|
-
|
|
1050
|
+
D(e, "mouseup", this._onDrop), D(e, "touchend", this._onDrop), D(e, "pointerup", this._onDrop), D(e, "touchcancel", this._onDrop), D(document, "selectstart", this);
|
|
1044
1051
|
},
|
|
1045
1052
|
_onDrop: function(e) {
|
|
1046
1053
|
var n = this.el, o = this.options;
|
|
1047
|
-
if (q = K(
|
|
1054
|
+
if (q = K(f), ge = K(f, o.draggable), U("drop", this, {
|
|
1048
1055
|
evt: e
|
|
1049
|
-
}),
|
|
1056
|
+
}), $ = f && f.parentNode, q = K(f), ge = K(f, o.draggable), w.eventCanceled) {
|
|
1050
1057
|
this._nulling();
|
|
1051
1058
|
return;
|
|
1052
1059
|
}
|
|
1053
|
-
|
|
1060
|
+
De = !1, Qe = !1, Ue = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Pt(this.cloneId), Pt(this._dragStartId), this.nativeDraggable && (D(document, "drop", this), D(n, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Xe && b(document.body, "user-select", ""), b(f, "transform", ""), e && (Ve && (e.cancelable && e.preventDefault(), !o.dropBubble && e.stopPropagation()), E && E.parentNode && E.parentNode.removeChild(E), (N === $ || R && R.lastPutMode !== "clone") && B && B.parentNode && B.parentNode.removeChild(B), f && (this.nativeDraggable && D(f, "dragend", this), St(f), f.style["will-change"] = "", Ve && !De && G(f, R ? R.options.ghostClass : this.options.ghostClass, !1), G(f, this.options.chosenClass, !1), j({
|
|
1054
1061
|
sortable: this,
|
|
1055
1062
|
name: "unchoose",
|
|
1056
|
-
toEl:
|
|
1063
|
+
toEl: $,
|
|
1057
1064
|
newIndex: null,
|
|
1058
1065
|
newDraggableIndex: null,
|
|
1059
1066
|
originalEvent: e
|
|
1060
|
-
}),
|
|
1061
|
-
rootEl:
|
|
1067
|
+
}), N !== $ ? (q >= 0 && (j({
|
|
1068
|
+
rootEl: $,
|
|
1062
1069
|
name: "add",
|
|
1063
|
-
toEl:
|
|
1064
|
-
fromEl:
|
|
1070
|
+
toEl: $,
|
|
1071
|
+
fromEl: N,
|
|
1065
1072
|
originalEvent: e
|
|
1066
|
-
}),
|
|
1073
|
+
}), j({
|
|
1067
1074
|
sortable: this,
|
|
1068
1075
|
name: "remove",
|
|
1069
|
-
toEl:
|
|
1076
|
+
toEl: $,
|
|
1070
1077
|
originalEvent: e
|
|
1071
|
-
}),
|
|
1072
|
-
rootEl:
|
|
1078
|
+
}), j({
|
|
1079
|
+
rootEl: $,
|
|
1073
1080
|
name: "sort",
|
|
1074
|
-
toEl:
|
|
1075
|
-
fromEl:
|
|
1081
|
+
toEl: $,
|
|
1082
|
+
fromEl: N,
|
|
1076
1083
|
originalEvent: e
|
|
1077
|
-
}),
|
|
1084
|
+
}), j({
|
|
1078
1085
|
sortable: this,
|
|
1079
1086
|
name: "sort",
|
|
1080
|
-
toEl:
|
|
1087
|
+
toEl: $,
|
|
1081
1088
|
originalEvent: e
|
|
1082
|
-
})),
|
|
1089
|
+
})), R && R.save()) : q !== Ie && q >= 0 && (j({
|
|
1083
1090
|
sortable: this,
|
|
1084
1091
|
name: "update",
|
|
1085
|
-
toEl:
|
|
1092
|
+
toEl: $,
|
|
1086
1093
|
originalEvent: e
|
|
1087
|
-
}),
|
|
1094
|
+
}), j({
|
|
1088
1095
|
sortable: this,
|
|
1089
1096
|
name: "sort",
|
|
1090
|
-
toEl:
|
|
1097
|
+
toEl: $,
|
|
1091
1098
|
originalEvent: e
|
|
1092
|
-
})),
|
|
1099
|
+
})), w.active && ((q == null || q === -1) && (q = Ie, ge = je), j({
|
|
1093
1100
|
sortable: this,
|
|
1094
1101
|
name: "end",
|
|
1095
|
-
toEl:
|
|
1102
|
+
toEl: $,
|
|
1096
1103
|
originalEvent: e
|
|
1097
1104
|
}), this.save()))), this._nulling();
|
|
1098
1105
|
},
|
|
1099
1106
|
_nulling: function() {
|
|
1100
|
-
U("nulling", this),
|
|
1107
|
+
U("nulling", this), N = f = $ = E = Ee = B = ot = ve = _e = te = Ve = q = ge = Ie = je = Ce = ze = R = Je = w.dragged = w.ghost = w.clone = w.active = null, ft.forEach(function(e) {
|
|
1101
1108
|
e.checked = !0;
|
|
1102
|
-
}), ft.length =
|
|
1109
|
+
}), ft.length = wt = yt = 0;
|
|
1103
1110
|
},
|
|
1104
1111
|
handleEvent: function(e) {
|
|
1105
1112
|
switch (e.type) {
|
|
@@ -1109,7 +1116,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1109
1116
|
break;
|
|
1110
1117
|
case "dragenter":
|
|
1111
1118
|
case "dragover":
|
|
1112
|
-
|
|
1119
|
+
f && (this._onDragOver(e), Oo(e));
|
|
1113
1120
|
break;
|
|
1114
1121
|
case "selectstart":
|
|
1115
1122
|
e.preventDefault();
|
|
@@ -1122,7 +1129,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1122
1129
|
*/
|
|
1123
1130
|
toArray: function() {
|
|
1124
1131
|
for (var e = [], n, o = this.el.children, r = 0, i = o.length, a = this.options; r < i; r++)
|
|
1125
|
-
n = o[r],
|
|
1132
|
+
n = o[r], re(n, a.draggable, this.el, !1) && e.push(n.getAttribute(a.dataIdAttr) || $o(n));
|
|
1126
1133
|
return e;
|
|
1127
1134
|
},
|
|
1128
1135
|
/**
|
|
@@ -1133,7 +1140,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1133
1140
|
var o = {}, r = this.el;
|
|
1134
1141
|
this.toArray().forEach(function(i, a) {
|
|
1135
1142
|
var s = r.children[a];
|
|
1136
|
-
|
|
1143
|
+
re(s, this.options.draggable, r, !1) && (o[i] = s);
|
|
1137
1144
|
}, this), n && this.captureAnimationState(), e.forEach(function(i) {
|
|
1138
1145
|
o[i] && (r.removeChild(o[i]), r.appendChild(o[i]));
|
|
1139
1146
|
}), n && this.animateAll();
|
|
@@ -1152,7 +1159,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1152
1159
|
* @returns {HTMLElement|null}
|
|
1153
1160
|
*/
|
|
1154
1161
|
closest: function(e, n) {
|
|
1155
|
-
return
|
|
1162
|
+
return re(e, n || this.options.draggable, this.el, !1);
|
|
1156
1163
|
},
|
|
1157
1164
|
/**
|
|
1158
1165
|
* Set/get option
|
|
@@ -1164,7 +1171,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1164
1171
|
var o = this.options;
|
|
1165
1172
|
if (n === void 0)
|
|
1166
1173
|
return o[e];
|
|
1167
|
-
var r =
|
|
1174
|
+
var r = Ge.modifyOption(this, e, n);
|
|
1168
1175
|
typeof r != "undefined" ? o[e] = r : o[e] = n, e === "group" && Sn(o);
|
|
1169
1176
|
},
|
|
1170
1177
|
/**
|
|
@@ -1173,15 +1180,15 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1173
1180
|
destroy: function() {
|
|
1174
1181
|
U("destroy", this);
|
|
1175
1182
|
var e = this.el;
|
|
1176
|
-
e[Z] = null,
|
|
1183
|
+
e[Z] = null, D(e, "mousedown", this._onTapStart), D(e, "touchstart", this._onTapStart), D(e, "pointerdown", this._onTapStart), this.nativeDraggable && (D(e, "dragover", this), D(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(n) {
|
|
1177
1184
|
n.removeAttribute("draggable");
|
|
1178
1185
|
}), this._onDrop(), this._disableDelayedDragEvents(), dt.splice(dt.indexOf(this.el), 1), this.el = e = null;
|
|
1179
1186
|
},
|
|
1180
1187
|
_hideClone: function() {
|
|
1181
|
-
if (!
|
|
1182
|
-
if (U("hideClone", this),
|
|
1188
|
+
if (!ve) {
|
|
1189
|
+
if (U("hideClone", this), w.eventCanceled)
|
|
1183
1190
|
return;
|
|
1184
|
-
|
|
1191
|
+
b(B, "display", "none"), this.options.removeCloneOnHide && B.parentNode && B.parentNode.removeChild(B), ve = !0;
|
|
1185
1192
|
}
|
|
1186
1193
|
},
|
|
1187
1194
|
_showClone: function(e) {
|
|
@@ -1189,54 +1196,54 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1189
1196
|
this._hideClone();
|
|
1190
1197
|
return;
|
|
1191
1198
|
}
|
|
1192
|
-
if (
|
|
1193
|
-
if (U("showClone", this),
|
|
1199
|
+
if (ve) {
|
|
1200
|
+
if (U("showClone", this), w.eventCanceled)
|
|
1194
1201
|
return;
|
|
1195
|
-
|
|
1202
|
+
f.parentNode == N && !this.options.group.revertClone ? N.insertBefore(B, f) : Ee ? N.insertBefore(B, Ee) : N.appendChild(B), this.options.group.revertClone && this.animate(f, B), b(B, "display", ""), ve = !1;
|
|
1196
1203
|
}
|
|
1197
1204
|
}
|
|
1198
1205
|
};
|
|
1199
|
-
function
|
|
1206
|
+
function Oo(t) {
|
|
1200
1207
|
t.dataTransfer && (t.dataTransfer.dropEffect = "move"), t.cancelable && t.preventDefault();
|
|
1201
1208
|
}
|
|
1202
|
-
function
|
|
1203
|
-
var l, u = t[Z],
|
|
1204
|
-
return window.CustomEvent && !
|
|
1209
|
+
function tt(t, e, n, o, r, i, a, s) {
|
|
1210
|
+
var l, u = t[Z], h = u.options.onMove, d;
|
|
1211
|
+
return window.CustomEvent && !fe && !We ? l = new CustomEvent("move", {
|
|
1205
1212
|
bubbles: !0,
|
|
1206
1213
|
cancelable: !0
|
|
1207
|
-
}) : (l = document.createEvent("Event"), l.initEvent("move", !0, !0)), l.to = e, l.from = t, l.dragged = n, l.draggedRect = o, l.related = r || e, l.relatedRect = i ||
|
|
1214
|
+
}) : (l = document.createEvent("Event"), l.initEvent("move", !0, !0)), l.to = e, l.from = t, l.dragged = n, l.draggedRect = o, l.related = r || e, l.relatedRect = i || V(e), l.willInsertAfter = s, l.originalEvent = a, t.dispatchEvent(l), h && (d = h.call(u, l, a)), d;
|
|
1208
1215
|
}
|
|
1209
1216
|
function St(t) {
|
|
1210
1217
|
t.draggable = !1;
|
|
1211
1218
|
}
|
|
1212
|
-
function
|
|
1219
|
+
function Ao() {
|
|
1213
1220
|
It = !1;
|
|
1214
1221
|
}
|
|
1215
|
-
function
|
|
1216
|
-
var o =
|
|
1222
|
+
function ko(t, e, n) {
|
|
1223
|
+
var o = V(ke(n.el, 0, n.options, !0)), r = 10;
|
|
1217
1224
|
return e ? t.clientX < o.left - r || t.clientY < o.top && t.clientX < o.right : t.clientY < o.top - r || t.clientY < o.bottom && t.clientX < o.left;
|
|
1218
1225
|
}
|
|
1219
|
-
function
|
|
1220
|
-
var o =
|
|
1226
|
+
function No(t, e, n) {
|
|
1227
|
+
var o = V(Nt(n.el, n.options.draggable)), r = 10;
|
|
1221
1228
|
return e ? t.clientX > o.right + r || t.clientX <= o.right && t.clientY > o.bottom && t.clientX >= o.left : t.clientX > o.right && t.clientY > o.top || t.clientX <= o.right && t.clientY > o.bottom + r;
|
|
1222
1229
|
}
|
|
1223
|
-
function
|
|
1224
|
-
var l = o ? t.clientY : t.clientX, u = o ? n.height : n.width,
|
|
1230
|
+
function Mo(t, e, n, o, r, i, a, s) {
|
|
1231
|
+
var l = o ? t.clientY : t.clientX, u = o ? n.height : n.width, h = o ? n.top : n.left, d = o ? n.bottom : n.right, g = !1;
|
|
1225
1232
|
if (!a) {
|
|
1226
1233
|
if (s && rt < u * r) {
|
|
1227
|
-
if (!
|
|
1228
|
-
|
|
1229
|
-
else if (ze === 1 ? l <
|
|
1234
|
+
if (!Ue && (ze === 1 ? l > h + u * i / 2 : l < d - u * i / 2) && (Ue = !0), Ue)
|
|
1235
|
+
g = !0;
|
|
1236
|
+
else if (ze === 1 ? l < h + rt : l > d - rt)
|
|
1230
1237
|
return -ze;
|
|
1231
|
-
} else if (l >
|
|
1232
|
-
return
|
|
1238
|
+
} else if (l > h + u * (1 - r) / 2 && l < d - u * (1 - r) / 2)
|
|
1239
|
+
return Bo(e);
|
|
1233
1240
|
}
|
|
1234
|
-
return
|
|
1241
|
+
return g = g || a, g && (l < h + u * i / 2 || l > d - u * i / 2) ? l > h + u / 2 ? 1 : -1 : 0;
|
|
1235
1242
|
}
|
|
1236
|
-
function
|
|
1237
|
-
return K(
|
|
1243
|
+
function Bo(t) {
|
|
1244
|
+
return K(f) < K(t) ? 1 : -1;
|
|
1238
1245
|
}
|
|
1239
|
-
function
|
|
1246
|
+
function $o(t) {
|
|
1240
1247
|
for (var e = t.tagName + t.className + t.src + t.href + t.textContent, n = e.length, o = 0; n--; )
|
|
1241
1248
|
o += e.charCodeAt(n);
|
|
1242
1249
|
return o.toString(36);
|
|
@@ -1254,46 +1261,46 @@ function it(t) {
|
|
|
1254
1261
|
function Pt(t) {
|
|
1255
1262
|
return clearTimeout(t);
|
|
1256
1263
|
}
|
|
1257
|
-
gt &&
|
|
1258
|
-
(
|
|
1264
|
+
gt && x(document, "touchmove", function(t) {
|
|
1265
|
+
(w.active || De) && t.cancelable && t.preventDefault();
|
|
1259
1266
|
});
|
|
1260
|
-
|
|
1261
|
-
on:
|
|
1262
|
-
off:
|
|
1263
|
-
css:
|
|
1267
|
+
w.utils = {
|
|
1268
|
+
on: x,
|
|
1269
|
+
off: D,
|
|
1270
|
+
css: b,
|
|
1264
1271
|
find: gn,
|
|
1265
1272
|
is: function(e, n) {
|
|
1266
|
-
return !!
|
|
1273
|
+
return !!re(e, n, e, !1);
|
|
1267
1274
|
},
|
|
1268
|
-
extend:
|
|
1275
|
+
extend: wo,
|
|
1269
1276
|
throttle: vn,
|
|
1270
|
-
closest:
|
|
1277
|
+
closest: re,
|
|
1271
1278
|
toggleClass: G,
|
|
1272
|
-
clone:
|
|
1279
|
+
clone: wn,
|
|
1273
1280
|
index: K,
|
|
1274
1281
|
nextTick: it,
|
|
1275
1282
|
cancelNextTick: Pt,
|
|
1276
1283
|
detectDirection: _n,
|
|
1277
1284
|
getChild: ke
|
|
1278
1285
|
};
|
|
1279
|
-
|
|
1286
|
+
w.get = function(t) {
|
|
1280
1287
|
return t[Z];
|
|
1281
1288
|
};
|
|
1282
|
-
|
|
1289
|
+
w.mount = function() {
|
|
1283
1290
|
for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
|
|
1284
1291
|
e[n] = arguments[n];
|
|
1285
1292
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(o) {
|
|
1286
1293
|
if (!o.prototype || !o.prototype.constructor)
|
|
1287
1294
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));
|
|
1288
|
-
o.utils && (
|
|
1295
|
+
o.utils && (w.utils = se(se({}, w.utils), o.utils)), Ge.mount(o);
|
|
1289
1296
|
});
|
|
1290
1297
|
};
|
|
1291
|
-
|
|
1292
|
-
return new
|
|
1298
|
+
w.create = function(t, e) {
|
|
1299
|
+
return new w(t, e);
|
|
1293
1300
|
};
|
|
1294
|
-
|
|
1295
|
-
var
|
|
1296
|
-
function
|
|
1301
|
+
w.version = go;
|
|
1302
|
+
var F = [], Le, Ot, At = !1, Et, Tt, ht, He;
|
|
1303
|
+
function Vo() {
|
|
1297
1304
|
function t() {
|
|
1298
1305
|
this.defaults = {
|
|
1299
1306
|
scroll: !0,
|
|
@@ -1308,80 +1315,80 @@ function Bo() {
|
|
|
1308
1315
|
return t.prototype = {
|
|
1309
1316
|
dragStarted: function(n) {
|
|
1310
1317
|
var o = n.originalEvent;
|
|
1311
|
-
this.sortable.nativeDraggable ?
|
|
1318
|
+
this.sortable.nativeDraggable ? x(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? x(document, "pointermove", this._handleFallbackAutoScroll) : o.touches ? x(document, "touchmove", this._handleFallbackAutoScroll) : x(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1312
1319
|
},
|
|
1313
1320
|
dragOverCompleted: function(n) {
|
|
1314
1321
|
var o = n.originalEvent;
|
|
1315
1322
|
!this.options.dragOverBubble && !o.rootEl && this._handleAutoScroll(o);
|
|
1316
1323
|
},
|
|
1317
1324
|
drop: function() {
|
|
1318
|
-
this.sortable.nativeDraggable ?
|
|
1325
|
+
this.sortable.nativeDraggable ? D(document, "dragover", this._handleAutoScroll) : (D(document, "pointermove", this._handleFallbackAutoScroll), D(document, "touchmove", this._handleFallbackAutoScroll), D(document, "mousemove", this._handleFallbackAutoScroll)), Qt(), at(), yo();
|
|
1319
1326
|
},
|
|
1320
1327
|
nulling: function() {
|
|
1321
|
-
ht = Ot =
|
|
1328
|
+
ht = Ot = Le = At = He = Et = Tt = null, F.length = 0;
|
|
1322
1329
|
},
|
|
1323
1330
|
_handleFallbackAutoScroll: function(n) {
|
|
1324
1331
|
this._handleAutoScroll(n, !0);
|
|
1325
1332
|
},
|
|
1326
1333
|
_handleAutoScroll: function(n, o) {
|
|
1327
1334
|
var r = this, i = (n.touches ? n.touches[0] : n).clientX, a = (n.touches ? n.touches[0] : n).clientY, s = document.elementFromPoint(i, a);
|
|
1328
|
-
if (ht = n, o || this.options.forceAutoScrollFallback ||
|
|
1335
|
+
if (ht = n, o || this.options.forceAutoScrollFallback || We || fe || Xe) {
|
|
1329
1336
|
Ct(n, this.options, s, o);
|
|
1330
|
-
var l =
|
|
1331
|
-
|
|
1332
|
-
var u =
|
|
1337
|
+
var l = be(s, !0);
|
|
1338
|
+
At && (!He || i !== Et || a !== Tt) && (He && Qt(), He = setInterval(function() {
|
|
1339
|
+
var u = be(document.elementFromPoint(i, a), !0);
|
|
1333
1340
|
u !== l && (l = u, at()), Ct(n, r.options, u, o);
|
|
1334
1341
|
}, 10), Et = i, Tt = a);
|
|
1335
1342
|
} else {
|
|
1336
|
-
if (!this.options.bubbleScroll ||
|
|
1343
|
+
if (!this.options.bubbleScroll || be(s, !0) === ae()) {
|
|
1337
1344
|
at();
|
|
1338
1345
|
return;
|
|
1339
1346
|
}
|
|
1340
|
-
Ct(n, this.options,
|
|
1347
|
+
Ct(n, this.options, be(s, !1), !1);
|
|
1341
1348
|
}
|
|
1342
1349
|
}
|
|
1343
|
-
},
|
|
1350
|
+
}, de(t, {
|
|
1344
1351
|
pluginName: "scroll",
|
|
1345
1352
|
initializeByDefault: !0
|
|
1346
1353
|
});
|
|
1347
1354
|
}
|
|
1348
1355
|
function at() {
|
|
1349
|
-
|
|
1356
|
+
F.forEach(function(t) {
|
|
1350
1357
|
clearInterval(t.pid);
|
|
1351
|
-
}),
|
|
1358
|
+
}), F = [];
|
|
1352
1359
|
}
|
|
1353
1360
|
function Qt() {
|
|
1354
|
-
clearInterval(
|
|
1361
|
+
clearInterval(He);
|
|
1355
1362
|
}
|
|
1356
1363
|
var Ct = vn(function(t, e, n, o) {
|
|
1357
1364
|
if (e.scroll) {
|
|
1358
|
-
var r = (t.touches ? t.touches[0] : t).clientX, i = (t.touches ? t.touches[0] : t).clientY, a = e.scrollSensitivity, s = e.scrollSpeed, l =
|
|
1359
|
-
Ot !== n && (Ot = n, at(),
|
|
1360
|
-
var
|
|
1365
|
+
var r = (t.touches ? t.touches[0] : t).clientX, i = (t.touches ? t.touches[0] : t).clientY, a = e.scrollSensitivity, s = e.scrollSpeed, l = ae(), u = !1, h;
|
|
1366
|
+
Ot !== n && (Ot = n, at(), Le = e.scroll, h = e.scrollFn, Le === !0 && (Le = be(n, !0)));
|
|
1367
|
+
var d = 0, g = Le;
|
|
1361
1368
|
do {
|
|
1362
|
-
var
|
|
1363
|
-
|
|
1364
|
-
var
|
|
1365
|
-
if (!
|
|
1366
|
-
for (var
|
|
1367
|
-
|
|
1368
|
-
(
|
|
1369
|
-
o && this.layer === 0 &&
|
|
1370
|
-
var
|
|
1371
|
-
typeof
|
|
1369
|
+
var T = g, y = V(T), _ = y.top, C = y.bottom, v = y.left, m = y.right, L = y.width, A = y.height, c = void 0, p = void 0, P = T.scrollWidth, z = T.scrollHeight, M = b(T), we = T.scrollLeft, he = T.scrollTop;
|
|
1370
|
+
T === l ? (c = L < P && (M.overflowX === "auto" || M.overflowX === "scroll" || M.overflowX === "visible"), p = A < z && (M.overflowY === "auto" || M.overflowY === "scroll" || M.overflowY === "visible")) : (c = L < P && (M.overflowX === "auto" || M.overflowX === "scroll"), p = A < z && (M.overflowY === "auto" || M.overflowY === "scroll"));
|
|
1371
|
+
var Be = c && (Math.abs(m - r) <= a && we + L < P) - (Math.abs(v - r) <= a && !!we), le = p && (Math.abs(C - i) <= a && he + A < z) - (Math.abs(_ - i) <= a && !!he);
|
|
1372
|
+
if (!F[d])
|
|
1373
|
+
for (var ye = 0; ye <= d; ye++)
|
|
1374
|
+
F[ye] || (F[ye] = {});
|
|
1375
|
+
(F[d].vx != Be || F[d].vy != le || F[d].el !== T) && (F[d].el = T, F[d].vx = Be, F[d].vy = le, clearInterval(F[d].pid), (Be != 0 || le != 0) && (u = !0, F[d].pid = setInterval(function() {
|
|
1376
|
+
o && this.layer === 0 && w.active._onTouchMove(ht);
|
|
1377
|
+
var $e = F[this.layer].vy ? F[this.layer].vy * s : 0, pe = F[this.layer].vx ? F[this.layer].vx * s : 0;
|
|
1378
|
+
typeof h == "function" && h.call(w.dragged.parentNode[Z], pe, $e, t, ht, F[this.layer].el) !== "continue" || bn(F[this.layer].el, pe, $e);
|
|
1372
1379
|
}.bind({
|
|
1373
|
-
layer:
|
|
1374
|
-
}), 24))),
|
|
1375
|
-
} while (e.bubbleScroll &&
|
|
1376
|
-
|
|
1380
|
+
layer: d
|
|
1381
|
+
}), 24))), d++;
|
|
1382
|
+
} while (e.bubbleScroll && g !== l && (g = be(g, !1)));
|
|
1383
|
+
At = u;
|
|
1377
1384
|
}
|
|
1378
1385
|
}, 30), Cn = function(e) {
|
|
1379
1386
|
var n = e.originalEvent, o = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, s = e.hideGhostForTarget, l = e.unhideGhostForTarget;
|
|
1380
1387
|
if (n) {
|
|
1381
1388
|
var u = o || i;
|
|
1382
1389
|
s();
|
|
1383
|
-
var
|
|
1384
|
-
l(), u && !u.el.contains(
|
|
1390
|
+
var h = n.changedTouches && n.changedTouches.length ? n.changedTouches[0] : n, d = document.elementFromPoint(h.clientX, h.clientY);
|
|
1391
|
+
l(), u && !u.el.contains(d) && (a("spill"), this.onSpill({
|
|
1385
1392
|
dragEl: r,
|
|
1386
1393
|
putSortable: o
|
|
1387
1394
|
}));
|
|
@@ -1403,27 +1410,27 @@ Mt.prototype = {
|
|
|
1403
1410
|
},
|
|
1404
1411
|
drop: Cn
|
|
1405
1412
|
};
|
|
1406
|
-
|
|
1413
|
+
de(Mt, {
|
|
1407
1414
|
pluginName: "revertOnSpill"
|
|
1408
1415
|
});
|
|
1409
|
-
function
|
|
1416
|
+
function Bt() {
|
|
1410
1417
|
}
|
|
1411
|
-
|
|
1418
|
+
Bt.prototype = {
|
|
1412
1419
|
onSpill: function(e) {
|
|
1413
1420
|
var n = e.dragEl, o = e.putSortable, r = o || this.sortable;
|
|
1414
1421
|
r.captureAnimationState(), n.parentNode && n.parentNode.removeChild(n), r.animateAll();
|
|
1415
1422
|
},
|
|
1416
1423
|
drop: Cn
|
|
1417
1424
|
};
|
|
1418
|
-
|
|
1425
|
+
de(Bt, {
|
|
1419
1426
|
pluginName: "removeOnSpill"
|
|
1420
1427
|
});
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
function
|
|
1424
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !
|
|
1428
|
+
w.mount(new Vo());
|
|
1429
|
+
w.mount(Bt, Mt);
|
|
1430
|
+
function Lo(t) {
|
|
1431
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !zn(t);
|
|
1425
1432
|
}
|
|
1426
|
-
const
|
|
1433
|
+
const Ho = /* @__PURE__ */ Ne({
|
|
1427
1434
|
name: "YxTable",
|
|
1428
1435
|
__name: "index",
|
|
1429
1436
|
props: {
|
|
@@ -1444,115 +1451,115 @@ const $o = /* @__PURE__ */ Ae({
|
|
|
1444
1451
|
expose: e,
|
|
1445
1452
|
emit: n
|
|
1446
1453
|
}) {
|
|
1447
|
-
const o = t, r = un(), i =
|
|
1448
|
-
|
|
1449
|
-
|
|
1454
|
+
const o = t, r = un(), i = Xn(), a = xt(), s = n;
|
|
1455
|
+
Yn(() => {
|
|
1456
|
+
jn(() => {
|
|
1450
1457
|
l();
|
|
1451
1458
|
});
|
|
1452
1459
|
});
|
|
1453
1460
|
const l = () => {
|
|
1454
1461
|
if (!o.sort)
|
|
1455
1462
|
return;
|
|
1456
|
-
const
|
|
1457
|
-
|
|
1463
|
+
const h = document.querySelector(".el-table__body tbody");
|
|
1464
|
+
w.create(h, {
|
|
1458
1465
|
animation: 200,
|
|
1459
1466
|
// group: "el-table__row table-row",
|
|
1460
1467
|
sort: !0,
|
|
1461
1468
|
handle: o.sortHandle ? `.${o.sortHandle}` : null,
|
|
1462
1469
|
onEnd: ({
|
|
1463
|
-
oldIndex:
|
|
1464
|
-
newIndex:
|
|
1470
|
+
oldIndex: d,
|
|
1471
|
+
newIndex: g
|
|
1465
1472
|
}) => {
|
|
1466
|
-
s("sort-end",
|
|
1473
|
+
s("sort-end", d, g);
|
|
1467
1474
|
}
|
|
1468
1475
|
});
|
|
1469
|
-
}, u = (
|
|
1470
|
-
let
|
|
1476
|
+
}, u = (h) => {
|
|
1477
|
+
let d;
|
|
1471
1478
|
const {
|
|
1472
|
-
columns:
|
|
1473
|
-
rowKey:
|
|
1474
|
-
tableData:
|
|
1475
|
-
pageInfo:
|
|
1476
|
-
} =
|
|
1479
|
+
columns: g,
|
|
1480
|
+
rowKey: T,
|
|
1481
|
+
tableData: y,
|
|
1482
|
+
pageInfo: _
|
|
1483
|
+
} = h, C = (A, c) => {
|
|
1477
1484
|
var p;
|
|
1478
|
-
return
|
|
1479
|
-
},
|
|
1480
|
-
const
|
|
1485
|
+
return A.slotName && ((p = r[A.slotName]) == null ? void 0 : p.call(r, c));
|
|
1486
|
+
}, v = (A) => A.filter((c) => !c.show || c.show(c)).map((c) => {
|
|
1487
|
+
const z = c, {
|
|
1481
1488
|
children: p
|
|
1482
|
-
} =
|
|
1489
|
+
} = z, P = Yt(z, [
|
|
1483
1490
|
"children"
|
|
1484
1491
|
]);
|
|
1485
|
-
return
|
|
1492
|
+
return O(Y("el-table-column"), P, {
|
|
1486
1493
|
default: (M) => {
|
|
1487
|
-
if ((
|
|
1488
|
-
return
|
|
1489
|
-
if (
|
|
1490
|
-
const
|
|
1491
|
-
renderType:
|
|
1492
|
-
prop:
|
|
1493
|
-
config:
|
|
1494
|
+
if ((c == null ? void 0 : c.renderType) === "operate")
|
|
1495
|
+
return m(c, M);
|
|
1496
|
+
if (c != null && c.renderType && (c == null ? void 0 : c.renderType) !== "operate") {
|
|
1497
|
+
const we = {
|
|
1498
|
+
renderType: c.renderType,
|
|
1499
|
+
prop: c.prop,
|
|
1500
|
+
config: c.config
|
|
1494
1501
|
};
|
|
1495
|
-
return
|
|
1496
|
-
conf:
|
|
1502
|
+
return O(fn, {
|
|
1503
|
+
conf: we,
|
|
1497
1504
|
model: M.row,
|
|
1498
|
-
onChange:
|
|
1505
|
+
onChange: c == null ? void 0 : c.change
|
|
1499
1506
|
}, null);
|
|
1500
1507
|
}
|
|
1501
|
-
return
|
|
1508
|
+
return c != null && c.render ? c == null ? void 0 : c.render(M.row) : p && (p == null ? void 0 : p.length) > 0 ? v(p) : (c == null ? void 0 : c.slotName) && C(c, M);
|
|
1502
1509
|
}
|
|
1503
1510
|
});
|
|
1504
|
-
}),
|
|
1511
|
+
}), m = (A, c) => {
|
|
1505
1512
|
var p;
|
|
1506
|
-
return
|
|
1507
|
-
class: "flex justify-center cursor-pointer"
|
|
1508
|
-
}, [(p =
|
|
1513
|
+
return O("div", {
|
|
1514
|
+
class: "flex justify-center items-center cursor-pointer"
|
|
1515
|
+
}, [(p = A.operate) == null ? void 0 : p.filter((P) => !P.show || P.show(c.row)).map((P) => P != null && P.render ? P.render(c.row) : O("span", {
|
|
1509
1516
|
onClick: Jn(() => {
|
|
1510
|
-
|
|
1517
|
+
P != null && P.onClick && (P == null || P.onClick(c.row)), s("operate-handle", P.key, c.row);
|
|
1511
1518
|
}, ["stop"]),
|
|
1512
1519
|
style: {
|
|
1513
|
-
color:
|
|
1520
|
+
color: P.key == "del" ? "var(--table-operate-warning-text-color)" : "var(--table-operate-text-color)"
|
|
1514
1521
|
},
|
|
1515
1522
|
class: "mr-10 whitespace-nowrap"
|
|
1516
|
-
}, [
|
|
1517
|
-
},
|
|
1518
|
-
if (!
|
|
1523
|
+
}, [Q(" "), P.label, Q(" ")]))]);
|
|
1524
|
+
}, L = () => {
|
|
1525
|
+
if (!_)
|
|
1519
1526
|
return null;
|
|
1520
|
-
const
|
|
1527
|
+
const A = (p) => {
|
|
1521
1528
|
s("update-page", "pageSize", p);
|
|
1522
|
-
},
|
|
1529
|
+
}, c = (p) => {
|
|
1523
1530
|
s("update-page", "pageIndex", p);
|
|
1524
1531
|
};
|
|
1525
|
-
return
|
|
1532
|
+
return O("div", {
|
|
1526
1533
|
class: "pagination-wrap"
|
|
1527
|
-
}, [
|
|
1528
|
-
currentPage:
|
|
1529
|
-
"onUpdate:currentPage": (p) =>
|
|
1530
|
-
pageSize:
|
|
1531
|
-
"onUpdate:pageSize": (p) =>
|
|
1534
|
+
}, [O(Y("el-pagination"), {
|
|
1535
|
+
currentPage: _.pageIndex,
|
|
1536
|
+
"onUpdate:currentPage": (p) => _.pageIndex = p,
|
|
1537
|
+
pageSize: _.pageSize,
|
|
1538
|
+
"onUpdate:pageSize": (p) => _.pageSize = p,
|
|
1532
1539
|
small: !1,
|
|
1533
1540
|
disabled: !1,
|
|
1534
1541
|
"page-sizes": [10, 20, 50, 100],
|
|
1535
1542
|
layout: "total,sizes,prev, pager, next",
|
|
1536
1543
|
background: !1,
|
|
1537
|
-
total:
|
|
1538
|
-
onSizeChange:
|
|
1539
|
-
onCurrentChange:
|
|
1544
|
+
total: _.total,
|
|
1545
|
+
onSizeChange: A,
|
|
1546
|
+
onCurrentChange: c
|
|
1540
1547
|
}, null)]);
|
|
1541
1548
|
};
|
|
1542
|
-
return
|
|
1549
|
+
return O(oe, null, [O(Y("el-table"), xe({
|
|
1543
1550
|
ref: a
|
|
1544
1551
|
}, i, {
|
|
1545
|
-
"row-key":
|
|
1546
|
-
data:
|
|
1547
|
-
}),
|
|
1548
|
-
default: () => [
|
|
1549
|
-
}),
|
|
1552
|
+
"row-key": T,
|
|
1553
|
+
data: y
|
|
1554
|
+
}), Lo(d = v(g)) ? d : {
|
|
1555
|
+
default: () => [d]
|
|
1556
|
+
}), L()]);
|
|
1550
1557
|
};
|
|
1551
1558
|
return e({
|
|
1552
1559
|
tableRef: a
|
|
1553
|
-
}), (
|
|
1560
|
+
}), (h, d) => (S(), H(J(u(o))));
|
|
1554
1561
|
}
|
|
1555
|
-
}),
|
|
1562
|
+
}), Ro = /* @__PURE__ */ Ne({
|
|
1556
1563
|
__name: "index",
|
|
1557
1564
|
props: {
|
|
1558
1565
|
searchColumns: {},
|
|
@@ -1564,7 +1571,11 @@ const $o = /* @__PURE__ */ Ae({
|
|
|
1564
1571
|
showAddBtn: {
|
|
1565
1572
|
type: Boolean,
|
|
1566
1573
|
default: !0
|
|
1567
|
-
}
|
|
1574
|
+
},
|
|
1575
|
+
style: {},
|
|
1576
|
+
labelStyle: {},
|
|
1577
|
+
className: {},
|
|
1578
|
+
classLabelName: {}
|
|
1568
1579
|
},
|
|
1569
1580
|
emits: ["search", "add"],
|
|
1570
1581
|
setup(t, {
|
|
@@ -1575,79 +1586,85 @@ const $o = /* @__PURE__ */ Ae({
|
|
|
1575
1586
|
searchColumns: s,
|
|
1576
1587
|
searchParams: l,
|
|
1577
1588
|
showSearchBtn: u,
|
|
1578
|
-
showAddBtn:
|
|
1589
|
+
showAddBtn: h,
|
|
1590
|
+
style: d,
|
|
1591
|
+
labelStyle: g,
|
|
1592
|
+
className: T,
|
|
1593
|
+
classLabelName: y
|
|
1579
1594
|
} = a;
|
|
1580
|
-
return
|
|
1595
|
+
return O(oe, null, [O("div", {
|
|
1581
1596
|
class: "table-search flex gap-10"
|
|
1582
|
-
}, [((
|
|
1583
|
-
const
|
|
1584
|
-
renderType:
|
|
1585
|
-
prop:
|
|
1586
|
-
config:
|
|
1597
|
+
}, [((C) => C.filter((v) => !v.show || v.show()).map((v) => {
|
|
1598
|
+
const m = {
|
|
1599
|
+
renderType: v.renderType,
|
|
1600
|
+
prop: v.key,
|
|
1601
|
+
config: v.config
|
|
1587
1602
|
};
|
|
1588
|
-
return
|
|
1589
|
-
class:
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1603
|
+
return O("div", {
|
|
1604
|
+
class: `flex items-center ${T && T.join(" ")} ${v.className && v.className.join(" ")}`,
|
|
1605
|
+
style: ee(ee({}, d), v.style)
|
|
1606
|
+
}, [O("span", {
|
|
1607
|
+
class: `mr-10 whitespace-nowrap ${y && y.join(" ")} ${v.classLabelName && v.classLabelName.join(" ")}`,
|
|
1608
|
+
style: ee(ee({}, g), v.labelStyle)
|
|
1609
|
+
}, [Q(" "), v.label, Q(" ")]), O(fn, {
|
|
1610
|
+
class: v.componentClassName,
|
|
1611
|
+
style: v.componentStyle,
|
|
1612
|
+
conf: m,
|
|
1594
1613
|
model: l,
|
|
1595
|
-
onChange:
|
|
1614
|
+
onChange: v == null ? void 0 : v.change
|
|
1596
1615
|
}, null)]);
|
|
1597
|
-
}))(s), u &&
|
|
1616
|
+
}))(s), u && O(Y("el-button"), {
|
|
1598
1617
|
onClick: () => r("search")
|
|
1599
1618
|
}, {
|
|
1600
|
-
default: () => [
|
|
1619
|
+
default: () => [O(Y("el-icon"), {
|
|
1601
1620
|
class: "mx-5"
|
|
1602
1621
|
}, {
|
|
1603
|
-
default: () => [
|
|
1622
|
+
default: () => [O("svg", {
|
|
1604
1623
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1605
|
-
viewBox: "0 0 1024 1024"
|
|
1606
|
-
|
|
1607
|
-
}, [P("path", {
|
|
1624
|
+
viewBox: "0 0 1024 1024"
|
|
1625
|
+
}, [O("path", {
|
|
1608
1626
|
fill: "currentColor",
|
|
1609
1627
|
d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"
|
|
1610
|
-
},
|
|
1611
|
-
}),
|
|
1612
|
-
}),
|
|
1628
|
+
}, [" "])])]
|
|
1629
|
+
}), Q("搜索"), " "]
|
|
1630
|
+
}), h && O(Y("el-button"), {
|
|
1613
1631
|
onClick: () => r("add")
|
|
1614
1632
|
}, {
|
|
1615
|
-
default: () => [
|
|
1633
|
+
default: () => [O(Y("el-icon"), {
|
|
1616
1634
|
class: "mx-5"
|
|
1617
1635
|
}, {
|
|
1618
|
-
default: () => [
|
|
1636
|
+
default: () => [O("svg", {
|
|
1619
1637
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1620
|
-
viewBox: "0 0 1024 1024"
|
|
1621
|
-
|
|
1622
|
-
}, [P("path", {
|
|
1638
|
+
viewBox: "0 0 1024 1024"
|
|
1639
|
+
}, [O("path", {
|
|
1623
1640
|
fill: "currentColor",
|
|
1624
1641
|
d: "M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"
|
|
1625
|
-
},
|
|
1626
|
-
}),
|
|
1642
|
+
}, [" "])])]
|
|
1643
|
+
}), Q("添加")]
|
|
1627
1644
|
}), n.default && n.default()])]);
|
|
1628
1645
|
};
|
|
1629
|
-
return (a, s) => (S(),
|
|
1646
|
+
return (a, s) => (S(), H(J(i(o))));
|
|
1630
1647
|
}
|
|
1631
|
-
}),
|
|
1648
|
+
}), Me = (t, e) => {
|
|
1632
1649
|
const n = t.__vccOpts || t;
|
|
1633
1650
|
for (const [o, r] of e)
|
|
1634
1651
|
n[o] = r;
|
|
1635
1652
|
return n;
|
|
1636
|
-
}, Xo = /* @__PURE__ */
|
|
1637
|
-
required:
|
|
1638
|
-
isNumber:
|
|
1639
|
-
isInt:
|
|
1640
|
-
maxNumber:
|
|
1641
|
-
minNumber:
|
|
1642
|
-
reg:
|
|
1653
|
+
}, Xo = /* @__PURE__ */ Me(Ro, [["__scopeId", "data-v-0f381de0"]]), Yo = {
|
|
1654
|
+
required: zo,
|
|
1655
|
+
isNumber: Uo,
|
|
1656
|
+
isInt: Wo,
|
|
1657
|
+
maxNumber: Go,
|
|
1658
|
+
minNumber: qo,
|
|
1659
|
+
reg: Zo
|
|
1643
1660
|
};
|
|
1644
1661
|
function jo(t, e, n) {
|
|
1645
1662
|
return Yo[e](t, n);
|
|
1646
1663
|
}
|
|
1647
|
-
function
|
|
1664
|
+
function zo(t) {
|
|
1648
1665
|
return { required: !0, message: `请输入${t}`, trigger: ["blur", "change"] };
|
|
1649
1666
|
}
|
|
1650
|
-
function
|
|
1667
|
+
function Uo(t) {
|
|
1651
1668
|
return {
|
|
1652
1669
|
validator: (e, n, o) => {
|
|
1653
1670
|
if (Number.isNaN(+n)) {
|
|
@@ -1659,7 +1676,7 @@ function zo(t) {
|
|
|
1659
1676
|
trigger: "blur"
|
|
1660
1677
|
};
|
|
1661
1678
|
}
|
|
1662
|
-
function
|
|
1679
|
+
function Wo(t) {
|
|
1663
1680
|
return {
|
|
1664
1681
|
validator: (e, n, o) => {
|
|
1665
1682
|
if (n % 1 !== 0) {
|
|
@@ -1671,7 +1688,7 @@ function Ro(t) {
|
|
|
1671
1688
|
trigger: "blur"
|
|
1672
1689
|
};
|
|
1673
1690
|
}
|
|
1674
|
-
function
|
|
1691
|
+
function Go(t, e) {
|
|
1675
1692
|
return {
|
|
1676
1693
|
validator: (n, o, r) => {
|
|
1677
1694
|
if (+o > +e) {
|
|
@@ -1683,7 +1700,7 @@ function Uo(t, e) {
|
|
|
1683
1700
|
trigger: "blur"
|
|
1684
1701
|
};
|
|
1685
1702
|
}
|
|
1686
|
-
function
|
|
1703
|
+
function qo(t, e) {
|
|
1687
1704
|
return {
|
|
1688
1705
|
validator: (n, o, r) => {
|
|
1689
1706
|
if (+o < +e) {
|
|
@@ -1695,7 +1712,7 @@ function Wo(t, e) {
|
|
|
1695
1712
|
trigger: "blur"
|
|
1696
1713
|
};
|
|
1697
1714
|
}
|
|
1698
|
-
function
|
|
1715
|
+
function Zo(t, e) {
|
|
1699
1716
|
return {
|
|
1700
1717
|
validator: (n, o, r) => {
|
|
1701
1718
|
if (!e.test(o)) {
|
|
@@ -1707,25 +1724,25 @@ function Go(t, e) {
|
|
|
1707
1724
|
trigger: "blur"
|
|
1708
1725
|
};
|
|
1709
1726
|
}
|
|
1710
|
-
const
|
|
1727
|
+
const Ko = {
|
|
1711
1728
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1712
1729
|
width: "16",
|
|
1713
1730
|
height: "16",
|
|
1714
1731
|
class: "icon",
|
|
1715
1732
|
viewBox: "0 0 1024 1024"
|
|
1716
|
-
},
|
|
1733
|
+
}, Jo = /* @__PURE__ */ I("path", {
|
|
1717
1734
|
fill: "#707070",
|
|
1718
1735
|
d: "M511.666 64.673c-246.535 0-446.39 199.856-446.39 446.39 0 246.536 199.855 446.393 446.39 446.393s446.392-199.857 446.392-446.392S758.203 64.673 511.666 64.673m0 836.878c-215.66 0-390.487-174.827-390.487-390.488 0-215.66 174.827-390.487 390.487-390.487s390.488 174.827 390.488 390.487c0 215.661-174.828 390.488-390.488 390.488m-86.894-485.188s14.002-86.168 100.17-76.474c86.168 9.694 66.78 74.32 58.163 87.245-8.616 21.542-88.323 73.243-101.247 104.479-12.925 31.236-11.848 89.4-11.848 89.4h77.551s-4.308-61.395 38.776-87.246c43.084-25.85 116.326-101.247 84.014-173.413-51.701-82.937-102.324-91.554-168.028-89.4-65.703 2.155-134.638 34.468-157.257 134.639 53.855 7.538 79.706 10.77 79.706 10.77m44.16 233.73h80.783v88.311h-80.782v-88.31z"
|
|
1719
|
-
}, null, -1),
|
|
1720
|
-
|
|
1736
|
+
}, null, -1), Qo = [
|
|
1737
|
+
Jo
|
|
1721
1738
|
];
|
|
1722
|
-
function
|
|
1723
|
-
return S(),
|
|
1739
|
+
function er(t, e) {
|
|
1740
|
+
return S(), k("svg", Ko, Qo);
|
|
1724
1741
|
}
|
|
1725
|
-
const
|
|
1742
|
+
const tr = { render: er }, nr = {
|
|
1726
1743
|
key: 0,
|
|
1727
1744
|
style: { "line-height": "36px", "margin-left": "4px" }
|
|
1728
|
-
},
|
|
1745
|
+
}, or = ["slot"], rr = /* @__PURE__ */ Ne({
|
|
1729
1746
|
__name: "form",
|
|
1730
1747
|
props: {
|
|
1731
1748
|
formConfig: {},
|
|
@@ -1734,61 +1751,61 @@ const Qo = { render: Jo }, er = {
|
|
|
1734
1751
|
},
|
|
1735
1752
|
setup(t, { expose: e }) {
|
|
1736
1753
|
const n = ["date-picker"], o = t, r = xt(), i = xt(l()), a = u(), s = Un(() => {
|
|
1737
|
-
const
|
|
1738
|
-
return
|
|
1739
|
-
(typeof
|
|
1740
|
-
}),
|
|
1754
|
+
const C = o.formConfig.compList, v = {};
|
|
1755
|
+
return C.forEach((m) => {
|
|
1756
|
+
(typeof m.hidden == "function" ? !m.hidden(i.value, o.status) : !m.hidden) && m.name && (v[m.name] = i.value[m.name]);
|
|
1757
|
+
}), v;
|
|
1741
1758
|
});
|
|
1742
1759
|
function l() {
|
|
1743
|
-
return o.status === "ADD" ?
|
|
1760
|
+
return o.status === "ADD" ? d() : o.formData;
|
|
1744
1761
|
}
|
|
1745
1762
|
function u() {
|
|
1746
|
-
return
|
|
1763
|
+
return g();
|
|
1747
1764
|
}
|
|
1748
|
-
function
|
|
1749
|
-
i.value =
|
|
1765
|
+
function h() {
|
|
1766
|
+
i.value = d();
|
|
1750
1767
|
}
|
|
1751
|
-
function
|
|
1752
|
-
const
|
|
1753
|
-
return
|
|
1754
|
-
|
|
1755
|
-
}),
|
|
1768
|
+
function d() {
|
|
1769
|
+
const C = o.formConfig.compList, v = {};
|
|
1770
|
+
return C.forEach((m) => {
|
|
1771
|
+
m.name && (v[m.name] = m.defaultValue);
|
|
1772
|
+
}), v;
|
|
1756
1773
|
}
|
|
1757
|
-
function
|
|
1758
|
-
const
|
|
1759
|
-
return
|
|
1760
|
-
var
|
|
1761
|
-
const
|
|
1762
|
-
if ((
|
|
1763
|
-
for (const
|
|
1764
|
-
if (
|
|
1774
|
+
function g() {
|
|
1775
|
+
const C = o.formConfig.compList, v = {};
|
|
1776
|
+
return C.forEach((m) => {
|
|
1777
|
+
var c, p, P;
|
|
1778
|
+
const L = ((c = m.rule) == null ? void 0 : c.constructor) === Object && Object.keys(m.rule).length > 0, A = Array.isArray(m.customRules) && m.customRules.length > 0;
|
|
1779
|
+
if ((L || A) && !v[m.name] && (v[m.name] = []), L)
|
|
1780
|
+
for (const z in m.rule) {
|
|
1781
|
+
if (m.rule[z] === !1)
|
|
1765
1782
|
break;
|
|
1766
|
-
const M = typeof
|
|
1767
|
-
(p =
|
|
1783
|
+
const M = typeof m.label == "function" ? _(m.label) : m.label;
|
|
1784
|
+
(p = v[m.name]) == null || p.push(jo(M, z, m.rule[z]));
|
|
1768
1785
|
}
|
|
1769
|
-
|
|
1786
|
+
A && ((P = m.customRules) == null || P.forEach((z) => {
|
|
1770
1787
|
var M;
|
|
1771
|
-
(M =
|
|
1788
|
+
(M = v[m.name]) == null || M.push(z);
|
|
1772
1789
|
}));
|
|
1773
|
-
}),
|
|
1790
|
+
}), v;
|
|
1774
1791
|
}
|
|
1775
|
-
function
|
|
1776
|
-
return new Promise((
|
|
1777
|
-
r.value.validate((
|
|
1778
|
-
|
|
1792
|
+
function T() {
|
|
1793
|
+
return new Promise((C, v) => {
|
|
1794
|
+
r.value.validate((m) => {
|
|
1795
|
+
m ? C("") : v();
|
|
1779
1796
|
});
|
|
1780
1797
|
});
|
|
1781
1798
|
}
|
|
1782
|
-
function
|
|
1783
|
-
return
|
|
1799
|
+
function y(C) {
|
|
1800
|
+
return C.filter((v) => !_(v.hidden));
|
|
1784
1801
|
}
|
|
1785
|
-
function
|
|
1786
|
-
return typeof
|
|
1802
|
+
function _(C) {
|
|
1803
|
+
return typeof C == "function" ? C(i.value, o.status) : C;
|
|
1787
1804
|
}
|
|
1788
1805
|
return ln(
|
|
1789
1806
|
() => i,
|
|
1790
1807
|
() => {
|
|
1791
|
-
|
|
1808
|
+
d();
|
|
1792
1809
|
},
|
|
1793
1810
|
{
|
|
1794
1811
|
deep: !0
|
|
@@ -1796,84 +1813,84 @@ const Qo = { render: Jo }, er = {
|
|
|
1796
1813
|
), e({
|
|
1797
1814
|
form: i,
|
|
1798
1815
|
formValue: s,
|
|
1799
|
-
resetForm:
|
|
1800
|
-
validateForm:
|
|
1801
|
-
}), (
|
|
1802
|
-
const
|
|
1803
|
-
return S(),
|
|
1816
|
+
resetForm: h,
|
|
1817
|
+
validateForm: T
|
|
1818
|
+
}), (C, v) => {
|
|
1819
|
+
const m = Y("el-popover"), L = Y("el-form-item"), A = Y("el-form");
|
|
1820
|
+
return S(), H(A, xe({
|
|
1804
1821
|
ref_key: "formRef",
|
|
1805
1822
|
ref: r,
|
|
1806
1823
|
model: i.value
|
|
1807
|
-
},
|
|
1824
|
+
}, C.formConfig.formProps, { rules: st(a) }), {
|
|
1808
1825
|
default: W(() => [
|
|
1809
|
-
|
|
1826
|
+
I("div", {
|
|
1810
1827
|
class: "form-wrap",
|
|
1811
|
-
style:
|
|
1828
|
+
style: Re(C.formConfig.wrapStyle)
|
|
1812
1829
|
}, [
|
|
1813
|
-
(S(!0),
|
|
1830
|
+
(S(!0), k(oe, null, ue(y(C.formConfig.compList), (c) => (S(), k("div", {
|
|
1814
1831
|
class: "form-item",
|
|
1815
|
-
key:
|
|
1816
|
-
style:
|
|
1832
|
+
key: c.name,
|
|
1833
|
+
style: Re(ee(ee({}, C.formConfig.itemStyle), c.style))
|
|
1817
1834
|
}, [
|
|
1818
|
-
|
|
1819
|
-
prop:
|
|
1820
|
-
style:
|
|
1821
|
-
class:
|
|
1835
|
+
O(L, xe(ee(ee({}, C.formConfig.formItemProps), c.formItemProps), {
|
|
1836
|
+
prop: c.name,
|
|
1837
|
+
style: C.formConfig.formItemStyle,
|
|
1838
|
+
class: C.formConfig.layout
|
|
1822
1839
|
}), {
|
|
1823
1840
|
label: W(() => [
|
|
1824
|
-
|
|
1825
|
-
style:
|
|
1826
|
-
},
|
|
1827
|
-
|
|
1841
|
+
I("span", {
|
|
1842
|
+
style: Re(c.labelStyle)
|
|
1843
|
+
}, ie(_(c.label)), 5),
|
|
1844
|
+
c.hint ? (S(), H(m, {
|
|
1828
1845
|
key: 0,
|
|
1829
1846
|
placement: "top-start",
|
|
1830
1847
|
trigger: "hover",
|
|
1831
|
-
content:
|
|
1848
|
+
content: c.hint
|
|
1832
1849
|
}, {
|
|
1833
1850
|
reference: W(() => [
|
|
1834
|
-
|
|
1835
|
-
|
|
1851
|
+
c.hint ? (S(), k("span", nr, [
|
|
1852
|
+
O(st(tr), { color: "#ccc" })
|
|
1836
1853
|
])) : ne("", !0)
|
|
1837
1854
|
]),
|
|
1838
1855
|
_: 2
|
|
1839
1856
|
}, 1032, ["content"])) : ne("", !0)
|
|
1840
1857
|
]),
|
|
1841
1858
|
default: W(() => [
|
|
1842
|
-
|
|
1859
|
+
c.slotName ? sn(C.$slots, c.slotName, {
|
|
1843
1860
|
key: 0,
|
|
1844
1861
|
form: i.value
|
|
1845
|
-
}, void 0, !0) : n.includes(
|
|
1846
|
-
modelValue: i.value[
|
|
1847
|
-
"onUpdate:modelValue": (p) => i.value[
|
|
1848
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue"])) : (S(),
|
|
1849
|
-
disabled:
|
|
1850
|
-
modelValue: i.value[
|
|
1851
|
-
"onUpdate:modelValue": (p) => i.value[
|
|
1852
|
-
onKeyup: Qn((p) =>
|
|
1853
|
-
}, Wn(
|
|
1862
|
+
}, void 0, !0) : n.includes(c.ctype || "") ? (S(), H(J(`el-${c.ctype}`), xe({ key: 1 }, c.config, {
|
|
1863
|
+
modelValue: i.value[c.name],
|
|
1864
|
+
"onUpdate:modelValue": (p) => i.value[c.name] = p
|
|
1865
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue"])) : (S(), H(J(`el-${c.ctype}`), xe({ key: 2 }, c.config, {
|
|
1866
|
+
disabled: _(c.disabled),
|
|
1867
|
+
modelValue: i.value[c.name],
|
|
1868
|
+
"onUpdate:modelValue": (p) => i.value[c.name] = p,
|
|
1869
|
+
onKeyup: Qn((p) => _(c == null ? void 0 : c.enter), ["enter"])
|
|
1870
|
+
}, Wn(c.event)), {
|
|
1854
1871
|
default: W(() => [
|
|
1855
|
-
|
|
1872
|
+
c.ctype === "select" ? (S(!0), k(oe, { key: 0 }, ue(c.selectOptions, (p) => (S(), H(J("el-option"), {
|
|
1856
1873
|
key: p.value,
|
|
1857
1874
|
label: p.label,
|
|
1858
1875
|
value: p.value
|
|
1859
1876
|
}, null, 8, ["label", "value"]))), 128)) : ne("", !0),
|
|
1860
|
-
|
|
1877
|
+
c.ctype === "radio-group" ? (S(!0), k(oe, { key: 1 }, ue(c.radioList, (p) => (S(), H(J("el-radio"), {
|
|
1861
1878
|
key: p.value,
|
|
1862
1879
|
label: p.value
|
|
1863
1880
|
}, {
|
|
1864
1881
|
default: W(() => [
|
|
1865
|
-
|
|
1882
|
+
Q(ie(p.label), 1)
|
|
1866
1883
|
]),
|
|
1867
1884
|
_: 2
|
|
1868
1885
|
}, 1032, ["label"]))), 128)) : ne("", !0),
|
|
1869
|
-
|
|
1886
|
+
c.ctype === "checkbox-group" ? (S(!0), k(oe, { key: 2 }, ue(c.checkboxList, (p) => (S(), H(J("el-checkbox"), {
|
|
1870
1887
|
key: p,
|
|
1871
1888
|
label: p
|
|
1872
1889
|
}, null, 8, ["label"]))), 128)) : ne("", !0),
|
|
1873
|
-
|
|
1890
|
+
c.ctype === "input" ? (S(!0), k(oe, { key: 3 }, ue((c.slots || []).filter((p) => p.type === "text"), (p) => (S(), k("div", {
|
|
1874
1891
|
slot: p.name,
|
|
1875
1892
|
key: p.name
|
|
1876
|
-
},
|
|
1893
|
+
}, ie(p.inner), 9, or))), 128)) : ne("", !0)
|
|
1877
1894
|
]),
|
|
1878
1895
|
_: 2
|
|
1879
1896
|
}, 1040, ["disabled", "modelValue", "onUpdate:modelValue", "onKeyup"]))
|
|
@@ -1887,13 +1904,13 @@ const Qo = { render: Jo }, er = {
|
|
|
1887
1904
|
}, 16, ["model", "rules"]);
|
|
1888
1905
|
};
|
|
1889
1906
|
}
|
|
1890
|
-
}),
|
|
1891
|
-
let Dn, xn,
|
|
1892
|
-
const
|
|
1907
|
+
}), ir = /* @__PURE__ */ Me(rr, [["__scopeId", "data-v-ffed6caf"]]);
|
|
1908
|
+
let Dn, xn, ar;
|
|
1909
|
+
const sr = () => {
|
|
1893
1910
|
localStorage.setItem(Dn, xn), window.location.reload(!0);
|
|
1894
|
-
},
|
|
1895
|
-
|
|
1896
|
-
},
|
|
1911
|
+
}, lr = () => {
|
|
1912
|
+
ar.unmount(), document.body.removeChild(document.querySelector("#update")), localStorage.setItem(Dn, xn);
|
|
1913
|
+
}, ur = (t) => (Gn("data-v-668773ee"), t = t(), qn(), t), cr = { class: "update-wrap flex items-center justify-center" }, dr = { class: "relative update-content" }, fr = { class: "flex items-center justify-center" }, hr = { class: "flex flex-col gap-5 mt-10" }, pr = { class: "update-title" }, mr = { class: "update-item px-20" }, gr = { class: "text-end" }, vr = { class: "flex justify-end items-center mt-10" }, br = /* @__PURE__ */ ur(() => /* @__PURE__ */ I("span", { class: "tips mt-10" }, "提示: 选择立即更新后,会立即刷新页面更新系统,当前页面缓存数据会消失选择暂不更新后,请稍后自行刷新页面更新系统。", -1)), wr = /* @__PURE__ */ Ne({
|
|
1897
1914
|
__name: "index",
|
|
1898
1915
|
props: {
|
|
1899
1916
|
title: {},
|
|
@@ -1904,61 +1921,61 @@ const ir = () => {
|
|
|
1904
1921
|
setup(t) {
|
|
1905
1922
|
const e = t;
|
|
1906
1923
|
return console.log(e), (n, o) => {
|
|
1907
|
-
const r =
|
|
1908
|
-
return S(),
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
(S(!0),
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1924
|
+
const r = Y("el-button");
|
|
1925
|
+
return S(), k("div", cr, [
|
|
1926
|
+
I("div", dr, [
|
|
1927
|
+
I("div", fr, ie(e == null ? void 0 : e.title), 1),
|
|
1928
|
+
I("div", hr, [
|
|
1929
|
+
I("div", pr, ie(e == null ? void 0 : e.description), 1),
|
|
1930
|
+
(S(!0), k(oe, null, ue(e == null ? void 0 : e.content, (i, a) => (S(), k("div", mr, [
|
|
1931
|
+
I("span", null, ie(a) + ":", 1),
|
|
1932
|
+
Q(),
|
|
1933
|
+
I("span", null, ie(i), 1)
|
|
1917
1934
|
]))), 256)),
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1935
|
+
I("div", gr, ie(e.time) + " 软件专业部", 1),
|
|
1936
|
+
I("div", vr, [
|
|
1937
|
+
O(r, {
|
|
1921
1938
|
plain: "",
|
|
1922
|
-
onClick: st(
|
|
1939
|
+
onClick: st(lr)
|
|
1923
1940
|
}, {
|
|
1924
1941
|
default: W(() => [
|
|
1925
|
-
|
|
1942
|
+
Q("暂不更新")
|
|
1926
1943
|
]),
|
|
1927
1944
|
_: 1
|
|
1928
1945
|
}, 8, ["onClick"]),
|
|
1929
|
-
|
|
1946
|
+
O(r, { onClick: st(sr) }, {
|
|
1930
1947
|
default: W(() => [
|
|
1931
|
-
|
|
1948
|
+
Q("立即更新")
|
|
1932
1949
|
]),
|
|
1933
1950
|
_: 1
|
|
1934
1951
|
}, 8, ["onClick"])
|
|
1935
1952
|
]),
|
|
1936
|
-
|
|
1953
|
+
br
|
|
1937
1954
|
])
|
|
1938
1955
|
])
|
|
1939
1956
|
]);
|
|
1940
1957
|
};
|
|
1941
1958
|
}
|
|
1942
|
-
}),
|
|
1959
|
+
}), yr = /* @__PURE__ */ Me(wr, [["__scopeId", "data-v-668773ee"]]);
|
|
1943
1960
|
Array.prototype.handler = function(t) {
|
|
1944
1961
|
return t(this);
|
|
1945
1962
|
};
|
|
1946
|
-
function
|
|
1963
|
+
function _r(t) {
|
|
1947
1964
|
let e = 0, n = 0;
|
|
1948
1965
|
t.onmousedown = (o) => {
|
|
1949
1966
|
e = o.clientX - t.offsetLeft, n = o.clientY - t.offsetTop;
|
|
1950
1967
|
const r = (a) => {
|
|
1951
1968
|
a.stopPropagation(), a.preventDefault();
|
|
1952
1969
|
const s = a.clientX, l = a.clientY;
|
|
1953
|
-
let u = s - e,
|
|
1954
|
-
u < 0 && (u = 0),
|
|
1970
|
+
let u = s - e, h = l - n;
|
|
1971
|
+
u < 0 && (u = 0), h < 0 && (h = 0), u > document.body.clientWidth - t.clientWidth && (u = document.body.clientWidth - t.clientWidth), h > document.body.clientHeight - t.clientHeight && (h = document.body.clientHeight - t.clientHeight), t.style.left = u + "px", t.style.top = h + "px";
|
|
1955
1972
|
}, i = () => {
|
|
1956
1973
|
document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i);
|
|
1957
1974
|
};
|
|
1958
1975
|
document.addEventListener("mousemove", r), document.addEventListener("mouseup", i);
|
|
1959
1976
|
};
|
|
1960
1977
|
}
|
|
1961
|
-
const
|
|
1978
|
+
const Sr = {
|
|
1962
1979
|
status: !1,
|
|
1963
1980
|
toolDom: null,
|
|
1964
1981
|
panelWidth: 200,
|
|
@@ -1968,9 +1985,9 @@ const wr = {
|
|
|
1968
1985
|
function Dt(t) {
|
|
1969
1986
|
return document.querySelector(t);
|
|
1970
1987
|
}
|
|
1971
|
-
const
|
|
1988
|
+
const Er = {
|
|
1972
1989
|
data() {
|
|
1973
|
-
return
|
|
1990
|
+
return Sr;
|
|
1974
1991
|
},
|
|
1975
1992
|
mounted() {
|
|
1976
1993
|
this.getAllDom(), this.move();
|
|
@@ -1990,59 +2007,72 @@ const _r = {
|
|
|
1990
2007
|
},
|
|
1991
2008
|
/** 加入移动元素方法 */
|
|
1992
2009
|
move() {
|
|
1993
|
-
|
|
2010
|
+
_r(this.toolDom);
|
|
1994
2011
|
}
|
|
1995
2012
|
}
|
|
1996
|
-
},
|
|
2013
|
+
}, Tr = {
|
|
1997
2014
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1998
2015
|
width: "50",
|
|
1999
2016
|
height: "50",
|
|
2000
2017
|
fill: "none",
|
|
2001
2018
|
viewBox: "0 0 16 16"
|
|
2002
|
-
},
|
|
2003
|
-
|
|
2019
|
+
}, Cr = /* @__PURE__ */ Zn('<g stroke="currentColor" stroke-linejoin="round" stroke-width="1.333" clip-path="url(#a)"><path d="M8 14.666c1.986 0 .778-2.954 2-4.333 1.042-1.176 4.666-.638 4.666-2.333A6.667 6.667 0 1 0 8 14.666Z"></path><path d="M9.333 5.667a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5.333 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5.667 11.333a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"></path></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"></path></clipPath></defs>', 2), Dr = [
|
|
2020
|
+
Cr
|
|
2004
2021
|
];
|
|
2005
|
-
function
|
|
2006
|
-
return S(),
|
|
2022
|
+
function xr(t, e) {
|
|
2023
|
+
return S(), k("svg", Tr, Dr);
|
|
2007
2024
|
}
|
|
2008
|
-
const
|
|
2025
|
+
const Ir = { render: xr }, Pr = {
|
|
2009
2026
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2010
2027
|
width: "50",
|
|
2011
2028
|
height: "50",
|
|
2012
2029
|
fill: "none",
|
|
2013
2030
|
viewBox: "0 0 16 16"
|
|
2014
|
-
},
|
|
2031
|
+
}, Or = /* @__PURE__ */ I("g", {
|
|
2015
2032
|
stroke: "currentColor",
|
|
2016
2033
|
"stroke-linecap": "round",
|
|
2017
2034
|
"stroke-width": "1.333"
|
|
2018
2035
|
}, [
|
|
2019
|
-
/* @__PURE__ */
|
|
2036
|
+
/* @__PURE__ */ I("path", {
|
|
2020
2037
|
"stroke-linejoin": "round",
|
|
2021
2038
|
d: "M13.333 11v3a.667.667 0 0 1-.666.667H10.5M13.334 5.333V2a.667.667 0 0 0-.667-.667H3.334A.667.667 0 0 0 2.667 2v12c0 .368.298.666.667.666h2"
|
|
2022
2039
|
}),
|
|
2023
|
-
/* @__PURE__ */
|
|
2024
|
-
], -1),
|
|
2025
|
-
|
|
2040
|
+
/* @__PURE__ */ I("path", { d: "M5.333 5.333H10M7.667 14.667l5.667-7M5.333 8H8" })
|
|
2041
|
+
], -1), Ar = [
|
|
2042
|
+
Or
|
|
2043
|
+
];
|
|
2044
|
+
function kr(t, e) {
|
|
2045
|
+
return S(), k("svg", Pr, Ar);
|
|
2046
|
+
}
|
|
2047
|
+
const Nr = { render: kr }, Mr = {
|
|
2048
|
+
width: "1.2em",
|
|
2049
|
+
height: "1.2em",
|
|
2050
|
+
viewBox: "0 0 24 24"
|
|
2051
|
+
}, Br = /* @__PURE__ */ I("path", {
|
|
2052
|
+
fill: "currentColor",
|
|
2053
|
+
d: "m18.5 10 4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16.5 10h2zM10 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.62 6.301 14.864 14.864 0 0 0 2.336 1.707l-.751 1.878A17.015 17.015 0 0 1 9 13.725a16.676 16.676 0 0 1-6.201 3.548l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042A18.078 18.078 0 0 1 4.767 8h2.24A16.032 16.032 0 0 0 9 10.877a16.165 16.165 0 0 0 2.91-4.876L2 6V4h6V2h2zm7.5 10.885L16.253 16h2.492L17.5 12.885z"
|
|
2054
|
+
}, null, -1), $r = [
|
|
2055
|
+
Br
|
|
2026
2056
|
];
|
|
2027
|
-
function
|
|
2028
|
-
return S(),
|
|
2057
|
+
function Fr(t, e) {
|
|
2058
|
+
return S(), k("svg", Mr, $r);
|
|
2029
2059
|
}
|
|
2030
|
-
const
|
|
2060
|
+
const Vr = { render: Fr }, Lr = {
|
|
2031
2061
|
props: {
|
|
2032
2062
|
value: {
|
|
2033
2063
|
typeof: Number
|
|
2034
2064
|
}
|
|
2035
2065
|
}
|
|
2036
|
-
},
|
|
2037
|
-
function
|
|
2038
|
-
return cn((S(),
|
|
2039
|
-
|
|
2066
|
+
}, Hr = { class: "badge-container" };
|
|
2067
|
+
function Rr(t, e, n, o, r, i) {
|
|
2068
|
+
return cn((S(), k("div", Hr, [
|
|
2069
|
+
I("sup", null, ie(n.value), 1)
|
|
2040
2070
|
], 512)), [
|
|
2041
2071
|
[dn, n.value > 0]
|
|
2042
2072
|
]);
|
|
2043
2073
|
}
|
|
2044
|
-
const In = /* @__PURE__ */
|
|
2045
|
-
components: { theme:
|
|
2074
|
+
const In = /* @__PURE__ */ Me(Lr, [["render", Rr], ["__scopeId", "data-v-181eafdb"]]), Xr = {
|
|
2075
|
+
components: { theme: Ir, issue: Nr, Badge: In, lang: Vr },
|
|
2046
2076
|
props: {
|
|
2047
2077
|
showTool: {
|
|
2048
2078
|
typeof: Boolean,
|
|
@@ -2064,7 +2094,18 @@ const In = /* @__PURE__ */ Ne(Ar, [["render", Mr], ["__scopeId", "data-v-181eafd
|
|
|
2064
2094
|
desc: "跳转到问题反馈页面",
|
|
2065
2095
|
action: "hiddenTool",
|
|
2066
2096
|
component: "Theme",
|
|
2067
|
-
data: window.theme
|
|
2097
|
+
data: window.theme,
|
|
2098
|
+
show: window.theme.length > 0
|
|
2099
|
+
},
|
|
2100
|
+
{
|
|
2101
|
+
name: "issue",
|
|
2102
|
+
label: "语言切换",
|
|
2103
|
+
icon: "lang",
|
|
2104
|
+
position: [100, 0],
|
|
2105
|
+
desc: "跳转到问题反馈页面",
|
|
2106
|
+
component: "Issue",
|
|
2107
|
+
isShowBadge: !0,
|
|
2108
|
+
show: window.isRenderLang ? window.isRenderLang : !1
|
|
2068
2109
|
},
|
|
2069
2110
|
{
|
|
2070
2111
|
name: "issue",
|
|
@@ -2073,13 +2114,19 @@ const In = /* @__PURE__ */ Ne(Ar, [["render", Mr], ["__scopeId", "data-v-181eafd
|
|
|
2073
2114
|
position: [100, 0],
|
|
2074
2115
|
desc: "跳转到问题反馈页面",
|
|
2075
2116
|
component: "Issue",
|
|
2076
|
-
isShowBadge: !0
|
|
2117
|
+
isShowBadge: !0,
|
|
2118
|
+
show: window.isRenderIssue ? window.isRenderIssue : !1
|
|
2077
2119
|
}
|
|
2078
2120
|
],
|
|
2079
2121
|
curComponent: {},
|
|
2080
2122
|
curTheme: mt()
|
|
2081
2123
|
};
|
|
2082
2124
|
},
|
|
2125
|
+
computed: {
|
|
2126
|
+
configList() {
|
|
2127
|
+
return this.config.filter((t) => t.show);
|
|
2128
|
+
}
|
|
2129
|
+
},
|
|
2083
2130
|
watch: {
|
|
2084
2131
|
showTool(t) {
|
|
2085
2132
|
t ? this.curTheme = this.getCurTheme() : this.curComponent = {};
|
|
@@ -2122,72 +2169,73 @@ const In = /* @__PURE__ */ Ne(Ar, [["render", Mr], ["__scopeId", "data-v-181eafd
|
|
|
2122
2169
|
}[t];
|
|
2123
2170
|
}
|
|
2124
2171
|
}
|
|
2125
|
-
},
|
|
2126
|
-
key: 0,
|
|
2127
|
-
class: "toolbar-wrap"
|
|
2128
|
-
}, Vr = ["onClick"], $r = ["title"], Hr = { class: "tool-icon relative flex justify-center items-center" }, Xr = {
|
|
2172
|
+
}, Yr = ["onClick"], jr = ["title"], zr = { class: "tool-icon relative flex justify-center items-center" }, Ur = {
|
|
2129
2173
|
class: "yx-icon",
|
|
2130
2174
|
style: { color: "var(--color-main-100)" },
|
|
2131
2175
|
color: `var(--color-main-100) \r
|
|
2132
2176
|
`,
|
|
2133
2177
|
size: "24"
|
|
2134
|
-
},
|
|
2178
|
+
}, Wr = { class: "mt-10" }, Gr = {
|
|
2135
2179
|
key: 1,
|
|
2136
2180
|
class: "toolbar-wrap-component"
|
|
2137
|
-
},
|
|
2181
|
+
}, qr = {
|
|
2138
2182
|
class: "yx-icon",
|
|
2139
2183
|
style: { color: "var(--color-main-100)" },
|
|
2140
2184
|
color: "var(--color-main-100)",
|
|
2141
2185
|
size: "30"
|
|
2142
|
-
},
|
|
2143
|
-
function
|
|
2144
|
-
const a =
|
|
2145
|
-
return S(),
|
|
2186
|
+
}, Zr = ["title", "onClick"];
|
|
2187
|
+
function Kr(t, e, n, o, r, i) {
|
|
2188
|
+
const a = Y("Badge");
|
|
2189
|
+
return S(), H(eo, {
|
|
2146
2190
|
name: "zoom",
|
|
2147
2191
|
mode: "out-in"
|
|
2148
2192
|
}, {
|
|
2149
2193
|
default: W(() => [
|
|
2150
|
-
cn(
|
|
2194
|
+
cn(I("div", {
|
|
2151
2195
|
class: lt(["toolbar-container", n.showTool ? "zoom-in" : "zoom-out "])
|
|
2152
2196
|
}, [
|
|
2153
|
-
r.curComponent.name ? ne("", !0) : (S(),
|
|
2154
|
-
|
|
2197
|
+
r.curComponent.name ? ne("", !0) : (S(), k("div", {
|
|
2198
|
+
key: 0,
|
|
2199
|
+
style: Re({ "grid-template-columns": `repeat(${i.configList.length}, 1fr)` }),
|
|
2200
|
+
class: "toolbar-wrap"
|
|
2201
|
+
}, [
|
|
2202
|
+
(S(!0), k(oe, null, ue(i.configList, (s) => (S(), k("div", {
|
|
2155
2203
|
class: "flex justify-center items-center",
|
|
2156
2204
|
onClick: (l) => i.configHandle(s)
|
|
2157
2205
|
}, [
|
|
2158
|
-
|
|
2206
|
+
I("div", {
|
|
2159
2207
|
title: s.label,
|
|
2160
2208
|
class: "flex flex-col justify-center items-center"
|
|
2161
2209
|
}, [
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
(S(),
|
|
2210
|
+
I("div", zr, [
|
|
2211
|
+
I("i", Ur, [
|
|
2212
|
+
(S(), H(J(s.icon)))
|
|
2165
2213
|
]),
|
|
2166
|
-
s.isShowBadge ? (S(),
|
|
2214
|
+
s.isShowBadge ? (S(), H(a, {
|
|
2167
2215
|
key: 0,
|
|
2168
2216
|
value: n.badgeValue
|
|
2169
2217
|
}, null, 8, ["value"])) : ne("", !0)
|
|
2170
2218
|
]),
|
|
2171
|
-
|
|
2172
|
-
], 8,
|
|
2173
|
-
], 8,
|
|
2174
|
-
])),
|
|
2175
|
-
r.curComponent.name ? (S(),
|
|
2176
|
-
|
|
2219
|
+
I("span", Wr, ie(s.label), 1)
|
|
2220
|
+
], 8, jr)
|
|
2221
|
+
], 8, Yr))), 256))
|
|
2222
|
+
], 4)),
|
|
2223
|
+
r.curComponent.name ? (S(), k("div", Gr, [
|
|
2224
|
+
I("div", {
|
|
2177
2225
|
class: "flex flex-col toolbar-center items-center",
|
|
2178
2226
|
onClick: e[0] || (e[0] = (s) => r.curComponent = {}),
|
|
2179
2227
|
title: "返回"
|
|
2180
2228
|
}, [
|
|
2181
|
-
|
|
2182
|
-
(S(),
|
|
2229
|
+
I("i", qr, [
|
|
2230
|
+
(S(), H(J(r.curComponent.icon)))
|
|
2183
2231
|
])
|
|
2184
2232
|
]),
|
|
2185
|
-
(S(!0),
|
|
2186
|
-
style:
|
|
2233
|
+
(S(!0), k(oe, null, ue(r.curComponent.data, (s, l) => (S(), k("div", {
|
|
2234
|
+
style: Re([{ background: s.themeColor, boxShadow: `0px 4px 7px 0px ${s.themeColor}` }, i.getPosition(l)]),
|
|
2187
2235
|
title: s.name,
|
|
2188
2236
|
class: lt(["theme", r.curTheme === s.id ? "select" : ""]),
|
|
2189
2237
|
onClick: (u) => i.chooseTheme(s)
|
|
2190
|
-
}, null, 14,
|
|
2238
|
+
}, null, 14, Zr))), 256))
|
|
2191
2239
|
])) : ne("", !0)
|
|
2192
2240
|
], 2), [
|
|
2193
2241
|
[dn, n.showTool]
|
|
@@ -2196,28 +2244,28 @@ function Rr(t, e, n, o, r, i) {
|
|
|
2196
2244
|
_: 1
|
|
2197
2245
|
});
|
|
2198
2246
|
}
|
|
2199
|
-
const
|
|
2247
|
+
const Jr = /* @__PURE__ */ Me(Xr, [["render", Kr], ["__scopeId", "data-v-b353970d"]]), Qr = {
|
|
2200
2248
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2201
2249
|
width: "50",
|
|
2202
2250
|
height: "50",
|
|
2203
2251
|
fill: "none",
|
|
2204
2252
|
viewBox: "0 0 25 25"
|
|
2205
|
-
},
|
|
2253
|
+
}, ei = /* @__PURE__ */ I("g", {
|
|
2206
2254
|
stroke: "currentColor",
|
|
2207
2255
|
"stroke-linejoin": "round",
|
|
2208
2256
|
"stroke-width": "2"
|
|
2209
2257
|
}, [
|
|
2210
|
-
/* @__PURE__ */
|
|
2211
|
-
], -1),
|
|
2212
|
-
|
|
2258
|
+
/* @__PURE__ */ I("path", { d: "M9 3H4a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1ZM9 14H4a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1ZM20 3h-5a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1ZM20 14h-5a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1Z" })
|
|
2259
|
+
], -1), ti = [
|
|
2260
|
+
ei
|
|
2213
2261
|
];
|
|
2214
|
-
function
|
|
2215
|
-
return S(),
|
|
2262
|
+
function ni(t, e) {
|
|
2263
|
+
return S(), k("svg", Qr, ti);
|
|
2216
2264
|
}
|
|
2217
|
-
const
|
|
2265
|
+
const oi = { render: ni }, $t = {
|
|
2218
2266
|
name: "YxToolbar",
|
|
2219
|
-
components: { ToolbarContainer:
|
|
2220
|
-
mixins: [
|
|
2267
|
+
components: { ToolbarContainer: Jr, menu: oi, Badge: In },
|
|
2268
|
+
mixins: [Er],
|
|
2221
2269
|
data() {
|
|
2222
2270
|
return {
|
|
2223
2271
|
showTool: !1,
|
|
@@ -2225,7 +2273,8 @@ const Kr = { render: Zr }, Bt = {
|
|
|
2225
2273
|
top: 0,
|
|
2226
2274
|
left: 0
|
|
2227
2275
|
},
|
|
2228
|
-
badgeValue: 0
|
|
2276
|
+
badgeValue: 0,
|
|
2277
|
+
showBadge: window.isRenderIssue
|
|
2229
2278
|
};
|
|
2230
2279
|
},
|
|
2231
2280
|
computed: {
|
|
@@ -2234,7 +2283,7 @@ const Kr = { render: Zr }, Bt = {
|
|
|
2234
2283
|
}
|
|
2235
2284
|
},
|
|
2236
2285
|
mounted() {
|
|
2237
|
-
this.getCount(), this.initToolPosition();
|
|
2286
|
+
this.showBadge && this.getCount(), this.initToolPosition();
|
|
2238
2287
|
},
|
|
2239
2288
|
methods: {
|
|
2240
2289
|
initToolPosition() {
|
|
@@ -2242,8 +2291,8 @@ const Kr = { render: Zr }, Bt = {
|
|
|
2242
2291
|
t.style.setProperty("--tool-left", e), t.style.setProperty("--tool-top", n);
|
|
2243
2292
|
},
|
|
2244
2293
|
getCount() {
|
|
2245
|
-
return
|
|
2246
|
-
const { data: t } = yield
|
|
2294
|
+
return me(this, null, function* () {
|
|
2295
|
+
const { data: t } = yield Vn();
|
|
2247
2296
|
this.badgeValue = t.count;
|
|
2248
2297
|
});
|
|
2249
2298
|
},
|
|
@@ -2282,34 +2331,37 @@ const Kr = { render: Zr }, Bt = {
|
|
|
2282
2331
|
}
|
|
2283
2332
|
}, en = () => {
|
|
2284
2333
|
to((t) => ({
|
|
2285
|
-
"
|
|
2286
|
-
|
|
2334
|
+
"14e08ee2": t.panelWidthPX,
|
|
2335
|
+
b58f614a: t.panelHeightPX
|
|
2287
2336
|
}));
|
|
2288
|
-
}, tn =
|
|
2289
|
-
|
|
2290
|
-
const
|
|
2337
|
+
}, tn = $t.setup;
|
|
2338
|
+
$t.setup = tn ? (t, e) => (en(), tn(t, e)) : en;
|
|
2339
|
+
const ri = {
|
|
2291
2340
|
id: "toolbar-wrap",
|
|
2292
2341
|
class: "toolbar-wrap"
|
|
2293
|
-
},
|
|
2294
|
-
function
|
|
2295
|
-
const a =
|
|
2296
|
-
return S(),
|
|
2297
|
-
|
|
2342
|
+
}, ii = { class: "yx-icon" };
|
|
2343
|
+
function ai(t, e, n, o, r, i) {
|
|
2344
|
+
const a = Y("Badge"), s = Y("ToolbarContainer");
|
|
2345
|
+
return S(), k("div", ri, [
|
|
2346
|
+
I("div", {
|
|
2298
2347
|
class: lt(["tool", `${i.showClass}`]),
|
|
2299
2348
|
onClick: e[0] || (e[0] = (...l) => i.handlerClickTool && i.handlerClickTool(...l)),
|
|
2300
2349
|
onMousedown: e[1] || (e[1] = (...l) => i.mousedownTool && i.mousedownTool(...l)),
|
|
2301
2350
|
onMouseup: e[2] || (e[2] = (...l) => t.mouseupTool && t.mouseupTool(...l))
|
|
2302
2351
|
}, [
|
|
2303
|
-
|
|
2304
|
-
(S(),
|
|
2352
|
+
I("i", ii, [
|
|
2353
|
+
(S(), H(J("menu")))
|
|
2305
2354
|
]),
|
|
2306
|
-
|
|
2355
|
+
r.showBadge ? (S(), H(a, {
|
|
2356
|
+
key: 0,
|
|
2357
|
+
value: r.badgeValue
|
|
2358
|
+
}, null, 8, ["value"])) : ne("", !0)
|
|
2307
2359
|
], 34),
|
|
2308
|
-
|
|
2360
|
+
I("div", {
|
|
2309
2361
|
class: lt(["mask", `${i.showClass}`]),
|
|
2310
2362
|
onClick: e[3] || (e[3] = (...l) => i.close && i.close(...l))
|
|
2311
2363
|
}, null, 2),
|
|
2312
|
-
|
|
2364
|
+
O(s, {
|
|
2313
2365
|
onZero: e[4] || (e[4] = (l) => r.badgeValue = 0),
|
|
2314
2366
|
badgeValue: r.badgeValue,
|
|
2315
2367
|
class: "panel",
|
|
@@ -2317,14 +2369,14 @@ function ei(t, e, n, o, r, i) {
|
|
|
2317
2369
|
}, null, 8, ["badgeValue", "showTool"])
|
|
2318
2370
|
]);
|
|
2319
2371
|
}
|
|
2320
|
-
const nn = /* @__PURE__ */
|
|
2321
|
-
var
|
|
2322
|
-
const
|
|
2372
|
+
const nn = /* @__PURE__ */ Me($t, [["render", ai], ["__scopeId", "data-v-8e3349c3"]]);
|
|
2373
|
+
var Ae;
|
|
2374
|
+
const Pe = class Pe {
|
|
2323
2375
|
constructor(e) {
|
|
2324
2376
|
/** 工具挂载domId */
|
|
2325
|
-
|
|
2326
|
-
const { theme: n } = e;
|
|
2327
|
-
return
|
|
2377
|
+
jt(this, Ae, "yxToolbarV2");
|
|
2378
|
+
const { theme: n, isRenderIssue: o, isRenderLang: r } = e;
|
|
2379
|
+
return Pe.instance || (window.theme = n, window.isRenderIssue = o, window.isRenderLang = r, this.init(), Pe.instance = this), Pe.instance;
|
|
2328
2380
|
}
|
|
2329
2381
|
/** 当前vue版本 */
|
|
2330
2382
|
get vueVersion() {
|
|
@@ -2337,116 +2389,124 @@ const Ie = class Ie {
|
|
|
2337
2389
|
/** 挂载初始化容器 */
|
|
2338
2390
|
mount() {
|
|
2339
2391
|
const e = document.createElement("div");
|
|
2340
|
-
if (e.id =
|
|
2341
|
-
return no(nn).mount(`#${
|
|
2392
|
+
if (e.id = Ke(this, Ae), document.body.appendChild(e), this.vueVersion === "3")
|
|
2393
|
+
return no(nn).mount(`#${Ke(this, Ae)}`);
|
|
2342
2394
|
{
|
|
2343
2395
|
const n = require("vue");
|
|
2344
|
-
return new n({ render: (o) => o(nn) }).$mount(`#${
|
|
2396
|
+
return new n({ render: (o) => o(nn) }).$mount(`#${Ke(this, Ae)}`);
|
|
2345
2397
|
}
|
|
2346
2398
|
}
|
|
2347
2399
|
};
|
|
2348
|
-
|
|
2349
|
-
let pt =
|
|
2350
|
-
const
|
|
2400
|
+
Ae = new WeakMap(), Pe.instance = null;
|
|
2401
|
+
let pt = Pe;
|
|
2402
|
+
const si = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2351
2403
|
__proto__: null,
|
|
2352
2404
|
Toolbar: pt,
|
|
2353
|
-
Update:
|
|
2354
|
-
YxDialog:
|
|
2355
|
-
YxForm:
|
|
2405
|
+
Update: yr,
|
|
2406
|
+
YxDialog: fo,
|
|
2407
|
+
YxForm: ir,
|
|
2356
2408
|
YxSearchForm: Xo,
|
|
2357
|
-
YxTable:
|
|
2358
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2359
|
-
var
|
|
2360
|
-
|
|
2409
|
+
YxTable: Ho
|
|
2410
|
+
}, Symbol.toStringTag, { value: "Module" })), li = (t) => me(void 0, null, function* () {
|
|
2411
|
+
var n;
|
|
2412
|
+
t = ee(ee({}, uo), t);
|
|
2413
|
+
let e = mt();
|
|
2361
2414
|
try {
|
|
2362
|
-
const { data:
|
|
2363
|
-
|
|
2364
|
-
let
|
|
2365
|
-
if (!
|
|
2366
|
-
const
|
|
2367
|
-
|
|
2415
|
+
const { data: o } = yield an();
|
|
2416
|
+
yield ui(t), t.isRenderToolbar && new pt({ theme: o, isRenderIssue: t.isRenderIssue, isRenderLang: t.isRenderLang });
|
|
2417
|
+
let r = e ? (n = o.find((a) => a.id === e)) == null ? void 0 : n.themeUrl : "";
|
|
2418
|
+
if (!e || !r) {
|
|
2419
|
+
const s = o.find((l) => l.defaultTheme === 1) || o[0];
|
|
2420
|
+
r = s.themeUrl, e = s.id;
|
|
2368
2421
|
}
|
|
2369
|
-
const
|
|
2370
|
-
Pn({ themeCssVar:
|
|
2371
|
-
const
|
|
2372
|
-
|
|
2422
|
+
const i = yield kt(r);
|
|
2423
|
+
Pn({ themeCssVar: i, themeId: e }), on(), Vt.onmessage = (a) => {
|
|
2424
|
+
const s = JSON.parse(a.data);
|
|
2425
|
+
s.type === "theme" && (kt(s.data.themeUrl), rn.publish({ type: "theme", data: null }));
|
|
2373
2426
|
}, console.log("主题初始化完毕!!!");
|
|
2374
|
-
} catch (
|
|
2375
|
-
on(),
|
|
2427
|
+
} catch (o) {
|
|
2428
|
+
on(), An();
|
|
2376
2429
|
}
|
|
2430
|
+
}), ui = (r) => me(void 0, [r], function* ({ loginUrl: t, homeUrl: e, lang: n, environment: o }) {
|
|
2431
|
+
oo({ loginUrl: t, homeUrl: e, lang: n, environment: o });
|
|
2377
2432
|
}), on = () => {
|
|
2378
2433
|
const t = document.createElement("style");
|
|
2379
|
-
t.innerHTML =
|
|
2434
|
+
t.innerHTML = lo, document.head.appendChild(t);
|
|
2380
2435
|
}, Pn = ({ themeCssVar: t, themeId: e }) => {
|
|
2381
2436
|
const n = localStorage.getItem("ttcGlobalState") || "{}", o = JSON.parse(n);
|
|
2382
2437
|
o.theme = {
|
|
2383
2438
|
themeCssVar: t,
|
|
2384
2439
|
id: e
|
|
2385
2440
|
}, localStorage.setItem("ttcGlobalState", JSON.stringify(o));
|
|
2386
|
-
}, On = (t) =>
|
|
2387
|
-
const e = yield
|
|
2388
|
-
Pn({ themeCssVar: e, themeId: t == null ? void 0 : t.id }),
|
|
2389
|
-
}),
|
|
2390
|
-
const t =
|
|
2441
|
+
}, On = (t) => me(void 0, null, function* () {
|
|
2442
|
+
const e = yield kt(t.themeUrl);
|
|
2443
|
+
Pn({ themeCssVar: e, themeId: t == null ? void 0 : t.id }), Vt.postMessage(JSON.stringify({ type: "theme", data: t })), rn.publish({ type: "theme", data: t });
|
|
2444
|
+
}), An = () => {
|
|
2445
|
+
const t = Ft(), e = document.documentElement;
|
|
2391
2446
|
Object.keys(t).forEach((n) => {
|
|
2392
2447
|
Object.keys(t[n]).forEach((o) => {
|
|
2393
2448
|
const r = `--${n}-${o}`;
|
|
2394
2449
|
e.style.setProperty(r, t[n][o]);
|
|
2395
2450
|
});
|
|
2396
2451
|
});
|
|
2397
|
-
},
|
|
2398
|
-
const n = yield (yield fetch(t)).json(), o = document.
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2452
|
+
}, kt = (t) => me(void 0, null, function* () {
|
|
2453
|
+
const n = yield (yield fetch(t)).json(), o = document.createElement("style");
|
|
2454
|
+
let r = `:root {
|
|
2455
|
+
`;
|
|
2456
|
+
return Object.keys(n).forEach((i) => {
|
|
2457
|
+
Object.keys(n[i]).forEach((a) => {
|
|
2458
|
+
const s = `--${i}-${a}`, l = n[i][a];
|
|
2459
|
+
r += ` ${s}: ${l};
|
|
2460
|
+
`;
|
|
2403
2461
|
});
|
|
2404
|
-
}), n;
|
|
2405
|
-
}),
|
|
2462
|
+
}), r += "}", o.appendChild(document.createTextNode(r)), document.head.appendChild(o), n;
|
|
2463
|
+
}), ci = () => me(void 0, null, function* () {
|
|
2406
2464
|
const { data: t } = yield an(), e = t.find((o) => o.defaultTheme === 1);
|
|
2407
2465
|
return e ? e.themeUrl : t[0].themeUrl;
|
|
2408
2466
|
}), mt = () => {
|
|
2409
2467
|
var n;
|
|
2410
2468
|
const t = localStorage.getItem("ttcGlobalState"), e = t && ((n = JSON.parse(t)) == null ? void 0 : n.theme);
|
|
2411
2469
|
return (e == null ? void 0 : e.id) || null;
|
|
2412
|
-
},
|
|
2470
|
+
}, Ft = () => {
|
|
2413
2471
|
var n;
|
|
2414
2472
|
const t = localStorage.getItem("ttcGlobalState");
|
|
2415
2473
|
return (t && ((n = JSON.parse(t)) == null ? void 0 : n.theme)).themeCssVar;
|
|
2416
|
-
},
|
|
2474
|
+
}, di = (t) => Ft()[t] || {}, fi = (t, e) => document.documentElement.style.getPropertyValue(t) === e, hi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2417
2475
|
__proto__: null,
|
|
2418
2476
|
changeTheme: On,
|
|
2477
|
+
findColorByTheme: fi,
|
|
2419
2478
|
getCurTheme: mt,
|
|
2420
|
-
getCurThemeCssVar:
|
|
2421
|
-
getDefaultThemeUrl:
|
|
2422
|
-
getGroupColor:
|
|
2423
|
-
install:
|
|
2424
|
-
updateTheme:
|
|
2425
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2426
|
-
utils:
|
|
2427
|
-
icons:
|
|
2428
|
-
api:
|
|
2429
|
-
theme:
|
|
2430
|
-
components:
|
|
2431
|
-
directives:
|
|
2432
|
-
BC:
|
|
2479
|
+
getCurThemeCssVar: Ft,
|
|
2480
|
+
getDefaultThemeUrl: ci,
|
|
2481
|
+
getGroupColor: di,
|
|
2482
|
+
install: li,
|
|
2483
|
+
updateTheme: An
|
|
2484
|
+
}, Symbol.toStringTag, { value: "Module" })), Vt = new BroadcastChannel("YXUSE_BC"), Si = {
|
|
2485
|
+
utils: $n,
|
|
2486
|
+
icons: Fn,
|
|
2487
|
+
api: Ln,
|
|
2488
|
+
theme: hi,
|
|
2489
|
+
components: si,
|
|
2490
|
+
directives: ro,
|
|
2491
|
+
BC: Vt
|
|
2433
2492
|
};
|
|
2434
2493
|
export {
|
|
2435
|
-
|
|
2494
|
+
Vt as B,
|
|
2436
2495
|
pt as T,
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2496
|
+
yr as U,
|
|
2497
|
+
fo as _,
|
|
2498
|
+
Ho as a,
|
|
2499
|
+
li as b,
|
|
2441
2500
|
On as c,
|
|
2442
2501
|
mt as d,
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2502
|
+
Ft as e,
|
|
2503
|
+
ir as f,
|
|
2504
|
+
ci as g,
|
|
2505
|
+
di as h,
|
|
2447
2506
|
Xo as i,
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2507
|
+
fi as j,
|
|
2508
|
+
Si as k,
|
|
2509
|
+
si as l,
|
|
2510
|
+
hi as t,
|
|
2511
|
+
An as u
|
|
2452
2512
|
};
|