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