@syncfusion/ej2-dropdowns 25.2.3 → 25.2.5
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/CHANGELOG.md +44 -0
- package/dist/ej2-dropdowns.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +236 -138
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +246 -147
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +2 -2
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +9 -9
- package/src/drop-down-base/drop-down-base.d.ts +8 -3
- package/src/drop-down-base/drop-down-base.js +40 -18
- package/src/drop-down-list/drop-down-list.d.ts +1 -0
- package/src/drop-down-list/drop-down-list.js +33 -10
- package/src/drop-down-tree/drop-down-tree.js +10 -6
- package/src/multi-select/float-label.js +1 -0
- package/src/multi-select/multi-select.d.ts +2 -0
- package/src/multi-select/multi-select.js +162 -113
- package/styles/material3-dark.css +10 -7
- package/styles/material3.css +10 -7
- package/styles/multi-select/_layout.scss +2 -2
- package/styles/multi-select/icons/_material3.scss +8 -5
- package/styles/multi-select/material3-dark.css +10 -7
- package/styles/multi-select/material3.css +10 -7
|
@@ -918,6 +918,8 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
918
918
|
_this.appendUncheckList = false;
|
|
919
919
|
_this.getInitialData = false;
|
|
920
920
|
_this.preventPopupOpen = true;
|
|
921
|
+
_this.virtualSelectAllState = false;
|
|
922
|
+
_this.CurrentEvent = null;
|
|
921
923
|
_this.virtualListInfo = {
|
|
922
924
|
currentPageNumber: null,
|
|
923
925
|
direction: null,
|
|
@@ -1517,8 +1519,8 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1517
1519
|
if (!isWhereExist_1) {
|
|
1518
1520
|
_this.remoteDataCount = e.count;
|
|
1519
1521
|
}
|
|
1520
|
-
_this.dataCount = e.count;
|
|
1521
|
-
_this.totalItemCount = e.count;
|
|
1522
|
+
_this.dataCount = !_this.virtualSelectAll ? e.count : _this.dataCount;
|
|
1523
|
+
_this.totalItemCount = !_this.virtualSelectAll ? e.count : _this.totalItemCount;
|
|
1522
1524
|
ulElement = _this.renderItems(listItems, fields);
|
|
1523
1525
|
_this.appendUncheckList = false;
|
|
1524
1526
|
_this.onActionComplete(ulElement, listItems, e);
|
|
@@ -1544,6 +1546,12 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1544
1546
|
if (_this.isVirtualizationEnabled) {
|
|
1545
1547
|
_this.getFilteringSkeletonCount();
|
|
1546
1548
|
}
|
|
1549
|
+
if (_this.virtualSelectAll && _this.virtualSelectAllData) {
|
|
1550
|
+
_this.virtualSelectionAll(_this.virtualSelectAllState, _this.liCollections, _this.CurrentEvent);
|
|
1551
|
+
_this.virtualSelectAllState = false;
|
|
1552
|
+
_this.CurrentEvent = null;
|
|
1553
|
+
_this.virtualSelectAll = false;
|
|
1554
|
+
}
|
|
1547
1555
|
}
|
|
1548
1556
|
});
|
|
1549
1557
|
}).catch(function (e) {
|
|
@@ -1595,11 +1603,11 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1595
1603
|
}
|
|
1596
1604
|
}
|
|
1597
1605
|
}
|
|
1598
|
-
if (isReOrder && (!(_this.dataSource instanceof DataManager) && !_this.isCustomDataUpdated)) {
|
|
1606
|
+
if (isReOrder && (!(_this.dataSource instanceof DataManager) && !_this.isCustomDataUpdated) && !_this.virtualSelectAll) {
|
|
1599
1607
|
// eslint-disable @typescript-eslint/no-explicit-any
|
|
1600
1608
|
_this.dataCount = _this.totalItemCount = _this.virtualSelectAll ? listItems.length : listItems.count;
|
|
1601
1609
|
}
|
|
1602
|
-
listItems = _this.isVirtualizationEnabled
|
|
1610
|
+
listItems = _this.isVirtualizationEnabled ? listItems.result : listItems;
|
|
1603
1611
|
// eslint-enable @typescript-eslint/no-explicit-any
|
|
1604
1612
|
var localDataArgs = { cancel: false, result: listItems };
|
|
1605
1613
|
_this.isPreventChange = _this.isAngular && _this.preventChange ? true : _this.isPreventChange;
|
|
@@ -1638,6 +1646,9 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1638
1646
|
DropDownBase.prototype.updatePopupState = function () {
|
|
1639
1647
|
// Used this method in component side.
|
|
1640
1648
|
};
|
|
1649
|
+
DropDownBase.prototype.virtualSelectionAll = function (state, li, event) {
|
|
1650
|
+
// Used this method in component side.
|
|
1651
|
+
};
|
|
1641
1652
|
DropDownBase.prototype.updateRemoteData = function () {
|
|
1642
1653
|
this.setListData(this.dataSource, this.fields, this.query);
|
|
1643
1654
|
};
|
|
@@ -1929,10 +1940,14 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1929
1940
|
}
|
|
1930
1941
|
};
|
|
1931
1942
|
DropDownBase.prototype.updateGroupFixedHeader = function (element, target) {
|
|
1932
|
-
this.fixedHeaderElement
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1943
|
+
if (this.fixedHeaderElement) {
|
|
1944
|
+
if (!isNullOrUndefined(element.innerHTML)) {
|
|
1945
|
+
this.fixedHeaderElement.innerHTML = element.innerHTML;
|
|
1946
|
+
}
|
|
1947
|
+
this.fixedHeaderElement.style.position = 'fixed';
|
|
1948
|
+
this.fixedHeaderElement.style.top = (this.list.parentElement.offsetTop + this.list.offsetTop) - window.scrollY + 'px';
|
|
1949
|
+
this.fixedHeaderElement.style.display = 'block';
|
|
1950
|
+
}
|
|
1936
1951
|
};
|
|
1937
1952
|
DropDownBase.prototype.getValidLi = function () {
|
|
1938
1953
|
if (this.isVirtualizationEnabled) {
|
|
@@ -2123,12 +2138,15 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2123
2138
|
* @param {string | number | boolean} value - Specifies given value.
|
|
2124
2139
|
* @returns {number} Returns the index of the item.
|
|
2125
2140
|
*/
|
|
2126
|
-
DropDownBase.prototype.getIndexByValueFilter = function (value) {
|
|
2141
|
+
DropDownBase.prototype.getIndexByValueFilter = function (value, ulElement) {
|
|
2127
2142
|
var index;
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2143
|
+
if (!ulElement) {
|
|
2144
|
+
return null;
|
|
2145
|
+
}
|
|
2146
|
+
var listItems = ulElement.querySelectorAll('li' + ':not(.e-list-group-item)');
|
|
2147
|
+
if (listItems) {
|
|
2148
|
+
for (var i = 0; i < listItems.length; i++) {
|
|
2149
|
+
if (!isNullOrUndefined(value) && listItems[i].getAttribute('data-value') === value.toString()) {
|
|
2132
2150
|
index = i;
|
|
2133
2151
|
break;
|
|
2134
2152
|
}
|
|
@@ -2290,6 +2308,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2290
2308
|
var group = this.element.querySelector('select>optgroup');
|
|
2291
2309
|
if ((this.fields.groupBy || !isNullOrUndefined(group)) && !this.isGroupChecking) {
|
|
2292
2310
|
EventHandler.add(this.list, 'scroll', this.setFloatingHeader, this);
|
|
2311
|
+
EventHandler.add(document, 'scroll', this.updateGroupFixedHeader, this);
|
|
2293
2312
|
}
|
|
2294
2313
|
if (this.getModuleName() === 'dropdownbase') {
|
|
2295
2314
|
if (this.element.getAttribute('tabindex')) {
|
|
@@ -2543,12 +2562,15 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2543
2562
|
* @returns {void}
|
|
2544
2563
|
*/
|
|
2545
2564
|
DropDownBase.prototype.destroy = function () {
|
|
2546
|
-
if (document
|
|
2547
|
-
EventHandler.remove(
|
|
2548
|
-
if (
|
|
2549
|
-
this.
|
|
2565
|
+
if (document) {
|
|
2566
|
+
EventHandler.remove(document, 'scroll', this.updateGroupFixedHeader);
|
|
2567
|
+
if (document.body.contains(this.list)) {
|
|
2568
|
+
EventHandler.remove(this.list, 'scroll', this.setFloatingHeader);
|
|
2569
|
+
if (!isNullOrUndefined(this.rippleFun)) {
|
|
2570
|
+
this.rippleFun();
|
|
2571
|
+
}
|
|
2572
|
+
detach(this.list);
|
|
2550
2573
|
}
|
|
2551
|
-
detach(this.list);
|
|
2552
2574
|
}
|
|
2553
2575
|
this.liCollections = null;
|
|
2554
2576
|
this.ulElement = null;
|
|
@@ -2712,6 +2734,12 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
2712
2734
|
_this.IsScrollerAtEnd = function () {
|
|
2713
2735
|
return this.list && this.list.scrollTop + this.list.clientHeight >= this.list.scrollHeight;
|
|
2714
2736
|
};
|
|
2737
|
+
_this.removeAllChildren = function (element) {
|
|
2738
|
+
while (element.children[0]) {
|
|
2739
|
+
this.removeAllChildren(element.children[0]);
|
|
2740
|
+
element.removeChild(element.children[0]);
|
|
2741
|
+
}
|
|
2742
|
+
};
|
|
2715
2743
|
return _this;
|
|
2716
2744
|
}
|
|
2717
2745
|
/**
|
|
@@ -3601,7 +3629,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3601
3629
|
}
|
|
3602
3630
|
if (this.allowFiltering && !this.enableVirtualization && this.getModuleName() !== 'autocomplete') {
|
|
3603
3631
|
var value_4 = this.getItemData().value;
|
|
3604
|
-
var filterIndex = this.getIndexByValueFilter(value_4);
|
|
3632
|
+
var filterIndex = this.getIndexByValueFilter(value_4, this.actionCompleteData.ulElement);
|
|
3605
3633
|
if (!isNullOrUndefined(filterIndex)) {
|
|
3606
3634
|
this.activeIndex = filterIndex;
|
|
3607
3635
|
}
|
|
@@ -3944,7 +3972,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3944
3972
|
value = 'null';
|
|
3945
3973
|
}
|
|
3946
3974
|
if (this.allowFiltering && !this.enableVirtualization && this.getModuleName() !== 'autocomplete') {
|
|
3947
|
-
var filterIndex = this.getIndexByValueFilter(value);
|
|
3975
|
+
var filterIndex = this.getIndexByValueFilter(value, this.actionCompleteData.ulElement);
|
|
3948
3976
|
if (!isNullOrUndefined(filterIndex)) {
|
|
3949
3977
|
this.activeIndex = filterIndex;
|
|
3950
3978
|
}
|
|
@@ -3986,7 +4014,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3986
4014
|
this.inputElement.style.display = 'block';
|
|
3987
4015
|
}
|
|
3988
4016
|
if (!isNullOrUndefined(dataItem.value) && !this.enableVirtualization && this.allowFiltering) {
|
|
3989
|
-
this.activeIndex = this.getIndexByValueFilter(dataItem.value);
|
|
4017
|
+
this.activeIndex = this.getIndexByValueFilter(dataItem.value, this.actionCompleteData.ulElement);
|
|
3990
4018
|
}
|
|
3991
4019
|
var clearIcon = dropDownListClasses.clearIcon;
|
|
3992
4020
|
var isFilterElement = this.isFiltering() && this.filterInput && (this.getModuleName() === 'combobox');
|
|
@@ -5073,7 +5101,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5073
5101
|
_this.popupContentElement.setAttribute('id', 'no-record');
|
|
5074
5102
|
}
|
|
5075
5103
|
_this.inputElement.setAttribute('aria-expanded', 'true');
|
|
5076
|
-
_this.inputElement.setAttribute('aria-controls', _this.element.id);
|
|
5104
|
+
_this.inputElement.setAttribute('aria-controls', _this.element.id + '_popup');
|
|
5077
5105
|
var inputParent = _this.isFiltering() ? _this.filterInput.parentElement : _this.inputWrapper.container;
|
|
5078
5106
|
addClass([inputParent], [dropDownListClasses.inputFocus]);
|
|
5079
5107
|
var animModel = { name: 'FadeIn', duration: 100 };
|
|
@@ -5454,6 +5482,14 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5454
5482
|
this.keyboardEvent = null;
|
|
5455
5483
|
EventHandler.remove(document, 'mousedown', this.onDocumentClick);
|
|
5456
5484
|
this.isActive = false;
|
|
5485
|
+
if (this.getModuleName() === 'dropdownlist') {
|
|
5486
|
+
Input.destroy({
|
|
5487
|
+
element: this.filterInput,
|
|
5488
|
+
floatLabelType: this.floatLabelType,
|
|
5489
|
+
properties: { placeholder: this.filterBarPlaceholder },
|
|
5490
|
+
buttons: this.clearIconElement,
|
|
5491
|
+
}, this.clearIconElement);
|
|
5492
|
+
}
|
|
5457
5493
|
this.filterInputObj = null;
|
|
5458
5494
|
this.isDropDownClick = false;
|
|
5459
5495
|
this.preventAutoFill = false;
|
|
@@ -5485,6 +5521,11 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5485
5521
|
}
|
|
5486
5522
|
if (this.allowFiltering && this.getModuleName() === 'dropdownlist') {
|
|
5487
5523
|
this.filterInput.removeAttribute('aria-activedescendant');
|
|
5524
|
+
this.filterInput.removeAttribute('aria-disabled');
|
|
5525
|
+
this.filterInput.removeAttribute('role');
|
|
5526
|
+
this.filterInput.removeAttribute('autocomplete');
|
|
5527
|
+
this.filterInput.removeAttribute('autocapitalize');
|
|
5528
|
+
this.filterInput.removeAttribute('spellcheck');
|
|
5488
5529
|
}
|
|
5489
5530
|
this.filterInput = null;
|
|
5490
5531
|
}
|
|
@@ -5604,6 +5645,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5604
5645
|
DropDownList.prototype.destroyPopup = function () {
|
|
5605
5646
|
this.isPopupOpen = false;
|
|
5606
5647
|
this.isFilterFocus = false;
|
|
5648
|
+
this.inputElement.removeAttribute('aria-controls');
|
|
5607
5649
|
if (this.popupObj) {
|
|
5608
5650
|
this.popupObj.destroy();
|
|
5609
5651
|
detach(this.popupObj.element);
|
|
@@ -5694,7 +5736,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5694
5736
|
attributes(this.targetElement(), { 'aria-label': this.getModuleName() });
|
|
5695
5737
|
this.inputElement.setAttribute('aria-label', this.getModuleName());
|
|
5696
5738
|
this.inputElement.setAttribute('aria-expanded', 'false');
|
|
5697
|
-
this.inputElement.setAttribute('aria-controls', this.element.id + '_popups');
|
|
5698
5739
|
}
|
|
5699
5740
|
attributes(this.targetElement(), this.getAriaAttributes());
|
|
5700
5741
|
this.updateDataAttribute(this.htmlAttributes);
|
|
@@ -5912,8 +5953,8 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5912
5953
|
DropDownList.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
5913
5954
|
var _this = this;
|
|
5914
5955
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5915
|
-
if (!isNullOrUndefined(newProp.dataSource) && !this.isTouched && (isNullOrUndefined(newProp.value) && isNullOrUndefined(newProp.index)) && !isNullOrUndefined(this.preselectedIndex)) {
|
|
5916
|
-
newProp.index = this.
|
|
5956
|
+
if (!isNullOrUndefined(newProp.dataSource) && !this.isTouched && (isNullOrUndefined(newProp.value) && isNullOrUndefined(newProp.index)) && !isNullOrUndefined(this.preselectedIndex) && !isNullOrUndefined(this.index)) {
|
|
5957
|
+
newProp.index = this.index;
|
|
5917
5958
|
}
|
|
5918
5959
|
if (!isNullOrUndefined(newProp.value) || !isNullOrUndefined(newProp.index)) {
|
|
5919
5960
|
this.isTouched = true;
|
|
@@ -6434,10 +6475,12 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6434
6475
|
this.inputWrapper.container.parentElement.insertBefore(this.element, this.inputWrapper.container);
|
|
6435
6476
|
detach(this.inputWrapper.container);
|
|
6436
6477
|
}
|
|
6437
|
-
this.hiddenElement
|
|
6478
|
+
delete this.hiddenElement;
|
|
6438
6479
|
this.filterInput = null;
|
|
6439
|
-
this.inputWrapper = null;
|
|
6440
6480
|
this.keyboardModule = null;
|
|
6481
|
+
if (!isNullOrUndefined(this.ulElement)) {
|
|
6482
|
+
this.removeAllChildren(this.ulElement);
|
|
6483
|
+
}
|
|
6441
6484
|
this.ulElement = null;
|
|
6442
6485
|
this.list = null;
|
|
6443
6486
|
this.clearIconElement = null;
|
|
@@ -6461,10 +6504,12 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6461
6504
|
Input.destroy({
|
|
6462
6505
|
element: this.inputElement,
|
|
6463
6506
|
floatLabelType: this.floatLabelType,
|
|
6464
|
-
properties: this.properties
|
|
6507
|
+
properties: this.properties,
|
|
6508
|
+
buttons: this.inputWrapper.container.querySelectorAll('.e-input-group-icon')[0],
|
|
6465
6509
|
}, this.clearButton);
|
|
6466
6510
|
this.clearButton = null;
|
|
6467
6511
|
this.inputElement = null;
|
|
6512
|
+
this.inputWrapper = null;
|
|
6468
6513
|
_super.prototype.destroy.call(this);
|
|
6469
6514
|
};
|
|
6470
6515
|
/* eslint-disable valid-jsdoc, jsdoc/require-returns-description */
|
|
@@ -8205,10 +8250,14 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8205
8250
|
focusedElement.focus();
|
|
8206
8251
|
addClass([focusedElement], ['e-node-focus']);
|
|
8207
8252
|
}
|
|
8208
|
-
if (_this.
|
|
8209
|
-
var
|
|
8210
|
-
_this.
|
|
8211
|
-
_this.checkSelectAll
|
|
8253
|
+
if (_this.treeObj.checkedNodes.length > 0) {
|
|
8254
|
+
var nodes = _this.treeObj.element.querySelectorAll('li');
|
|
8255
|
+
var checkedNodes = _this.treeObj.element.querySelectorAll('li[aria-checked=true]');
|
|
8256
|
+
if ((checkedNodes.length === nodes.length || _this.checkSelectAll) && _this.checkBoxElement) {
|
|
8257
|
+
var wrap = closest(_this.checkBoxElement, '.' + CHECKBOXWRAP);
|
|
8258
|
+
_this.changeState(wrap, 'check');
|
|
8259
|
+
_this.checkSelectAll = false;
|
|
8260
|
+
}
|
|
8212
8261
|
}
|
|
8213
8262
|
if (_this.allowFiltering) {
|
|
8214
8263
|
removeClass([_this.inputWrapper], [INPUTFOCUS]);
|
|
@@ -8556,6 +8605,8 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8556
8605
|
if (this.showCheckBox) {
|
|
8557
8606
|
return;
|
|
8558
8607
|
}
|
|
8608
|
+
var eventArgs = this.getEventArgs(args);
|
|
8609
|
+
this.trigger('select', eventArgs);
|
|
8559
8610
|
var selectedText;
|
|
8560
8611
|
if (args.isInteracted) {
|
|
8561
8612
|
var id = getValue('id', args.nodeData).toString();
|
|
@@ -8583,8 +8634,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8583
8634
|
this.setMultiSelect();
|
|
8584
8635
|
}
|
|
8585
8636
|
}
|
|
8586
|
-
var eventArgs = this.getEventArgs(args);
|
|
8587
|
-
this.trigger('select', eventArgs);
|
|
8588
8637
|
if (this.isValueChange && !this.changeOnBlur) {
|
|
8589
8638
|
this.triggerChangeEvent(this.keyEventArgs);
|
|
8590
8639
|
this.isValueChange = false;
|
|
@@ -11459,6 +11508,7 @@ function createFloatLabel(overAllWrapper, searchWrapper, element, inputElement,
|
|
|
11459
11508
|
element.id = id;
|
|
11460
11509
|
if (!isNullOrUndefined(element.id) && element.id !== '') {
|
|
11461
11510
|
floatLabelElement.id = 'label_' + element.id.replace(/ /g, '_');
|
|
11511
|
+
floatLabelElement.setAttribute('for', element.id);
|
|
11462
11512
|
attributes(inputElement, { 'aria-labelledby': floatLabelElement.id });
|
|
11463
11513
|
}
|
|
11464
11514
|
if (!isNullOrUndefined(inputElement.placeholder) && inputElement.placeholder !== '') {
|
|
@@ -11680,6 +11730,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
11680
11730
|
_this.resetMainList = null;
|
|
11681
11731
|
_this.resetFilteredData = false;
|
|
11682
11732
|
_this.preventSetCurrentData = false;
|
|
11733
|
+
_this.isSelectAllLoop = false;
|
|
11683
11734
|
_this.scrollFocusStatus = false;
|
|
11684
11735
|
_this.keyDownStatus = false;
|
|
11685
11736
|
_this.IsScrollerAtEnd = function () {
|
|
@@ -12007,7 +12058,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12007
12058
|
if (!isNullOrUndefined(this.value)) {
|
|
12008
12059
|
this.tempValues = this.allowObjectBinding ? this.value.slice() : this.value.slice();
|
|
12009
12060
|
}
|
|
12010
|
-
var customValue = this.allowObjectBinding ? this.getDataByValue(value) : this.getFormattedValue(value);
|
|
12061
|
+
var customValue = this.allowObjectBinding ? this.getDataByValue(this.getFormattedValue(value)) : this.getFormattedValue(value);
|
|
12011
12062
|
if (this.allowCustomValue && (value !== 'false' && customValue === false || (!isNullOrUndefined(customValue) &&
|
|
12012
12063
|
customValue.toString() === 'NaN'))) {
|
|
12013
12064
|
customValue = value;
|
|
@@ -12381,6 +12432,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12381
12432
|
if (this.enableVirtualization && (this.viewPortInfo.endIndex != 0) && !this.virtualSelectAll) {
|
|
12382
12433
|
return this.virtualFilterQuery(filterQuery);
|
|
12383
12434
|
}
|
|
12435
|
+
if (this.virtualSelectAll) {
|
|
12436
|
+
return query ? query.take(this.maximumSelectionLength).requiresCount() : this.query ? this.query.take(this.maximumSelectionLength).requiresCount() : new Query().take(this.maximumSelectionLength).requiresCount();
|
|
12437
|
+
}
|
|
12384
12438
|
return query ? query : this.query ? this.query : new Query();
|
|
12385
12439
|
}
|
|
12386
12440
|
};
|
|
@@ -13550,7 +13604,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13550
13604
|
this.removeChipSelection();
|
|
13551
13605
|
this.addChipSelection(temp, e);
|
|
13552
13606
|
}
|
|
13553
|
-
var currentChip = this.allowObjectBinding ? this.getDataByValue(selectedElem.getAttribute('data-value')) : selectedElem.getAttribute('data-value');
|
|
13607
|
+
var currentChip = this.allowObjectBinding ? this.getDataByValue(this.getFormattedValue(selectedElem.getAttribute('data-value'))) : selectedElem.getAttribute('data-value');
|
|
13554
13608
|
this.removeValue(currentChip, e);
|
|
13555
13609
|
this.makeTextBoxEmpty();
|
|
13556
13610
|
}
|
|
@@ -13737,7 +13791,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13737
13791
|
if (this.enabled && !this.readonly) {
|
|
13738
13792
|
var element = e.target.parentElement;
|
|
13739
13793
|
var customVal = element.getAttribute('data-value');
|
|
13740
|
-
var value = this.allowObjectBinding ? this.getDataByValue(customVal) : this.getFormattedValue(customVal);
|
|
13794
|
+
var value = this.allowObjectBinding ? this.getDataByValue(this.getFormattedValue(customVal)) : this.getFormattedValue(customVal);
|
|
13741
13795
|
if (this.allowCustomValue && ((customVal !== 'false' && value === false) ||
|
|
13742
13796
|
(!isNullOrUndefined(value) && value.toString() === 'NaN'))) {
|
|
13743
13797
|
value = customVal;
|
|
@@ -13828,8 +13882,8 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13828
13882
|
dropDownBaseClasses.selected;
|
|
13829
13883
|
if (index !== -1) {
|
|
13830
13884
|
var currentValue = this.allowObjectBinding ? getValue(((this.fields.value) ? this.fields.value : ''), value) : value;
|
|
13831
|
-
var element_1 = this.findListElement(this.list, 'li', 'data-value', currentValue);
|
|
13832
|
-
var val_1 = this.getDataByValue(value);
|
|
13885
|
+
var element_1 = this.virtualSelectAll ? null : this.findListElement(this.list, 'li', 'data-value', currentValue);
|
|
13886
|
+
var val_1 = this.allowObjectBinding ? value : this.getDataByValue(value);
|
|
13833
13887
|
var eventArgs = {
|
|
13834
13888
|
e: eve,
|
|
13835
13889
|
item: element_1,
|
|
@@ -14017,9 +14071,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14017
14071
|
this.value = [];
|
|
14018
14072
|
}
|
|
14019
14073
|
var currentValue = this.allowObjectBinding ? this.getDataByValue(value) : value;
|
|
14020
|
-
if ((this.allowObjectBinding && !this.isObjectInArray(value, this.value)) || (!this.allowObjectBinding && this.value.indexOf(currentValue) < 0)) {
|
|
14074
|
+
if ((this.allowObjectBinding && !this.isObjectInArray(this.getDataByValue(value), this.value)) || (!this.allowObjectBinding && this.value.indexOf(currentValue) < 0)) {
|
|
14021
14075
|
this.setProperties({ value: [].concat([], this.value, [currentValue]) }, true);
|
|
14022
|
-
if (this.enableVirtualization) {
|
|
14076
|
+
if (this.enableVirtualization && !this.isSelectAllLoop) {
|
|
14023
14077
|
var data = this.viewWrapper.innerHTML;
|
|
14024
14078
|
var temp = void 0;
|
|
14025
14079
|
data += (this.value.length === 1) ? '' : this.delimiterChar + ' ';
|
|
@@ -14860,7 +14914,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14860
14914
|
if (!this.enableVirtualization) {
|
|
14861
14915
|
this.listData = this.mainData;
|
|
14862
14916
|
}
|
|
14863
|
-
if (!isNullOrUndefined(this.hiddenElement)) {
|
|
14917
|
+
if (!isNullOrUndefined(this.hiddenElement) && !this.enableVirtualization) {
|
|
14864
14918
|
this.hiddenElement.innerHTML = '';
|
|
14865
14919
|
}
|
|
14866
14920
|
if (!isNullOrUndefined(this.value)) {
|
|
@@ -14888,7 +14942,27 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14888
14942
|
var textValues = this.text != null && this.text != "" ? this.text + ',' + temp : temp;
|
|
14889
14943
|
data += temp + delimiterChar + ' ';
|
|
14890
14944
|
text.push(textValues);
|
|
14891
|
-
hiddenElementContent
|
|
14945
|
+
hiddenElementContent = this.hiddenElement.innerHTML;
|
|
14946
|
+
if ((e && e.currentTarget && e.currentTarget.classList.contains('e-chips-close')) || (e && (e.key === 'Backspace'))) {
|
|
14947
|
+
var item = e.target.parentElement.getAttribute('data-value');
|
|
14948
|
+
if (e.key === 'Backspace') {
|
|
14949
|
+
var lastChild = this.hiddenElement.lastChild;
|
|
14950
|
+
if (lastChild) {
|
|
14951
|
+
this.hiddenElement.removeChild(lastChild);
|
|
14952
|
+
}
|
|
14953
|
+
}
|
|
14954
|
+
else {
|
|
14955
|
+
this.hiddenElement.childNodes.forEach(function (option) {
|
|
14956
|
+
if (option.value === item) {
|
|
14957
|
+
option.parentNode.removeChild(option);
|
|
14958
|
+
}
|
|
14959
|
+
});
|
|
14960
|
+
}
|
|
14961
|
+
hiddenElementContent = this.hiddenElement.innerHTML;
|
|
14962
|
+
}
|
|
14963
|
+
else {
|
|
14964
|
+
hiddenElementContent += "<option selected value=\"" + value + "\">" + index + "</option>";
|
|
14965
|
+
}
|
|
14892
14966
|
break;
|
|
14893
14967
|
}
|
|
14894
14968
|
else {
|
|
@@ -15107,7 +15181,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15107
15181
|
};
|
|
15108
15182
|
MultiSelect.prototype.updateListSelection = function (li, e, length) {
|
|
15109
15183
|
var customVal = li.getAttribute('data-value');
|
|
15110
|
-
var value = this.allowObjectBinding ? this.getDataByValue(customVal) : this.getFormattedValue(customVal);
|
|
15184
|
+
var value = this.allowObjectBinding ? this.getDataByValue(this.getFormattedValue(customVal)) : this.getFormattedValue(customVal);
|
|
15111
15185
|
if (this.allowCustomValue && ((customVal !== 'false' && value === false) ||
|
|
15112
15186
|
(!isNullOrUndefined(value) && value.toString() === 'NaN'))) {
|
|
15113
15187
|
value = customVal;
|
|
@@ -15813,14 +15887,14 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15813
15887
|
var li;
|
|
15814
15888
|
if (!isNullOrUndefined(this.list)) {
|
|
15815
15889
|
li = this.list.querySelectorAll(state ?
|
|
15816
|
-
'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide)' :
|
|
15817
|
-
'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)');
|
|
15890
|
+
'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-virtual-list)' :
|
|
15891
|
+
'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-virtual-list)');
|
|
15818
15892
|
}
|
|
15819
15893
|
if (this.value && this.value.length && event && event.target
|
|
15820
15894
|
&& closest(event.target, '.e-close-hooker') && this.allowFiltering) {
|
|
15821
15895
|
li = this.mainList.querySelectorAll(state ?
|
|
15822
|
-
'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide)' :
|
|
15823
|
-
'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)');
|
|
15896
|
+
'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-virtual-list)' :
|
|
15897
|
+
'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-virtual-list)');
|
|
15824
15898
|
}
|
|
15825
15899
|
if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !isNullOrUndefined(this.fields.groupBy)) {
|
|
15826
15900
|
var target = (event ? (this.groupTemplate ? closest(event.target, '.e-list-group-item') : event.target) : null);
|
|
@@ -15882,6 +15956,108 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15882
15956
|
}
|
|
15883
15957
|
this.addValidInputClass();
|
|
15884
15958
|
};
|
|
15959
|
+
MultiSelect.prototype.virtualSelectionAll = function (state, li, event) {
|
|
15960
|
+
var _this = this;
|
|
15961
|
+
var index = 0;
|
|
15962
|
+
var length = li.length;
|
|
15963
|
+
var count = this.maximumSelectionLength;
|
|
15964
|
+
if (state) {
|
|
15965
|
+
length = this.virtualSelectAllData && this.virtualSelectAllData.length != 0 ? this.virtualSelectAllData.length : length;
|
|
15966
|
+
this.listData = this.virtualSelectAllData;
|
|
15967
|
+
var ulElement = this.createListItems(this.virtualSelectAllData.slice(0, 30), this.fields);
|
|
15968
|
+
var firstItems = ulElement.querySelectorAll('li');
|
|
15969
|
+
var fragment_1 = document.createDocumentFragment();
|
|
15970
|
+
firstItems.forEach(function (node) {
|
|
15971
|
+
fragment_1.appendChild(node.cloneNode(true));
|
|
15972
|
+
});
|
|
15973
|
+
li.forEach(function (node) {
|
|
15974
|
+
fragment_1.appendChild(node.cloneNode(true));
|
|
15975
|
+
});
|
|
15976
|
+
var concatenatedNodeList = fragment_1.childNodes;
|
|
15977
|
+
if (this.virtualSelectAllData instanceof Array) {
|
|
15978
|
+
while (index < length && index <= 50 && index < count) {
|
|
15979
|
+
this.isSelectAllTarget = (length === index + 1);
|
|
15980
|
+
if (concatenatedNodeList[index]) {
|
|
15981
|
+
var value = this.allowObjectBinding ? this.getDataByValue(concatenatedNodeList[index].getAttribute('data-value')) : this.getFormattedValue(concatenatedNodeList[index].getAttribute('data-value'));
|
|
15982
|
+
if (((!this.allowObjectBinding && this.value && this.value.indexOf(value) >= 0) || (this.allowObjectBinding && this.indexOfObjectInArray(value, this.value) >= 0))) {
|
|
15983
|
+
index++;
|
|
15984
|
+
continue;
|
|
15985
|
+
}
|
|
15986
|
+
this.updateListSelection(concatenatedNodeList[index], event, length - index);
|
|
15987
|
+
}
|
|
15988
|
+
else {
|
|
15989
|
+
var value = getValue((this.fields.value) ? this.fields.value : '', this.virtualSelectAllData[index]);
|
|
15990
|
+
value = this.allowObjectBinding ? this.getDataByValue(value) : value;
|
|
15991
|
+
if (((!this.allowObjectBinding && this.value && this.value.indexOf(value) >= 0) || (this.allowObjectBinding && this.indexOfObjectInArray(value, this.value) >= 0))) {
|
|
15992
|
+
index++;
|
|
15993
|
+
continue;
|
|
15994
|
+
}
|
|
15995
|
+
if (this.value && value != null && Array.isArray(this.value) && ((!this.allowObjectBinding && this.value.indexOf(value) < 0) || (this.allowObjectBinding && !this.isObjectInArray(value, this.value)))) {
|
|
15996
|
+
this.dispatchSelect(value, event, null, false, length);
|
|
15997
|
+
}
|
|
15998
|
+
}
|
|
15999
|
+
index++;
|
|
16000
|
+
}
|
|
16001
|
+
if (length > 50) {
|
|
16002
|
+
setTimeout(function () {
|
|
16003
|
+
if (_this.virtualSelectAllData && _this.virtualSelectAllData.length > 0) {
|
|
16004
|
+
_this.virtualSelectAllData.map(function (obj) {
|
|
16005
|
+
if (_this.value && obj[_this.fields.value] != null && Array.isArray(_this.value) && ((!_this.allowObjectBinding && _this.value.indexOf(obj[_this.fields.value]) < 0) || (_this.allowObjectBinding && !_this.isObjectInArray(obj[_this.fields.value], _this.value)))) {
|
|
16006
|
+
_this.dispatchSelect(obj[_this.fields.value], event, null, false, length);
|
|
16007
|
+
}
|
|
16008
|
+
});
|
|
16009
|
+
}
|
|
16010
|
+
_this.updatedataValueItems(event);
|
|
16011
|
+
_this.isSelectAllLoop = false;
|
|
16012
|
+
if (!_this.changeOnBlur) {
|
|
16013
|
+
_this.updateValueState(event, _this.value, _this.tempValues);
|
|
16014
|
+
_this.isSelectAll = _this.isSelectAll ? !_this.isSelectAll : _this.isSelectAll;
|
|
16015
|
+
}
|
|
16016
|
+
_this.updateHiddenElement();
|
|
16017
|
+
if (_this.popupWrapper && li[index - 1] && li[index - 1].classList.contains('e-item-focus')) {
|
|
16018
|
+
var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
|
|
16019
|
+
if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
|
|
16020
|
+
li[index - 1].classList.remove('e-item-focus');
|
|
16021
|
+
}
|
|
16022
|
+
}
|
|
16023
|
+
}, 0);
|
|
16024
|
+
}
|
|
16025
|
+
}
|
|
16026
|
+
}
|
|
16027
|
+
else {
|
|
16028
|
+
if (this.virtualSelectAllData && this.virtualSelectAllData.length > 0) {
|
|
16029
|
+
this.virtualSelectAllData.map(function (obj) {
|
|
16030
|
+
_this.virtualSelectAll = true;
|
|
16031
|
+
_this.removeValue(_this.value[index], event, _this.value.length - index);
|
|
16032
|
+
});
|
|
16033
|
+
}
|
|
16034
|
+
this.updatedataValueItems(event);
|
|
16035
|
+
if (!this.changeOnBlur) {
|
|
16036
|
+
this.updateValueState(event, this.value, this.tempValues);
|
|
16037
|
+
this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;
|
|
16038
|
+
}
|
|
16039
|
+
this.updateHiddenElement();
|
|
16040
|
+
this.value = [];
|
|
16041
|
+
this.virtualSelectAll = false;
|
|
16042
|
+
if (!isNullOrUndefined(this.viewPortInfo.startIndex) && !isNullOrUndefined(this.viewPortInfo.endIndex)) {
|
|
16043
|
+
this.notify("setCurrentViewDataAsync", {
|
|
16044
|
+
component: this.getModuleName(),
|
|
16045
|
+
module: "VirtualScroll",
|
|
16046
|
+
});
|
|
16047
|
+
}
|
|
16048
|
+
}
|
|
16049
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16050
|
+
var virtualTrackElement = this.list.getElementsByClassName('e-virtual-ddl')[0];
|
|
16051
|
+
if (virtualTrackElement) {
|
|
16052
|
+
(virtualTrackElement).style = this.GetVirtualTrackHeight();
|
|
16053
|
+
}
|
|
16054
|
+
this.UpdateSkeleton();
|
|
16055
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16056
|
+
var virtualContentElement = this.list.getElementsByClassName('e-virtual-ddl-content')[0];
|
|
16057
|
+
if (virtualContentElement) {
|
|
16058
|
+
(virtualContentElement).style = this.getTransformValues();
|
|
16059
|
+
}
|
|
16060
|
+
};
|
|
15885
16061
|
MultiSelect.prototype.updateValue = function (event, li, state) {
|
|
15886
16062
|
var _this = this;
|
|
15887
16063
|
var length = li.length;
|
|
@@ -15905,95 +16081,14 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15905
16081
|
}
|
|
15906
16082
|
if (!beforeSelectArgs.preventSelectEvent) {
|
|
15907
16083
|
if (this.enableVirtualization) {
|
|
15908
|
-
|
|
15909
|
-
|
|
16084
|
+
this.virtualSelectAll = true;
|
|
16085
|
+
this.virtualSelectAllState = state;
|
|
16086
|
+
this.CurrentEvent = event;
|
|
16087
|
+
if (!this.virtualSelectAllData) {
|
|
15910
16088
|
this.resetList(this.dataSource, this.fields, new Query());
|
|
15911
|
-
if (this.virtualSelectAllData instanceof Array) {
|
|
15912
|
-
for (var i = 0; i < this.virtualSelectAllData.length; i++) {
|
|
15913
|
-
if (li[this.skeletonCount + i]) {
|
|
15914
|
-
var value_2 = this.allowObjectBinding ? this.getDataByValue(li[this.skeletonCount + i].getAttribute('data-value')) : this.getFormattedValue(li[this.skeletonCount + i].getAttribute('data-value'));
|
|
15915
|
-
if (((!this.allowObjectBinding && this.value && this.value.indexOf(value_2) === 1) || (this.allowObjectBinding && this.indexOfObjectInArray(value_2, this.value) === 1))) {
|
|
15916
|
-
continue;
|
|
15917
|
-
}
|
|
15918
|
-
this.updateListSelection(li[this.skeletonCount + i], event, length - i);
|
|
15919
|
-
}
|
|
15920
|
-
else {
|
|
15921
|
-
if (this.fields) {
|
|
15922
|
-
var value_3 = getValue(this.fields.value, this.virtualSelectAllData[i]);
|
|
15923
|
-
value_3 = this.allowObjectBinding ? this.getDataByValue(value_3) : value_3;
|
|
15924
|
-
if (((!this.allowObjectBinding && this.value && this.value.indexOf(value_3) === 1) || (this.allowObjectBinding && this.indexOfObjectInArray(value_3, this.value) === 1))) {
|
|
15925
|
-
continue;
|
|
15926
|
-
}
|
|
15927
|
-
if (this.value && value_3 != null && Array.isArray(this.value) && ((!this.allowObjectBinding && this.value.indexOf(value_3) < 0) || (this.allowObjectBinding && !this.isObjectInArray(value_3, this.value)))) {
|
|
15928
|
-
this.dispatchSelect(value_3, event, null, false, length);
|
|
15929
|
-
}
|
|
15930
|
-
}
|
|
15931
|
-
}
|
|
15932
|
-
}
|
|
15933
|
-
if (this.virtualSelectAllData && this.value.length != this.virtualSelectAllData.length && this.virtualItemStartIndex != 0) {
|
|
15934
|
-
if (this.virtualItemStartIndex > this.itemCount) {
|
|
15935
|
-
for (var i = 0; i < this.itemCount; i++) {
|
|
15936
|
-
if (this.fields) {
|
|
15937
|
-
var value_4 = getValue(this.fields.value, this.virtualSelectAllData[i]);
|
|
15938
|
-
value_4 = this.allowObjectBinding ? this.getDataByValue(value_4) : value_4;
|
|
15939
|
-
if (this.value && value_4 != null && Array.isArray(this.value) && ((!this.allowObjectBinding && this.value.indexOf(value_4) < 0) || (this.allowObjectBinding && !this.isObjectInArray(value_4, this.value)))) {
|
|
15940
|
-
this.setProperties({ value: [].concat([], this.value, this.allowObjectBinding ? [this.virtualSelectAllData[i]] : [value_4]) }, true);
|
|
15941
|
-
}
|
|
15942
|
-
}
|
|
15943
|
-
}
|
|
15944
|
-
}
|
|
15945
|
-
}
|
|
15946
|
-
else {
|
|
15947
|
-
for (var i = 0; i < this.virtualItemStartIndex; i++) {
|
|
15948
|
-
if (this.fields) {
|
|
15949
|
-
var value = getValue(this.fields.value, this.virtualSelectAllData[i]);
|
|
15950
|
-
value = this.allowObjectBinding ? this.getDataByValue(value) : value;
|
|
15951
|
-
if (Array.isArray(this.value) && ((!this.allowObjectBinding && this.value.indexOf(value) < 0) || (this.allowObjectBinding && !this.isObjectInArray(value, this.value)))) {
|
|
15952
|
-
this.setProperties({ value: [].concat([], this.value, this.allowObjectBinding ? [this.virtualSelectAllData[i]] : [value]) }, true);
|
|
15953
|
-
}
|
|
15954
|
-
}
|
|
15955
|
-
}
|
|
15956
|
-
}
|
|
15957
|
-
}
|
|
15958
16089
|
}
|
|
15959
|
-
|
|
15960
|
-
|
|
15961
|
-
this.removeValue(this.value[index_2], event, this.value.length - index_2);
|
|
15962
|
-
index_2++;
|
|
15963
|
-
}
|
|
15964
|
-
if (length > 50) {
|
|
15965
|
-
setTimeout(function () {
|
|
15966
|
-
while (index_2 < _this.value.length && index_2 < count_1 && _this.value.length > 0) {
|
|
15967
|
-
_this.removeValue(value[index_2], event, _this.value.length - index_2);
|
|
15968
|
-
index_2++;
|
|
15969
|
-
}
|
|
15970
|
-
_this.updatedataValueItems(event);
|
|
15971
|
-
if (!_this.changeOnBlur) {
|
|
15972
|
-
_this.updateValueState(event, _this.value, _this.tempValues);
|
|
15973
|
-
_this.isSelectAll = _this.isSelectAll ? !_this.isSelectAll : _this.isSelectAll;
|
|
15974
|
-
}
|
|
15975
|
-
_this.updateHiddenElement();
|
|
15976
|
-
}, 0);
|
|
15977
|
-
}
|
|
15978
|
-
this.value = [];
|
|
15979
|
-
this.virtualSelectAll = false;
|
|
15980
|
-
if (!isNullOrUndefined(this.viewPortInfo.startIndex) && !isNullOrUndefined(this.viewPortInfo.endIndex)) {
|
|
15981
|
-
this.notify("setCurrentViewDataAsync", {
|
|
15982
|
-
component: this.getModuleName(),
|
|
15983
|
-
module: "VirtualScroll",
|
|
15984
|
-
});
|
|
15985
|
-
}
|
|
15986
|
-
}
|
|
15987
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15988
|
-
var virtualTrackElement = this.list.getElementsByClassName('e-virtual-ddl')[0];
|
|
15989
|
-
if (virtualTrackElement) {
|
|
15990
|
-
(virtualTrackElement).style = this.GetVirtualTrackHeight();
|
|
15991
|
-
}
|
|
15992
|
-
this.UpdateSkeleton();
|
|
15993
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15994
|
-
var virtualContentElement = this.list.getElementsByClassName('e-virtual-ddl-content')[0];
|
|
15995
|
-
if (virtualContentElement) {
|
|
15996
|
-
(virtualContentElement).style = this.getTransformValues();
|
|
16090
|
+
if (this.virtualSelectAllData) {
|
|
16091
|
+
this.virtualSelectionAll(state, li, event);
|
|
15997
16092
|
}
|
|
15998
16093
|
}
|
|
15999
16094
|
else {
|
|
@@ -16032,29 +16127,29 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16032
16127
|
}
|
|
16033
16128
|
}
|
|
16034
16129
|
else {
|
|
16035
|
-
for (var
|
|
16130
|
+
for (var i = 0; i < li.length && i < count_1; i++) {
|
|
16036
16131
|
this.removeHover();
|
|
16037
|
-
var customVal = li[
|
|
16038
|
-
var
|
|
16039
|
-
|
|
16132
|
+
var customVal = li[i].getAttribute('data-value');
|
|
16133
|
+
var value = this.getFormattedValue(customVal);
|
|
16134
|
+
value = this.allowObjectBinding ? this.getDataByValue(value) : value;
|
|
16040
16135
|
var mainElement = this.mainList ? this.mainList.querySelectorAll(state ?
|
|
16041
16136
|
'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide)' :
|
|
16042
|
-
'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)')[
|
|
16137
|
+
'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)')[i] : null;
|
|
16043
16138
|
if (state) {
|
|
16044
16139
|
this.value = !this.value ? [] : this.value;
|
|
16045
|
-
if ((!this.allowObjectBinding && this.value.indexOf(
|
|
16046
|
-
this.setProperties({ value: [].concat([], this.value, [
|
|
16140
|
+
if ((!this.allowObjectBinding && this.value.indexOf(value) < 0) || (this.allowObjectBinding && !this.isObjectInArray(value, this.value))) {
|
|
16141
|
+
this.setProperties({ value: [].concat([], this.value, [value]) }, true);
|
|
16047
16142
|
}
|
|
16048
16143
|
this.removeFocus();
|
|
16049
|
-
this.addListSelection(li[
|
|
16144
|
+
this.addListSelection(li[i], mainElement);
|
|
16050
16145
|
this.updateChipStatus();
|
|
16051
16146
|
this.checkMaxSelection();
|
|
16052
16147
|
}
|
|
16053
16148
|
else {
|
|
16054
|
-
this.removeAllItems(
|
|
16149
|
+
this.removeAllItems(value, event, false, li[i], mainElement);
|
|
16055
16150
|
}
|
|
16056
16151
|
if (this.enableGroupCheckBox) {
|
|
16057
|
-
this.findGroupStart(li[
|
|
16152
|
+
this.findGroupStart(li[i]);
|
|
16058
16153
|
}
|
|
16059
16154
|
}
|
|
16060
16155
|
if (!state) {
|
|
@@ -16082,7 +16177,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16082
16177
|
this.updateValueState(event, this.value, this.tempValues);
|
|
16083
16178
|
this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;
|
|
16084
16179
|
}
|
|
16085
|
-
this.
|
|
16180
|
+
if ((this.enableVirtualization && this.value && this.value.length > 0) || !this.enableVirtualization) {
|
|
16181
|
+
this.updateHiddenElement();
|
|
16182
|
+
}
|
|
16086
16183
|
}
|
|
16087
16184
|
};
|
|
16088
16185
|
MultiSelect.prototype.updateHiddenElement = function () {
|
|
@@ -16188,7 +16285,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16188
16285
|
}
|
|
16189
16286
|
this.selectAllItem(state, event);
|
|
16190
16287
|
}
|
|
16191
|
-
this.
|
|
16288
|
+
if (!(this.dataSource instanceof DataManager) || (this.dataSource instanceof DataManager && this.virtualSelectAllData)) {
|
|
16289
|
+
this.virtualSelectAll = false;
|
|
16290
|
+
}
|
|
16192
16291
|
};
|
|
16193
16292
|
/**
|
|
16194
16293
|
* Get the properties to be maintained in the persisted state.
|