@danielgindi/selectbox 1.0.83 → 1.0.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib.cjs.js +17 -17
- package/dist/lib.cjs.js.map +1 -1
- package/dist/lib.cjs.min.js +2 -2
- package/dist/lib.cjs.min.js.map +1 -1
- package/dist/lib.es6.js +10 -10
- package/dist/lib.es6.js.map +1 -1
- package/dist/lib.es6.min.js +2 -2
- package/dist/lib.es6.min.js.map +1 -1
- package/dist/lib.umd.js +17 -17
- package/dist/lib.umd.js.map +1 -1
- package/dist/lib.umd.min.js +2 -2
- package/dist/lib.umd.min.js.map +1 -1
- package/lib/DropList.js +6 -6
- package/lib/SelectBox.js +3 -3
- package/package.json +1 -1
- package/vue/DropList.vue +10 -1
package/dist/lib.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @danielgindi/selectbox 1.0.
|
|
2
|
+
* @danielgindi/selectbox 1.0.85
|
|
3
3
|
* git://github.com/danielgindi/selectbox.git
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -6690,7 +6690,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
6690
6690
|
return this;
|
|
6691
6691
|
} }, { key: "triggerItemSelection", value:
|
|
6692
6692
|
|
|
6693
|
-
function triggerItemSelection(event) {var _item$ItemSymbol3;
|
|
6693
|
+
function triggerItemSelection(item, event) {var _item2, _item$ItemSymbol3;
|
|
6694
6694
|
var p = this._p;
|
|
6695
6695
|
|
|
6696
6696
|
p.focusItemEl = p.focusItemEl || Dom.closestUntil(event.target, 'li', p.el);
|
|
@@ -6698,7 +6698,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
6698
6698
|
if (p.focusItemIndex === undefined)
|
|
6699
6699
|
p.focusItemIndex = -1;
|
|
6700
6700
|
|
|
6701
|
-
|
|
6701
|
+
item = (_item2 = item) !== null && _item2 !== void 0 ? _item2 : p.focusItemEl[ItemSymbol$1];
|
|
6702
6702
|
if (item._nointeraction) {
|
|
6703
6703
|
return false;
|
|
6704
6704
|
}
|
|
@@ -6746,15 +6746,15 @@ var DropList = /*#__PURE__*/function () {
|
|
|
6746
6746
|
// Determine if the list is virtual or not
|
|
6747
6747
|
this._determineVirtualMode(items.length + itemsToAdd.length);
|
|
6748
6748
|
|
|
6749
|
-
for (var i = 0, count = itemsToAdd.length; i < count; i++) {var
|
|
6749
|
+
for (var i = 0, count = itemsToAdd.length; i < count; i++) {var _item3;
|
|
6750
6750
|
var oitem = itemsToAdd[i];
|
|
6751
6751
|
//noinspection PointlessBooleanExpressionJS
|
|
6752
|
-
var item = (
|
|
6753
|
-
ItemSymbol$1, oitem), _defineProperty(
|
|
6754
|
-
oitem[labelProp]), _defineProperty(
|
|
6755
|
-
oitem[valueProp]), _defineProperty(
|
|
6756
|
-
!!oitem._nocheck), _defineProperty(
|
|
6757
|
-
!!oitem._nointeraction),
|
|
6752
|
+
var item = (_item3 = {}, _defineProperty(_item3,
|
|
6753
|
+
ItemSymbol$1, oitem), _defineProperty(_item3, "label",
|
|
6754
|
+
oitem[labelProp]), _defineProperty(_item3, "value",
|
|
6755
|
+
oitem[valueProp]), _defineProperty(_item3, "_nocheck",
|
|
6756
|
+
!!oitem._nocheck), _defineProperty(_item3, "_nointeraction",
|
|
6757
|
+
!!oitem._nointeraction), _item3);
|
|
6758
6758
|
|
|
6759
6759
|
|
|
6760
6760
|
if (isMulti) {
|
|
@@ -7668,7 +7668,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
7668
7668
|
|
|
7669
7669
|
if (!this._mouseHandled) {
|
|
7670
7670
|
|
|
7671
|
-
this.triggerItemSelection(event);
|
|
7671
|
+
this.triggerItemSelection(null, event);
|
|
7672
7672
|
|
|
7673
7673
|
// If we are destroyed in response to a click/select, cease all actions
|
|
7674
7674
|
if (this[DestroyedSymbol$1])
|
|
@@ -7833,7 +7833,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
7833
7833
|
break;
|
|
7834
7834
|
|
|
7835
7835
|
case keycodeJs.VALUE_ENTER:
|
|
7836
|
-
this.triggerItemSelection(event);
|
|
7836
|
+
this.triggerItemSelection(null, event);
|
|
7837
7837
|
event.preventDefault();
|
|
7838
7838
|
break;
|
|
7839
7839
|
|
|
@@ -7915,7 +7915,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
7915
7915
|
this._focus(evt, next || null, matchIndex);
|
|
7916
7916
|
|
|
7917
7917
|
if (!this.isVisible()) {
|
|
7918
|
-
this.triggerItemSelection(evt);
|
|
7918
|
+
this.triggerItemSelection(null, evt);
|
|
7919
7919
|
}
|
|
7920
7920
|
|
|
7921
7921
|
// Record the last filter used
|
|
@@ -8109,7 +8109,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
8109
8109
|
this._focus(event, next || null, nextIndex);
|
|
8110
8110
|
|
|
8111
8111
|
if (!this.isVisible()) {
|
|
8112
|
-
this.triggerItemSelection(event);
|
|
8112
|
+
this.triggerItemSelection(item, event);
|
|
8113
8113
|
}
|
|
8114
8114
|
} }, { key: "_hasScroll", value:
|
|
8115
8115
|
|
|
@@ -11472,7 +11472,7 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
11472
11472
|
suppressEnterSpaceToggle = true;
|
|
11473
11473
|
if (p.multi)
|
|
11474
11474
|
dropList.toggleFocusedItem(evt);else
|
|
11475
|
-
dropList.triggerItemSelection(evt);
|
|
11475
|
+
dropList.triggerItemSelection(null, evt);
|
|
11476
11476
|
evt.preventDefault();
|
|
11477
11477
|
}
|
|
11478
11478
|
}
|
|
@@ -11482,14 +11482,14 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
11482
11482
|
if (dropList.isVisible() && dropList.hasFocusedItem()) {
|
|
11483
11483
|
suppressEnterSpaceToggle = true;
|
|
11484
11484
|
evt.preventDefault();
|
|
11485
|
-
dropList.triggerItemSelection(evt);
|
|
11485
|
+
dropList.triggerItemSelection(null, evt);
|
|
11486
11486
|
}
|
|
11487
11487
|
|
|
11488
11488
|
break;
|
|
11489
11489
|
|
|
11490
11490
|
case keycodeJs.VALUE_TAB:
|
|
11491
11491
|
if (dropList.isVisible() && dropList.hasFocusedItem()) {
|
|
11492
|
-
dropList.triggerItemSelection(evt);
|
|
11492
|
+
dropList.triggerItemSelection(null, evt);
|
|
11493
11493
|
}
|
|
11494
11494
|
break;
|
|
11495
11495
|
|