Skip to content

Commit

Permalink
v1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmalonenz committed Jan 5, 2017
1 parent a1e23d9 commit 53445e7
Show file tree
Hide file tree
Showing 16 changed files with 107 additions and 87 deletions.
6 changes: 3 additions & 3 deletions dist/amd/dragula.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ define(['exports', 'aurelia-dependency-injection', './touchy', './options', './u
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};

function _classCallCheck(instance, Constructor) {
Expand Down Expand Up @@ -157,8 +157,8 @@ define(['exports', 'aurelia-dependency-injection', './touchy', './options', './u
if (_util.Util.isInput(item)) {
item.focus();
} else {
e.preventDefault();
}
e.preventDefault();
}
};

Dragula.prototype._startBecauseMouseMoved = function _startBecauseMouseMoved(e) {
Expand Down
4 changes: 2 additions & 2 deletions dist/amd/emitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ define(['exports'], function (exports) {
}

var EventListener = function EventListener(func) {
var once = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
var once = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

_classCallCheck(this, EventListener);

Expand All @@ -28,7 +28,7 @@ define(['exports'], function (exports) {
}

Emitter.prototype.on = function on(type, fn) {
var once = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2];
var once = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

var newEvent = new EventListener(fn, once);
if (this.events[type] === undefined) {
Expand Down
6 changes: 3 additions & 3 deletions dist/commonjs/dragula.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
});
exports.Dragula = undefined;

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

Expand Down Expand Up @@ -129,8 +129,8 @@ var Dragula = exports.Dragula = function () {
if (_util.Util.isInput(item)) {
item.focus();
} else {
e.preventDefault();
}
e.preventDefault();
}
};

Dragula.prototype._startBecauseMouseMoved = function _startBecauseMouseMoved(e) {
Expand Down
4 changes: 2 additions & 2 deletions dist/commonjs/emitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var EventListener = function EventListener(func) {
var once = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
var once = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

_classCallCheck(this, EventListener);

Expand All @@ -23,7 +23,7 @@ var Emitter = exports.Emitter = function () {
}

Emitter.prototype.on = function on(type, fn) {
var once = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2];
var once = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

var newEvent = new EventListener(fn, once);
if (this.events[type] === undefined) {
Expand Down
4 changes: 2 additions & 2 deletions dist/es2015/dragula.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ export let Dragula = class Dragula {
if (Util.isInput(item)) {
item.focus();
} else {
e.preventDefault();
}
e.preventDefault();
}
}

_startBecauseMouseMoved(e) {
Expand Down
51 changes: 27 additions & 24 deletions dist/system/classes.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
'use strict';

System.register([], function (_export, _context) {
"use strict";

var cache, start, end;


Expand All @@ -14,36 +16,37 @@ System.register([], function (_export, _context) {
return cached;
}

function add(el, className) {
if (el.classList) {
el.classList.add(className);
return;
}
var current = el.className;
if (!current.length) {
el.className = className;
} else if (!lookupClass(className).test(current)) {
el.className += ' ' + className;
}
}

_export('add', add);

function rm(el, className) {
if (el.classList) {
el.classList.remove(className);
return;
}
el.className = el.className.replace(lookupClass(className), ' ').trim();
}

_export('rm', rm);

return {
setters: [],
execute: function () {
cache = {};
start = '(?:^|\\s)';
end = '(?:\\s|$)';
function add(el, className) {
if (el.classList) {
el.classList.add(className);
return;
}
var current = el.className;
if (!current.length) {
el.className = className;
} else if (!lookupClass(className).test(current)) {
el.className += ' ' + className;
}
}

_export('add', add);

function rm(el, className) {
if (el.classList) {
el.classList.remove(className);
return;
}
el.className = el.className.replace(lookupClass(className), ' ').trim();
}

_export('rm', rm);
}
};
});
2 changes: 2 additions & 0 deletions dist/system/dragula-and-drop.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
'use strict';

System.register(['aurelia-templating', 'aurelia-binding', 'aurelia-dependency-injection', './options', './dragula'], function (_export, _context) {
"use strict";

var customElement, bindable, inlineView, bindingMode, inject, Options, GLOBAL_OPTIONS, Dragula, _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _class, DragulaAndDrop;

function _classCallCheck(instance, Constructor) {
Expand Down
8 changes: 5 additions & 3 deletions dist/system/dragula.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
'use strict';

System.register(['aurelia-dependency-injection', './touchy', './options', './util', './emitter', './classes'], function (_export, _context) {
"use strict";

var inject, Container, touchy, GLOBAL_OPTIONS, Options, Util, Emitter, classes, _typeof, _createClass, MIN_TIME_BETWEEN_REDRAWS_MS, Dragula;

function _classCallCheck(instance, Constructor) {
Expand Down Expand Up @@ -29,7 +31,7 @@ System.register(['aurelia-dependency-injection', './touchy', './options', './uti
_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};

_createClass = function () {
Expand Down Expand Up @@ -152,8 +154,8 @@ System.register(['aurelia-dependency-injection', './touchy', './options', './uti
if (Util.isInput(item)) {
item.focus();
} else {
e.preventDefault();
}
e.preventDefault();
}
};

Dragula.prototype._startBecauseMouseMoved = function _startBecauseMouseMoved(e) {
Expand Down
6 changes: 4 additions & 2 deletions dist/system/emitter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
'use strict';

System.register([], function (_export, _context) {
"use strict";

var EventListener, Emitter;

function _classCallCheck(instance, Constructor) {
Expand All @@ -13,7 +15,7 @@ System.register([], function (_export, _context) {
setters: [],
execute: function () {
EventListener = function EventListener(func) {
var once = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
var once = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

_classCallCheck(this, EventListener);

Expand All @@ -29,7 +31,7 @@ System.register([], function (_export, _context) {
}

Emitter.prototype.on = function on(type, fn) {
var once = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2];
var once = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

var newEvent = new EventListener(fn, once);
if (this.events[type] === undefined) {
Expand Down
28 changes: 15 additions & 13 deletions dist/system/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
'use strict';

System.register(['./options', './dragula', './move-before'], function (_export, _context) {
"use strict";

var Options, GLOBAL_OPTIONS, DIRECTION, Dragula, moveBefore;
function configure(config, callback) {
var defaults = new Options();
config.container.registerInstance(GLOBAL_OPTIONS, defaults);

if (callback !== undefined && typeof callback === 'function') {
callback(defaults);
}

config.globalResources(['./dragula-and-drop']);
}

_export('configure', configure);

return {
setters: [function (_options) {
Options = _options.Options;
Expand All @@ -20,19 +35,6 @@ System.register(['./options', './dragula', './move-before'], function (_export,
_export('DIRECTION', DIRECTION);

_export('moveBefore', moveBefore);

function configure(config, callback) {
var defaults = new Options();
config.container.registerInstance(GLOBAL_OPTIONS, defaults);

if (callback !== undefined && typeof callback === 'function') {
callback(defaults);
}

config.globalResources(['./dragula-and-drop']);
}

_export('configure', configure);
}
};
});
18 changes: 10 additions & 8 deletions dist/system/move-before.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
"use strict";

System.register([], function (_export, _context) {
"use strict";

function moveBefore(array, itemMatcherFn, siblingMatcherFn) {
var removedItem = remove(array, itemMatcherFn);
var nextIndex = array.findIndex(siblingMatcherFn);
array.splice(nextIndex >= 0 ? nextIndex : array.length, 0, removedItem);
}

_export("moveBefore", moveBefore);

function remove(array, matcherFn) {
var index = array.findIndex(matcherFn);
Expand All @@ -10,13 +19,6 @@ System.register([], function (_export, _context) {
}
return {
setters: [],
execute: function () {
function moveBefore(array, itemMatcherFn, siblingMatcherFn) {
var removedItem = remove(array, itemMatcherFn);
var nextIndex = array.findIndex(siblingMatcherFn);
array.splice(nextIndex >= 0 ? nextIndex : array.length, 0, removedItem);
}
_export("moveBefore", moveBefore);
}
execute: function () {}
};
});
2 changes: 2 additions & 0 deletions dist/system/options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
'use strict';

System.register([], function (_export, _context) {
"use strict";

var GLOBAL_OPTIONS, DIRECTION, Options;

function _classCallCheck(instance, Constructor) {
Expand Down
27 changes: 15 additions & 12 deletions dist/system/touchy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
'use strict';

System.register([], function (_export, _context) {
"use strict";

var touch, pointers, microsoft;
function touchy(el, op, type, fn) {
if (window.navigator.pointerEnabled) {
el[op](pointers[type], fn);
} else if (window.navigator.msPointerEnabled) {
el[op](microsoft[type], fn);
} else {
el[op](touch[type], fn);
el[op](type, fn);
}
}

_export('touchy', touchy);

return {
setters: [],
execute: function () {
Expand All @@ -20,18 +35,6 @@ System.register([], function (_export, _context) {
mousedown: 'MSPointerDown',
mousemove: 'MSPointerMove'
};
function touchy(el, op, type, fn) {
if (window.navigator.pointerEnabled) {
el[op](pointers[type], fn);
} else if (window.navigator.msPointerEnabled) {
el[op](microsoft[type], fn);
} else {
el[op](touch[type], fn);
el[op](type, fn);
}
}

_export('touchy', touchy);
}
};
});
2 changes: 2 additions & 0 deletions dist/system/util.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
'use strict';

System.register([], function (_export, _context) {
"use strict";

var _Util, Util;

function _classCallCheck(instance, Constructor) {
Expand Down
10 changes: 5 additions & 5 deletions dist/temp/aurelia-dragula.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
});
exports.Util = exports.Options = exports.DIRECTION = exports.GLOBAL_OPTIONS = exports.Emitter = exports.Dragula = exports.DragulaAndDrop = undefined;

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

Expand Down Expand Up @@ -300,8 +300,8 @@ var Dragula = exports.Dragula = function () {
if (Util.isInput(item)) {
item.focus();
} else {
e.preventDefault();
}
e.preventDefault();
}
};

Dragula.prototype._startBecauseMouseMoved = function _startBecauseMouseMoved(e) {
Expand Down Expand Up @@ -695,7 +695,7 @@ var Dragula = exports.Dragula = function () {
}();

var EventListener = function EventListener(func) {
var once = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
var once = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

_classCallCheck(this, EventListener);

Expand All @@ -711,7 +711,7 @@ var Emitter = exports.Emitter = function () {
}

Emitter.prototype.on = function on(type, fn) {
var once = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2];
var once = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

var newEvent = new EventListener(fn, once);
if (this.events[type] === undefined) {
Expand Down
Loading

0 comments on commit 53445e7

Please sign in to comment.