Version 2.8.8

This commit is contained in:
Josh Johnson 2017-07-13 09:04:55 +01:00
parent 49c76da629
commit 147341b846
8 changed files with 252 additions and 257 deletions

View file

@ -1,4 +1,4 @@
/*! choices.js v2.8.7 | (c) 2017 Josh Johnson | https://github.com/jshjohnson/Choices#readme */ /*! choices.js v2.8.8 | (c) 2017 Josh Johnson | https://github.com/jshjohnson/Choices#readme */
(function webpackUniversalModuleDefinition(root, factory) { (function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object') if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(); module.exports = factory();
@ -742,9 +742,6 @@ return /******/ (function(modules) { // webpackBootstrap
var _this7 = this; var _this7 = this;
if (!value || !(0, _utils.isType)('String', value)) { if (!value || !(0, _utils.isType)('String', value)) {
if (!this.config.silent) {
console.error('removeItemsByValue: No value was passed to be removed');
}
return; return;
} }
@ -2361,9 +2358,6 @@ return /******/ (function(modules) { // webpackBootstrap
key: '_removeItem', key: '_removeItem',
value: function _removeItem(item) { value: function _removeItem(item) {
if (!item || !(0, _utils.isType)('Object', item)) { if (!item || !(0, _utils.isType)('Object', item)) {
if (!this.config.silent) {
console.error('removeItem: No item object was passed to be removed');
}
return; return;
} }
@ -3929,6 +3923,7 @@ return /******/ (function(modules) { // webpackBootstrap
*/ */
var ActionTypes = exports.ActionTypes = { var ActionTypes = exports.ActionTypes = {
INIT: '@@redux/INIT' INIT: '@@redux/INIT'
};
/** /**
* Creates a Redux store that holds the state tree. * Creates a Redux store that holds the state tree.
@ -3947,7 +3942,7 @@ return /******/ (function(modules) { // webpackBootstrap
* If you use `combineReducers` to produce the root reducer function, this must be * If you use `combineReducers` to produce the root reducer function, this must be
* an object with the same shape as `combineReducers` keys. * an object with the same shape as `combineReducers` keys.
* *
* @param {Function} [enhancer] The store enhancer. You may optionally specify it * @param {Function} enhancer The store enhancer. You may optionally specify it
* to enhance the store with third-party capabilities such as middleware, * to enhance the store with third-party capabilities such as middleware,
* time travel, persistence, etc. The only store enhancer that ships with Redux * time travel, persistence, etc. The only store enhancer that ships with Redux
* is `applyMiddleware()`. * is `applyMiddleware()`.
@ -3955,7 +3950,7 @@ return /******/ (function(modules) { // webpackBootstrap
* @returns {Store} A Redux store that lets you read the state, dispatch actions * @returns {Store} A Redux store that lets you read the state, dispatch actions
* and subscribe to changes. * and subscribe to changes.
*/ */
};function createStore(reducer, preloadedState, enhancer) { function createStore(reducer, preloadedState, enhancer) {
var _ref2; var _ref2;
if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
@ -4089,8 +4084,7 @@ return /******/ (function(modules) { // webpackBootstrap
var listeners = currentListeners = nextListeners; var listeners = currentListeners = nextListeners;
for (var i = 0; i < listeners.length; i++) { for (var i = 0; i < listeners.length; i++) {
var listener = listeners[i]; listeners[i]();
listener();
} }
return action; return action;
@ -4119,7 +4113,7 @@ return /******/ (function(modules) { // webpackBootstrap
* Interoperability point for observable/reactive libraries. * Interoperability point for observable/reactive libraries.
* @returns {observable} A minimal observable of state changes. * @returns {observable} A minimal observable of state changes.
* For more information, see the observable proposal: * For more information, see the observable proposal:
* https://github.com/tc39/proposal-observable * https://github.com/zenparsing/es-observable
*/ */
function observable() { function observable() {
var _ref; var _ref;
@ -4566,7 +4560,7 @@ return /******/ (function(modules) { // webpackBootstrap
var actionType = action && action.type; var actionType = action && action.type;
var actionName = actionType && '"' + actionType.toString() + '"' || 'an action'; var actionName = actionType && '"' + actionType.toString() + '"' || 'an action';
return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.'; return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state.';
} }
function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
@ -4594,18 +4588,18 @@ return /******/ (function(modules) { // webpackBootstrap
} }
} }
function assertReducerShape(reducers) { function assertReducerSanity(reducers) {
Object.keys(reducers).forEach(function (key) { Object.keys(reducers).forEach(function (key) {
var reducer = reducers[key]; var reducer = reducers[key];
var initialState = reducer(undefined, { type: _createStore.ActionTypes.INIT }); var initialState = reducer(undefined, { type: _createStore.ActionTypes.INIT });
if (typeof initialState === 'undefined') { if (typeof initialState === 'undefined') {
throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.'); throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined.');
} }
var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.'); var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');
if (typeof reducer(undefined, { type: type }) === 'undefined') { if (typeof reducer(undefined, { type: type }) === 'undefined') {
throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + _createStore.ActionTypes.INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.'); throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + _createStore.ActionTypes.INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined.');
} }
}); });
} }
@ -4644,24 +4638,23 @@ return /******/ (function(modules) { // webpackBootstrap
} }
var finalReducerKeys = Object.keys(finalReducers); var finalReducerKeys = Object.keys(finalReducers);
var unexpectedKeyCache = void 0;
if (false) { if (false) {
unexpectedKeyCache = {}; var unexpectedKeyCache = {};
} }
var shapeAssertionError = void 0; var sanityError;
try { try {
assertReducerShape(finalReducers); assertReducerSanity(finalReducers);
} catch (e) { } catch (e) {
shapeAssertionError = e; sanityError = e;
} }
return function combination() { return function combination() {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var action = arguments[1]; var action = arguments[1];
if (shapeAssertionError) { if (sanityError) {
throw shapeAssertionError; throw sanityError;
} }
if (false) { if (false) {
@ -4673,16 +4666,16 @@ return /******/ (function(modules) { // webpackBootstrap
var hasChanged = false; var hasChanged = false;
var nextState = {}; var nextState = {};
for (var _i = 0; _i < finalReducerKeys.length; _i++) { for (var i = 0; i < finalReducerKeys.length; i++) {
var _key = finalReducerKeys[_i]; var key = finalReducerKeys[i];
var reducer = finalReducers[_key]; var reducer = finalReducers[key];
var previousStateForKey = state[_key]; var previousStateForKey = state[key];
var nextStateForKey = reducer(previousStateForKey, action); var nextStateForKey = reducer(previousStateForKey, action);
if (typeof nextStateForKey === 'undefined') { if (typeof nextStateForKey === 'undefined') {
var errorMessage = getUndefinedStateErrorMessage(_key, action); var errorMessage = getUndefinedStateErrorMessage(key, action);
throw new Error(errorMessage); throw new Error(errorMessage);
} }
nextState[_key] = nextStateForKey; nextState[key] = nextStateForKey;
hasChanged = hasChanged || nextStateForKey !== previousStateForKey; hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
} }
return hasChanged ? nextState : state; return hasChanged ? nextState : state;
@ -4872,11 +4865,13 @@ return /******/ (function(modules) { // webpackBootstrap
return funcs[0]; return funcs[0];
} }
return funcs.reduce(function (a, b) { var last = funcs[funcs.length - 1];
var rest = funcs.slice(0, -1);
return function () { return function () {
return a(b.apply(undefined, arguments)); return rest.reduceRight(function (composed, f) {
return f(composed);
}, last.apply(undefined, arguments));
}; };
});
} }
/***/ }), /***/ }),

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
{ {
"name": "choices.js", "name": "choices.js",
"version": "2.8.7", "version": "2.8.8",
"description": "A vanilla JS customisable text input/select box plugin", "description": "A vanilla JS customisable text input/select box plugin",
"main": [ "main": [
"./assets/scripts/dist/choices.js", "./assets/scripts/dist/choices.js",

View file

@ -15,7 +15,7 @@
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
<!-- Ignore these --> <!-- Ignore these -->
<link rel="stylesheet" href="assets/styles/css/base.min.css?version=2.8.7"> <link rel="stylesheet" href="assets/styles/css/base.min.css?version=2.8.8">
<!-- End ignore these --> <!-- End ignore these -->
<!-- Optional includes --> <!-- Optional includes -->
@ -23,8 +23,8 @@
<!-- End optional includes --> <!-- End optional includes -->
<!-- Choices includes --> <!-- Choices includes -->
<link rel="stylesheet" href="assets/styles/css/choices.min.css?version=2.8.7"> <link rel="stylesheet" href="assets/styles/css/choices.min.css?version=2.8.8">
<script src="assets/scripts/dist/choices.min.js?version=2.8.7"></script> <script src="assets/scripts/dist/choices.min.js?version=2.8.8"></script>
<!-- End Choices includes --> <!-- End Choices includes -->
<!--[if lt IE 9]> <!--[if lt IE 9]>

View file

@ -1,6 +1,6 @@
{ {
"name": "choices.js", "name": "choices.js",
"version": "2.8.7", "version": "2.8.8",
"description": "A vanilla JS customisable text input/select box plugin", "description": "A vanilla JS customisable text input/select box plugin",
"main": "./assets/scripts/dist/choices.min.js", "main": "./assets/scripts/dist/choices.min.js",
"scripts": { "scripts": {

View file

@ -1,4 +1,4 @@
// Example usage: npm --newVersion=2.8.7 run version // Example usage: npm --newVersion=2.8.8 run version
const fs = require('fs'); const fs = require('fs');
const path = require('path'); const path = require('path');

View file

@ -1,8 +1,8 @@
var path = require('path'); var path = require('path');
var package = require('./package.json'); var pkg = require('./package.json');
var webpack = require('webpack'); var webpack = require('webpack');
var wrapperPlugin = require('wrapper-webpack-plugin'); var wrapperPlugin = require('wrapper-webpack-plugin');
var banner = `/*! ${ package.name } v${ package.version } | (c) ${ new Date().getFullYear() } ${ package.author } | ${ package.homepage } */ \n`; var banner = `/*! ${ pkg.name } v${ pkg.version } | (c) ${ new Date().getFullYear() } ${ pkg.author } | ${ pkg.homepage } */ \n`;
var minimize = process.argv.indexOf('--minimize') !== -1; var minimize = process.argv.indexOf('--minimize') !== -1;
var config = { var config = {