From 9f1f5232c1a02c57a7005ece365cd72310f4adcb Mon Sep 17 00:00:00 2001 From: Michael Malone Date: Wed, 27 Apr 2016 19:35:29 +1200 Subject: [PATCH] v1.1.0 --- dist/amd/dragula-and-drop.js | 3 ++- dist/amd/dragula.js | 2 +- dist/amd/util.js | 12 ------------ dist/aurelia-dragula.js | 17 +++-------------- dist/commonjs/dragula-and-drop.js | 3 ++- dist/commonjs/dragula.js | 2 +- dist/commonjs/util.js | 12 ------------ dist/es2015/dragula-and-drop.js | 3 ++- dist/es2015/dragula.js | 2 +- dist/es2015/util.js | 12 ------------ dist/system/dragula-and-drop.js | 3 ++- dist/system/dragula.js | 2 +- dist/system/util.js | 12 ------------ dist/temp/aurelia-dragula.js | 17 +++-------------- package.json | 2 +- 15 files changed, 19 insertions(+), 85 deletions(-) diff --git a/dist/amd/dragula-and-drop.js b/dist/amd/dragula-and-drop.js index ace8db4..00efefe 100644 --- a/dist/amd/dragula-and-drop.js +++ b/dist/amd/dragula-and-drop.js @@ -106,6 +106,7 @@ define(['exports', 'aurelia-templating', 'aurelia-binding', 'aurelia-dependency- ignoreInputTextSelection: this._convertToBooleanIfRequired(this._getOption('ignoreInputTextSelection')), mirrorContainer: this._getOption('mirrorContainer') }; + return result; }; @@ -123,7 +124,7 @@ define(['exports', 'aurelia-templating', 'aurelia-binding', 'aurelia-dependency- if (typeof option === 'string') { return option.toLowerCase() === 'true'; } - return new Boolean(option); + return new Boolean(option).valueOf(); }; return DragulaAndDrop; diff --git a/dist/amd/dragula.js b/dist/amd/dragula.js index ba3b8a8..df6b706 100644 --- a/dist/amd/dragula.js +++ b/dist/amd/dragula.js @@ -493,7 +493,7 @@ define(['exports', 'aurelia-dependency-injection', './touchy', './options', './u if (this._mirror) { classes.rm(this.options.mirrorContainer, 'gu-unselectable'); (0, _touchy.touchy)(document.documentElement, 'removeEventListener', 'mousemove', this.boundDrag); - _util.Util.remove(this._mirror); + _util.Util.getParent(this._mirror).removeChild(this._mirror); this._mirror = null; } }; diff --git a/dist/amd/util.js b/dist/amd/util.js index 1dd4a07..1d268f0 100644 --- a/dist/amd/util.js +++ b/dist/amd/util.js @@ -135,18 +135,6 @@ define(['exports'], function (exports) { return immediate; }; - _Util.prototype.remove = function remove(node) { - if (node) { - if (!('remove' in Element.prototype)) { - if (node.parentNode) { - node.parentNode.removeChild(node); - } - } else { - node.remove(); - } - } - }; - _Util.prototype.getViewModel = function getViewModel(element) { if (element && element.au) { if (element.au.controller.viewModel.currentViewModel) return element.au.controller.viewModel.currentViewModel;else return element.au.controller.viewModel; diff --git a/dist/aurelia-dragula.js b/dist/aurelia-dragula.js index e05a582..aea7cb0 100644 --- a/dist/aurelia-dragula.js +++ b/dist/aurelia-dragula.js @@ -154,6 +154,7 @@ export class DragulaAndDrop { ignoreInputTextSelection: this._convertToBooleanIfRequired(this._getOption('ignoreInputTextSelection')), mirrorContainer: this._getOption('mirrorContainer') }; + return result; } @@ -171,7 +172,7 @@ export class DragulaAndDrop { if (typeof option === 'string') { return option.toLowerCase() === 'true'; } - return new Boolean(option); + return new Boolean(option).valueOf(); } } @@ -613,7 +614,7 @@ export class Dragula { if (this._mirror) { classes.rm(this.options.mirrorContainer, 'gu-unselectable'); touchy(document.documentElement, 'removeEventListener', 'mousemove', this.boundDrag); - Util.remove(this._mirror); + Util.getParent(this._mirror).removeChild(this._mirror); this._mirror = null; } } @@ -901,18 +902,6 @@ class _Util { return immediate; } - remove(node) { - if (node) { - if (!('remove' in Element.prototype)) { - if (node.parentNode) { - node.parentNode.removeChild(node); - } - } else { - node.remove(); - } - } - } - getViewModel(element) { if (element && element.au) { if (element.au.controller.viewModel.currentViewModel) diff --git a/dist/commonjs/dragula-and-drop.js b/dist/commonjs/dragula-and-drop.js index 88b631a..c0a09f5 100644 --- a/dist/commonjs/dragula-and-drop.js +++ b/dist/commonjs/dragula-and-drop.js @@ -111,6 +111,7 @@ var DragulaAndDrop = exports.DragulaAndDrop = (_dec = (0, _aureliaTemplating.bin ignoreInputTextSelection: this._convertToBooleanIfRequired(this._getOption('ignoreInputTextSelection')), mirrorContainer: this._getOption('mirrorContainer') }; + return result; }; @@ -128,7 +129,7 @@ var DragulaAndDrop = exports.DragulaAndDrop = (_dec = (0, _aureliaTemplating.bin if (typeof option === 'string') { return option.toLowerCase() === 'true'; } - return new Boolean(option); + return new Boolean(option).valueOf(); }; return DragulaAndDrop; diff --git a/dist/commonjs/dragula.js b/dist/commonjs/dragula.js index 7b80d5b..4047ffb 100644 --- a/dist/commonjs/dragula.js +++ b/dist/commonjs/dragula.js @@ -465,7 +465,7 @@ var Dragula = exports.Dragula = function () { if (this._mirror) { classes.rm(this.options.mirrorContainer, 'gu-unselectable'); (0, _touchy.touchy)(document.documentElement, 'removeEventListener', 'mousemove', this.boundDrag); - _util.Util.remove(this._mirror); + _util.Util.getParent(this._mirror).removeChild(this._mirror); this._mirror = null; } }; diff --git a/dist/commonjs/util.js b/dist/commonjs/util.js index db10287..491606c 100644 --- a/dist/commonjs/util.js +++ b/dist/commonjs/util.js @@ -130,18 +130,6 @@ var _Util = function () { return immediate; }; - _Util.prototype.remove = function remove(node) { - if (node) { - if (!('remove' in Element.prototype)) { - if (node.parentNode) { - node.parentNode.removeChild(node); - } - } else { - node.remove(); - } - } - }; - _Util.prototype.getViewModel = function getViewModel(element) { if (element && element.au) { if (element.au.controller.viewModel.currentViewModel) return element.au.controller.viewModel.currentViewModel;else return element.au.controller.viewModel; diff --git a/dist/es2015/dragula-and-drop.js b/dist/es2015/dragula-and-drop.js index 2b8f3bb..89a7bf8 100644 --- a/dist/es2015/dragula-and-drop.js +++ b/dist/es2015/dragula-and-drop.js @@ -96,6 +96,7 @@ export let DragulaAndDrop = (_dec = bindable({ name: 'moves', defaultBindingMode ignoreInputTextSelection: this._convertToBooleanIfRequired(this._getOption('ignoreInputTextSelection')), mirrorContainer: this._getOption('mirrorContainer') }; + return result; } @@ -113,6 +114,6 @@ export let DragulaAndDrop = (_dec = bindable({ name: 'moves', defaultBindingMode if (typeof option === 'string') { return option.toLowerCase() === 'true'; } - return new Boolean(option); + return new Boolean(option).valueOf(); } }) || _class) || _class) || _class) || _class) || _class) || _class) || _class) || _class) || _class) || _class) || _class) || _class) || _class) || _class) || _class) || _class) || _class) || _class) || _class) || _class); \ No newline at end of file diff --git a/dist/es2015/dragula.js b/dist/es2015/dragula.js index 7163ccf..2cb4f1f 100644 --- a/dist/es2015/dragula.js +++ b/dist/es2015/dragula.js @@ -446,7 +446,7 @@ export let Dragula = class Dragula { if (this._mirror) { classes.rm(this.options.mirrorContainer, 'gu-unselectable'); touchy(document.documentElement, 'removeEventListener', 'mousemove', this.boundDrag); - Util.remove(this._mirror); + Util.getParent(this._mirror).removeChild(this._mirror); this._mirror = null; } } diff --git a/dist/es2015/util.js b/dist/es2015/util.js index e36e31f..d2a04d8 100644 --- a/dist/es2015/util.js +++ b/dist/es2015/util.js @@ -114,18 +114,6 @@ let _Util = class _Util { return immediate; } - remove(node) { - if (node) { - if (!('remove' in Element.prototype)) { - if (node.parentNode) { - node.parentNode.removeChild(node); - } - } else { - node.remove(); - } - } - } - getViewModel(element) { if (element && element.au) { if (element.au.controller.viewModel.currentViewModel) return element.au.controller.viewModel.currentViewModel;else return element.au.controller.viewModel; diff --git a/dist/system/dragula-and-drop.js b/dist/system/dragula-and-drop.js index 4301485..4fe00db 100644 --- a/dist/system/dragula-and-drop.js +++ b/dist/system/dragula-and-drop.js @@ -117,6 +117,7 @@ System.register(['aurelia-templating', 'aurelia-binding', 'aurelia-dependency-in ignoreInputTextSelection: this._convertToBooleanIfRequired(this._getOption('ignoreInputTextSelection')), mirrorContainer: this._getOption('mirrorContainer') }; + return result; }; @@ -134,7 +135,7 @@ System.register(['aurelia-templating', 'aurelia-binding', 'aurelia-dependency-in if (typeof option === 'string') { return option.toLowerCase() === 'true'; } - return new Boolean(option); + return new Boolean(option).valueOf(); }; return DragulaAndDrop; diff --git a/dist/system/dragula.js b/dist/system/dragula.js index aaaabd8..8146ac9 100644 --- a/dist/system/dragula.js +++ b/dist/system/dragula.js @@ -488,7 +488,7 @@ System.register(['aurelia-dependency-injection', './touchy', './options', './uti if (this._mirror) { classes.rm(this.options.mirrorContainer, 'gu-unselectable'); touchy(document.documentElement, 'removeEventListener', 'mousemove', this.boundDrag); - Util.remove(this._mirror); + Util.getParent(this._mirror).removeChild(this._mirror); this._mirror = null; } }; diff --git a/dist/system/util.js b/dist/system/util.js index c81ca54..00ca80d 100644 --- a/dist/system/util.js +++ b/dist/system/util.js @@ -136,18 +136,6 @@ System.register([], function (_export, _context) { return immediate; }; - _Util.prototype.remove = function remove(node) { - if (node) { - if (!('remove' in Element.prototype)) { - if (node.parentNode) { - node.parentNode.removeChild(node); - } - } else { - node.remove(); - } - } - }; - _Util.prototype.getViewModel = function getViewModel(element) { if (element && element.au) { if (element.au.controller.viewModel.currentViewModel) return element.au.controller.viewModel.currentViewModel;else return element.au.controller.viewModel; diff --git a/dist/temp/aurelia-dragula.js b/dist/temp/aurelia-dragula.js index 3f4f6da..6cbbafc 100644 --- a/dist/temp/aurelia-dragula.js +++ b/dist/temp/aurelia-dragula.js @@ -157,6 +157,7 @@ var DragulaAndDrop = exports.DragulaAndDrop = (_dec = (0, _aureliaTemplating.bin ignoreInputTextSelection: this._convertToBooleanIfRequired(this._getOption('ignoreInputTextSelection')), mirrorContainer: this._getOption('mirrorContainer') }; + return result; }; @@ -174,7 +175,7 @@ var DragulaAndDrop = exports.DragulaAndDrop = (_dec = (0, _aureliaTemplating.bin if (typeof option === 'string') { return option.toLowerCase() === 'true'; } - return new Boolean(option); + return new Boolean(option).valueOf(); }; return DragulaAndDrop; @@ -619,7 +620,7 @@ var Dragula = exports.Dragula = function () { if (this._mirror) { classes.rm(this.options.mirrorContainer, 'gu-unselectable'); touchy(document.documentElement, 'removeEventListener', 'mousemove', this.boundDrag); - Util.remove(this._mirror); + Util.getParent(this._mirror).removeChild(this._mirror); this._mirror = null; } }; @@ -955,18 +956,6 @@ var _Util = function () { return immediate; }; - _Util.prototype.remove = function remove(node) { - if (node) { - if (!('remove' in Element.prototype)) { - if (node.parentNode) { - node.parentNode.removeChild(node); - } - } else { - node.remove(); - } - } - }; - _Util.prototype.getViewModel = function getViewModel(element) { if (element && element.au) { if (element.au.controller.viewModel.currentViewModel) return element.au.controller.viewModel.currentViewModel;else return element.au.controller.viewModel; diff --git a/package.json b/package.json index d441c51..1f3f8e0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-dragula", - "version": "1.0.7", + "version": "1.1.0", "description": "An aurelia compatible version of Dragula", "keywords": [ "aurelia",