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