From afc342cc4aea768feee37286041f01af4e940931 Mon Sep 17 00:00:00 2001 From: desmaisons_david Date: Sat, 21 Jan 2017 22:05:55 -0200 Subject: [PATCH] Correcting build problem --- bower.json | 2 +- dist/vuedraggable.js | 2 +- dist/vuedraggable.min.js | 2 +- package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bower.json b/bower.json index 3168c349..761ba60a 100644 --- a/bower.json +++ b/bower.json @@ -25,6 +25,6 @@ ], "dependencies": { "vue": "^2.0.2", - "Sortable": "^1.4.2" + "Sortable": "^1.5.0-rc1" } } diff --git a/dist/vuedraggable.js b/dist/vuedraggable.js index 64085fd0..a95dae13 100644 --- a/dist/vuedraggable.js +++ b/dist/vuedraggable.js @@ -266,7 +266,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr return draggableComponent; } - if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) == "object") { + if (typeof exports == "object") { var Sortable = require("sortablejs"); module.exports = buildDraggable(Sortable); } else if (typeof define == "function" && define.amd) { diff --git a/dist/vuedraggable.min.js b/dist/vuedraggable.min.js index cc4d5fa0..9115ffbd 100644 --- a/dist/vuedraggable.min.js +++ b/dist/vuedraggable.min.js @@ -1 +1 @@ -"use strict";function _toConsumableArray(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);en-1?n:e[t]},onDragStart:function(t){this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),d=t.item},onDragAdd:function(t){var n=t.item._underlying_vm_;if(void 0!==n){e(t.item);var o=this.getVmIndex(t.newIndex);this.spliceList(o,0,n),this.computeIndexes();var i={element:n,newIndex:o};this.emitChanges({added:i})}},onDragRemove:function(t){n(this.rootContainer,t.item,t.oldIndex);var o=!!t.clone;if(o)return void e(t.clone);var i=this.context.index;this.spliceList(i,1);var r={element:this.context.element,oldIndex:i};this.emitChanges({removed:r})},onDragUpdate:function(t){e(t.item),n(t.from,t.item,t.oldIndex);var o=this.context.index,i=this.getVmIndex(t.newIndex);this.updatePosition(o,i);var r={element:this.context.element,oldIndex:o,newIndex:i};this.emitChanges({moved:r})},computeFutureIndex:function(t,e){if(!t.element)return 0;var n=[].concat(_toConsumableArray(e.to.children)),o=n.indexOf(e.related),i=t.component.getVmIndex(o),r=n.indexOf(d)!=-1;return r?i:i+1},onDragMove:function(t){var e=this.move;if(!e||!this.list)return!0;var n=this.getRelatedContextFromMoveEvent(t),o=this.context,i=this.computeFutureIndex(n,t);return Object.assign(o,{futureIndex:i}),Object.assign(t,{relatedContext:n,draggedContext:o}),e(t)},onDragEnd:function(t){this.computeIndexes(),d=null}}};return f}if("object"==("undefined"==typeof exports?"undefined":_typeof(exports))){var e=require("sortablejs");module.exports=t(e)}else if("function"==typeof define&&define.amd)define(["Sortable"],function(e){return t(e)});else if(window&&window.Vue&&window.Sortable){var n=t(window.Sortable);Vue.component("draggable",n)}}(); \ No newline at end of file +"use strict";function _toConsumableArray(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);en-1?n:e[t]},onDragStart:function(t){this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),d=t.item},onDragAdd:function(t){var n=t.item._underlying_vm_;if(void 0!==n){e(t.item);var o=this.getVmIndex(t.newIndex);this.spliceList(o,0,n),this.computeIndexes();var i={element:n,newIndex:o};this.emitChanges({added:i})}},onDragRemove:function(t){n(this.rootContainer,t.item,t.oldIndex);var o=!!t.clone;if(o)return void e(t.clone);var i=this.context.index;this.spliceList(i,1);var r={element:this.context.element,oldIndex:i};this.emitChanges({removed:r})},onDragUpdate:function(t){e(t.item),n(t.from,t.item,t.oldIndex);var o=this.context.index,i=this.getVmIndex(t.newIndex);this.updatePosition(o,i);var r={element:this.context.element,oldIndex:o,newIndex:i};this.emitChanges({moved:r})},computeFutureIndex:function(t,e){if(!t.element)return 0;var n=[].concat(_toConsumableArray(e.to.children)),o=n.indexOf(e.related),i=t.component.getVmIndex(o),r=n.indexOf(d)!=-1;return r?i:i+1},onDragMove:function(t){var e=this.move;if(!e||!this.list)return!0;var n=this.getRelatedContextFromMoveEvent(t),o=this.context,i=this.computeFutureIndex(n,t);return Object.assign(o,{futureIndex:i}),Object.assign(t,{relatedContext:n,draggedContext:o}),e(t)},onDragEnd:function(t){this.computeIndexes(),d=null}}};return f}if (typeof exports=="object"){var e=require("sortablejs");module.exports=t(e)}else if("function"==typeof define&&define.amd)define(["Sortable"],function(e){return t(e)});else if(window&&window.Vue&&window.Sortable){var n=t(window.Sortable);Vue.component("draggable",n)}}(); \ No newline at end of file diff --git a/package.json b/package.json index 560e4e4d..2433dda1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vuedraggable", - "version": "2.8.0-rc0", + "version": "2.8.1-rc0", "description": "draggable component for vue", "main": "dist/vuedraggable.js", "files": [