@syncfusion/ej2-dropdowns 32.2.9 → 33.1.46

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 (216) 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 +450 -124
  5. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  6. package/dist/es6/ej2-dropdowns.es5.js +425 -99
  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 +8 -8
  12. package/src/combo-box/combo-box.js +3 -0
  13. package/src/common/virtual-scroll.d.ts +1 -0
  14. package/src/common/virtual-scroll.js +18 -2
  15. package/src/drop-down-base/drop-down-base.d.ts +2 -0
  16. package/src/drop-down-base/drop-down-base.js +48 -0
  17. package/src/drop-down-list/drop-down-list.js +98 -14
  18. package/src/drop-down-tree/drop-down-tree-model.d.ts +1 -1
  19. package/src/drop-down-tree/drop-down-tree.d.ts +1 -1
  20. package/src/mention/mention.js +8 -4
  21. package/src/multi-select/float-label.js +8 -2
  22. package/src/multi-select/multi-select.d.ts +2 -0
  23. package/src/multi-select/multi-select.js +242 -77
  24. package/styles/bds-lite.css +17 -9
  25. package/styles/bds.css +29 -15
  26. package/styles/bootstrap-dark-lite.css +17 -9
  27. package/styles/bootstrap-dark.css +27 -14
  28. package/styles/bootstrap-lite.css +17 -9
  29. package/styles/bootstrap.css +27 -14
  30. package/styles/bootstrap4-lite.css +17 -9
  31. package/styles/bootstrap4.css +27 -14
  32. package/styles/bootstrap5-dark-lite.css +17 -9
  33. package/styles/bootstrap5-dark.css +27 -14
  34. package/styles/bootstrap5-lite.css +17 -9
  35. package/styles/bootstrap5.3-lite.css +19 -9
  36. package/styles/bootstrap5.3.css +29 -14
  37. package/styles/bootstrap5.css +27 -14
  38. package/styles/drop-down-base/_bds-definition.scss +2 -2
  39. package/styles/drop-down-base/_bigger.scss +3 -3
  40. package/styles/drop-down-base/_bootstrap-dark-definition.scss +3 -3
  41. package/styles/drop-down-base/_bootstrap-definition.scss +3 -3
  42. package/styles/drop-down-base/_bootstrap4-definition.scss +3 -3
  43. package/styles/drop-down-base/_bootstrap5-dark-definition.scss +3 -3
  44. package/styles/drop-down-base/_bootstrap5-definition.scss +3 -3
  45. package/styles/drop-down-base/_bootstrap5.3-definition.scss +6 -3
  46. package/styles/drop-down-base/_fabric-dark-definition.scss +3 -3
  47. package/styles/drop-down-base/_fabric-definition.scss +3 -3
  48. package/styles/drop-down-base/_fluent-dark-definition.scss +3 -3
  49. package/styles/drop-down-base/_fluent-definition.scss +3 -3
  50. package/styles/drop-down-base/_fluent2-definition.scss +8 -5
  51. package/styles/drop-down-base/_fusionnew-definition.scss +2 -2
  52. package/styles/drop-down-base/_highcontrast-definition.scss +3 -3
  53. package/styles/drop-down-base/_highcontrast-light-definition.scss +3 -3
  54. package/styles/drop-down-base/_layout.scss +12 -1
  55. package/styles/drop-down-base/_material-dark-definition.scss +2 -2
  56. package/styles/drop-down-base/_material-definition.scss +2 -2
  57. package/styles/drop-down-base/_material3-dark-definition.scss +6 -4
  58. package/styles/drop-down-base/_material3-definition.scss +6 -4
  59. package/styles/drop-down-base/_tailwind-dark-definition.scss +4 -4
  60. package/styles/drop-down-base/_tailwind-definition.scss +4 -4
  61. package/styles/drop-down-base/_tailwind3-definition.scss +5 -2
  62. package/styles/drop-down-base/_theme.scss +6 -0
  63. package/styles/drop-down-base/bds.css +21 -11
  64. package/styles/drop-down-base/bootstrap-dark.css +19 -10
  65. package/styles/drop-down-base/bootstrap.css +19 -10
  66. package/styles/drop-down-base/bootstrap4.css +19 -10
  67. package/styles/drop-down-base/bootstrap5-dark.css +19 -10
  68. package/styles/drop-down-base/bootstrap5.3.css +21 -10
  69. package/styles/drop-down-base/bootstrap5.css +19 -10
  70. package/styles/drop-down-base/fabric-dark.css +19 -10
  71. package/styles/drop-down-base/fabric.css +19 -10
  72. package/styles/drop-down-base/fluent-dark.css +19 -10
  73. package/styles/drop-down-base/fluent.css +19 -10
  74. package/styles/drop-down-base/fluent2.css +28 -12
  75. package/styles/drop-down-base/highcontrast-light.css +19 -10
  76. package/styles/drop-down-base/highcontrast.css +19 -10
  77. package/styles/drop-down-base/material-dark.css +17 -9
  78. package/styles/drop-down-base/material.css +17 -9
  79. package/styles/drop-down-base/material3-dark.css +19 -9
  80. package/styles/drop-down-base/material3.css +19 -9
  81. package/styles/drop-down-base/tailwind-dark.css +21 -11
  82. package/styles/drop-down-base/tailwind.css +21 -11
  83. package/styles/drop-down-base/tailwind3.css +19 -9
  84. package/styles/drop-down-list/bds.css +4 -2
  85. package/styles/drop-down-list/bootstrap-dark.css +4 -2
  86. package/styles/drop-down-list/bootstrap.css +4 -2
  87. package/styles/drop-down-list/bootstrap4.css +4 -2
  88. package/styles/drop-down-list/bootstrap5-dark.css +4 -2
  89. package/styles/drop-down-list/bootstrap5.3.css +4 -2
  90. package/styles/drop-down-list/bootstrap5.css +4 -2
  91. package/styles/drop-down-list/fabric-dark.css +4 -2
  92. package/styles/drop-down-list/fabric.css +4 -2
  93. package/styles/drop-down-list/fluent-dark.css +4 -2
  94. package/styles/drop-down-list/fluent.css +4 -2
  95. package/styles/drop-down-list/fluent2.css +4 -2
  96. package/styles/drop-down-list/highcontrast-light.css +4 -2
  97. package/styles/drop-down-list/highcontrast.css +4 -2
  98. package/styles/drop-down-list/material-dark.css +4 -2
  99. package/styles/drop-down-list/material.css +4 -2
  100. package/styles/drop-down-list/material3-dark.css +4 -2
  101. package/styles/drop-down-list/material3.css +4 -2
  102. package/styles/drop-down-list/tailwind-dark.css +4 -2
  103. package/styles/drop-down-list/tailwind.css +4 -2
  104. package/styles/drop-down-list/tailwind3.css +4 -2
  105. package/styles/drop-down-tree/bds.css +4 -2
  106. package/styles/drop-down-tree/bootstrap-dark.css +4 -2
  107. package/styles/drop-down-tree/bootstrap.css +4 -2
  108. package/styles/drop-down-tree/bootstrap4.css +4 -2
  109. package/styles/drop-down-tree/bootstrap5-dark.css +4 -2
  110. package/styles/drop-down-tree/bootstrap5.3.css +4 -2
  111. package/styles/drop-down-tree/bootstrap5.css +4 -2
  112. package/styles/drop-down-tree/fabric-dark.css +4 -2
  113. package/styles/drop-down-tree/fabric.css +4 -2
  114. package/styles/drop-down-tree/fluent-dark.css +4 -2
  115. package/styles/drop-down-tree/fluent.css +4 -2
  116. package/styles/drop-down-tree/fluent2.css +4 -2
  117. package/styles/drop-down-tree/highcontrast-light.css +4 -2
  118. package/styles/drop-down-tree/highcontrast.css +4 -2
  119. package/styles/drop-down-tree/material-dark.css +4 -2
  120. package/styles/drop-down-tree/material.css +4 -2
  121. package/styles/drop-down-tree/material3-dark.css +4 -2
  122. package/styles/drop-down-tree/material3.css +4 -2
  123. package/styles/drop-down-tree/tailwind-dark.css +4 -2
  124. package/styles/drop-down-tree/tailwind.css +4 -2
  125. package/styles/drop-down-tree/tailwind3.css +4 -2
  126. package/styles/fabric-dark-lite.css +17 -9
  127. package/styles/fabric-dark.css +27 -14
  128. package/styles/fabric-lite.css +17 -9
  129. package/styles/fabric.css +27 -14
  130. package/styles/fluent-dark-lite.css +17 -9
  131. package/styles/fluent-dark.css +27 -14
  132. package/styles/fluent-lite.css +17 -9
  133. package/styles/fluent.css +27 -14
  134. package/styles/fluent2-lite.css +24 -10
  135. package/styles/fluent2.css +36 -16
  136. package/styles/highcontrast-light-lite.css +17 -9
  137. package/styles/highcontrast-light.css +27 -14
  138. package/styles/highcontrast-lite.css +17 -9
  139. package/styles/highcontrast.css +27 -14
  140. package/styles/list-box/bds.css +4 -2
  141. package/styles/list-box/bootstrap-dark.css +4 -2
  142. package/styles/list-box/bootstrap.css +4 -2
  143. package/styles/list-box/bootstrap4.css +4 -2
  144. package/styles/list-box/bootstrap5-dark.css +4 -2
  145. package/styles/list-box/bootstrap5.3.css +4 -2
  146. package/styles/list-box/bootstrap5.css +4 -2
  147. package/styles/list-box/fabric-dark.css +4 -2
  148. package/styles/list-box/fabric.css +4 -2
  149. package/styles/list-box/fluent-dark.css +4 -2
  150. package/styles/list-box/fluent.css +4 -2
  151. package/styles/list-box/fluent2.css +4 -2
  152. package/styles/list-box/highcontrast-light.css +4 -2
  153. package/styles/list-box/highcontrast.css +4 -2
  154. package/styles/list-box/material-dark.css +4 -2
  155. package/styles/list-box/material.css +4 -2
  156. package/styles/list-box/material3-dark.css +4 -2
  157. package/styles/list-box/material3.css +4 -2
  158. package/styles/list-box/tailwind-dark.css +4 -2
  159. package/styles/list-box/tailwind.css +4 -2
  160. package/styles/list-box/tailwind3.css +4 -2
  161. package/styles/material-dark-lite.css +17 -9
  162. package/styles/material-dark.css +25 -13
  163. package/styles/material-lite.css +17 -9
  164. package/styles/material.css +25 -13
  165. package/styles/material3-dark-lite.css +19 -9
  166. package/styles/material3-dark.css +27 -13
  167. package/styles/material3-lite.css +19 -9
  168. package/styles/material3.css +27 -13
  169. package/styles/mention/bds.css +4 -2
  170. package/styles/mention/bootstrap-dark.css +4 -2
  171. package/styles/mention/bootstrap.css +4 -2
  172. package/styles/mention/bootstrap4.css +4 -2
  173. package/styles/mention/bootstrap5-dark.css +4 -2
  174. package/styles/mention/bootstrap5.3.css +4 -2
  175. package/styles/mention/bootstrap5.css +4 -2
  176. package/styles/mention/fabric-dark.css +4 -2
  177. package/styles/mention/fabric.css +4 -2
  178. package/styles/mention/fluent-dark.css +4 -2
  179. package/styles/mention/fluent.css +4 -2
  180. package/styles/mention/fluent2.css +4 -2
  181. package/styles/mention/highcontrast-light.css +4 -2
  182. package/styles/mention/highcontrast.css +4 -2
  183. package/styles/mention/material-dark.css +4 -2
  184. package/styles/mention/material.css +4 -2
  185. package/styles/mention/material3-dark.css +4 -2
  186. package/styles/mention/material3.css +4 -2
  187. package/styles/mention/tailwind-dark.css +4 -2
  188. package/styles/mention/tailwind.css +4 -2
  189. package/styles/mention/tailwind3.css +4 -2
  190. package/styles/multi-select/bds.css +12 -6
  191. package/styles/multi-select/bootstrap-dark.css +12 -6
  192. package/styles/multi-select/bootstrap.css +12 -6
  193. package/styles/multi-select/bootstrap4.css +12 -6
  194. package/styles/multi-select/bootstrap5-dark.css +12 -6
  195. package/styles/multi-select/bootstrap5.3.css +12 -6
  196. package/styles/multi-select/bootstrap5.css +12 -6
  197. package/styles/multi-select/fabric-dark.css +12 -6
  198. package/styles/multi-select/fabric.css +12 -6
  199. package/styles/multi-select/fluent-dark.css +12 -6
  200. package/styles/multi-select/fluent.css +12 -6
  201. package/styles/multi-select/fluent2.css +12 -6
  202. package/styles/multi-select/highcontrast-light.css +12 -6
  203. package/styles/multi-select/highcontrast.css +12 -6
  204. package/styles/multi-select/material-dark.css +12 -6
  205. package/styles/multi-select/material.css +12 -6
  206. package/styles/multi-select/material3-dark.css +12 -6
  207. package/styles/multi-select/material3.css +12 -6
  208. package/styles/multi-select/tailwind-dark.css +12 -6
  209. package/styles/multi-select/tailwind.css +12 -6
  210. package/styles/multi-select/tailwind3.css +12 -6
  211. package/styles/tailwind-dark-lite.css +17 -9
  212. package/styles/tailwind-dark.css +29 -15
  213. package/styles/tailwind-lite.css +17 -9
  214. package/styles/tailwind.css +29 -15
  215. package/styles/tailwind3-lite.css +19 -9
  216. package/styles/tailwind3.css +27 -13
@@ -319,7 +319,8 @@ class VirtualScroll {
319
319
  this.touchModule = new Touch(this.parent.popupContentElement, {
320
320
  scroll: this.popupScrollHandler.bind(this)
321
321
  });
322
- EventHandler.add(this.parent.popupContentElement, 'scroll', this.virtualScrollHandler(callback), this);
322
+ this.scrollHandler = this.virtualScrollHandler(callback);
323
+ EventHandler.add(this.parent.popupContentElement, 'scroll', this.scrollHandler, this);
323
324
  }
324
325
  getModuleName() {
325
326
  return 'VirtualScroll';
@@ -448,17 +449,18 @@ class VirtualScroll {
448
449
  query = query.skip(0).take(this.parent.itemCount - (this.parent.value.length - this.parent.viewPortInfo.startIndex));
449
450
  this.parent.appendUncheckList = true;
450
451
  this.parent.setCurrentView = false;
451
- const oldUlElement = this.parent.list.querySelector('.e-list-parent' + ':not(.e-reorder)');
452
+ let oldUlElement = this.parent.list.querySelector('.e-list-parent' + ':not(.e-reorder)');
452
453
  if (oldUlElement) {
453
454
  this.parent.list.querySelector('.e-virtual-ddl-content').removeChild(oldUlElement);
454
455
  }
455
456
  this.parent.resetList(this.parent.dataSource, this.parent.fields, query);
456
457
  isListUpdated = false;
457
458
  this.parent.appendUncheckList = this.parent.dataSource instanceof DataManager ? this.parent.appendUncheckList : false;
459
+ oldUlElement = null;
458
460
  }
459
461
  }
460
462
  else {
461
- const reOrderList = this.parent.list.querySelectorAll('.e-reorder')[0];
463
+ let reOrderList = this.parent.list.querySelectorAll('.e-reorder')[0];
462
464
  if (this.parent.list.querySelector('.e-virtual-ddl-content') && reOrderList) {
463
465
  this.parent.list.querySelector('.e-virtual-ddl-content').removeChild(reOrderList);
464
466
  }
@@ -470,21 +472,23 @@ class VirtualScroll {
470
472
  this.parent.setCurrentView = false;
471
473
  this.parent.resetList(this.parent.dataSource, this.parent.fields, query);
472
474
  isListUpdated = false;
475
+ reOrderList = null;
473
476
  }
474
477
  this.parent.totalItemsCount();
475
478
  }
476
479
  if (isListUpdated) {
477
- if (this.component === 'multiselect' && this.parent.itemCount * 2 > this.parent.totalItemCount) {
480
+ if (this.component === 'multiselect' && this.parent.itemCount * 2 > this.parent.totalItemCount && !(this.parent.dataSource instanceof DataManager)) {
478
481
  this.parent.viewPortInfo.endIndex = endIndex = this.parent.totalItemCount;
479
482
  this.parent.isVirtualTrackHeight = true;
480
483
  }
481
484
  for (let i = this.parent.viewPortInfo.startIndex; i < endIndex; i++) {
482
485
  const index = i;
483
486
  if (this.component === 'multiselect' && this.parent.mode === 'CheckBox') {
484
- const oldUlElement = this.parent.list.querySelector('.e-list-parent' + '.e-reorder');
487
+ let oldUlElement = this.parent.list.querySelector('.e-list-parent' + '.e-reorder');
485
488
  if (oldUlElement) {
486
489
  this.parent.list.querySelector('.e-virtual-ddl-content').removeChild(oldUlElement);
487
490
  }
491
+ oldUlElement = null;
488
492
  }
489
493
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
490
494
  const alreadyAddedData = this.parent.generatedDataObject[index];
@@ -808,6 +812,18 @@ class VirtualScroll {
808
812
  };
809
813
  }
810
814
  destroy() {
815
+ if (this.parent.popupContentElement) {
816
+ EventHandler.remove(this.parent.popupContentElement, 'wheel mousedown', this.popupScrollHandler);
817
+ EventHandler.remove(this.parent.popupContentElement, 'scroll', this.scrollHandler);
818
+ }
819
+ // Destroy touch module
820
+ if (this.touchModule) {
821
+ this.touchModule.destroy();
822
+ this.touchModule = null;
823
+ }
824
+ // Clear references
825
+ this.containerElementRect = null;
826
+ this.scrollHandler = null;
811
827
  this.removeEventListener();
812
828
  }
813
829
  }
@@ -1098,7 +1114,7 @@ let DropDownBase = class DropDownBase extends Component {
1098
1114
  return checkTemplate;
1099
1115
  }
1100
1116
  l10nUpdate(actionFailure) {
1101
- const ele = this.getModuleName() === 'listbox' ? this.ulElement : this.list;
1117
+ let ele = this.getModuleName() === 'listbox' ? this.ulElement : this.list;
1102
1118
  if ((!isNullOrUndefined(this.noRecordsTemplate) && this.noRecordsTemplate !== 'No records found') || this.actionFailureTemplate !== 'Request failed') {
1103
1119
  const template = actionFailure ? this.actionFailureTemplate : this.noRecordsTemplate;
1104
1120
  let compiledString;
@@ -1169,6 +1185,7 @@ let DropDownBase = class DropDownBase extends Component {
1169
1185
  }
1170
1186
  }
1171
1187
  }
1188
+ ele = null;
1172
1189
  }
1173
1190
  checkAndResetCache() {
1174
1191
  if (this.isVirtualizationEnabled) {
@@ -1265,12 +1282,21 @@ let DropDownBase = class DropDownBase extends Component {
1265
1282
  translateY = translateY - (this.skeletonCount * this.listItemHeight);
1266
1283
  translateY = ((this.viewPortInfo.startIndex === 0 && this.listData && this.listData.length === 0) ||
1267
1284
  this.skeletonCount === 0) ? 0 : translateY;
1285
+ const virtualElement = this.list.getElementsByClassName('e-virtual-ddl')[0];
1286
+ const style = virtualElement && virtualElement.style && virtualElement.style.height;
1287
+ if (this.getModuleName() === 'multiselect' && !isNullOrUndefined(style) && style === '' &&
1288
+ this.dataSource instanceof DataManager) {
1289
+ translateY = 0;
1290
+ }
1268
1291
  const styleText = `transform: translate(0px, ${translateY}px);`;
1269
1292
  return styleText;
1270
1293
  }
1271
1294
  UpdateSkeleton(isSkeletonCountChange, skeletonCount) {
1272
1295
  const isContainSkeleton = this.list.querySelector('.e-virtual-ddl-content');
1273
1296
  const isContainVirtualList = this.list.querySelector('.e-virtual-list');
1297
+ if (!this.skeletonInstances) {
1298
+ this.skeletonInstances = [];
1299
+ }
1274
1300
  if (isContainSkeleton && (!isContainVirtualList || isSkeletonCountChange) && this.isVirtualizationEnabled) {
1275
1301
  const totalSkeletonCount = isSkeletonCountChange ? skeletonCount : this.skeletonCount;
1276
1302
  for (let i = 0; i < totalSkeletonCount; i++) {
@@ -1284,6 +1310,7 @@ let DropDownBase = class DropDownBase extends Component {
1284
1310
  width: '95%',
1285
1311
  cssClass: 'e-skeleton-text'
1286
1312
  });
1313
+ this.skeletonInstances.push(skeleton);
1287
1314
  skeleton.appendTo(this.createElement('div'));
1288
1315
  liElement.appendChild(skeleton.element);
1289
1316
  if (isContainSkeleton.firstChild) {
@@ -1316,6 +1343,16 @@ let DropDownBase = class DropDownBase extends Component {
1316
1343
  }
1317
1344
  }
1318
1345
  }
1346
+ destroySkeletons() {
1347
+ if (this.skeletonInstances && this.skeletonInstances.length > 0) {
1348
+ this.skeletonInstances.forEach((skeleton) => {
1349
+ if (skeleton && !skeleton.isDestroyed) {
1350
+ skeleton.destroy();
1351
+ }
1352
+ });
1353
+ this.skeletonInstances = [];
1354
+ }
1355
+ }
1319
1356
  getLocaleName() {
1320
1357
  return 'drop-down-base';
1321
1358
  }
@@ -1422,8 +1459,8 @@ let DropDownBase = class DropDownBase extends Component {
1422
1459
  this.setProperties({ htmlAttributes: attr }, true);
1423
1460
  }
1424
1461
  renderItemsBySelect() {
1425
- const element = this.element;
1426
- const group = element.querySelectorAll('select>optgroup');
1462
+ let element = this.element;
1463
+ let group = element.querySelectorAll('select>optgroup');
1427
1464
  let fields;
1428
1465
  const isSelectGroupCheck = this.getModuleName() === 'multiselect' && this.isGroupChecking && group.length > 0;
1429
1466
  fields = isSelectGroupCheck ? { value: 'value', text: 'text', groupBy: 'categeory' } : fields = { value: 'value', text: 'text' };
@@ -1449,6 +1486,8 @@ let DropDownBase = class DropDownBase extends Component {
1449
1486
  }
1450
1487
  this.updateFields(fields.text, fields.value, isSelectGroupCheck ? fields.groupBy : this.fields.groupBy, this.fields.htmlAttributes, this.fields.iconCss, this.fields.disabled);
1451
1488
  this.resetList(jsonElement, fields);
1489
+ element = null;
1490
+ group = null;
1452
1491
  }
1453
1492
  updateFields(text, value, groupBy, htmlAttributes, iconCss, disabled) {
1454
1493
  const field = {
@@ -1981,6 +2020,12 @@ let DropDownBase = class DropDownBase extends Component {
1981
2020
  this.ulElement = this.list.querySelector('ul');
1982
2021
  this.postRender(this.list, list, this.bindEvent);
1983
2022
  }
2023
+ else if (this.getModuleName() === 'dropdownlist' && this.isVirtualizationEnabled) {
2024
+ this.list.innerHTML = '';
2025
+ this.createVirtualContent();
2026
+ this.list.querySelector('.e-virtual-ddl-content').appendChild(ulElement);
2027
+ this.updateListElements(this.listData);
2028
+ }
1984
2029
  }
1985
2030
  if (this.getModuleName() === 'multiselect' && this.isAngular && this.ngEle) {
1986
2031
  const popupHolder = this.list;
@@ -2208,7 +2253,7 @@ let DropDownBase = class DropDownBase extends Component {
2208
2253
  }
2209
2254
  }
2210
2255
  updateFixedGroupTemplateHader(element) {
2211
- const groupData = element.cloneNode ? element.cloneNode(true) : element;
2256
+ let groupData = element.cloneNode ? element.cloneNode(true) : element;
2212
2257
  let isGroupDataUpdated = false;
2213
2258
  if (this.groupHeaderItems && this.groupHeaderItems.length > 0) {
2214
2259
  for (let i = 0; i < this.groupHeaderItems.length; i++) {
@@ -2229,6 +2274,7 @@ let DropDownBase = class DropDownBase extends Component {
2229
2274
  }
2230
2275
  this.fixedHeaderElement.innerHTML = groupData.innerHTML;
2231
2276
  this.renderGroupTemplate(this.fixedHeaderElement);
2277
+ groupData = null;
2232
2278
  }
2233
2279
  updateGroupFixedHeader(element, target) {
2234
2280
  if (this.fixedHeaderElement && this.list && this.list.parentElement) {
@@ -2327,7 +2373,7 @@ let DropDownBase = class DropDownBase extends Component {
2327
2373
  }
2328
2374
  if (this.isVirtualizationEnabled) {
2329
2375
  let oldUlElement = this.list.querySelector('.e-list-parent' + ':not(.e-reorder)');
2330
- const virtualUlElement = this.list.querySelector('.e-virtual-ddl-content');
2376
+ let virtualUlElement = this.list.querySelector('.e-virtual-ddl-content');
2331
2377
  const isRemovedUlelement = false;
2332
2378
  if ((!oldUlElement && this.list.querySelector('.e-list-parent' + '.e-reorder')) || (oldUlElement && this.isVirtualReorder && this.list.querySelector('.e-list-parent' + '.e-reorder'))) {
2333
2379
  oldUlElement = this.list.querySelector('.e-list-parent' + '.e-reorder');
@@ -2349,6 +2395,8 @@ let DropDownBase = class DropDownBase extends Component {
2349
2395
  this.list.querySelector('.e-virtual-ddl-content').appendChild(ulElement);
2350
2396
  this.updateListElements(listData);
2351
2397
  }
2398
+ oldUlElement = null;
2399
+ virtualUlElement = null;
2352
2400
  }
2353
2401
  }
2354
2402
  return ulElement;
@@ -2761,7 +2809,7 @@ let DropDownBase = class DropDownBase extends Component {
2761
2809
  if (items && fields.groupBy) {
2762
2810
  items = ListBase.groupDataSource(items, fields.properties);
2763
2811
  }
2764
- const liCollections = [];
2812
+ let liCollections = [];
2765
2813
  for (let i = 0; i < items.length; i++) {
2766
2814
  const item = items[i];
2767
2815
  const isHeader = item.isHeader;
@@ -2878,6 +2926,7 @@ let DropDownBase = class DropDownBase extends Component {
2878
2926
  this.updateSelection();
2879
2927
  }
2880
2928
  this.addedNewItem = true;
2929
+ liCollections = null;
2881
2930
  }
2882
2931
  /**
2883
2932
  * Checks if the given HTML element is disabled.
@@ -2993,13 +3042,28 @@ let DropDownBase = class DropDownBase extends Component {
2993
3042
  detach(this.list);
2994
3043
  }
2995
3044
  }
3045
+ if (this.generatedDataObject) {
3046
+ this.generatedDataObject = {};
3047
+ }
3048
+ this.destroySkeletons();
2996
3049
  this.liCollections = null;
3050
+ this.incrementalLiCollections = null;
3051
+ this.incrementalUlElement = null;
2997
3052
  this.ulElement = null;
3053
+ this.fixedHeaderElement = null;
2998
3054
  this.list = null;
3055
+ this.item = null;
2999
3056
  this.enableRtlElements = null;
3000
3057
  this.groupHeaderItems = null;
3001
3058
  this.fiteredGroupHeaderItems = null;
3002
3059
  this.rippleFun = null;
3060
+ this.popupContentElement = null;
3061
+ this.virtualListInfo = null;
3062
+ this.viewPortInfo = null;
3063
+ this.selectedValueInfo = null;
3064
+ this.virtualGroupDataSource = null;
3065
+ this.virtualSelectAllData = null;
3066
+ this.incrementalListData = null;
3003
3067
  super.destroy();
3004
3068
  }
3005
3069
  };
@@ -3233,13 +3297,14 @@ let DropDownList = class DropDownList extends DropDownBase {
3233
3297
  }
3234
3298
  floatLabelChange() {
3235
3299
  if (this.getModuleName() === 'dropdownlist' && this.floatLabelType === 'Auto') {
3236
- const floatElement = this.inputWrapper.container.querySelector('.e-float-text');
3300
+ let floatElement = this.inputWrapper.container.querySelector('.e-float-text');
3237
3301
  if (floatElement && this.inputElement.value !== '' || this.isInteracted) {
3238
3302
  classList(floatElement, ['e-label-top'], ['e-label-bottom']);
3239
3303
  }
3240
3304
  else if (floatElement) {
3241
3305
  classList(floatElement, ['e-label-bottom'], ['e-label-top']);
3242
3306
  }
3307
+ floatElement = null;
3243
3308
  }
3244
3309
  }
3245
3310
  resetHandler(e) {
@@ -3510,7 +3575,7 @@ let DropDownList = class DropDownList extends DropDownBase {
3510
3575
  this.setSelection(this.getElementByValue(value), null);
3511
3576
  }
3512
3577
  else if (this.text && isNullOrUndefined(this.value)) {
3513
- const element = this.getElementByText(this.text);
3578
+ let element = this.getElementByText(this.text);
3514
3579
  if (isNullOrUndefined(element)) {
3515
3580
  this.setProperties({ text: null });
3516
3581
  return;
@@ -3518,6 +3583,7 @@ let DropDownList = class DropDownList extends DropDownBase {
3518
3583
  else {
3519
3584
  this.setSelection(element, null);
3520
3585
  }
3586
+ element = null;
3521
3587
  }
3522
3588
  else {
3523
3589
  this.setSelection(this.liCollections[this.activeIndex], null);
@@ -3566,6 +3632,11 @@ let DropDownList = class DropDownList extends DropDownBase {
3566
3632
  this.isActive = false;
3567
3633
  this.beforePopupOpen = false;
3568
3634
  }
3635
+ // Cancel any pending debounced filtering when focus leaves the component.
3636
+ if (this.debounceTimer !== null) {
3637
+ clearTimeout(this.debounceTimer);
3638
+ this.debounceTimer = null;
3639
+ }
3569
3640
  this.isFocused = false;
3570
3641
  }
3571
3642
  focusOutAction(e) {
@@ -3674,7 +3745,7 @@ let DropDownList = class DropDownList extends DropDownBase {
3674
3745
  if (formElement) {
3675
3746
  EventHandler.remove(formElement, 'reset', this.resetValueHandler);
3676
3747
  }
3677
- if (!Browser.isDevice) {
3748
+ if (!Browser.isDevice && !isNullOrUndefined(this.keyboardModule)) {
3678
3749
  this.keyboardModule.destroy();
3679
3750
  }
3680
3751
  if (this.showClearButton) {
@@ -3783,7 +3854,7 @@ let DropDownList = class DropDownList extends DropDownBase {
3783
3854
  onMouseClick(e) {
3784
3855
  const target = e.target;
3785
3856
  this.keyboardEvent = null;
3786
- const li = closest(target, '.' + dropDownBaseClasses.li);
3857
+ let li = closest(target, '.' + dropDownBaseClasses.li);
3787
3858
  if (!this.isValidLI(li) || this.isDisabledElement(li)) {
3788
3859
  return;
3789
3860
  }
@@ -3795,10 +3866,12 @@ let DropDownList = class DropDownList extends DropDownBase {
3795
3866
  const delay = 100;
3796
3867
  this.closePopup(delay, e);
3797
3868
  }
3869
+ li = null;
3798
3870
  }
3799
3871
  onMouseOver(e) {
3800
- const currentLi = closest(e.target, '.' + dropDownBaseClasses.li);
3872
+ let currentLi = closest(e.target, '.' + dropDownBaseClasses.li);
3801
3873
  this.setHover(currentLi);
3874
+ currentLi = null;
3802
3875
  }
3803
3876
  setHover(li) {
3804
3877
  if (this.enabled && this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses.hover)) {
@@ -3936,6 +4009,7 @@ let DropDownList = class DropDownList extends DropDownBase {
3936
4009
  this.list.getElementsByClassName('e-virtual-ddl-content')[0].style = this.getTransformValues();
3937
4010
  this.list.scrollTop = 0;
3938
4011
  }
4012
+ li = null;
3939
4013
  }
3940
4014
  else {
3941
4015
  let li;
@@ -3950,6 +4024,7 @@ let DropDownList = class DropDownList extends DropDownBase {
3950
4024
  this.setSelection(li, e);
3951
4025
  this.setScrollPosition();
3952
4026
  }
4027
+ li = null;
3953
4028
  }
3954
4029
  }
3955
4030
  }
@@ -4088,7 +4163,7 @@ let DropDownList = class DropDownList extends DropDownBase {
4088
4163
  this.activeIndex = filterIndex;
4089
4164
  }
4090
4165
  }
4091
- const focusEle = this.list.querySelector('.' + dropDownListClasses.focus);
4166
+ let focusEle = this.list.querySelector('.' + dropDownListClasses.focus);
4092
4167
  if (this.isSelectFocusItem(focusEle) && !isVirtualKeyAction) {
4093
4168
  this.setSelection(focusEle, e);
4094
4169
  if (this.enableVirtualization) {
@@ -4183,6 +4258,7 @@ let DropDownList = class DropDownList extends DropDownBase {
4183
4258
  this.ulElement = this.list.querySelector('ul');
4184
4259
  this.handleVirtualKeyboardActions(e, this.pageCount);
4185
4260
  }
4261
+ nextItem = null;
4186
4262
  }
4187
4263
  if (this.allowFiltering && !this.enableVirtualization && this.getModuleName() !== 'autocomplete') {
4188
4264
  const value = this.getItemData().value;
@@ -4219,6 +4295,7 @@ let DropDownList = class DropDownList extends DropDownBase {
4219
4295
  this.updateUpDownAction(e);
4220
4296
  }
4221
4297
  e.preventDefault();
4298
+ focusEle = null;
4222
4299
  }
4223
4300
  updateHomeEndAction(e, isVirtualKeyAction) {
4224
4301
  if (this.getModuleName() === 'dropdownlist') {
@@ -4325,7 +4402,7 @@ let DropDownList = class DropDownList extends DropDownBase {
4325
4402
  }
4326
4403
  selectCurrentItem(e) {
4327
4404
  if (this.isPopupOpen) {
4328
- const li = this.list.querySelector('.' + dropDownListClasses.focus);
4405
+ let li = this.list.querySelector('.' + dropDownListClasses.focus);
4329
4406
  if (this.isDisabledElement(li)) {
4330
4407
  return;
4331
4408
  }
@@ -4339,6 +4416,7 @@ let DropDownList = class DropDownList extends DropDownBase {
4339
4416
  }
4340
4417
  this.hidePopup(e);
4341
4418
  this.focusDropDown(e);
4419
+ li = null;
4342
4420
  }
4343
4421
  else {
4344
4422
  this.showPopup();
@@ -4536,6 +4614,7 @@ let DropDownList = class DropDownList extends DropDownBase {
4536
4614
  ulElement = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;
4537
4615
  this.actionCompleteData.ulElement = ulElement;
4538
4616
  }
4617
+ ulElement = null;
4539
4618
  }
4540
4619
  }
4541
4620
  updateSelectedItem(li, e, preventSelect, isSelection) {
@@ -4573,6 +4652,7 @@ let DropDownList = class DropDownList extends DropDownBase {
4573
4652
  this.setSelectOptions(li, e);
4574
4653
  }
4575
4654
  }
4655
+ li = null;
4576
4656
  }
4577
4657
  selectEventCallback(li, e, preventSelect, selectedData, value) {
4578
4658
  this.previousItemData = (!isNullOrUndefined(this.itemData)) ? this.itemData : null;
@@ -4582,7 +4662,7 @@ let DropDownList = class DropDownList extends DropDownBase {
4582
4662
  }
4583
4663
  this.item = li;
4584
4664
  this.itemData = selectedData;
4585
- const focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);
4665
+ let focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);
4586
4666
  if (focusedItem) {
4587
4667
  removeClass([focusedItem], dropDownBaseClasses.focus);
4588
4668
  }
@@ -4607,6 +4687,7 @@ let DropDownList = class DropDownList extends DropDownBase {
4607
4687
  }
4608
4688
  this.activeIndex = this.getIndexByValue(value);
4609
4689
  }
4690
+ focusedItem = null;
4610
4691
  }
4611
4692
  activeItem(li) {
4612
4693
  if (this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses.selected)) {
@@ -5264,7 +5345,7 @@ let DropDownList = class DropDownList extends DropDownBase {
5264
5345
  }
5265
5346
  setSearchBox(popupElement) {
5266
5347
  if (this.isFiltering()) {
5267
- const parentElement = popupElement.querySelector('.' + dropDownListClasses.filterParent) ?
5348
+ let parentElement = popupElement.querySelector('.' + dropDownListClasses.filterParent) ?
5268
5349
  popupElement.querySelector('.' + dropDownListClasses.filterParent) : this.createElement('span', {
5269
5350
  className: dropDownListClasses.filterParent
5270
5351
  });
@@ -5324,6 +5405,7 @@ let DropDownList = class DropDownList extends DropDownBase {
5324
5405
  EventHandler.add(this.filterInput, 'keydown', this.onFilterDown, this);
5325
5406
  EventHandler.add(this.filterInput, 'blur', this.onBlurHandler, this);
5326
5407
  EventHandler.add(this.filterInput, 'paste', this.pasteHandler, this);
5408
+ parentElement = null;
5327
5409
  return this.filterInputObj;
5328
5410
  }
5329
5411
  else {
@@ -5483,8 +5565,9 @@ let DropDownList = class DropDownList extends DropDownBase {
5483
5565
  else if (this.enableVirtualization && this.getModuleName() !== 'autocomplete' && !this.isFiltering()) {
5484
5566
  const value = this.getItemData().value;
5485
5567
  this.activeIndex = this.getIndexByValue(value);
5486
- const element = this.findListElement(this.list, 'li', 'data-value', value);
5568
+ let element = this.findListElement(this.list, 'li', 'data-value', value);
5487
5569
  this.selectedLI = element;
5570
+ element = null;
5488
5571
  }
5489
5572
  else if (this.enableVirtualization && this.getModuleName() === 'autocomplete') {
5490
5573
  this.activeIndex = this.skeletonCount;
@@ -5650,15 +5733,16 @@ let DropDownList = class DropDownList extends DropDownBase {
5650
5733
  const value = this.getItemData().value;
5651
5734
  this.activeIndex = ((this.enableVirtualization && !isNullOrUndefined(value)) || !this.enableVirtualization) ?
5652
5735
  this.getIndexByValue(value) : this.activeIndex;
5653
- const element = this.findListElement(this.list, 'li', 'data-value', value);
5736
+ let element = this.findListElement(this.list, 'li', 'data-value', value);
5654
5737
  this.selectedLI = element;
5655
5738
  this.activeItem(element);
5656
5739
  if (!(this.enableVirtualization && isNullOrUndefined(element))) {
5657
5740
  this.removeFocus();
5658
5741
  }
5742
+ element = null;
5659
5743
  }
5660
5744
  updateSelection() {
5661
- const selectedItem = this.list.querySelector('.' + dropDownBaseClasses.selected);
5745
+ let selectedItem = this.list.querySelector('.' + dropDownBaseClasses.selected);
5662
5746
  if (selectedItem) {
5663
5747
  this.setProperties({ 'index': this.getIndexByValue(selectedItem.getAttribute('data-value')) });
5664
5748
  this.activeIndex = this.index;
@@ -5674,6 +5758,7 @@ let DropDownList = class DropDownList extends DropDownBase {
5674
5758
  }
5675
5759
  this.list.querySelector('.' + dropDownBaseClasses.li).classList.add(dropDownListClasses.focus);
5676
5760
  }
5761
+ selectedItem = null;
5677
5762
  }
5678
5763
  updateSelectionList() {
5679
5764
  const selectedItem = this.list && this.list.querySelector('.' + 'e-active');
@@ -5810,12 +5895,13 @@ let DropDownList = class DropDownList extends DropDownBase {
5810
5895
  if (Browser.isDevice && this.isDeviceFullScreen && (!this.allowFiltering && (this.getModuleName() === 'dropdownlist' ||
5811
5896
  (this.isDropDownClick && this.getModuleName() === 'combobox')))) {
5812
5897
  offsetValue = this.getOffsetValue(popupEle);
5813
- const firstItem = this.isEmptyList() ? this.list : this.liCollections[0];
5898
+ let firstItem = this.isEmptyList() ? this.list : this.liCollections[0];
5814
5899
  if (!isNullOrUndefined(this.inputElement)) {
5815
5900
  left = -(parseInt(getComputedStyle(firstItem).textIndent, 10) -
5816
5901
  parseInt(getComputedStyle(this.inputElement).paddingLeft, 10) +
5817
5902
  parseInt(getComputedStyle(this.inputElement.parentElement).borderLeftWidth, 10));
5818
5903
  }
5904
+ firstItem = null;
5819
5905
  }
5820
5906
  this.createPopup(popupEle, offsetValue, left);
5821
5907
  this.popupContentElement = this.popupObj.element.querySelector('.e-content');
@@ -6044,9 +6130,9 @@ let DropDownList = class DropDownList extends DropDownBase {
6044
6130
  open: () => {
6045
6131
  EventHandler.add(document, 'mousedown', this.onDocumentClick, this);
6046
6132
  this.isPopupOpen = true;
6047
- const actionList = this.actionCompleteData && this.actionCompleteData.ulElement &&
6133
+ let actionList = this.actionCompleteData && this.actionCompleteData.ulElement &&
6048
6134
  this.actionCompleteData.ulElement.querySelector('li');
6049
- const ulElement = this.list.querySelector('ul li');
6135
+ let ulElement = this.list.querySelector('ul li');
6050
6136
  if (!isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-item-focus')[0])) {
6051
6137
  attributes(this.targetElement(), { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-item-focus')[0].id });
6052
6138
  }
@@ -6067,6 +6153,8 @@ let DropDownList = class DropDownList extends DropDownBase {
6067
6153
  }
6068
6154
  }
6069
6155
  this.activeStateChange();
6156
+ actionList = null;
6157
+ ulElement = null;
6070
6158
  },
6071
6159
  targetExitViewport: () => {
6072
6160
  if (!Browser.isDevice) {
@@ -6103,16 +6191,17 @@ let DropDownList = class DropDownList extends DropDownBase {
6103
6191
  this.popupObj.element.style.width = '100%';
6104
6192
  this.list.style.maxHeight = (window.innerHeight - searchBoxHeight) + 'px';
6105
6193
  this.list.style.height = (window.innerHeight - searchBoxHeight) + 'px';
6106
- const clearElement = this.filterInput.parentElement.querySelector('.' + dropDownListClasses.clearIcon);
6194
+ let clearElement = this.filterInput.parentElement.querySelector('.' + dropDownListClasses.clearIcon);
6107
6195
  detach(this.filterInput);
6108
6196
  clearElement.parentElement.insertBefore(this.filterInput, clearElement);
6197
+ clearElement = null;
6109
6198
  }
6110
6199
  setPopupPosition(border) {
6111
6200
  let offsetValue;
6112
6201
  const popupOffset = border;
6113
- const selectedLI = this.list.querySelector('.' + dropDownListClasses.focus) || this.selectedLI;
6114
- const firstItem = this.isEmptyList() ? this.list : this.liCollections[0];
6115
- const lastItem = this.isEmptyList() ? this.list : this.liCollections[this.getItems().length - 1];
6202
+ let selectedLI = this.list.querySelector('.' + dropDownListClasses.focus) || this.selectedLI;
6203
+ let firstItem = this.isEmptyList() ? this.list : this.liCollections[0];
6204
+ let lastItem = this.isEmptyList() ? this.list : this.liCollections[this.getItems().length - 1];
6116
6205
  const liHeight = firstItem.getBoundingClientRect().height;
6117
6206
  this.listItemHeight = liHeight + parseInt(window.getComputedStyle(firstItem).marginBottom, 10);
6118
6207
  const listHeight = this.list.offsetHeight / 2;
@@ -6134,6 +6223,9 @@ let DropDownList = class DropDownList extends DropDownBase {
6134
6223
  }
6135
6224
  const inputHeight = this.inputWrapper.container.offsetHeight;
6136
6225
  offsetValue = offsetValue + liHeight + popupOffset - ((liHeight - inputHeight) / 2);
6226
+ selectedLI = null;
6227
+ firstItem = null;
6228
+ lastItem = null;
6137
6229
  return -offsetValue;
6138
6230
  }
6139
6231
  setWidth() {
@@ -6144,10 +6236,11 @@ let DropDownList = class DropDownList extends DropDownBase {
6144
6236
  }
6145
6237
  if (Browser.isDevice && (width.indexOf('px') > -1) && (!this.allowFiltering && (this.getModuleName() === 'dropdownlist' ||
6146
6238
  (this.isDropDownClick && this.getModuleName() === 'combobox')))) {
6147
- const firstItem = this.isEmptyList() ? this.list : this.liCollections[0];
6239
+ let firstItem = this.isEmptyList() ? this.list : this.liCollections[0];
6148
6240
  width = (parseInt(width, 10) + (parseInt(getComputedStyle(firstItem).textIndent, 10) -
6149
6241
  parseInt(getComputedStyle(this.inputElement).paddingLeft, 10) +
6150
6242
  parseInt(getComputedStyle(this.inputElement.parentElement).borderLeftWidth, 10)) * 2) + 'px';
6243
+ firstItem = null;
6151
6244
  }
6152
6245
  return width;
6153
6246
  }
@@ -6396,7 +6489,7 @@ let DropDownList = class DropDownList extends DropDownBase {
6396
6489
  EventHandler.remove(this.filterInput, 'blur', this.onBlurHandler);
6397
6490
  EventHandler.remove(this.filterInput, 'paste', this.pasteHandler);
6398
6491
  }
6399
- if (this.allowFiltering && this.getModuleName() === 'dropdownlist') {
6492
+ if (this.allowFiltering && !isNullOrUndefined(this.filterInput) && this.getModuleName() === 'dropdownlist') {
6400
6493
  this.filterInput.removeAttribute('aria-activedescendant');
6401
6494
  this.filterInput.removeAttribute('aria-disabled');
6402
6495
  this.filterInput.removeAttribute('role');
@@ -6404,7 +6497,7 @@ let DropDownList = class DropDownList extends DropDownBase {
6404
6497
  this.filterInput.removeAttribute('autocapitalize');
6405
6498
  this.filterInput.removeAttribute('spellcheck');
6406
6499
  }
6407
- if (this.filterInput.parentNode) {
6500
+ if (!isNullOrUndefined(this.filterInput) && this.filterInput.parentNode) {
6408
6501
  this.filterInput.parentNode.removeChild(this.filterInput);
6409
6502
  const attrs = Array.prototype.slice.call(this.filterInput.attributes);
6410
6503
  for (let n = 0; n < attrs.length; n++) {
@@ -6503,7 +6596,7 @@ let DropDownList = class DropDownList extends DropDownBase {
6503
6596
  if (isNullOrUndefined(currentData)) {
6504
6597
  return;
6505
6598
  }
6506
- const ulElement = this.renderItems(currentData, this.fields);
6599
+ let ulElement = this.renderItems(currentData, this.fields);
6507
6600
  this.list.scrollTop = 0;
6508
6601
  this.virtualListInfo = {
6509
6602
  currentPageNumber: null,
@@ -6555,6 +6648,7 @@ let DropDownList = class DropDownList extends DropDownBase {
6555
6648
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6556
6649
  this.list.getElementsByClassName('e-virtual-ddl-content')[0].style = this.getTransformValues();
6557
6650
  }
6651
+ ulElement = null;
6558
6652
  }
6559
6653
  destroyPopup() {
6560
6654
  this.isPopupOpen = false;
@@ -6593,6 +6687,12 @@ let DropDownList = class DropDownList extends DropDownBase {
6593
6687
  }
6594
6688
  else {
6595
6689
  this.inputElement = this.createElement('input', { attrs: { role: 'combobox', type: 'text' } });
6690
+ if (this.element.tagName === this.getNgDirective()) {
6691
+ // Pre-populate id so Input.createInput/createFloatingInput can wire label.for correctly
6692
+ const ngId = this.element.getAttribute('id') ? this.element.getAttribute('id') : getUniqueID('ej2_dropdownlist');
6693
+ this.element.id = ngId;
6694
+ this.inputElement.id = ngId + '_input';
6695
+ }
6596
6696
  if (this.element.tagName !== this.getNgDirective()) {
6597
6697
  this.element.style.display = 'none';
6598
6698
  }
@@ -6656,6 +6756,9 @@ let DropDownList = class DropDownList extends DropDownBase {
6656
6756
  const id = this.element.getAttribute('id') ? this.element.getAttribute('id') : getUniqueID('ej2_dropdownlist');
6657
6757
  this.element.id = id;
6658
6758
  this.hiddenElement.id = id + '_hidden';
6759
+ if (this.element.tagName === this.getNgDirective() && !this.inputElement.id) {
6760
+ this.inputElement.id = id + '_input';
6761
+ }
6659
6762
  this.targetElement().setAttribute('tabindex', this.tabIndex);
6660
6763
  if ((this.getModuleName() === 'autocomplete' || this.getModuleName() === 'combobox') && !this.readonly) {
6661
6764
  if (!this.inputElement.hasAttribute('aria-label')) {
@@ -6746,10 +6849,10 @@ let DropDownList = class DropDownList extends DropDownBase {
6746
6849
  this.viewPortInfo.endIndex : this.itemCount;
6747
6850
  }
6748
6851
  getListHeight() {
6749
- const listParent = this.createElement('div', {
6852
+ let listParent = this.createElement('div', {
6750
6853
  className: 'e-dropdownbase'
6751
6854
  });
6752
- const item = this.createElement('li', {
6855
+ let item = this.createElement('li', {
6753
6856
  className: 'e-list-item'
6754
6857
  });
6755
6858
  const listParentHeight = formatUnit(this.popupHeight);
@@ -6761,6 +6864,8 @@ let DropDownList = class DropDownList extends DropDownBase {
6761
6864
  const listItemHeight = Math.ceil(item.getBoundingClientRect().height) +
6762
6865
  parseInt(window.getComputedStyle(item).marginBottom, 10);
6763
6866
  listParent.remove();
6867
+ listParent = null;
6868
+ item = null;
6764
6869
  return listItemHeight;
6765
6870
  }
6766
6871
  setFooterTemplate(popupEle) {
@@ -6812,8 +6917,9 @@ let DropDownList = class DropDownList extends DropDownBase {
6812
6917
  if (headerCompTemp && headerCompTemp.length) {
6813
6918
  append(headerCompTemp, this.header);
6814
6919
  }
6815
- const contentEle = popupEle.querySelector('div.e-content');
6920
+ let contentEle = popupEle.querySelector('div.e-content');
6816
6921
  popupEle.insertBefore(this.header, contentEle);
6922
+ contentEle = null;
6817
6923
  }
6818
6924
  /**
6819
6925
  * Sets the enabled state to DropDownBase.
@@ -6878,6 +6984,7 @@ let DropDownList = class DropDownList extends DropDownBase {
6878
6984
  ((props.dataSource instanceof DataManager) || (!isNullOrUndefined(props) && Array.isArray(props.dataSource) &&
6879
6985
  !isNullOrUndefined(oldProps) && Array.isArray(oldProps.dataSource) && props.dataSource.length !== oldProps.dataSource.length))) {
6880
6986
  this.typedString = '';
6987
+ this.selectData = null;
6881
6988
  this.resetList(this.dataSource);
6882
6989
  }
6883
6990
  if (!this.isCustomFilter && !this.isFilterFocus && document.activeElement !== this.filterInput) {
@@ -7029,9 +7136,9 @@ let DropDownList = class DropDownList extends DropDownBase {
7029
7136
  return;
7030
7137
  }
7031
7138
  if (this.enableVirtualization) {
7139
+ const isOfflineMode = this.dataSource instanceof DataManager &&
7140
+ this.dataSource.dataSource.offline === true;
7032
7141
  if (newProp.value && this.dataSource instanceof DataManager) {
7033
- const isOfflineMode = this.dataSource instanceof DataManager &&
7034
- this.dataSource.dataSource.offline === true;
7035
7142
  const checkField = isNullOrUndefined(this.fields.value) ? this.fields.text : this.fields.value;
7036
7143
  const value = this.allowObjectBinding && !isNullOrUndefined(newProp.value) ?
7037
7144
  getValue(checkField, newProp.value) : newProp.value;
@@ -7104,7 +7211,7 @@ let DropDownList = class DropDownList extends DropDownBase {
7104
7211
  this.renderList();
7105
7212
  }
7106
7213
  if (!this.initialRemoteRender && this.liCollections) {
7107
- const element = this.liCollections[newProp.index];
7214
+ let element = this.liCollections[newProp.index];
7108
7215
  if (!this.checkValidLi(element)) {
7109
7216
  if (this.liCollections && this.liCollections.length === 100 &&
7110
7217
  this.getModuleName() === 'autocomplete' && this.listData.length > 100) {
@@ -7115,6 +7222,7 @@ let DropDownList = class DropDownList extends DropDownBase {
7115
7222
  }
7116
7223
  }
7117
7224
  this.updateInputFields();
7225
+ element = null;
7118
7226
  }
7119
7227
  break;
7120
7228
  case 'footerTemplate':
@@ -7198,6 +7306,7 @@ let DropDownList = class DropDownList extends DropDownBase {
7198
7306
  }
7199
7307
  }
7200
7308
  };
7309
+ li = null;
7201
7310
  }
7202
7311
  updatePopupState() {
7203
7312
  if (this.beforePopupOpen) {
@@ -7362,7 +7471,7 @@ let DropDownList = class DropDownList extends DropDownBase {
7362
7471
  this.isEscapeKey = false;
7363
7472
  if (!isNullOrUndefined(this.index)) {
7364
7473
  const value = this.allowObjectBinding ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
7365
- const element = this.findListElement(this.ulElement, 'li', 'data-value', value);
7474
+ let element = this.findListElement(this.ulElement, 'li', 'data-value', value);
7366
7475
  this.selectedLI = this.liCollections[this.index] || element;
7367
7476
  if (this.selectedLI) {
7368
7477
  this.updateSelectedItem(this.selectedLI, null, true);
@@ -7370,6 +7479,7 @@ let DropDownList = class DropDownList extends DropDownBase {
7370
7479
  this.setValueTemplate();
7371
7480
  }
7372
7481
  }
7482
+ element = null;
7373
7483
  }
7374
7484
  else {
7375
7485
  this.resetSelection();
@@ -7481,7 +7591,7 @@ let DropDownList = class DropDownList extends DropDownBase {
7481
7591
  }
7482
7592
  const isValidIndex = itemIndex < this.liCollections.length && itemIndex > -1;
7483
7593
  if (isValidIndex && !(JSON.parse(JSON.stringify(this.listData[itemIndex]))[this.fields.disabled])) {
7484
- const li = this.liCollections[itemIndex];
7594
+ let li = this.liCollections[itemIndex];
7485
7595
  if (li) {
7486
7596
  this.disableListItem(li);
7487
7597
  const parsedData = JSON.parse(JSON.stringify(this.listData[itemIndex]));
@@ -7495,6 +7605,7 @@ let DropDownList = class DropDownList extends DropDownBase {
7495
7605
  this.clear();
7496
7606
  }
7497
7607
  }
7608
+ li = null;
7498
7609
  }
7499
7610
  }
7500
7611
  }
@@ -7530,7 +7641,8 @@ let DropDownList = class DropDownList extends DropDownBase {
7530
7641
  if (this.inputElement) {
7531
7642
  const attrArray = ['readonly', 'aria-disabled', 'placeholder', 'aria-labelledby',
7532
7643
  'aria-expanded', 'autocomplete', 'aria-readonly', 'autocapitalize',
7533
- 'spellcheck', 'aria-autocomplete', 'aria-live', 'aria-describedby', 'aria-label'];
7644
+ 'spellcheck', 'aria-autocomplete', 'aria-live', 'aria-describedby', 'aria-label',
7645
+ 'role', 'value', 'style', 'type'];
7534
7646
  for (let i = 0; i < attrArray.length; i++) {
7535
7647
  this.inputElement.removeAttribute(attrArray[i]);
7536
7648
  }
@@ -7611,6 +7723,43 @@ let DropDownList = class DropDownList extends DropDownBase {
7611
7723
  detach(this.popupObj.element);
7612
7724
  this.popupObj.element = null;
7613
7725
  }
7726
+ if (this.list) {
7727
+ while (this.list.firstChild) {
7728
+ this.list.removeChild(this.list.firstChild);
7729
+ }
7730
+ if (this.list.parentNode) {
7731
+ this.list.parentNode.removeChild(this.list);
7732
+ }
7733
+ detach(this.list);
7734
+ }
7735
+ if (this.ulElement) {
7736
+ while (this.ulElement.firstChild) {
7737
+ this.ulElement.removeChild(this.ulElement.firstChild);
7738
+ }
7739
+ if (this.ulElement.parentNode) {
7740
+ this.ulElement.parentNode.removeChild(this.ulElement);
7741
+ }
7742
+ detach(this.ulElement);
7743
+ }
7744
+ if (this.actionData && this.actionData.ulElement) {
7745
+ while (this.actionData.ulElement.firstChild) {
7746
+ this.actionData.ulElement.removeChild(this.actionData.ulElement.firstChild);
7747
+ }
7748
+ detach(this.actionData.ulElement);
7749
+ this.actionData.ulElement = null;
7750
+ this.actionData.list = null;
7751
+ this.actionData = null;
7752
+ }
7753
+ if (this.actionCompleteData && this.actionCompleteData.ulElement) {
7754
+ while (this.actionCompleteData.ulElement.firstChild) {
7755
+ this.actionCompleteData.ulElement.removeChild(this.actionCompleteData.ulElement.firstChild);
7756
+ }
7757
+ detach(this.actionCompleteData.ulElement);
7758
+ this.actionCompleteData.ulElement = null;
7759
+ this.actionCompleteData.list = null;
7760
+ this.actionCompleteData = null;
7761
+ }
7762
+ this.listData = null;
7614
7763
  this.ulElement = null;
7615
7764
  this.list = null;
7616
7765
  this.clearIconElement = null;
@@ -7624,20 +7773,19 @@ let DropDownList = class DropDownList extends DropDownBase {
7624
7773
  this.header = null;
7625
7774
  this.previousSelectedLI = null;
7626
7775
  this.valueTempElement = null;
7627
- if (this.actionData.ulElement) {
7628
- detach(this.actionData.ulElement);
7629
- }
7630
- this.actionData.ulElement = null;
7631
- if (this.actionCompleteData.ulElement) {
7632
- detach(this.actionCompleteData.ulElement);
7633
- }
7634
- this.actionCompleteData.ulElement = null;
7776
+ this.resizer = null;
7635
7777
  if (this.inputElement && !isNullOrUndefined(this.inputElement.onchange)) {
7636
7778
  this.inputElement.onchange = null;
7637
7779
  }
7638
7780
  if (this.inputElement && !isNullOrUndefined(this.inputElement.onselect)) {
7639
7781
  this.inputElement.onselect = null;
7640
7782
  }
7783
+ if (this.enableVirtualization) {
7784
+ this.notify('destroy', { module: 'VirtualScroll' });
7785
+ this.virtualGroupDataSource = null;
7786
+ this.viewPortInfo = null;
7787
+ this.selectedValueInfo = null;
7788
+ }
7641
7789
  Input.destroy({
7642
7790
  element: this.inputElement,
7643
7791
  floatLabelType: this.floatLabelType,
@@ -12156,6 +12304,9 @@ let ComboBox = class ComboBox extends DropDownList {
12156
12304
  break;
12157
12305
  case 'allowCustom':
12158
12306
  break;
12307
+ case 'placeholder':
12308
+ Input.setPlaceholder(newProp.placeholder, this.inputElement, this.getModuleName());
12309
+ break;
12159
12310
  default: {
12160
12311
  // eslint-disable-next-line max-len
12161
12312
  const comboProps = this.getPropObject(prop, newProp, oldProp);
@@ -12997,9 +13148,15 @@ function createFloatLabel(overAllWrapper, searchWrapper, element, inputElement,
12997
13148
  const floatLabelElement = createElement('label', { className: FLOATTEXT });
12998
13149
  const id = element.getAttribute('id') ? element.getAttribute('id') : getUniqueID('ej2_multiselect');
12999
13150
  element.id = id;
13151
+ let isAngularComponent = false;
13152
+ if (element.tagName && element.tagName.indexOf('EJS-') === 0 && inputElement.id === '' && element !== inputElement) {
13153
+ inputElement.id = id + '_input';
13154
+ isAngularComponent = true;
13155
+ }
13000
13156
  if (!isNullOrUndefined(element.id) && element.id !== '') {
13001
- floatLabelElement.id = 'label_' + element.id.replace(/ /g, '_');
13002
- floatLabelElement.setAttribute('for', element.id);
13157
+ const labelTarget = isAngularComponent ? inputElement.id || element.id : element.id;
13158
+ floatLabelElement.id = 'label_' + labelTarget.replace(/ /g, '_');
13159
+ floatLabelElement.setAttribute('for', labelTarget);
13003
13160
  attributes(inputElement, { 'aria-labelledby': floatLabelElement.id });
13004
13161
  }
13005
13162
  if (!isNullOrUndefined(inputElement.placeholder) && inputElement.placeholder !== '') {
@@ -14527,7 +14684,15 @@ let MultiSelect = class MultiSelect extends DropDownBase {
14527
14684
  setPlaceholderSize(downIconWidth) {
14528
14685
  if (isNullOrUndefined(this.value) || this.value.length === 0) {
14529
14686
  if (this.dropIcon.offsetWidth !== 0) {
14530
- this.searchWrapper.style.width = ('calc(100% - ' + (downIconWidth + 10)) + 'px';
14687
+ let totalIconWidth = downIconWidth + 10;
14688
+ if (this.showClearButton && this.overAllClear) {
14689
+ const display = this.overAllClear.style.display;
14690
+ this.overAllClear.style.display = 'block';
14691
+ const clearWidth = this.overAllClear.offsetWidth;
14692
+ totalIconWidth += clearWidth;
14693
+ this.overAllClear.style.display = display;
14694
+ }
14695
+ this.searchWrapper.style.width = 'calc(100% - ' + totalIconWidth + 'px)';
14531
14696
  }
14532
14697
  else {
14533
14698
  addClass([this.searchWrapper], CUSTOM_WIDTH);
@@ -15600,6 +15765,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
15600
15765
  selectedChips[0].removeAttribute('id');
15601
15766
  if (!isNullOrUndefined(this.inputElement) && this.inputElement.hasAttribute('aria-activedescendant')) {
15602
15767
  this.inputElement.removeAttribute('aria-activedescendant');
15768
+ if (!this.inputElement.hasAttribute('aria-describedby') && this.chipCollectionWrapper.id) {
15769
+ this.inputElement.setAttribute('aria-describedby', this.chipCollectionWrapper.id);
15770
+ }
15603
15771
  }
15604
15772
  }
15605
15773
  this.removeChipFocus();
@@ -15611,6 +15779,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
15611
15779
  element.setAttribute('id', this.element.id + '_chip_item');
15612
15780
  if (!isNullOrUndefined(this.inputElement) && element.id) {
15613
15781
  this.inputElement.setAttribute('aria-activedescendant', element.id);
15782
+ if (this.inputElement.hasAttribute('aria-describedby')) {
15783
+ this.inputElement.removeAttribute('aria-describedby');
15784
+ }
15614
15785
  }
15615
15786
  const chipClose = element.querySelector('span.' + CHIP_CLOSE$1.split(' ')[0]);
15616
15787
  if (chipClose) {
@@ -15909,10 +16080,12 @@ let MultiSelect = class MultiSelect extends DropDownBase {
15909
16080
  if (!isNullOrUndefined(this.chipCollectionWrapper)) {
15910
16081
  (this.chipCollectionWrapper.style.display = '');
15911
16082
  }
15912
- if (this.mode === 'Delimiter' || this.mode === 'CheckBox') {
16083
+ if (this.mode === 'Delimiter' || (this.mode === 'CheckBox' && !this.isSelectAllClicked)) {
15913
16084
  this.showDelimWrapper();
15914
16085
  }
15915
- this.showOverAllClear();
16086
+ if (!this.isSelectAllClicked) {
16087
+ this.showOverAllClear();
16088
+ }
15916
16089
  }
15917
16090
  else {
15918
16091
  if (!isNullOrUndefined(this.chipCollectionWrapper)) {
@@ -15950,7 +16123,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
15950
16123
  temp = this.getOverflowVal(this.value.length - 1);
15951
16124
  data += temp;
15952
16125
  temp = this.viewWrapper.innerHTML;
15953
- this.updateWrapperText(this.viewWrapper, data);
16126
+ if (!this.isSelectAllClicked) {
16127
+ this.updateWrapperText(this.viewWrapper, data);
16128
+ }
15954
16129
  }
15955
16130
  if (this.enableVirtualization && this.mode === 'CheckBox') {
15956
16131
  const currentText = [];
@@ -17402,6 +17577,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
17402
17577
  this.updateData(delimChar, e, isInitialVirtualData);
17403
17578
  }
17404
17579
  onMouseClick(e) {
17580
+ this.isSelectAllClicked = false;
17405
17581
  if (!this.isClearAllItem) {
17406
17582
  this.keyCode = null;
17407
17583
  this.scrollFocusStatus = false;
@@ -17480,7 +17656,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
17480
17656
  }
17481
17657
  else {
17482
17658
  e.preventDefault();
17483
- if (this.value.length === this.listData.length && this.isPopupOpen()) {
17659
+ if (this.mode !== 'CheckBox' && this.hideSelectedItem && this.value.length === this.listData.length && this.isPopupOpen()) {
17484
17660
  this.hidePopup(e);
17485
17661
  }
17486
17662
  }
@@ -17818,6 +17994,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
17818
17994
  const remainCompildTemp = remainContent.replace('${count}', this.value.length.toString());
17819
17995
  raminElement.innerText = remainCompildTemp;
17820
17996
  this.viewWrapper.appendChild(raminElement);
17997
+ if (this.isSelectAllClicked) {
17998
+ this.showOverAllClear();
17999
+ }
17821
18000
  this.renderReactTemplates();
17822
18001
  const remainSize = raminElement.offsetWidth;
17823
18002
  remove(raminElement);
@@ -18103,9 +18282,11 @@ let MultiSelect = class MultiSelect extends DropDownBase {
18103
18282
  firstItems.forEach((node) => {
18104
18283
  fragment.appendChild(node.cloneNode(true));
18105
18284
  });
18106
- li.forEach((node) => {
18107
- fragment.appendChild(node.cloneNode(true));
18108
- });
18285
+ if ((this.totalItemCount >= (this.itemCount * 2) && this.dataSource instanceof DataManager)) {
18286
+ li.forEach((node) => {
18287
+ fragment.appendChild(node.cloneNode(true));
18288
+ });
18289
+ }
18109
18290
  const concatenatedNodeList = fragment.childNodes;
18110
18291
  if (this.virtualSelectAllData instanceof Array) {
18111
18292
  while (index < length && index <= 50 && index < count) {
@@ -18138,9 +18319,22 @@ let MultiSelect = class MultiSelect extends DropDownBase {
18138
18319
  index++;
18139
18320
  }
18140
18321
  if (length > 50) {
18322
+ createSpinner({ target: this.filterParent, width: Browser.isDevice ? '16px' : '14px' }, this.createElement);
18323
+ showSpinner(this.filterParent);
18324
+ if (this.popupObj && this.filterParent) {
18325
+ [this.popupObj.element.querySelector('.e-content'), this.popupObj.element.querySelector('.e-selectall-parent'), this.filterParent].forEach((el) => el && (el.style.opacity = '0.5'));
18326
+ this.filterParent.querySelector('.e-input').setAttribute('readonly', 'true');
18327
+ this.filterParent.style.cursor = 'progress';
18328
+ }
18141
18329
  setTimeout(() => {
18142
- if (this.virtualSelectAllData && this.virtualSelectAllData.length > 0) {
18143
- this.virtualSelectAllData.map((obj) => {
18330
+ const dataArray = this.virtualSelectAllData;
18331
+ const batchSize = 500;
18332
+ let currentIndex = 0;
18333
+ const processBatch = () => {
18334
+ const endIndex = Math.min(currentIndex + batchSize, dataArray.length);
18335
+ const batch = dataArray.slice(currentIndex, endIndex);
18336
+ // Use map on the batch
18337
+ batch.map((obj) => {
18144
18338
  if (this.value && obj[this.fields.value] != null && Array.isArray(this.value) &&
18145
18339
  ((!this.allowObjectBinding && this.value.indexOf(obj[this.fields.value]) < 0) ||
18146
18340
  (this.allowObjectBinding && !this.isObjectInArray(obj[this.fields.value], this.value)))) {
@@ -18149,21 +18343,34 @@ let MultiSelect = class MultiSelect extends DropDownBase {
18149
18343
  this.dispatchSelect(value, event, null, false, length, obj, text);
18150
18344
  }
18151
18345
  });
18152
- }
18153
- this.updatedataValueItems(event);
18154
- this.isSelectAllLoop = false;
18155
- if (!this.changeOnBlur) {
18156
- this.updateValueState(event, this.value, this.tempValues);
18157
- this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;
18158
- }
18159
- this.updateHiddenElement(true);
18160
- if (this.popupWrapper && li[index - 1] && li[index - 1].classList.contains('e-item-focus')) {
18161
- const selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
18162
- if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
18163
- li[index - 1].classList.remove('e-item-focus');
18346
+ currentIndex = endIndex;
18347
+ if (currentIndex < dataArray.length) {
18348
+ requestAnimationFrame(processBatch);
18164
18349
  }
18165
- }
18166
- this.checkSelectAll();
18350
+ else {
18351
+ this.updatedataValueItems(event);
18352
+ this.isSelectAllLoop = false;
18353
+ if (!this.changeOnBlur) {
18354
+ this.updateValueState(event, this.value, this.tempValues);
18355
+ this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;
18356
+ }
18357
+ this.updateHiddenElement(true);
18358
+ if (this.popupWrapper && li[index - 1] && li[index - 1].classList.contains('e-item-focus')) {
18359
+ const selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
18360
+ if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
18361
+ li[index - 1].classList.remove('e-item-focus');
18362
+ }
18363
+ }
18364
+ this.checkSelectAll();
18365
+ hideSpinner(this.filterParent);
18366
+ if (this.popupObj && this.filterParent) {
18367
+ [this.popupObj.element.querySelector('.e-content'), this.popupObj.element.querySelector('.e-selectall-parent'), this.filterParent].forEach((el) => el && (el.style.opacity = ''));
18368
+ this.filterParent.style.cursor = '';
18369
+ this.filterParent.querySelector('.e-input').removeAttribute('readonly');
18370
+ }
18371
+ }
18372
+ };
18373
+ processBatch();
18167
18374
  }, 0);
18168
18375
  }
18169
18376
  else if (this.virtualSelectAllData && this.virtualSelectAllData.length > 0) {
@@ -18177,25 +18384,60 @@ let MultiSelect = class MultiSelect extends DropDownBase {
18177
18384
  }
18178
18385
  else {
18179
18386
  if (this.virtualSelectAllData && this.virtualSelectAllData.length > 0) {
18180
- this.virtualSelectAllData.map((obj) => {
18181
- this.virtualSelectAll = true;
18182
- this.removeValue(this.value[index], event, this.value.length - index);
18183
- });
18184
- }
18185
- this.updatedataValueItems(event);
18186
- if (!this.changeOnBlur) {
18187
- this.updateValueState(event, this.value, this.tempValues);
18188
- this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;
18189
- }
18190
- this.updateHiddenElement();
18191
- this.setProperties({ value: [] }, true);
18192
- this.selectedListData = [];
18193
- this.virtualSelectAll = false;
18194
- if (!isNullOrUndefined(this.viewPortInfo.startIndex) && !isNullOrUndefined(this.viewPortInfo.endIndex)) {
18195
- this.notify('setCurrentViewDataAsync', {
18196
- component: this.getModuleName(),
18197
- module: 'VirtualScroll'
18198
- });
18387
+ const dataArray = this.virtualSelectAllData;
18388
+ const batchSize = 500;
18389
+ let currentIndex = 0;
18390
+ this.isProcessingVirtualSelectAll = true;
18391
+ createSpinner({ target: this.filterParent, width: Browser.isDevice ? '16px' : '14px' }, this.createElement);
18392
+ showSpinner(this.filterParent);
18393
+ if (this.popupObj && this.filterParent) {
18394
+ [this.popupObj.element.querySelector('.e-content'), this.popupObj.element.querySelector('.e-selectall-parent'), this.filterParent].forEach((el) => el && (el.style.opacity = '0.5'));
18395
+ this.filterParent.querySelector('.e-input').setAttribute('readonly', 'true');
18396
+ this.filterParent.style.cursor = 'progress';
18397
+ }
18398
+ const processBatch = () => {
18399
+ const endIndex = Math.min(currentIndex + batchSize, dataArray.length);
18400
+ const batch = dataArray.slice(currentIndex, endIndex);
18401
+ // Use map on the batch
18402
+ batch.map((obj) => {
18403
+ this.virtualSelectAll = true;
18404
+ // eslint-disable-next-line security/detect-object-injection
18405
+ this.removeValue(this.value[index], event, this.value.length - index);
18406
+ });
18407
+ currentIndex = endIndex;
18408
+ if (currentIndex < dataArray.length) {
18409
+ requestAnimationFrame(processBatch);
18410
+ }
18411
+ else {
18412
+ // All batches completed
18413
+ this.isProcessingVirtualSelectAll = false;
18414
+ hideSpinner(this.filterParent);
18415
+ if (this.popupObj && this.filterParent) {
18416
+ [this.popupObj.element.querySelector('.e-content'), this.popupObj.element.querySelector('.e-selectall-parent'), this.filterParent].forEach((el) => el && (el.style.opacity = ''));
18417
+ this.filterParent.querySelector('.e-input').removeAttribute('readonly');
18418
+ this.filterParent.style.cursor = '';
18419
+ }
18420
+ if (!this.isSelectAllClicked) {
18421
+ this.showOverAllClear();
18422
+ }
18423
+ this.updatedataValueItems(event);
18424
+ if (!this.changeOnBlur) {
18425
+ this.updateValueState(event, this.value, this.tempValues);
18426
+ this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;
18427
+ }
18428
+ this.updateHiddenElement();
18429
+ this.setProperties({ value: [] }, true);
18430
+ this.selectedListData = [];
18431
+ this.virtualSelectAll = false;
18432
+ if (!isNullOrUndefined(this.viewPortInfo.startIndex) && !isNullOrUndefined(this.viewPortInfo.endIndex)) {
18433
+ this.notify('setCurrentViewDataAsync', {
18434
+ component: this.getModuleName(),
18435
+ module: 'VirtualScroll'
18436
+ });
18437
+ }
18438
+ }
18439
+ };
18440
+ processBatch();
18199
18441
  }
18200
18442
  }
18201
18443
  this.checkSelectAll();
@@ -18253,28 +18495,59 @@ let MultiSelect = class MultiSelect extends DropDownBase {
18253
18495
  index++;
18254
18496
  }
18255
18497
  if (length > 50) {
18256
- setTimeout(() => {
18257
- while (index < length && index < count) {
18258
- this.isSelectAllTarget = (length === index + 1);
18259
- this.updateListSelection(li[index], event, length - index);
18260
- if (this.enableGroupCheckBox) {
18261
- this.findGroupStart(li[index]);
18498
+ createSpinner({ target: this.filterParent, width: Browser.isDevice ? '16px' : '14px' }, this.createElement);
18499
+ showSpinner(this.filterParent);
18500
+ if (this.popupObj && this.filterParent) {
18501
+ [this.popupObj.element.querySelector('.e-content'), this.popupObj.element.querySelector('.e-selectall-parent'), this.filterParent].forEach((el) => el && (el.style.opacity = '0.5'));
18502
+ this.filterParent.querySelector('.e-input').setAttribute('readonly', 'true');
18503
+ this.filterParent.style.cursor = 'progress';
18504
+ }
18505
+ this.isProcessingVirtualSelectAll = !this.isSelectAllClicked;
18506
+ let indexLocal = index; // preserve original index value
18507
+ const maxIndex = Math.min(length, count);
18508
+ // Use two-frame yield to ensure spinner paints before heavy work starts
18509
+ const CHUNK_SIZE = 6;
18510
+ requestAnimationFrame(() => {
18511
+ requestAnimationFrame(function processFrame() {
18512
+ if (!this.list) {
18513
+ return;
18262
18514
  }
18263
- index++;
18264
- }
18265
- this.updatedataValueItems(event);
18266
- if (!this.changeOnBlur) {
18267
- this.updateValueState(event, this.value, this.tempValues);
18268
- this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;
18269
- }
18270
- this.updateHiddenElement();
18271
- if (this.popupWrapper && li[index - 1].classList.contains('e-item-focus')) {
18272
- const selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
18273
- if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
18274
- li[index - 1].classList.remove('e-item-focus');
18515
+ if (indexLocal >= maxIndex) {
18516
+ this.isProcessingVirtualSelectAll = !this.isProcessingVirtualSelectAll;
18517
+ this.updatedataValueItems(event);
18518
+ if (!this.changeOnBlur) {
18519
+ this.updateValueState(event, this.value, this.tempValues);
18520
+ this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;
18521
+ }
18522
+ this.updateHiddenElement();
18523
+ if (this.popupWrapper && li[indexLocal - 1] && li[indexLocal - 1].classList.contains('e-item-focus')) {
18524
+ const selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
18525
+ if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
18526
+ li[indexLocal - 1].classList.remove('e-item-focus');
18527
+ }
18528
+ }
18529
+ hideSpinner(this.filterParent);
18530
+ if (this.popupObj && this.filterParent) {
18531
+ [this.popupObj.element.querySelector('.e-content'), this.popupObj.element.querySelector('.e-selectall-parent'), this.filterParent].forEach((el) => el && (el.style.opacity = ''));
18532
+ this.filterParent.querySelector('.e-input').removeAttribute('readonly');
18533
+ this.filterParent.style.cursor = '';
18534
+ }
18535
+ return;
18275
18536
  }
18276
- }
18277
- }, 0);
18537
+ // process up to CHUNK_SIZE items this frame
18538
+ let processed = 0;
18539
+ while (processed < CHUNK_SIZE && indexLocal < maxIndex) {
18540
+ this.isSelectAllTarget = (length === indexLocal + 1);
18541
+ this.updateListSelection(li[indexLocal], event, length - indexLocal);
18542
+ if (this.enableGroupCheckBox) {
18543
+ this.findGroupStart(li[indexLocal]);
18544
+ }
18545
+ indexLocal++;
18546
+ processed++;
18547
+ }
18548
+ requestAnimationFrame(processFrame.bind(this));
18549
+ }.bind(this));
18550
+ });
18278
18551
  }
18279
18552
  }
18280
18553
  }
@@ -18323,7 +18596,10 @@ let MultiSelect = class MultiSelect extends DropDownBase {
18323
18596
  this.trigger('selectedAll', args);
18324
18597
  }
18325
18598
  }
18326
- this.updatedataValueItems(event);
18599
+ if (!this.isProcessingVirtualSelectAll &&
18600
+ ((!this.isSelectAllClicked) || (this.isSelectAllClicked && (this.enableVirtualization ? length > 30 : length <= 50)))) {
18601
+ this.updatedataValueItems(event);
18602
+ }
18327
18603
  this.checkPlaceholderSize();
18328
18604
  if (length <= 50 && !beforeSelectArgs.preventSelectEvent) {
18329
18605
  if (!this.changeOnBlur) {
@@ -18414,6 +18690,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
18414
18690
  this.renderPopup();
18415
18691
  }
18416
18692
  selectAllItems(state, event) {
18693
+ this.isSelectAllClicked = state;
18417
18694
  if (isNullOrUndefined(this.list)) {
18418
18695
  this.selectAllAction = () => {
18419
18696
  if (this.mode === 'CheckBox' && this.showSelectAll) {
@@ -18903,7 +19180,8 @@ let MultiSelect = class MultiSelect extends DropDownBase {
18903
19180
  this.renderItems(this.mainData, this.fields);
18904
19181
  }
18905
19182
  this.virtualCustomData = null;
18906
- this.isVirtualTrackHeight = this.totalItemCount >= (this.itemCount * 2) ? false : true;
19183
+ this.isVirtualTrackHeight = (this.totalItemCount >= (this.itemCount * 2) ||
19184
+ this.dataSource instanceof DataManager) ? false : true;
18907
19185
  }
18908
19186
  });
18909
19187
  }
@@ -19117,7 +19395,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
19117
19395
  }
19118
19396
  else {
19119
19397
  this.chipCollectionWrapper = this.createElement('span', {
19120
- className: CHIP_WRAPPER$1, attrs: { role: 'listbox' }
19398
+ className: CHIP_WRAPPER$1
19121
19399
  });
19122
19400
  this.chipCollectionWrapper.style.display = 'none';
19123
19401
  if (this.mode === 'Default') {
@@ -19688,6 +19966,50 @@ let MultiSelect = class MultiSelect extends DropDownBase {
19688
19966
  if (this.delimiterWrapper && this.delimiterWrapper.parentElement) {
19689
19967
  this.delimiterWrapper.parentElement.remove();
19690
19968
  }
19969
+ if (this.hiddenElement) {
19970
+ if (this.hiddenElement.onchange) {
19971
+ this.hiddenElement.onchange = null;
19972
+ }
19973
+ this.hiddenElement.onchange = null;
19974
+ this.hiddenElement.onclick = null;
19975
+ this.hiddenElement.oninput = null;
19976
+ const attrs = Array.prototype.slice.call(this.hiddenElement.attributes);
19977
+ for (let n = 0; n < attrs.length; n++) {
19978
+ this.hiddenElement.removeAttribute(attrs[n].name);
19979
+ }
19980
+ const children = this.hiddenElement.children;
19981
+ for (let i = 0; i < children.length; i++) {
19982
+ const child = children[i];
19983
+ child.onclick = null;
19984
+ child.onchange = null;
19985
+ child.textContent = '';
19986
+ const attr = Array.prototype.slice.call(child.attributes);
19987
+ for (let n = 0; n < attr.length; n++) {
19988
+ child.removeAttribute(attr[n].name);
19989
+ }
19990
+ }
19991
+ let selectedElement = this.hiddenElement.querySelector('option');
19992
+ if (selectedElement) {
19993
+ selectedElement.removeAttribute('value');
19994
+ selectedElement.removeAttribute('selected');
19995
+ selectedElement.text = '';
19996
+ selectedElement.innerHTML = '';
19997
+ selectedElement = null;
19998
+ }
19999
+ while (this.hiddenElement.firstChild) {
20000
+ this.hiddenElement.removeChild(this.hiddenElement.firstChild);
20001
+ }
20002
+ if (this.hiddenElement.attributes) {
20003
+ const attr = Array.prototype.slice.call(this.hiddenElement.attributes);
20004
+ for (let n = 0; n < attr.length; n++) {
20005
+ this.hiddenElement.removeAttribute(attr[n].name);
20006
+ }
20007
+ }
20008
+ if (this.hiddenElement.parentNode) {
20009
+ this.hiddenElement.parentNode.removeChild(this.hiddenElement);
20010
+ }
20011
+ this.hiddenElement.innerHTML = '';
20012
+ }
19691
20013
  // Remove the select element if it exists
19692
20014
  const selectElement = this.overAllWrapper.querySelector('select.e-multi-hidden');
19693
20015
  if (selectElement && selectElement.parentElement) {
@@ -19707,7 +20029,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
19707
20029
  const attrArray = ['readonly', 'aria-disabled', 'placeholder', 'aria-labelledby',
19708
20030
  'aria-expanded', 'autocomplete', 'aria-readonly', 'autocapitalize',
19709
20031
  'spellcheck', 'aria-autocomplete', 'aria-live', 'aria-label', 'aria-hidden', 'tabindex', 'aria-controls',
19710
- 'aria-describedby', 'size', 'role', 'type', 'class'];
20032
+ 'aria-describedby', 'size', 'role', 'type', 'class', 'aria-activedescendant'];
19711
20033
  for (let i = 0; i < attrArray.length; i++) {
19712
20034
  this.inputElement.removeAttribute(attrArray[i]);
19713
20035
  }
@@ -23494,8 +23816,10 @@ let Mention = class Mention extends DropDownBase {
23494
23816
  return;
23495
23817
  }
23496
23818
  this.isTyped = e.code !== 'Enter' && e.code !== 'Space' && e.code !== 'ArrowDown' && e.code !== 'ArrowUp' ? true : false;
23497
- const isRteImage = document.activeElement.parentElement && document.activeElement.parentElement.querySelector('.e-rte-image') ? true : false;
23498
- if (document.activeElement !== this.inputElement && !isRteImage) {
23819
+ const activeParent = document.activeElement && document.activeElement.parentElement;
23820
+ const isRteImage = activeParent && !!activeParent.querySelector('.e-rte-image');
23821
+ const isBECodeDropdownFocused = activeParent && !!activeParent.querySelector('.e-blockeditor .e-code-block-container .e-input-group.e-input-focus');
23822
+ if (document.activeElement !== this.inputElement && !isRteImage && !isBECodeDropdownFocused) {
23499
23823
  this.inputElement.focus();
23500
23824
  }
23501
23825
  if (this.isContentEditable(this.inputElement)) {
@@ -23520,7 +23844,7 @@ let Mention = class Mention extends DropDownBase {
23520
23844
  if (!this.requireLeadingSpace && lastWordRange && lastWordRange.includes(this.mentionChar)) {
23521
23845
  lastWordRange = this.mentionChar + lastWordRange.split(this.mentionChar).pop();
23522
23846
  }
23523
- if (lastWordRange.includes(' ')) {
23847
+ if (/\s|\u00A0/.test(lastWordRange)) {
23524
23848
  return;
23525
23849
  }
23526
23850
  }
@@ -24049,7 +24373,9 @@ let Mention = class Mention extends DropDownBase {
24049
24373
  }
24050
24374
  setHeight(popupEle) {
24051
24375
  if (this.popupHeight !== 'auto' && this.list) {
24052
- this.list.style.maxHeight = (parseInt(this.listHeight, 10) - 2).toString() + 'px'; // due to box-sizing property
24376
+ const parentStyle = getComputedStyle(this.list.parentElement);
24377
+ const paddingY = parseInt(parentStyle.paddingTop || '0', 10) + parseInt(parentStyle.paddingBottom || '0', 10);
24378
+ this.list.style.maxHeight = (parseInt(this.listHeight, 10) - 2 - paddingY).toString() + 'px'; // due to box-sizing property
24053
24379
  popupEle.style.maxHeight = formatUnit(this.popupHeight);
24054
24380
  }
24055
24381
  else {