|
1 | 1 | /*! |
2 | | - * vue-virtual-sortable v2.0.0 |
| 2 | + * vue-virtual-sortable v2.0.1 |
3 | 3 | * open source under the MIT license |
4 | 4 | * https://github.com/mfuu/vue-virtual-sortable#readme |
5 | 5 | */ |
|
270 | 270 | var sortableDnd_min = {exports: {}}; |
271 | 271 |
|
272 | 272 | /*! |
273 | | - * sortable-dnd v0.6.22 |
| 273 | + * sortable-dnd v0.6.23 |
274 | 274 | * open source under the MIT license |
275 | 275 | * https://github.com/mfuu/sortable-dnd#readme |
276 | 276 | */ |
|
280 | 280 | module.exports = e() ; |
281 | 281 | }(commonjsGlobal, function () { |
282 | 282 |
|
283 | | - function t(e) { |
284 | | - return t = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) { |
285 | | - return typeof t; |
286 | | - } : function (t) { |
287 | | - return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; |
288 | | - }, t(e); |
289 | | - } |
290 | | - function e() { |
291 | | - return e = Object.assign ? Object.assign.bind() : function (t) { |
| 283 | + function t() { |
| 284 | + return t = Object.assign ? Object.assign.bind() : function (t) { |
292 | 285 | for (var e = 1; e < arguments.length; e++) { |
293 | 286 | var n = arguments[e]; |
294 | | - for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]); |
| 287 | + for (var o in n) ({}).hasOwnProperty.call(n, o) && (t[o] = n[o]); |
295 | 288 | } |
296 | 289 | return t; |
297 | | - }, e.apply(this, arguments); |
| 290 | + }, t.apply(null, arguments); |
| 291 | + } |
| 292 | + function e(t) { |
| 293 | + return e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) { |
| 294 | + return typeof t; |
| 295 | + } : function (t) { |
| 296 | + return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; |
| 297 | + }, e(t); |
298 | 298 | } |
299 | 299 | var n = { |
300 | 300 | capture: !1, |
|
435 | 435 | function x(t) { |
436 | 436 | void 0 !== t.preventDefault && t.cancelable && t.preventDefault(); |
437 | 437 | } |
438 | | - function C(t) { |
439 | | - var n = t.sortable, |
440 | | - o = t.name, |
441 | | - i = t.evt, |
| 438 | + function C(e) { |
| 439 | + var n = e.sortable, |
| 440 | + o = e.name, |
| 441 | + i = e.evt, |
442 | 442 | r = n.options[o]; |
443 | | - "function" == typeof r && r(e({}, i)); |
| 443 | + "function" == typeof r && r(t({}, i)); |
444 | 444 | } |
445 | 445 | !function () { |
446 | 446 | if ("undefined" == typeof window || "undefined" == typeof document) return ""; |
|
657 | 657 | Z, |
658 | 658 | $, |
659 | 659 | tt = []; |
660 | | - function et(e) { |
| 660 | + function et(t) { |
661 | 661 | var n, |
662 | 662 | o, |
663 | 663 | i, |
664 | 664 | r = {}, |
665 | | - s = e.group; |
666 | | - s && "object" === t(s) || (s = { |
| 665 | + s = t.group; |
| 666 | + s && "object" === e(s) || (s = { |
667 | 667 | name: s, |
668 | 668 | pull: !0, |
669 | 669 | put: !0, |
670 | 670 | revertDrag: !0 |
671 | | - }), 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; |
| 671 | + }), 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; |
672 | 672 | } |
673 | 673 | function nt(t) { |
674 | 674 | var e = F || U; |
675 | 675 | return !(void 0 !== t.clientX && void 0 !== t.clientY && Math.abs(t.clientX - e.clientX) <= 0 && Math.abs(t.clientY - e.clientY) <= 0); |
676 | 676 | } |
677 | | - function ot(t, n) { |
678 | | - if (!t || !t.nodeType || 1 !== t.nodeType) throw "Sortable-dnd: `el` must be an HTMLElement, not ".concat({}.toString.call(t)); |
679 | | - t[M] = this, this.el = t, this.options = n = e({}, n); |
| 677 | + function ot(e, n) { |
| 678 | + if (!e || !e.nodeType || 1 !== e.nodeType) throw "Sortable-dnd: `el` must be an HTMLElement, not ".concat({}.toString.call(e)); |
| 679 | + e[M] = this, this.el = e, this.options = n = t({}, n); |
680 | 680 | var o = { |
681 | 681 | store: null, |
682 | 682 | group: "", |
|
713 | 713 | }; |
714 | 714 | for (var i in o) !(i in this.options) && (this.options[i] = o[i]); |
715 | 715 | for (var r in et(n), this) "_" === r.charAt(0) && "function" == typeof this[r] && (this[r] = this[r].bind(this)); |
716 | | - 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); |
| 716 | + 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); |
717 | 717 | } |
718 | 718 | return ot.prototype = { |
719 | 719 | constructor: ot, |
|
730 | 730 | clientY: (n || t).clientY |
731 | 731 | }, 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))) { |
732 | 732 | var a = this.options.handle; |
733 | | - if (("function" != typeof a || a(t)) && ("string" != typeof a || b(o, a))) { |
| 733 | + if (("function" != typeof a || a(t)) && ("string" != typeof a || p(o, a, k))) { |
734 | 734 | var h = this.options, |
735 | 735 | u = h.delay, |
736 | 736 | d = h.delayOnTouchOnly; |
|
785 | 785 | }, |
786 | 786 | _appendGhost: function () { |
787 | 787 | if (!B) { |
788 | | - var t = this.options.fallbackOnBody ? document.body : this.el, |
| 788 | + var e = this.options.fallbackOnBody ? document.body : this.el, |
789 | 789 | n = this._getGhostElement(); |
790 | 790 | w(B = n.cloneNode(!0), this.options.ghostClass, !0); |
791 | 791 | var o = d(k), |
792 | | - i = e({ |
| 792 | + i = t({ |
793 | 793 | position: "fixed", |
794 | 794 | top: o.top, |
795 | 795 | left: o.left, |
796 | 796 | width: o.width, |
797 | 797 | height: o.height, |
798 | | - zIndex: "100000", |
| 798 | + margin: 0, |
| 799 | + zIndex: 1e5, |
799 | 800 | opacity: "0.8", |
800 | 801 | overflow: "hidden", |
801 | 802 | boxSizing: "border-box", |
|
804 | 805 | pointerEvents: "none" |
805 | 806 | }, this.options.ghostStyle); |
806 | 807 | for (var r in i) S(B, r, i[r]); |
807 | | - ot.ghost = B, t.appendChild(B); |
| 808 | + ot.ghost = B, e.appendChild(B); |
808 | 809 | var s = (U.clientX - o.left) / parseInt(B.style.width) * 100, |
809 | 810 | l = (U.clientY - o.top) / parseInt(B.style.height) * 100; |
810 | 811 | S(B, "transform-origin", "".concat(s, "% ").concat(l, "%")), S(B, "will-change", "transform"); |
|
954 | 955 | evt: this._getEventProperties(t) |
955 | 956 | }), 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(); |
956 | 957 | }, |
957 | | - _onEnd: function (t) { |
| 958 | + _onEnd: function (e) { |
958 | 959 | w(Y, this.options.chosenClass, !1), w(Y, this.options.placeholderClass, !1); |
959 | 960 | var n = "clone" === z; |
960 | 961 | this.multiplayer.onDrop(H, O, n); |
961 | | - var o = this._getEventProperties(t), |
| 962 | + var o = this._getEventProperties(e), |
962 | 963 | i = this.options, |
963 | 964 | r = i.swapOnDrop, |
964 | 965 | s = i.removeCloneOnDrop; |
965 | 966 | 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({ |
966 | 967 | sortable: H[M], |
967 | 968 | name: "onDrop", |
968 | | - evt: e({}, o, n ? J : { |
| 969 | + evt: t({}, o, n ? J : { |
969 | 970 | newIndex: -1 |
970 | 971 | }) |
971 | 972 | }), C({ |
972 | 973 | sortable: O[M], |
973 | 974 | name: "onDrop", |
974 | | - evt: e({}, o, H === O ? {} : { |
| 975 | + evt: t({}, o, H === O ? {} : { |
975 | 976 | oldIndex: -1 |
976 | 977 | }) |
977 | 978 | }); |
978 | 979 | }, |
979 | | - _getEventProperties: function (t) { |
| 980 | + _getEventProperties: function (e) { |
980 | 981 | var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, |
981 | 982 | o = {}; |
982 | | - 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; |
| 983 | + 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; |
983 | 984 | }, |
984 | 985 | _nulling: function () { |
985 | 986 | 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