vue-virtual-draglist
Advanced tools
Comparing version 3.2.2 to 3.2.3
/*! | ||
* vue-virtual-draglist v3.2.2 | ||
* vue-virtual-draglist v3.2.3 | ||
* open source under the MIT license | ||
* https://github.com/mfuu/vue3-virtual-drag-list#readme | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define(["vue"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).VirtualDragList=e(t.Vue)}(this,(function(t){"use strict";function e(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function n(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?e(Object(o),!0).forEach((function(e){i(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function i(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var s={exports:{}}; | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define(["vue"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).VirtualDragList=e(t.Vue)}(this,(function(t){"use strict";function e(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function n(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?e(Object(i),!0).forEach((function(e){o(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function o(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var s={exports:{}}; | ||
/*! | ||
* sortable-dnd v0.6.6 | ||
* sortable-dnd v0.6.12 | ||
* open source under the MIT license | ||
* https://github.com/mfuu/sortable-dnd#readme | ||
*/ | ||
!function(t,e){t.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(){return e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},e.apply(this,arguments)}var n={capture:!1,passive:!1},i=/\s+/g;function o(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var r=o(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),s=o(/Edge/i),l=o(/safari/i)&&!o(/chrome/i)&&!o(/android/i),a=function(){var t=!1;return document.addEventListener("checkIfSupportPassive",null,{get passive(){return t=!0,!0}}),t}(),c=function(){if("undefined"==typeof window||"undefined"==typeof document)return{};var t=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],e=(Array.prototype.slice.call(t).join("").match(/-(moz|webkit|ms)-/)||""===t.OLink&&["","o"])[1];return{dom:"WebKit|Moz|MS|O".match(new RegExp("("+e+")","i"))[1],lowercase:e,css:"-"+e+"-",js:e[0].toUpperCase()+e.substr(1)}}();function u(t,e){t.style["".concat(c.css,"transition-duration")]=e?"".concat(e,"ms"):""}function h(t,e){t.style["".concat(c.css,"transform")]=e?"".concat(e):""}function d(t,e,i){window.addEventListener?t.addEventListener(e,i,!(!a&&r)&&n):window.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i}function f(t,e,i){window.removeEventListener?t.removeEventListener(e,i,!(!a&&r)&&n):window.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=null}function p(){return document.scrollingElement||document.documentElement}function m(t,e,n){if(t.getBoundingClientRect||t===window){var i,o,r,s,l,a,c;if(t!==window&&t.parentNode&&t!==p()?(o=(i=t.getBoundingClientRect()).top,r=i.left,s=i.bottom,l=i.right,a=i.height,c=i.width):(o=0,r=0,s=window.innerHeight,l=window.innerWidth,a=window.innerHeight,c=window.innerWidth),e&&t!==window){n=n||t.parentNode;do{if(n&&n.getBoundingClientRect){var u=n.getBoundingClientRect();o-=u.top+parseInt(E(n,"border-top-width")),r-=u.left+parseInt(E(n,"border-left-width")),s=o+i.height,l=r+i.width;break}}while(n=n.parentNode)}return{top:o,left:r,bottom:s,right:l,width:c,height:a}}}function g(t,e,n,i){if(!t)return null;if(n&&!e){var o=Array.prototype.slice.call(n.children),r=o.indexOf(t);if(r>-1)return o[r];for(var s=0;s<o.length;s++)if(v(t,o[s]))return o[s]}n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&O(t,e):O(t,e))||i&&t===n)return t;if(t===n)break}while(t=t.parentNode);return null}function v(t,e){if(!t||!e)return!1;if(e.compareDocumentPosition)return!!(16&e.compareDocumentPosition(t));if(e.contains&&1===t.nodeType)return e.contains(t)&&e!==t;for(;t=t.parentNode;)if(t===e)return!0;return!1}function y(t,e){for(var n=t.lastElementChild;n&&(n===it.ghost||"none"===E(n,"display")||e&&!O(n,e));)n=n.previousElementSibling;return n||null}function b(t,e){if(!t||!t.parentNode)return-1;for(var n=0;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||e&&!O(t,e)||"none"===E(t,"display")||n++;return n}function S(t,e,n,i){for(var o=0,r=0,s=t.children;o<s.length;){if(s[o]!==it.ghost&&"none"!==E(s[o],"display")&&g(s[o],n,t,!1)&&(i||s[o]!==it.dragged)){if(r===e)return s[o];r++}o++}return null}function w(t,e){var n=E(t),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=S(t,0,e),l=S(t,1,e),a=o&&E(o),c=l&&E(l),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+m(o).width,h=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+m(l).width,d=s||r?"cssFloat":"float";if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&"none"!==a.float){var f="left"===a.float?"left":"right";return!l||"both"!==c.clear&&c.clear!==f?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||u>=i&&"none"===n[d]||l&&"none"===n[d]&&u+h>i)?"vertical":"horizontal"}function x(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(i," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(i," ")}}function O(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function E(t,e,n){var i=t&&t.style;if(i){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in i||-1!==e.indexOf("webkit")||(e="-webkit-"+e),i[e]=n+("string"==typeof n?"":"px")}}function T(t,e){var n,i,o=(i=e,(n=t).compareDocumentPosition?n.compareDocumentPosition(i):n.contains?(n!=i&&n.contains(i)&&16)+(n!=i&&i.contains(n)&&8)+(n.sourceIndex>=0&&i.sourceIndex>=0?(n.sourceIndex<i.sourceIndex&&4)+(n.sourceIndex>i.sourceIndex&&2):1):0);return 2===o?1:4===o?-1:0}function D(t){void 0!==t.preventDefault&&t.cancelable&&t.preventDefault()}function _(t){var n=t.sortable,i=t.name,o=t.params,r=n.options[i];"function"==typeof r&&r(e({},o))}var I,z,C="Sortable"+Date.now();function k(t){this.options=t,this.autoScrollAnimationFrame=null}function M(t){this.options=t,this.animations=[]}function N(t){this.options=t||{},this.selectedElements=[]}window.requestAnimationFrame||(window.requestAnimationFrame=function(t){return setTimeout(t,17)}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)}),k.prototype={destroy:function(){this.autoScrollAnimationFrame&&(cancelAnimationFrame(this.autoScrollAnimationFrame),this.autoScrollAnimationFrame=null)},update:function(t,e,n){var i=this;cancelAnimationFrame(this.autoScrollAnimationFrame),this.autoScrollAnimationFrame=requestAnimationFrame((function(){e&&n&&i.autoScroll(t,n),i.update(t,e,n)}))},autoScroll:function(t,e){if(t&&void 0!==e.clientX&&void 0!==e.clientY){var n=m(t);if(n){var i=e.clientX,o=e.clientY,r=n.top,s=n.right,l=n.bottom,a=n.left,c=n.height,u=n.width;if(!(o<r||i>s||o>l||i<a)){var h=this.options,d=h.scrollThreshold,f=h.scrollSpeed,p=t.scrollTop,g=t.scrollLeft,v=t.scrollHeight,y=p>0&&o>=r&&o<=r+d,b=g+u<t.scrollWidth&&i<=s&&i>=s-d,S=p+c<v&&o<=l&&o>=l-d,w=0,x=0;g>0&&i>=a&&i<=a+d&&(w=Math.floor(Math.max(-1,(i-a)/d-1)*f.x)),b&&(w=Math.ceil(Math.min(1,(i-s)/d+1)*f.x)),y&&(x=Math.floor(Math.max(-1,(o-r)/d-1)*f.y)),S&&(x=Math.ceil(Math.min(1,(o-l)/d+1)*f.y)),t.scrollTop+=x,t.scrollLeft+=w}}}}},M.prototype={collect:function(t){if(t){for(var e=m(t),n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,i=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,o=Math.min(e.right,n),r=Math.min(e.bottom,i),s=Array.prototype.slice.call(t.children),l=[],a=0;a<=s.length;a++){var c=s[a];if(c&&c!==it.ghost&&"none"!==E(c,"display")){var u=m(c);if(!(u.bottom<0||u.right<0)){if(u.top-u.height>r||u.left-u.width>o)break;l.push({node:c,rect:u})}}}this.animations.push(l)}},animate:function(){for(var t=this.animations.pop(),e=0,n=t.length;e<n;e++){var i=t[e],o=i.node,r=i.rect;this._excute(o,r)}},_excute:function(t,e){var n=e.left,i=e.top,o=m(t);if(o.top!==i||o.left!==n){var r=i-o.top,s=n-o.left;u(t),h(t,"translate3d(".concat(s,"px, ").concat(r,"px, 0)")),t.offsetWidth,u(t,this.options.animation),h(t,"translate3d(0px, 0px, 0px)"),clearTimeout(t.animated),t.animated=setTimeout((function(){u(t),h(t,""),t.animated=null}),this.options.animation)}}},N.prototype={destroy:function(){I=z=null},active:function(){return!!I},setParams:function(t){t.nodes=I||[],t.clones=z||[]},select:function(t){x(t,this.options.selectedClass,!0),this.selectedElements.push(t),this.selectedElements.sort((function(t,e){return T(t,e)}))},deselect:function(t){var e=this.selectedElements.indexOf(t);e>-1&&(x(t,this.options.selectedClass,!1),this.selectedElements.splice(e,1))},getGhostElement:function(){if(!I)return null;var t=document.createElement("div");return this.selectedElements.forEach((function(e,n){var i=e.cloneNode(!0),o=0===n?1:.5;i.style="position: absolute;left: 0;top: 0;bottom: 0;right: 0;opacity: ".concat(o,";z-index: ").concat(n,";"),t.appendChild(i)})),t},toggleSelected:function(t,e){var n=this;e?t.forEach((function(t){return n.selectedElements.push(t)})):this.selectedElements=this.selectedElements.filter((function(e){return t.indexOf(e)<0}))},toggleClass:function(t){if(I)for(var e=0;e<I.length;e++)x(I[e],this.options.chosenClass,t)},toggleVisible:function(t){if(I)if(t){var e=I.indexOf(it.dragged);this._viewElements(I,e,it.dragged)}else this._hideElements(I)},onChoose:function(){!this.options.multiple||!this.selectedElements.length||this.selectedElements.indexOf(it.dragged)<0||(this.selectedElements.sort((function(t,e){return T(t,e)})),I=this.selectedElements,this.toggleClass(!0))},onDrag:function(t){I&&(t.animator.collect(it.dragged.parentNode),this._hideElements(I),t.animator.animate(),this.toggleClass(!1))},onDrop:function(t,e,n){if(I){var i=it.dragged,o=it.clone,r=I.indexOf(i);e[C].animator.collect(o.parentNode),t!==e&&"clone"===n?(E(o,"display","none"),z=I.map((function(t){return t.cloneNode(!0)})),this._viewElements(z,r,o),this._viewElements(I,r,i)):this._viewElements(I,r,o),e[C].animator.animate(),t!==e&&(e[C].multiplayer.toggleSelected(z||I,!0),"clone"!==n&&t[C].multiplayer.toggleSelected(I,!1))}},onSelect:function(t,e,n){var i=this.selectedElements.indexOf(e);x(e,this.options.selectedClass,i<0);var o={from:n.el,event:t,node:e,index:b(e)};i<0?(this.selectedElements.push(e),_({sortable:n,name:"onSelect",params:o})):(this.selectedElements.splice(i,1),_({sortable:n,name:"onDeselect",params:o})),this.selectedElements.sort((function(t,e){return T(t,e)}))},_viewElements:function(t,e,n){for(var i=0;i<t.length;i++)if(E(t[i],"display",""),i<e)n.parentNode.insertBefore(t[i],n);else{var o=i>0?t[i-1]:n;n.parentNode.insertBefore(t[i],o.nextSibling)}},_hideElements:function(t){for(var e=0;e<t.length;e++)t[e]!=it.dragged&&E(t[e],"display","none")}};var A,B,j,P,R,F,L,H,K,W,Y,X,U,q,V,G,Z,$,J,Q,tt,et=[],nt=function(e){var n={},i=e.group;i&&"object"==t(i)||(i={name:i,pull:!0,put:!0,revertDrag:!0}),n.name=i.name,n.pull=i.pull,n.put=i.put,n.revertDrag=i.revertDrag,e.group=n};function it(t,n){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable-dnd: `el` must be an HTMLElement, not ".concat({}.toString.call(t));t[C]=this,this.el=t,this.options=n=e({},n);var i={store:null,disabled:!1,group:"",lockAxis:"",animation:150,draggable:null,handle:null,multiple:!1,selectHandle:null,customGhost:null,direction:"",autoScroll:!0,scrollThreshold:55,scrollSpeed:{x:10,y:10},delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,ghostClass:"",ghostStyle:{},chosenClass:"",selectedClass:"",swapOnDrop:!0,fallbackOnBody:!1,supportTouch:"ontouchstart"in window,emptyInsertThreshold:-5};for(var o in i)!(o in this.options)&&(this.options[o]=i[o]);for(var r in nt(n),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));d(t,this.options.supportTouch?"touchstart":"mousedown",this._onDrag),et.push(t),this.autoScroller=new k(this.options),this.multiplayer=new N(this.options),this.animator=new M(this.options)}return it.prototype={constructor:it,_onDrag:function(t){var e=this;if(!B&&!this.options.disabled&&this.options.group.pull&&(!/mousedown|pointerdown/.test(t.type)||0===t.button)){var n=t.touches&&t.touches[0],i=(n||t).target;if(!l||!i||"SELECT"!==i.tagName.toUpperCase()){var o=g(i,this.options.draggable,this.el);if(o&&!o.animated){H={original:t,clientX:(n||t).clientX,clientY:(n||t).clientY},B=o,d(Y=n?B:document,"mouseup",this._onDrop),d(Y,"touchend",this._onDrop),d(Y,"touchcancel",this._onDrop);var a=this.options,c=a.handle,u=a.selectHandle;if("function"==typeof u&&u(t)||"string"==typeof u&&O(i,u))q=!0;else if(("function"!=typeof c||c(t))&&("string"!=typeof c||O(i,c))){var h=this.options,f=h.delay,p=h.delayOnTouchOnly;!f||p&&!n||s||r?this._onStart(n,t):(d(this.el.ownerDocument,"touchmove",this._delayMoveHandler),d(this.el.ownerDocument,"mousemove",this._delayMoveHandler),d(this.el.ownerDocument,"mouseup",this._cancelStart),d(this.el.ownerDocument,"touchend",this._cancelStart),d(this.el.ownerDocument,"touchcancel",this._cancelStart),U=setTimeout((function(){return e._onStart(n,t)}),f)),d(document,"selectstart",D),l&&E(document.body,"user-select","none")}}}}},_delayMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-H.clientX),Math.abs(e.clientY-H.clientY))>=Math.floor(this.options.touchStartThreshold/(window.devicePixelRatio||1))&&this._cancelStart()},_cancelStart:function(){clearTimeout(U),f(this.el.ownerDocument,"touchmove",this._delayMoveHandler),f(this.el.ownerDocument,"mousemove",this._delayMoveHandler),f(this.el.ownerDocument,"mouseup",this._cancelStart),f(this.el.ownerDocument,"touchend",this._cancelStart),f(this.el.ownerDocument,"touchcancel",this._cancelStart),f(document,"selectstart",D),l&&E(document.body,"user-select","")},_onStart:function(t,e){var n=b(B);V=this.el,G=this.el,$=n,J=n,Q=n,tt=B,A=this.el,R=B.cloneNode(!0),L=B.parentNode,Z=this.options.group.pull,it.clone=R,it.active=this,it.dragged=B,x(B,this.options.chosenClass,!0),this.multiplayer.onChoose(),_({sortable:this,name:"onChoose",params:this._getParams(e)}),d(Y,t?"touchmove":"mousemove",this._nearestSortable);try{document.selection?setTimeout((function(){return document.selection.empty()}),0):window.getSelection().removeAllRanges()}catch(t){}},_onStarted:function(){x(R,this.options.chosenClass,!0),this._appendGhost(),this.multiplayer.onDrag(this),_({sortable:this,name:"onDrag",params:this._getParams(H.original)}),E(B,"display","none"),x(B,this.options.chosenClass,!1),B.parentNode.insertBefore(R,B)},_getGhostElement:function(){var t=this.options.customGhost;if("function"==typeof t){var e=this.multiplayer.selectedElements;return t(e.length?e:[B])}return this.multiplayer.getGhostElement()||B},_appendGhost:function(){if(!F){var t=this.options.fallbackOnBody?document.body:this.el,n=this._getGhostElement();x(F=n.cloneNode(!0),this.options.ghostClass,!0);var i,o=m(B),r=e({position:"fixed",top:o.top,left:o.left,width:o.width,height:o.height,minWidth:o.width,minHeight:o.height,opacity:"0.8",overflow:"hidden","z-index":"100000","box-sizing":"border-box","pointer-events":"none"},this.options.ghostStyle);for(var s in r)E(F,s,r[s]);i="none",F.style["".concat(c.css,"transition")]=i?"none"===i?"none":"".concat(i):"",h(F,"translate3d(0px, 0px, 0px)"),it.ghost=F,t.appendChild(F);var l=(H.clientX-o.left)/parseInt(F.style.width)*100,a=(H.clientY-o.top)/parseInt(F.style.height)*100;E(F,"transform-origin","".concat(l,"% ").concat(a,"%")),E(F,"transform","translateZ(0)"),E(F,"will-change","transform")}},_nearestSortable:function(t){D(t);var e=t.touches&&t.touches[0]||t;if(B&&function(t){var e=K||H;return!(void 0!==t.clientX&&void 0!==t.clientY&&Math.abs(t.clientX-e.clientX)<=0&&Math.abs(t.clientY-e.clientY)<=0)}(e)){!K&&this._onStarted();var n=this.options.lockAxis,i="x"===n?H.clientX:e.clientX,o="y"===n?H.clientY:e.clientY,r=document.elementFromPoint(i,o),s=i-H.clientX,l=o-H.clientY;if(K={original:t,clientX:i,clientY:o},h(F,"translate3d(".concat(s,"px, ").concat(l,"px, 0)")),this.options.autoScroll){var a=function(t,e){if(!t||!t.getBoundingClientRect)return p();var n=t,i=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=E(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return p();if(i||e)return n;i=!0}}}while(n=n.parentNode);return p()}(r,!0);this.autoScroller.update(a,H,K)}var c,u,d,f=(c=i,u=o,et.some((function(t){var e=t[C].options.emptyInsertThreshold;if(null!=e){var n=m(t),i=c>=n.left-e&&c<=n.right+e,o=u>=n.top-e&&u<=n.bottom+e;return i&&o?d=t:void 0}})),d);f&&f[C]._onMove(t,r)}},_allowPut:function(){if(A===this.el)return!0;if(this.options.group.put){var t=this.options.group,e=t.name,n=t.put,i=A[C].options.group;return n.join&&n.indexOf(i.name)>-1||i.name&&e&&i.name===e}return!1},_getDirection:function(){var t=this.options,e=t.draggable,n=t.direction;return n?"function"==typeof n?n.call(K.original,B,this):n:w(L,e)},_allowSwap:function(){var t=m(j),e="vertical"===this._getDirection(),n=e?"top":"left",i=e?"bottom":"right",o=j[e?"offsetHeight":"offsetWidth"],r=e?K.clientY:K.clientX,s=r>=t[n]&&r<t[i]-o/2?-1:1,l=S(L,0,this.options.draggable),a=y(L),c=m(l),u=m(a);if(j===L||v(L,j))return R===l&&r<c[n]?(P=j,!0):R===a&&r>u[i]&&(P=j.nextSibling,!0);var h=T(R,j);return P=h<0?j.nextSibling:j,W!==j?(X=s,!0):X!==s&&(X=s,s<0?h>0:h<0)},_onMove:function(t,e){if(this._allowPut()){if(_({sortable:this,name:"onMove",params:this._getParams(t)}),this.el!==G&&(e===this.el||!y(this.el)))return j=W=null,void this._onInsert(t);(j=g(e,this.options.draggable,this.el))&&!j.animated&&this._allowSwap()&&(j!==R&&P!==R?(this.el!==G?this._onInsert(t):j!==B&&this._onChange(t),W=j):W=j)}},_onInsert:function(t){var e=j||R,n="clone"===Z&&this.el!==A&&G===A,i="clone"===Z&&this.el===A&&G!==A;V=this.el,$=b(R),tt=e,L=j?j.parentNode:this.el,G[C].animator.collect(R.parentNode),this.animator.collect(L),n&&(E(B,"display",""),A[C].multiplayer.toggleVisible(!0),A[C].options.group.revertDrag||G.insertBefore(B,R)),i&&($=b(B),E(B,"display","none"),this.multiplayer.toggleVisible(!1)),j?L.insertBefore(R,X<0?j:j.nextSibling):L.appendChild(R),J=b(R),n&&A[C].options.group.revertDrag&&_({sortable:A[C],name:"onChange",params:this._getParams(t,{to:A,target:B,newIndex:Q,revertDrag:!0})}),n||_({sortable:G[C],name:"onRemove",params:this._getParams(t)}),i&&j!==B&&_({sortable:this,name:"onChange",params:this._getParams(t,{from:A,backToOrigin:!0})}),i||_({sortable:this,name:"onAdd",params:this._getParams(t)}),G[C].animator.animate(),this.animator.animate(),G=this.el},_onChange:function(t){L=j.parentNode,$=b(R),tt=j,this.animator.collect(L),L.insertBefore(R,P),J=b(R),_({sortable:this,name:"onChange",params:this._getParams(t)}),this.animator.animate(),G=this.el},_onDrop:function(t){D(t),this._cancelStart(),f(Y,"touchmove",this._nearestSortable),f(Y,"mousemove",this._nearestSortable),f(Y,"mouseup",this._onDrop),f(Y,"touchend",this._onDrop),f(Y,"touchcancel",this._onDrop),x(B,this.options.chosenClass,!1),A&&(G=A,$=Q,tt===R&&(tt=B),this.multiplayer.toggleClass(!1),_({sortable:this,name:"onUnchoose",params:this._getParams(t)}),K&&this._onEnd(t));var e=this.options,n=e.multiple,i=e.selectHandle;if(n&&(i&&q||!i&&!A)){var o=t.changedTouches?t.changedTouches[0]:t,r=o.clientX-H.clientX,s=o.clientY-H.clientY,l=Math.sqrt(r*r+s*s);l>=0&&l<=1&&this.multiplayer.onSelect(t,B,this)}F&&F.parentNode&&F.parentNode.removeChild(F),this.multiplayer.destroy(),this.autoScroller.destroy(),this._nulling()},_onEnd:function(t){var e=this._getParams(t);this.multiplayer.onDrop(G,V,Z);var n=this.options.swapOnDrop;"clone"===Z&&G!==V||!("function"==typeof n?n(e):n)||L.insertBefore(B,R),"clone"!==Z||G===V||this.multiplayer.active()?R&&R.parentNode&&R.parentNode.removeChild(R):x(R,this.options.chosenClass,!1),E(B,"display",""),G!==V&&_({sortable:G[C],name:"onDrop",params:e}),_({sortable:V[C],name:"onDrop",params:e})},_getParams:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i={};return i.event=t,i.to=V,i.from=G,i.node=B,i.clone=R,i.target=tt,i.oldIndex=$,i.newIndex=J,i.pullMode=Z,this.multiplayer.setParams(i),e(i,n),i.relative=i.target===B?0:T(i.target,R),i},_nulling:function(){V=G=A=B=j=P=R=F=L=Z=$=J=Q=H=K=tt=W=Y=X=U=q=it.clone=it.ghost=it.active=it.dragged=null},destroy:function(){this._cancelStart(),this._nulling(),f(this.el,"touchstart",this._onDrag),f(this.el,"mousedown",this._onDrag),et.splice(et.indexOf(this.el),1),this.el[C]=this.animator=this.multiplayer=this.autoScroller=null},option:function(t,e){if(void 0===e)return this.options[t];this.options[t]=e,this.animator.options[t]=e,this.multiplayer.options[t]=e,this.autoScroller.options[t]=e,"group"===t&&nt(this.options)},select:function(t){this.multiplayer.select(t)},deselect:function(t){this.multiplayer.deselect(t)},getSelectedElements:function(){return this.multiplayer.selectedElements}},it.utils={on:d,off:f,css:E,index:b,closest:g,getRect:m,toggleClass:x,detectDirection:w},it.get=function(t){return t[C]},it.create=function(t,e){return new it(t,e)},it}()}(s);var l=s.exports,a={dataSource:{},modelValue:{},dataKey:{type:String,default:"",required:!0},draggable:{type:[String]},handle:{type:[Function,String]},group:{type:[Object,String]},scroller:{type:[Document,HTMLElement]},lockAxis:{type:String,default:""},direction:{type:String,default:"vertical"},keeps:{type:Number,default:30},size:{type:Number},debounceTime:{type:Number,default:0},throttleTime:{type:Number,default:0},animation:{type:Number,default:150},autoScroll:{type:Boolean,default:!0},scrollThreshold:{type:Number,default:55},keepOffset:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},fallbackOnBody:{type:Boolean,default:!1},delay:{type:Number,default:0},delayOnTouchOnly:{type:Boolean,default:!1},rootTag:{type:String,default:"div"},wrapTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},wrapClass:{type:String,default:""},wrapStyle:{type:Object,default:function(){return{}}},itemStyle:{type:Object,default:function(){return{}}},itemClass:{type:String,default:""},ghostClass:{type:String,default:""},ghostStyle:{type:Object,default:function(){return{}}},chosenClass:{type:String,default:""}},c={tag:{type:String,default:"div"},dataKey:{type:[String,Number]},sizeKey:{type:String}},u=function(e,n,i){var o=null,r=function(){i("resize",n.value?n.value[e.sizeKey]:0,e.dataKey)};t.onMounted((function(){"undefined"!=typeof ResizeObserver&&(o=new ResizeObserver((function(){r()})),n.value&&o.observe(n.value))})),t.onUpdated((function(){r()})),t.onUnmounted((function(){o&&(o.disconnect(),o=null)}))},h=t.defineComponent({name:"VirtualDraglistItems",props:c,emits:["resize"],setup:function(e,n){var i=n.emit,o=n.slots,r=t.ref(null);return u(e,r,i),function(){var n=e.tag,i=e.dataKey;return t.h(n,{ref:r,key:i,"data-key":i},{default:function(){var t;return null===(t=o.default)||void 0===t?void 0:t.call(o)}})}}});function d(t,e){var n=null,i=function(){for(var i=this,o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];n||(e<=0?t.apply(this,r):n=setTimeout((function(){n=void 0,t.apply(i,r)}),e))};return i.cancel=function(){n&&(clearTimeout(n),n=null)},i}function f(t,e){return(Array.isArray(e)?e:e.replace(/\[/g,".").replace(/\]/g,".").split(".")).reduce((function(t,e){return(t||{})[e]}),t)}var p,m,g,v,y=["delay","group","handle","lockAxis","disabled","draggable","animation","autoScroll","ghostClass","ghostStyle","chosenClass","fallbackOnBody","scrollThreshold","delayOnTouchOnly"];function b(t,e){this.el=t,this.options=e,this.list=[],this.store={},this.reRendered=!1,this.init()}b.prototype={constructor:b,destroy:function(){this.sortable&&this.sortable.destroy(),this.sortable=this.store=this.reRendered=null},option:function(t,e){"list"===t?this.list=o(e):this.sortable.option(t,e)},init:function(){var t=this,e=y.reduce((function(e,n){return e[n]=t.options[n],e}),{});this.sortable=new l(this.el,n(n({},e),{},{swapOnDrop:function(t){return t.from===t.to},onDrag:function(e){return t.onDrag(e)},onAdd:function(e){return t.onAdd(e)},onRemove:function(e){return t.onRemove(e)},onChange:function(e){return t.onChange(e)},onDrop:function(e){return t.onDrop(e)}})),this.list=o(this.options.list)},onDrag:function(t){var e=t.node.dataset.key,n=this.getIndex(this.list,e),i=this.list[n];this.store={item:i,key:e,start:{index:n,list:this.list},from:{index:n,list:this.list},to:{index:n,list:this.list}},this.sortable.option("store",this.store),this.dispatchEvent("onDrag",{item:i,key:e,index:n})},onRemove:function(t){var e=t.node.dataset.key,n=this.getIndex(this.list,e),i=this.list[n];this.list.splice(n,1),Object.assign(this.store,{key:e,item:i}),this.sortable.option("store",this.store),this.dispatchEvent("onRemove",{item:i,key:e,index:n})},onAdd:function(t){var e=t.from,n=t.target,i=t.relative,o=l.get(e).option("store"),r=o.key,s=o.item,a=this.getIndex(this.list,n.dataset.key);0===i?a=this.list.length:-1===i&&(a+=1),this.list.splice(a,0,s),Object.assign(this.store,{to:{index:a,list:this.list}}),this.sortable.option("store",this.store),this.dispatchEvent("onAdd",{item:s,key:r,index:a})},onChange:function(t){var e=l.get(t.from).option("store");if(t.revertDrag)return this.list=o(this.options.list),void Object.assign(this.store,{from:e.start});var n=t.node,i=t.target,r=t.relative,s=t.backToOrigin,a=this.getIndex(this.list,n.dataset.key),c=this.list[a],u=this.getIndex(this.list,i.dataset.key);s&&(1===r&&e.from.index<u&&(u-=1),-1===r&&e.from.index>u&&(u+=1)),this.list.splice(a,1),this.list.splice(u,0,c),Object.assign(this.store,{from:{index:u,list:this.list},to:{index:u,list:this.list}})},onDrop:function(t){var e,n,i=l.get(t.from).option("store"),o=i.start,r=i.item,s=i.key,a=l.get(t.to).option("store").to,c=t.from!==t.to||o.index!==a.index;(this.dispatchEvent("onDrop",{changed:c,list:this.list,item:r,key:s,from:o,to:a}),t.from===this.el&&this.reRendered)&&(null===(e=l.dragged)||void 0===e||e.remove());t.from!==t.to&&"clone"===t.pullMode&&(null===(n=l.clone)||void 0===n||n.remove());this.reRendered=!1},getIndex:function(t,e){for(var n=0;n<t.length;n++)if(f(t[n],this.options.dataKey)==e)return n;return-1},dispatchEvent:function(t,e){var n=this.options[t];n&&n(e)}};var S=["size","keeps","scroller","direction","debounceTime","throttleTime"],w="INIT",x="FIXED",O="DYNAMIC",E="FRONT",T="BEHIND",D="STATIONARY",_="horizontal",I="vertical",z=(i(p={},I,"top"),i(p,_,"left"),p),C=(i(m={},I,"scrollTop"),i(m,_,"scrollLeft"),m),k=(i(g={},I,"scrollHeight"),i(g,_,"scrollWidth"),g),M=(i(v={},I,"offsetHeight"),i(v,_,"offsetWidth"),v);function N(t){this.options=t;var e={size:0,keeps:0,buffer:0,wrapper:null,scroller:null,direction:"vertical",uniqueKeys:[],debounceTime:null,throttleTime:null};for(var n in e)!(n in this.options)&&(this.options[n]=e[n]);this.sizes=new Map,this.range={start:0,end:0,front:0,behind:0},this.offset=0,this.calcType=w,this.calcSize={average:0,total:0,fixed:0},this.scrollEl=this.getScrollElement(t.scroller),this.scrollDir="",this.updateOnScrollFunction(),this.addScrollEventListener(),this.checkIfUpdate(0,t.keeps-1)}N.prototype={constructor:N,isFront:function(){return this.scrollDir===E},isBehind:function(){return this.scrollDir===T},isFixed:function(){return this.calcType===x},getSize:function(t){return this.sizes.get(t)||this.getItemSize()},getOffset:function(){return this.scrollEl[C[this.options.direction]]},getScrollSize:function(){return this.scrollEl[k[this.options.direction]]},getClientSize:function(){return this.scrollEl[M[this.options.direction]]},scrollToOffset:function(t){this.scrollEl[C[this.options.direction]]=t},scrollToIndex:function(t){if(t>=this.options.uniqueKeys.length-1)this.scrollToBottom();else{var e=this.getOffsetByIndex(t),n=this.getScrollStartOffset();this.scrollToOffset(e+n)}},scrollToBottom:function(){var t=this,e=this.getScrollSize();this.scrollToOffset(e),setTimeout((function(){var e=t.getClientSize(),n=t.getScrollSize();t.getOffset()+e+1<n&&t.scrollToBottom()}),5)},option:function(t,e){var n=this,i=this.options[t];this.options[t]=e,"uniqueKeys"===t&&this.sizes.forEach((function(t,i){e.includes(i)||n.sizes.delete(i)})),"scroller"===t&&(i&&l.utils.off(i,"scroll",this.onScroll),this.scrollEl=this.getScrollElement(e),this.addScrollEventListener())},updateRange:function(t){if(t)this.handleUpdate(t.start,t.end);else{var e=this.range.start;e=Math.max(e,0),this.handleUpdate(e,this.getEndByStart(e))}},onItemResized:function(t,e){this.sizes.set(t,e),this.calcType===w?(this.calcType=x,this.calcSize.fixed=e):this.isFixed()&&this.calcSize.fixed!==e&&(this.calcType=O,this.calcSize.fixed=void 0),this.calcType!==x&&(this.calcSize.total=o(this.sizes.values()).reduce((function(t,e){return t+e}),0),this.calcSize.average=Math.round(this.calcSize.total/this.sizes.size))},addScrollEventListener:function(){this.options.scroller&&l.utils.on(this.options.scroller,"scroll",this.onScroll)},removeScrollEventListener:function(){this.options.scroller&&l.utils.off(this.options.scroller,"scroll",this.onScroll)},updateOnScrollFunction:function(){var t,e,n=this,i=this.options,o=i.debounceTime,r=i.throttleTime;this.onScroll=o?(t=d((function(){return n.handleScroll()}),o),e=function(){t.cancel(),t.apply(this,arguments)},e.cancel=function(){t.cancel()},e):r?d((function(){return n.handleScroll()}),r):function(){return n.handleScroll()}},handleScroll:function(){var t=this.getOffset(),e=this.getClientSize(),n=this.getScrollSize();t===this.offset?this.scrollDir=D:this.scrollDir=t<this.offset?E:T,this.offset=t;var i=this.isFront()&&t<=0,o=this.isBehind()&&e+t>=n;this.options.onScroll({top:i,bottom:o,offset:t,direction:this.scrollDir}),this.isFront()?this.handleScrollFront():this.isBehind()&&this.handleScrollBehind()},handleScrollFront:function(){var t=this.getScrollItems();if(!(t>this.range.start)){var e=Math.max(t-this.options.buffer,0);this.checkIfUpdate(e,this.getEndByStart(e))}},handleScrollBehind:function(){var t=this.getScrollItems();t<this.range.start+this.options.buffer||this.checkIfUpdate(t,this.getEndByStart(t))},getScrollItems:function(){var t=this.offset-this.getScrollStartOffset();if(t<=0)return 0;if(this.isFixed())return Math.floor(t/this.calcSize.fixed);for(var e=0,n=this.options.uniqueKeys.length,i=0,o=0;e<=n;){if(i=e+Math.floor((n-e)/2),(o=this.getOffsetByIndex(i))===t)return i;o<t?e=i+1:o>t&&(n=i-1)}return e>0?--e:0},checkIfUpdate:function(t,e){var n=this.options.keeps;this.options.uniqueKeys.length<=n?(t=0,e=this.getLastIndex()):e-t<n-1&&(t=e-n+1),this.range.start!==t&&this.handleUpdate(t,e)},handleUpdate:function(t,e){this.range.start=t,this.range.end=e,this.range.front=this.getFrontOffset(),this.range.behind=this.getBehindOffset(),this.options.onUpdate(n({},this.range))},getFrontOffset:function(){return this.isFixed()?this.calcSize.fixed*this.range.start:this.getOffsetByIndex(this.range.start)},getBehindOffset:function(){var t=this.range.end,e=this.getLastIndex();return this.isFixed()?(e-t)*this.calcSize.fixed:(e-t)*this.getItemSize()},getOffsetByIndex:function(t){if(!t)return 0;for(var e=0,n=0;n<t;n++){var i=this.sizes.get(this.options.uniqueKeys[n]);e+="number"==typeof i?i:this.getItemSize()}return e},getEndByStart:function(t){return Math.min(t+this.options.keeps-1,this.getLastIndex())},getLastIndex:function(){var t=this.options,e=t.uniqueKeys,n=t.keeps;return e.length>0?e.length-1:n-1},getItemSize:function(){return this.isFixed()?this.calcSize.fixed:this.calcSize.average||this.options.size},getScrollElement:function(t){return t instanceof Document&&9===t.nodeType||t instanceof Window?document.scrollingElement||document.documentElement||document.body:t},getScrollStartOffset:function(){var t=0,e=this.options,n=e.wrapper,i=e.scroller;if(n&&n){var o=l.utils.getRect(n,!0,i);t=this.offset+o[z[this.options.direction]]}return t}};return t.defineComponent({props:a,emits:["update:dataSource","update:modelValue","top","bottom","drag","drop","add","remove"],setup:function(e,n){var i,r,s=this,a=n.emit,c=n.slots,u=n.expose,p=t.ref({start:0,end:e.keeps,front:0,behind:0}),m=t.ref(null),g=t.ref(null),v=t.ref([]),w=t.ref([]),x=t.computed((function(){return"vertical"!==e.direction})),O=t.computed((function(){return"vertical"!==e.direction?"offsetWidth":"offsetHeight"})),E=t.computed((function(){return S.reduce((function(t,n){return t[n]=e[n],t}),{})})),T=t.computed((function(){return y.reduce((function(t,e){return t[e]=s[e],t}),{})})),D=0;function _(){return r.getOffset()}function I(){return r.getClientSize()}function z(){return r.getScrollSize()}function C(t){r.scrollToOffset(t)}function k(t){r.scrollToIndex(t)}u({getSize:function(t){return r.getSize(t)},getOffset:_,getClientSize:I,getScrollSize:z,scrollToTop:function(){C(0)},scrollToBottom:function(){r.scrollToBottom()},scrollToKey:function(t){var e=w.value.indexOf(t);e>-1&&r.scrollToIndex(e)},scrollToIndex:k,scrollToOffset:C}),t.watch((function(){return[e.dataSource,e.modelValue]}),(function(){M()}),{deep:!0}),t.watch((function(){return E}),(function(t,e){if(r)for(var n in t)t[n]!=e[n]&&r.option(n,t[n])})),t.watch((function(){return T}),(function(t,e){if(r)for(var n in t)t[n]!=e[n]&&i.option(n,t[n])})),t.onBeforeMount((function(){B(),M()})),t.onActivated((function(){r&&C(r.offset),r.addScrollEventListener()})),t.onDeactivated((function(){r.removeScrollEventListener()})),t.onMounted((function(){r.option("wrapper",g.value),e.scroller||r.option("scroller",m.value)})),t.onUnmounted((function(){i&&i.destroy(),r.removeScrollEventListener()}));var M=function(){var n,r=(n=e.modelValue||e.dataSource,t.isRef(n)?n.value:n);if(r){var s=o(v.value);if(v.value=r,A(),P(s,r),i?i.option("list",r):t.nextTick((function(){return j()})),D&&e.keepOffset){var l=r.length-D;l>0&&k(l),D=0}}},A=function(){w.value=v.value.map((function(t){return f(t,e.dataKey)})),r.option("uniqueKeys",w.value)},B=function(){r=new N({size:e.size,keeps:e.keeps,buffer:Math.round(e.keeps/3),scroller:e.scroller,direction:e.direction,uniqueKeys:w.value,debounceTime:e.debounceTime,throttleTime:e.throttleTime,onScroll:function(t){D=0,v.value.length&&t.top?F():t.bottom&&L()},onUpdate:function(t){l.dragged&&i&&t.start!==p.value.start&&(i.reRendered=!0),p.value=t}})},j=function(){i=new b(g.value,Object.assign(Object.assign({list:v.value},e),{onDrag:function(t){a("drag",t)},onAdd:function(t){a("add",t)},onRemove:function(t){a("remove",t)},onDrop:function(t){t.changed&&(a("update:dataSource",t.list),a("update:modelValue",t.list)),a("drop",t)}}))},P=function(t,n){var i=Object.assign({},p.value);n.length>t.length&&i.end===t.length-1&&R()&&(i.end++,i.start=Math.max(0,i.end-e.keeps)),r.updateRange(i)},R=function(){return _()+I()+1>=z()},F=d((function(){a("top"),D=v.value.length}),50),L=d((function(){a("bottom")}),50),H=function(t,e){var n=r.sizes.size;r.onItemResized(e,t),0===n&&P(v.value,v.value)},K=function(){for(var n=[],i=p.value,o=i.start,r=i.end,s=function(i){var o=v.value[i];if(o){var r=f(o,e.dataKey),s=Object.assign(Object.assign({},e.itemStyle),function(t){var e;return t==(null===(e=l.dragged)||void 0===e?void 0:e.dataset.key)?{display:"none"}:{}}(r));n.push(c.item?t.h(h,{key:r,tag:e.itemTag,class:e.itemClass,style:s,dataKey:r,sizeKey:O.value,onResize:H},{default:function(){var t;return null===(t=c.item)||void 0===t?void 0:t.call(c,{record:o,index:i,dataKey:r})}}):null)}},a=o;a<=r;a++)s(a);return n};return function(){var n=p.value,i=n.front,o=n.behind,r=e.rootTag,s=e.wrapTag,l=e.scroller,a=e.wrapClass,u=e.wrapStyle,h=x.value?"0px ".concat(o,"px 0px ").concat(i,"px"):"".concat(i,"px 0px ").concat(o,"px");return t.h(r,{ref:m,style:!l&&{overflow:x.value?"auto hidden":"hidden auto"}},{default:function(){var e,n;return[null===(e=c.header)||void 0===e?void 0:e.call(c),t.h(s,{ref:g,class:a,style:Object.assign(Object.assign({},u),{padding:h})},{default:function(){return K()}}),null===(n=c.footer)||void 0===n?void 0:n.call(c)]}})}}})})); | ||
!function(t,e){t.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(){return e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},e.apply(this,arguments)}var n={capture:!1,passive:!1},o=/\s+/g;function i(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var r=i(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),s=i(/Edge/i),l=i(/safari/i)&&!i(/chrome/i)&&!i(/android/i),a=function(){var t=!1;return document.addEventListener("checkIfSupportPassive",null,{get passive(){return t=!0,!0}}),t}();function c(t,e,o){window.addEventListener?t.addEventListener(e,o,!(!a&&r)&&n):window.attachEvent?t.attachEvent("on"+e,o):t["on"+e]=o}function u(t,e,o){window.removeEventListener?t.removeEventListener(e,o,!(!a&&r)&&n):window.detachEvent?t.detachEvent("on"+e,o):t["on"+e]=null}function h(){return document.scrollingElement||document.documentElement}function d(t,e,n){if(t.getBoundingClientRect||t===window){var o,i,r,s,l,a,c;if(t!==window&&t.parentNode&&t!==h()?(i=(o=t.getBoundingClientRect()).top,r=o.left,s=o.bottom,l=o.right,a=o.height,c=o.width):(i=0,r=0,s=window.innerHeight,l=window.innerWidth,a=window.innerHeight,c=window.innerWidth),e&&t!==window){n=n||t.parentNode;do{if(n&&n.getBoundingClientRect){var u=n.getBoundingClientRect();i-=u.top+parseInt(w(n,"border-top-width")),r-=u.left+parseInt(w(n,"border-left-width")),s=i+o.height,l=r+o.width;break}}while(n=n.parentNode)}return{top:i,left:r,bottom:s,right:l,width:c,height:a}}}function f(t,e,n,o){if(!t)return null;if(n&&!e){var i=Array.prototype.slice.call(n.children),r=i.indexOf(t);if(r>-1)return i[r];for(var s=0,l=i.length;s<l;s++)if(p(t,i[s]))return i[s]}n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&S(t,e):S(t,e))||o&&t===n)return t;if(t===n)break}while(t=t.parentNode);return null}function p(t,e){if(!t||!e)return!1;if(e.compareDocumentPosition)return!!(16&e.compareDocumentPosition(t));if(e.contains&&1===t.nodeType)return e.contains(t)&&e!==t;for(;t=t.parentNode;)if(t===e)return!0;return!1}function m(t,e){for(var n=t.lastElementChild;n&&(n===ot.ghost||"none"===w(n,"display")||e&&!S(n,e));)n=n.previousElementSibling;return n||null}function g(t,e){if(!t||!t.parentNode)return-1;for(var n=0;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||e&&!S(t,e)||"none"===w(t,"display")||n++;return n}function v(t,e,n,o){for(var i=0,r=0,s=t.children;i<s.length;){if(s[i]!==ot.ghost&&"none"!==w(s[i],"display")&&f(s[i],n,t,!1)&&(o||s[i]!==ot.dragged)){if(r===e)return s[i];r++}i++}return null}function y(t,e){var n=w(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=v(t,0,e),l=v(t,1,e),a=i&&w(i),c=l&&w(l),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+d(i).width,h=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+d(l).width,f=s||r?"cssFloat":"float";if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var p="left"===a.float?"left":"right";return!l||"both"!==c.clear&&c.clear!==p?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||u>=o&&"none"===n[f]||l&&"none"===n[f]&&u+h>o)?"vertical":"horizontal"}function b(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var i=(" "+t.className+" ").replace(o," ").replace(" "+e+" "," ");t.className=(i+(n?" "+e:"")).replace(o," ")}}function S(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function w(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function x(t,e){var n,o,i=(o=e,(n=t).compareDocumentPosition?n.compareDocumentPosition(o):n.contains?(n!=o&&n.contains(o)&&16)+(n!=o&&o.contains(n)&&8)+(n.sourceIndex>=0&&o.sourceIndex>=0?(n.sourceIndex<o.sourceIndex&&4)+(n.sourceIndex>o.sourceIndex&&2):1):0);return 2===i?1:4===i?-1:0}function E(t){void 0!==t.preventDefault&&t.cancelable&&t.preventDefault()}function T(t){var n=t.sortable,o=t.name,i=t.params,r=n.options[o];"function"==typeof r&&r(e({},i))}!function(){if("undefined"==typeof window||"undefined"==typeof document)return"";var t=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"];(Array.prototype.slice.call(t).join("").match(/-(moz|webkit|ms)-/)||""===t.OLink&&["","o"])[1]}();var O,D,I="Sortable"+Date.now();function _(t){this.options=t,this.autoScrollAnimationFrame=null}function z(t){this.options=t,this.stack=[]}function C(t){this.options=t||{},this.selectedElements=[]}window.requestAnimationFrame||(window.requestAnimationFrame=function(t){return setTimeout(t,17)}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)}),_.prototype={destroy:function(){this.autoScrollAnimationFrame&&(cancelAnimationFrame(this.autoScrollAnimationFrame),this.autoScrollAnimationFrame=null)},update:function(t,e,n){var o=this;cancelAnimationFrame(this.autoScrollAnimationFrame),this.autoScrollAnimationFrame=requestAnimationFrame((function(){e&&n&&o.autoScroll(t,n),o.update(t,e,n)}))},autoScroll:function(t,e){if(t&&void 0!==e.clientX&&void 0!==e.clientY){var n=d(t);if(n){var o=e.clientX,i=e.clientY,r=n.top,s=n.right,l=n.bottom,a=n.left,c=n.height,u=n.width;if(!(i<r||o>s||i>l||o<a)){var h=this.options,f=h.scrollThreshold,p=h.scrollSpeed,m=t.scrollTop,g=t.scrollLeft,v=t.scrollHeight,y=m>0&&i>=r&&i<=r+f,b=g+u<t.scrollWidth&&o<=s&&o>=s-f,S=m+c<v&&i<=l&&i>=l-f;g>0&&o>=a&&o<=a+f&&(t.scrollLeft+=Math.floor(Math.max(-1,(o-a)/f-1)*p.x)),b&&(t.scrollLeft+=Math.ceil(Math.min(1,(o-s)/f+1)*p.x)),y&&(t.scrollTop+=Math.floor(Math.max(-1,(i-r)/f-1)*p.y)),S&&(t.scrollTop+=Math.ceil(Math.min(1,(i-l)/f+1)*p.y))}}}}},z.prototype={collect:function(t){if(t){for(var e=d(t),n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,o=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,i=Math.min(e.right,n),r=Math.min(e.bottom,o),s=Array.prototype.slice.call(t.children),l=[],a=0,c=s.length;a<=c;a++){var u=s[a];if(u&&u!==ot.ghost&&"none"!==w(u,"display")){var h=d(u);if(!(h.bottom<0||h.right<0)){if(h.top-h.height>r||h.left-h.width>i)break;l.push({el:u,rect:h})}}}this.stack.push(l)}},animate:function(){for(var t=this.stack.pop(),e=0,n=t.length;e<n;e++){var o=t[e],i=o.el,r=o.rect;this.options.animation&&this._excute(i,r)}},_excute:function(t,e){var n=d(t);if(n.top!==e.top||n.left!==e.left){var o=e.left-n.left,i=e.top-n.top;w(t,"transition",""),w(t,"transform","translate3d("+o+"px, "+i+"px, 0)"),t.offsetWidth;var r=this.options,s=r.animation,l=r.easing;w(t,"transition","transform "+s+"ms"+(l?" "+l:"")),w(t,"transform","translate3d(0px, 0px, 0px)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){w(t,"transition",""),w(t,"transform",""),t.animated=null}),s)}}},C.prototype={destroy:function(){O=D=null},active:function(){return!!O},setParams:function(t){t.nodes=O||[],t.clones=D||[]},select:function(t){b(t,this.options.selectedClass,!0),this.selectedElements.push(t),this.selectedElements.sort((function(t,e){return x(t,e)}))},deselect:function(t){var e=this.selectedElements.indexOf(t);e>-1&&(b(t,this.options.selectedClass,!1),this.selectedElements.splice(e,1))},getGhostElement:function(){if(!O)return null;var t=document.createElement("div");return this.selectedElements.forEach((function(e,n){var o=e.cloneNode(!0),i=0===n?1:.5;o.style="position: absolute;left: 0;top: 0;bottom: 0;right: 0;opacity: ".concat(i,";z-index: ").concat(n,";"),t.appendChild(o)})),t},toggleSelected:function(t,e){var n=this;e?t.forEach((function(t){return n.selectedElements.push(t)})):this.selectedElements=this.selectedElements.filter((function(e){return t.indexOf(e)<0}))},toggleClass:function(t){if(O)for(var e=0;e<O.length;e++)b(O[e],this.options.chosenClass,t)},toggleVisible:function(t){if(O)if(t){var e=O.indexOf(ot.dragged);this._viewElements(O,e,ot.dragged)}else this._hideElements(O)},onChoose:function(){!this.options.multiple||!this.selectedElements.length||this.selectedElements.indexOf(ot.dragged)<0||(this.selectedElements.sort((function(t,e){return x(t,e)})),O=this.selectedElements,this.toggleClass(!0))},onDrag:function(t){O&&(t.animator.collect(ot.dragged.parentNode),this._hideElements(O),t.animator.animate(),this.toggleClass(!1))},onDrop:function(t,e,n){if(O){var o=ot.dragged,i=ot.clone,r=O.indexOf(o);e[I].animator.collect(i.parentNode),t!==e&&"clone"===n?(w(i,"display","none"),D=O.map((function(t){return t.cloneNode(!0)})),this._viewElements(D,r,i),this._viewElements(O,r,o)):this._viewElements(O,r,i),e[I].animator.animate(),t!==e&&(e[I].multiplayer.toggleSelected(D||O,!0),"clone"!==n&&t[I].multiplayer.toggleSelected(O,!1))}},onSelect:function(t,e,n){var o=this.selectedElements.indexOf(e);b(e,this.options.selectedClass,o<0);var i={from:n.el,event:t,node:e,index:g(e)};o<0?(this.selectedElements.push(e),T({sortable:n,name:"onSelect",params:i})):(this.selectedElements.splice(o,1),T({sortable:n,name:"onDeselect",params:i})),this.selectedElements.sort((function(t,e){return x(t,e)}))},_viewElements:function(t,e,n){for(var o=0;o<t.length;o++)if(w(t[o],"display",""),o<e)n.parentNode.insertBefore(t[o],n);else{var i=o>0?t[o-1]:n;n.parentNode.insertBefore(t[o],i.nextSibling)}},_hideElements:function(t){for(var e=0;e<t.length;e++)t[e]!=ot.dragged&&w(t[e],"display","none")}};var k,M,A,N,B,P,R,j,F,L,K,H,W,Y,X,U,q,V,G,$,J,Q,Z,tt=[];function et(e){var n={},o=e.group;o&&"object"==t(o)||(o={name:o,pull:!0,put:!0,revertDrag:!0}),n.name=o.name,n.pull=o.pull,n.put=o.put,n.revertDrag=o.revertDrag,e.group=n}function nt(t){var e=U||X;return!(void 0!==t.clientX&&void 0!==t.clientY&&Math.abs(t.clientX-e.clientX)<=0&&Math.abs(t.clientY-e.clientY)<=0)}function ot(t,n){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable-dnd: `el` must be an HTMLElement, not ".concat({}.toString.call(t));t[I]=this,this.el=t,this.options=n=e({},n);var o={store:null,group:"",handle:null,sortable:!0,disabled:!1,multiple:!1,lockAxis:"",direction:"",animation:150,easing:"",draggable:null,selectHandle:null,customGhost:null,autoScroll:!0,scrollThreshold:55,scrollSpeed:{x:10,y:10},delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,ghostClass:"",ghostStyle:{},chosenClass:"",selectedClass:"",swapOnDrop:!0,fallbackOnBody:!1,supportTouch:"ontouchstart"in window,emptyInsertThreshold:-1};for(var i in o)!(i in this.options)&&(this.options[i]=o[i]);for(var r in et(n),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));c(t,this.options.supportTouch?"touchstart":"mousedown",this._onDrag),tt.push(t),this.autoScroller=new _(this.options),this.multiplayer=new C(this.options),this.animator=new z(this.options)}return ot.prototype={constructor:ot,_onDrag:function(t){var e=this;if(!N&&!this.options.disabled&&this.options.group.pull&&(!/mousedown|pointerdown/.test(t.type)||0===t.button)){var n=t.touches&&t.touches[0],o=(n||t).target;if(!l||!o||"SELECT"!==o.tagName.toUpperCase()){var i=f(o,this.options.draggable,this.el);if(i&&!i.animated){X={origin:t,clientX:(n||t).clientX,clientY:(n||t).clientY},N=i,c($=n?N:document,"mouseup",this._onDrop),c($,"touchend",this._onDrop),c($,"touchcancel",this._onDrop);var a=this.options,u=a.handle,h=a.selectHandle;if("function"==typeof h&&h(t)||"string"==typeof h&&S(o,h))Z=!0;else if(("function"!=typeof u||u(t))&&("string"!=typeof u||S(o,u))){var d=this.options,p=d.delay,m=d.delayOnTouchOnly;!p||m&&!n||s||r?this._onStart(n,t):(c(this.el.ownerDocument,"touchmove",this._delayMoveHandler),c(this.el.ownerDocument,"mousemove",this._delayMoveHandler),c(this.el.ownerDocument,"mouseup",this._cancelStart),c(this.el.ownerDocument,"touchend",this._cancelStart),c(this.el.ownerDocument,"touchcancel",this._cancelStart),Q=setTimeout((function(){return e._onStart(n,t)}),p)),c(document,"selectstart",E),l&&w(document.body,"user-select","none")}}}}},_delayMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-X.clientX),Math.abs(e.clientY-X.clientY))>=Math.floor(this.options.touchStartThreshold/(window.devicePixelRatio||1))&&this._cancelStart()},_cancelStart:function(){clearTimeout(Q),u(this.el.ownerDocument,"touchmove",this._delayMoveHandler),u(this.el.ownerDocument,"mousemove",this._delayMoveHandler),u(this.el.ownerDocument,"mouseup",this._cancelStart),u(this.el.ownerDocument,"touchend",this._cancelStart),u(this.el.ownerDocument,"touchcancel",this._cancelStart),u(document,"selectstart",E),l&&w(document.body,"user-select","")},_onStart:function(t,e){var n=g(N);k=this.el,M=this.el,F=N,H=n,W=n,Y=n,V={to:this.el,target:N,newIndex:n,relative:0},G=N,A=this.el,R=N.cloneNode(!0),L=N.parentNode,K=this.options.group.pull,ot.clone=R,ot.active=this,ot.dragged=N,b(N,this.options.chosenClass,!0),this.multiplayer.onChoose(),T({sortable:this,name:"onChoose",params:this._getParams(e)}),c($,t?"touchmove":"mousemove",this._nearestSortable);try{document.selection?setTimeout((function(){return document.selection.empty()}),0):window.getSelection().removeAllRanges()}catch(t){}},_onStarted:function(){b(R,this.options.chosenClass,!0),this._appendGhost(),this.multiplayer.onDrag(this),T({sortable:this,name:"onDrag",params:this._getParams(X.origin)}),w(N,"display","none"),b(N,this.options.chosenClass,!1),N.parentNode.insertBefore(R,N)},_getGhostElement:function(){var t=this.options.customGhost;if("function"==typeof t){var e=this.multiplayer.selectedElements;return t(e.length?e:[N])}return this.multiplayer.getGhostElement()||N},_appendGhost:function(){if(!j){var t=this.options.fallbackOnBody?document.body:this.el,n=this._getGhostElement();b(j=n.cloneNode(!0),this.options.ghostClass,!0);var o=d(N),i=e({position:"fixed",top:o.top,left:o.left,width:o.width,height:o.height,zIndex:"100000",opacity:"0.8",overflow:"hidden",boxSizing:"border-box",transform:"translate3d(0px, 0px, 0px)",transition:"none",pointerEvents:"none"},this.options.ghostStyle);for(var r in i)w(j,r,i[r]);ot.ghost=j,t.appendChild(j);var s=(X.clientX-o.left)/parseInt(j.style.width)*100,l=(X.clientY-o.top)/parseInt(j.style.height)*100;w(j,"transform-origin",s+"% "+l+"%"),w(j,"will-change","transform")}},_nearestSortable:function(t){E(t);var e=t.touches&&t.touches[0]||t;if(N&&nt(e)){!U&&this._onStarted();var n=this.options.lockAxis,o="x"===n?X.clientX:e.clientX,i="y"===n?X.clientY:e.clientY,r=document.elementFromPoint(o,i),s=o-X.clientX,l=i-X.clientY;U={origin:t,clientX:o,clientY:i},w(j,"transform","translate3d("+s+"px, "+l+"px, 0)");var a,c,u,f=(a=o,c=i,tt.reduce((function(t,e){var n=e[I].options.emptyInsertThreshold;if(null!=n){var o=d(e),i=a>=o.left-n&&a<=o.right+n,r=c>=o.top-n&&c<=o.bottom+n;return i&&r&&(!u||u&&o.left>=u.left&&o.right<=u.right&&o.top>=u.top&&o.bottom<=u.bottom)&&(t=e,u=o),t}}),null));if(f&&f[I]._onMove(t,r),!f||f[I].options.autoScroll){var p=function(t,e){if(!t||!t.getBoundingClientRect)return h();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=w(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return h();if(o||e)return n;o=!0}}}while(n=n.parentNode);return h()}(r,!0);this.autoScroller.update(p,X,U)}else this.autoScroller.destroy()}},_allowPut:function(){if(A===this.el)return!0;if(this.options.group.put){var t=this.options.group,e=t.name,n=t.put,o=A[I].options.group;return n.join&&n.indexOf(o.name)>-1||o.name&&e&&o.name===e}return!1},_getDirection:function(){var t=this.options,e=t.draggable,n=t.direction;return n?"function"==typeof n?n.call(U.origin,N,this):n:y(L,e)},_allowSwap:function(){var t=d(B),e="vertical"===this._getDirection(),n=e?"top":"left",o=e?"bottom":"right",i=B[e?"offsetHeight":"offsetWidth"],r=e?U.clientY:U.clientX,s=r>=t[n]&&r<t[o]-i/2?-1:1,l=v(L,0,this.options.draggable),a=m(L),c=d(l),u=d(a);if(B===L||p(L,B))return R===l&&r<c[n]?(P=B,!0):R===a&&r>u[o]&&(P=B.nextSibling,!0);var h=x(R,B);return P=h<0?B.nextSibling:B,q!==B?(J=s,!0):J!==s&&(J=s,s<0?h>0:h<0)},_onMove:function(t,e){if(!this.options.disabled&&this._allowPut()){if(B=f(e,this.options.draggable,this.el),T({sortable:this,name:"onMove",params:this._getParams(t,{target:B})}),this.options.sortable||this.el!==A)return this.el===M||e!==this.el&&m(this.el)?void(B&&!B.animated&&!p(B,R)&&this._allowSwap()&&(B!==R&&P!==R?(this.el!==M?this._onInsert(t):B!==N&&this._onChange(t),q=B):q=B)):(B=q=null,void this._onInsert(t));M!==A&&(B=q=N,J=0,this._onInsert(t))}},_onInsert:function(t){var e=B||R,n="clone"===K&&this.el!==A&&M===A,o="clone"===K&&this.el===A&&M!==A;k=this.el,H=g(R),F=e,L=B?B.parentNode:this.el,M[I].animator.collect(R.parentNode),this.animator.collect(L),n&&(V.target=G,V.newIndex=H,V.relative=G===N?0:x(R,G),w(N,"display",""),A[I].multiplayer.toggleVisible(!0),A[I].options.group.revertDrag||R.parentNode.insertBefore(N,R)),o&&(H=g(N),w(N,"display","none"),this.multiplayer.toggleVisible(!1)),B?L.insertBefore(R,J<0?B:B.nextSibling):L.appendChild(R),W=g(R),n&&A[I].options.group.revertDrag&&(V.target=N,V.newIndex=Y,V.relative=0,T({sortable:A[I],name:"onChange",params:this._getParams(t,{to:A,target:N,newIndex:Y,revertDrag:!0})})),n||T({sortable:M[I],name:"onRemove",params:this._getParams(t,{newIndex:-1})}),o&&e!==N&&(G=e,T({sortable:this,name:"onChange",params:this._getParams(t,{from:A,backToOrigin:!0})})),o||T({sortable:this,name:"onAdd",params:this._getParams(t,{oldIndex:-1})}),M[I].animator.animate(),this.animator.animate(),M=this.el},_onChange:function(t){H=g(R),L=B.parentNode,F=B,this.el===A&&(G=B),this.animator.collect(L),L.insertBefore(R,P),W=g(R),T({sortable:this,name:"onChange",params:this._getParams(t)}),this.animator.animate(),M=this.el},_onDrop:function(t){E(t),this._cancelStart(),u($,"touchmove",this._nearestSortable),u($,"mousemove",this._nearestSortable),u($,"mouseup",this._onDrop),u($,"touchend",this._onDrop),u($,"touchcancel",this._onDrop),b(N,this.options.chosenClass,!1),A&&(M=A,H=Y,F===R&&(F=N),this.multiplayer.toggleClass(!1),T({sortable:this,name:"onUnchoose",params:this._getParams(t)}),U&&this._onEnd(t));var e=this.options,n=e.multiple,o=e.selectHandle;n&&(o&&Z||!o&&!A)&&!nt(t.changedTouches?t.changedTouches[0]:t)&&this.multiplayer.onSelect(t,N,this),j&&j.parentNode&&j.parentNode.removeChild(j),this.autoScroller.destroy(),this.multiplayer.destroy(),this._nulling()},_onEnd:function(t){var n=this._getParams(t);this.multiplayer.onDrop(M,k,K);var o=this.options.swapOnDrop;"clone"===K&&M!==k||!("function"==typeof o?o(n):o)||L.insertBefore(N,R),"clone"!==K||M===k||this.multiplayer.active()?R&&R.parentNode&&R.parentNode.removeChild(R):b(R,this.options.chosenClass,!1),w(N,"display",""),M!==k&&T({sortable:M[I],name:"onDrop",params:e({},n,"clone"===K?V:{newIndex:-1})}),T({sortable:k[I],name:"onDrop",params:e({},n,M===k?{}:{oldIndex:-1})})},_getParams:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o={};return o.event=t,o.to=k,o.from=M,o.node=N,o.clone=R,o.target=F,o.oldIndex=H,o.newIndex=W,o.pullMode=K,this.multiplayer.setParams(o),e(o,n),o.relative=F===N?0:x(R,F),o},_nulling:function(){k=M=A=N=B=P=R=j=F=L=K=H=W=Y=X=U=q=V=G=$=J=Q=Z=ot.clone=ot.ghost=ot.active=ot.dragged=null},destroy:function(){this._cancelStart(),this._nulling(),u(this.el,"touchstart",this._onDrag),u(this.el,"mousedown",this._onDrag),tt.splice(tt.indexOf(this.el),1),this.el[I]=this.animator=this.multiplayer=this.autoScroller=null},option:function(t,e){if(void 0===e)return this.options[t];this.options[t]=e,this.animator.options[t]=e,this.multiplayer.options[t]=e,this.autoScroller.options[t]=e,"group"===t&&et(this.options)},select:function(t){this.multiplayer.select(t)},deselect:function(t){this.multiplayer.deselect(t)},getSelectedElements:function(){return this.multiplayer.selectedElements}},ot.utils={on:c,off:u,css:w,index:g,closest:f,getRect:d,toggleClass:b,detectDirection:y},ot.get=function(t){return t[I]},ot.create=function(t,e){return new ot(t,e)},ot}()}(s);var l=s.exports,a={dataSource:{},modelValue:{},dataKey:{type:String,default:"",required:!0},draggable:{type:String,default:".virtual-dnd-list-item"},sortable:{type:Boolean,default:!0},handle:{type:[Function,String]},group:{type:[Object,String]},scroller:{type:[Document,HTMLElement]},lockAxis:{type:String,default:""},direction:{type:String,default:"vertical"},keeps:{type:Number,default:30},size:{type:Number},debounceTime:{type:Number,default:0},throttleTime:{type:Number,default:0},animation:{type:Number,default:150},autoScroll:{type:Boolean,default:!0},scrollThreshold:{type:Number,default:55},keepOffset:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},fallbackOnBody:{type:Boolean,default:!1},delay:{type:Number,default:0},delayOnTouchOnly:{type:Boolean,default:!1},rootTag:{type:String,default:"div"},wrapTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},wrapClass:{type:String,default:""},wrapStyle:{type:Object,default:function(){return{}}},itemStyle:{type:Object,default:function(){return{}}},itemClass:{type:String,default:""},ghostClass:{type:String,default:""},ghostStyle:{type:Object,default:function(){return{}}},chosenClass:{type:String,default:""}},c={tag:{type:String,default:"div"},dataKey:{type:[String,Number]},sizeKey:{type:String}};function u(t,e){var n=null,o=function(){for(var o=this,i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];n||(e<=0?t.apply(this,r):n=setTimeout((function(){n=void 0,t.apply(o,r)}),e))};return o.cancel=function(){n&&(clearTimeout(n),n=null)},o}function h(t,e){return(Array.isArray(e)?e:e.replace(/\[/g,".").replace(/\]/g,".").split(".")).reduce((function(t,e){return(t||{})[e]}),t)}var d,f,p,m,g=["delay","group","handle","lockAxis","disabled","sortable","draggable","animation","autoScroll","ghostClass","ghostStyle","chosenClass","fallbackOnBody","scrollThreshold","delayOnTouchOnly"];function v(t,e){this.el=t,this.list=e.list,this.options=e,this.reRendered=!1,this.init()}v.prototype={constructor:v,destroy:function(){this.sortable&&this.sortable.destroy(),this.sortable=this.reRendered=null},option:function(t,e){"list"===t?this.list=e:this.sortable.option(t,e)},init:function(){var t=this,e=g.reduce((function(e,n){return e[n]=t.options[n],e}),{});this.sortable=new l(this.el,n(n({},e),{},{emptyInsertThreshold:0,swapOnDrop:function(t){return t.from===t.to},onDrag:function(e){return t.onDrag(e)},onDrop:function(e){return t.onDrop(e)},onAdd:function(e){return t.onAdd(e)},onRemove:function(e){return t.onRemove(e)}}))},onAdd:function(t){var e=l.get(t.from).option("store"),n=e.item,o=e.key;this.sortable.option("store",{item:n,key:o}),this.dispatchEvent("onAdd",{item:n,key:o,event:t})},onRemove:function(t){var e=l.get(t.from).option("store"),n=e.item,o=e.key;this.dispatchEvent("onRemove",{item:n,key:o,event:t})},onDrag:function(t){var e=t.node.getAttribute("data-key"),n=this.getIndex(this.list,e),o=this.list[n];this.sortable.option("store",{item:o,key:e,index:n,list:this.list}),this.dispatchEvent("onDrag",{item:o,key:e,index:n,event:t}),this.options.sortable||this.sortable.option("autoScroll",!1)},onDrop:function(t){var e=l.get(t.from).option("store");e.list;var n,o,r=e.item,s=e.key,a=e.index,c=i(this.list),u={key:s,item:r,event:t,changed:!1,list:c,oldList:this.list,oldIndex:a,newIndex:a};(t.from===t.to&&t.node===t.target||this.getDropParams(u,t,r,s,a,c),this.dispatchEvent("onDrop",u),t.from===this.el&&this.reRendered)&&(null===(n=l.dragged)||void 0===n||n.remove());t.from!==t.to&&"clone"===t.pullMode&&(null===(o=l.clone)||void 0===o||o.remove());this.reRendered=!1,this.sortable.option("autoScroll",this.options.autoScroll)},getDropParams:function(t,e,n,o,i,r){var s=e.target.getAttribute("data-key"),l=-1,a=i;e.from===e.to?(((a=this.getIndex(r,o))<(l=this.getIndex(r,s))&&-1===e.relative||a>l&&1===e.relative)&&(l+=e.relative),l!==a&&(r.splice(a,1),r.splice(l,0,n))):(e.from===this.el&&(a=this.getIndex(r,o),r.splice(a,1)),e.to===this.el&&(a=-1,l=this.getIndex(r,s),0===e.relative?l=r.length:1===e.relative&&(l+=e.relative),r.splice(l,0,n))),t.changed=e.from!==e.to||l!==a,t.list=r,t.oldIndex=a,t.newIndex=l},getIndex:function(t,e){for(var n=0;n<t.length;n++)if(h(t[n],this.options.dataKey)==e)return n;return-1},dispatchEvent:function(t,e){var n=this.options[t];n&&n(e)}};var y=["size","keeps","scroller","direction","debounceTime","throttleTime"],b="INIT",S="FIXED",w="DYNAMIC",x="FRONT",E="BEHIND",T="STATIONARY",O="horizontal",D="vertical",I=(o(d={},D,"top"),o(d,O,"left"),d),_=(o(f={},D,"scrollTop"),o(f,O,"scrollLeft"),f),z=(o(p={},D,"scrollHeight"),o(p,O,"scrollWidth"),p),C=(o(m={},D,"offsetHeight"),o(m,O,"offsetWidth"),m);function k(t){this.options=t;var e={size:0,keeps:0,buffer:0,wrapper:null,scroller:null,direction:"vertical",uniqueKeys:[],debounceTime:null,throttleTime:null};for(var n in e)!(n in this.options)&&(this.options[n]=e[n]);this.sizes=new Map,this.range={start:0,end:0,front:0,behind:0},this.offset=0,this.calcType=b,this.calcSize={average:0,total:0,fixed:0},this.scrollEl=this.getScrollElement(t.scroller),this.scrollDir="",this.updateOnScrollFunction(),this.addScrollEventListener(),this.checkIfUpdate(0,t.keeps-1)}k.prototype={constructor:k,isFront:function(){return this.scrollDir===x},isBehind:function(){return this.scrollDir===E},isFixed:function(){return this.calcType===S},getSize:function(t){return this.sizes.get(t)||this.getItemSize()},getOffset:function(){return this.scrollEl[_[this.options.direction]]},getScrollSize:function(){return this.scrollEl[z[this.options.direction]]},getClientSize:function(){return this.scrollEl[C[this.options.direction]]},scrollToOffset:function(t){this.scrollEl[_[this.options.direction]]=t},scrollToIndex:function(t){if(t>=this.options.uniqueKeys.length-1)this.scrollToBottom();else{var e=this.getOffsetByIndex(t),n=this.getScrollStartOffset();this.scrollToOffset(e+n)}},scrollToBottom:function(){var t=this,e=this.getScrollSize();this.scrollToOffset(e),setTimeout((function(){var e=t.getClientSize(),n=t.getScrollSize();t.getOffset()+e+1<n&&t.scrollToBottom()}),5)},option:function(t,e){var n=this,o=this.options[t];this.options[t]=e,"uniqueKeys"===t&&this.sizes.forEach((function(t,o){e.includes(o)||n.sizes.delete(o)})),"scroller"===t&&(o&&l.utils.off(o,"scroll",this.onScroll),this.scrollEl=this.getScrollElement(e),this.addScrollEventListener())},updateRange:function(t){if(t)this.handleUpdate(t.start,t.end);else{var e=this.range.start;e=Math.max(e,0),this.handleUpdate(e,this.getEndByStart(e))}},onItemResized:function(t,e){this.sizes.set(t,e),this.calcType===b?(this.calcType=S,this.calcSize.fixed=e):this.isFixed()&&this.calcSize.fixed!==e&&(this.calcType=w,this.calcSize.fixed=void 0),this.calcType!==S&&(this.calcSize.total=i(this.sizes.values()).reduce((function(t,e){return t+e}),0),this.calcSize.average=Math.round(this.calcSize.total/this.sizes.size))},addScrollEventListener:function(){this.options.scroller&&l.utils.on(this.options.scroller,"scroll",this.onScroll)},removeScrollEventListener:function(){this.options.scroller&&l.utils.off(this.options.scroller,"scroll",this.onScroll)},enableScroll:function(t){var e=this.options.scroller,n=t?l.utils.off:l.utils.on,o="onwheel"in document.createElement("div")?"wheel":"mousewheel";n(e,"DOMMouseScroll",this.preventDefault),n(e,o,this.preventDefault),n(e,"touchmove",this.preventDefault),n(e,"keydown",this.preventDefaultForKeyDown)},preventDefault:function(t){t.preventDefault()},preventDefaultForKeyDown:function(t){if({37:1,38:1,39:1,40:1}[t.keyCode])return this.preventDefault(t),!1},updateOnScrollFunction:function(){var t,e,n=this,o=this.options,i=o.debounceTime,r=o.throttleTime;this.onScroll=i?(t=u((function(){return n.handleScroll()}),i),e=function(){t.cancel(),t.apply(this,arguments)},e.cancel=function(){t.cancel()},e):r?u((function(){return n.handleScroll()}),r):function(){return n.handleScroll()}},handleScroll:function(){var t=this.getOffset(),e=this.getClientSize(),n=this.getScrollSize();t===this.offset?this.scrollDir=T:this.scrollDir=t<this.offset?x:E,this.offset=t;var o=this.isFront()&&t<=0,i=this.isBehind()&&e+t>=n;this.options.onScroll({top:o,bottom:i,offset:t,direction:this.scrollDir}),this.isFront()?this.handleScrollFront():this.isBehind()&&this.handleScrollBehind()},handleScrollFront:function(){var t=this.getScrollItems();if(!(t>this.range.start)){var e=Math.max(t-this.options.buffer,0);this.checkIfUpdate(e,this.getEndByStart(e))}},handleScrollBehind:function(){var t=this.getScrollItems();t<this.range.start+this.options.buffer||this.checkIfUpdate(t,this.getEndByStart(t))},getScrollItems:function(){var t=this.offset-this.getScrollStartOffset();if(t<=0)return 0;if(this.isFixed())return Math.floor(t/this.calcSize.fixed);for(var e=0,n=this.options.uniqueKeys.length,o=0,i=0;e<=n;){if(o=e+Math.floor((n-e)/2),(i=this.getOffsetByIndex(o))===t)return o;i<t?e=o+1:i>t&&(n=o-1)}return e>0?--e:0},checkIfUpdate:function(t,e){var n=this.options.keeps;this.options.uniqueKeys.length<=n?(t=0,e=this.getLastIndex()):e-t<n-1&&(t=e-n+1),this.range.start!==t&&this.handleUpdate(t,e)},handleUpdate:function(t,e){this.range.start=t,this.range.end=e,this.range.front=this.getFrontOffset(),this.range.behind=this.getBehindOffset(),this.options.onUpdate(n({},this.range))},getFrontOffset:function(){return this.isFixed()?this.calcSize.fixed*this.range.start:this.getOffsetByIndex(this.range.start)},getBehindOffset:function(){var t=this.range.end,e=this.getLastIndex();return this.isFixed()?(e-t)*this.calcSize.fixed:(e-t)*this.getItemSize()},getOffsetByIndex:function(t){if(!t)return 0;for(var e=0,n=0;n<t;n++){var o=this.sizes.get(this.options.uniqueKeys[n]);e+="number"==typeof o?o:this.getItemSize()}return e},getEndByStart:function(t){return Math.min(t+this.options.keeps-1,this.getLastIndex())},getLastIndex:function(){var t=this.options,e=t.uniqueKeys,n=t.keeps;return e.length>0?e.length-1:n-1},getItemSize:function(){return this.isFixed()?this.calcSize.fixed:this.options.size||this.calcSize.average},getScrollElement:function(t){return t instanceof Document&&9===t.nodeType||t instanceof Window?document.scrollingElement||document.documentElement||document.body:t},getScrollStartOffset:function(){var t=0,e=this.options,n=e.wrapper,o=e.scroller,i=e.direction;if(n&&n){var r=o instanceof Window?l.utils.getRect(n):l.utils.getRect(n,!0,o);t=this.offset+r[I[i]]}return t}};var M=function(e,n,o){var i=null,r=function(){o("resize",n.value?n.value[e.sizeKey]:0,e.dataKey)};t.onMounted((function(){"undefined"!=typeof ResizeObserver&&(i=new ResizeObserver((function(){r()})),n.value&&i.observe(n.value))})),t.onUpdated((function(){r()})),t.onUnmounted((function(){i&&(i.disconnect(),i=null)}))},A=t.defineComponent({name:"VirtualDraglistItems",props:c,emits:["resize"],setup:function(e,n){var o=n.emit,i=n.slots,r=t.ref(null);return M(e,r,o),function(){var n=e.tag,o=e.dataKey;return t.h(n,{ref:r,key:o,"data-key":o,class:"virtual-dnd-list-item"},{default:function(){var t;return null===(t=i.default)||void 0===t?void 0:t.call(i)}})}}});return t.defineComponent({props:a,emits:["update:dataSource","update:modelValue","top","bottom","drag","drop","add","remove"],setup:function(e,n){var o,r,s=n.emit,a=n.slots,c=n.expose,d=t.ref({start:0,end:e.keeps-1,front:0,behind:0}),f=t.ref(null),p=t.ref(null),m=t.ref([]),b=t.computed((function(){return"vertical"!==e.direction})),S=t.computed((function(){return y.reduce((function(t,n){return t[n]=e[n],t}),{})})),w=t.computed((function(){return g.reduce((function(t,n){return t[n]=e[n],t}),{})})),x=[],E=0;function T(){return o.getOffset()}function O(){return o.getClientSize()}function D(){return o.getScrollSize()}function I(t){o.scrollToOffset(t)}function _(t){o.scrollToIndex(t)}c({getSize:function(t){return o.getSize(t)},getOffset:T,getClientSize:O,getScrollSize:D,scrollToTop:function(){I(0)},scrollToBottom:function(){o.scrollToBottom()},scrollToKey:function(t){var e=x.indexOf(t);e>-1&&o.scrollToIndex(e)},scrollToIndex:_,scrollToOffset:I}),t.watch((function(){return[e.dataSource,e.modelValue]}),(function(){z()}),{deep:!0}),t.watch(S,(function(t,e){if(o)for(var n in t)t[n]!=e[n]&&o.option(n,t[n])})),t.watch(w,(function(t,e){if(r)for(var n in t)t[n]!=e[n]&&r.option(n,t[n])})),t.onBeforeMount((function(){M(),z()})),t.onActivated((function(){o&&I(o.offset),o.addScrollEventListener()})),t.onDeactivated((function(){o.removeScrollEventListener()})),t.onMounted((function(){N(),o.option("wrapper",p.value),e.scroller||o.option("scroller",f.value)})),t.onUnmounted((function(){r&&r.destroy(),o.removeScrollEventListener()}));var z=function(){var n,o=(n=e.modelValue||e.dataSource,t.isRef(n)?n.value:n);if(o){var s=i(m.value);if(m.value=o,C(),B(s,o),null==r||r.option("list",o),E&&e.keepOffset){var l=o.length-E;l>0&&_(l),E=0}}},C=function(){x=m.value.map((function(t){return h(t,e.dataKey)})),o.option("uniqueKeys",x)},M=function(){o=new k({size:e.size,keeps:e.keeps,buffer:Math.round(e.keeps/3),scroller:e.scroller,direction:e.direction,uniqueKeys:x,debounceTime:e.debounceTime,throttleTime:e.throttleTime,onScroll:function(t){E=0,m.value.length&&t.top?R():t.bottom&&j()},onUpdate:function(t){l.dragged&&r&&t.start!==d.value.start&&(r.reRendered=!0),d.value=t}})},N=function(){r=new v(f.value,Object.assign(Object.assign({},w.value),{list:m.value,dataKey:e.dataKey,onDrag:function(t){e.sortable||o.enableScroll(!1),s("drag",t)},onAdd:function(t){s("add",t)},onRemove:function(t){s("remove",t)},onDrop:function(t){e.sortable||o.enableScroll(!0),t.changed&&(s("update:dataSource",t.list),s("update:modelValue",t.list)),s("drop",t)}}))},B=function(t,n){var i=Object.assign({},d.value);n.length>t.length&&i.end===t.length-1&&P()&&(i.end++,i.start=Math.max(0,i.end-e.keeps)),o.updateRange(i)},P=function(){return T()+O()+1>=D()},R=u((function(){s("top"),E=m.value.length}),50),j=u((function(){s("bottom")}),50),F=function(t,n){var i=o.sizes.size,r=Math.min(e.keeps,m.value.length);o.onItemResized(n,t),i===r-1&&B(m.value,m.value)},L=function(){for(var n=[],o=d.value,i=o.start,r=o.end,s=function(o){var i=m.value[o];if(i){var r=h(i,e.dataKey),s=Object.assign(Object.assign({},e.itemStyle),function(t){var e;return t==(null===(e=l.dragged)||void 0===e?void 0:e.dataset.key)?{display:"none"}:{}}(r));n.push(a.item?t.h(A,{key:r,tag:e.itemTag,class:e.itemClass,style:s,dataKey:r,sizeKey:"vertical"===e.direction?"offsetHeight":"offsetWidth",onResize:F},{default:function(){var t;return null===(t=a.item)||void 0===t?void 0:t.call(a,{record:i,index:o,dataKey:r})}}):null)}},c=i;c<=r;c++)s(c);return n};return function(){var n=d.value,o=n.front,i=n.behind,r=e.rootTag,s=e.wrapTag,l=e.scroller,c=e.wrapClass,u=e.wrapStyle,h=b.value?"0px ".concat(i,"px 0px ").concat(o,"px"):"".concat(o,"px 0px ").concat(i,"px");return t.h(r,{ref:f,style:!l&&{overflow:b.value?"auto hidden":"hidden auto"}},{default:function(){var e,n;return[null===(e=a.header)||void 0===e?void 0:e.call(a),t.h(s,{ref:p,class:c,style:Object.assign(Object.assign({},u),{padding:h})},{default:function(){return L()}}),null===(n=a.footer)||void 0===n?void 0:n.call(a)]}})}}})})); |
{ | ||
"name": "vue-virtual-draglist", | ||
"version": "3.2.2", | ||
"version": "3.2.3", | ||
"description": "A virtual scrolling list component that can be sorted by dragging, support vue3", | ||
@@ -43,3 +43,3 @@ "main": "dist/virtual-drag-list.min.js", | ||
"dependencies": { | ||
"sortable-dnd": "0.6.6" | ||
"sortable-dnd": "0.6.12" | ||
}, | ||
@@ -46,0 +46,0 @@ "devDependencies": { |
@@ -27,3 +27,3 @@ # vue-virtual-draglist | ||
<VirtualList | ||
v-model="items" | ||
v-model="list" | ||
:dataKey="'id'" | ||
@@ -37,2 +37,8 @@ :handle="'#drag'" | ||
</template> | ||
<template v-slot:header> | ||
<div class="header">header</div> | ||
</template> | ||
<template v-slot:footer> | ||
<div class="footer">footer</div> | ||
</template> | ||
</VirtualList> | ||
@@ -46,12 +52,12 @@ </div> | ||
const list = ref([{id: '1', text: 'abc'}, {id: '2', text: 'def'}]); | ||
const items = computed({ | ||
get() { | ||
return list.value; | ||
}, | ||
set(val) { | ||
// trigger when drag state changed if you use with `v-model:dataSource` | ||
list.value = val; | ||
console.log(val); | ||
} | ||
}) | ||
// const items = computed({ | ||
// get() { | ||
// return list.value; | ||
// }, | ||
// set(val) { | ||
// // trigger when drag state changed if you use with `v-model:dataSource` | ||
// list.value = val; | ||
// console.log(val); | ||
// } | ||
// }) | ||
</script> | ||
@@ -103,3 +109,4 @@ | ||
| -------- | -------- | ----------- | --------------- | | ||
| `draggable` | `String` | `-` | Specifies which items inside the element should be draggable. If does not set a value, the default list element can be dragged | | ||
| `sortable` | `Boolean` | `true` | Whether the current list can be sorted by dragging | | ||
| `draggable` | `String` | `.virtual-dnd-list-item` | Specifies which items inside the element should be draggable. If does not set a value, the default list element can be dragged | | ||
| `disabled` | `Boolean` | `false` | Disables the sortable if set to true | | ||
@@ -117,7 +124,7 @@ | `animation` | `Number` | `150` | Animation speed moving items when sorting | | ||
| `wrapStyle` | `Object` | `{}` | List wrapper element style | | ||
| `itemClass` | `String` | `''` | List item element class | | ||
| `itemClass` | `String` | `virtual-dnd-list-item` | List item element class | | ||
| `itemStyle` | `Object` | `{}` | List item element style | | ||
| `ghostClass` | `String` | `''` | The class of the mask element when dragging | | ||
| `ghostStyle` | `Object` | `{}` | The style of the mask element when dragging | | ||
| `chosenClass`| `String` | `''` | The class of the selected element when dragging | | ||
| `chosenClass`| `String` | `''` | Class name for the chosen item | | ||
@@ -124,0 +131,0 @@ ## Methods |
@@ -12,4 +12,9 @@ import * as vue from 'vue'; | ||
draggable: { | ||
type: StringConstructor[]; | ||
type: StringConstructor; | ||
default: string; | ||
}; | ||
sortable: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
handle: { | ||
@@ -136,4 +141,9 @@ type: (StringConstructor | FunctionConstructor)[]; | ||
draggable: { | ||
type: StringConstructor[]; | ||
type: StringConstructor; | ||
default: string; | ||
}; | ||
sortable: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
handle: { | ||
@@ -260,2 +270,4 @@ type: (StringConstructor | FunctionConstructor)[]; | ||
dataKey: string; | ||
draggable: string; | ||
sortable: boolean; | ||
lockAxis: "x" | "y"; | ||
@@ -262,0 +274,0 @@ direction: "vertical" | "horizontal"; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
125793
2364
139
+ Addedsortable-dnd@0.6.12(transitive)
- Removedsortable-dnd@0.6.6(transitive)
Updatedsortable-dnd@0.6.12