|
1 | 1 | /*! |
2 | | - * vue-virtual-sortable v3.0.0 |
| 2 | + * vue-virtual-sortable v3.0.1 |
3 | 3 | * open source under the MIT license |
4 | 4 | * https://github.com/mfuu/vue3-virtual-drag-list#readme |
5 | 5 | */ |
|
112 | 112 | var sortableDnd_min = {exports: {}}; |
113 | 113 |
|
114 | 114 | /*! |
115 | | - * sortable-dnd v0.6.22 |
| 115 | + * sortable-dnd v0.6.23 |
116 | 116 | * open source under the MIT license |
117 | 117 | * https://github.com/mfuu/sortable-dnd#readme |
118 | 118 | */ |
|
121 | 121 | module.exports = e() ; |
122 | 122 | }(commonjsGlobal, function () { |
123 | 123 |
|
124 | | - function t(e) { |
125 | | - return t = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) { |
126 | | - return typeof t; |
127 | | - } : function (t) { |
128 | | - return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; |
129 | | - }, t(e); |
130 | | - } |
131 | | - function e() { |
132 | | - return e = Object.assign ? Object.assign.bind() : function (t) { |
| 124 | + function t() { |
| 125 | + return t = Object.assign ? Object.assign.bind() : function (t) { |
133 | 126 | for (var e = 1; e < arguments.length; e++) { |
134 | 127 | var n = arguments[e]; |
135 | | - for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]); |
| 128 | + for (var o in n) ({}).hasOwnProperty.call(n, o) && (t[o] = n[o]); |
136 | 129 | } |
137 | 130 | return t; |
138 | | - }, e.apply(this, arguments); |
| 131 | + }, t.apply(null, arguments); |
| 132 | + } |
| 133 | + function e(t) { |
| 134 | + return e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) { |
| 135 | + return typeof t; |
| 136 | + } : function (t) { |
| 137 | + return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; |
| 138 | + }, e(t); |
139 | 139 | } |
140 | 140 | var n = { |
141 | 141 | capture: !1, |
|
276 | 276 | function x(t) { |
277 | 277 | void 0 !== t.preventDefault && t.cancelable && t.preventDefault(); |
278 | 278 | } |
279 | | - function C(t) { |
280 | | - var n = t.sortable, |
281 | | - o = t.name, |
282 | | - i = t.evt, |
| 279 | + function C(e) { |
| 280 | + var n = e.sortable, |
| 281 | + o = e.name, |
| 282 | + i = e.evt, |
283 | 283 | r = n.options[o]; |
284 | | - "function" == typeof r && r(e({}, i)); |
| 284 | + "function" == typeof r && r(t({}, i)); |
285 | 285 | } |
286 | 286 | !function () { |
287 | 287 | if ("undefined" == typeof window || "undefined" == typeof document) return ""; |
|
498 | 498 | Z, |
499 | 499 | $, |
500 | 500 | tt = []; |
501 | | - function et(e) { |
| 501 | + function et(t) { |
502 | 502 | var n, |
503 | 503 | o, |
504 | 504 | i, |
505 | 505 | r = {}, |
506 | | - s = e.group; |
507 | | - s && "object" === t(s) || (s = { |
| 506 | + s = t.group; |
| 507 | + s && "object" === e(s) || (s = { |
508 | 508 | name: s, |
509 | 509 | pull: !0, |
510 | 510 | put: !0, |
511 | 511 | revertDrag: !0 |
512 | | - }), r.name = s.name, r.pull = null === (n = s.pull) || void 0 === n || n, r.put = null === (o = s.put) || void 0 === o || o, r.revertDrag = null === (i = s.revertDrag) || void 0 === i || i, e.group = r; |
| 512 | + }), r.name = s.name, r.pull = null === (n = s.pull) || void 0 === n || n, r.put = null === (o = s.put) || void 0 === o || o, r.revertDrag = null === (i = s.revertDrag) || void 0 === i || i, t.group = r; |
513 | 513 | } |
514 | 514 | function nt(t) { |
515 | 515 | var e = F || U; |
516 | 516 | return !(void 0 !== t.clientX && void 0 !== t.clientY && Math.abs(t.clientX - e.clientX) <= 0 && Math.abs(t.clientY - e.clientY) <= 0); |
517 | 517 | } |
518 | | - function ot(t, n) { |
519 | | - if (!t || !t.nodeType || 1 !== t.nodeType) throw "Sortable-dnd: `el` must be an HTMLElement, not ".concat({}.toString.call(t)); |
520 | | - t[M] = this, this.el = t, this.options = n = e({}, n); |
| 518 | + function ot(e, n) { |
| 519 | + if (!e || !e.nodeType || 1 !== e.nodeType) throw "Sortable-dnd: `el` must be an HTMLElement, not ".concat({}.toString.call(e)); |
| 520 | + e[M] = this, this.el = e, this.options = n = t({}, n); |
521 | 521 | var o = { |
522 | 522 | store: null, |
523 | 523 | group: "", |
|
554 | 554 | }; |
555 | 555 | for (var i in o) !(i in this.options) && (this.options[i] = o[i]); |
556 | 556 | for (var r in et(n), this) "_" === r.charAt(0) && "function" == typeof this[r] && (this[r] = this[r].bind(this)); |
557 | | - c(t, this.options.supportTouch ? "touchstart" : "mousedown", this._onDrag), this.autoScroller = new T(this.options), this.multiplayer = new P(this.options), this.animator = new N(this.options), tt.push(t); |
| 557 | + c(e, this.options.supportTouch ? "touchstart" : "mousedown", this._onDrag), this.autoScroller = new T(this.options), this.multiplayer = new P(this.options), this.animator = new N(this.options), tt.push(e); |
558 | 558 | } |
559 | 559 | return ot.prototype = { |
560 | 560 | constructor: ot, |
|
571 | 571 | clientY: (n || t).clientY |
572 | 572 | }, k = i, c(Q = n ? k : document, "mouseup", this._onDrop), c(Q, "touchend", this._onDrop), c(Q, "touchcancel", this._onDrop), !this.multiplayer.useSelectHandle(t, o))) { |
573 | 573 | var a = this.options.handle; |
574 | | - if (("function" != typeof a || a(t)) && ("string" != typeof a || b(o, a))) { |
| 574 | + if (("function" != typeof a || a(t)) && ("string" != typeof a || p(o, a, k))) { |
575 | 575 | var h = this.options, |
576 | 576 | u = h.delay, |
577 | 577 | d = h.delayOnTouchOnly; |
|
626 | 626 | }, |
627 | 627 | _appendGhost: function () { |
628 | 628 | if (!B) { |
629 | | - var t = this.options.fallbackOnBody ? document.body : this.el, |
| 629 | + var e = this.options.fallbackOnBody ? document.body : this.el, |
630 | 630 | n = this._getGhostElement(); |
631 | 631 | w(B = n.cloneNode(!0), this.options.ghostClass, !0); |
632 | 632 | var o = d(k), |
633 | | - i = e({ |
| 633 | + i = t({ |
634 | 634 | position: "fixed", |
635 | 635 | top: o.top, |
636 | 636 | left: o.left, |
637 | 637 | width: o.width, |
638 | 638 | height: o.height, |
639 | | - zIndex: "100000", |
| 639 | + margin: 0, |
| 640 | + zIndex: 1e5, |
640 | 641 | opacity: "0.8", |
641 | 642 | overflow: "hidden", |
642 | 643 | boxSizing: "border-box", |
|
645 | 646 | pointerEvents: "none" |
646 | 647 | }, this.options.ghostStyle); |
647 | 648 | for (var r in i) S(B, r, i[r]); |
648 | | - ot.ghost = B, t.appendChild(B); |
| 649 | + ot.ghost = B, e.appendChild(B); |
649 | 650 | var s = (U.clientX - o.left) / parseInt(B.style.width) * 100, |
650 | 651 | l = (U.clientY - o.top) / parseInt(B.style.height) * 100; |
651 | 652 | S(B, "transform-origin", "".concat(s, "% ").concat(l, "%")), S(B, "will-change", "transform"); |
|
795 | 796 | evt: this._getEventProperties(t) |
796 | 797 | }), F && this._onEnd(t), !F && this.animator.animate()), !nt(t.changedTouches ? t.changedTouches[0] : t) && this.multiplayer.onSelect(t, k, R, this), B && B.parentNode && B.parentNode.removeChild(B), this._nulling(); |
797 | 798 | }, |
798 | | - _onEnd: function (t) { |
| 799 | + _onEnd: function (e) { |
799 | 800 | w(Y, this.options.chosenClass, !1), w(Y, this.options.placeholderClass, !1); |
800 | 801 | var n = "clone" === z; |
801 | 802 | this.multiplayer.onDrop(H, O, n); |
802 | | - var o = this._getEventProperties(t), |
| 803 | + var o = this._getEventProperties(e), |
803 | 804 | i = this.options, |
804 | 805 | r = i.swapOnDrop, |
805 | 806 | s = i.removeCloneOnDrop; |
806 | 807 | n && H !== O || !("function" == typeof r ? r(o) : r) || A.insertBefore(k, Y), n && H !== O && !this.multiplayer.isActive() || !("function" == typeof s ? s(o) : s) || Y && Y.parentNode && Y.parentNode.removeChild(Y), S(k, "display", ""), this.animator.animate(), H !== O && C({ |
807 | 808 | sortable: H[M], |
808 | 809 | name: "onDrop", |
809 | | - evt: e({}, o, n ? J : { |
| 810 | + evt: t({}, o, n ? J : { |
810 | 811 | newIndex: -1 |
811 | 812 | }) |
812 | 813 | }), C({ |
813 | 814 | sortable: O[M], |
814 | 815 | name: "onDrop", |
815 | | - evt: e({}, o, H === O ? {} : { |
| 816 | + evt: t({}, o, H === O ? {} : { |
816 | 817 | oldIndex: -1 |
817 | 818 | }) |
818 | 819 | }); |
819 | 820 | }, |
820 | | - _getEventProperties: function (t) { |
| 821 | + _getEventProperties: function (e) { |
821 | 822 | var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, |
822 | 823 | o = {}; |
823 | | - return o.event = t, o.to = O, o.from = H, o.node = k, o.clone = Y, o.target = W, o.oldIndex = V, o.newIndex = j, o.pullMode = z, e(o, this.multiplayer.eventProperties(), n), o.relative = W === k ? 0 : _(Y, W), o; |
| 824 | + return o.event = e, o.to = O, o.from = H, o.node = k, o.clone = Y, o.target = W, o.oldIndex = V, o.newIndex = j, o.pullMode = z, t(o, this.multiplayer.eventProperties(), n), o.relative = W === k ? 0 : _(Y, W), o; |
824 | 825 | }, |
825 | 826 | _nulling: function () { |
826 | 827 | O = H = k = L = X = Y = B = R = W = A = z = V = j = G = U = F = q = J = K = Q = Z = $ = ot.clone = ot.ghost = ot.active = ot.dragged = null, this.multiplayer.nulling(), this.autoScroller.nulling(); |
|
0 commit comments