Version 2.7.7

This commit is contained in:
Josh Johnson 2017-03-28 14:42:35 +01:00
parent 7efd189c7d
commit 7255fa42ce
6 changed files with 39 additions and 28 deletions

View file

@ -1,4 +1,4 @@
/*! choices.js v2.7.6 | (c) 2017 Josh Johnson | https://github.com/jshjohnson/Choices#readme */
/*! choices.js v2.7.7 | (c) 2017 Josh Johnson | https://github.com/jshjohnson/Choices#readme */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
@ -754,6 +754,7 @@ return /******/ (function(modules) { // webpackBootstrap
this.containerOuter.classList.add(this.config.classNames.openState);
this.containerOuter.setAttribute('aria-expanded', 'true');
this.dropdown.classList.add(this.config.classNames.activeState);
this.dropdown.setAttribute('aria-expanded', 'true');
var dimensions = this.dropdown.getBoundingClientRect();
var dropdownPos = Math.ceil(dimensions.top + window.scrollY + dimensions.height);
@ -799,6 +800,7 @@ return /******/ (function(modules) { // webpackBootstrap
this.containerOuter.classList.remove(this.config.classNames.openState);
this.containerOuter.setAttribute('aria-expanded', 'false');
this.dropdown.classList.remove(this.config.classNames.activeState);
this.dropdown.setAttribute('aria-expanded', 'false');
if (isFlipped) {
this.containerOuter.classList.remove(this.config.classNames.flippedState);
@ -1204,6 +1206,10 @@ return /******/ (function(modules) { // webpackBootstrap
var choice = this.store.getChoiceById(id);
var hasActiveDropdown = this.dropdown.classList.contains(this.config.classNames.activeState);
(0, _utils.triggerEvent)(this.passedElement, 'choice', {
choice: choice
});
if (choice && !choice.selected && !choice.disabled) {
var canAddItem = this._canAddItem(activeItems, choice.value);
@ -1809,13 +1815,15 @@ return /******/ (function(modules) { // webpackBootstrap
value: function _onMouseDown(e) {
var target = e.target;
if (this.containerOuter.contains(target) && target !== this.input) {
var foundTarget = void 0;
var activeItems = this.store.getItemsFilteredByActive();
var hasShiftKey = e.shiftKey;
var foundTarget = void 0;
if (foundTarget = (0, _utils.findAncestorByAttr)(target, 'data-item')) {
if (foundTarget = (0, _utils.findAncestorByAttrName)(target, 'data-button')) {
this._handleButtonAction(activeItems, foundTarget);
} else if (foundTarget = (0, _utils.findAncestorByAttrName)(target, 'data-item')) {
this._handleItemAction(activeItems, foundTarget, hasShiftKey);
} else if (foundTarget = (0, _utils.findAncestorByAttr)(target, 'data-choice')) {
} else if (foundTarget = (0, _utils.findAncestorByAttrName)(target, 'data-choice')) {
this._handleChoiceAction(activeItems, foundTarget);
}
@ -2671,7 +2679,10 @@ return /******/ (function(modules) { // webpackBootstrap
* @param {!Object<string, *>} options
*/
function Fuse (list, options) {
var i
var len
var key
var keys
this.list = list
this.options = options = options || {}
@ -2690,7 +2701,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
}
Fuse.VERSION = '2.6.2'
Fuse.VERSION = '2.6.0'
/**
* Sets a new list for Fuse to match against.
@ -5294,7 +5305,7 @@ return /******/ (function(modules) { // webpackBootstrap
* @param {string} attr Attribute name of parent
* @return {?NodeElement} Found parent element or null
*/
var findAncestorByAttr = exports.findAncestorByAttr = function findAncestorByAttr(el, attr) {
var findAncestorByAttrName = exports.findAncestorByAttrName = function findAncestorByAttrName(el, attr) {
var target = el;
while (target) {

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",
"version": "2.7.6",
"version": "2.7.7",
"description": "A vanilla JS customisable text input/select box plugin",
"main": [
"./assets/scripts/dist/choices.js",

View file

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

View file

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