@syncfusion/ej2-dropdowns 27.1.51 → 27.1.53

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.
Files changed (96) hide show
  1. package/dist/ej2-dropdowns.min.js +2 -2
  2. package/dist/ej2-dropdowns.umd.min.js +2 -2
  3. package/dist/ej2-dropdowns.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-dropdowns.es2015.js +149 -56
  5. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  6. package/dist/es6/ej2-dropdowns.es5.js +149 -56
  7. package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
  8. package/dist/global/ej2-dropdowns.min.js +2 -2
  9. package/dist/global/ej2-dropdowns.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +9 -9
  12. package/src/combo-box/combo-box.js +1 -0
  13. package/src/drop-down-base/drop-down-base.js +21 -15
  14. package/src/drop-down-list/drop-down-list.d.ts +2 -1
  15. package/src/drop-down-list/drop-down-list.js +6 -2
  16. package/src/drop-down-tree/drop-down-tree.js +3 -3
  17. package/src/list-box/list-box.js +28 -4
  18. package/src/multi-select/multi-select.js +90 -32
  19. package/styles/bootstrap-dark-lite.css +5 -0
  20. package/styles/bootstrap-dark.css +5 -0
  21. package/styles/bootstrap-lite.css +5 -0
  22. package/styles/bootstrap.css +5 -0
  23. package/styles/bootstrap4-lite.css +5 -0
  24. package/styles/bootstrap4.css +5 -0
  25. package/styles/bootstrap5-dark-lite.css +5 -0
  26. package/styles/bootstrap5-dark.css +5 -0
  27. package/styles/bootstrap5-lite.css +5 -0
  28. package/styles/bootstrap5.3-lite.css +5 -0
  29. package/styles/bootstrap5.3.css +5 -0
  30. package/styles/bootstrap5.css +5 -0
  31. package/styles/drop-down-list/_layout.scss +1 -0
  32. package/styles/drop-down-list/bootstrap-dark.css +1 -0
  33. package/styles/drop-down-list/bootstrap.css +1 -0
  34. package/styles/drop-down-list/bootstrap4.css +1 -0
  35. package/styles/drop-down-list/bootstrap5-dark.css +1 -0
  36. package/styles/drop-down-list/bootstrap5.3.css +1 -0
  37. package/styles/drop-down-list/bootstrap5.css +1 -0
  38. package/styles/drop-down-list/fabric-dark.css +1 -0
  39. package/styles/drop-down-list/fabric.css +1 -0
  40. package/styles/drop-down-list/fluent-dark.css +1 -0
  41. package/styles/drop-down-list/fluent.css +1 -0
  42. package/styles/drop-down-list/fluent2.css +1 -0
  43. package/styles/drop-down-list/highcontrast-light.css +1 -0
  44. package/styles/drop-down-list/highcontrast.css +1 -0
  45. package/styles/drop-down-list/material-dark.css +1 -0
  46. package/styles/drop-down-list/material.css +1 -0
  47. package/styles/drop-down-list/material3-dark.css +1 -0
  48. package/styles/drop-down-list/material3.css +1 -0
  49. package/styles/drop-down-list/tailwind-dark.css +1 -0
  50. package/styles/drop-down-list/tailwind.css +1 -0
  51. package/styles/fabric-dark-lite.css +5 -0
  52. package/styles/fabric-dark.css +5 -0
  53. package/styles/fabric-lite.css +5 -0
  54. package/styles/fabric.css +5 -0
  55. package/styles/fluent-dark-lite.css +5 -0
  56. package/styles/fluent-dark.css +5 -0
  57. package/styles/fluent-lite.css +5 -0
  58. package/styles/fluent.css +5 -0
  59. package/styles/fluent2-lite.css +5 -0
  60. package/styles/fluent2.css +5 -0
  61. package/styles/highcontrast-light-lite.css +5 -0
  62. package/styles/highcontrast-light.css +5 -0
  63. package/styles/highcontrast-lite.css +5 -0
  64. package/styles/highcontrast.css +5 -0
  65. package/styles/material-dark-lite.css +5 -0
  66. package/styles/material-dark.css +5 -0
  67. package/styles/material-lite.css +5 -0
  68. package/styles/material.css +5 -0
  69. package/styles/material3-dark-lite.css +5 -0
  70. package/styles/material3-dark.css +5 -0
  71. package/styles/material3-lite.css +5 -0
  72. package/styles/material3.css +5 -0
  73. package/styles/multi-select/_layout.scss +4 -0
  74. package/styles/multi-select/bootstrap-dark.css +4 -0
  75. package/styles/multi-select/bootstrap.css +4 -0
  76. package/styles/multi-select/bootstrap4.css +4 -0
  77. package/styles/multi-select/bootstrap5-dark.css +4 -0
  78. package/styles/multi-select/bootstrap5.3.css +4 -0
  79. package/styles/multi-select/bootstrap5.css +4 -0
  80. package/styles/multi-select/fabric-dark.css +4 -0
  81. package/styles/multi-select/fabric.css +4 -0
  82. package/styles/multi-select/fluent-dark.css +4 -0
  83. package/styles/multi-select/fluent.css +4 -0
  84. package/styles/multi-select/fluent2.css +4 -0
  85. package/styles/multi-select/highcontrast-light.css +4 -0
  86. package/styles/multi-select/highcontrast.css +4 -0
  87. package/styles/multi-select/material-dark.css +4 -0
  88. package/styles/multi-select/material.css +4 -0
  89. package/styles/multi-select/material3-dark.css +4 -0
  90. package/styles/multi-select/material3.css +4 -0
  91. package/styles/multi-select/tailwind-dark.css +4 -0
  92. package/styles/multi-select/tailwind.css +4 -0
  93. package/styles/tailwind-dark-lite.css +5 -0
  94. package/styles/tailwind-dark.css +5 -0
  95. package/styles/tailwind-lite.css +5 -0
  96. package/styles/tailwind.css +5 -0
@@ -1957,6 +1957,10 @@ let DropDownBase = class DropDownBase extends Component {
1957
1957
  renderItems(listData, fields, isCheckBoxUpdate) {
1958
1958
  let ulElement;
1959
1959
  if (this.itemTemplate && listData) {
1960
+ if (this.getModuleName() === 'multiselect' && this.virtualSelectAll) {
1961
+ this.virtualSelectAllData = listData;
1962
+ listData = listData.slice(this.virtualItemStartIndex, this.virtualItemEndIndex);
1963
+ }
1960
1964
  let dataSource = listData;
1961
1965
  if (dataSource && fields.groupBy) {
1962
1966
  if (this.sortOrder !== 'None') {
@@ -1964,7 +1968,7 @@ let DropDownBase = class DropDownBase extends Component {
1964
1968
  }
1965
1969
  dataSource = ListBase.groupDataSource(dataSource, fields.properties, this.sortOrder);
1966
1970
  }
1967
- else {
1971
+ else if (this.getModuleName() !== 'listbox' || (this.getModuleName() === 'listbox' && !this.preventDefActionFilter)) {
1968
1972
  dataSource = this.getSortedDataSource(dataSource);
1969
1973
  }
1970
1974
  this.sortedData = dataSource;
@@ -1972,21 +1976,23 @@ let DropDownBase = class DropDownBase extends Component {
1972
1976
  new DataManager(dataSource).executeLocal(new Query().take(100))
1973
1977
  : dataSource;
1974
1978
  ulElement = this.templateListItem((this.getModuleName() === 'autocomplete') ? spliceData : dataSource, fields);
1975
- const oldUlElement = this.list.querySelector('.e-list-parent');
1976
- const virtualUlElement = this.list.querySelector('.e-virtual-ddl-content');
1977
- if ((listData.length >= this.virtualizedItemsCount && oldUlElement && virtualUlElement) || (oldUlElement && virtualUlElement && this.isAllowFiltering) || (oldUlElement && virtualUlElement && this.getModuleName() === 'autocomplete')) {
1978
- virtualUlElement.replaceChild(ulElement, oldUlElement);
1979
- const reOrderList = this.list.querySelectorAll('.e-reorder');
1980
- if (this.list.querySelector('.e-virtual-ddl-content') && reOrderList && reOrderList.length > 0 && !isCheckBoxUpdate) {
1981
- this.list.querySelector('.e-virtual-ddl-content').removeChild(reOrderList[0]);
1979
+ if (this.isVirtualizationEnabled) {
1980
+ const oldUlElement = this.list.querySelector('.e-list-parent');
1981
+ const virtualUlElement = this.list.querySelector('.e-virtual-ddl-content');
1982
+ if ((listData.length >= this.virtualizedItemsCount && oldUlElement && virtualUlElement) || (oldUlElement && virtualUlElement && this.isAllowFiltering) || (oldUlElement && virtualUlElement && this.getModuleName() === 'autocomplete')) {
1983
+ virtualUlElement.replaceChild(ulElement, oldUlElement);
1984
+ const reOrderList = this.list.querySelectorAll('.e-reorder');
1985
+ if (this.list.querySelector('.e-virtual-ddl-content') && reOrderList && reOrderList.length > 0 && !isCheckBoxUpdate) {
1986
+ this.list.querySelector('.e-virtual-ddl-content').removeChild(reOrderList[0]);
1987
+ }
1988
+ this.updateListElements(listData);
1989
+ }
1990
+ else if (!virtualUlElement) {
1991
+ this.list.innerHTML = '';
1992
+ this.createVirtualContent();
1993
+ this.list.querySelector('.e-virtual-ddl-content').appendChild(ulElement);
1994
+ this.updateListElements(listData);
1982
1995
  }
1983
- this.updateListElements(listData);
1984
- }
1985
- else if ((!virtualUlElement)) {
1986
- this.list.innerHTML = '';
1987
- this.createVirtualContent();
1988
- this.list.querySelector('.e-virtual-ddl-content').appendChild(ulElement);
1989
- this.updateListElements(listData);
1990
1996
  }
1991
1997
  }
1992
1998
  else {
@@ -2764,6 +2770,7 @@ let DropDownList = class DropDownList extends DropDownBase {
2764
2770
  this.preventChange = false;
2765
2771
  this.isTouched = false;
2766
2772
  this.isFocused = false;
2773
+ this.autoFill = false;
2767
2774
  }
2768
2775
  /**
2769
2776
  * Initialize the event handler.
@@ -4801,6 +4808,9 @@ let DropDownList = class DropDownList extends DropDownBase {
4801
4808
  }
4802
4809
  }
4803
4810
  onInput(e) {
4811
+ if (!isNullOrUndefined(e) && !isNullOrUndefined(e.data) && e.data.length > 1 && this.autoFill && (this.getModuleName() === 'combobox' || this.getModuleName() === 'autocomplete')) {
4812
+ this.inputElement.value = e.data;
4813
+ }
4804
4814
  this.isValidKey = true;
4805
4815
  if (this.getModuleName() === 'combobox') {
4806
4816
  this.updateIconState();
@@ -5003,7 +5013,7 @@ let DropDownList = class DropDownList extends DropDownBase {
5003
5013
  if (!isNullOrUndefined(this.itemData) && !isNullOrUndefined(newElement)) {
5004
5014
  const value = this.getItemData().value;
5005
5015
  const isExist = listData.some((data) => {
5006
- return (((typeof data === 'string' || typeof data === 'number') && data === value) ||
5016
+ return (((typeof data === 'string' || typeof data === 'number' || typeof data === 'boolean') && data === value) ||
5007
5017
  (getValue(this.fields.value, data) === value));
5008
5018
  });
5009
5019
  if (!isExist) {
@@ -5304,7 +5314,7 @@ let DropDownList = class DropDownList extends DropDownBase {
5304
5314
  this.isNotSearchList = false;
5305
5315
  this.isDocumentClick = false;
5306
5316
  this.destroyPopup();
5307
- if (this.isFiltering() && this.actionCompleteData.list && this.actionCompleteData.list[0]) {
5317
+ if (this.isFiltering() && this.actionCompleteData.list && this.actionCompleteData.list.length > 0) {
5308
5318
  this.isActive = true;
5309
5319
  if (this.enableVirtualization) {
5310
5320
  this.onActionComplete(this.ulElement, this.listData, null, true);
@@ -8538,8 +8548,8 @@ let DropDownTree = class DropDownTree extends Component {
8538
8548
  }
8539
8549
  else {
8540
8550
  const oldFocussedNode = this.treeObj.element.querySelector('.e-node-focus');
8541
- focusedElement = this.treeObj.element.querySelector('li[tabindex="0"]:not(.e-disable):not(.e-prevent)') ||
8542
- this.treeObj.element.querySelector('li:not(.e-disable):not(.e-prevent)');
8551
+ focusedElement = this.treeObj.element.querySelector('li[tabindex="0"]:not(.e-disable)') ||
8552
+ this.treeObj.element.querySelector('li:not(.e-disable)');
8543
8553
  if (oldFocussedNode && oldFocussedNode !== focusedElement) {
8544
8554
  oldFocussedNode.setAttribute('tabindex', '-1');
8545
8555
  removeClass([oldFocussedNode], 'e-node-focus');
@@ -8982,7 +8992,7 @@ let DropDownTree = class DropDownTree extends Component {
8982
8992
  const id = getValue('id', args.data[0]).toString();
8983
8993
  this.removeSelectedData(id, true);
8984
8994
  }
8985
- if (!this.isChipDelete && args.isInteracted) {
8995
+ if (!this.isChipDelete && args.isInteracted || (!this.isFilteredData && args.action === 'check' && this.isFromFilterChange)) {
8986
8996
  this.setMultiSelect();
8987
8997
  this.ensurePlaceHolder();
8988
8998
  }
@@ -11158,6 +11168,7 @@ let ComboBox = class ComboBox extends DropDownList {
11158
11168
  super.render();
11159
11169
  this.setSearchBox();
11160
11170
  this.renderComplete();
11171
+ this.autoFill = this.autofill;
11161
11172
  }
11162
11173
  /**
11163
11174
  * Return the module name of this component.
@@ -14638,7 +14649,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
14638
14649
  const value = this.allowObjectBinding ?
14639
14650
  getValue(((this.fields.value) ? this.fields.value : ''), this.value[this.value.length - 1]) :
14640
14651
  this.value[this.value.length - 1];
14641
- const temp = this.getTextByValue(value);
14652
+ const temp = text;
14642
14653
  const textValues = this.text != null && this.text !== '' ? this.text + ',' + temp : temp;
14643
14654
  currentText.push(textValues);
14644
14655
  this.setProperties({ text: currentText.toString() }, true);
@@ -14675,11 +14686,11 @@ let MultiSelect = class MultiSelect extends DropDownBase {
14675
14686
  removeClass(collection, 'e-disable');
14676
14687
  }
14677
14688
  }
14678
- dispatchSelect(value, eve, element, isNotTrigger, length) {
14689
+ dispatchSelect(value, eve, element, isNotTrigger, length, dataValue, text) {
14679
14690
  const list = this.listData;
14680
14691
  if (this.initStatus && !isNotTrigger) {
14681
14692
  value = this.allowObjectBinding ? getValue(((this.fields.value) ? this.fields.value : ''), value) : value;
14682
- const val = this.getDataByValue(value);
14693
+ const val = dataValue ? dataValue : this.getDataByValue(value);
14683
14694
  const eventArgs = {
14684
14695
  e: eve,
14685
14696
  item: element,
@@ -14713,16 +14724,26 @@ let MultiSelect = class MultiSelect extends DropDownBase {
14713
14724
  this.selectedListData = [(this.getDataByValue(value))];
14714
14725
  }
14715
14726
  else {
14716
- if (Array.isArray(this.selectedListData)) {
14717
- this.selectedListData.push((this.getDataByValue(value)));
14727
+ if (dataValue) {
14728
+ if (Array.isArray(this.selectedListData)) {
14729
+ this.selectedListData.push(dataValue);
14730
+ }
14731
+ else {
14732
+ this.selectedListData = [this.selectedListData, dataValue];
14733
+ }
14718
14734
  }
14719
14735
  else {
14720
- this.selectedListData = [this.selectedListData, (this.getDataByValue(value))];
14736
+ if (Array.isArray(this.selectedListData)) {
14737
+ this.selectedListData.push((this.getDataByValue(value)));
14738
+ }
14739
+ else {
14740
+ this.selectedListData = [this.selectedListData, (this.getDataByValue(value))];
14741
+ }
14721
14742
  }
14722
14743
  }
14723
14744
  }
14724
14745
  if ((this.enableVirtualization && value) || !this.enableVirtualization) {
14725
- this.updateListSelectEventCallback(value, element, eve);
14746
+ this.updateListSelectEventCallback(value, element, eve, text);
14726
14747
  }
14727
14748
  if (this.hideSelectedItem && this.fixedHeaderElement && this.fields.groupBy && this.mode !== 'CheckBox') {
14728
14749
  super.scrollStop();
@@ -15824,9 +15845,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
15824
15845
  this.removeValue(value, e, length);
15825
15846
  }
15826
15847
  }
15827
- updateListSelectEventCallback(value, li, e) {
15848
+ updateListSelectEventCallback(value, li, e, currentText) {
15828
15849
  value = this.allowObjectBinding ? getValue(((this.fields.value) ? this.fields.value : ''), value) : value;
15829
- const text = this.getTextByValue(value);
15850
+ const text = currentText ? currentText : this.getTextByValue(value);
15830
15851
  if ((this.allowCustomValue || this.allowFiltering) &&
15831
15852
  !this.findListElement(this.mainList, 'li', 'data-value', value) &&
15832
15853
  (!this.enableVirtualization || (this.enableVirtualization && this.virtualCustomData))) {
@@ -16671,7 +16692,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
16671
16692
  if (this.value && obj[this.fields.value] != null && Array.isArray(this.value) &&
16672
16693
  ((!this.allowObjectBinding && this.value.indexOf(obj[this.fields.value]) < 0) ||
16673
16694
  (this.allowObjectBinding && !this.isObjectInArray(obj[this.fields.value], this.value)))) {
16674
- this.dispatchSelect(obj[this.fields.value], event, null, false, length);
16695
+ const value = obj[this.fields.value];
16696
+ const text = (obj[this.fields.text]).toString();
16697
+ this.dispatchSelect(value, event, null, false, length, obj, text);
16675
16698
  }
16676
16699
  });
16677
16700
  }
@@ -16681,7 +16704,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
16681
16704
  this.updateValueState(event, this.value, this.tempValues);
16682
16705
  this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;
16683
16706
  }
16684
- this.updateHiddenElement();
16707
+ this.updateHiddenElement(true);
16685
16708
  if (this.popupWrapper && li[index - 1] && li[index - 1].classList.contains('e-item-focus')) {
16686
16709
  const selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
16687
16710
  if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
@@ -16850,7 +16873,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
16850
16873
  }
16851
16874
  }
16852
16875
  }
16853
- updateHiddenElement() {
16876
+ updateHiddenElement(isVirtualSelectAll) {
16854
16877
  let hiddenValue = '';
16855
16878
  let wrapperText = '';
16856
16879
  let data = '';
@@ -16858,20 +16881,24 @@ let MultiSelect = class MultiSelect extends DropDownBase {
16858
16881
  if (this.mode === 'CheckBox') {
16859
16882
  this.value.map((value, index) => {
16860
16883
  hiddenValue += '<option selected value ="' + value + '">' + index + '</option>';
16861
- if (this.listData) {
16862
- data = this.getTextByValue(value);
16863
- }
16864
- else {
16865
- data = value;
16884
+ if (!isVirtualSelectAll) {
16885
+ if (this.listData) {
16886
+ data = this.getTextByValue(value);
16887
+ }
16888
+ else {
16889
+ data = value;
16890
+ }
16891
+ wrapperText += data + this.delimiterChar + ' ';
16892
+ text.push(data);
16866
16893
  }
16867
- wrapperText += data + this.delimiterChar + ' ';
16868
- text.push(data);
16869
16894
  });
16870
16895
  this.hiddenElement.innerHTML = hiddenValue;
16871
- this.updateWrapperText(this.delimiterWrapper, wrapperText);
16896
+ if (!isVirtualSelectAll) {
16897
+ this.updateWrapperText(this.delimiterWrapper, wrapperText);
16898
+ this.setProperties({ text: text.toString() }, true);
16899
+ }
16872
16900
  this.delimiterWrapper.setAttribute('id', getUniqueID('delim_val'));
16873
16901
  this.inputElement.setAttribute('aria-describedby', this.delimiterWrapper.id);
16874
- this.setProperties({ text: text.toString() }, true);
16875
16902
  this.refreshInputHight();
16876
16903
  this.refreshPlaceHolder();
16877
16904
  }
@@ -17891,20 +17918,13 @@ let MultiSelect = class MultiSelect extends DropDownBase {
17891
17918
  if (this.isReact) {
17892
17919
  this.clearTemplate();
17893
17920
  }
17894
- if (this.popupObj) {
17921
+ if (!isNullOrUndefined(this.popupObj)) {
17895
17922
  this.popupObj.hide();
17923
+ this.popupObj.destroy();
17896
17924
  }
17897
17925
  this.notify(destroy, {});
17898
17926
  this.unwireListEvents();
17899
17927
  this.unWireEvent();
17900
- this.list = null;
17901
- this.popupObj = null;
17902
- this.mainList = null;
17903
- this.mainData = null;
17904
- this.filterParent = null;
17905
- this.ulElement = null;
17906
- this.mainListCollection = null;
17907
- super.destroy();
17908
17928
  const temp = ['readonly', 'aria-disabled', 'placeholder', 'aria-label', 'aria-expanded'];
17909
17929
  let length = temp.length;
17910
17930
  if (!isNullOrUndefined(this.inputElement)) {
@@ -17926,6 +17946,56 @@ let MultiSelect = class MultiSelect extends DropDownBase {
17926
17946
  remove(this.overAllWrapper);
17927
17947
  }
17928
17948
  }
17949
+ if (this.popupWrapper && this.popupWrapper.parentElement) {
17950
+ this.popupWrapper.parentElement.remove();
17951
+ }
17952
+ while (this.searchWrapper && this.searchWrapper.firstChild) {
17953
+ this.searchWrapper.removeChild(this.searchWrapper.firstChild);
17954
+ }
17955
+ if (this.searchWrapper && this.searchWrapper.parentElement) {
17956
+ this.searchWrapper.parentElement.remove();
17957
+ }
17958
+ if (this.viewWrapper && this.viewWrapper.parentElement) {
17959
+ this.viewWrapper.parentElement.remove();
17960
+ }
17961
+ if (this.overAllClear && this.overAllClear.parentElement) {
17962
+ this.overAllClear.parentElement.remove();
17963
+ }
17964
+ if (this.delimiterWrapper && this.delimiterWrapper.parentElement) {
17965
+ this.delimiterWrapper.parentElement.remove();
17966
+ }
17967
+ // Remove the select element if it exists
17968
+ const selectElement = this.overAllWrapper.querySelector('select.e-multi-hidden');
17969
+ if (selectElement && selectElement.parentElement) {
17970
+ selectElement.parentElement.remove();
17971
+ }
17972
+ while (this.componentWrapper && this.componentWrapper.firstChild) {
17973
+ this.componentWrapper.removeChild(this.componentWrapper.firstChild);
17974
+ }
17975
+ if (this.componentWrapper && this.componentWrapper.parentElement) {
17976
+ this.componentWrapper.removeAttribute('class');
17977
+ this.componentWrapper.parentElement.remove();
17978
+ }
17979
+ while (this.popupWrapper && this.popupWrapper.firstChild) {
17980
+ this.popupWrapper.removeChild(this.popupWrapper.firstChild);
17981
+ }
17982
+ if (this.inputElement) {
17983
+ const attrArray = ['readonly', 'aria-disabled', 'placeholder', 'aria-labelledby',
17984
+ 'aria-expanded', 'autocomplete', 'aria-readonly', 'autocapitalize',
17985
+ 'spellcheck', 'aria-autocomplete', 'aria-live', 'aria-label', 'aria-hidden', 'tabindex', 'aria-controls',
17986
+ 'aria-describedby', 'size', 'role', 'type', 'class'];
17987
+ for (let i = 0; i < attrArray.length; i++) {
17988
+ this.inputElement.removeAttribute(attrArray[i]);
17989
+ }
17990
+ }
17991
+ if (this.inputElement) {
17992
+ this.inputElement.remove();
17993
+ }
17994
+ this.list = null;
17995
+ this.popupObj = null;
17996
+ this.mainData = null;
17997
+ this.filterParent = null;
17998
+ this.ulElement = null;
17929
17999
  this.componentWrapper = null;
17930
18000
  this.overAllClear = null;
17931
18001
  this.overAllWrapper = null;
@@ -17937,14 +18007,13 @@ let MultiSelect = class MultiSelect extends DropDownBase {
17937
18007
  this.popupWrapper = null;
17938
18008
  this.inputElement = null;
17939
18009
  this.delimiterWrapper = null;
17940
- this.popupObj = null;
17941
- this.popupWrapper = null;
17942
18010
  this.liCollections = null;
17943
18011
  this.header = null;
17944
18012
  this.mainList = null;
17945
18013
  this.mainListCollection = null;
17946
18014
  this.footer = null;
17947
18015
  this.selectAllEventEle = null;
18016
+ super.destroy();
17948
18017
  }
17949
18018
  };
17950
18019
  __decorate$5([
@@ -19356,6 +19425,12 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
19356
19425
  liCollElem[i].classList.remove('e-grabbed');
19357
19426
  }
19358
19427
  }
19428
+ if (this.toolbarSettings.items.length > 0) {
19429
+ this.updateToolBarState();
19430
+ }
19431
+ else if (this.tBListBox && this.tBListBox.toolbarSettings.items.length > 0) {
19432
+ this.tBListBox.updateToolBarState();
19433
+ }
19359
19434
  }
19360
19435
  updateListItems(sourceElem, destElem) {
19361
19436
  destElem.innerHTML = '';
@@ -19439,6 +19514,17 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
19439
19514
  li.setAttribute('aria-disabled', 'true');
19440
19515
  }
19441
19516
  });
19517
+ if (this.allowFiltering && this.filterInput && this.filterInput.value !== '' && this.toolbarSettings.items.length > 0) {
19518
+ let canDisable = false;
19519
+ this.ulElement.childNodes.forEach((li) => { if (!li.classList.contains('e-disabled')) {
19520
+ canDisable = true;
19521
+ } });
19522
+ if (!canDisable) {
19523
+ const wrap = this.list.parentElement.getElementsByClassName('e-listbox-tool')[0];
19524
+ const btn = wrap.querySelector('[data-value="moveAllTo"]');
19525
+ btn.disabled = true;
19526
+ }
19527
+ }
19442
19528
  }
19443
19529
  /**
19444
19530
  * Based on the state parameter, specified list item will be selected/deselected.
@@ -20284,6 +20370,12 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
20284
20370
  if (fListBox.value.length === 1 && fListBox.getSelectedItems().length) {
20285
20371
  fListBox.value[0] = fListBox.getFormattedValue(fListBox.getSelectedItems()[0].getAttribute('data-value'));
20286
20372
  }
20373
+ if (fListBox.liCollections.length === fListBox.ulElement.querySelectorAll('.e-disabled').length) {
20374
+ const wrap = this.list.parentElement.getElementsByClassName('e-listbox-tool')[0];
20375
+ const toolbarAction = this.toolbarAction === 'moveFrom' ? 'moveAllFrom' : 'moveAllTo';
20376
+ const btn = wrap.querySelector('[data-value="' + toolbarAction + '"]');
20377
+ btn.disabled = true;
20378
+ }
20287
20379
  }
20288
20380
  selectNextList(elems, dataLiIdx, dataIdx, inst) {
20289
20381
  const childCnt = inst.ulElement.querySelectorAll('.e-list-item').length;
@@ -20407,7 +20499,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
20407
20499
  if (tempLiColl.length > 0) {
20408
20500
  for (let i = 0; i < tempLiColl.length; i++) {
20409
20501
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
20410
- disabledData.push(this.getDataByValue(tempLiColl[i].getAttribute('data-value')));
20502
+ disabledData.push(fListBox.getDataByValue(tempLiColl[i].getAttribute('data-value')));
20411
20503
  }
20412
20504
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
20413
20505
  fListBox.listData = fListBox.listData.filter((obj1) => !disabledData.some((obj2) => obj1 === obj2));
@@ -20429,9 +20521,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
20429
20521
  }
20430
20522
  if (isRefresh) {
20431
20523
  const sourceElem = tListBox.renderItems(listData, tListBox.fields);
20432
- if (!this.itemTemplate) {
20433
- tListBox.updateListItems(sourceElem, tListBox.ulElement);
20434
- }
20524
+ tListBox.updateListItems(sourceElem, tListBox.ulElement);
20435
20525
  }
20436
20526
  else {
20437
20527
  tListBox.sortedData = listData;
@@ -20872,6 +20962,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
20872
20962
  }
20873
20963
  }
20874
20964
  else {
20965
+ if (inst.ulElement.querySelectorAll('.e-disabled').length > 0) {
20966
+ return inst.liCollections.length === inst.ulElement.querySelectorAll('.e-disabled').length;
20967
+ }
20875
20968
  return inst.ulElement.querySelectorAll('.' + cssClass.li).length === 0;
20876
20969
  }
20877
20970
  }