mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-15 20:25:18 +02:00
Version 2.7.7
This commit is contained in:
parent
7efd189c7d
commit
7255fa42ce
23
assets/scripts/dist/choices.js
vendored
23
assets/scripts/dist/choices.js
vendored
|
@ -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) {
|
||||
|
|
2
assets/scripts/dist/choices.js.map
vendored
2
assets/scripts/dist/choices.js.map
vendored
File diff suppressed because one or more lines are too long
6
assets/scripts/dist/choices.min.js
vendored
6
assets/scripts/dist/choices.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -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",
|
||||
|
|
|
@ -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]>
|
||||
|
|
|
@ -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": {
|
||||
|
|
Loading…
Reference in a new issue