diff --git a/src/scripts/dist/choices.js b/src/scripts/dist/choices.js index 1d37d58..3c62bba 100644 --- a/src/scripts/dist/choices.js +++ b/src/scripts/dist/choices.js @@ -1,4 +1,4 @@ -/*! choices.js v3.0.2 | (c) 2017 Josh Johnson | https://github.com/jshjohnson/Choices#readme */ +/*! choices.js v3.0.2 | (c) 2018 Josh Johnson | https://github.com/jshjohnson/Choices#readme */ (function webpackUniversalModuleDefinition(root, factory) { //CommonJS2 if(typeof exports === 'object' && typeof module === 'object') @@ -12,7 +12,7 @@ //Window else root["Choices"] = factory(); -})(this, function() { +})(typeof self !== 'undefined' ? self : this, function() { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; @@ -75,7 +75,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ __webpack_require__.p = "/src/scripts/dist/"; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 5); +/******/ return __webpack_require__(__webpack_require__.s = 6); /******/ }) /************************************************************************/ /******/ ([ @@ -683,6 +683,23 @@ var regexFilter = exports.regexFilter = function regexFilter(value, regex) { return expression.test(value); }; +var getWindowHeight = exports.getWindowHeight = function getWindowHeight() { + var body = document.body; + var html = document.documentElement; + return Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight); +}; + +var reduceToValues = exports.reduceToValues = function reduceToValues(items) { + var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'value'; + + var values = items.reduce(function (prev, current) { + prev.push(current[key]); + return prev; + }, []); + + return values; +}; + /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { @@ -723,6 +740,8 @@ var DEFAULT_CLASSNAMES = exports.DEFAULT_CLASSNAMES = { }; var DEFAULT_CONFIG = exports.DEFAULT_CONFIG = { + items: [], + choices: [], silent: false, renderChoiceLimit: -1, maxItemCount: -1, @@ -753,13 +772,16 @@ var DEFAULT_CONFIG = exports.DEFAULT_CONFIG = { noResultsText: 'No results found', noChoicesText: 'No choices to choose from', itemSelectText: 'Press to select', + uniqueItemText: 'Only unique values can be added.', addItemText: function addItemText(value) { return 'Press Enter to add "' + value + '"'; }, maxItemText: function maxItemText(maxItemCount) { return 'Only ' + maxItemCount + ' values can be added.'; }, - uniqueItemText: 'Only unique values can be added.', + itemComparer: function itemComparer(choice, item) { + return choice === item; + }, fuseOptions: { includeScore: true }, @@ -812,7 +834,7 @@ var SCROLLING_SPEED = exports.SCROLLING_SPEED = 4; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/lodash-es/_freeGlobal.js -var _freeGlobal = __webpack_require__(9); +var _freeGlobal = __webpack_require__(10); // CONCATENATED MODULE: ./node_modules/lodash-es/_root.js @@ -1056,7 +1078,7 @@ function isPlainObject(value) { /* harmony default export */ var lodash_es_isPlainObject = (isPlainObject); // EXTERNAL MODULE: ./node_modules/symbol-observable/index.js -var symbol_observable = __webpack_require__(10); +var symbol_observable = __webpack_require__(11); var symbol_observable_default = /*#__PURE__*/__webpack_require__.n(symbol_observable); // CONCATENATED MODULE: ./node_modules/redux/es/createStore.js @@ -1620,27 +1642,27 @@ if (false) { /* 3 */ /***/ (function(module, exports) { -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1,eval)("this"); -} catch(e) { - // This works if the window reference is available - if(typeof window === "object") - g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || Function("return this")() || (1,eval)("this"); +} catch(e) { + // This works if the window reference is available + if(typeof window === "object") + g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; /***/ }), @@ -1752,13 +1774,124 @@ exports.default = WrappedElement; /* 5 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(6); +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.TEMPLATES = undefined; + +var _classnames = __webpack_require__(25); + +var _classnames2 = _interopRequireDefault(_classnames); + +var _utils = __webpack_require__(0); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var TEMPLATES = exports.TEMPLATES = { + containerOuter: function containerOuter(globalClasses, direction, isSelectElement, isSelectOneElement, searchEnabled, passedElementType) { + var tabIndex = isSelectOneElement ? 'tabindex="0"' : ''; + var role = isSelectElement ? 'role="listbox"' : ''; + var ariaAutoComplete = ''; + + if (isSelectElement && searchEnabled) { + role = 'role="combobox"'; + ariaAutoComplete = 'aria-autocomplete="list"'; + } + + return (0, _utils.strToEl)('\n