yxuse 3.0.4 → 3.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.cjs2.js +3 -3
- package/lib/index.cjs2.js.gz +0 -0
- package/lib/index.es2.js +184 -184
- package/lib/index.es2.js.gz +0 -0
- package/package.json +1 -1
- package/types/components/YxTable/type.d.ts +2 -0
package/lib/index.es2.js
CHANGED
|
@@ -62,7 +62,7 @@ const ro = "@font-face {font-family: 'YX-TITLE';font-size: 16px; src: url('https
|
|
|
62
62
|
}), o = () => {
|
|
63
63
|
n.show = !1;
|
|
64
64
|
}, r = {}, i = () => we(this, null, function* () {
|
|
65
|
-
if (!(r.beforeSubmit && !r.beforeSubmit())) {
|
|
65
|
+
if (!(r.beforeSubmit && !(yield r.beforeSubmit()))) {
|
|
66
66
|
n.loading = !0;
|
|
67
67
|
try {
|
|
68
68
|
r.submit && (yield r.submit()), n.loading = !1, n.autoClose && o();
|
|
@@ -72,18 +72,18 @@ const ro = "@font-face {font-family: 'YX-TITLE';font-size: 16px; src: url('https
|
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
return e({
|
|
75
|
-
show: ({ width: s, title: l, submit: u, cancel:
|
|
76
|
-
s && (n.width = s), l && (n.title = l),
|
|
75
|
+
show: ({ width: s, title: l, submit: u, cancel: d, showFooter: f, autoClose: g, beforeOpen: T, beforeSubmit: w }) => {
|
|
76
|
+
s && (n.width = s), l && (n.title = l), f !== void 0 && (n.showFooter = f), g !== void 0 && (n.autoClose = g), u && (r.submit = u), d && (r.cancel = d), w && (r.beforeSubmit = w), T && T(), n.show = !0;
|
|
77
77
|
},
|
|
78
78
|
close: o
|
|
79
79
|
}), (s, l) => {
|
|
80
|
-
const u = j("el-button"),
|
|
81
|
-
return S(), X(
|
|
80
|
+
const u = j("el-button"), d = j("el-dialog");
|
|
81
|
+
return S(), X(d, {
|
|
82
82
|
"close-on-click-modal": !1,
|
|
83
83
|
attrs: "",
|
|
84
84
|
width: n.width,
|
|
85
85
|
modelValue: n.show,
|
|
86
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
86
|
+
"onUpdate:modelValue": l[0] || (l[0] = (f) => n.show = f),
|
|
87
87
|
title: n.title
|
|
88
88
|
}, Yn({
|
|
89
89
|
default: W(() => [
|
|
@@ -144,14 +144,14 @@ const ro = "@font-face {font-family: 'YX-TITLE';font-size: 16px; src: url('https
|
|
|
144
144
|
return S(), X(K(`el-${(a = r.conf) == null ? void 0 : a.renderType}`), De({
|
|
145
145
|
modelValue: r.model[(s = r.conf) == null ? void 0 : s.prop],
|
|
146
146
|
"onUpdate:modelValue": i[0] || (i[0] = (u) => {
|
|
147
|
-
var
|
|
148
|
-
return r.model[(
|
|
147
|
+
var d;
|
|
148
|
+
return r.model[(d = r.conf) == null ? void 0 : d.prop] = u;
|
|
149
149
|
})
|
|
150
150
|
}, (l = r.conf) == null ? void 0 : l.config), {
|
|
151
151
|
default: W(() => {
|
|
152
|
-
var u,
|
|
152
|
+
var u, d, f;
|
|
153
153
|
return [
|
|
154
|
-
r.conf.renderType === "select" ? (S(!0), N(ne, { key: 0 }, le((
|
|
154
|
+
r.conf.renderType === "select" ? (S(!0), N(ne, { key: 0 }, le((f = (d = (u = r.conf) == null ? void 0 : u.config) == null ? void 0 : d.options) != null ? f : [], (g) => (S(), X(K("el-option"), {
|
|
155
155
|
key: g.value,
|
|
156
156
|
label: g.label,
|
|
157
157
|
value: g.value
|
|
@@ -327,8 +327,8 @@ function ie() {
|
|
|
327
327
|
}
|
|
328
328
|
function $(t, e, n, o, r) {
|
|
329
329
|
if (!(!t.getBoundingClientRect && t !== window)) {
|
|
330
|
-
var i, a, s, l, u,
|
|
331
|
-
if (t !== window && t.parentNode && t !== ie() ? (i = t.getBoundingClientRect(), a = i.top, s = i.left, l = i.bottom, u = i.right,
|
|
330
|
+
var i, a, s, l, u, d, f;
|
|
331
|
+
if (t !== window && t.parentNode && t !== ie() ? (i = t.getBoundingClientRect(), a = i.top, s = i.left, l = i.bottom, u = i.right, d = i.height, f = i.width) : (a = 0, s = 0, l = window.innerHeight, u = window.innerWidth, d = window.innerHeight, f = window.innerWidth), (e || n) && t !== window && (r = r || t.parentNode, !de))
|
|
332
332
|
do
|
|
333
333
|
if (r && r.getBoundingClientRect && (v(r, "transform") !== "none" || n && v(r, "position") !== "static")) {
|
|
334
334
|
var g = r.getBoundingClientRect();
|
|
@@ -338,15 +338,15 @@ function $(t, e, n, o, r) {
|
|
|
338
338
|
while (r = r.parentNode);
|
|
339
339
|
if (o && t !== window) {
|
|
340
340
|
var T = Pe(r || t), w = T && T.a, y = T && T.d;
|
|
341
|
-
T && (a /= y, s /= w,
|
|
341
|
+
T && (a /= y, s /= w, f /= w, d /= y, l = a + d, u = s + f);
|
|
342
342
|
}
|
|
343
343
|
return {
|
|
344
344
|
top: a,
|
|
345
345
|
left: s,
|
|
346
346
|
bottom: l,
|
|
347
347
|
right: u,
|
|
348
|
-
width:
|
|
349
|
-
height:
|
|
348
|
+
width: f,
|
|
349
|
+
height: d
|
|
350
350
|
};
|
|
351
351
|
}
|
|
352
352
|
}
|
|
@@ -490,9 +490,9 @@ function wo() {
|
|
|
490
490
|
}
|
|
491
491
|
var i = !1, a = 0;
|
|
492
492
|
t.forEach(function(s) {
|
|
493
|
-
var l = 0, u = s.target,
|
|
494
|
-
y && (
|
|
495
|
-
(w.top -
|
|
493
|
+
var l = 0, u = s.target, d = u.fromRect, f = $(u), g = u.prevFromRect, T = u.prevToRect, w = s.rect, y = Pe(u, !0);
|
|
494
|
+
y && (f.top -= y.f, f.left -= y.e), u.toRect = f, u.thisAnimationDuration && vt(g, f) && !vt(d, f) && // Make sure animatingRect is on line between toRect & fromRect
|
|
495
|
+
(w.top - f.top) / (w.left - f.left) === (d.top - f.top) / (d.left - f.left) && (l = _o(w, g, T, r.options)), vt(f, d) || (u.prevFromRect = d, u.prevToRect = f, l || (l = r.options.animation), r.animate(u, w, f, l)), l && (i = !0, a = Math.max(a, l), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
|
|
496
496
|
u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
|
|
497
497
|
}, l), u.thisAnimationDuration = l);
|
|
498
498
|
}), clearTimeout(e), i ? e = setTimeout(function() {
|
|
@@ -502,8 +502,8 @@ function wo() {
|
|
|
502
502
|
animate: function(o, r, i, a) {
|
|
503
503
|
if (a) {
|
|
504
504
|
v(o, "transition", ""), v(o, "transform", "");
|
|
505
|
-
var s = Pe(this.el), l = s && s.a, u = s && s.d,
|
|
506
|
-
o.animatingX = !!
|
|
505
|
+
var s = Pe(this.el), l = s && s.a, u = s && s.d, d = (r.left - i.left) / (l || 1), f = (r.top - i.top) / (u || 1);
|
|
506
|
+
o.animatingX = !!d, o.animatingY = !!f, v(o, "transform", "translate3d(" + d + "px," + f + "px,0)"), this.forRepaintDummy = yo(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() {
|
|
507
507
|
v(o, "transition", ""), v(o, "transform", ""), o.animated = !1, o.animatingX = !1, o.animatingY = !1;
|
|
508
508
|
}, a);
|
|
509
509
|
}
|
|
@@ -569,13 +569,13 @@ var Ee = [], bt = {
|
|
|
569
569
|
}
|
|
570
570
|
};
|
|
571
571
|
function So(t) {
|
|
572
|
-
var e = t.sortable, n = t.rootEl, o = t.name, r = t.targetEl, i = t.cloneEl, a = t.toEl, s = t.fromEl, l = t.oldIndex, u = t.newIndex,
|
|
572
|
+
var e = t.sortable, n = t.rootEl, o = t.name, r = t.targetEl, i = t.cloneEl, a = t.toEl, s = t.fromEl, l = t.oldIndex, u = t.newIndex, d = t.oldDraggableIndex, f = t.newDraggableIndex, g = t.originalEvent, T = t.putSortable, w = t.extraEventProperties;
|
|
573
573
|
if (e = e || n && n[Z], !!e) {
|
|
574
574
|
var y, C = e.options, E = "on" + o.charAt(0).toUpperCase() + o.substr(1);
|
|
575
575
|
window.CustomEvent && !de && !We ? y = new CustomEvent(o, {
|
|
576
576
|
bubbles: !0,
|
|
577
577
|
cancelable: !0
|
|
578
|
-
}) : (y = document.createEvent("Event"), y.initEvent(o, !0, !0)), y.to = a || n, y.from = s || n, y.item = r || n, y.clone = i, y.oldIndex = l, y.newIndex = u, y.oldDraggableIndex =
|
|
578
|
+
}) : (y = document.createEvent("Event"), y.initEvent(o, !0, !0)), y.to = a || n, y.from = s || n, y.item = r || n, y.clone = i, y.oldIndex = l, y.newIndex = u, y.oldDraggableIndex = d, y.newDraggableIndex = f, y.originalEvent = g, y.pullMode = T ? T.lastPutMode : void 0;
|
|
579
579
|
var m = ae(ae({}, w), Ge.getEventProperties(o, e));
|
|
580
580
|
for (var H in m)
|
|
581
581
|
y[H] = m[H];
|
|
@@ -585,7 +585,7 @@ function So(t) {
|
|
|
585
585
|
var Eo = ["evt"], U = function(e, n) {
|
|
586
586
|
var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = o.evt, i = ho(o, Eo);
|
|
587
587
|
Ge.pluginEvent.bind(b)(e, n, ae({
|
|
588
|
-
dragEl:
|
|
588
|
+
dragEl: h,
|
|
589
589
|
parentEl: F,
|
|
590
590
|
ghostEl: _,
|
|
591
591
|
rootEl: A,
|
|
@@ -622,7 +622,7 @@ function z(t) {
|
|
|
622
622
|
So(ae({
|
|
623
623
|
putSortable: Y,
|
|
624
624
|
cloneEl: B,
|
|
625
|
-
targetEl:
|
|
625
|
+
targetEl: h,
|
|
626
626
|
rootEl: A,
|
|
627
627
|
oldIndex: xe,
|
|
628
628
|
oldDraggableIndex: ze,
|
|
@@ -630,7 +630,7 @@ function z(t) {
|
|
|
630
630
|
newDraggableIndex: pe
|
|
631
631
|
}, t));
|
|
632
632
|
}
|
|
633
|
-
var
|
|
633
|
+
var h, F, _, A, Se, ot, B, me, xe, q, ze, pe, Ke, Y, Ce = !1, ct = !1, dt = [], ye, ee, wt, yt, Zt, Jt, $e, Te, Re, Ue = !1, Qe = !1, rt, L, _t = [], It = !1, ft = [], gt = typeof document != "undefined", et = hn, Kt = We || de ? "cssFloat" : "float", To = gt && !pn && !hn && "draggable" in document.createElement("div"), yn = function() {
|
|
634
634
|
if (gt) {
|
|
635
635
|
if (de)
|
|
636
636
|
return !1;
|
|
@@ -638,16 +638,16 @@ var f, F, _, A, Se, ot, B, me, xe, q, ze, pe, Ke, Y, Ce = !1, ct = !1, dt = [],
|
|
|
638
638
|
return t.style.cssText = "pointer-events:auto", t.style.pointerEvents === "auto";
|
|
639
639
|
}
|
|
640
640
|
}(), _n = function(e, n) {
|
|
641
|
-
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) + $(i).width,
|
|
641
|
+
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) + $(i).width, d = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + $(a).width;
|
|
642
642
|
if (o.display === "flex")
|
|
643
643
|
return o.flexDirection === "column" || o.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
644
644
|
if (o.display === "grid")
|
|
645
645
|
return o.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
646
646
|
if (i && s.float && s.float !== "none") {
|
|
647
|
-
var
|
|
648
|
-
return a && (l.clear === "both" || l.clear ===
|
|
647
|
+
var f = s.float === "left" ? "left" : "right";
|
|
648
|
+
return a && (l.clear === "both" || l.clear === f) ? "vertical" : "horizontal";
|
|
649
649
|
}
|
|
650
|
-
return i && (s.display === "block" || s.display === "flex" || s.display === "table" || s.display === "grid" || u >= r && o[Kt] === "none" || a && o[Kt] === "none" && u +
|
|
650
|
+
return i && (s.display === "block" || s.display === "flex" || s.display === "table" || s.display === "grid" || u >= r && o[Kt] === "none" || a && o[Kt] === "none" && u + d > r) ? "vertical" : "horizontal";
|
|
651
651
|
}, Co = function(e, n, o) {
|
|
652
652
|
var r = o ? e.left : e.top, i = o ? e.right : e.bottom, a = o ? e.width : e.height, s = o ? n.left : n.top, l = o ? n.right : n.bottom, u = o ? n.width : n.height;
|
|
653
653
|
return r === s || i === l || r + a / 2 === s + u / 2;
|
|
@@ -663,16 +663,16 @@ var f, F, _, A, Se, ot, B, me, xe, q, ze, pe, Ke, Y, Ce = !1, ct = !1, dt = [],
|
|
|
663
663
|
}), o;
|
|
664
664
|
}, Sn = function(e) {
|
|
665
665
|
function n(i, a) {
|
|
666
|
-
return function(s, l, u,
|
|
667
|
-
var
|
|
668
|
-
if (i == null && (a ||
|
|
666
|
+
return function(s, l, u, d) {
|
|
667
|
+
var f = s.options.group.name && l.options.group.name && s.options.group.name === l.options.group.name;
|
|
668
|
+
if (i == null && (a || f))
|
|
669
669
|
return !0;
|
|
670
670
|
if (i == null || i === !1)
|
|
671
671
|
return !1;
|
|
672
672
|
if (a && i === "clone")
|
|
673
673
|
return i;
|
|
674
674
|
if (typeof i == "function")
|
|
675
|
-
return n(i(s, l, u,
|
|
675
|
+
return n(i(s, l, u, d), a)(s, l, u, d);
|
|
676
676
|
var g = (a ? s : l).options.group.name;
|
|
677
677
|
return i === !0 || typeof i == "string" && i === g || i.join && i.indexOf(g) > -1;
|
|
678
678
|
};
|
|
@@ -691,7 +691,7 @@ gt && !pn && document.addEventListener("click", function(t) {
|
|
|
691
691
|
return t.preventDefault(), t.stopPropagation && t.stopPropagation(), t.stopImmediatePropagation && t.stopImmediatePropagation(), ct = !1, !1;
|
|
692
692
|
}, !0);
|
|
693
693
|
var _e = function(e) {
|
|
694
|
-
if (
|
|
694
|
+
if (h) {
|
|
695
695
|
e = e.touches ? e.touches[0] : e;
|
|
696
696
|
var n = Do(e.clientX, e.clientY);
|
|
697
697
|
if (n) {
|
|
@@ -702,7 +702,7 @@ var _e = function(e) {
|
|
|
702
702
|
}
|
|
703
703
|
}
|
|
704
704
|
}, xo = function(e) {
|
|
705
|
-
|
|
705
|
+
h && h.parentNode[Z]._isOutsideThisEl(e.target);
|
|
706
706
|
};
|
|
707
707
|
function b(t, e) {
|
|
708
708
|
if (!(t && t.nodeType && t.nodeType === 1))
|
|
@@ -768,14 +768,14 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
768
768
|
!this.el.contains(e) && e !== this.el && (Te = null);
|
|
769
769
|
},
|
|
770
770
|
_getDirection: function(e, n) {
|
|
771
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, n,
|
|
771
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, n, h) : this.options.direction;
|
|
772
772
|
},
|
|
773
773
|
_onTapStart: function(e) {
|
|
774
774
|
if (e.cancelable) {
|
|
775
|
-
var n = this, o = this.el, r = this.options, i = r.preventOnFilter, a = e.type, s = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, l = (s || e).target, u = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || l,
|
|
776
|
-
if (Bo(o), !
|
|
777
|
-
if (xe = J(l), ze = J(l, r.draggable), typeof
|
|
778
|
-
if (
|
|
775
|
+
var n = this, o = this.el, r = this.options, i = r.preventOnFilter, a = e.type, s = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, l = (s || e).target, u = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || l, d = r.filter;
|
|
776
|
+
if (Bo(o), !h && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !u.isContentEditable && !(!this.nativeDraggable && Le && l && l.tagName.toUpperCase() === "SELECT") && (l = oe(l, r.draggable, o, !1), !(l && l.animated) && ot !== l)) {
|
|
777
|
+
if (xe = J(l), ze = J(l, r.draggable), typeof d == "function") {
|
|
778
|
+
if (d.call(this, e, l, this)) {
|
|
779
779
|
z({
|
|
780
780
|
sortable: n,
|
|
781
781
|
rootEl: u,
|
|
@@ -788,11 +788,11 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
788
788
|
}), i && e.cancelable && e.preventDefault();
|
|
789
789
|
return;
|
|
790
790
|
}
|
|
791
|
-
} else if (
|
|
792
|
-
if (
|
|
791
|
+
} else if (d && (d = d.split(",").some(function(f) {
|
|
792
|
+
if (f = oe(u, f.trim(), o, !1), f)
|
|
793
793
|
return z({
|
|
794
794
|
sortable: n,
|
|
795
|
-
rootEl:
|
|
795
|
+
rootEl: f,
|
|
796
796
|
name: "filter",
|
|
797
797
|
targetEl: l,
|
|
798
798
|
fromEl: o,
|
|
@@ -800,7 +800,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
800
800
|
}), U("filter", n, {
|
|
801
801
|
evt: e
|
|
802
802
|
}), !0;
|
|
803
|
-
}),
|
|
803
|
+
}), d)) {
|
|
804
804
|
i && e.cancelable && e.preventDefault();
|
|
805
805
|
return;
|
|
806
806
|
}
|
|
@@ -810,27 +810,27 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
810
810
|
},
|
|
811
811
|
_prepareDragStart: function(e, n, o) {
|
|
812
812
|
var r = this, i = r.el, a = r.options, s = i.ownerDocument, l;
|
|
813
|
-
if (o && !
|
|
813
|
+
if (o && !h && o.parentNode === i) {
|
|
814
814
|
var u = $(o);
|
|
815
|
-
if (A = i,
|
|
816
|
-
target:
|
|
815
|
+
if (A = i, h = o, F = h.parentNode, Se = h.nextSibling, ot = o, Ke = a.group, b.dragged = h, ye = {
|
|
816
|
+
target: h,
|
|
817
817
|
clientX: (n || e).clientX,
|
|
818
818
|
clientY: (n || e).clientY
|
|
819
|
-
}, Zt = ye.clientX - u.left, Jt = ye.clientY - u.top, this._lastX = (n || e).clientX, this._lastY = (n || e).clientY,
|
|
819
|
+
}, Zt = ye.clientX - u.left, Jt = ye.clientY - u.top, this._lastX = (n || e).clientX, this._lastY = (n || e).clientY, h.style["will-change"] = "all", l = function() {
|
|
820
820
|
if (U("delayEnded", r, {
|
|
821
821
|
evt: e
|
|
822
822
|
}), b.eventCanceled) {
|
|
823
823
|
r._onDrop();
|
|
824
824
|
return;
|
|
825
825
|
}
|
|
826
|
-
r._disableDelayedDragEvents(), !Ut && r.nativeDraggable && (
|
|
826
|
+
r._disableDelayedDragEvents(), !Ut && r.nativeDraggable && (h.draggable = !0), r._triggerDragStart(e, n), z({
|
|
827
827
|
sortable: r,
|
|
828
828
|
name: "choose",
|
|
829
829
|
originalEvent: e
|
|
830
|
-
}), G(
|
|
831
|
-
}, a.ignore.split(",").forEach(function(
|
|
832
|
-
gn(
|
|
833
|
-
}), x(s, "dragover", _e), x(s, "mousemove", _e), x(s, "touchmove", _e), x(s, "mouseup", r._onDrop), x(s, "touchend", r._onDrop), x(s, "touchcancel", r._onDrop), Ut && this.nativeDraggable && (this.options.touchStartThreshold = 4,
|
|
830
|
+
}), G(h, a.chosenClass, !0);
|
|
831
|
+
}, a.ignore.split(",").forEach(function(d) {
|
|
832
|
+
gn(h, d.trim(), St);
|
|
833
|
+
}), x(s, "dragover", _e), x(s, "mousemove", _e), x(s, "touchmove", _e), x(s, "mouseup", r._onDrop), x(s, "touchend", r._onDrop), x(s, "touchcancel", r._onDrop), Ut && this.nativeDraggable && (this.options.touchStartThreshold = 4, h.draggable = !0), U("delayStart", this, {
|
|
834
834
|
evt: e
|
|
835
835
|
}), a.delay && (!a.delayOnTouchOnly || n) && (!this.nativeDraggable || !(We || de))) {
|
|
836
836
|
if (b.eventCanceled) {
|
|
@@ -847,14 +847,14 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
847
847
|
Math.max(Math.abs(n.clientX - this._lastX), Math.abs(n.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
848
848
|
},
|
|
849
849
|
_disableDelayedDrag: function() {
|
|
850
|
-
|
|
850
|
+
h && St(h), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
851
851
|
},
|
|
852
852
|
_disableDelayedDragEvents: function() {
|
|
853
853
|
var e = this.el.ownerDocument;
|
|
854
854
|
D(e, "mouseup", this._disableDelayedDrag), D(e, "touchend", this._disableDelayedDrag), D(e, "touchcancel", this._disableDelayedDrag), D(e, "mousemove", this._delayedDragTouchMoveHandler), D(e, "touchmove", this._delayedDragTouchMoveHandler), D(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
855
855
|
},
|
|
856
856
|
_triggerDragStart: function(e, n) {
|
|
857
|
-
n = n || e.pointerType == "touch" && e, !this.nativeDraggable || n ? this.options.supportPointer ? x(document, "pointermove", this._onTouchMove) : n ? x(document, "touchmove", this._onTouchMove) : x(document, "mousemove", this._onTouchMove) : (x(
|
|
857
|
+
n = n || e.pointerType == "touch" && e, !this.nativeDraggable || n ? this.options.supportPointer ? x(document, "pointermove", this._onTouchMove) : n ? x(document, "touchmove", this._onTouchMove) : x(document, "mousemove", this._onTouchMove) : (x(h, "dragend", this), x(A, "dragstart", this._onDragStart));
|
|
858
858
|
try {
|
|
859
859
|
document.selection ? it(function() {
|
|
860
860
|
document.selection.empty();
|
|
@@ -863,12 +863,12 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
863
863
|
}
|
|
864
864
|
},
|
|
865
865
|
_dragStarted: function(e, n) {
|
|
866
|
-
if (Ce = !1, A &&
|
|
866
|
+
if (Ce = !1, A && h) {
|
|
867
867
|
U("dragStarted", this, {
|
|
868
868
|
evt: n
|
|
869
869
|
}), this.nativeDraggable && x(document, "dragover", xo);
|
|
870
870
|
var o = this.options;
|
|
871
|
-
!e && G(
|
|
871
|
+
!e && G(h, o.dragClass, !1), G(h, o.ghostClass, !0), b.active = this, e && this._appendGhost(), z({
|
|
872
872
|
sortable: this,
|
|
873
873
|
name: "start",
|
|
874
874
|
originalEvent: n
|
|
@@ -881,7 +881,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
881
881
|
this._lastX = ee.clientX, this._lastY = ee.clientY, En();
|
|
882
882
|
for (var e = document.elementFromPoint(ee.clientX, ee.clientY), n = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(ee.clientX, ee.clientY), e !== n); )
|
|
883
883
|
n = e;
|
|
884
|
-
if (
|
|
884
|
+
if (h.parentNode[Z]._isOutsideThisEl(e), n)
|
|
885
885
|
do {
|
|
886
886
|
if (n[Z]) {
|
|
887
887
|
var o = void 0;
|
|
@@ -900,36 +900,36 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
900
900
|
},
|
|
901
901
|
_onTouchMove: function(e) {
|
|
902
902
|
if (ye) {
|
|
903
|
-
var n = this.options, o = n.fallbackTolerance, r = n.fallbackOffset, i = e.touches ? e.touches[0] : e, a = _ && Pe(_, !0), s = _ && a && a.a, l = _ && a && a.d, u = et && L && qt(L),
|
|
903
|
+
var n = this.options, o = n.fallbackTolerance, r = n.fallbackOffset, i = e.touches ? e.touches[0] : e, a = _ && Pe(_, !0), s = _ && a && a.a, l = _ && a && a.d, u = et && L && qt(L), d = (i.clientX - ye.clientX + r.x) / (s || 1) + (u ? u[0] - _t[0] : 0) / (s || 1), f = (i.clientY - ye.clientY + r.y) / (l || 1) + (u ? u[1] - _t[1] : 0) / (l || 1);
|
|
904
904
|
if (!b.active && !Ce) {
|
|
905
905
|
if (o && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < o)
|
|
906
906
|
return;
|
|
907
907
|
this._onDragStart(e, !0);
|
|
908
908
|
}
|
|
909
909
|
if (_) {
|
|
910
|
-
a ? (a.e +=
|
|
910
|
+
a ? (a.e += d - (wt || 0), a.f += f - (yt || 0)) : a = {
|
|
911
911
|
a: 1,
|
|
912
912
|
b: 0,
|
|
913
913
|
c: 0,
|
|
914
914
|
d: 1,
|
|
915
|
-
e:
|
|
916
|
-
f
|
|
915
|
+
e: d,
|
|
916
|
+
f
|
|
917
917
|
};
|
|
918
918
|
var g = "matrix(".concat(a.a, ",").concat(a.b, ",").concat(a.c, ",").concat(a.d, ",").concat(a.e, ",").concat(a.f, ")");
|
|
919
|
-
v(_, "webkitTransform", g), v(_, "mozTransform", g), v(_, "msTransform", g), v(_, "transform", g), wt =
|
|
919
|
+
v(_, "webkitTransform", g), v(_, "mozTransform", g), v(_, "msTransform", g), v(_, "transform", g), wt = d, yt = f, ee = i;
|
|
920
920
|
}
|
|
921
921
|
e.cancelable && e.preventDefault();
|
|
922
922
|
}
|
|
923
923
|
},
|
|
924
924
|
_appendGhost: function() {
|
|
925
925
|
if (!_) {
|
|
926
|
-
var e = this.options.fallbackOnBody ? document.body : A, n = $(
|
|
926
|
+
var e = this.options.fallbackOnBody ? document.body : A, n = $(h, !0, et, !0, e), o = this.options;
|
|
927
927
|
if (et) {
|
|
928
928
|
for (L = e; v(L, "position") === "static" && v(L, "transform") === "none" && L !== document; )
|
|
929
929
|
L = L.parentNode;
|
|
930
930
|
L !== document.body && L !== document.documentElement ? (L === document && (L = ie()), n.top += L.scrollTop, n.left += L.scrollLeft) : L = ie(), _t = qt(L);
|
|
931
931
|
}
|
|
932
|
-
_ =
|
|
932
|
+
_ = h.cloneNode(!0), G(_, o.ghostClass, !1), G(_, o.fallbackClass, !0), G(_, o.dragClass, !0), v(_, "transition", ""), v(_, "transform", ""), v(_, "box-sizing", "border-box"), v(_, "margin", 0), v(_, "top", n.top), v(_, "left", n.left), v(_, "width", n.width), v(_, "height", n.height), v(_, "opacity", "0.8"), v(_, "position", et ? "absolute" : "fixed"), v(_, "zIndex", "100000"), v(_, "pointerEvents", "none"), b.ghost = _, e.appendChild(_), v(_, "transform-origin", Zt / parseInt(_.style.width) * 100 + "% " + Jt / parseInt(_.style.height) * 100 + "%");
|
|
933
933
|
}
|
|
934
934
|
},
|
|
935
935
|
_onDragStart: function(e, n) {
|
|
@@ -940,32 +940,32 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
940
940
|
this._onDrop();
|
|
941
941
|
return;
|
|
942
942
|
}
|
|
943
|
-
U("setupClone", this), b.eventCanceled || (B = wn(
|
|
944
|
-
U("clone", o), !b.eventCanceled && (o.options.removeCloneOnHide || A.insertBefore(B,
|
|
943
|
+
U("setupClone", this), b.eventCanceled || (B = wn(h), B.removeAttribute("id"), B.draggable = !1, B.style["will-change"] = "", this._hideClone(), G(B, this.options.chosenClass, !1), b.clone = B), o.cloneId = it(function() {
|
|
944
|
+
U("clone", o), !b.eventCanceled && (o.options.removeCloneOnHide || A.insertBefore(B, h), o._hideClone(), z({
|
|
945
945
|
sortable: o,
|
|
946
946
|
name: "clone"
|
|
947
947
|
}));
|
|
948
|
-
}), !n && G(
|
|
948
|
+
}), !n && G(h, 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, h)), x(document, "drop", o), v(h, "transform", "translateZ(0)")), Ce = !0, o._dragStartId = it(o._dragStarted.bind(o, n, e)), x(document, "selectstart", o), $e = !0, Le && v(document.body, "user-select", "none");
|
|
949
949
|
},
|
|
950
950
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
951
951
|
_onDragOver: function(e) {
|
|
952
|
-
var n = this.el, o = e.target, r, i, a, s = this.options, l = s.group, u = b.active,
|
|
952
|
+
var n = this.el, o = e.target, r, i, a, s = this.options, l = s.group, u = b.active, d = Ke === l, f = s.sort, g = Y || u, T, w = this, y = !1;
|
|
953
953
|
if (It)
|
|
954
954
|
return;
|
|
955
955
|
function C(Fe, An) {
|
|
956
956
|
U(Fe, w, ae({
|
|
957
957
|
evt: e,
|
|
958
|
-
isOwner:
|
|
958
|
+
isOwner: d,
|
|
959
959
|
axis: T ? "vertical" : "horizontal",
|
|
960
960
|
revert: a,
|
|
961
961
|
dragRect: r,
|
|
962
962
|
targetRect: i,
|
|
963
|
-
canSort:
|
|
963
|
+
canSort: f,
|
|
964
964
|
fromSortable: g,
|
|
965
965
|
target: o,
|
|
966
966
|
completed: m,
|
|
967
967
|
onMove: function(Ht, Nn) {
|
|
968
|
-
return tt(A, n,
|
|
968
|
+
return tt(A, n, h, r, Ht, $(Ht), e, Nn);
|
|
969
969
|
},
|
|
970
970
|
changed: H
|
|
971
971
|
}, An));
|
|
@@ -976,12 +976,12 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
976
976
|
function m(Fe) {
|
|
977
977
|
return C("dragOverCompleted", {
|
|
978
978
|
insertion: Fe
|
|
979
|
-
}), Fe && (
|
|
979
|
+
}), Fe && (d ? u._hideClone() : u._showClone(w), w !== g && (G(h, Y ? Y.options.ghostClass : u.options.ghostClass, !1), G(h, s.ghostClass, !0)), Y !== w && w !== b.active ? Y = w : w === b.active && Y && (Y = null), g === w && (w._ignoreWhileAnimating = o), w.animateAll(function() {
|
|
980
980
|
C("dragOverAnimationComplete"), w._ignoreWhileAnimating = null;
|
|
981
|
-
}), w !== g && (g.animateAll(), g._ignoreWhileAnimating = null)), (o ===
|
|
981
|
+
}), w !== g && (g.animateAll(), g._ignoreWhileAnimating = null)), (o === h && !h.animated || o === n && !o.animated) && (Te = null), !s.dragoverBubble && !e.rootEl && o !== document && (h.parentNode[Z]._isOutsideThisEl(e.target), !Fe && _e(e)), !s.dragoverBubble && e.stopPropagation && e.stopPropagation(), y = !0;
|
|
982
982
|
}
|
|
983
983
|
function H() {
|
|
984
|
-
q = J(
|
|
984
|
+
q = J(h), pe = J(h, s.draggable), z({
|
|
985
985
|
sortable: w,
|
|
986
986
|
name: "change",
|
|
987
987
|
toEl: n,
|
|
@@ -992,32 +992,32 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
992
992
|
}
|
|
993
993
|
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), o = oe(o, s.draggable, n, !0), C("dragOver"), b.eventCanceled)
|
|
994
994
|
return y;
|
|
995
|
-
if (
|
|
995
|
+
if (h.contains(e.target) || o.animated && o.animatingX && o.animatingY || w._ignoreWhileAnimating === o)
|
|
996
996
|
return m(!1);
|
|
997
|
-
if (ct = !1, u && !s.disabled && (
|
|
998
|
-
if (T = this._getDirection(e, o) === "vertical", r = $(
|
|
997
|
+
if (ct = !1, u && !s.disabled && (d ? f || (a = F !== A) : Y === this || (this.lastPutMode = Ke.checkPull(this, u, h, e)) && l.checkPut(this, u, h, e))) {
|
|
998
|
+
if (T = this._getDirection(e, o) === "vertical", r = $(h), C("dragOverValid"), b.eventCanceled)
|
|
999
999
|
return y;
|
|
1000
1000
|
if (a)
|
|
1001
|
-
return F = A, E(), this._hideClone(), C("revert"), b.eventCanceled || (Se ? A.insertBefore(
|
|
1001
|
+
return F = A, E(), this._hideClone(), C("revert"), b.eventCanceled || (Se ? A.insertBefore(h, Se) : A.appendChild(h)), m(!0);
|
|
1002
1002
|
var k = Nt(n, s.draggable);
|
|
1003
1003
|
if (!k || ko(e, T, this) && !k.animated) {
|
|
1004
|
-
if (k ===
|
|
1004
|
+
if (k === h)
|
|
1005
1005
|
return m(!1);
|
|
1006
|
-
if (k && n === e.target && (o = k), o && (i = $(o)), tt(A, n,
|
|
1007
|
-
return E(), k && k.nextSibling ? n.insertBefore(
|
|
1006
|
+
if (k && n === e.target && (o = k), o && (i = $(o)), tt(A, n, h, r, o, i, e, !!o) !== !1)
|
|
1007
|
+
return E(), k && k.nextSibling ? n.insertBefore(h, k.nextSibling) : n.appendChild(h), F = n, H(), m(!0);
|
|
1008
1008
|
} else if (k && Oo(e, T, this)) {
|
|
1009
|
-
var
|
|
1010
|
-
if (
|
|
1009
|
+
var c = ke(n, 0, s, !0);
|
|
1010
|
+
if (c === h)
|
|
1011
1011
|
return m(!1);
|
|
1012
|
-
if (o =
|
|
1013
|
-
return E(), n.insertBefore(
|
|
1012
|
+
if (o = c, i = $(o), tt(A, n, h, r, o, i, e, !1) !== !1)
|
|
1013
|
+
return E(), n.insertBefore(h, c), F = n, H(), m(!0);
|
|
1014
1014
|
} else if (o.parentNode === n) {
|
|
1015
1015
|
i = $(o);
|
|
1016
|
-
var p = 0, I, R =
|
|
1016
|
+
var p = 0, I, R = h.parentNode !== n, M = !Co(h.animated && h.toRect || r, o.animated && o.toRect || i, T), ve = T ? "top" : "left", fe = Gt(o, "top", "top") || Gt(h, "top", "top"), Me = fe ? fe.scrollTop : void 0;
|
|
1017
1017
|
Te !== o && (I = i[ve], Ue = !1, Qe = !M && s.invertSwap || R), p = Ao(e, o, i, T, M ? 1 : s.swapThreshold, s.invertedSwapThreshold == null ? s.swapThreshold : s.invertedSwapThreshold, Qe, Te === o);
|
|
1018
1018
|
var se;
|
|
1019
1019
|
if (p !== 0) {
|
|
1020
|
-
var be = J(
|
|
1020
|
+
var be = J(h);
|
|
1021
1021
|
do
|
|
1022
1022
|
be -= p, se = F.children[be];
|
|
1023
1023
|
while (se && (v(se, "display") === "none" || se === _));
|
|
@@ -1027,11 +1027,11 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1027
1027
|
Te = o, Re = p;
|
|
1028
1028
|
var Be = o.nextElementSibling, he = !1;
|
|
1029
1029
|
he = p === 1;
|
|
1030
|
-
var qe = tt(A, n,
|
|
1030
|
+
var qe = tt(A, n, h, r, o, i, e, he);
|
|
1031
1031
|
if (qe !== !1)
|
|
1032
|
-
return (qe === 1 || qe === -1) && (he = qe === 1), It = !0, setTimeout(Po, 30), E(), he && !Be ? n.appendChild(
|
|
1032
|
+
return (qe === 1 || qe === -1) && (he = qe === 1), It = !0, setTimeout(Po, 30), E(), he && !Be ? n.appendChild(h) : o.parentNode.insertBefore(h, he ? Be : o), fe && bn(fe, 0, Me - fe.scrollTop), F = h.parentNode, I !== void 0 && !Qe && (rt = Math.abs(I - $(o)[ve])), H(), m(!0);
|
|
1033
1033
|
}
|
|
1034
|
-
if (n.contains(
|
|
1034
|
+
if (n.contains(h))
|
|
1035
1035
|
return m(!1);
|
|
1036
1036
|
}
|
|
1037
1037
|
return !1;
|
|
@@ -1046,13 +1046,13 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1046
1046
|
},
|
|
1047
1047
|
_onDrop: function(e) {
|
|
1048
1048
|
var n = this.el, o = this.options;
|
|
1049
|
-
if (q = J(
|
|
1049
|
+
if (q = J(h), pe = J(h, o.draggable), U("drop", this, {
|
|
1050
1050
|
evt: e
|
|
1051
|
-
}), F =
|
|
1051
|
+
}), F = h && h.parentNode, q = J(h), pe = J(h, o.draggable), b.eventCanceled) {
|
|
1052
1052
|
this._nulling();
|
|
1053
1053
|
return;
|
|
1054
1054
|
}
|
|
1055
|
-
Ce = !1, Qe = !1, Ue = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Pt(this.cloneId), Pt(this._dragStartId), this.nativeDraggable && (D(document, "drop", this), D(n, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Le && v(document.body, "user-select", ""), v(
|
|
1055
|
+
Ce = !1, Qe = !1, Ue = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Pt(this.cloneId), Pt(this._dragStartId), this.nativeDraggable && (D(document, "drop", this), D(n, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Le && v(document.body, "user-select", ""), v(h, "transform", ""), e && ($e && (e.cancelable && e.preventDefault(), !o.dropBubble && e.stopPropagation()), _ && _.parentNode && _.parentNode.removeChild(_), (A === F || Y && Y.lastPutMode !== "clone") && B && B.parentNode && B.parentNode.removeChild(B), h && (this.nativeDraggable && D(h, "dragend", this), St(h), h.style["will-change"] = "", $e && !Ce && G(h, Y ? Y.options.ghostClass : this.options.ghostClass, !1), G(h, this.options.chosenClass, !1), z({
|
|
1056
1056
|
sortable: this,
|
|
1057
1057
|
name: "unchoose",
|
|
1058
1058
|
toEl: F,
|
|
@@ -1099,7 +1099,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1099
1099
|
}), this.save()))), this._nulling();
|
|
1100
1100
|
},
|
|
1101
1101
|
_nulling: function() {
|
|
1102
|
-
U("nulling", this), A =
|
|
1102
|
+
U("nulling", this), A = h = F = _ = Se = B = ot = me = ye = ee = $e = q = pe = xe = ze = Te = Re = Y = Ke = b.dragged = b.ghost = b.clone = b.active = null, ft.forEach(function(e) {
|
|
1103
1103
|
e.checked = !0;
|
|
1104
1104
|
}), ft.length = wt = yt = 0;
|
|
1105
1105
|
},
|
|
@@ -1111,7 +1111,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1111
1111
|
break;
|
|
1112
1112
|
case "dragenter":
|
|
1113
1113
|
case "dragover":
|
|
1114
|
-
|
|
1114
|
+
h && (this._onDragOver(e), Io(e));
|
|
1115
1115
|
break;
|
|
1116
1116
|
case "selectstart":
|
|
1117
1117
|
e.preventDefault();
|
|
@@ -1194,7 +1194,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1194
1194
|
if (me) {
|
|
1195
1195
|
if (U("showClone", this), b.eventCanceled)
|
|
1196
1196
|
return;
|
|
1197
|
-
|
|
1197
|
+
h.parentNode == A && !this.options.group.revertClone ? A.insertBefore(B, h) : Se ? A.insertBefore(B, Se) : A.appendChild(B), this.options.group.revertClone && this.animate(h, B), v(B, "display", ""), me = !1;
|
|
1198
1198
|
}
|
|
1199
1199
|
}
|
|
1200
1200
|
};
|
|
@@ -1202,11 +1202,11 @@ function Io(t) {
|
|
|
1202
1202
|
t.dataTransfer && (t.dataTransfer.dropEffect = "move"), t.cancelable && t.preventDefault();
|
|
1203
1203
|
}
|
|
1204
1204
|
function tt(t, e, n, o, r, i, a, s) {
|
|
1205
|
-
var l, u = t[Z],
|
|
1205
|
+
var l, u = t[Z], d = u.options.onMove, f;
|
|
1206
1206
|
return window.CustomEvent && !de && !We ? l = new CustomEvent("move", {
|
|
1207
1207
|
bubbles: !0,
|
|
1208
1208
|
cancelable: !0
|
|
1209
|
-
}) : (l = document.createEvent("Event"), l.initEvent("move", !0, !0)), l.to = e, l.from = t, l.dragged = n, l.draggedRect = o, l.related = r || e, l.relatedRect = i || $(e), l.willInsertAfter = s, l.originalEvent = a, t.dispatchEvent(l),
|
|
1209
|
+
}) : (l = document.createEvent("Event"), l.initEvent("move", !0, !0)), l.to = e, l.from = t, l.dragged = n, l.draggedRect = o, l.related = r || e, l.relatedRect = i || $(e), l.willInsertAfter = s, l.originalEvent = a, t.dispatchEvent(l), d && (f = d.call(u, l, a)), f;
|
|
1210
1210
|
}
|
|
1211
1211
|
function St(t) {
|
|
1212
1212
|
t.draggable = !1;
|
|
@@ -1223,20 +1223,20 @@ function ko(t, e, n) {
|
|
|
1223
1223
|
return e ? t.clientX > o.right + r || t.clientX <= o.right && t.clientY > o.bottom && t.clientX >= o.left : t.clientX > o.right && t.clientY > o.top || t.clientX <= o.right && t.clientY > o.bottom + r;
|
|
1224
1224
|
}
|
|
1225
1225
|
function Ao(t, e, n, o, r, i, a, s) {
|
|
1226
|
-
var l = o ? t.clientY : t.clientX, u = o ? n.height : n.width,
|
|
1226
|
+
var l = o ? t.clientY : t.clientX, u = o ? n.height : n.width, d = o ? n.top : n.left, f = o ? n.bottom : n.right, g = !1;
|
|
1227
1227
|
if (!a) {
|
|
1228
1228
|
if (s && rt < u * r) {
|
|
1229
|
-
if (!Ue && (Re === 1 ? l >
|
|
1229
|
+
if (!Ue && (Re === 1 ? l > d + u * i / 2 : l < f - u * i / 2) && (Ue = !0), Ue)
|
|
1230
1230
|
g = !0;
|
|
1231
|
-
else if (Re === 1 ? l <
|
|
1231
|
+
else if (Re === 1 ? l < d + rt : l > f - rt)
|
|
1232
1232
|
return -Re;
|
|
1233
|
-
} else if (l >
|
|
1233
|
+
} else if (l > d + u * (1 - r) / 2 && l < f - u * (1 - r) / 2)
|
|
1234
1234
|
return No(e);
|
|
1235
1235
|
}
|
|
1236
|
-
return g = g || a, g && (l <
|
|
1236
|
+
return g = g || a, g && (l < d + u * i / 2 || l > f - u * i / 2) ? l > d + u / 2 ? 1 : -1 : 0;
|
|
1237
1237
|
}
|
|
1238
1238
|
function No(t) {
|
|
1239
|
-
return J(
|
|
1239
|
+
return J(h) < J(t) ? 1 : -1;
|
|
1240
1240
|
}
|
|
1241
1241
|
function Mo(t) {
|
|
1242
1242
|
for (var e = t.tagName + t.className + t.src + t.href + t.textContent, n = e.length, o = 0; n--; )
|
|
@@ -1357,23 +1357,23 @@ function Qt() {
|
|
|
1357
1357
|
}
|
|
1358
1358
|
var Ct = vn(function(t, e, n, o) {
|
|
1359
1359
|
if (e.scroll) {
|
|
1360
|
-
var r = (t.touches ? t.touches[0] : t).clientX, i = (t.touches ? t.touches[0] : t).clientY, a = e.scrollSensitivity, s = e.scrollSpeed, l = ie(), u = !1,
|
|
1361
|
-
Ot !== n && (Ot = n, at(), He = e.scroll,
|
|
1362
|
-
var
|
|
1360
|
+
var r = (t.touches ? t.touches[0] : t).clientX, i = (t.touches ? t.touches[0] : t).clientY, a = e.scrollSensitivity, s = e.scrollSpeed, l = ie(), u = !1, d;
|
|
1361
|
+
Ot !== n && (Ot = n, at(), He = e.scroll, d = e.scrollFn, He === !0 && (He = ge(n, !0)));
|
|
1362
|
+
var f = 0, g = He;
|
|
1363
1363
|
do {
|
|
1364
|
-
var T = g, w = $(T), y = w.top, C = w.bottom, E = w.left, m = w.right, H = w.width, k = w.height,
|
|
1365
|
-
T === l ? (
|
|
1366
|
-
var Me =
|
|
1367
|
-
if (!V[
|
|
1368
|
-
for (var be = 0; be <=
|
|
1364
|
+
var T = g, w = $(T), y = w.top, C = w.bottom, E = w.left, m = w.right, H = w.width, k = w.height, c = void 0, p = void 0, I = T.scrollWidth, R = T.scrollHeight, M = v(T), ve = T.scrollLeft, fe = T.scrollTop;
|
|
1365
|
+
T === l ? (c = H < I && (M.overflowX === "auto" || M.overflowX === "scroll" || M.overflowX === "visible"), p = k < R && (M.overflowY === "auto" || M.overflowY === "scroll" || M.overflowY === "visible")) : (c = H < I && (M.overflowX === "auto" || M.overflowX === "scroll"), p = k < R && (M.overflowY === "auto" || M.overflowY === "scroll"));
|
|
1366
|
+
var Me = c && (Math.abs(m - r) <= a && ve + H < I) - (Math.abs(E - r) <= a && !!ve), se = p && (Math.abs(C - i) <= a && fe + k < R) - (Math.abs(y - i) <= a && !!fe);
|
|
1367
|
+
if (!V[f])
|
|
1368
|
+
for (var be = 0; be <= f; be++)
|
|
1369
1369
|
V[be] || (V[be] = {});
|
|
1370
|
-
(V[
|
|
1370
|
+
(V[f].vx != Me || V[f].vy != se || V[f].el !== T) && (V[f].el = T, V[f].vx = Me, V[f].vy = se, clearInterval(V[f].pid), (Me != 0 || se != 0) && (u = !0, V[f].pid = setInterval(function() {
|
|
1371
1371
|
o && this.layer === 0 && b.active._onTouchMove(ht);
|
|
1372
1372
|
var Be = V[this.layer].vy ? V[this.layer].vy * s : 0, he = V[this.layer].vx ? V[this.layer].vx * s : 0;
|
|
1373
|
-
typeof
|
|
1373
|
+
typeof d == "function" && d.call(b.dragged.parentNode[Z], he, Be, t, ht, V[this.layer].el) !== "continue" || bn(V[this.layer].el, he, Be);
|
|
1374
1374
|
}.bind({
|
|
1375
|
-
layer:
|
|
1376
|
-
}), 24))),
|
|
1375
|
+
layer: f
|
|
1376
|
+
}), 24))), f++;
|
|
1377
1377
|
} while (e.bubbleScroll && g !== l && (g = ge(g, !1)));
|
|
1378
1378
|
kt = u;
|
|
1379
1379
|
}
|
|
@@ -1382,8 +1382,8 @@ var Ct = vn(function(t, e, n, o) {
|
|
|
1382
1382
|
if (n) {
|
|
1383
1383
|
var u = o || i;
|
|
1384
1384
|
s();
|
|
1385
|
-
var
|
|
1386
|
-
l(), u && !u.el.contains(
|
|
1385
|
+
var d = n.changedTouches && n.changedTouches.length ? n.changedTouches[0] : n, f = document.elementFromPoint(d.clientX, d.clientY);
|
|
1386
|
+
l(), u && !u.el.contains(f) && (a("spill"), this.onSpill({
|
|
1387
1387
|
dragEl: r,
|
|
1388
1388
|
putSortable: o
|
|
1389
1389
|
}));
|
|
@@ -1455,61 +1455,61 @@ const $o = /* @__PURE__ */ Ae({
|
|
|
1455
1455
|
const l = () => {
|
|
1456
1456
|
if (!o.sort)
|
|
1457
1457
|
return;
|
|
1458
|
-
const
|
|
1459
|
-
b.create(
|
|
1458
|
+
const d = document.querySelector(".el-table__body tbody");
|
|
1459
|
+
b.create(d, {
|
|
1460
1460
|
animation: 200,
|
|
1461
1461
|
// group: "el-table__row table-row",
|
|
1462
1462
|
sort: !0,
|
|
1463
1463
|
handle: o.sortHandle ? `.${o.sortHandle}` : null,
|
|
1464
1464
|
onEnd: ({
|
|
1465
|
-
oldIndex:
|
|
1465
|
+
oldIndex: f,
|
|
1466
1466
|
newIndex: g
|
|
1467
1467
|
}) => {
|
|
1468
|
-
s("sort-end",
|
|
1468
|
+
s("sort-end", f, g);
|
|
1469
1469
|
}
|
|
1470
1470
|
});
|
|
1471
|
-
}, u = (
|
|
1472
|
-
let
|
|
1471
|
+
}, u = (d) => {
|
|
1472
|
+
let f;
|
|
1473
1473
|
const {
|
|
1474
1474
|
columns: g,
|
|
1475
1475
|
rowKey: T,
|
|
1476
1476
|
tableData: w,
|
|
1477
1477
|
pageInfo: y
|
|
1478
|
-
} =
|
|
1478
|
+
} = d, C = (k, c) => {
|
|
1479
1479
|
var p;
|
|
1480
|
-
return k.slotName && ((p = r[k.slotName]) == null ? void 0 : p.call(r,
|
|
1481
|
-
}, E = (k) => k.map((
|
|
1482
|
-
const R =
|
|
1480
|
+
return k.slotName && ((p = r[k.slotName]) == null ? void 0 : p.call(r, c));
|
|
1481
|
+
}, E = (k) => k.filter((c) => !c.show || c.show(c)).map((c) => {
|
|
1482
|
+
const R = c, {
|
|
1483
1483
|
children: p
|
|
1484
1484
|
} = R, I = jt(R, [
|
|
1485
1485
|
"children"
|
|
1486
1486
|
]);
|
|
1487
1487
|
return O(j("el-table-column"), I, {
|
|
1488
1488
|
default: (M) => {
|
|
1489
|
-
if ((
|
|
1490
|
-
return m(
|
|
1491
|
-
if (
|
|
1489
|
+
if ((c == null ? void 0 : c.renderType) === "operate")
|
|
1490
|
+
return m(c, M);
|
|
1491
|
+
if (c != null && c.renderType && (c == null ? void 0 : c.renderType) !== "operate") {
|
|
1492
1492
|
const ve = {
|
|
1493
|
-
renderType:
|
|
1494
|
-
prop:
|
|
1495
|
-
config:
|
|
1493
|
+
renderType: c.renderType,
|
|
1494
|
+
prop: c.prop,
|
|
1495
|
+
config: c.config
|
|
1496
1496
|
};
|
|
1497
1497
|
return O(fn, {
|
|
1498
1498
|
conf: ve,
|
|
1499
1499
|
model: M.row,
|
|
1500
|
-
onChange:
|
|
1500
|
+
onChange: c == null ? void 0 : c.change
|
|
1501
1501
|
}, null);
|
|
1502
1502
|
}
|
|
1503
|
-
return
|
|
1503
|
+
return c != null && c.render ? c == null ? void 0 : c.render(M) : p && (p == null ? void 0 : p.length) > 0 ? E(p) : (c == null ? void 0 : c.slotName) && C(c, M);
|
|
1504
1504
|
}
|
|
1505
1505
|
});
|
|
1506
|
-
}), m = (k,
|
|
1506
|
+
}), m = (k, c) => {
|
|
1507
1507
|
var p;
|
|
1508
1508
|
return O("div", {
|
|
1509
1509
|
class: "flex justify-center items-center cursor-pointer"
|
|
1510
|
-
}, [(p = k.operate) == null ? void 0 : p.filter((I) => !I.show || I.show(
|
|
1510
|
+
}, [(p = k.operate) == null ? void 0 : p.filter((I) => !I.show || I.show(c.row)).map((I) => I != null && I.render ? I.render(c.row) : O("span", {
|
|
1511
1511
|
onClick: Un(() => {
|
|
1512
|
-
I != null && I.onClick && (I == null || I.onClick(
|
|
1512
|
+
I != null && I.onClick && (I == null || I.onClick(c.row)), s("operate-handle", I.key, c.row);
|
|
1513
1513
|
}, ["stop"]),
|
|
1514
1514
|
style: {
|
|
1515
1515
|
color: I.key == "del" ? "var(--table-operate-warning-text-color)" : "var(--table-operate-text-color)"
|
|
@@ -1521,7 +1521,7 @@ const $o = /* @__PURE__ */ Ae({
|
|
|
1521
1521
|
return null;
|
|
1522
1522
|
const k = (p) => {
|
|
1523
1523
|
s("update-page", "pageSize", p);
|
|
1524
|
-
},
|
|
1524
|
+
}, c = (p) => {
|
|
1525
1525
|
s("update-page", "pageIndex", p);
|
|
1526
1526
|
};
|
|
1527
1527
|
return O("div", {
|
|
@@ -1538,7 +1538,7 @@ const $o = /* @__PURE__ */ Ae({
|
|
|
1538
1538
|
background: !1,
|
|
1539
1539
|
total: y.total,
|
|
1540
1540
|
onSizeChange: k,
|
|
1541
|
-
onCurrentChange:
|
|
1541
|
+
onCurrentChange: c
|
|
1542
1542
|
}, null)]);
|
|
1543
1543
|
};
|
|
1544
1544
|
return O(ne, null, [O(j("el-table"), De({
|
|
@@ -1546,13 +1546,13 @@ const $o = /* @__PURE__ */ Ae({
|
|
|
1546
1546
|
}, i, {
|
|
1547
1547
|
"row-key": T,
|
|
1548
1548
|
data: w
|
|
1549
|
-
}), Vo(
|
|
1550
|
-
default: () => [
|
|
1549
|
+
}), Vo(f = E(g)) ? f : {
|
|
1550
|
+
default: () => [f]
|
|
1551
1551
|
}), H()]);
|
|
1552
1552
|
};
|
|
1553
1553
|
return e({
|
|
1554
1554
|
tableRef: a
|
|
1555
|
-
}), (
|
|
1555
|
+
}), (d, f) => (S(), X(K(u(o))));
|
|
1556
1556
|
}
|
|
1557
1557
|
}), Ho = /* @__PURE__ */ Ae({
|
|
1558
1558
|
__name: "index",
|
|
@@ -1581,8 +1581,8 @@ const $o = /* @__PURE__ */ Ae({
|
|
|
1581
1581
|
searchColumns: s,
|
|
1582
1582
|
searchParams: l,
|
|
1583
1583
|
showSearchBtn: u,
|
|
1584
|
-
showAddBtn:
|
|
1585
|
-
style:
|
|
1584
|
+
showAddBtn: d,
|
|
1585
|
+
style: f,
|
|
1586
1586
|
labelStyle: g,
|
|
1587
1587
|
className: T,
|
|
1588
1588
|
classLabelName: w
|
|
@@ -1597,7 +1597,7 @@ const $o = /* @__PURE__ */ Ae({
|
|
|
1597
1597
|
};
|
|
1598
1598
|
return O("div", {
|
|
1599
1599
|
class: `flex items-center ${T && T.join(" ")}`,
|
|
1600
|
-
style:
|
|
1600
|
+
style: f
|
|
1601
1601
|
}, [O("span", {
|
|
1602
1602
|
class: `mr-10 whitespace-nowrap ${w && w.join(" ")}`,
|
|
1603
1603
|
style: g
|
|
@@ -1620,7 +1620,7 @@ const $o = /* @__PURE__ */ Ae({
|
|
|
1620
1620
|
d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"
|
|
1621
1621
|
}, [" "])])]
|
|
1622
1622
|
}), Q("搜索"), " "]
|
|
1623
|
-
}),
|
|
1623
|
+
}), d && O(j("el-button"), {
|
|
1624
1624
|
onClick: () => r("add")
|
|
1625
1625
|
}, {
|
|
1626
1626
|
default: () => [O(j("el-icon"), {
|
|
@@ -1750,15 +1750,15 @@ const Qo = { render: Ko }, er = {
|
|
|
1750
1750
|
}), E;
|
|
1751
1751
|
});
|
|
1752
1752
|
function l() {
|
|
1753
|
-
return o.status === "ADD" ?
|
|
1753
|
+
return o.status === "ADD" ? f() : o.formData;
|
|
1754
1754
|
}
|
|
1755
1755
|
function u() {
|
|
1756
1756
|
return g();
|
|
1757
1757
|
}
|
|
1758
|
-
function c() {
|
|
1759
|
-
i.value = d();
|
|
1760
|
-
}
|
|
1761
1758
|
function d() {
|
|
1759
|
+
i.value = f();
|
|
1760
|
+
}
|
|
1761
|
+
function f() {
|
|
1762
1762
|
const C = o.formConfig.compList, E = {};
|
|
1763
1763
|
return C.forEach((m) => {
|
|
1764
1764
|
m.name && (E[m.name] = m.defaultValue);
|
|
@@ -1767,8 +1767,8 @@ const Qo = { render: Ko }, er = {
|
|
|
1767
1767
|
function g() {
|
|
1768
1768
|
const C = o.formConfig.compList, E = {};
|
|
1769
1769
|
return C.forEach((m) => {
|
|
1770
|
-
var
|
|
1771
|
-
const H = ((
|
|
1770
|
+
var c, p, I;
|
|
1771
|
+
const H = ((c = m.rule) == null ? void 0 : c.constructor) === Object && Object.keys(m.rule).length > 0, k = Array.isArray(m.customRules) && m.customRules.length > 0;
|
|
1772
1772
|
if ((H || k) && !E[m.name] && (E[m.name] = []), H)
|
|
1773
1773
|
for (const R in m.rule) {
|
|
1774
1774
|
if (m.rule[R] === !1)
|
|
@@ -1798,7 +1798,7 @@ const Qo = { render: Ko }, er = {
|
|
|
1798
1798
|
return ln(
|
|
1799
1799
|
() => i,
|
|
1800
1800
|
() => {
|
|
1801
|
-
|
|
1801
|
+
f();
|
|
1802
1802
|
},
|
|
1803
1803
|
{
|
|
1804
1804
|
deep: !0
|
|
@@ -1806,7 +1806,7 @@ const Qo = { render: Ko }, er = {
|
|
|
1806
1806
|
), e({
|
|
1807
1807
|
form: i,
|
|
1808
1808
|
formValue: s,
|
|
1809
|
-
resetForm:
|
|
1809
|
+
resetForm: d,
|
|
1810
1810
|
validateForm: T
|
|
1811
1811
|
}), (C, E) => {
|
|
1812
1812
|
const m = j("el-popover"), H = j("el-form-item"), k = j("el-form");
|
|
@@ -1820,28 +1820,28 @@ const Qo = { render: Ko }, er = {
|
|
|
1820
1820
|
class: "form-wrap",
|
|
1821
1821
|
style: Ye(C.formConfig.wrapStyle)
|
|
1822
1822
|
}, [
|
|
1823
|
-
(S(!0), N(ne, null, le(w(C.formConfig.compList), (
|
|
1823
|
+
(S(!0), N(ne, null, le(w(C.formConfig.compList), (c) => (S(), N("div", {
|
|
1824
1824
|
class: "form-item",
|
|
1825
|
-
key:
|
|
1826
|
-
style: Ye(Ve(Ve({}, C.formConfig.itemStyle),
|
|
1825
|
+
key: c.name,
|
|
1826
|
+
style: Ye(Ve(Ve({}, C.formConfig.itemStyle), c.style))
|
|
1827
1827
|
}, [
|
|
1828
|
-
O(H, De(Ve(Ve({}, C.formConfig.formItemProps),
|
|
1829
|
-
prop:
|
|
1828
|
+
O(H, De(Ve(Ve({}, C.formConfig.formItemProps), c.formItemProps), {
|
|
1829
|
+
prop: c.name,
|
|
1830
1830
|
style: C.formConfig.formItemStyle,
|
|
1831
1831
|
class: C.formConfig.layout
|
|
1832
1832
|
}), {
|
|
1833
1833
|
label: W(() => [
|
|
1834
1834
|
P("span", {
|
|
1835
|
-
style: Ye(
|
|
1836
|
-
}, re(y(
|
|
1837
|
-
|
|
1835
|
+
style: Ye(c.labelStyle)
|
|
1836
|
+
}, re(y(c.label)), 5),
|
|
1837
|
+
c.hint ? (S(), X(m, {
|
|
1838
1838
|
key: 0,
|
|
1839
1839
|
placement: "top-start",
|
|
1840
1840
|
trigger: "hover",
|
|
1841
|
-
content:
|
|
1841
|
+
content: c.hint
|
|
1842
1842
|
}, {
|
|
1843
1843
|
reference: W(() => [
|
|
1844
|
-
|
|
1844
|
+
c.hint ? (S(), N("span", er, [
|
|
1845
1845
|
O(st(Qo), { color: "#ccc" })
|
|
1846
1846
|
])) : te("", !0)
|
|
1847
1847
|
]),
|
|
@@ -1849,25 +1849,25 @@ const Qo = { render: Ko }, er = {
|
|
|
1849
1849
|
}, 1032, ["content"])) : te("", !0)
|
|
1850
1850
|
]),
|
|
1851
1851
|
default: W(() => [
|
|
1852
|
-
|
|
1852
|
+
c.slotName ? sn(C.$slots, c.slotName, {
|
|
1853
1853
|
key: 0,
|
|
1854
1854
|
form: i.value
|
|
1855
|
-
}, void 0, !0) : n.includes(
|
|
1856
|
-
modelValue: i.value[
|
|
1857
|
-
"onUpdate:modelValue": (p) => i.value[
|
|
1858
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue"])) : (S(), X(K(`el-${
|
|
1859
|
-
disabled: y(
|
|
1860
|
-
modelValue: i.value[
|
|
1861
|
-
"onUpdate:modelValue": (p) => i.value[
|
|
1862
|
-
onKeyup: Gn((p) => y(
|
|
1863
|
-
}, qn(
|
|
1855
|
+
}, void 0, !0) : n.includes(c.ctype || "") ? (S(), X(K(`el-${c.ctype}`), De({ key: 1 }, c.config, {
|
|
1856
|
+
modelValue: i.value[c.name],
|
|
1857
|
+
"onUpdate:modelValue": (p) => i.value[c.name] = p
|
|
1858
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue"])) : (S(), X(K(`el-${c.ctype}`), De({ key: 2 }, c.config, {
|
|
1859
|
+
disabled: y(c.disabled),
|
|
1860
|
+
modelValue: i.value[c.name],
|
|
1861
|
+
"onUpdate:modelValue": (p) => i.value[c.name] = p,
|
|
1862
|
+
onKeyup: Gn((p) => y(c == null ? void 0 : c.enter), ["enter"])
|
|
1863
|
+
}, qn(c.event)), {
|
|
1864
1864
|
default: W(() => [
|
|
1865
|
-
|
|
1865
|
+
c.ctype === "select" ? (S(!0), N(ne, { key: 0 }, le(c.selectOptions, (p) => (S(), X(K("el-option"), {
|
|
1866
1866
|
key: p.value,
|
|
1867
1867
|
label: p.label,
|
|
1868
1868
|
value: p.value
|
|
1869
1869
|
}, null, 8, ["label", "value"]))), 128)) : te("", !0),
|
|
1870
|
-
|
|
1870
|
+
c.ctype === "radio-group" ? (S(!0), N(ne, { key: 1 }, le(c.radioList, (p) => (S(), X(K("el-radio"), {
|
|
1871
1871
|
key: p.value,
|
|
1872
1872
|
label: p.value
|
|
1873
1873
|
}, {
|
|
@@ -1876,11 +1876,11 @@ const Qo = { render: Ko }, er = {
|
|
|
1876
1876
|
]),
|
|
1877
1877
|
_: 2
|
|
1878
1878
|
}, 1032, ["label"]))), 128)) : te("", !0),
|
|
1879
|
-
|
|
1879
|
+
c.ctype === "checkbox-group" ? (S(!0), N(ne, { key: 2 }, le(c.checkboxList, (p) => (S(), X(K("el-checkbox"), {
|
|
1880
1880
|
key: p,
|
|
1881
1881
|
label: p
|
|
1882
1882
|
}, null, 8, ["label"]))), 128)) : te("", !0),
|
|
1883
|
-
|
|
1883
|
+
c.ctype === "input" ? (S(!0), N(ne, { key: 3 }, le((c.slots || []).filter((p) => p.type === "text"), (p) => (S(), N("div", {
|
|
1884
1884
|
slot: p.name,
|
|
1885
1885
|
key: p.name
|
|
1886
1886
|
}, re(p.inner), 9, tr))), 128)) : te("", !0)
|
|
@@ -1960,8 +1960,8 @@ function wr(t) {
|
|
|
1960
1960
|
const r = (a) => {
|
|
1961
1961
|
a.stopPropagation(), a.preventDefault();
|
|
1962
1962
|
const s = a.clientX, l = a.clientY;
|
|
1963
|
-
let u = s - e,
|
|
1964
|
-
u < 0 && (u = 0),
|
|
1963
|
+
let u = s - e, d = l - n;
|
|
1964
|
+
u < 0 && (u = 0), d < 0 && (d = 0), u > document.body.clientWidth - t.clientWidth && (u = document.body.clientWidth - t.clientWidth), d > document.body.clientHeight - t.clientHeight && (d = document.body.clientHeight - t.clientHeight), t.style.left = u + "px", t.style.top = d + "px";
|
|
1965
1965
|
}, i = () => {
|
|
1966
1966
|
document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i);
|
|
1967
1967
|
};
|
|
@@ -2385,7 +2385,7 @@ const ei = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2385
2385
|
e ? localStorage.removeItem("jumpLogin") : localStorage.setItem("jumpLogin", "false"), t && new pt({ theme: i, isJumpLogin: e });
|
|
2386
2386
|
let a = o ? (r = i.find((l) => l.id === o)) == null ? void 0 : r.themeUrl : "";
|
|
2387
2387
|
if (!o || !a) {
|
|
2388
|
-
const u = i.find((
|
|
2388
|
+
const u = i.find((d) => d.defaultTheme === 1) || i[0];
|
|
2389
2389
|
a = u.themeUrl, o = u.id;
|
|
2390
2390
|
}
|
|
2391
2391
|
const s = yield At(a);
|