@syncfusion/ej2-dropdowns 29.1.40 → 29.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.
Files changed (42) 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 +229 -96
  5. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  6. package/dist/es6/ej2-dropdowns.es5.js +240 -105
  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 +12 -12
  12. package/src/auto-complete/auto-complete.d.ts +1 -0
  13. package/src/auto-complete/auto-complete.js +9 -1
  14. package/src/combo-box/combo-box-model.d.ts +0 -8
  15. package/src/combo-box/combo-box.d.ts +0 -7
  16. package/src/combo-box/combo-box.js +0 -3
  17. package/src/common/virtual-scroll.js +8 -3
  18. package/src/drop-down-base/drop-down-base.d.ts +5 -1
  19. package/src/drop-down-base/drop-down-base.js +54 -10
  20. package/src/drop-down-list/drop-down-list-model.d.ts +7 -0
  21. package/src/drop-down-list/drop-down-list.d.ts +7 -0
  22. package/src/drop-down-list/drop-down-list.js +52 -28
  23. package/src/drop-down-tree/drop-down-tree.d.ts +1 -0
  24. package/src/drop-down-tree/drop-down-tree.js +11 -0
  25. package/src/mention/mention-model.d.ts +7 -0
  26. package/src/mention/mention.d.ts +8 -0
  27. package/src/mention/mention.js +29 -16
  28. package/src/multi-select/multi-select-model.d.ts +7 -0
  29. package/src/multi-select/multi-select.d.ts +9 -0
  30. package/src/multi-select/multi-select.js +77 -44
  31. package/styles/bds-lite.css +1 -1
  32. package/styles/bds.css +1 -1
  33. package/styles/multi-select/_bds-definition.scss +1 -0
  34. package/styles/multi-select/_layout.scss +6 -1
  35. package/styles/multi-select/_tailwind-definition.scss +1 -0
  36. package/styles/multi-select/bds.css +1 -1
  37. package/styles/multi-select/tailwind-dark.css +1 -1
  38. package/styles/multi-select/tailwind.css +1 -1
  39. package/styles/tailwind-dark-lite.css +1 -1
  40. package/styles/tailwind-dark.css +1 -1
  41. package/styles/tailwind-lite.css +1 -1
  42. package/styles/tailwind.css +1 -1
@@ -497,6 +497,7 @@ class VirtualScroll {
497
497
  query = query.skip(this.parent.viewPortInfo.startIndex);
498
498
  }
499
499
  this.parent.setCurrentView = false;
500
+ this.parent.isPreventScrollAction = true;
500
501
  this.parent.resetList(this.parent.dataSource, this.parent.fields, query);
501
502
  isResetListCalled = true;
502
503
  break;
@@ -544,6 +545,7 @@ class VirtualScroll {
544
545
  }
545
546
  }
546
547
  this.parent.renderItems(currentData, this.parent.fields, this.component === 'multiselect' && this.parent.mode === 'CheckBox');
548
+ this.parent.updateSelectionList();
547
549
  }
548
550
  if (this.component === 'multiselect') {
549
551
  this.parent.updatevirtualizationList();
@@ -555,7 +557,8 @@ class VirtualScroll {
555
557
  (this.parent.totalItemCount <= this.parent.itemCount))) ? 0 : this.parent.skeletonCount;
556
558
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
557
559
  const virtualTrackElement = this.parent.list.getElementsByClassName('e-virtual-ddl')[0];
558
- if (virtualTrackElement) {
560
+ const preventAction = this.component !== 'multiselect' || (this.component === 'multiselect' && ((!(this.parent.dataSource instanceof DataManager))) || (this.parent.dataSource instanceof DataManager && !isResetListCalled));
561
+ if (virtualTrackElement && preventAction) {
559
562
  virtualTrackElement.style = this.parent.GetVirtualTrackHeight();
560
563
  }
561
564
  else if (!virtualTrackElement && this.parent.skeletonCount > 0 && this.parent.popupWrapper) {
@@ -564,11 +567,13 @@ class VirtualScroll {
564
567
  });
565
568
  this.parent.popupWrapper.querySelector('.e-dropdownbase').appendChild(virualElement);
566
569
  }
567
- this.parent.UpdateSkeleton();
570
+ if (this.component !== 'multiselect' || (this.component === 'multiselect' && ((!(this.parent.dataSource instanceof DataManager))) || (this.parent.dataSource instanceof DataManager && (!isResetListCalled || this.parent.viewPortInfo.startIndex === 0)))) {
571
+ this.parent.UpdateSkeleton();
572
+ }
568
573
  this.parent.liCollections = this.parent.list.querySelectorAll('.e-list-item');
569
574
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
570
575
  const virtualContentElement = this.parent.list.getElementsByClassName('e-virtual-ddl-content')[0];
571
- if (virtualContentElement) {
576
+ if (virtualContentElement && preventAction) {
572
577
  (virtualContentElement).style = this.parent.getTransformValues();
573
578
  }
574
579
  if (this.parent.fields.groupBy) {
@@ -911,6 +916,7 @@ let DropDownBase = class DropDownBase extends Component {
911
916
  this.isDynamicData = false;
912
917
  this.isPrimitiveData = false;
913
918
  this.isCustomFiltering = false;
919
+ this.debounceTimer = null;
914
920
  this.virtualListInfo = {
915
921
  currentPageNumber: null,
916
922
  direction: null,
@@ -1269,6 +1275,29 @@ let DropDownBase = class DropDownBase extends Component {
1269
1275
  isContainSkeleton.firstChild.insertBefore(liElement, isContainSkeleton.firstChild.children[0]);
1270
1276
  }
1271
1277
  }
1278
+ if (this.getModuleName() === 'multiselect') {
1279
+ for (let i = 0; i < totalSkeletonCount && this.totalItemCount !== this.viewPortInfo.endIndex; i++) {
1280
+ const liElement = this.createElement('li', { className: `${dropDownBaseClasses.virtualList} e-virtual-list-end`, styles: 'overflow: inherit' });
1281
+ if (this.isVirtualizationEnabled && this.itemTemplate) {
1282
+ liElement.style.height = (this.listItemHeight - parseInt(window.getComputedStyle(this.getItems()[1]).marginBottom, 10)) + 'px';
1283
+ }
1284
+ const skeleton = new Skeleton({
1285
+ shape: 'Text',
1286
+ height: '10px',
1287
+ width: '95%',
1288
+ cssClass: 'e-skeleton-text-end'
1289
+ });
1290
+ skeleton.appendTo(this.createElement('div'));
1291
+ liElement.appendChild(skeleton.element);
1292
+ if (isContainSkeleton.firstChild) {
1293
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1294
+ isContainSkeleton.firstChild.appendChild(liElement);
1295
+ }
1296
+ }
1297
+ if (this.totalItemCount === this.viewPortInfo.endIndex) {
1298
+ isContainSkeleton.querySelectorAll('.e-virtual-list-end').forEach((el) => el.remove());
1299
+ }
1300
+ }
1272
1301
  }
1273
1302
  }
1274
1303
  getLocaleName() {
@@ -1546,7 +1575,9 @@ let DropDownBase = class DropDownBase extends Component {
1546
1575
  this.preventPopupOpen = false;
1547
1576
  return;
1548
1577
  }
1578
+ let isSetCurrentcall = false;
1549
1579
  if (this.isVirtualizationEnabled && this.setCurrentView) {
1580
+ isSetCurrentcall = true;
1550
1581
  this.notify('setCurrentViewDataAsync', {
1551
1582
  module: 'VirtualScroll'
1552
1583
  });
@@ -1554,7 +1585,8 @@ let DropDownBase = class DropDownBase extends Component {
1554
1585
  if (this.keyboardEvent != null) {
1555
1586
  this.handleVirtualKeyboardActions(this.keyboardEvent, this.pageCount);
1556
1587
  }
1557
- if (this.isVirtualizationEnabled) {
1588
+ const preventSkeleton = this.getModuleName() !== 'multiselect' || (this.getModuleName() === 'multiselect' && (!(this.dataSource instanceof DataManager) || (this.dataSource instanceof DataManager && !isSetCurrentcall)));
1589
+ if (this.isVirtualizationEnabled && preventSkeleton) {
1558
1590
  this.getFilteringSkeletonCount();
1559
1591
  this.updatePopupPosition();
1560
1592
  }
@@ -1798,10 +1830,12 @@ let DropDownBase = class DropDownBase extends Component {
1798
1830
  postRender(listElement, list, bindEvent) {
1799
1831
  if (this.fields.disabled) {
1800
1832
  const liCollections = listElement.querySelectorAll('.' + dropDownBaseClasses.li);
1833
+ const data = this.sortOrder !== 'None' ? !isNullOrUndefined(this.fields.groupBy) ?
1834
+ this.sortedData.filter((item) => !('isHeader' in item) || item.isHeader !== true) : this.sortedData : this.listData;
1801
1835
  for (let index = 0; index < liCollections.length; index++) {
1802
- if (JSON.parse(JSON.stringify(this.listData[index]))[this.fields.disabled]) {
1836
+ if (JSON.parse(JSON.stringify(data[index]))[this.fields.disabled]) {
1803
1837
  if (!isNullOrUndefined(this.fields.groupBy)) {
1804
- const item = this.listData[index];
1838
+ const item = data[index];
1805
1839
  const value = getValue((this.fields.value ? this.fields.value : 'value'), item);
1806
1840
  const li = listElement.querySelector('li[data-value="' + value + '"]');
1807
1841
  if (!isNullOrUndefined(li)) {
@@ -1843,6 +1877,17 @@ let DropDownBase = class DropDownBase extends Component {
1843
1877
  getQuery(query) {
1844
1878
  return query ? query : this.query ? this.query : new Query();
1845
1879
  }
1880
+ performFiltering(e) {
1881
+ // this is for component wise
1882
+ }
1883
+ debouncedFiltering(e, debounceDelay) {
1884
+ if (this.debounceTimer !== null) {
1885
+ clearTimeout(this.debounceTimer);
1886
+ }
1887
+ this.debounceTimer = setTimeout(() => {
1888
+ this.performFiltering(e);
1889
+ }, debounceDelay);
1890
+ }
1846
1891
  updateVirtualizationProperties(itemCount, filtering, isCheckbox) {
1847
1892
  this.isVirtualizationEnabled = true;
1848
1893
  this.virtualizedItemsCount = itemCount;
@@ -2016,9 +2061,10 @@ let DropDownBase = class DropDownBase extends Component {
2016
2061
  * @param {object[]} listData - Specifies the list of array of data.
2017
2062
  * @param {FieldSettingsModel} fields - Maps the columns of the data table and binds the data to the component.
2018
2063
  * @param {boolean} isCheckBoxUpdate - Specifies whether the list item is updated with checkbox.
2064
+ * @param {boolean} isClearAll - Specifies whether the current action is clearAll.
2019
2065
  * @returns {HTMLElement} Return the list items.
2020
2066
  */
2021
- renderItems(listData, fields, isCheckBoxUpdate) {
2067
+ renderItems(listData, fields, isCheckBoxUpdate, isClearAll) {
2022
2068
  let ulElement;
2023
2069
  if (this.itemTemplate && listData) {
2024
2070
  if (this.getModuleName() === 'multiselect' && this.virtualSelectAll) {
@@ -2072,7 +2118,7 @@ let DropDownBase = class DropDownBase extends Component {
2072
2118
  }
2073
2119
  }
2074
2120
  else {
2075
- if (this.getModuleName() === 'multiselect' && this.virtualSelectAll) {
2121
+ if (this.getModuleName() === 'multiselect' && (this.virtualSelectAll && !isClearAll)) {
2076
2122
  this.virtualSelectAllData = listData;
2077
2123
  listData = listData.slice(this.virtualItemStartIndex, this.virtualItemEndIndex);
2078
2124
  }
@@ -2091,11 +2137,13 @@ let DropDownBase = class DropDownBase extends Component {
2091
2137
  oldUlElement = this.list.querySelector('.e-list-parent' + '.e-reorder');
2092
2138
  }
2093
2139
  if ((listData.length >= this.virtualizedItemsCount && oldUlElement && virtualUlElement) || (oldUlElement && virtualUlElement && this.isAllowFiltering) || (oldUlElement && virtualUlElement && (this.getModuleName() === 'autocomplete' || this.getModuleName() === 'multiselect')) || isRemovedUlelement) {
2094
- if (!this.appendUncheckList) {
2095
- virtualUlElement.replaceChild(ulElement, oldUlElement);
2096
- }
2097
- else {
2098
- virtualUlElement.appendChild(ulElement);
2140
+ if (this.getModuleName() !== 'multiselect' || (this.getModuleName() === 'multiselect' && (!(this.dataSource instanceof DataManager) || (this.dataSource instanceof DataManager && !this.setCurrentView)))) {
2141
+ if (!this.appendUncheckList) {
2142
+ virtualUlElement.replaceChild(ulElement, oldUlElement);
2143
+ }
2144
+ else {
2145
+ virtualUlElement.appendChild(ulElement);
2146
+ }
2099
2147
  }
2100
2148
  this.updateListElements(listData);
2101
2149
  }
@@ -4838,6 +4886,29 @@ let DropDownList = class DropDownList extends DropDownBase {
4838
4886
  const input = this.inputElement;
4839
4887
  return { start: Math.abs(input.selectionStart), end: Math.abs(input.selectionEnd) };
4840
4888
  }
4889
+ performFiltering(e) {
4890
+ this.checkAndResetCache();
4891
+ this.isRequesting = false;
4892
+ const eventArgs = {
4893
+ preventDefaultAction: false,
4894
+ text: this.filterInput.value,
4895
+ updateData: (dataSource, query, fields) => {
4896
+ if (eventArgs.cancel) {
4897
+ return;
4898
+ }
4899
+ this.isCustomFilter = true;
4900
+ this.customFilterQuery = query ? query.clone() : query;
4901
+ this.filteringAction(dataSource, query, fields);
4902
+ },
4903
+ baseEventArgs: e,
4904
+ cancel: false
4905
+ };
4906
+ this.trigger('filtering', eventArgs, (eventArgs) => {
4907
+ if (!eventArgs.cancel && !this.isCustomFilter && !eventArgs.preventDefaultAction) {
4908
+ this.filteringAction(this.dataSource, null, this.fields);
4909
+ }
4910
+ });
4911
+ }
4841
4912
  searchLists(e) {
4842
4913
  this.isTyped = true;
4843
4914
  this.activeIndex = null;
@@ -4848,27 +4919,12 @@ let DropDownList = class DropDownList extends DropDownBase {
4848
4919
  }
4849
4920
  this.isDataFetched = false;
4850
4921
  if (this.isFiltering()) {
4851
- this.checkAndResetCache();
4852
- this.isRequesting = false;
4853
- const eventArgs = {
4854
- preventDefaultAction: false,
4855
- text: this.filterInput.value,
4856
- updateData: (dataSource, query, fields) => {
4857
- if (eventArgs.cancel) {
4858
- return;
4859
- }
4860
- this.isCustomFilter = true;
4861
- this.customFilterQuery = query ? query.clone() : query;
4862
- this.filteringAction(dataSource, query, fields);
4863
- },
4864
- baseEventArgs: e,
4865
- cancel: false
4866
- };
4867
- this.trigger('filtering', eventArgs, (eventArgs) => {
4868
- if (!eventArgs.cancel && !this.isCustomFilter && !eventArgs.preventDefaultAction) {
4869
- this.filteringAction(this.dataSource, null, this.fields);
4870
- }
4871
- });
4922
+ if (this.typedString !== '' && this.debounceDelay > 0) {
4923
+ this.debouncedFiltering(e, this.debounceDelay);
4924
+ }
4925
+ else {
4926
+ this.performFiltering(e);
4927
+ }
4872
4928
  }
4873
4929
  }
4874
4930
  /**
@@ -5132,7 +5188,19 @@ let DropDownList = class DropDownList extends DropDownBase {
5132
5188
  this.dataSource.executeQuery(this.getQuery(this.query).where(new Predicate(checkField, 'equal', value)))
5133
5189
  .then((e) => {
5134
5190
  if (e.result.length > 0) {
5135
- this.addItem(e.result, list.length);
5191
+ if (!this.enableVirtualization) {
5192
+ this.addItem(e.result, list.length);
5193
+ }
5194
+ else {
5195
+ this.itemData = e.result[0];
5196
+ const dataItem = this.getItemData();
5197
+ const value = this.allowObjectBinding ?
5198
+ this.getDataByValue(dataItem.value) : dataItem.value;
5199
+ if ((this.value === dataItem.value && this.text !== dataItem.text) ||
5200
+ (this.value !== dataItem.value && this.text === dataItem.text)) {
5201
+ this.setProperties({ 'text': dataItem.text ? dataItem.text.toString() : dataItem.text, 'value': value });
5202
+ }
5203
+ }
5136
5204
  this.updateValues();
5137
5205
  }
5138
5206
  else {
@@ -7076,6 +7144,7 @@ let DropDownList = class DropDownList extends DropDownBase {
7076
7144
  this.inputElement.classList.remove('e-input');
7077
7145
  Input.setValue('', this.inputElement, this.floatLabelType, this.showClearButton);
7078
7146
  }
7147
+ this.element.removeAttribute('tabindex');
7079
7148
  this.element.style.display = 'block';
7080
7149
  if (this.inputWrapper.container && this.inputWrapper.container.parentElement) {
7081
7150
  if (this.inputWrapper.container.parentElement.tagName === this.getNgDirective()) {
@@ -7196,6 +7265,9 @@ __decorate$1([
7196
7265
  __decorate$1([
7197
7266
  Property(false)
7198
7267
  ], DropDownList.prototype, "allowFiltering", void 0);
7268
+ __decorate$1([
7269
+ Property(300)
7270
+ ], DropDownList.prototype, "debounceDelay", void 0);
7199
7271
  __decorate$1([
7200
7272
  Property(true)
7201
7273
  ], DropDownList.prototype, "isDeviceFullScreen", void 0);
@@ -7864,6 +7936,9 @@ let DropDownTree = class DropDownTree extends Component {
7864
7936
  }
7865
7937
  /* To wire events for the dropdown tree */
7866
7938
  wireEvents() {
7939
+ if (Browser.isIos) {
7940
+ EventHandler.add(this.inputWrapper, 'touchstart', this.handleIosTouch, this);
7941
+ }
7867
7942
  EventHandler.add(this.inputWrapper, 'mouseup', this.dropDownClick, this);
7868
7943
  EventHandler.add(this.inputWrapper, 'focus', this.focusIn, this);
7869
7944
  EventHandler.add(this.inputWrapper, 'blur', this.focusOut, this);
@@ -7897,6 +7972,9 @@ let DropDownTree = class DropDownTree extends Component {
7897
7972
  }
7898
7973
  /* To unwire events for the dropdown tree */
7899
7974
  unWireEvents() {
7975
+ if (Browser.isIos) {
7976
+ EventHandler.remove(this.inputWrapper, 'touchstart', this.handleIosTouch);
7977
+ }
7900
7978
  EventHandler.remove(this.inputWrapper, 'mouseup', this.dropDownClick);
7901
7979
  EventHandler.remove(this.inputWrapper, 'focus', this.focusIn);
7902
7980
  EventHandler.remove(this.inputWrapper, 'blur', this.focusOut);
@@ -7914,6 +7992,11 @@ let DropDownTree = class DropDownTree extends Component {
7914
7992
  }
7915
7993
  document.removeEventListener('mousedown', this.documentClickContext);
7916
7994
  }
7995
+ /* Handles touch events specifically for iOS devices */
7996
+ handleIosTouch(e) {
7997
+ e.preventDefault();
7998
+ this.dropDownClick(e);
7999
+ }
7917
8000
  /* Trigger when the dropdown is clicked */
7918
8001
  dropDownClick(e) {
7919
8002
  if (!this.enabled || this.readonly) {
@@ -11771,9 +11854,6 @@ __decorate$3([
11771
11854
  __decorate$3([
11772
11855
  Property(true)
11773
11856
  ], ComboBox.prototype, "showClearButton", void 0);
11774
- __decorate$3([
11775
- Property(false)
11776
- ], ComboBox.prototype, "enableRtl", void 0);
11777
11857
  __decorate$3([
11778
11858
  Event()
11779
11859
  ], ComboBox.prototype, "customValueSpecifier", void 0);
@@ -11981,6 +12061,14 @@ let AutoComplete = class AutoComplete extends ComboBox {
11981
12061
  this.isSelected = false;
11982
12062
  this.activeIndex = null;
11983
12063
  this.isRequesting = false;
12064
+ if (this.queryString !== '' && this.debounceDelay > 0) {
12065
+ this.debouncedFiltering(e, this.debounceDelay);
12066
+ }
12067
+ else {
12068
+ this.performFiltering(e);
12069
+ }
12070
+ }
12071
+ performFiltering(e) {
11984
12072
  const eventArgs = {
11985
12073
  preventDefaultAction: false,
11986
12074
  text: this.filterInput.value,
@@ -13111,7 +13199,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
13111
13199
  valuecheck = this.presentItemValue(this.ulElement);
13112
13200
  }
13113
13201
  if (valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
13114
- && this.listData != null) {
13202
+ && this.listData != null && !(valuecheck.length === 1 && valuecheck[0] == null)) {
13115
13203
  this.isaddNonPresentItems = true;
13116
13204
  this.addNonPresentItems(valuecheck, this.ulElement, this.listData);
13117
13205
  this.isaddNonPresentItems = false;
@@ -13986,7 +14074,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
13986
14074
  pageDownSelection(steps, isVirtualKeyAction) {
13987
14075
  const list = this.getItems();
13988
14076
  const collection = this.list.querySelectorAll('li.'
13989
- + dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
14077
+ + dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)' + ':not(.e-virtual-list-end)');
13990
14078
  let previousItem = steps <= collection.length ? collection[steps - 1] : collection[collection.length - 1];
13991
14079
  if (this.fields.disabled && previousItem && !this.enableVirtualization) {
13992
14080
  while (previousItem && (previousItem.classList.contains('e-disabled') || previousItem.classList.contains(HIDE_LIST) ||
@@ -14003,6 +14091,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
14003
14091
  if (this.enableVirtualization && isVirtualKeyAction) {
14004
14092
  previousItem = steps <= list.length ? this.liCollections[steps] : this.liCollections[list.length - 1];
14005
14093
  }
14094
+ if (this.enableVirtualization && previousItem && previousItem.classList.contains('e-virtual-list-end')) {
14095
+ previousItem = collection[collection.length - 1];
14096
+ }
14006
14097
  this.isKeyBoardAction = true;
14007
14098
  this.addListFocus(previousItem);
14008
14099
  this.previousFocusItem = previousItem;
@@ -14483,9 +14574,10 @@ let MultiSelect = class MultiSelect extends DropDownBase {
14483
14574
  const selectedListMargin = selectedLI && !isNaN(parseInt(window.getComputedStyle(selectedLI).marginBottom, 10)) ?
14484
14575
  parseInt(window.getComputedStyle(selectedLI).marginBottom, 10) : 0;
14485
14576
  this.isUpwardScrolling = false;
14486
- const virtualListCount = this.list.querySelectorAll('.e-virtual-list').length;
14487
- const lastElementValue = this.list.querySelector('li:last-of-type') ?
14488
- this.list.querySelector('li:last-of-type').getAttribute('data-value') : null;
14577
+ const virtualListCount = this.list.querySelectorAll('.e-virtual-list:not(.e-virtual-list-end)').length;
14578
+ const liItems = this.list.querySelectorAll('li:not(.e-virtual-list-end)');
14579
+ const lastElementValue = liItems && liItems.length > 0 && liItems[liItems.length - 1] ?
14580
+ liItems[liItems.length - 1].getAttribute('data-value') : null;
14489
14581
  const selectedLiOffsetTop = this.virtualListInfo && this.virtualListInfo.startIndex ?
14490
14582
  selectedLI.offsetTop + (this.virtualListInfo.startIndex * (selectedLI.offsetHeight + selectedListMargin))
14491
14583
  : selectedLI.offsetTop;
@@ -14538,7 +14630,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
14538
14630
  this.isKeyBoardAction = isScrollerCHanged;
14539
14631
  }
14540
14632
  scrollTop(selectedLI, activeIndex, keyCode = null) {
14541
- const virtualListCount = this.list.querySelectorAll('.e-virtual-list').length;
14633
+ const virtualListCount = this.list.querySelectorAll('.e-virtual-list:not(.e-virtual-list-end)').length;
14542
14634
  const selectedListMargin = selectedLI && !isNaN(parseInt(window.getComputedStyle(selectedLI).marginBottom, 10)) ?
14543
14635
  parseInt(window.getComputedStyle(selectedLI).marginBottom, 10) : 0;
14544
14636
  const selectedLiOffsetTop = (this.virtualListInfo && this.virtualListInfo.startIndex) ?
@@ -14767,11 +14859,11 @@ let MultiSelect = class MultiSelect extends DropDownBase {
14767
14859
  if (this.list) {
14768
14860
  let elements = this.list.querySelectorAll('li.'
14769
14861
  + dropDownBaseClasses.li
14770
- + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
14862
+ + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)' + ':not(.e-virtual-list-end)');
14771
14863
  if (this.mode === 'CheckBox' && this.enableGroupCheckBox && !isNullOrUndefined(this.fields.groupBy)) {
14772
14864
  elements = this.list.querySelectorAll('li.'
14773
14865
  + dropDownBaseClasses.li + ',li.' + dropDownBaseClasses.group
14774
- + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
14866
+ + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)' + ':not(.e-virtual-list-end)');
14775
14867
  }
14776
14868
  let selectedElem = this.list.querySelector('li.' + dropDownBaseClasses.focus);
14777
14869
  if (this.enableVirtualization && isVirtualKeyAction && !isNullOrUndefined(this.currentFocuedListElement)) {
@@ -15461,7 +15553,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
15461
15553
  const inputWidth = (this.componentWrapper.offsetWidth) * parseFloat(width) / 100;
15462
15554
  width = inputWidth.toString() + 'px';
15463
15555
  }
15464
- return width;
15556
+ return (this.allowResize && this.resizeWidth) ? this.resizeWidth + 'px' : width;
15465
15557
  }
15466
15558
  mouseIn() {
15467
15559
  if (this.enabled && !this.readonly) {
@@ -15735,7 +15827,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
15735
15827
  updateInitialData() {
15736
15828
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
15737
15829
  const currentData = this.selectData;
15738
- const ulElement = this.renderItems(currentData, this.fields);
15830
+ const ulElement = this.renderItems(currentData, this.fields, false, this.isClearAllAction);
15739
15831
  this.list.scrollTop = 0;
15740
15832
  this.virtualListInfo = {
15741
15833
  currentPageNumber: null,
@@ -15955,6 +16047,38 @@ let MultiSelect = class MultiSelect extends DropDownBase {
15955
16047
  this.search(event);
15956
16048
  });
15957
16049
  }
16050
+ performFiltering(e) {
16051
+ const eventArgs = {
16052
+ preventDefaultAction: false,
16053
+ text: this.targetElement(),
16054
+ updateData: (dataSource, query, fields) => {
16055
+ if (eventArgs.cancel) {
16056
+ return;
16057
+ }
16058
+ this.isFiltered = true;
16059
+ this.customFilterQuery = query;
16060
+ this.remoteFilterAction = true;
16061
+ this.isCustomFiltering = true;
16062
+ this.dataUpdater(dataSource, query, fields);
16063
+ },
16064
+ event: e,
16065
+ cancel: false
16066
+ };
16067
+ this.trigger('filtering', eventArgs, (eventArgs) => {
16068
+ this.isFilterPrevented = eventArgs.cancel;
16069
+ if (!eventArgs.cancel) {
16070
+ if (!this.isFiltered && !eventArgs.preventDefaultAction) {
16071
+ this.filterAction = true;
16072
+ this.isFilteringAction = true;
16073
+ if (this.dataSource instanceof DataManager && this.allowCustomValue) {
16074
+ this.isCustomRendered = false;
16075
+ }
16076
+ this.dataUpdater(this.dataSource, null, this.fields);
16077
+ this.isFilteringAction = false;
16078
+ }
16079
+ }
16080
+ });
16081
+ }
15958
16082
  search(e) {
15959
16083
  this.preventSetCurrentData = false;
15960
16084
  this.firstItem = this.dataSource && this.dataSource.length > 0 ? this.dataSource[0] : null;
@@ -15976,36 +16100,12 @@ let MultiSelect = class MultiSelect extends DropDownBase {
15976
16100
  }
15977
16101
  this.checkAndResetCache();
15978
16102
  this.isRequesting = false;
15979
- const eventArgs = {
15980
- preventDefaultAction: false,
15981
- text: this.targetElement(),
15982
- updateData: (dataSource, query, fields) => {
15983
- if (eventArgs.cancel) {
15984
- return;
15985
- }
15986
- this.isFiltered = true;
15987
- this.customFilterQuery = query;
15988
- this.remoteFilterAction = true;
15989
- this.isCustomFiltering = true;
15990
- this.dataUpdater(dataSource, query, fields);
15991
- },
15992
- event: e,
15993
- cancel: false
15994
- };
15995
- this.trigger('filtering', eventArgs, (eventArgs) => {
15996
- this.isFilterPrevented = eventArgs.cancel;
15997
- if (!eventArgs.cancel) {
15998
- if (!this.isFiltered && !eventArgs.preventDefaultAction) {
15999
- this.filterAction = true;
16000
- this.isFilteringAction = true;
16001
- if (this.dataSource instanceof DataManager && this.allowCustomValue) {
16002
- this.isCustomRendered = false;
16003
- }
16004
- this.dataUpdater(this.dataSource, null, this.fields);
16005
- this.isFilteringAction = false;
16006
- }
16007
- }
16008
- });
16103
+ if (this.targetElement() !== '' && this.debounceDelay > 0) {
16104
+ this.debouncedFiltering(e, this.debounceDelay);
16105
+ }
16106
+ else {
16107
+ this.performFiltering(e);
16108
+ }
16009
16109
  }
16010
16110
  else if (this.allowCustomValue) {
16011
16111
  let query = new Query();
@@ -17109,7 +17209,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
17109
17209
  }
17110
17210
  checkClearIconWidth() {
17111
17211
  if (this.showClearButton) {
17112
- this.clearIconWidth = parseInt(window.getComputedStyle(this.overAllClear).width, 10);
17212
+ this.clearIconWidth = parseInt(window.getComputedStyle(this.overAllClear).width, 10) || this.overAllClear.offsetWidth;
17113
17213
  }
17114
17214
  }
17115
17215
  updateRemainWidth(viewWrapper, totalWidth) {
@@ -18021,7 +18121,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
18021
18121
  this.list.parentElement.style.paddingBottom = '';
18022
18122
  const overAllHeight = parseInt(this.popupHeight, 10);
18023
18123
  this.list.style.maxHeight = formatUnit(overAllHeight);
18024
- this.list.parentElement.style.height = formatUnit(this.popupHeight);
18124
+ if (this.popupHeight.toString().toLowerCase() !== 'auto' && this.initialPopupHeight >= (parseInt(this.popupHeight.toString(), 10) - 2)) {
18125
+ this.list.parentElement.style.height = formatUnit(this.popupHeight);
18126
+ }
18025
18127
  this.list.parentElement.style.maxHeight = formatUnit(this.popupHeight);
18026
18128
  }
18027
18129
  if (this.resizer) {
@@ -18346,7 +18448,8 @@ let MultiSelect = class MultiSelect extends DropDownBase {
18346
18448
  }
18347
18449
  if (this.list && this.list.parentElement) {
18348
18450
  this.list.parentElement.classList.add('e-resize');
18349
- if (this.popupHeight.toString().toLowerCase() !== 'auto') {
18451
+ this.initialPopupHeight = this.list.parentElement.clientHeight;
18452
+ if (this.popupHeight.toString().toLowerCase() !== 'auto' && this.initialPopupHeight >= (parseInt(this.popupHeight.toString(), 10) - 2)) {
18350
18453
  this.list.parentElement.style.height = '100%';
18351
18454
  }
18352
18455
  this.list.parentElement.style.boxSizing = 'border-box'; // Ensures padding doesn't affect element size
@@ -18357,6 +18460,18 @@ let MultiSelect = class MultiSelect extends DropDownBase {
18357
18460
  this.list.parentElement.style.height = this.resizeHeight + 'px';
18358
18461
  this.list.parentElement.style.maxHeight = this.resizeHeight + 'px';
18359
18462
  this.list.style.maxHeight = `${this.resizeHeight}px`;
18463
+ if (this.headerTemplate) {
18464
+ const headerElem = this.list.parentElement.querySelector('.e-ddl-header');
18465
+ if (headerElem && headerElem.offsetHeight) {
18466
+ this.headerTemplateHeight = headerElem.offsetHeight;
18467
+ }
18468
+ if (this.resizeHeight) {
18469
+ this.list.style.maxHeight = `${this.resizeHeight - this.headerTemplateHeight - 16}px`;
18470
+ }
18471
+ else {
18472
+ this.list.style.maxHeight = `${parseInt(this.list.style.maxHeight, 10) - 16}px`;
18473
+ }
18474
+ }
18360
18475
  }
18361
18476
  if (this.resizer) {
18362
18477
  EventHandler.add(this.resizer, 'mousedown', this.startResizing, this);
@@ -18411,6 +18526,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
18411
18526
  this.list.parentElement.style.height = `${this.resizeHeight}px`;
18412
18527
  this.list.parentElement.style.maxHeight = `${this.resizeHeight}px`;
18413
18528
  this.list.style.maxHeight = `${this.resizeHeight}px`;
18529
+ if (this.headerTemplate) {
18530
+ this.list.style.maxHeight = `${this.resizeHeight - this.headerTemplateHeight - 16}px`;
18531
+ }
18414
18532
  if (this.fixedHeaderElement && this.ulElement) {
18415
18533
  this.fixedHeaderElement.style.width = `${this.ulElement.offsetWidth}px`;
18416
18534
  }
@@ -18909,6 +19027,9 @@ __decorate$5([
18909
19027
  __decorate$5([
18910
19028
  Property(null)
18911
19029
  ], MultiSelect.prototype, "allowFiltering", void 0);
19030
+ __decorate$5([
19031
+ Property(300)
19032
+ ], MultiSelect.prototype, "debounceDelay", void 0);
18912
19033
  __decorate$5([
18913
19034
  Property(true)
18914
19035
  ], MultiSelect.prototype, "isDeviceFullScreen", void 0);
@@ -22200,6 +22321,7 @@ let Mention = class Mention extends DropDownBase {
22200
22321
  */
22201
22322
  constructor(options, element) {
22202
22323
  super(options, element);
22324
+ this.debounceTimer = null;
22203
22325
  }
22204
22326
  /**
22205
22327
  * When property value changes happened, then onPropertyChanged method will execute the respective changes in this component.
@@ -22633,21 +22755,7 @@ let Mention = class Mention extends DropDownBase {
22633
22755
  this.range = this.inputElement.ownerDocument.getSelection().getRangeAt(0);
22634
22756
  return this.range;
22635
22757
  }
22636
- searchLists(e) {
22637
- this.isDataFetched = false;
22638
- if (isNullOrUndefined(this.list)) {
22639
- super.render();
22640
- this.unWireListEvents();
22641
- this.wireListEvents();
22642
- }
22643
- if (e.type !== 'mousedown' && (e.keyCode === 40 || e.keyCode === 38)) {
22644
- this.queryString = this.queryString === '' ? null : this.queryString;
22645
- this.beforePopupOpen = true;
22646
- this.resetList(this.dataSource, this.fields);
22647
- return;
22648
- }
22649
- this.isSelected = false;
22650
- this.activeIndex = null;
22758
+ performFiltering(e) {
22651
22759
  const eventArgs = {
22652
22760
  preventDefaultAction: false,
22653
22761
  text: this.queryString,
@@ -22666,6 +22774,28 @@ let Mention = class Mention extends DropDownBase {
22666
22774
  }
22667
22775
  });
22668
22776
  }
22777
+ searchLists(e) {
22778
+ this.isDataFetched = false;
22779
+ if (isNullOrUndefined(this.list)) {
22780
+ super.render();
22781
+ this.unWireListEvents();
22782
+ this.wireListEvents();
22783
+ }
22784
+ if (e.type !== 'mousedown' && (e.keyCode === 40 || e.keyCode === 38)) {
22785
+ this.queryString = this.queryString === '' ? null : this.queryString;
22786
+ this.beforePopupOpen = true;
22787
+ this.resetList(this.dataSource, this.fields);
22788
+ return;
22789
+ }
22790
+ this.isSelected = false;
22791
+ this.activeIndex = null;
22792
+ if (this.queryString !== '' && this.debounceDelay > 0) {
22793
+ this.debouncedFiltering(e, this.debounceDelay);
22794
+ }
22795
+ else {
22796
+ this.performFiltering(e);
22797
+ }
22798
+ }
22669
22799
  filterAction(dataSource, query, fields) {
22670
22800
  this.beforePopupOpen = true;
22671
22801
  if (this.queryString.length >= this.minLength) {
@@ -23857,6 +23987,9 @@ __decorate$7([
23857
23987
  __decorate$7([
23858
23988
  Property('300px')
23859
23989
  ], Mention.prototype, "popupHeight", void 0);
23990
+ __decorate$7([
23991
+ Property(300)
23992
+ ], Mention.prototype, "debounceDelay", void 0);
23860
23993
  __decorate$7([
23861
23994
  Property(null)
23862
23995
  ], Mention.prototype, "displayTemplate", void 0);