Skip to content

Commit

Permalink
v3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickkunka committed Jun 24, 2017
1 parent a2fdba2 commit f76dcc6
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 203 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Change Log
==========

## 3.2.0
- Removes support for legacy `$().mixItUp()` jQuery API
- Fixes issue with Dataset API causing DOM exception when dealing with certain combinations of simultaneous insertion and sorting.

## 3.1.12
- Fixes issue where `state.targets` does not reflect the updated sort order after a sort operation.
- Addition of `behavior.liveSort` configuration option.
Expand Down
10 changes: 5 additions & 5 deletions demos/mixitup.min.js

Large diffs are not rendered by default.

73 changes: 6 additions & 67 deletions dist/mixitup.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**!
* MixItUp v3.1.12
* MixItUp v3.2.0
* A high-performance, dependency-free library for animated filtering, sorting and more
* Build 99123294-5817-4da9-b352-e17eb8780170
* Build e8e67fcb-2ded-4918-8ade-151850d2c36e
*
* @copyright Copyright 2014-2017 KunkaLabs Limited.
* @author KunkaLabs Limited.
Expand All @@ -18,8 +18,7 @@
'use strict';

var mixitup = null,
h = null,
jq = null;
h = null;

(function() {
var VENDORS = ['webkit', 'moz', 'o', 'ms'],
Expand Down Expand Up @@ -408,17 +407,6 @@
*
* var mixer = mixitup('.container');
*
* @example <caption>Example 2: Activating the legacy jQuery API</caption>
*
* import mixitup from 'mixitup';
* import $ from 'jquery';
*
* mixitup.use($);
*
* // MixItUp can now be used as a jQuery plugin, as per the v2 API
*
* $('.container').mixitup();
*
* @public
* @name use
* @memberof mixitup
Expand Down Expand Up @@ -447,56 +435,11 @@
// jQuery

mixitup.libraries.$ = extension;

// Register MixItUp as a jQuery plugin to allow v2 API

mixitup.registerJqPlugin(extension);
}

mixitup.Base.prototype.callActions.call(mixitup, 'afterUse', arguments);
};

/**
* @private
* @static
* @since 3.0.0
* @param {jQuery} $
* @return {void}
*/

mixitup.registerJqPlugin = function($) {
$.fn.mixItUp = function() {
var method = arguments[0],
config = arguments[1],
args = Array.prototype.slice.call(arguments, 1),
outputs = [],
chain = [];

chain = this.each(function() {
var instance = null,
output = null;

if (method && typeof method === 'string') {
// jQuery-UI method syntax

instance = mixitup.instances[this.id];

output = instance[method].apply(instance, args);

if (typeof output !== 'undefined' && output !== null && typeof output.then !== 'function') outputs.push(output);
} else {
mixitup(this, config);
}
});

if (outputs.length) {
return outputs.length > 1 ? outputs : outputs[0];
} else {
return chain;
}
};
};

mixitup.instances = {};
mixitup.extensions = {};
mixitup.libraries = {};
Expand Down Expand Up @@ -7836,7 +7779,7 @@
frag.appendChild(self.dom.document.createTextNode(' '));
}

self.insertDatasetFrag(frag, nextEl, self.dom.targets.length, insertedTargets);
self.insertDatasetFrag(frag, nextEl, self.targets.length, insertedTargets);
}

for (i = 0; data = operation.startDataset[i]; i++) {
Expand Down Expand Up @@ -10626,14 +10569,10 @@
return mixitup;
});
} else if (typeof window.mixitup === 'undefined' || typeof window.mixitup !== 'function') {
window.mixitup = window.mixItUp = mixitup;
}

if ((jq = window.$ || window.jQuery) && jq.fn.jquery) {
mixitup.registerJqPlugin(jq);
window.mixitup = mixitup;
}
mixitup.BaseStatic.call(mixitup.constructor);

mixitup.NAME = 'mixitup';
mixitup.CORE_VERSION = '3.1.12';
mixitup.CORE_VERSION = '3.2.0';
})(window);
10 changes: 5 additions & 5 deletions dist/mixitup.min.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mixitup",
"title": "MixItUp",
"version": "3.1.12",
"version": "3.2.0",
"description": "A high-performance, dependency-free library for animated filtering, sorting and more",
"author": "KunkaLabs Limited",
"homepage": "https://www.kunkalabs.com/mixitup/",
Expand All @@ -28,7 +28,6 @@
"gulp-rename": "^1.2.2",
"gulp-uglify": "~1.5.1",
"istanbul": "^0.4.5",
"jquery": "^3.1.1",
"jsdom": "9.4.2",
"jsdom-global": "2.0.0",
"jshint-stylish": "~1.0.0",
Expand Down
56 changes: 0 additions & 56 deletions src/factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,6 @@ mixitup = function(container, config, foreignDoc) {
*
* var mixer = mixitup('.container');
*
* @example <caption>Example 2: Activating the legacy jQuery API</caption>
*
* import mixitup from 'mixitup';
* import $ from 'jquery';
*
* mixitup.use($);
*
* // MixItUp can now be used as a jQuery plugin, as per the v2 API
*
* $('.container').mixitup();
*
* @public
* @name use
* @memberof mixitup
Expand Down Expand Up @@ -188,56 +177,11 @@ mixitup.use = function(extension) {
// jQuery

mixitup.libraries.$ = extension;

// Register MixItUp as a jQuery plugin to allow v2 API

mixitup.registerJqPlugin(extension);
}

mixitup.Base.prototype.callActions.call(mixitup, 'afterUse', arguments);
};

/**
* @private
* @static
* @since 3.0.0
* @param {jQuery} $
* @return {void}
*/

mixitup.registerJqPlugin = function($) {
$.fn.mixItUp = function() {
var method = arguments[0],
config = arguments[1],
args = Array.prototype.slice.call(arguments, 1),
outputs = [],
chain = [];

chain = this.each(function() {
var instance = null,
output = null;

if (method && typeof method === 'string') {
// jQuery-UI method syntax

instance = mixitup.instances[this.id];

output = instance[method].apply(instance, args);

if (typeof output !== 'undefined' && output !== null && typeof output.then !== 'function') outputs.push(output);
} else {
mixitup(this, config);
}
});

if (outputs.length) {
return outputs.length > 1 ? outputs : outputs[0];
} else {
return chain;
}
};
};

mixitup.instances = {};
mixitup.extensions = {};
mixitup.libraries = {};
2 changes: 1 addition & 1 deletion src/mixer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2851,7 +2851,7 @@ h.extend(mixitup.Mixer.prototype,
frag.appendChild(self.dom.document.createTextNode(' '));
}

self.insertDatasetFrag(frag, nextEl, self.dom.targets.length, insertedTargets);
self.insertDatasetFrag(frag, nextEl, self.targets.length, insertedTargets);
}

for (i = 0; data = operation.startDataset[i]; i++) {
Expand Down
8 changes: 2 additions & 6 deletions src/module-definitions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global module, mixitup, define, jq:true */
/* global module, mixitup, define */

if (typeof exports === 'object' && typeof module === 'object') {
module.exports = mixitup;
Expand All @@ -7,9 +7,5 @@ if (typeof exports === 'object' && typeof module === 'object') {
return mixitup;
});
} else if (typeof window.mixitup === 'undefined' || typeof window.mixitup !== 'function') {
window.mixitup = window.mixItUp = mixitup;
}

if ((jq = window.$ || window.jQuery) && jq.fn.jquery) {
mixitup.registerJqPlugin(jq);
window.mixitup = mixitup;
}
3 changes: 1 addition & 2 deletions src/wrapper.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
'use strict';

var mixitup = null,
h = null,
jq = null;
h = null;

{{>polyfills}}

Expand Down
58 changes: 0 additions & 58 deletions tests/unit/jquery.js

This file was deleted.

1 change: 0 additions & 1 deletion tests/unit/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ require('./controls-live');
require('./queue');
require('./extension');
require('./callbacks');
require('./jquery');
require('./h');

0 comments on commit f76dcc6

Please sign in to comment.