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