@danielgindi/selectbox 1.0.39 → 1.0.43
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 +208 -180
- 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 +75 -47
- 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 +208 -180
- 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 +64 -42
- package/lib/SelectBox.js +10 -4
- package/package.json +4 -1
- package/vue/utils/slots.js +3 -3
package/dist/lib.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @danielgindi/selectbox 1.0.
|
|
2
|
+
* @danielgindi/selectbox 1.0.43
|
|
3
3
|
* git://github.com/danielgindi/selectbox.git
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -4344,56 +4344,21 @@ $$c({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$3 }, {
|
|
|
4344
4344
|
}
|
|
4345
4345
|
});
|
|
4346
4346
|
|
|
4347
|
-
var
|
|
4347
|
+
var es_array_map = {};
|
|
4348
4348
|
|
|
4349
4349
|
'use strict';
|
|
4350
4350
|
var $$b = _export;
|
|
4351
|
-
var
|
|
4352
|
-
var isArray = isArray$4;
|
|
4353
|
-
var isConstructor = isConstructor$3;
|
|
4354
|
-
var isObject$4 = isObject$e;
|
|
4355
|
-
var toAbsoluteIndex = toAbsoluteIndex$3;
|
|
4356
|
-
var lengthOfArrayLike$2 = lengthOfArrayLike$8;
|
|
4357
|
-
var toIndexedObject$1 = toIndexedObject$a;
|
|
4358
|
-
var createProperty = createProperty$4;
|
|
4359
|
-
var wellKnownSymbol$6 = wellKnownSymbol$n;
|
|
4351
|
+
var $map = arrayIteration.map;
|
|
4360
4352
|
var arrayMethodHasSpeciesSupport$2 = arrayMethodHasSpeciesSupport$5;
|
|
4361
|
-
var un$Slice = arraySlice$3;
|
|
4362
|
-
|
|
4363
|
-
var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport$2('slice');
|
|
4364
4353
|
|
|
4365
|
-
var
|
|
4366
|
-
var Array$1 = global$a.Array;
|
|
4367
|
-
var max$1 = Math.max;
|
|
4354
|
+
var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport$2('map');
|
|
4368
4355
|
|
|
4369
|
-
// `Array.prototype.
|
|
4370
|
-
// https://tc39.es/ecma262/#sec-array.prototype.
|
|
4371
|
-
//
|
|
4356
|
+
// `Array.prototype.map` method
|
|
4357
|
+
// https://tc39.es/ecma262/#sec-array.prototype.map
|
|
4358
|
+
// with adding support of @@species
|
|
4372
4359
|
$$b({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 }, {
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
var length = lengthOfArrayLike$2(O);
|
|
4376
|
-
var k = toAbsoluteIndex(start, length);
|
|
4377
|
-
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
|
4378
|
-
// inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
|
|
4379
|
-
var Constructor, result, n;
|
|
4380
|
-
if (isArray(O)) {
|
|
4381
|
-
Constructor = O.constructor;
|
|
4382
|
-
// cross-realm fallback
|
|
4383
|
-
if (isConstructor(Constructor) && (Constructor === Array$1 || isArray(Constructor.prototype))) {
|
|
4384
|
-
Constructor = undefined;
|
|
4385
|
-
} else if (isObject$4(Constructor)) {
|
|
4386
|
-
Constructor = Constructor[SPECIES$2];
|
|
4387
|
-
if (Constructor === null) Constructor = undefined;
|
|
4388
|
-
}
|
|
4389
|
-
if (Constructor === Array$1 || Constructor === undefined) {
|
|
4390
|
-
return un$Slice(O, k, fin);
|
|
4391
|
-
}
|
|
4392
|
-
}
|
|
4393
|
-
result = new (Constructor === undefined ? Array$1 : Constructor)(max$1(fin - k, 0));
|
|
4394
|
-
for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
|
|
4395
|
-
result.length = n;
|
|
4396
|
-
return result;
|
|
4360
|
+
map: function map(callbackfn /* , thisArg */) {
|
|
4361
|
+
return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
4397
4362
|
}
|
|
4398
4363
|
});
|
|
4399
4364
|
|
|
@@ -4441,11 +4406,11 @@ $$a({ target: 'String', proto: true, forced: forcedStringHTMLMethod('anchor') },
|
|
|
4441
4406
|
|
|
4442
4407
|
var es_array_find = {};
|
|
4443
4408
|
|
|
4444
|
-
var wellKnownSymbol$
|
|
4409
|
+
var wellKnownSymbol$6 = wellKnownSymbol$n;
|
|
4445
4410
|
var create$2 = objectCreate;
|
|
4446
4411
|
var definePropertyModule$1 = objectDefineProperty;
|
|
4447
4412
|
|
|
4448
|
-
var UNSCOPABLES = wellKnownSymbol$
|
|
4413
|
+
var UNSCOPABLES = wellKnownSymbol$6('unscopables');
|
|
4449
4414
|
var ArrayPrototype = Array.prototype;
|
|
4450
4415
|
|
|
4451
4416
|
// Array.prototype[@@unscopables]
|
|
@@ -4487,7 +4452,7 @@ addToUnscopables$2(FIND);
|
|
|
4487
4452
|
var es_regexp_constructor = {};
|
|
4488
4453
|
|
|
4489
4454
|
var isCallable$3 = isCallable$l;
|
|
4490
|
-
var isObject$
|
|
4455
|
+
var isObject$4 = isObject$e;
|
|
4491
4456
|
var setPrototypeOf = objectSetPrototypeOf;
|
|
4492
4457
|
|
|
4493
4458
|
// makes subclassing work correct for wrapped built-ins
|
|
@@ -4499,7 +4464,7 @@ var inheritIfRequired$2 = function ($this, dummy, Wrapper) {
|
|
|
4499
4464
|
// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
|
|
4500
4465
|
isCallable$3(NewTarget = dummy.constructor) &&
|
|
4501
4466
|
NewTarget !== Wrapper &&
|
|
4502
|
-
isObject$
|
|
4467
|
+
isObject$4(NewTargetPrototype = NewTarget.prototype) &&
|
|
4503
4468
|
NewTargetPrototype !== Wrapper.prototype
|
|
4504
4469
|
) setPrototypeOf($this, NewTargetPrototype);
|
|
4505
4470
|
return $this;
|
|
@@ -4525,10 +4490,10 @@ var regexpFlags$1 = function () {
|
|
|
4525
4490
|
var regexpStickyHelpers = {};
|
|
4526
4491
|
|
|
4527
4492
|
var fails$d = fails$r;
|
|
4528
|
-
var global$
|
|
4493
|
+
var global$a = global$I;
|
|
4529
4494
|
|
|
4530
4495
|
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
4531
|
-
var $RegExp$2 = global$
|
|
4496
|
+
var $RegExp$2 = global$a.RegExp;
|
|
4532
4497
|
|
|
4533
4498
|
var UNSUPPORTED_Y$2 = regexpStickyHelpers.UNSUPPORTED_Y = fails$d(function () {
|
|
4534
4499
|
var re = $RegExp$2('a', 'y');
|
|
@@ -4546,17 +4511,17 @@ var BROKEN_CARET = regexpStickyHelpers.BROKEN_CARET = fails$d(function () {
|
|
|
4546
4511
|
'use strict';
|
|
4547
4512
|
var getBuiltIn = getBuiltIn$7;
|
|
4548
4513
|
var definePropertyModule = objectDefineProperty;
|
|
4549
|
-
var wellKnownSymbol$
|
|
4514
|
+
var wellKnownSymbol$5 = wellKnownSymbol$n;
|
|
4550
4515
|
var DESCRIPTORS$3 = descriptors;
|
|
4551
4516
|
|
|
4552
|
-
var SPECIES$
|
|
4517
|
+
var SPECIES$2 = wellKnownSymbol$5('species');
|
|
4553
4518
|
|
|
4554
4519
|
var setSpecies$2 = function (CONSTRUCTOR_NAME) {
|
|
4555
4520
|
var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
|
|
4556
4521
|
var defineProperty = definePropertyModule.f;
|
|
4557
4522
|
|
|
4558
|
-
if (DESCRIPTORS$3 && Constructor && !Constructor[SPECIES$
|
|
4559
|
-
defineProperty(Constructor, SPECIES$
|
|
4523
|
+
if (DESCRIPTORS$3 && Constructor && !Constructor[SPECIES$2]) {
|
|
4524
|
+
defineProperty(Constructor, SPECIES$2, {
|
|
4560
4525
|
configurable: true,
|
|
4561
4526
|
get: function () { return this; }
|
|
4562
4527
|
});
|
|
@@ -4564,10 +4529,10 @@ var setSpecies$2 = function (CONSTRUCTOR_NAME) {
|
|
|
4564
4529
|
};
|
|
4565
4530
|
|
|
4566
4531
|
var fails$c = fails$r;
|
|
4567
|
-
var global$
|
|
4532
|
+
var global$9 = global$I;
|
|
4568
4533
|
|
|
4569
4534
|
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
4570
|
-
var $RegExp$1 = global$
|
|
4535
|
+
var $RegExp$1 = global$9.RegExp;
|
|
4571
4536
|
|
|
4572
4537
|
var regexpUnsupportedDotAll = fails$c(function () {
|
|
4573
4538
|
var re = $RegExp$1('.', 's');
|
|
@@ -4575,10 +4540,10 @@ var regexpUnsupportedDotAll = fails$c(function () {
|
|
|
4575
4540
|
});
|
|
4576
4541
|
|
|
4577
4542
|
var fails$b = fails$r;
|
|
4578
|
-
var global$
|
|
4543
|
+
var global$8 = global$I;
|
|
4579
4544
|
|
|
4580
4545
|
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
4581
|
-
var $RegExp = global$
|
|
4546
|
+
var $RegExp = global$8.RegExp;
|
|
4582
4547
|
|
|
4583
4548
|
var regexpUnsupportedNcg = fails$b(function () {
|
|
4584
4549
|
var re = $RegExp('(?<a>b)', 'g');
|
|
@@ -4587,7 +4552,7 @@ var regexpUnsupportedNcg = fails$b(function () {
|
|
|
4587
4552
|
});
|
|
4588
4553
|
|
|
4589
4554
|
var DESCRIPTORS$2 = descriptors;
|
|
4590
|
-
var global$
|
|
4555
|
+
var global$7 = global$I;
|
|
4591
4556
|
var uncurryThis$a = functionUncurryThis;
|
|
4592
4557
|
var isForced$1 = isForced_1;
|
|
4593
4558
|
var inheritIfRequired$1 = inheritIfRequired$2;
|
|
@@ -4604,14 +4569,14 @@ var fails$a = fails$r;
|
|
|
4604
4569
|
var hasOwn$1 = hasOwnProperty_1;
|
|
4605
4570
|
var enforceInternalState = internalState.enforce;
|
|
4606
4571
|
var setSpecies$1 = setSpecies$2;
|
|
4607
|
-
var wellKnownSymbol$
|
|
4572
|
+
var wellKnownSymbol$4 = wellKnownSymbol$n;
|
|
4608
4573
|
var UNSUPPORTED_DOT_ALL$1 = regexpUnsupportedDotAll;
|
|
4609
4574
|
var UNSUPPORTED_NCG$1 = regexpUnsupportedNcg;
|
|
4610
4575
|
|
|
4611
|
-
var MATCH = wellKnownSymbol$
|
|
4612
|
-
var NativeRegExp = global$
|
|
4576
|
+
var MATCH = wellKnownSymbol$4('match');
|
|
4577
|
+
var NativeRegExp = global$7.RegExp;
|
|
4613
4578
|
var RegExpPrototype$2 = NativeRegExp.prototype;
|
|
4614
|
-
var SyntaxError = global$
|
|
4579
|
+
var SyntaxError = global$7.SyntaxError;
|
|
4615
4580
|
var getFlags$1 = uncurryThis$a(regExpFlags$1);
|
|
4616
4581
|
var exec$1 = uncurryThis$a(RegExpPrototype$2.exec);
|
|
4617
4582
|
var charAt$3 = uncurryThis$a(''.charAt);
|
|
@@ -4779,7 +4744,7 @@ if (isForced$1('RegExp', BASE_FORCED)) {
|
|
|
4779
4744
|
|
|
4780
4745
|
RegExpPrototype$2.constructor = RegExpWrapper;
|
|
4781
4746
|
RegExpWrapper.prototype = RegExpPrototype$2;
|
|
4782
|
-
redefine$4(global$
|
|
4747
|
+
redefine$4(global$7, 'RegExp', RegExpWrapper);
|
|
4783
4748
|
}
|
|
4784
4749
|
|
|
4785
4750
|
// https://tc39.es/ecma262/#sec-get-regexp-@@species
|
|
@@ -4958,14 +4923,14 @@ var uncurryThis$7 = functionUncurryThis;
|
|
|
4958
4923
|
var redefine$2 = redefine$b.exports;
|
|
4959
4924
|
var regexpExec$1 = regexpExec$2;
|
|
4960
4925
|
var fails$8 = fails$r;
|
|
4961
|
-
var wellKnownSymbol$
|
|
4926
|
+
var wellKnownSymbol$3 = wellKnownSymbol$n;
|
|
4962
4927
|
var createNonEnumerableProperty$1 = createNonEnumerableProperty$7;
|
|
4963
4928
|
|
|
4964
|
-
var SPECIES = wellKnownSymbol$
|
|
4929
|
+
var SPECIES$1 = wellKnownSymbol$3('species');
|
|
4965
4930
|
var RegExpPrototype = RegExp.prototype;
|
|
4966
4931
|
|
|
4967
4932
|
var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
4968
|
-
var SYMBOL = wellKnownSymbol$
|
|
4933
|
+
var SYMBOL = wellKnownSymbol$3(KEY);
|
|
4969
4934
|
|
|
4970
4935
|
var DELEGATES_TO_SYMBOL = !fails$8(function () {
|
|
4971
4936
|
// String methods call symbol-named RegEp methods
|
|
@@ -4987,7 +4952,7 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
4987
4952
|
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
|
4988
4953
|
// a new one. We need to return the patched regex when creating the new one.
|
|
4989
4954
|
re.constructor = {};
|
|
4990
|
-
re.constructor[SPECIES] = function () { return re; };
|
|
4955
|
+
re.constructor[SPECIES$1] = function () { return re; };
|
|
4991
4956
|
re.flags = '';
|
|
4992
4957
|
re[SYMBOL] = /./[SYMBOL];
|
|
4993
4958
|
}
|
|
@@ -5080,14 +5045,14 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
|
|
|
5080
5045
|
});
|
|
5081
5046
|
};
|
|
5082
5047
|
|
|
5083
|
-
var global$
|
|
5048
|
+
var global$6 = global$I;
|
|
5084
5049
|
var call$3 = functionCall;
|
|
5085
5050
|
var anObject$2 = anObject$e;
|
|
5086
5051
|
var isCallable$2 = isCallable$l;
|
|
5087
5052
|
var classof$1 = classofRaw$1;
|
|
5088
5053
|
var regexpExec = regexpExec$2;
|
|
5089
5054
|
|
|
5090
|
-
var TypeError$3 = global$
|
|
5055
|
+
var TypeError$3 = global$6.TypeError;
|
|
5091
5056
|
|
|
5092
5057
|
// `RegExpExec` abstract operation
|
|
5093
5058
|
// https://tc39.es/ecma262/#sec-regexpexec
|
|
@@ -5118,10 +5083,10 @@ var advanceStringIndex = advanceStringIndex$1;
|
|
|
5118
5083
|
var getMethod = getMethod$4;
|
|
5119
5084
|
var getSubstitution = getSubstitution$1;
|
|
5120
5085
|
var regExpExec = regexpExecAbstract;
|
|
5121
|
-
var wellKnownSymbol$
|
|
5086
|
+
var wellKnownSymbol$2 = wellKnownSymbol$n;
|
|
5122
5087
|
|
|
5123
|
-
var REPLACE = wellKnownSymbol$
|
|
5124
|
-
var max = Math.max;
|
|
5088
|
+
var REPLACE = wellKnownSymbol$2('replace');
|
|
5089
|
+
var max$1 = Math.max;
|
|
5125
5090
|
var min = Math.min;
|
|
5126
5091
|
var concat$1 = uncurryThis$5([].concat);
|
|
5127
5092
|
var push$1 = uncurryThis$5([].push);
|
|
@@ -5213,7 +5178,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
5213
5178
|
result = results[i];
|
|
5214
5179
|
|
|
5215
5180
|
var matched = toString$2(result[0]);
|
|
5216
|
-
var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
|
|
5181
|
+
var position = max$1(min(toIntegerOrInfinity(result.index), S.length), 0);
|
|
5217
5182
|
var captures = [];
|
|
5218
5183
|
// NOTE: This is equivalent to
|
|
5219
5184
|
// captures = result.slice(1).map(maybeToString)
|
|
@@ -5343,7 +5308,7 @@ Emits the following events:
|
|
|
5343
5308
|
'hide:before': the drop list will hide.
|
|
5344
5309
|
'hide': the drop list was hidden.
|
|
5345
5310
|
'hide:after': emitted after the hide css transition has ended, or immediately after 'hide'.
|
|
5346
|
-
'check' {value, item, isCheckingGroup}: item was selected (in multi mode).
|
|
5311
|
+
'check' {value, item, checked: boolean, isGroup: boolean, isCheckingGroup: boolean}: item was selected (in multi mode).
|
|
5347
5312
|
'groupcheck' {value, item, affectedItems}: item was selected (in multi mode).
|
|
5348
5313
|
*/
|
|
5349
5314
|
|
|
@@ -5440,10 +5405,15 @@ var DropList = /*#__PURE__*/function () {
|
|
|
5440
5405
|
onItemRender: function onItemRender(itemEl, index) {
|
|
5441
5406
|
var item;
|
|
5442
5407
|
|
|
5443
|
-
if ( /**@type any*/index === GhostSymbol) {var
|
|
5444
|
-
item = (
|
|
5445
|
-
|
|
5446
|
-
|
|
5408
|
+
if ( /**@type any*/index === GhostSymbol) {var _ItemSymbol;
|
|
5409
|
+
item = _defineProperty({
|
|
5410
|
+
label: p.lastMeasureLongestLabelText,
|
|
5411
|
+
value: 'Measure' },
|
|
5412
|
+
|
|
5413
|
+
ItemSymbol$1, (_ItemSymbol = {}, _defineProperty(_ItemSymbol,
|
|
5414
|
+
p.labelProp, p.lastMeasureLongestLabelText), _defineProperty(_ItemSymbol,
|
|
5415
|
+
p.valueProp, 'Measure'), _ItemSymbol));
|
|
5416
|
+
|
|
5447
5417
|
|
|
5448
5418
|
itemEl.setAttribute('aria-hidden', 'true');
|
|
5449
5419
|
} else {
|
|
@@ -5497,7 +5467,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
5497
5467
|
var fn = p.unrenderItem;
|
|
5498
5468
|
p.virtualListHelper.setOnItemUnrender(function (el) {
|
|
5499
5469
|
try {
|
|
5500
|
-
fn(el[ItemSymbol$1], el);
|
|
5470
|
+
fn(el[ItemSymbol$1][ItemSymbol$1], el);
|
|
5501
5471
|
} catch (err) {console.error(err);} // eslint-disable-line no-console
|
|
5502
5472
|
delete el[ItemSymbol$1];
|
|
5503
5473
|
|
|
@@ -5616,7 +5586,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
5616
5586
|
el.className = classes.join(' ');
|
|
5617
5587
|
} }, { key: "blurFocusedItem", value:
|
|
5618
5588
|
|
|
5619
|
-
function blurFocusedItem() {
|
|
5589
|
+
function blurFocusedItem() {var _item$ItemSymbol;
|
|
5620
5590
|
var p = this._p;
|
|
5621
5591
|
|
|
5622
5592
|
clearTimeout(p.blurTimer);
|
|
@@ -5637,7 +5607,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
5637
5607
|
if (!item)
|
|
5638
5608
|
return;
|
|
5639
5609
|
|
|
5640
|
-
this._trigger('itemblur', { value: item
|
|
5610
|
+
this._trigger('itemblur', { value: item.value, item: (_item$ItemSymbol = item[ItemSymbol$1]) !== null && _item$ItemSymbol !== void 0 ? _item$ItemSymbol : item });
|
|
5641
5611
|
} }, { key: "nextPage", value:
|
|
5642
5612
|
|
|
5643
5613
|
function nextPage(event) {
|
|
@@ -5651,7 +5621,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
5651
5621
|
function toggleFocusedItem() {
|
|
5652
5622
|
var p = this._p;
|
|
5653
5623
|
|
|
5654
|
-
if (this.hasFocusedItem() && p.multi) {
|
|
5624
|
+
if (this.hasFocusedItem() && p.multi) {var _item$ItemSymbol2;
|
|
5655
5625
|
var item = p.items[p.focusItemIndex];
|
|
5656
5626
|
if (item._nocheck || item._nointeraction) return this;
|
|
5657
5627
|
|
|
@@ -5659,7 +5629,13 @@ var DropList = /*#__PURE__*/function () {
|
|
|
5659
5629
|
if (p.focusItemEl) {
|
|
5660
5630
|
DomCompat.toggleClass(p.focusItemEl, "".concat(p.baseClassName, "__item_checked"), item._checked);
|
|
5661
5631
|
}
|
|
5662
|
-
this._trigger('check', {
|
|
5632
|
+
this._trigger('check', {
|
|
5633
|
+
value: item.value,
|
|
5634
|
+
item: (_item$ItemSymbol2 = item[ItemSymbol$1]) !== null && _item$ItemSymbol2 !== void 0 ? _item$ItemSymbol2 : item,
|
|
5635
|
+
checked: item._checked,
|
|
5636
|
+
isGroup: item._group,
|
|
5637
|
+
isCheckingGroup: false });
|
|
5638
|
+
|
|
5663
5639
|
|
|
5664
5640
|
this._updateGroupStateForItem(item);
|
|
5665
5641
|
}
|
|
@@ -5667,7 +5643,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
5667
5643
|
return this;
|
|
5668
5644
|
} }, { key: "triggerItemSelection", value:
|
|
5669
5645
|
|
|
5670
|
-
function triggerItemSelection(event) {
|
|
5646
|
+
function triggerItemSelection(event) {var _item$ItemSymbol3;
|
|
5671
5647
|
var p = this._p;
|
|
5672
5648
|
|
|
5673
5649
|
p.focusItemEl = p.focusItemEl || Dom.closestUntil(event.target, 'li', p.el);
|
|
@@ -5684,7 +5660,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
5684
5660
|
this._setSingleSelectedItemEl(p.focusItemEl);
|
|
5685
5661
|
}
|
|
5686
5662
|
|
|
5687
|
-
this._trigger('select', { value: item ? item
|
|
5663
|
+
this._trigger('select', { value: item ? item.value : undefined, item: (_item$ItemSymbol3 = item[ItemSymbol$1]) !== null && _item$ItemSymbol3 !== void 0 ? _item$ItemSymbol3 : item });
|
|
5688
5664
|
|
|
5689
5665
|
return true;
|
|
5690
5666
|
}
|
|
@@ -5722,9 +5698,9 @@ var DropList = /*#__PURE__*/function () {
|
|
|
5722
5698
|
var oitem = itemsToAdd[i];
|
|
5723
5699
|
//noinspection PointlessBooleanExpressionJS
|
|
5724
5700
|
var item = (_item2 = {}, _defineProperty(_item2,
|
|
5725
|
-
ItemSymbol$1, oitem), _defineProperty(_item2,
|
|
5726
|
-
|
|
5727
|
-
|
|
5701
|
+
ItemSymbol$1, oitem), _defineProperty(_item2, "label",
|
|
5702
|
+
oitem[labelProp]), _defineProperty(_item2, "value",
|
|
5703
|
+
oitem[valueProp]), _defineProperty(_item2, "_nocheck",
|
|
5728
5704
|
!!oitem._nocheck), _defineProperty(_item2, "_nointeraction",
|
|
5729
5705
|
!!oitem._nointeraction), _item2);
|
|
5730
5706
|
|
|
@@ -5775,10 +5751,10 @@ var DropList = /*#__PURE__*/function () {
|
|
|
5775
5751
|
item[ItemSymbol$1] = newItem;
|
|
5776
5752
|
|
|
5777
5753
|
if (hasOwnProperty.call(newItem, p.labelProp))
|
|
5778
|
-
item
|
|
5754
|
+
item.label = newItem[p.labelProp];
|
|
5779
5755
|
|
|
5780
5756
|
if (hasOwnProperty.call(newItem, p.valueProp))
|
|
5781
|
-
item
|
|
5757
|
+
item.value = newItem[p.valueProp];
|
|
5782
5758
|
|
|
5783
5759
|
if (hasOwnProperty.call(newItem, '_nocheck'))
|
|
5784
5760
|
item._nocheck = !!newItem._nocheck;
|
|
@@ -5846,12 +5822,12 @@ var DropList = /*#__PURE__*/function () {
|
|
|
5846
5822
|
} }, { key: "itemDataByValue", value:
|
|
5847
5823
|
|
|
5848
5824
|
function itemDataByValue(value) {
|
|
5849
|
-
var p = this._p
|
|
5825
|
+
var p = this._p;
|
|
5850
5826
|
|
|
5851
5827
|
for (var i = 0, count = p.items.length; i < count; i++) {
|
|
5852
5828
|
var item = p.items[i];
|
|
5853
|
-
if (item
|
|
5854
|
-
return item;
|
|
5829
|
+
if (item.value === value) {
|
|
5830
|
+
return item[ItemSymbol$1];
|
|
5855
5831
|
}
|
|
5856
5832
|
}
|
|
5857
5833
|
|
|
@@ -5859,11 +5835,11 @@ var DropList = /*#__PURE__*/function () {
|
|
|
5859
5835
|
} }, { key: "itemIndexByValue", value:
|
|
5860
5836
|
|
|
5861
5837
|
function itemIndexByValue(value) {
|
|
5862
|
-
var p = this._p
|
|
5838
|
+
var p = this._p;
|
|
5863
5839
|
|
|
5864
5840
|
for (var i = 0, count = p.items.length; i < count; i++) {
|
|
5865
5841
|
var item = p.items[i];
|
|
5866
|
-
if (item
|
|
5842
|
+
if (item.value === value) {
|
|
5867
5843
|
return i;
|
|
5868
5844
|
}
|
|
5869
5845
|
}
|
|
@@ -5872,11 +5848,11 @@ var DropList = /*#__PURE__*/function () {
|
|
|
5872
5848
|
} }, { key: "itemIndexByValueOrLabel", value:
|
|
5873
5849
|
|
|
5874
5850
|
function itemIndexByValueOrLabel(value, label) {
|
|
5875
|
-
var p = this._p
|
|
5851
|
+
var p = this._p;
|
|
5876
5852
|
|
|
5877
5853
|
for (var i = 0, count = p.items.length; i < count; i++) {
|
|
5878
5854
|
var item = p.items[i];
|
|
5879
|
-
if (item
|
|
5855
|
+
if (item.value === value || item.label === label) {
|
|
5880
5856
|
return i;
|
|
5881
5857
|
}
|
|
5882
5858
|
}
|
|
@@ -5885,7 +5861,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
5885
5861
|
} }, { key: "items", value:
|
|
5886
5862
|
|
|
5887
5863
|
function items() {
|
|
5888
|
-
return this._p.items.
|
|
5864
|
+
return this._p.items.map(function (x) {return x[ItemSymbol$1];});
|
|
5889
5865
|
} }, { key: "itemsReference", value:
|
|
5890
5866
|
|
|
5891
5867
|
function itemsReference() {
|
|
@@ -5896,8 +5872,8 @@ var DropList = /*#__PURE__*/function () {
|
|
|
5896
5872
|
return this._p.items.length;
|
|
5897
5873
|
} }, { key: "itemAtIndex", value:
|
|
5898
5874
|
|
|
5899
|
-
function itemAtIndex(index) {
|
|
5900
|
-
return this._p.items[index];
|
|
5875
|
+
function itemAtIndex(index) {var _this$_p$items$index;
|
|
5876
|
+
return (_this$_p$items$index = this._p.items[index]) === null || _this$_p$items$index === void 0 ? void 0 : _this$_p$items$index[ItemSymbol$1];
|
|
5901
5877
|
}
|
|
5902
5878
|
|
|
5903
5879
|
/**
|
|
@@ -6177,13 +6153,13 @@ var DropList = /*#__PURE__*/function () {
|
|
|
6177
6153
|
* @returns {DropList} self
|
|
6178
6154
|
*/ }, { key: "setCheckedValues", value:
|
|
6179
6155
|
function setCheckedValues(values) {
|
|
6180
|
-
var p = this._p
|
|
6156
|
+
var p = this._p;
|
|
6181
6157
|
|
|
6182
6158
|
var groupIndexes = [];
|
|
6183
6159
|
|
|
6184
6160
|
for (var i = 0, count = p.items.length; i < count; i++) {
|
|
6185
6161
|
var item = p.items[i];
|
|
6186
|
-
var checked = !item._nocheck && values.indexOf(item
|
|
6162
|
+
var checked = !item._nocheck && values.indexOf(item.value) !== -1;
|
|
6187
6163
|
|
|
6188
6164
|
if (item._group) {
|
|
6189
6165
|
groupIndexes.push(i);
|
|
@@ -6215,7 +6191,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
6215
6191
|
* @returns {Array<*>} self
|
|
6216
6192
|
*/ }, { key: "getCheckedValues", value:
|
|
6217
6193
|
function getCheckedValues(excludeGroups) {
|
|
6218
|
-
var p = this._p
|
|
6194
|
+
var p = this._p;
|
|
6219
6195
|
|
|
6220
6196
|
excludeGroups = excludeGroups && p.groupCount > 0;
|
|
6221
6197
|
|
|
@@ -6225,7 +6201,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
6225
6201
|
var item = p.items[i];
|
|
6226
6202
|
if (!item._checked) continue;
|
|
6227
6203
|
if (excludeGroups && item._group) continue;
|
|
6228
|
-
values.push(item
|
|
6204
|
+
values.push(item.value);
|
|
6229
6205
|
}
|
|
6230
6206
|
|
|
6231
6207
|
return values;
|
|
@@ -6248,7 +6224,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
6248
6224
|
var item = p.items[i];
|
|
6249
6225
|
if (!item._checked) continue;
|
|
6250
6226
|
if (excludeGroups && item._group) continue;
|
|
6251
|
-
items.push(item);
|
|
6227
|
+
items.push(item[ItemSymbol$1]);
|
|
6252
6228
|
}
|
|
6253
6229
|
|
|
6254
6230
|
return items;
|
|
@@ -6427,7 +6403,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
6427
6403
|
itemElement.classList.add("".concat(p.baseClassName, "__item_focus"));
|
|
6428
6404
|
p.focusItemEl = itemElement;
|
|
6429
6405
|
|
|
6430
|
-
this._trigger('itemfocus', { value: itemElement
|
|
6406
|
+
this._trigger('itemfocus', { value: itemElement.value, item: itemElement[ItemSymbol$1], event: null });
|
|
6431
6407
|
}
|
|
6432
6408
|
}
|
|
6433
6409
|
|
|
@@ -6584,15 +6560,15 @@ var DropList = /*#__PURE__*/function () {
|
|
|
6584
6560
|
} }, { key: "_getItemIndex", value:
|
|
6585
6561
|
|
|
6586
6562
|
function _getItemIndex(item) {
|
|
6587
|
-
var p = this._p
|
|
6563
|
+
var p = this._p;
|
|
6588
6564
|
|
|
6589
6565
|
var itemIndex = -1;
|
|
6590
6566
|
|
|
6591
6567
|
if (item) {
|
|
6592
6568
|
itemIndex = p.items.indexOf(item);
|
|
6593
6569
|
if (itemIndex === -1) {
|
|
6594
|
-
var value = item && item
|
|
6595
|
-
var label = item && item
|
|
6570
|
+
var value = item && item.value !== undefined ? item.value : item;
|
|
6571
|
+
var label = item && item.label ? item.label : value;
|
|
6596
6572
|
itemIndex = this.itemIndexByValueOrLabel(value, label);
|
|
6597
6573
|
}
|
|
6598
6574
|
}
|
|
@@ -6828,7 +6804,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
6828
6804
|
} }, { key: "_keydownFreeType", value:
|
|
6829
6805
|
|
|
6830
6806
|
function _keydownFreeType(evt) {
|
|
6831
|
-
var p = this._p
|
|
6807
|
+
var p = this._p;
|
|
6832
6808
|
|
|
6833
6809
|
// noinspection JSDeprecatedSymbols
|
|
6834
6810
|
var character = evt.key || String.fromCharCode(evt.keyCode);
|
|
@@ -6847,7 +6823,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
6847
6823
|
// These are all the possible matches
|
|
6848
6824
|
for (var i = 0, count = p.items.length; i < count; i++) {
|
|
6849
6825
|
item = p.items[i];
|
|
6850
|
-
if (regex.test(item
|
|
6826
|
+
if (regex.test(item.label)) {
|
|
6851
6827
|
matchIndices.push(i);
|
|
6852
6828
|
}
|
|
6853
6829
|
}
|
|
@@ -6860,7 +6836,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
6860
6836
|
|
|
6861
6837
|
for (var _i6 = 0, _count2 = p.items.length; _i6 < _count2; _i6++) {
|
|
6862
6838
|
item = p.items[_i6];
|
|
6863
|
-
if (regex.test(item
|
|
6839
|
+
if (regex.test(item.label)) {
|
|
6864
6840
|
matchIndices.push(_i6);
|
|
6865
6841
|
}
|
|
6866
6842
|
}
|
|
@@ -6903,7 +6879,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
6903
6879
|
}
|
|
6904
6880
|
} }, { key: "_focus", value:
|
|
6905
6881
|
|
|
6906
|
-
function _focus(event, itemEl, itemIndex) {
|
|
6882
|
+
function _focus(event, itemEl, itemIndex) {var _item$ItemSymbol4;
|
|
6907
6883
|
var p = this._p;
|
|
6908
6884
|
|
|
6909
6885
|
if (!itemIndex && itemEl) {
|
|
@@ -6934,7 +6910,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
6934
6910
|
p.focusItemIndex = itemIndex;
|
|
6935
6911
|
|
|
6936
6912
|
var item = p.items[itemIndex];
|
|
6937
|
-
this._trigger('itemfocus', { value: item
|
|
6913
|
+
this._trigger('itemfocus', { value: item.value, item: (_item$ItemSymbol4 = item[ItemSymbol$1]) !== null && _item$ItemSymbol4 !== void 0 ? _item$ItemSymbol4 : item, event: event });
|
|
6938
6914
|
} }, { key: "_delayBlur", value:
|
|
6939
6915
|
|
|
6940
6916
|
function _delayBlur() {var _this10 = this;
|
|
@@ -7087,13 +7063,13 @@ var DropList = /*#__PURE__*/function () {
|
|
|
7087
7063
|
} }, { key: "_updateGroupStateForItem", value:
|
|
7088
7064
|
|
|
7089
7065
|
function _updateGroupStateForItem(item) {
|
|
7090
|
-
var p = this._p
|
|
7066
|
+
var p = this._p;
|
|
7091
7067
|
|
|
7092
7068
|
if (p.multi && p.autoCheckGroupChildren) {
|
|
7093
7069
|
|
|
7094
7070
|
var items, groupIndex, itemIndex;
|
|
7095
7071
|
|
|
7096
|
-
if (item._group) {
|
|
7072
|
+
if (item._group) {var _item$ItemSymbol5;
|
|
7097
7073
|
// Now loop through children below the group
|
|
7098
7074
|
|
|
7099
7075
|
items = p.items;
|
|
@@ -7101,7 +7077,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
7101
7077
|
|
|
7102
7078
|
var affectedItems = 0;
|
|
7103
7079
|
|
|
7104
|
-
for (var i = groupIndex + 1, len = items.length; i < len; i++) {
|
|
7080
|
+
for (var i = groupIndex + 1, len = items.length; i < len; i++) {var _next$ItemSymbol;
|
|
7105
7081
|
var next = items[i];
|
|
7106
7082
|
|
|
7107
7083
|
// Hit the next group, break out
|
|
@@ -7124,11 +7100,17 @@ var DropList = /*#__PURE__*/function () {
|
|
|
7124
7100
|
}
|
|
7125
7101
|
|
|
7126
7102
|
// Fire event
|
|
7127
|
-
this._trigger('check', {
|
|
7103
|
+
this._trigger('check', {
|
|
7104
|
+
value: next.value,
|
|
7105
|
+
item: (_next$ItemSymbol = next[ItemSymbol$1]) !== null && _next$ItemSymbol !== void 0 ? _next$ItemSymbol : next,
|
|
7106
|
+
checked: item._checked,
|
|
7107
|
+
isGroup: item._group,
|
|
7108
|
+
isCheckingGroup: true });
|
|
7109
|
+
|
|
7128
7110
|
}
|
|
7129
7111
|
|
|
7130
7112
|
// Fire event
|
|
7131
|
-
this._trigger('groupcheck', { value: item
|
|
7113
|
+
this._trigger('groupcheck', { value: item.value, item: (_item$ItemSymbol5 = item[ItemSymbol$1]) !== null && _item$ItemSymbol5 !== void 0 ? _item$ItemSymbol5 : item, affectedItems: affectedItems });
|
|
7132
7114
|
} else if (p.groupCount > 0) {
|
|
7133
7115
|
items = p.items;
|
|
7134
7116
|
itemIndex = items.indexOf(item);
|
|
@@ -7188,9 +7170,15 @@ var DropList = /*#__PURE__*/function () {
|
|
|
7188
7170
|
DomCompat.toggleClass(nextEl, "".concat(p.baseClassName, "__item_checked"), groupItem._checked);
|
|
7189
7171
|
}
|
|
7190
7172
|
|
|
7191
|
-
if (fireEvents) {
|
|
7173
|
+
if (fireEvents) {var _groupItem$ItemSymbol;
|
|
7192
7174
|
// Fire event
|
|
7193
|
-
this._trigger('check', {
|
|
7175
|
+
this._trigger('check', {
|
|
7176
|
+
value: groupItem.value,
|
|
7177
|
+
item: (_groupItem$ItemSymbol = groupItem[ItemSymbol$1]) !== null && _groupItem$ItemSymbol !== void 0 ? _groupItem$ItemSymbol : groupItem,
|
|
7178
|
+
checked: item._checked,
|
|
7179
|
+
isGroup: item._group,
|
|
7180
|
+
isCheckingGroup: false });
|
|
7181
|
+
|
|
7194
7182
|
}
|
|
7195
7183
|
}
|
|
7196
7184
|
}
|
|
@@ -7206,7 +7194,6 @@ var DropList = /*#__PURE__*/function () {
|
|
|
7206
7194
|
var p = this._p;
|
|
7207
7195
|
|
|
7208
7196
|
if (p.lastMeasureItemCount !== p.items.length) {
|
|
7209
|
-
var labelProp = p.labelProp,valueProp = p.valueProp;
|
|
7210
7197
|
var longestLabel = p.lastMeasureLongestLabel || 1,
|
|
7211
7198
|
longestLabelText = p.lastMeasureLongestLabelText || '';
|
|
7212
7199
|
|
|
@@ -7215,9 +7202,9 @@ var DropList = /*#__PURE__*/function () {
|
|
|
7215
7202
|
i++) {
|
|
7216
7203
|
|
|
7217
7204
|
var item = items[i];
|
|
7218
|
-
var text = item
|
|
7205
|
+
var text = item.label;
|
|
7219
7206
|
if (text == null)
|
|
7220
|
-
text = item
|
|
7207
|
+
text = item.value;
|
|
7221
7208
|
if (text == null)
|
|
7222
7209
|
text = '';
|
|
7223
7210
|
|
|
@@ -7266,7 +7253,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
7266
7253
|
} }, { key: "_renderItemContent", value:
|
|
7267
7254
|
|
|
7268
7255
|
function _renderItemContent(item, itemEl) {
|
|
7269
|
-
var p = this._p
|
|
7256
|
+
var p = this._p;
|
|
7270
7257
|
|
|
7271
7258
|
// NOTE: a "measure" item will not have full data of original item.
|
|
7272
7259
|
// so for a custom renderer - we try to send original item, and fallback to our private list item.
|
|
@@ -7274,7 +7261,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
7274
7261
|
if (!p.renderItem || p.renderItem(item[ItemSymbol$1] || item, itemEl) === false) {
|
|
7275
7262
|
itemEl.appendChild(Dom.createElement('span', {
|
|
7276
7263
|
class: "".concat(p.baseClassName, "__item_label"),
|
|
7277
|
-
textContent: item
|
|
7264
|
+
textContent: item.label }));
|
|
7278
7265
|
|
|
7279
7266
|
|
|
7280
7267
|
if (p.multi) {
|
|
@@ -7335,7 +7322,7 @@ var DropList = /*#__PURE__*/function () {
|
|
|
7335
7322
|
} }]);return DropList;}();
|
|
7336
7323
|
|
|
7337
7324
|
'use strict';
|
|
7338
|
-
var toIndexedObject = toIndexedObject$a;
|
|
7325
|
+
var toIndexedObject$1 = toIndexedObject$a;
|
|
7339
7326
|
var addToUnscopables$1 = addToUnscopables$3;
|
|
7340
7327
|
var Iterators = iterators;
|
|
7341
7328
|
var InternalStateModule$1 = internalState;
|
|
@@ -7358,7 +7345,7 @@ var getInternalState = InternalStateModule$1.getterFor(ARRAY_ITERATOR);
|
|
|
7358
7345
|
var es_array_iterator = defineIterator$1(Array, 'Array', function (iterated, kind) {
|
|
7359
7346
|
setInternalState$1(this, {
|
|
7360
7347
|
type: ARRAY_ITERATOR,
|
|
7361
|
-
target: toIndexedObject(iterated), // target
|
|
7348
|
+
target: toIndexedObject$1(iterated), // target
|
|
7362
7349
|
index: 0, // next index
|
|
7363
7350
|
kind: kind // kind
|
|
7364
7351
|
});
|
|
@@ -7404,7 +7391,7 @@ var arrayBufferNonExtensible = fails$6(function () {
|
|
|
7404
7391
|
});
|
|
7405
7392
|
|
|
7406
7393
|
var fails$5 = fails$r;
|
|
7407
|
-
var isObject$
|
|
7394
|
+
var isObject$3 = isObject$e;
|
|
7408
7395
|
var classof = classofRaw$1;
|
|
7409
7396
|
var ARRAY_BUFFER_NON_EXTENSIBLE = arrayBufferNonExtensible;
|
|
7410
7397
|
|
|
@@ -7415,7 +7402,7 @@ var FAILS_ON_PRIMITIVES = fails$5(function () { $isExtensible(1); });
|
|
|
7415
7402
|
// `Object.isExtensible` method
|
|
7416
7403
|
// https://tc39.es/ecma262/#sec-object.isextensible
|
|
7417
7404
|
var objectIsExtensible = (FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE) ? function isExtensible(it) {
|
|
7418
|
-
if (!isObject$
|
|
7405
|
+
if (!isObject$3(it)) return false;
|
|
7419
7406
|
if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) == 'ArrayBuffer') return false;
|
|
7420
7407
|
return $isExtensible ? $isExtensible(it) : true;
|
|
7421
7408
|
} : $isExtensible;
|
|
@@ -7430,7 +7417,7 @@ var freezing = !fails$4(function () {
|
|
|
7430
7417
|
var $$7 = _export;
|
|
7431
7418
|
var uncurryThis$4 = functionUncurryThis;
|
|
7432
7419
|
var hiddenKeys = hiddenKeys$6;
|
|
7433
|
-
var isObject$
|
|
7420
|
+
var isObject$2 = isObject$e;
|
|
7434
7421
|
var hasOwn = hasOwnProperty_1;
|
|
7435
7422
|
var defineProperty$2 = objectDefineProperty.f;
|
|
7436
7423
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
@@ -7452,7 +7439,7 @@ var setMetadata = function (it) {
|
|
|
7452
7439
|
|
|
7453
7440
|
var fastKey$1 = function (it, create) {
|
|
7454
7441
|
// return a primitive with prefix
|
|
7455
|
-
if (!isObject$
|
|
7442
|
+
if (!isObject$2(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
|
|
7456
7443
|
if (!hasOwn(it, METADATA)) {
|
|
7457
7444
|
// can't set metadata to uncaught frozen object
|
|
7458
7445
|
if (!isExtensible(it)) return 'F';
|
|
@@ -7519,19 +7506,19 @@ hiddenKeys[METADATA] = true;
|
|
|
7519
7506
|
|
|
7520
7507
|
var internalMetadata = internalMetadata$1.exports;
|
|
7521
7508
|
|
|
7522
|
-
var global$
|
|
7509
|
+
var global$5 = global$I;
|
|
7523
7510
|
var bind$1 = functionBindContext;
|
|
7524
7511
|
var call$1 = functionCall;
|
|
7525
7512
|
var anObject = anObject$e;
|
|
7526
7513
|
var tryToString = tryToString$3;
|
|
7527
7514
|
var isArrayIteratorMethod = isArrayIteratorMethod$2;
|
|
7528
|
-
var lengthOfArrayLike$
|
|
7515
|
+
var lengthOfArrayLike$2 = lengthOfArrayLike$8;
|
|
7529
7516
|
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
7530
7517
|
var getIterator = getIterator$2;
|
|
7531
7518
|
var getIteratorMethod = getIteratorMethod$3;
|
|
7532
7519
|
var iteratorClose = iteratorClose$2;
|
|
7533
7520
|
|
|
7534
|
-
var TypeError$2 = global$
|
|
7521
|
+
var TypeError$2 = global$5.TypeError;
|
|
7535
7522
|
|
|
7536
7523
|
var Result = function (stopped, result) {
|
|
7537
7524
|
this.stopped = stopped;
|
|
@@ -7567,7 +7554,7 @@ var iterate$2 = function (iterable, unboundFunction, options) {
|
|
|
7567
7554
|
if (!iterFn) throw TypeError$2(tryToString(iterable) + ' is not iterable');
|
|
7568
7555
|
// optimisation for array iterators
|
|
7569
7556
|
if (isArrayIteratorMethod(iterFn)) {
|
|
7570
|
-
for (index = 0, length = lengthOfArrayLike$
|
|
7557
|
+
for (index = 0, length = lengthOfArrayLike$2(iterable); length > index; index++) {
|
|
7571
7558
|
result = callFn(iterable[index]);
|
|
7572
7559
|
if (result && isPrototypeOf$1(ResultPrototype, result)) return result;
|
|
7573
7560
|
} return new Result(false);
|
|
@@ -7586,10 +7573,10 @@ var iterate$2 = function (iterable, unboundFunction, options) {
|
|
|
7586
7573
|
} return new Result(false);
|
|
7587
7574
|
};
|
|
7588
7575
|
|
|
7589
|
-
var global$
|
|
7576
|
+
var global$4 = global$I;
|
|
7590
7577
|
var isPrototypeOf = objectIsPrototypeOf;
|
|
7591
7578
|
|
|
7592
|
-
var TypeError$1 = global$
|
|
7579
|
+
var TypeError$1 = global$4.TypeError;
|
|
7593
7580
|
|
|
7594
7581
|
var anInstance$2 = function (it, Prototype) {
|
|
7595
7582
|
if (isPrototypeOf(Prototype, it)) return it;
|
|
@@ -7598,7 +7585,7 @@ var anInstance$2 = function (it, Prototype) {
|
|
|
7598
7585
|
|
|
7599
7586
|
'use strict';
|
|
7600
7587
|
var $$6 = _export;
|
|
7601
|
-
var global$
|
|
7588
|
+
var global$3 = global$I;
|
|
7602
7589
|
var uncurryThis$3 = functionUncurryThis;
|
|
7603
7590
|
var isForced = isForced_1;
|
|
7604
7591
|
var redefine$1 = redefine$b.exports;
|
|
@@ -7606,7 +7593,7 @@ var InternalMetadataModule = internalMetadata$1.exports;
|
|
|
7606
7593
|
var iterate$1 = iterate$2;
|
|
7607
7594
|
var anInstance$1 = anInstance$2;
|
|
7608
7595
|
var isCallable = isCallable$l;
|
|
7609
|
-
var isObject = isObject$e;
|
|
7596
|
+
var isObject$1 = isObject$e;
|
|
7610
7597
|
var fails$3 = fails$r;
|
|
7611
7598
|
var checkCorrectnessOfIteration = checkCorrectnessOfIteration$2;
|
|
7612
7599
|
var setToStringTag = setToStringTag$4;
|
|
@@ -7616,7 +7603,7 @@ var collection$1 = function (CONSTRUCTOR_NAME, wrapper, common) {
|
|
|
7616
7603
|
var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
|
|
7617
7604
|
var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
|
|
7618
7605
|
var ADDER = IS_MAP ? 'set' : 'add';
|
|
7619
|
-
var NativeConstructor = global$
|
|
7606
|
+
var NativeConstructor = global$3[CONSTRUCTOR_NAME];
|
|
7620
7607
|
var NativePrototype = NativeConstructor && NativeConstructor.prototype;
|
|
7621
7608
|
var Constructor = NativeConstructor;
|
|
7622
7609
|
var exported = {};
|
|
@@ -7628,11 +7615,11 @@ var collection$1 = function (CONSTRUCTOR_NAME, wrapper, common) {
|
|
|
7628
7615
|
uncurriedNativeMethod(this, value === 0 ? 0 : value);
|
|
7629
7616
|
return this;
|
|
7630
7617
|
} : KEY == 'delete' ? function (key) {
|
|
7631
|
-
return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
|
7618
|
+
return IS_WEAK && !isObject$1(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
|
7632
7619
|
} : KEY == 'get' ? function get(key) {
|
|
7633
|
-
return IS_WEAK && !isObject(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
|
7620
|
+
return IS_WEAK && !isObject$1(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
|
7634
7621
|
} : KEY == 'has' ? function has(key) {
|
|
7635
|
-
return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
|
7622
|
+
return IS_WEAK && !isObject$1(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
|
7636
7623
|
} : function set(key, value) {
|
|
7637
7624
|
uncurriedNativeMethod(this, key === 0 ? 0 : key, value);
|
|
7638
7625
|
return this;
|
|
@@ -7970,15 +7957,15 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
|
|
|
7970
7957
|
|
|
7971
7958
|
var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
|
|
7972
7959
|
|
|
7973
|
-
var global$
|
|
7960
|
+
var global$2 = global$I;
|
|
7974
7961
|
var DOMIterables = domIterables;
|
|
7975
7962
|
var DOMTokenListPrototype = domTokenListPrototype;
|
|
7976
7963
|
var ArrayIteratorMethods = es_array_iterator;
|
|
7977
7964
|
var createNonEnumerableProperty = createNonEnumerableProperty$7;
|
|
7978
|
-
var wellKnownSymbol = wellKnownSymbol$n;
|
|
7965
|
+
var wellKnownSymbol$1 = wellKnownSymbol$n;
|
|
7979
7966
|
|
|
7980
|
-
var ITERATOR = wellKnownSymbol('iterator');
|
|
7981
|
-
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
7967
|
+
var ITERATOR = wellKnownSymbol$1('iterator');
|
|
7968
|
+
var TO_STRING_TAG = wellKnownSymbol$1('toStringTag');
|
|
7982
7969
|
var ArrayValues = ArrayIteratorMethods.values;
|
|
7983
7970
|
|
|
7984
7971
|
var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
@@ -8004,11 +7991,64 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
|
8004
7991
|
};
|
|
8005
7992
|
|
|
8006
7993
|
for (var COLLECTION_NAME in DOMIterables) {
|
|
8007
|
-
handlePrototype(global$
|
|
7994
|
+
handlePrototype(global$2[COLLECTION_NAME] && global$2[COLLECTION_NAME].prototype, COLLECTION_NAME);
|
|
8008
7995
|
}
|
|
8009
7996
|
|
|
8010
7997
|
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
8011
7998
|
|
|
7999
|
+
var es_array_slice = {};
|
|
8000
|
+
|
|
8001
|
+
'use strict';
|
|
8002
|
+
var $$5 = _export;
|
|
8003
|
+
var global$1 = global$I;
|
|
8004
|
+
var isArray = isArray$4;
|
|
8005
|
+
var isConstructor = isConstructor$3;
|
|
8006
|
+
var isObject = isObject$e;
|
|
8007
|
+
var toAbsoluteIndex = toAbsoluteIndex$3;
|
|
8008
|
+
var lengthOfArrayLike$1 = lengthOfArrayLike$8;
|
|
8009
|
+
var toIndexedObject = toIndexedObject$a;
|
|
8010
|
+
var createProperty = createProperty$4;
|
|
8011
|
+
var wellKnownSymbol = wellKnownSymbol$n;
|
|
8012
|
+
var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$5;
|
|
8013
|
+
var un$Slice = arraySlice$3;
|
|
8014
|
+
|
|
8015
|
+
var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport$1('slice');
|
|
8016
|
+
|
|
8017
|
+
var SPECIES = wellKnownSymbol('species');
|
|
8018
|
+
var Array$1 = global$1.Array;
|
|
8019
|
+
var max = Math.max;
|
|
8020
|
+
|
|
8021
|
+
// `Array.prototype.slice` method
|
|
8022
|
+
// https://tc39.es/ecma262/#sec-array.prototype.slice
|
|
8023
|
+
// fallback for not array-like ES3 strings and DOM objects
|
|
8024
|
+
$$5({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
|
|
8025
|
+
slice: function slice(start, end) {
|
|
8026
|
+
var O = toIndexedObject(this);
|
|
8027
|
+
var length = lengthOfArrayLike$1(O);
|
|
8028
|
+
var k = toAbsoluteIndex(start, length);
|
|
8029
|
+
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
|
8030
|
+
// inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
|
|
8031
|
+
var Constructor, result, n;
|
|
8032
|
+
if (isArray(O)) {
|
|
8033
|
+
Constructor = O.constructor;
|
|
8034
|
+
// cross-realm fallback
|
|
8035
|
+
if (isConstructor(Constructor) && (Constructor === Array$1 || isArray(Constructor.prototype))) {
|
|
8036
|
+
Constructor = undefined;
|
|
8037
|
+
} else if (isObject(Constructor)) {
|
|
8038
|
+
Constructor = Constructor[SPECIES];
|
|
8039
|
+
if (Constructor === null) Constructor = undefined;
|
|
8040
|
+
}
|
|
8041
|
+
if (Constructor === Array$1 || Constructor === undefined) {
|
|
8042
|
+
return un$Slice(O, k, fin);
|
|
8043
|
+
}
|
|
8044
|
+
}
|
|
8045
|
+
result = new (Constructor === undefined ? Array$1 : Constructor)(max(fin - k, 0));
|
|
8046
|
+
for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
|
|
8047
|
+
result.length = n;
|
|
8048
|
+
return result;
|
|
8049
|
+
}
|
|
8050
|
+
});
|
|
8051
|
+
|
|
8012
8052
|
var es_object_assign = {};
|
|
8013
8053
|
|
|
8014
8054
|
'use strict';
|
|
@@ -8069,13 +8109,13 @@ var objectAssign = !$assign || fails$2(function () {
|
|
|
8069
8109
|
} return T;
|
|
8070
8110
|
} : $assign;
|
|
8071
8111
|
|
|
8072
|
-
var $$
|
|
8112
|
+
var $$4 = _export;
|
|
8073
8113
|
var assign = objectAssign;
|
|
8074
8114
|
|
|
8075
8115
|
// `Object.assign` method
|
|
8076
8116
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
8077
8117
|
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
8078
|
-
$$
|
|
8118
|
+
$$4({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
|
|
8079
8119
|
assign: assign
|
|
8080
8120
|
});
|
|
8081
8121
|
|
|
@@ -8134,13 +8174,13 @@ var stringTrimForced = function (METHOD_NAME) {
|
|
|
8134
8174
|
};
|
|
8135
8175
|
|
|
8136
8176
|
'use strict';
|
|
8137
|
-
var $$
|
|
8177
|
+
var $$3 = _export;
|
|
8138
8178
|
var $trim = stringTrim.trim;
|
|
8139
8179
|
var forcedStringTrimMethod = stringTrimForced;
|
|
8140
8180
|
|
|
8141
8181
|
// `String.prototype.trim` method
|
|
8142
8182
|
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
8143
|
-
$$
|
|
8183
|
+
$$3({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
|
|
8144
8184
|
trim: function trim() {
|
|
8145
8185
|
return $trim(this);
|
|
8146
8186
|
}
|
|
@@ -8149,39 +8189,21 @@ $$4({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
|
|
|
8149
8189
|
var es_array_filter = {};
|
|
8150
8190
|
|
|
8151
8191
|
'use strict';
|
|
8152
|
-
var $$
|
|
8192
|
+
var $$2 = _export;
|
|
8153
8193
|
var $filter = arrayIteration.filter;
|
|
8154
|
-
var arrayMethodHasSpeciesSupport
|
|
8194
|
+
var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$5;
|
|
8155
8195
|
|
|
8156
|
-
var HAS_SPECIES_SUPPORT
|
|
8196
|
+
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
|
|
8157
8197
|
|
|
8158
8198
|
// `Array.prototype.filter` method
|
|
8159
8199
|
// https://tc39.es/ecma262/#sec-array.prototype.filter
|
|
8160
8200
|
// with adding support of @@species
|
|
8161
|
-
$$
|
|
8201
|
+
$$2({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
|
|
8162
8202
|
filter: function filter(callbackfn /* , thisArg */) {
|
|
8163
8203
|
return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
8164
8204
|
}
|
|
8165
8205
|
});
|
|
8166
8206
|
|
|
8167
|
-
var es_array_map = {};
|
|
8168
|
-
|
|
8169
|
-
'use strict';
|
|
8170
|
-
var $$2 = _export;
|
|
8171
|
-
var $map = arrayIteration.map;
|
|
8172
|
-
var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$5;
|
|
8173
|
-
|
|
8174
|
-
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
|
|
8175
|
-
|
|
8176
|
-
// `Array.prototype.map` method
|
|
8177
|
-
// https://tc39.es/ecma262/#sec-array.prototype.map
|
|
8178
|
-
// with adding support of @@species
|
|
8179
|
-
$$2({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
|
|
8180
|
-
map: function map(callbackfn /* , thisArg */) {
|
|
8181
|
-
return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
8182
|
-
}
|
|
8183
|
-
});
|
|
8184
|
-
|
|
8185
8207
|
var es_array_findIndex = {};
|
|
8186
8208
|
|
|
8187
8209
|
'use strict';
|
|
@@ -8639,6 +8661,7 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
8639
8661
|
|
|
8640
8662
|
items: [],
|
|
8641
8663
|
filteredItems: null,
|
|
8664
|
+
currentItemsView: [], // contains the final version of items sent to DropList
|
|
8642
8665
|
itemsChanged: true,
|
|
8643
8666
|
|
|
8644
8667
|
sink: new DomEventsSink__default["default"](),
|
|
@@ -10115,8 +10138,8 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
10115
10138
|
var item = /**@type DropList.Item*/event.item;
|
|
10116
10139
|
var value = event.value;
|
|
10117
10140
|
|
|
10118
|
-
var checked =
|
|
10119
|
-
if (
|
|
10141
|
+
var checked = event.checked;
|
|
10142
|
+
if (event.isGroup) return; // Ignore groups
|
|
10120
10143
|
|
|
10121
10144
|
var selEvt = { value: value, item: item, cancel: false };
|
|
10122
10145
|
_this5._trigger((checked ? 'addsel' : 'removesel') + ':before', selEvt);
|
|
@@ -10478,8 +10501,10 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
10478
10501
|
|
|
10479
10502
|
var selectedItems = this.getSelectedItems();
|
|
10480
10503
|
var items = (_p$filteredItems = p.filteredItems) !== null && _p$filteredItems !== void 0 ? _p$filteredItems : p.items;
|
|
10504
|
+
if (p.currentItemsView && p.currentItemsView.length === items.length)
|
|
10505
|
+
items = p.currentItemsView;
|
|
10481
10506
|
if (items.length + (p.clearable ? 1 : 0) > 1) {
|
|
10482
|
-
var nextIndex = selectedItems.length > 0 ? items.indexOf(selectedItems[0]) - 1 :
|
|
10507
|
+
var nextIndex = selectedItems.length > 0 ? items.indexOf(selectedItems[0]) - 1 : items.length - 1;
|
|
10483
10508
|
if (nextIndex === -1 && !p.clearable)
|
|
10484
10509
|
nextIndex = items.length - 1;
|
|
10485
10510
|
this.setSelectedItems(nextIndex === -1 ? [] : [items[nextIndex]]);
|
|
@@ -10493,9 +10518,11 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
10493
10518
|
|
|
10494
10519
|
var selectedItems = this.getSelectedItems();
|
|
10495
10520
|
var items = (_p$filteredItems2 = p.filteredItems) !== null && _p$filteredItems2 !== void 0 ? _p$filteredItems2 : p.items;
|
|
10521
|
+
if (p.currentItemsView && p.currentItemsView.length === items.length)
|
|
10522
|
+
items = p.currentItemsView;
|
|
10496
10523
|
if (items.length + (p.clearable ? 1 : 0) > 1) {
|
|
10497
10524
|
var nextIndex = selectedItems.length > 0 ? items.indexOf(selectedItems[0]) + 1 : 0;
|
|
10498
|
-
if (nextIndex ===
|
|
10525
|
+
if (nextIndex === items.length)
|
|
10499
10526
|
nextIndex = p.clearable ? -1 : 0;
|
|
10500
10527
|
this.setSelectedItems(nextIndex === -1 ? [] : [items[nextIndex]]);
|
|
10501
10528
|
}
|
|
@@ -10539,6 +10566,7 @@ var SelectBox = /*#__PURE__*/function () {
|
|
|
10539
10566
|
}
|
|
10540
10567
|
|
|
10541
10568
|
dropList.addItems(items);
|
|
10569
|
+
p.currentItemsView = items;
|
|
10542
10570
|
p.itemsChanged = false;
|
|
10543
10571
|
p.selectionChanged = true;
|
|
10544
10572
|
p.resortBySelectionNeeded = false;
|