Skip to content

Commit

Permalink
Recompile dist with newer dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-brown committed Nov 27, 2015
1 parent af97cc9 commit d504700
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 102 deletions.
156 changes: 81 additions & 75 deletions dist/js/select2.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
var S2;(function () { if (!S2 || !S2.requirejs) {
if (!S2) { S2 = {}; } else { require = S2; }
/**
* @license almond 0.2.9 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
* @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/almond for details
*/
Expand Down Expand Up @@ -75,12 +75,6 @@ var requirejs, require, define;
//otherwise, assume it is a top-level require that will
//be relative to baseUrl in the end.
if (baseName) {
//Convert baseName to array, and lop off the last part,
//so that . matches that "directory" and not name of the baseName's
//module. For instance, baseName of "one/two/three", maps to
//"one/two/three.js", but we want the directory, "one/two" for
//this normalization.
baseParts = baseParts.slice(0, baseParts.length - 1);
name = name.split('/');
lastIndex = name.length - 1;

Expand All @@ -89,7 +83,11 @@ var requirejs, require, define;
name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
}

name = baseParts.concat(name);
//Lop off the last part of baseParts, so that . matches the
//"directory" and not name of the baseName's module. For instance,
//baseName of "one/two/three", maps to "one/two/three.js", but we
//want the directory, "one/two" for this normalization.
name = baseParts.slice(0, baseParts.length - 1).concat(name);

//start trimDots
for (i = 0; i < name.length; i += 1) {
Expand Down Expand Up @@ -181,7 +179,15 @@ var requirejs, require, define;
//A version of a require function that passes a moduleName
//value for items that may need to
//look up paths relative to the moduleName
return req.apply(undef, aps.call(arguments, 0).concat([relName, forceSync]));
var args = aps.call(arguments, 0);

//If first arg is not require('string'), and there is only
//one arg, it is the array form without a callback. Insert
//a null so that the following concat is correct.
if (typeof args[0] !== 'string' && args.length === 1) {
args.push(null);
}
return req.apply(undef, args.concat([relName, forceSync]));
};
}

Expand Down Expand Up @@ -431,6 +437,9 @@ var requirejs, require, define;
requirejs._defined = defined;

define = function (name, deps, callback) {
if (typeof name !== 'string') {
throw new Error('See almond README: incorrect module build, no module name');
}

//This module may not have dependencies
if (!deps.splice) {
Expand Down Expand Up @@ -5951,80 +5960,18 @@ S2.define('select2/selection/stopPropagation',[
return StopPropagation;
});

S2.define('jquery.select2',[
'jquery',
'require',

'./select2/core',
'./select2/defaults'
], function ($, require, Select2, Defaults) {
// Force jQuery.mousewheel to be loaded if it hasn't already
require('jquery.mousewheel');

if ($.fn.select2 == null) {
// All methods that should return the element
var thisMethods = ['open', 'close', 'destroy'];

$.fn.select2 = function (options) {
options = options || {};

if (typeof options === 'object') {
this.each(function () {
var instanceOptions = $.extend({}, options, true);

var instance = new Select2($(this), instanceOptions);
});

return this;
} else if (typeof options === 'string') {
var ret;

this.each(function () {
var instance = $(this).data('select2');

if (instance == null && window.console && console.error) {
console.error(
'The select2(\'' + options + '\') method was called on an ' +
'element that is not using Select2.'
);
}

var args = Array.prototype.slice.call(arguments, 1);

ret = instance[options].apply(instance, args);
});

// Check if we should be returning `this`
if ($.inArray(options, thisMethods) > -1) {
return this;
}

return ret;
} else {
throw new Error('Invalid arguments for Select2: ' + options);
}
};
}

if ($.fn.select2.defaults == null) {
$.fn.select2.defaults = Defaults;
}

return Select2;
});

/*!
* jQuery Mousewheel 3.1.12
* jQuery Mousewheel 3.1.13
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*/

(function (factory) {
if ( typeof S2.define === 'function' && S2.define.amd ) {
// AMD. Register as an anonymous module.
S2.define('jquery.mousewheel',['jquery'], factory);
S2.define('jquery-mousewheel',['jquery'], factory);
} else if (typeof exports === 'object') {
// Node/CommonJS style for Browserify
module.exports = factory;
Expand Down Expand Up @@ -6235,6 +6182,65 @@ S2.define('jquery.select2',[

}));

S2.define('jquery.select2',[
'jquery',
'jquery-mousewheel',

'./select2/core',
'./select2/defaults'
], function ($, _, Select2, Defaults) {
if ($.fn.select2 == null) {
// All methods that should return the element
var thisMethods = ['open', 'close', 'destroy'];

$.fn.select2 = function (options) {
options = options || {};

if (typeof options === 'object') {
this.each(function () {
var instanceOptions = $.extend(true, {}, options);

var instance = new Select2($(this), instanceOptions);
});

return this;
} else if (typeof options === 'string') {
var ret;

this.each(function () {
var instance = $(this).data('select2');

if (instance == null && window.console && console.error) {
console.error(
'The select2(\'' + options + '\') method was called on an ' +
'element that is not using Select2.'
);
}

var args = Array.prototype.slice.call(arguments, 1);

ret = instance[options].apply(instance, args);
});

// Check if we should be returning `this`
if ($.inArray(options, thisMethods) > -1) {
return this;
}

return ret;
} else {
throw new Error('Invalid arguments for Select2: ' + options);
}
};
}

if ($.fn.select2.defaults == null) {
$.fn.select2.defaults = Defaults;
}

return Select2;
});

// Return the AMD loader configuration so it can be used outside of this file
return {
define: S2.define,
Expand Down
6 changes: 3 additions & 3 deletions dist/js/select2.full.min.js

Large diffs are not rendered by default.

50 changes: 28 additions & 22 deletions dist/js/select2.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
var S2;(function () { if (!S2 || !S2.requirejs) {
if (!S2) { S2 = {}; } else { require = S2; }
/**
* @license almond 0.2.9 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
* @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/almond for details
*/
Expand Down Expand Up @@ -75,12 +75,6 @@ var requirejs, require, define;
//otherwise, assume it is a top-level require that will
//be relative to baseUrl in the end.
if (baseName) {
//Convert baseName to array, and lop off the last part,
//so that . matches that "directory" and not name of the baseName's
//module. For instance, baseName of "one/two/three", maps to
//"one/two/three.js", but we want the directory, "one/two" for
//this normalization.
baseParts = baseParts.slice(0, baseParts.length - 1);
name = name.split('/');
lastIndex = name.length - 1;

Expand All @@ -89,7 +83,11 @@ var requirejs, require, define;
name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
}

name = baseParts.concat(name);
//Lop off the last part of baseParts, so that . matches the
//"directory" and not name of the baseName's module. For instance,
//baseName of "one/two/three", maps to "one/two/three.js", but we
//want the directory, "one/two" for this normalization.
name = baseParts.slice(0, baseParts.length - 1).concat(name);

//start trimDots
for (i = 0; i < name.length; i += 1) {
Expand Down Expand Up @@ -181,7 +179,15 @@ var requirejs, require, define;
//A version of a require function that passes a moduleName
//value for items that may need to
//look up paths relative to the moduleName
return req.apply(undef, aps.call(arguments, 0).concat([relName, forceSync]));
var args = aps.call(arguments, 0);

//If first arg is not require('string'), and there is only
//one arg, it is the array form without a callback. Insert
//a null so that the following concat is correct.
if (typeof args[0] !== 'string' && args.length === 1) {
args.push(null);
}
return req.apply(undef, args.concat([relName, forceSync]));
};
}

Expand Down Expand Up @@ -431,6 +437,9 @@ var requirejs, require, define;
requirejs._defined = defined;

define = function (name, deps, callback) {
if (typeof name !== 'string') {
throw new Error('See almond README: incorrect module build, no module name');
}

//This module may not have dependencies
if (!deps.splice) {
Expand Down Expand Up @@ -5455,16 +5464,20 @@ S2.define('select2/core',[
return Select2;
});

S2.define('jquery-mousewheel',[
'jquery'
], function ($) {
// Used to shim jQuery.mousewheel for non-full builds.
return $;
});

S2.define('jquery.select2',[
'jquery',
'require',
'jquery-mousewheel',

'./select2/core',
'./select2/defaults'
], function ($, require, Select2, Defaults) {
// Force jQuery.mousewheel to be loaded if it hasn't already
require('jquery.mousewheel');

], function ($, _, Select2, Defaults) {
if ($.fn.select2 == null) {
// All methods that should return the element
var thisMethods = ['open', 'close', 'destroy'];
Expand All @@ -5474,7 +5487,7 @@ S2.define('jquery.select2',[

if (typeof options === 'object') {
this.each(function () {
var instanceOptions = $.extend({}, options, true);
var instanceOptions = $.extend(true, {}, options);

var instance = new Select2($(this), instanceOptions);
});
Expand Down Expand Up @@ -5517,13 +5530,6 @@ S2.define('jquery.select2',[
return Select2;
});

S2.define('jquery.mousewheel',[
'jquery'
], function ($) {
// Used to shim jQuery.mousewheel for non-full builds.
return $;
});

// Return the AMD loader configuration so it can be used outside of this file
return {
define: S2.define,
Expand Down
4 changes: 2 additions & 2 deletions dist/js/select2.min.js

Large diffs are not rendered by default.

0 comments on commit d504700

Please sign in to comment.