@syncfusion/ej2-dropdowns 25.2.3 → 25.2.4

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 25.2.3
3
+ * version : 25.2.4
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-dropdowns@*",
3
- "_id": "@syncfusion/ej2-dropdowns@25.1.41",
3
+ "_id": "@syncfusion/ej2-dropdowns@25.2.3",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-On8qX7S8gJBKOTXOZA3mxvgeMWddeEfTrT0865OaRJzRlgEzf4eJyWLmzezwbj/MFre2kOOlANZMoBNwcru1FA==",
5
+ "_integrity": "sha512-GUZEwuFK0n5cZ9Lc9RGegbO7c07e8V1zQf34J/X1jaDOx2eI3sSKTqQ1XqhU0ATtfQUpJDQPuMnjeqfZr4KI3Q==",
6
6
  "_location": "/@syncfusion/ej2-dropdowns",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -34,8 +34,8 @@
34
34
  "/@syncfusion/ej2-spreadsheet",
35
35
  "/@syncfusion/ej2-vue-dropdowns"
36
36
  ],
37
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-25.1.41.tgz",
38
- "_shasum": "e940c2f1e02df58251d717afec8786f77e2ca07c",
37
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-25.2.3.tgz",
38
+ "_shasum": "c881ff080957a288adf283168d0216569a49a62b",
39
39
  "_spec": "@syncfusion/ej2-dropdowns@*",
40
40
  "_where": "/jenkins/workspace/elease-automation_release_25.1.1/packages/included",
41
41
  "author": {
@@ -47,9 +47,9 @@
47
47
  "@syncfusion/ej2-data": "~25.2.3",
48
48
  "@syncfusion/ej2-inputs": "~25.2.3",
49
49
  "@syncfusion/ej2-lists": "~25.2.3",
50
- "@syncfusion/ej2-navigations": "~25.2.3",
50
+ "@syncfusion/ej2-navigations": "~25.2.4",
51
51
  "@syncfusion/ej2-notifications": "~25.2.3",
52
- "@syncfusion/ej2-popups": "~25.2.3"
52
+ "@syncfusion/ej2-popups": "~25.2.4"
53
53
  },
54
54
  "deprecated": false,
55
55
  "description": "Essential JS 2 DropDown Components",
@@ -74,7 +74,7 @@
74
74
  "module": "./index.js",
75
75
  "name": "@syncfusion/ej2-dropdowns",
76
76
  "typings": "index.d.ts",
77
- "version": "25.2.3",
77
+ "version": "25.2.4",
78
78
  "sideEffects": false,
79
79
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
80
80
  }
@@ -280,9 +280,11 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
280
280
  protected preventPopupOpen: boolean;
281
281
  protected setCurrentView: boolean;
282
282
  protected customFilterQuery: Query;
283
+ protected virtualSelectAllState: boolean;
284
+ protected CurrentEvent: KeyboardEventArgs | MouseEvent;
283
285
  protected virtualSelectAllData: {
284
286
  [key: string]: Object;
285
- }[] | DataManager | string[] | number[] | boolean[];
287
+ }[] | string[] | number[] | boolean[];
286
288
  protected firstItem: string | number | boolean | object;
287
289
  protected virtualListInfo: VirtualInfo;
288
290
  protected viewPortInfo: VirtualInfo;
@@ -567,6 +569,7 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
567
569
  private setListData;
568
570
  protected handleVirtualKeyboardActions(e: KeyboardEventArgs, pageCount: number): void;
569
571
  protected updatePopupState(): void;
572
+ protected virtualSelectionAll(state: boolean, li: NodeListOf<HTMLElement> | HTMLElement[], event: MouseEvent | KeyboardEventArgs): void;
570
573
  protected updateRemoteData(): void;
571
574
  private bindChildItems;
572
575
  protected isObjectInArray(objectToFind: any, array: any[]): boolean;
@@ -606,7 +609,9 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
606
609
  * @param {FieldSettingsModel} fields - Maps the columns of the data table and binds the data to the component.
607
610
  * @returns {HTMLElement} Return the ul li list items.
608
611
  */
609
- private createListItems;
612
+ protected createListItems(dataSource: {
613
+ [key: string]: Object;
614
+ }[], fields: FieldSettingsModel): HTMLElement;
610
615
  protected listOption(dataSource: {
611
616
  [key: string]: Object;
612
617
  }[] | string[] | number[] | boolean[], fields: FieldSettingsModel): FieldSettingsModel;
@@ -130,6 +130,8 @@ var DropDownBase = /** @class */ (function (_super) {
130
130
  _this.appendUncheckList = false;
131
131
  _this.getInitialData = false;
132
132
  _this.preventPopupOpen = true;
133
+ _this.virtualSelectAllState = false;
134
+ _this.CurrentEvent = null;
133
135
  _this.virtualListInfo = {
134
136
  currentPageNumber: null,
135
137
  direction: null,
@@ -729,8 +731,8 @@ var DropDownBase = /** @class */ (function (_super) {
729
731
  if (!isWhereExist_1) {
730
732
  _this.remoteDataCount = e.count;
731
733
  }
732
- _this.dataCount = e.count;
733
- _this.totalItemCount = e.count;
734
+ _this.dataCount = !_this.virtualSelectAll ? e.count : _this.dataCount;
735
+ _this.totalItemCount = !_this.virtualSelectAll ? e.count : _this.totalItemCount;
734
736
  ulElement = _this.renderItems(listItems, fields);
735
737
  _this.appendUncheckList = false;
736
738
  _this.onActionComplete(ulElement, listItems, e);
@@ -756,6 +758,12 @@ var DropDownBase = /** @class */ (function (_super) {
756
758
  if (_this.isVirtualizationEnabled) {
757
759
  _this.getFilteringSkeletonCount();
758
760
  }
761
+ if (_this.virtualSelectAll && _this.virtualSelectAllData) {
762
+ _this.virtualSelectionAll(_this.virtualSelectAllState, _this.liCollections, _this.CurrentEvent);
763
+ _this.virtualSelectAllState = false;
764
+ _this.CurrentEvent = null;
765
+ _this.virtualSelectAll = false;
766
+ }
759
767
  }
760
768
  });
761
769
  }).catch(function (e) {
@@ -807,11 +815,11 @@ var DropDownBase = /** @class */ (function (_super) {
807
815
  }
808
816
  }
809
817
  }
810
- if (isReOrder && (!(_this.dataSource instanceof DataManager) && !_this.isCustomDataUpdated)) {
818
+ if (isReOrder && (!(_this.dataSource instanceof DataManager) && !_this.isCustomDataUpdated) && !_this.virtualSelectAll) {
811
819
  // eslint-disable @typescript-eslint/no-explicit-any
812
820
  _this.dataCount = _this.totalItemCount = _this.virtualSelectAll ? listItems.length : listItems.count;
813
821
  }
814
- listItems = _this.isVirtualizationEnabled && !_this.virtualSelectAll ? listItems.result : listItems;
822
+ listItems = _this.isVirtualizationEnabled ? listItems.result : listItems;
815
823
  // eslint-enable @typescript-eslint/no-explicit-any
816
824
  var localDataArgs = { cancel: false, result: listItems };
817
825
  _this.isPreventChange = _this.isAngular && _this.preventChange ? true : _this.isPreventChange;
@@ -850,6 +858,9 @@ var DropDownBase = /** @class */ (function (_super) {
850
858
  DropDownBase.prototype.updatePopupState = function () {
851
859
  // Used this method in component side.
852
860
  };
861
+ DropDownBase.prototype.virtualSelectionAll = function (state, li, event) {
862
+ // Used this method in component side.
863
+ };
853
864
  DropDownBase.prototype.updateRemoteData = function () {
854
865
  this.setListData(this.dataSource, this.fields, this.query);
855
866
  };
@@ -1343,10 +1354,10 @@ var DropDownBase = /** @class */ (function (_super) {
1343
1354
  */
1344
1355
  DropDownBase.prototype.getIndexByValueFilter = function (value) {
1345
1356
  var index;
1346
- var listItems = this.renderItems(this.selectData, this.fields);
1347
- if (listItems && listItems.children) {
1348
- for (var i = 0; i < listItems.children.length; i++) {
1349
- if (!isNullOrUndefined(value) && listItems.children[i].getAttribute('data-value') === value.toString()) {
1357
+ var listItems = this.renderItems(this.dataSource, this.fields).querySelectorAll('li' + ':not(.e-list-group-item)');
1358
+ if (listItems) {
1359
+ for (var i = 0; i < listItems.length; i++) {
1360
+ if (!isNullOrUndefined(value) && listItems[i].getAttribute('data-value') === value.toString()) {
1350
1361
  index = i;
1351
1362
  break;
1352
1363
  }
@@ -2454,7 +2454,7 @@ var DropDownList = /** @class */ (function (_super) {
2454
2454
  _this.popupContentElement.setAttribute('id', 'no-record');
2455
2455
  }
2456
2456
  _this.inputElement.setAttribute('aria-expanded', 'true');
2457
- _this.inputElement.setAttribute('aria-controls', _this.element.id);
2457
+ _this.inputElement.setAttribute('aria-controls', _this.element.id + '_popup');
2458
2458
  var inputParent = _this.isFiltering() ? _this.filterInput.parentElement : _this.inputWrapper.container;
2459
2459
  addClass([inputParent], [dropDownListClasses.inputFocus]);
2460
2460
  var animModel = { name: 'FadeIn', duration: 100 };
@@ -2986,6 +2986,7 @@ var DropDownList = /** @class */ (function (_super) {
2986
2986
  DropDownList.prototype.destroyPopup = function () {
2987
2987
  this.isPopupOpen = false;
2988
2988
  this.isFilterFocus = false;
2989
+ this.inputElement.removeAttribute('aria-controls');
2989
2990
  if (this.popupObj) {
2990
2991
  this.popupObj.destroy();
2991
2992
  detach(this.popupObj.element);
@@ -3076,7 +3077,6 @@ var DropDownList = /** @class */ (function (_super) {
3076
3077
  attributes(this.targetElement(), { 'aria-label': this.getModuleName() });
3077
3078
  this.inputElement.setAttribute('aria-label', this.getModuleName());
3078
3079
  this.inputElement.setAttribute('aria-expanded', 'false');
3079
- this.inputElement.setAttribute('aria-controls', this.element.id + '_popups');
3080
3080
  }
3081
3081
  attributes(this.targetElement(), this.getAriaAttributes());
3082
3082
  this.updateDataAttribute(this.htmlAttributes);
@@ -1617,10 +1617,14 @@ var DropDownTree = /** @class */ (function (_super) {
1617
1617
  focusedElement.focus();
1618
1618
  addClass([focusedElement], ['e-node-focus']);
1619
1619
  }
1620
- if (_this.checkSelectAll && _this.checkBoxElement) {
1621
- var wrap = closest(_this.checkBoxElement, '.' + CHECKBOXWRAP);
1622
- _this.changeState(wrap, 'check');
1623
- _this.checkSelectAll = false;
1620
+ if (_this.treeObj.checkedNodes.length > 0) {
1621
+ var nodes = _this.treeObj.element.querySelectorAll('li');
1622
+ var checkedNodes = _this.treeObj.element.querySelectorAll('li[aria-checked=true]');
1623
+ if ((checkedNodes.length === nodes.length || _this.checkSelectAll) && _this.checkBoxElement) {
1624
+ var wrap = closest(_this.checkBoxElement, '.' + CHECKBOXWRAP);
1625
+ _this.changeState(wrap, 'check');
1626
+ _this.checkSelectAll = false;
1627
+ }
1624
1628
  }
1625
1629
  if (_this.allowFiltering) {
1626
1630
  removeClass([_this.inputWrapper], [INPUTFOCUS]);
@@ -610,6 +610,7 @@ export declare class MultiSelect extends DropDownBase implements IInput {
610
610
  private resetFilteredData;
611
611
  private preventSetCurrentData;
612
612
  private virtualCustomData;
613
+ private isSelectAllLoop;
613
614
  private enableRTL;
614
615
  requiredModules(): ModuleDeclaration[];
615
616
  private updateHTMLAttribute;
@@ -820,6 +821,7 @@ export declare class MultiSelect extends DropDownBase implements IInput {
820
821
  private getOverflowVal;
821
822
  private unWireEvent;
822
823
  private selectAllItem;
824
+ protected virtualSelectionAll(state: boolean, li: NodeListOf<HTMLElement> | HTMLElement[], event: MouseEvent | KeyboardEventArgs): void;
823
825
  private updateValue;
824
826
  private updateHiddenElement;
825
827
  private updatedataValueItems;
@@ -105,6 +105,7 @@ var MultiSelect = /** @class */ (function (_super) {
105
105
  _this.resetMainList = null;
106
106
  _this.resetFilteredData = false;
107
107
  _this.preventSetCurrentData = false;
108
+ _this.isSelectAllLoop = false;
108
109
  _this.scrollFocusStatus = false;
109
110
  _this.keyDownStatus = false;
110
111
  _this.IsScrollerAtEnd = function () {
@@ -432,7 +433,7 @@ var MultiSelect = /** @class */ (function (_super) {
432
433
  if (!isNullOrUndefined(this.value)) {
433
434
  this.tempValues = this.allowObjectBinding ? this.value.slice() : this.value.slice();
434
435
  }
435
- var customValue = this.allowObjectBinding ? this.getDataByValue(value) : this.getFormattedValue(value);
436
+ var customValue = this.allowObjectBinding ? this.getDataByValue(this.getFormattedValue(value)) : this.getFormattedValue(value);
436
437
  if (this.allowCustomValue && (value !== 'false' && customValue === false || (!isNullOrUndefined(customValue) &&
437
438
  customValue.toString() === 'NaN'))) {
438
439
  customValue = value;
@@ -806,6 +807,9 @@ var MultiSelect = /** @class */ (function (_super) {
806
807
  if (this.enableVirtualization && (this.viewPortInfo.endIndex != 0) && !this.virtualSelectAll) {
807
808
  return this.virtualFilterQuery(filterQuery);
808
809
  }
810
+ if (this.virtualSelectAll) {
811
+ return query ? query.take(this.maximumSelectionLength).requiresCount() : this.query ? this.query.take(this.maximumSelectionLength).requiresCount() : new Query().take(this.maximumSelectionLength).requiresCount();
812
+ }
809
813
  return query ? query : this.query ? this.query : new Query();
810
814
  }
811
815
  };
@@ -1977,7 +1981,7 @@ var MultiSelect = /** @class */ (function (_super) {
1977
1981
  this.removeChipSelection();
1978
1982
  this.addChipSelection(temp, e);
1979
1983
  }
1980
- var currentChip = this.allowObjectBinding ? this.getDataByValue(selectedElem.getAttribute('data-value')) : selectedElem.getAttribute('data-value');
1984
+ var currentChip = this.allowObjectBinding ? this.getDataByValue(this.getFormattedValue(selectedElem.getAttribute('data-value'))) : selectedElem.getAttribute('data-value');
1981
1985
  this.removeValue(currentChip, e);
1982
1986
  this.makeTextBoxEmpty();
1983
1987
  }
@@ -2164,7 +2168,7 @@ var MultiSelect = /** @class */ (function (_super) {
2164
2168
  if (this.enabled && !this.readonly) {
2165
2169
  var element = e.target.parentElement;
2166
2170
  var customVal = element.getAttribute('data-value');
2167
- var value = this.allowObjectBinding ? this.getDataByValue(customVal) : this.getFormattedValue(customVal);
2171
+ var value = this.allowObjectBinding ? this.getDataByValue(this.getFormattedValue(customVal)) : this.getFormattedValue(customVal);
2168
2172
  if (this.allowCustomValue && ((customVal !== 'false' && value === false) ||
2169
2173
  (!isNullOrUndefined(value) && value.toString() === 'NaN'))) {
2170
2174
  value = customVal;
@@ -2255,8 +2259,8 @@ var MultiSelect = /** @class */ (function (_super) {
2255
2259
  dropDownBaseClasses.selected;
2256
2260
  if (index !== -1) {
2257
2261
  var currentValue = this.allowObjectBinding ? getValue(((this.fields.value) ? this.fields.value : ''), value) : value;
2258
- var element_1 = this.findListElement(this.list, 'li', 'data-value', currentValue);
2259
- var val_1 = this.getDataByValue(value);
2262
+ var element_1 = this.virtualSelectAll ? null : this.findListElement(this.list, 'li', 'data-value', currentValue);
2263
+ var val_1 = this.allowObjectBinding ? value : this.getDataByValue(value);
2260
2264
  var eventArgs = {
2261
2265
  e: eve,
2262
2266
  item: element_1,
@@ -2444,9 +2448,9 @@ var MultiSelect = /** @class */ (function (_super) {
2444
2448
  this.value = [];
2445
2449
  }
2446
2450
  var currentValue = this.allowObjectBinding ? this.getDataByValue(value) : value;
2447
- if ((this.allowObjectBinding && !this.isObjectInArray(value, this.value)) || (!this.allowObjectBinding && this.value.indexOf(currentValue) < 0)) {
2451
+ if ((this.allowObjectBinding && !this.isObjectInArray(this.getDataByValue(value), this.value)) || (!this.allowObjectBinding && this.value.indexOf(currentValue) < 0)) {
2448
2452
  this.setProperties({ value: [].concat([], this.value, [currentValue]) }, true);
2449
- if (this.enableVirtualization) {
2453
+ if (this.enableVirtualization && !this.isSelectAllLoop) {
2450
2454
  var data = this.viewWrapper.innerHTML;
2451
2455
  var temp = void 0;
2452
2456
  data += (this.value.length === 1) ? '' : this.delimiterChar + ' ';
@@ -3287,7 +3291,7 @@ var MultiSelect = /** @class */ (function (_super) {
3287
3291
  if (!this.enableVirtualization) {
3288
3292
  this.listData = this.mainData;
3289
3293
  }
3290
- if (!isNullOrUndefined(this.hiddenElement)) {
3294
+ if (!isNullOrUndefined(this.hiddenElement) && !this.enableVirtualization) {
3291
3295
  this.hiddenElement.innerHTML = '';
3292
3296
  }
3293
3297
  if (!isNullOrUndefined(this.value)) {
@@ -3315,7 +3319,27 @@ var MultiSelect = /** @class */ (function (_super) {
3315
3319
  var textValues = this.text != null && this.text != "" ? this.text + ',' + temp : temp;
3316
3320
  data += temp + delimiterChar + ' ';
3317
3321
  text.push(textValues);
3318
- hiddenElementContent += "<option selected value=\"" + valueItem + "\">" + index + "</option>";
3322
+ hiddenElementContent = this.hiddenElement.innerHTML;
3323
+ if ((e && e.currentTarget && e.currentTarget.classList.contains('e-chips-close')) || (e && (e.key === 'Backspace'))) {
3324
+ var item = e.target.parentElement.getAttribute('data-value');
3325
+ if (e.key === 'Backspace') {
3326
+ var lastChild = this.hiddenElement.lastChild;
3327
+ if (lastChild) {
3328
+ this.hiddenElement.removeChild(lastChild);
3329
+ }
3330
+ }
3331
+ else {
3332
+ this.hiddenElement.childNodes.forEach(function (option) {
3333
+ if (option.value === item) {
3334
+ option.parentNode.removeChild(option);
3335
+ }
3336
+ });
3337
+ }
3338
+ hiddenElementContent = this.hiddenElement.innerHTML;
3339
+ }
3340
+ else {
3341
+ hiddenElementContent += "<option selected value=\"" + value + "\">" + index + "</option>";
3342
+ }
3319
3343
  break;
3320
3344
  }
3321
3345
  else {
@@ -3534,7 +3558,7 @@ var MultiSelect = /** @class */ (function (_super) {
3534
3558
  };
3535
3559
  MultiSelect.prototype.updateListSelection = function (li, e, length) {
3536
3560
  var customVal = li.getAttribute('data-value');
3537
- var value = this.allowObjectBinding ? this.getDataByValue(customVal) : this.getFormattedValue(customVal);
3561
+ var value = this.allowObjectBinding ? this.getDataByValue(this.getFormattedValue(customVal)) : this.getFormattedValue(customVal);
3538
3562
  if (this.allowCustomValue && ((customVal !== 'false' && value === false) ||
3539
3563
  (!isNullOrUndefined(value) && value.toString() === 'NaN'))) {
3540
3564
  value = customVal;
@@ -4240,14 +4264,14 @@ var MultiSelect = /** @class */ (function (_super) {
4240
4264
  var li;
4241
4265
  if (!isNullOrUndefined(this.list)) {
4242
4266
  li = this.list.querySelectorAll(state ?
4243
- 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide)' :
4244
- 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)');
4267
+ 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-virtual-list)' :
4268
+ 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-virtual-list)');
4245
4269
  }
4246
4270
  if (this.value && this.value.length && event && event.target
4247
4271
  && closest(event.target, '.e-close-hooker') && this.allowFiltering) {
4248
4272
  li = this.mainList.querySelectorAll(state ?
4249
- 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide)' :
4250
- 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)');
4273
+ 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-virtual-list)' :
4274
+ 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-virtual-list)');
4251
4275
  }
4252
4276
  if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !isNullOrUndefined(this.fields.groupBy)) {
4253
4277
  var target = (event ? (this.groupTemplate ? closest(event.target, '.e-list-group-item') : event.target) : null);
@@ -4309,6 +4333,108 @@ var MultiSelect = /** @class */ (function (_super) {
4309
4333
  }
4310
4334
  this.addValidInputClass();
4311
4335
  };
4336
+ MultiSelect.prototype.virtualSelectionAll = function (state, li, event) {
4337
+ var _this = this;
4338
+ var index = 0;
4339
+ var length = li.length;
4340
+ var count = this.maximumSelectionLength;
4341
+ if (state) {
4342
+ length = this.virtualSelectAllData && this.virtualSelectAllData.length != 0 ? this.virtualSelectAllData.length : length;
4343
+ this.listData = this.virtualSelectAllData;
4344
+ var ulElement = this.createListItems(this.virtualSelectAllData.slice(0, 30), this.fields);
4345
+ var firstItems = ulElement.querySelectorAll('li');
4346
+ var fragment_1 = document.createDocumentFragment();
4347
+ firstItems.forEach(function (node) {
4348
+ fragment_1.appendChild(node.cloneNode(true));
4349
+ });
4350
+ li.forEach(function (node) {
4351
+ fragment_1.appendChild(node.cloneNode(true));
4352
+ });
4353
+ var concatenatedNodeList = fragment_1.childNodes;
4354
+ if (this.virtualSelectAllData instanceof Array) {
4355
+ while (index < length && index <= 50 && index < count) {
4356
+ this.isSelectAllTarget = (length === index + 1);
4357
+ if (concatenatedNodeList[index]) {
4358
+ var value = this.allowObjectBinding ? this.getDataByValue(concatenatedNodeList[index].getAttribute('data-value')) : this.getFormattedValue(concatenatedNodeList[index].getAttribute('data-value'));
4359
+ if (((!this.allowObjectBinding && this.value && this.value.indexOf(value) >= 0) || (this.allowObjectBinding && this.indexOfObjectInArray(value, this.value) >= 0))) {
4360
+ index++;
4361
+ continue;
4362
+ }
4363
+ this.updateListSelection(concatenatedNodeList[index], event, length - index);
4364
+ }
4365
+ else {
4366
+ var value = getValue((this.fields.value) ? this.fields.value : '', this.virtualSelectAllData[index]);
4367
+ value = this.allowObjectBinding ? this.getDataByValue(value) : value;
4368
+ if (((!this.allowObjectBinding && this.value && this.value.indexOf(value) >= 0) || (this.allowObjectBinding && this.indexOfObjectInArray(value, this.value) >= 0))) {
4369
+ index++;
4370
+ continue;
4371
+ }
4372
+ if (this.value && value != null && Array.isArray(this.value) && ((!this.allowObjectBinding && this.value.indexOf(value) < 0) || (this.allowObjectBinding && !this.isObjectInArray(value, this.value)))) {
4373
+ this.dispatchSelect(value, event, null, false, length);
4374
+ }
4375
+ }
4376
+ index++;
4377
+ }
4378
+ if (length > 50) {
4379
+ setTimeout(function () {
4380
+ if (_this.virtualSelectAllData && _this.virtualSelectAllData.length > 0) {
4381
+ _this.virtualSelectAllData.map(function (obj) {
4382
+ 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)))) {
4383
+ _this.dispatchSelect(obj[_this.fields.value], event, null, false, length);
4384
+ }
4385
+ });
4386
+ }
4387
+ _this.updatedataValueItems(event);
4388
+ _this.isSelectAllLoop = false;
4389
+ if (!_this.changeOnBlur) {
4390
+ _this.updateValueState(event, _this.value, _this.tempValues);
4391
+ _this.isSelectAll = _this.isSelectAll ? !_this.isSelectAll : _this.isSelectAll;
4392
+ }
4393
+ _this.updateHiddenElement();
4394
+ if (_this.popupWrapper && li[index - 1] && li[index - 1].classList.contains('e-item-focus')) {
4395
+ var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
4396
+ if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
4397
+ li[index - 1].classList.remove('e-item-focus');
4398
+ }
4399
+ }
4400
+ }, 0);
4401
+ }
4402
+ }
4403
+ }
4404
+ else {
4405
+ if (this.virtualSelectAllData && this.virtualSelectAllData.length > 0) {
4406
+ this.virtualSelectAllData.map(function (obj) {
4407
+ _this.virtualSelectAll = true;
4408
+ _this.removeValue(_this.value[index], event, _this.value.length - index);
4409
+ });
4410
+ }
4411
+ this.updatedataValueItems(event);
4412
+ if (!this.changeOnBlur) {
4413
+ this.updateValueState(event, this.value, this.tempValues);
4414
+ this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;
4415
+ }
4416
+ this.updateHiddenElement();
4417
+ this.value = [];
4418
+ this.virtualSelectAll = false;
4419
+ if (!isNullOrUndefined(this.viewPortInfo.startIndex) && !isNullOrUndefined(this.viewPortInfo.endIndex)) {
4420
+ this.notify("setCurrentViewDataAsync", {
4421
+ component: this.getModuleName(),
4422
+ module: "VirtualScroll",
4423
+ });
4424
+ }
4425
+ }
4426
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4427
+ var virtualTrackElement = this.list.getElementsByClassName('e-virtual-ddl')[0];
4428
+ if (virtualTrackElement) {
4429
+ (virtualTrackElement).style = this.GetVirtualTrackHeight();
4430
+ }
4431
+ this.UpdateSkeleton();
4432
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4433
+ var virtualContentElement = this.list.getElementsByClassName('e-virtual-ddl-content')[0];
4434
+ if (virtualContentElement) {
4435
+ (virtualContentElement).style = this.getTransformValues();
4436
+ }
4437
+ };
4312
4438
  MultiSelect.prototype.updateValue = function (event, li, state) {
4313
4439
  var _this = this;
4314
4440
  var length = li.length;
@@ -4332,95 +4458,14 @@ var MultiSelect = /** @class */ (function (_super) {
4332
4458
  }
4333
4459
  if (!beforeSelectArgs.preventSelectEvent) {
4334
4460
  if (this.enableVirtualization) {
4335
- if (state) {
4336
- this.virtualSelectAll = true;
4461
+ this.virtualSelectAll = true;
4462
+ this.virtualSelectAllState = state;
4463
+ this.CurrentEvent = event;
4464
+ if (!this.virtualSelectAllData) {
4337
4465
  this.resetList(this.dataSource, this.fields, new Query());
4338
- if (this.virtualSelectAllData instanceof Array) {
4339
- for (var i = 0; i < this.virtualSelectAllData.length; i++) {
4340
- if (li[this.skeletonCount + i]) {
4341
- var value_2 = this.allowObjectBinding ? this.getDataByValue(li[this.skeletonCount + i].getAttribute('data-value')) : this.getFormattedValue(li[this.skeletonCount + i].getAttribute('data-value'));
4342
- if (((!this.allowObjectBinding && this.value && this.value.indexOf(value_2) === 1) || (this.allowObjectBinding && this.indexOfObjectInArray(value_2, this.value) === 1))) {
4343
- continue;
4344
- }
4345
- this.updateListSelection(li[this.skeletonCount + i], event, length - i);
4346
- }
4347
- else {
4348
- if (this.fields) {
4349
- var value_3 = getValue(this.fields.value, this.virtualSelectAllData[i]);
4350
- value_3 = this.allowObjectBinding ? this.getDataByValue(value_3) : value_3;
4351
- if (((!this.allowObjectBinding && this.value && this.value.indexOf(value_3) === 1) || (this.allowObjectBinding && this.indexOfObjectInArray(value_3, this.value) === 1))) {
4352
- continue;
4353
- }
4354
- 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)))) {
4355
- this.dispatchSelect(value_3, event, null, false, length);
4356
- }
4357
- }
4358
- }
4359
- }
4360
- if (this.virtualSelectAllData && this.value.length != this.virtualSelectAllData.length && this.virtualItemStartIndex != 0) {
4361
- if (this.virtualItemStartIndex > this.itemCount) {
4362
- for (var i = 0; i < this.itemCount; i++) {
4363
- if (this.fields) {
4364
- var value_4 = getValue(this.fields.value, this.virtualSelectAllData[i]);
4365
- value_4 = this.allowObjectBinding ? this.getDataByValue(value_4) : value_4;
4366
- 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)))) {
4367
- this.setProperties({ value: [].concat([], this.value, this.allowObjectBinding ? [this.virtualSelectAllData[i]] : [value_4]) }, true);
4368
- }
4369
- }
4370
- }
4371
- }
4372
- }
4373
- else {
4374
- for (var i = 0; i < this.virtualItemStartIndex; i++) {
4375
- if (this.fields) {
4376
- var value = getValue(this.fields.value, this.virtualSelectAllData[i]);
4377
- value = this.allowObjectBinding ? this.getDataByValue(value) : value;
4378
- if (Array.isArray(this.value) && ((!this.allowObjectBinding && this.value.indexOf(value) < 0) || (this.allowObjectBinding && !this.isObjectInArray(value, this.value)))) {
4379
- this.setProperties({ value: [].concat([], this.value, this.allowObjectBinding ? [this.virtualSelectAllData[i]] : [value]) }, true);
4380
- }
4381
- }
4382
- }
4383
- }
4384
- }
4385
4466
  }
4386
- else {
4387
- while (index_2 < this.value.length && index_2 <= 50 && index_2 < count_1 && this.value.length > 0) {
4388
- this.removeValue(this.value[index_2], event, this.value.length - index_2);
4389
- index_2++;
4390
- }
4391
- if (length > 50) {
4392
- setTimeout(function () {
4393
- while (index_2 < _this.value.length && index_2 < count_1 && _this.value.length > 0) {
4394
- _this.removeValue(value[index_2], event, _this.value.length - index_2);
4395
- index_2++;
4396
- }
4397
- _this.updatedataValueItems(event);
4398
- if (!_this.changeOnBlur) {
4399
- _this.updateValueState(event, _this.value, _this.tempValues);
4400
- _this.isSelectAll = _this.isSelectAll ? !_this.isSelectAll : _this.isSelectAll;
4401
- }
4402
- _this.updateHiddenElement();
4403
- }, 0);
4404
- }
4405
- this.value = [];
4406
- this.virtualSelectAll = false;
4407
- if (!isNullOrUndefined(this.viewPortInfo.startIndex) && !isNullOrUndefined(this.viewPortInfo.endIndex)) {
4408
- this.notify("setCurrentViewDataAsync", {
4409
- component: this.getModuleName(),
4410
- module: "VirtualScroll",
4411
- });
4412
- }
4413
- }
4414
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4415
- var virtualTrackElement = this.list.getElementsByClassName('e-virtual-ddl')[0];
4416
- if (virtualTrackElement) {
4417
- (virtualTrackElement).style = this.GetVirtualTrackHeight();
4418
- }
4419
- this.UpdateSkeleton();
4420
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4421
- var virtualContentElement = this.list.getElementsByClassName('e-virtual-ddl-content')[0];
4422
- if (virtualContentElement) {
4423
- (virtualContentElement).style = this.getTransformValues();
4467
+ if (this.virtualSelectAllData) {
4468
+ this.virtualSelectionAll(state, li, event);
4424
4469
  }
4425
4470
  }
4426
4471
  else {
@@ -4459,29 +4504,29 @@ var MultiSelect = /** @class */ (function (_super) {
4459
4504
  }
4460
4505
  }
4461
4506
  else {
4462
- for (var i_1 = 0; i_1 < li.length && i_1 < count_1; i_1++) {
4507
+ for (var i = 0; i < li.length && i < count_1; i++) {
4463
4508
  this.removeHover();
4464
- var customVal = li[i_1].getAttribute('data-value');
4465
- var value_5 = this.getFormattedValue(customVal);
4466
- value_5 = this.allowObjectBinding ? this.getDataByValue(value_5) : value_5;
4509
+ var customVal = li[i].getAttribute('data-value');
4510
+ var value = this.getFormattedValue(customVal);
4511
+ value = this.allowObjectBinding ? this.getDataByValue(value) : value;
4467
4512
  var mainElement = this.mainList ? this.mainList.querySelectorAll(state ?
4468
4513
  'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide)' :
4469
- 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)')[i_1] : null;
4514
+ 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)')[i] : null;
4470
4515
  if (state) {
4471
4516
  this.value = !this.value ? [] : this.value;
4472
- if ((!this.allowObjectBinding && this.value.indexOf(value_5) < 0) || (this.allowObjectBinding && !this.isObjectInArray(value_5, this.value))) {
4473
- this.setProperties({ value: [].concat([], this.value, [value_5]) }, true);
4517
+ if ((!this.allowObjectBinding && this.value.indexOf(value) < 0) || (this.allowObjectBinding && !this.isObjectInArray(value, this.value))) {
4518
+ this.setProperties({ value: [].concat([], this.value, [value]) }, true);
4474
4519
  }
4475
4520
  this.removeFocus();
4476
- this.addListSelection(li[i_1], mainElement);
4521
+ this.addListSelection(li[i], mainElement);
4477
4522
  this.updateChipStatus();
4478
4523
  this.checkMaxSelection();
4479
4524
  }
4480
4525
  else {
4481
- this.removeAllItems(value_5, event, false, li[i_1], mainElement);
4526
+ this.removeAllItems(value, event, false, li[i], mainElement);
4482
4527
  }
4483
4528
  if (this.enableGroupCheckBox) {
4484
- this.findGroupStart(li[i_1]);
4529
+ this.findGroupStart(li[i]);
4485
4530
  }
4486
4531
  }
4487
4532
  if (!state) {
@@ -4509,7 +4554,9 @@ var MultiSelect = /** @class */ (function (_super) {
4509
4554
  this.updateValueState(event, this.value, this.tempValues);
4510
4555
  this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;
4511
4556
  }
4512
- this.updateHiddenElement();
4557
+ if ((this.enableVirtualization && this.value && this.value.length > 0) || !this.enableVirtualization) {
4558
+ this.updateHiddenElement();
4559
+ }
4513
4560
  }
4514
4561
  };
4515
4562
  MultiSelect.prototype.updateHiddenElement = function () {
@@ -4615,7 +4662,9 @@ var MultiSelect = /** @class */ (function (_super) {
4615
4662
  }
4616
4663
  this.selectAllItem(state, event);
4617
4664
  }
4618
- this.virtualSelectAll = false;
4665
+ if (!(this.dataSource instanceof DataManager) || (this.dataSource instanceof DataManager && this.virtualSelectAllData)) {
4666
+ this.virtualSelectAll = false;
4667
+ }
4619
4668
  };
4620
4669
  /**
4621
4670
  * Get the properties to be maintained in the persisted state.