@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
@@ -364,7 +364,8 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
364
364
  this.touchModule = new Touch(this.parent.popupContentElement, {
365
365
  scroll: this.popupScrollHandler.bind(this)
366
366
  });
367
- EventHandler.add(this.parent.popupContentElement, 'scroll', this.virtualScrollHandler(callback), this);
367
+ this.scrollHandler = this.virtualScrollHandler(callback);
368
+ EventHandler.add(this.parent.popupContentElement, 'scroll', this.scrollHandler, this);
368
369
  };
369
370
  VirtualScroll.prototype.getModuleName = function () {
370
371
  return 'VirtualScroll';
@@ -503,6 +504,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
503
504
  this.parent.resetList(this.parent.dataSource, this.parent.fields, query);
504
505
  isListUpdated = false;
505
506
  this.parent.appendUncheckList = this.parent.dataSource instanceof DataManager ? this.parent.appendUncheckList : false;
507
+ oldUlElement = null;
506
508
  }
507
509
  }
508
510
  else {
@@ -518,11 +520,12 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
518
520
  this.parent.setCurrentView = false;
519
521
  this.parent.resetList(this.parent.dataSource, this.parent.fields, query);
520
522
  isListUpdated = false;
523
+ reOrderList = null;
521
524
  }
522
525
  this.parent.totalItemsCount();
523
526
  }
524
527
  if (isListUpdated) {
525
- if (this.component === 'multiselect' && this.parent.itemCount * 2 > this.parent.totalItemCount) {
528
+ if (this.component === 'multiselect' && this.parent.itemCount * 2 > this.parent.totalItemCount && !(this.parent.dataSource instanceof DataManager)) {
526
529
  this.parent.viewPortInfo.endIndex = endIndex = this.parent.totalItemCount;
527
530
  this.parent.isVirtualTrackHeight = true;
528
531
  }
@@ -533,6 +536,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
533
536
  if (oldUlElement) {
534
537
  this.parent.list.querySelector('.e-virtual-ddl-content').removeChild(oldUlElement);
535
538
  }
539
+ oldUlElement = null;
536
540
  }
537
541
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
538
542
  var alreadyAddedData = this.parent.generatedDataObject[index];
@@ -866,6 +870,18 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
866
870
  };
867
871
  };
868
872
  VirtualScroll.prototype.destroy = function () {
873
+ if (this.parent.popupContentElement) {
874
+ EventHandler.remove(this.parent.popupContentElement, 'wheel mousedown', this.popupScrollHandler);
875
+ EventHandler.remove(this.parent.popupContentElement, 'scroll', this.scrollHandler);
876
+ }
877
+ // Destroy touch module
878
+ if (this.touchModule) {
879
+ this.touchModule.destroy();
880
+ this.touchModule = null;
881
+ }
882
+ // Clear references
883
+ this.containerElementRect = null;
884
+ this.scrollHandler = null;
869
885
  this.removeEventListener();
870
886
  };
871
887
  return VirtualScroll;
@@ -1250,6 +1266,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1250
1266
  }
1251
1267
  }
1252
1268
  }
1269
+ ele = null;
1253
1270
  };
1254
1271
  DropDownBase.prototype.checkAndResetCache = function () {
1255
1272
  if (this.isVirtualizationEnabled) {
@@ -1346,12 +1363,21 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1346
1363
  translateY = translateY - (this.skeletonCount * this.listItemHeight);
1347
1364
  translateY = ((this.viewPortInfo.startIndex === 0 && this.listData && this.listData.length === 0) ||
1348
1365
  this.skeletonCount === 0) ? 0 : translateY;
1366
+ var virtualElement = this.list.getElementsByClassName('e-virtual-ddl')[0];
1367
+ var style = virtualElement && virtualElement.style && virtualElement.style.height;
1368
+ if (this.getModuleName() === 'multiselect' && !isNullOrUndefined(style) && style === '' &&
1369
+ this.dataSource instanceof DataManager) {
1370
+ translateY = 0;
1371
+ }
1349
1372
  var styleText = "transform: translate(0px, " + translateY + "px);";
1350
1373
  return styleText;
1351
1374
  };
1352
1375
  DropDownBase.prototype.UpdateSkeleton = function (isSkeletonCountChange, skeletonCount) {
1353
1376
  var isContainSkeleton = this.list.querySelector('.e-virtual-ddl-content');
1354
1377
  var isContainVirtualList = this.list.querySelector('.e-virtual-list');
1378
+ if (!this.skeletonInstances) {
1379
+ this.skeletonInstances = [];
1380
+ }
1355
1381
  if (isContainSkeleton && (!isContainVirtualList || isSkeletonCountChange) && this.isVirtualizationEnabled) {
1356
1382
  var totalSkeletonCount = isSkeletonCountChange ? skeletonCount : this.skeletonCount;
1357
1383
  for (var i = 0; i < totalSkeletonCount; i++) {
@@ -1365,6 +1391,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1365
1391
  width: '95%',
1366
1392
  cssClass: 'e-skeleton-text'
1367
1393
  });
1394
+ this.skeletonInstances.push(skeleton);
1368
1395
  skeleton.appendTo(this.createElement('div'));
1369
1396
  liElement.appendChild(skeleton.element);
1370
1397
  if (isContainSkeleton.firstChild) {
@@ -1397,6 +1424,16 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1397
1424
  }
1398
1425
  }
1399
1426
  };
1427
+ DropDownBase.prototype.destroySkeletons = function () {
1428
+ if (this.skeletonInstances && this.skeletonInstances.length > 0) {
1429
+ this.skeletonInstances.forEach(function (skeleton) {
1430
+ if (skeleton && !skeleton.isDestroyed) {
1431
+ skeleton.destroy();
1432
+ }
1433
+ });
1434
+ this.skeletonInstances = [];
1435
+ }
1436
+ };
1400
1437
  DropDownBase.prototype.getLocaleName = function () {
1401
1438
  return 'drop-down-base';
1402
1439
  };
@@ -1530,6 +1567,8 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1530
1567
  }
1531
1568
  this.updateFields(fields.text, fields.value, isSelectGroupCheck ? fields.groupBy : this.fields.groupBy, this.fields.htmlAttributes, this.fields.iconCss, this.fields.disabled);
1532
1569
  this.resetList(jsonElement, fields);
1570
+ element = null;
1571
+ group = null;
1533
1572
  };
1534
1573
  DropDownBase.prototype.updateFields = function (text, value, groupBy, htmlAttributes, iconCss, disabled) {
1535
1574
  var field = {
@@ -2068,6 +2107,12 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
2068
2107
  this.ulElement = this.list.querySelector('ul');
2069
2108
  this.postRender(this.list, list, this.bindEvent);
2070
2109
  }
2110
+ else if (this.getModuleName() === 'dropdownlist' && this.isVirtualizationEnabled) {
2111
+ this.list.innerHTML = '';
2112
+ this.createVirtualContent();
2113
+ this.list.querySelector('.e-virtual-ddl-content').appendChild(ulElement);
2114
+ this.updateListElements(this.listData);
2115
+ }
2071
2116
  }
2072
2117
  if (this.getModuleName() === 'multiselect' && this.isAngular && this.ngEle) {
2073
2118
  var popupHolder_1 = this.list;
@@ -2317,6 +2362,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
2317
2362
  }
2318
2363
  this.fixedHeaderElement.innerHTML = groupData.innerHTML;
2319
2364
  this.renderGroupTemplate(this.fixedHeaderElement);
2365
+ groupData = null;
2320
2366
  };
2321
2367
  DropDownBase.prototype.updateGroupFixedHeader = function (element, target) {
2322
2368
  if (this.fixedHeaderElement && this.list && this.list.parentElement) {
@@ -2437,6 +2483,8 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
2437
2483
  this.list.querySelector('.e-virtual-ddl-content').appendChild(ulElement);
2438
2484
  this.updateListElements(listData);
2439
2485
  }
2486
+ oldUlElement = null;
2487
+ virtualUlElement = null;
2440
2488
  }
2441
2489
  }
2442
2490
  return ulElement;
@@ -2967,6 +3015,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
2967
3015
  this.updateSelection();
2968
3016
  }
2969
3017
  this.addedNewItem = true;
3018
+ liCollections = null;
2970
3019
  };
2971
3020
  /**
2972
3021
  * Checks if the given HTML element is disabled.
@@ -3084,13 +3133,28 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
3084
3133
  detach(this.list);
3085
3134
  }
3086
3135
  }
3136
+ if (this.generatedDataObject) {
3137
+ this.generatedDataObject = {};
3138
+ }
3139
+ this.destroySkeletons();
3087
3140
  this.liCollections = null;
3141
+ this.incrementalLiCollections = null;
3142
+ this.incrementalUlElement = null;
3088
3143
  this.ulElement = null;
3144
+ this.fixedHeaderElement = null;
3089
3145
  this.list = null;
3146
+ this.item = null;
3090
3147
  this.enableRtlElements = null;
3091
3148
  this.groupHeaderItems = null;
3092
3149
  this.fiteredGroupHeaderItems = null;
3093
3150
  this.rippleFun = null;
3151
+ this.popupContentElement = null;
3152
+ this.virtualListInfo = null;
3153
+ this.viewPortInfo = null;
3154
+ this.selectedValueInfo = null;
3155
+ this.virtualGroupDataSource = null;
3156
+ this.virtualSelectAllData = null;
3157
+ this.incrementalListData = null;
3094
3158
  _super.prototype.destroy.call(this);
3095
3159
  };
3096
3160
  __decorate([
@@ -3347,6 +3411,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3347
3411
  else if (floatElement) {
3348
3412
  classList(floatElement, ['e-label-bottom'], ['e-label-top']);
3349
3413
  }
3414
+ floatElement = null;
3350
3415
  }
3351
3416
  };
3352
3417
  DropDownList.prototype.resetHandler = function (e) {
@@ -3627,6 +3692,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3627
3692
  else {
3628
3693
  this.setSelection(element, null);
3629
3694
  }
3695
+ element = null;
3630
3696
  }
3631
3697
  else {
3632
3698
  this.setSelection(this.liCollections[this.activeIndex], null);
@@ -3675,6 +3741,11 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3675
3741
  this.isActive = false;
3676
3742
  this.beforePopupOpen = false;
3677
3743
  }
3744
+ // Cancel any pending debounced filtering when focus leaves the component.
3745
+ if (this.debounceTimer !== null) {
3746
+ clearTimeout(this.debounceTimer);
3747
+ this.debounceTimer = null;
3748
+ }
3678
3749
  this.isFocused = false;
3679
3750
  };
3680
3751
  DropDownList.prototype.focusOutAction = function (e) {
@@ -3783,7 +3854,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3783
3854
  if (formElement) {
3784
3855
  EventHandler.remove(formElement, 'reset', this.resetValueHandler);
3785
3856
  }
3786
- if (!Browser.isDevice) {
3857
+ if (!Browser.isDevice && !isNullOrUndefined(this.keyboardModule)) {
3787
3858
  this.keyboardModule.destroy();
3788
3859
  }
3789
3860
  if (this.showClearButton) {
@@ -3904,10 +3975,12 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3904
3975
  var delay = 100;
3905
3976
  this.closePopup(delay, e);
3906
3977
  }
3978
+ li = null;
3907
3979
  };
3908
3980
  DropDownList.prototype.onMouseOver = function (e) {
3909
3981
  var currentLi = closest(e.target, '.' + dropDownBaseClasses.li);
3910
3982
  this.setHover(currentLi);
3983
+ currentLi = null;
3911
3984
  };
3912
3985
  DropDownList.prototype.setHover = function (li) {
3913
3986
  if (this.enabled && this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses.hover)) {
@@ -4045,6 +4118,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
4045
4118
  this.list.getElementsByClassName('e-virtual-ddl-content')[0].style = this.getTransformValues();
4046
4119
  this.list.scrollTop = 0;
4047
4120
  }
4121
+ li = null;
4048
4122
  }
4049
4123
  else {
4050
4124
  var li = void 0;
@@ -4059,6 +4133,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
4059
4133
  this.setSelection(li, e);
4060
4134
  this.setScrollPosition();
4061
4135
  }
4136
+ li = null;
4062
4137
  }
4063
4138
  }
4064
4139
  };
@@ -4292,6 +4367,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
4292
4367
  this.ulElement = this.list.querySelector('ul');
4293
4368
  this.handleVirtualKeyboardActions(e, this.pageCount);
4294
4369
  }
4370
+ nextItem = null;
4295
4371
  }
4296
4372
  if (this.allowFiltering && !this.enableVirtualization && this.getModuleName() !== 'autocomplete') {
4297
4373
  var value = this.getItemData().value;
@@ -4328,6 +4404,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
4328
4404
  this.updateUpDownAction(e);
4329
4405
  }
4330
4406
  e.preventDefault();
4407
+ focusEle = null;
4331
4408
  };
4332
4409
  DropDownList.prototype.updateHomeEndAction = function (e, isVirtualKeyAction) {
4333
4410
  if (this.getModuleName() === 'dropdownlist') {
@@ -4448,6 +4525,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
4448
4525
  }
4449
4526
  this.hidePopup(e);
4450
4527
  this.focusDropDown(e);
4528
+ li = null;
4451
4529
  }
4452
4530
  else {
4453
4531
  this.showPopup();
@@ -4645,6 +4723,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
4645
4723
  ulElement = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;
4646
4724
  this.actionCompleteData.ulElement = ulElement;
4647
4725
  }
4726
+ ulElement = null;
4648
4727
  }
4649
4728
  };
4650
4729
  DropDownList.prototype.updateSelectedItem = function (li, e, preventSelect, isSelection) {
@@ -4683,6 +4762,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
4683
4762
  this.setSelectOptions(li, e);
4684
4763
  }
4685
4764
  }
4765
+ li = null;
4686
4766
  };
4687
4767
  DropDownList.prototype.selectEventCallback = function (li, e, preventSelect, selectedData, value) {
4688
4768
  this.previousItemData = (!isNullOrUndefined(this.itemData)) ? this.itemData : null;
@@ -4717,6 +4797,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
4717
4797
  }
4718
4798
  this.activeIndex = this.getIndexByValue(value);
4719
4799
  }
4800
+ focusedItem = null;
4720
4801
  };
4721
4802
  DropDownList.prototype.activeItem = function (li) {
4722
4803
  if (this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses.selected)) {
@@ -5439,6 +5520,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
5439
5520
  EventHandler.add(this.filterInput, 'keydown', this.onFilterDown, this);
5440
5521
  EventHandler.add(this.filterInput, 'blur', this.onBlurHandler, this);
5441
5522
  EventHandler.add(this.filterInput, 'paste', this.pasteHandler, this);
5523
+ parentElement = null;
5442
5524
  return this.filterInputObj;
5443
5525
  }
5444
5526
  else {
@@ -5602,6 +5684,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
5602
5684
  this.activeIndex = this.getIndexByValue(value);
5603
5685
  var element = this.findListElement(this.list, 'li', 'data-value', value);
5604
5686
  this.selectedLI = element;
5687
+ element = null;
5605
5688
  }
5606
5689
  else if (this.enableVirtualization && this.getModuleName() === 'autocomplete') {
5607
5690
  this.activeIndex = this.skeletonCount;
@@ -5782,6 +5865,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
5782
5865
  if (!(this.enableVirtualization && isNullOrUndefined(element))) {
5783
5866
  this.removeFocus();
5784
5867
  }
5868
+ element = null;
5785
5869
  };
5786
5870
  DropDownList.prototype.updateSelection = function () {
5787
5871
  var selectedItem = this.list.querySelector('.' + dropDownBaseClasses.selected);
@@ -5800,6 +5884,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
5800
5884
  }
5801
5885
  this.list.querySelector('.' + dropDownBaseClasses.li).classList.add(dropDownListClasses.focus);
5802
5886
  }
5887
+ selectedItem = null;
5803
5888
  };
5804
5889
  DropDownList.prototype.updateSelectionList = function () {
5805
5890
  var selectedItem = this.list && this.list.querySelector('.' + 'e-active');
@@ -5943,6 +6028,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
5943
6028
  parseInt(getComputedStyle(_this.inputElement).paddingLeft, 10) +
5944
6029
  parseInt(getComputedStyle(_this.inputElement.parentElement).borderLeftWidth, 10));
5945
6030
  }
6031
+ firstItem = null;
5946
6032
  }
5947
6033
  _this.createPopup(popupEle_1, offsetValue, left);
5948
6034
  _this.popupContentElement = _this.popupObj.element.querySelector('.e-content');
@@ -6196,6 +6282,8 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6196
6282
  }
6197
6283
  }
6198
6284
  _this.activeStateChange();
6285
+ actionList = null;
6286
+ ulElement = null;
6199
6287
  },
6200
6288
  targetExitViewport: function () {
6201
6289
  if (!Browser.isDevice) {
@@ -6235,6 +6323,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6235
6323
  var clearElement = this.filterInput.parentElement.querySelector('.' + dropDownListClasses.clearIcon);
6236
6324
  detach(this.filterInput);
6237
6325
  clearElement.parentElement.insertBefore(this.filterInput, clearElement);
6326
+ clearElement = null;
6238
6327
  };
6239
6328
  DropDownList.prototype.setPopupPosition = function (border) {
6240
6329
  var offsetValue;
@@ -6263,6 +6352,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6263
6352
  }
6264
6353
  var inputHeight = this.inputWrapper.container.offsetHeight;
6265
6354
  offsetValue = offsetValue + liHeight + popupOffset - ((liHeight - inputHeight) / 2);
6355
+ selectedLI = null;
6356
+ firstItem = null;
6357
+ lastItem = null;
6266
6358
  return -offsetValue;
6267
6359
  };
6268
6360
  DropDownList.prototype.setWidth = function () {
@@ -6277,6 +6369,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6277
6369
  width = (parseInt(width, 10) + (parseInt(getComputedStyle(firstItem).textIndent, 10) -
6278
6370
  parseInt(getComputedStyle(this.inputElement).paddingLeft, 10) +
6279
6371
  parseInt(getComputedStyle(this.inputElement.parentElement).borderLeftWidth, 10)) * 2) + 'px';
6372
+ firstItem = null;
6280
6373
  }
6281
6374
  return width;
6282
6375
  };
@@ -6531,7 +6624,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6531
6624
  EventHandler.remove(this.filterInput, 'blur', this.onBlurHandler);
6532
6625
  EventHandler.remove(this.filterInput, 'paste', this.pasteHandler);
6533
6626
  }
6534
- if (this.allowFiltering && this.getModuleName() === 'dropdownlist') {
6627
+ if (this.allowFiltering && !isNullOrUndefined(this.filterInput) && this.getModuleName() === 'dropdownlist') {
6535
6628
  this.filterInput.removeAttribute('aria-activedescendant');
6536
6629
  this.filterInput.removeAttribute('aria-disabled');
6537
6630
  this.filterInput.removeAttribute('role');
@@ -6539,7 +6632,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6539
6632
  this.filterInput.removeAttribute('autocapitalize');
6540
6633
  this.filterInput.removeAttribute('spellcheck');
6541
6634
  }
6542
- if (this.filterInput.parentNode) {
6635
+ if (!isNullOrUndefined(this.filterInput) && this.filterInput.parentNode) {
6543
6636
  this.filterInput.parentNode.removeChild(this.filterInput);
6544
6637
  var attrs = Array.prototype.slice.call(this.filterInput.attributes);
6545
6638
  for (var n = 0; n < attrs.length; n++) {
@@ -6690,6 +6783,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6690
6783
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6691
6784
  this.list.getElementsByClassName('e-virtual-ddl-content')[0].style = this.getTransformValues();
6692
6785
  }
6786
+ ulElement = null;
6693
6787
  };
6694
6788
  DropDownList.prototype.destroyPopup = function () {
6695
6789
  this.isPopupOpen = false;
@@ -6728,6 +6822,12 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6728
6822
  }
6729
6823
  else {
6730
6824
  this.inputElement = this.createElement('input', { attrs: { role: 'combobox', type: 'text' } });
6825
+ if (this.element.tagName === this.getNgDirective()) {
6826
+ // Pre-populate id so Input.createInput/createFloatingInput can wire label.for correctly
6827
+ var ngId = this.element.getAttribute('id') ? this.element.getAttribute('id') : getUniqueID('ej2_dropdownlist');
6828
+ this.element.id = ngId;
6829
+ this.inputElement.id = ngId + '_input';
6830
+ }
6731
6831
  if (this.element.tagName !== this.getNgDirective()) {
6732
6832
  this.element.style.display = 'none';
6733
6833
  }
@@ -6791,6 +6891,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6791
6891
  var id = this.element.getAttribute('id') ? this.element.getAttribute('id') : getUniqueID('ej2_dropdownlist');
6792
6892
  this.element.id = id;
6793
6893
  this.hiddenElement.id = id + '_hidden';
6894
+ if (this.element.tagName === this.getNgDirective() && !this.inputElement.id) {
6895
+ this.inputElement.id = id + '_input';
6896
+ }
6794
6897
  this.targetElement().setAttribute('tabindex', this.tabIndex);
6795
6898
  if ((this.getModuleName() === 'autocomplete' || this.getModuleName() === 'combobox') && !this.readonly) {
6796
6899
  if (!this.inputElement.hasAttribute('aria-label')) {
@@ -6896,6 +6999,8 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6896
6999
  var listItemHeight = Math.ceil(item.getBoundingClientRect().height) +
6897
7000
  parseInt(window.getComputedStyle(item).marginBottom, 10);
6898
7001
  listParent.remove();
7002
+ listParent = null;
7003
+ item = null;
6899
7004
  return listItemHeight;
6900
7005
  };
6901
7006
  DropDownList.prototype.setFooterTemplate = function (popupEle) {
@@ -6949,6 +7054,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6949
7054
  }
6950
7055
  var contentEle = popupEle.querySelector('div.e-content');
6951
7056
  popupEle.insertBefore(this.header, contentEle);
7057
+ contentEle = null;
6952
7058
  };
6953
7059
  /**
6954
7060
  * Sets the enabled state to DropDownBase.
@@ -7013,6 +7119,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
7013
7119
  ((props.dataSource instanceof DataManager) || (!isNullOrUndefined(props) && Array.isArray(props.dataSource) &&
7014
7120
  !isNullOrUndefined(oldProps) && Array.isArray(oldProps.dataSource) && props.dataSource.length !== oldProps.dataSource.length))) {
7015
7121
  this.typedString = '';
7122
+ this.selectData = null;
7016
7123
  this.resetList(this.dataSource);
7017
7124
  }
7018
7125
  if (!this.isCustomFilter && !this.isFilterFocus && document.activeElement !== this.filterInput) {
@@ -7165,9 +7272,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
7165
7272
  return { value: void 0 };
7166
7273
  }
7167
7274
  if (this_1.enableVirtualization) {
7275
+ var isOfflineMode = this_1.dataSource instanceof DataManager &&
7276
+ this_1.dataSource.dataSource.offline === true;
7168
7277
  if (newProp.value && this_1.dataSource instanceof DataManager) {
7169
- var isOfflineMode = this_1.dataSource instanceof DataManager &&
7170
- this_1.dataSource.dataSource.offline === true;
7171
7278
  var checkField = isNullOrUndefined(this_1.fields.value) ? this_1.fields.text : this_1.fields.value;
7172
7279
  var value = this_1.allowObjectBinding && !isNullOrUndefined(newProp.value) ?
7173
7280
  getValue(checkField, newProp.value) : newProp.value;
@@ -7251,6 +7358,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
7251
7358
  }
7252
7359
  }
7253
7360
  this_1.updateInputFields();
7361
+ element = null;
7254
7362
  }
7255
7363
  break;
7256
7364
  case 'footerTemplate':
@@ -7342,6 +7450,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
7342
7450
  }
7343
7451
  }
7344
7452
  };
7453
+ li = null;
7345
7454
  };
7346
7455
  DropDownList.prototype.updatePopupState = function () {
7347
7456
  if (this.beforePopupOpen) {
@@ -7514,6 +7623,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
7514
7623
  this.setValueTemplate();
7515
7624
  }
7516
7625
  }
7626
+ element = null;
7517
7627
  }
7518
7628
  else {
7519
7629
  this.resetSelection();
@@ -7639,6 +7749,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
7639
7749
  this.clear();
7640
7750
  }
7641
7751
  }
7752
+ li = null;
7642
7753
  }
7643
7754
  }
7644
7755
  }
@@ -7674,7 +7785,8 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
7674
7785
  if (this.inputElement) {
7675
7786
  var attrArray = ['readonly', 'aria-disabled', 'placeholder', 'aria-labelledby',
7676
7787
  'aria-expanded', 'autocomplete', 'aria-readonly', 'autocapitalize',
7677
- 'spellcheck', 'aria-autocomplete', 'aria-live', 'aria-describedby', 'aria-label'];
7788
+ 'spellcheck', 'aria-autocomplete', 'aria-live', 'aria-describedby', 'aria-label',
7789
+ 'role', 'value', 'style', 'type'];
7678
7790
  for (var i = 0; i < attrArray.length; i++) {
7679
7791
  this.inputElement.removeAttribute(attrArray[i]);
7680
7792
  }
@@ -7755,6 +7867,43 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
7755
7867
  detach(this.popupObj.element);
7756
7868
  this.popupObj.element = null;
7757
7869
  }
7870
+ if (this.list) {
7871
+ while (this.list.firstChild) {
7872
+ this.list.removeChild(this.list.firstChild);
7873
+ }
7874
+ if (this.list.parentNode) {
7875
+ this.list.parentNode.removeChild(this.list);
7876
+ }
7877
+ detach(this.list);
7878
+ }
7879
+ if (this.ulElement) {
7880
+ while (this.ulElement.firstChild) {
7881
+ this.ulElement.removeChild(this.ulElement.firstChild);
7882
+ }
7883
+ if (this.ulElement.parentNode) {
7884
+ this.ulElement.parentNode.removeChild(this.ulElement);
7885
+ }
7886
+ detach(this.ulElement);
7887
+ }
7888
+ if (this.actionData && this.actionData.ulElement) {
7889
+ while (this.actionData.ulElement.firstChild) {
7890
+ this.actionData.ulElement.removeChild(this.actionData.ulElement.firstChild);
7891
+ }
7892
+ detach(this.actionData.ulElement);
7893
+ this.actionData.ulElement = null;
7894
+ this.actionData.list = null;
7895
+ this.actionData = null;
7896
+ }
7897
+ if (this.actionCompleteData && this.actionCompleteData.ulElement) {
7898
+ while (this.actionCompleteData.ulElement.firstChild) {
7899
+ this.actionCompleteData.ulElement.removeChild(this.actionCompleteData.ulElement.firstChild);
7900
+ }
7901
+ detach(this.actionCompleteData.ulElement);
7902
+ this.actionCompleteData.ulElement = null;
7903
+ this.actionCompleteData.list = null;
7904
+ this.actionCompleteData = null;
7905
+ }
7906
+ this.listData = null;
7758
7907
  this.ulElement = null;
7759
7908
  this.list = null;
7760
7909
  this.clearIconElement = null;
@@ -7768,20 +7917,19 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
7768
7917
  this.header = null;
7769
7918
  this.previousSelectedLI = null;
7770
7919
  this.valueTempElement = null;
7771
- if (this.actionData.ulElement) {
7772
- detach(this.actionData.ulElement);
7773
- }
7774
- this.actionData.ulElement = null;
7775
- if (this.actionCompleteData.ulElement) {
7776
- detach(this.actionCompleteData.ulElement);
7777
- }
7778
- this.actionCompleteData.ulElement = null;
7920
+ this.resizer = null;
7779
7921
  if (this.inputElement && !isNullOrUndefined(this.inputElement.onchange)) {
7780
7922
  this.inputElement.onchange = null;
7781
7923
  }
7782
7924
  if (this.inputElement && !isNullOrUndefined(this.inputElement.onselect)) {
7783
7925
  this.inputElement.onselect = null;
7784
7926
  }
7927
+ if (this.enableVirtualization) {
7928
+ this.notify('destroy', { module: 'VirtualScroll' });
7929
+ this.virtualGroupDataSource = null;
7930
+ this.viewPortInfo = null;
7931
+ this.selectedValueInfo = null;
7932
+ }
7785
7933
  Input.destroy({
7786
7934
  element: this.inputElement,
7787
7935
  floatLabelType: this.floatLabelType,
@@ -12377,6 +12525,9 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
12377
12525
  break;
12378
12526
  case 'allowCustom':
12379
12527
  break;
12528
+ case 'placeholder':
12529
+ Input.setPlaceholder(newProp.placeholder, this.inputElement, this.getModuleName());
12530
+ break;
12380
12531
  default: {
12381
12532
  // eslint-disable-next-line max-len
12382
12533
  var comboProps = this.getPropObject(prop, newProp, oldProp);
@@ -13238,9 +13389,15 @@ function createFloatLabel(overAllWrapper, searchWrapper, element, inputElement,
13238
13389
  var floatLabelElement = createElement('label', { className: FLOATTEXT });
13239
13390
  var id = element.getAttribute('id') ? element.getAttribute('id') : getUniqueID('ej2_multiselect');
13240
13391
  element.id = id;
13392
+ var isAngularComponent = false;
13393
+ if (element.tagName && element.tagName.indexOf('EJS-') === 0 && inputElement.id === '' && element !== inputElement) {
13394
+ inputElement.id = id + '_input';
13395
+ isAngularComponent = true;
13396
+ }
13241
13397
  if (!isNullOrUndefined(element.id) && element.id !== '') {
13242
- floatLabelElement.id = 'label_' + element.id.replace(/ /g, '_');
13243
- floatLabelElement.setAttribute('for', element.id);
13398
+ var labelTarget = isAngularComponent ? inputElement.id || element.id : element.id;
13399
+ floatLabelElement.id = 'label_' + labelTarget.replace(/ /g, '_');
13400
+ floatLabelElement.setAttribute('for', labelTarget);
13244
13401
  attributes(inputElement, { 'aria-labelledby': floatLabelElement.id });
13245
13402
  }
13246
13403
  if (!isNullOrUndefined(inputElement.placeholder) && inputElement.placeholder !== '') {
@@ -14786,7 +14943,15 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
14786
14943
  MultiSelect.prototype.setPlaceholderSize = function (downIconWidth) {
14787
14944
  if (isNullOrUndefined(this.value) || this.value.length === 0) {
14788
14945
  if (this.dropIcon.offsetWidth !== 0) {
14789
- this.searchWrapper.style.width = ('calc(100% - ' + (downIconWidth + 10)) + 'px';
14946
+ var totalIconWidth = downIconWidth + 10;
14947
+ if (this.showClearButton && this.overAllClear) {
14948
+ var display = this.overAllClear.style.display;
14949
+ this.overAllClear.style.display = 'block';
14950
+ var clearWidth = this.overAllClear.offsetWidth;
14951
+ totalIconWidth += clearWidth;
14952
+ this.overAllClear.style.display = display;
14953
+ }
14954
+ this.searchWrapper.style.width = 'calc(100% - ' + totalIconWidth + 'px)';
14790
14955
  }
14791
14956
  else {
14792
14957
  addClass([this.searchWrapper], CUSTOM_WIDTH);
@@ -15865,6 +16030,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
15865
16030
  selectedChips[0].removeAttribute('id');
15866
16031
  if (!isNullOrUndefined(this.inputElement) && this.inputElement.hasAttribute('aria-activedescendant')) {
15867
16032
  this.inputElement.removeAttribute('aria-activedescendant');
16033
+ if (!this.inputElement.hasAttribute('aria-describedby') && this.chipCollectionWrapper.id) {
16034
+ this.inputElement.setAttribute('aria-describedby', this.chipCollectionWrapper.id);
16035
+ }
15868
16036
  }
15869
16037
  }
15870
16038
  this.removeChipFocus();
@@ -15876,6 +16044,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
15876
16044
  element.setAttribute('id', this.element.id + '_chip_item');
15877
16045
  if (!isNullOrUndefined(this.inputElement) && element.id) {
15878
16046
  this.inputElement.setAttribute('aria-activedescendant', element.id);
16047
+ if (this.inputElement.hasAttribute('aria-describedby')) {
16048
+ this.inputElement.removeAttribute('aria-describedby');
16049
+ }
15879
16050
  }
15880
16051
  var chipClose = element.querySelector('span.' + CHIP_CLOSE$1.split(' ')[0]);
15881
16052
  if (chipClose) {
@@ -16177,10 +16348,12 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
16177
16348
  if (!isNullOrUndefined(this.chipCollectionWrapper)) {
16178
16349
  (this.chipCollectionWrapper.style.display = '');
16179
16350
  }
16180
- if (this.mode === 'Delimiter' || this.mode === 'CheckBox') {
16351
+ if (this.mode === 'Delimiter' || (this.mode === 'CheckBox' && !this.isSelectAllClicked)) {
16181
16352
  this.showDelimWrapper();
16182
16353
  }
16183
- this.showOverAllClear();
16354
+ if (!this.isSelectAllClicked) {
16355
+ this.showOverAllClear();
16356
+ }
16184
16357
  }
16185
16358
  else {
16186
16359
  if (!isNullOrUndefined(this.chipCollectionWrapper)) {
@@ -16223,7 +16396,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
16223
16396
  temp = this.getOverflowVal(this.value.length - 1);
16224
16397
  data += temp;
16225
16398
  temp = this.viewWrapper.innerHTML;
16226
- this.updateWrapperText(this.viewWrapper, data);
16399
+ if (!this.isSelectAllClicked) {
16400
+ this.updateWrapperText(this.viewWrapper, data);
16401
+ }
16227
16402
  }
16228
16403
  if (this.enableVirtualization && this.mode === 'CheckBox') {
16229
16404
  var currentText = [];
@@ -17691,6 +17866,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
17691
17866
  };
17692
17867
  MultiSelect.prototype.onMouseClick = function (e) {
17693
17868
  var _this = this;
17869
+ this.isSelectAllClicked = false;
17694
17870
  if (!this.isClearAllItem) {
17695
17871
  this.keyCode = null;
17696
17872
  this.scrollFocusStatus = false;
@@ -17769,7 +17945,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
17769
17945
  }
17770
17946
  else {
17771
17947
  e.preventDefault();
17772
- if (this.value.length === this.listData.length && this.isPopupOpen()) {
17948
+ if (this.mode !== 'CheckBox' && this.hideSelectedItem && this.value.length === this.listData.length && this.isPopupOpen()) {
17773
17949
  this.hidePopup(e);
17774
17950
  }
17775
17951
  }
@@ -18107,6 +18283,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
18107
18283
  var remainCompildTemp = remainContent.replace('${count}', this.value.length.toString());
18108
18284
  raminElement.innerText = remainCompildTemp;
18109
18285
  this.viewWrapper.appendChild(raminElement);
18286
+ if (this.isSelectAllClicked) {
18287
+ this.showOverAllClear();
18288
+ }
18110
18289
  this.renderReactTemplates();
18111
18290
  var remainSize = raminElement.offsetWidth;
18112
18291
  remove(raminElement);
@@ -18393,9 +18572,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
18393
18572
  firstItems.forEach(function (node) {
18394
18573
  fragment_1.appendChild(node.cloneNode(true));
18395
18574
  });
18396
- li.forEach(function (node) {
18397
- fragment_1.appendChild(node.cloneNode(true));
18398
- });
18575
+ if ((this.totalItemCount >= (this.itemCount * 2) && this.dataSource instanceof DataManager)) {
18576
+ li.forEach(function (node) {
18577
+ fragment_1.appendChild(node.cloneNode(true));
18578
+ });
18579
+ }
18399
18580
  var concatenatedNodeList = fragment_1.childNodes;
18400
18581
  if (this.virtualSelectAllData instanceof Array) {
18401
18582
  while (index < length && index <= 50 && index < count) {
@@ -18428,9 +18609,22 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
18428
18609
  index++;
18429
18610
  }
18430
18611
  if (length > 50) {
18612
+ createSpinner({ target: this.filterParent, width: Browser.isDevice ? '16px' : '14px' }, this.createElement);
18613
+ showSpinner(this.filterParent);
18614
+ if (this.popupObj && this.filterParent) {
18615
+ [this.popupObj.element.querySelector('.e-content'), this.popupObj.element.querySelector('.e-selectall-parent'), this.filterParent].forEach(function (el) { return el && (el.style.opacity = '0.5'); });
18616
+ this.filterParent.querySelector('.e-input').setAttribute('readonly', 'true');
18617
+ this.filterParent.style.cursor = 'progress';
18618
+ }
18431
18619
  setTimeout(function () {
18432
- if (_this.virtualSelectAllData && _this.virtualSelectAllData.length > 0) {
18433
- _this.virtualSelectAllData.map(function (obj) {
18620
+ var dataArray = _this.virtualSelectAllData;
18621
+ var batchSize = 500;
18622
+ var currentIndex = 0;
18623
+ var processBatch = function () {
18624
+ var endIndex = Math.min(currentIndex + batchSize, dataArray.length);
18625
+ var batch = dataArray.slice(currentIndex, endIndex);
18626
+ // Use map on the batch
18627
+ batch.map(function (obj) {
18434
18628
  if (_this.value && obj[_this.fields.value] != null && Array.isArray(_this.value) &&
18435
18629
  ((!_this.allowObjectBinding && _this.value.indexOf(obj[_this.fields.value]) < 0) ||
18436
18630
  (_this.allowObjectBinding && !_this.isObjectInArray(obj[_this.fields.value], _this.value)))) {
@@ -18439,21 +18633,34 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
18439
18633
  _this.dispatchSelect(value, event, null, false, length, obj, text);
18440
18634
  }
18441
18635
  });
18442
- }
18443
- _this.updatedataValueItems(event);
18444
- _this.isSelectAllLoop = false;
18445
- if (!_this.changeOnBlur) {
18446
- _this.updateValueState(event, _this.value, _this.tempValues);
18447
- _this.isSelectAll = _this.isSelectAll ? !_this.isSelectAll : _this.isSelectAll;
18448
- }
18449
- _this.updateHiddenElement(true);
18450
- if (_this.popupWrapper && li[index - 1] && li[index - 1].classList.contains('e-item-focus')) {
18451
- var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
18452
- if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
18453
- li[index - 1].classList.remove('e-item-focus');
18636
+ currentIndex = endIndex;
18637
+ if (currentIndex < dataArray.length) {
18638
+ requestAnimationFrame(processBatch);
18454
18639
  }
18455
- }
18456
- _this.checkSelectAll();
18640
+ else {
18641
+ _this.updatedataValueItems(event);
18642
+ _this.isSelectAllLoop = false;
18643
+ if (!_this.changeOnBlur) {
18644
+ _this.updateValueState(event, _this.value, _this.tempValues);
18645
+ _this.isSelectAll = _this.isSelectAll ? !_this.isSelectAll : _this.isSelectAll;
18646
+ }
18647
+ _this.updateHiddenElement(true);
18648
+ if (_this.popupWrapper && li[index - 1] && li[index - 1].classList.contains('e-item-focus')) {
18649
+ var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
18650
+ if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
18651
+ li[index - 1].classList.remove('e-item-focus');
18652
+ }
18653
+ }
18654
+ _this.checkSelectAll();
18655
+ hideSpinner(_this.filterParent);
18656
+ if (_this.popupObj && _this.filterParent) {
18657
+ [_this.popupObj.element.querySelector('.e-content'), _this.popupObj.element.querySelector('.e-selectall-parent'), _this.filterParent].forEach(function (el) { return el && (el.style.opacity = ''); });
18658
+ _this.filterParent.style.cursor = '';
18659
+ _this.filterParent.querySelector('.e-input').removeAttribute('readonly');
18660
+ }
18661
+ }
18662
+ };
18663
+ processBatch();
18457
18664
  }, 0);
18458
18665
  }
18459
18666
  else if (this.virtualSelectAllData && this.virtualSelectAllData.length > 0) {
@@ -18467,25 +18674,60 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
18467
18674
  }
18468
18675
  else {
18469
18676
  if (this.virtualSelectAllData && this.virtualSelectAllData.length > 0) {
18470
- this.virtualSelectAllData.map(function (obj) {
18471
- _this.virtualSelectAll = true;
18472
- _this.removeValue(_this.value[index], event, _this.value.length - index);
18473
- });
18474
- }
18475
- this.updatedataValueItems(event);
18476
- if (!this.changeOnBlur) {
18477
- this.updateValueState(event, this.value, this.tempValues);
18478
- this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;
18479
- }
18480
- this.updateHiddenElement();
18481
- this.setProperties({ value: [] }, true);
18482
- this.selectedListData = [];
18483
- this.virtualSelectAll = false;
18484
- if (!isNullOrUndefined(this.viewPortInfo.startIndex) && !isNullOrUndefined(this.viewPortInfo.endIndex)) {
18485
- this.notify('setCurrentViewDataAsync', {
18486
- component: this.getModuleName(),
18487
- module: 'VirtualScroll'
18488
- });
18677
+ var dataArray_1 = this.virtualSelectAllData;
18678
+ var batchSize_1 = 500;
18679
+ var currentIndex_1 = 0;
18680
+ this.isProcessingVirtualSelectAll = true;
18681
+ createSpinner({ target: this.filterParent, width: Browser.isDevice ? '16px' : '14px' }, this.createElement);
18682
+ showSpinner(this.filterParent);
18683
+ if (this.popupObj && this.filterParent) {
18684
+ [this.popupObj.element.querySelector('.e-content'), this.popupObj.element.querySelector('.e-selectall-parent'), this.filterParent].forEach(function (el) { return el && (el.style.opacity = '0.5'); });
18685
+ this.filterParent.querySelector('.e-input').setAttribute('readonly', 'true');
18686
+ this.filterParent.style.cursor = 'progress';
18687
+ }
18688
+ var processBatch_1 = function () {
18689
+ var endIndex = Math.min(currentIndex_1 + batchSize_1, dataArray_1.length);
18690
+ var batch = dataArray_1.slice(currentIndex_1, endIndex);
18691
+ // Use map on the batch
18692
+ batch.map(function (obj) {
18693
+ _this.virtualSelectAll = true;
18694
+ // eslint-disable-next-line security/detect-object-injection
18695
+ _this.removeValue(_this.value[index], event, _this.value.length - index);
18696
+ });
18697
+ currentIndex_1 = endIndex;
18698
+ if (currentIndex_1 < dataArray_1.length) {
18699
+ requestAnimationFrame(processBatch_1);
18700
+ }
18701
+ else {
18702
+ // All batches completed
18703
+ _this.isProcessingVirtualSelectAll = false;
18704
+ hideSpinner(_this.filterParent);
18705
+ if (_this.popupObj && _this.filterParent) {
18706
+ [_this.popupObj.element.querySelector('.e-content'), _this.popupObj.element.querySelector('.e-selectall-parent'), _this.filterParent].forEach(function (el) { return el && (el.style.opacity = ''); });
18707
+ _this.filterParent.querySelector('.e-input').removeAttribute('readonly');
18708
+ _this.filterParent.style.cursor = '';
18709
+ }
18710
+ if (!_this.isSelectAllClicked) {
18711
+ _this.showOverAllClear();
18712
+ }
18713
+ _this.updatedataValueItems(event);
18714
+ if (!_this.changeOnBlur) {
18715
+ _this.updateValueState(event, _this.value, _this.tempValues);
18716
+ _this.isSelectAll = _this.isSelectAll ? !_this.isSelectAll : _this.isSelectAll;
18717
+ }
18718
+ _this.updateHiddenElement();
18719
+ _this.setProperties({ value: [] }, true);
18720
+ _this.selectedListData = [];
18721
+ _this.virtualSelectAll = false;
18722
+ if (!isNullOrUndefined(_this.viewPortInfo.startIndex) && !isNullOrUndefined(_this.viewPortInfo.endIndex)) {
18723
+ _this.notify('setCurrentViewDataAsync', {
18724
+ component: _this.getModuleName(),
18725
+ module: 'VirtualScroll'
18726
+ });
18727
+ }
18728
+ }
18729
+ };
18730
+ processBatch_1();
18489
18731
  }
18490
18732
  }
18491
18733
  this.checkSelectAll();
@@ -18514,13 +18756,13 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
18514
18756
  };
18515
18757
  this.trigger('beforeSelectAll', beforeSelectArgs);
18516
18758
  if ((li && li.length) || (this.enableVirtualization && !state)) {
18517
- var index_1 = 0;
18518
- var count_1 = 0;
18759
+ var index = 0;
18760
+ var count = 0;
18519
18761
  if (this.enableGroupCheckBox) {
18520
- count_1 = state ? this.maximumSelectionLength - (this.value ? this.value.length : 0) : li.length;
18762
+ count = state ? this.maximumSelectionLength - (this.value ? this.value.length : 0) : li.length;
18521
18763
  }
18522
18764
  else {
18523
- count_1 = state ? this.maximumSelectionLength - (this.value ? this.value.length : 0) : this.maximumSelectionLength;
18765
+ count = state ? this.maximumSelectionLength - (this.value ? this.value.length : 0) : this.maximumSelectionLength;
18524
18766
  }
18525
18767
  if (!beforeSelectArgs.preventSelectEvent) {
18526
18768
  if (this.enableVirtualization) {
@@ -18535,42 +18777,73 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
18535
18777
  }
18536
18778
  }
18537
18779
  else {
18538
- while (index_1 < length && index_1 <= 50 && index_1 < count_1) {
18539
- this.isSelectAllTarget = (length === index_1 + 1);
18540
- this.updateListSelection(li[index_1], event, length - index_1);
18780
+ while (index < length && index <= 50 && index < count) {
18781
+ this.isSelectAllTarget = (length === index + 1);
18782
+ this.updateListSelection(li[index], event, length - index);
18541
18783
  if (this.enableGroupCheckBox) {
18542
- this.findGroupStart(li[index_1]);
18784
+ this.findGroupStart(li[index]);
18543
18785
  }
18544
- index_1++;
18786
+ index++;
18545
18787
  }
18546
18788
  if (length > 50) {
18547
- setTimeout(function () {
18548
- while (index_1 < length && index_1 < count_1) {
18549
- _this.isSelectAllTarget = (length === index_1 + 1);
18550
- _this.updateListSelection(li[index_1], event, length - index_1);
18551
- if (_this.enableGroupCheckBox) {
18552
- _this.findGroupStart(li[index_1]);
18789
+ createSpinner({ target: this.filterParent, width: Browser.isDevice ? '16px' : '14px' }, this.createElement);
18790
+ showSpinner(this.filterParent);
18791
+ if (this.popupObj && this.filterParent) {
18792
+ [this.popupObj.element.querySelector('.e-content'), this.popupObj.element.querySelector('.e-selectall-parent'), this.filterParent].forEach(function (el) { return el && (el.style.opacity = '0.5'); });
18793
+ this.filterParent.querySelector('.e-input').setAttribute('readonly', 'true');
18794
+ this.filterParent.style.cursor = 'progress';
18795
+ }
18796
+ this.isProcessingVirtualSelectAll = !this.isSelectAllClicked;
18797
+ var indexLocal_1 = index; // preserve original index value
18798
+ var maxIndex_1 = Math.min(length, count);
18799
+ // Use two-frame yield to ensure spinner paints before heavy work starts
18800
+ var CHUNK_SIZE_1 = 6;
18801
+ requestAnimationFrame(function () {
18802
+ requestAnimationFrame(function processFrame() {
18803
+ if (!this.list) {
18804
+ return;
18553
18805
  }
18554
- index_1++;
18555
- }
18556
- _this.updatedataValueItems(event);
18557
- if (!_this.changeOnBlur) {
18558
- _this.updateValueState(event, _this.value, _this.tempValues);
18559
- _this.isSelectAll = _this.isSelectAll ? !_this.isSelectAll : _this.isSelectAll;
18560
- }
18561
- _this.updateHiddenElement();
18562
- if (_this.popupWrapper && li[index_1 - 1].classList.contains('e-item-focus')) {
18563
- var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
18564
- if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
18565
- li[index_1 - 1].classList.remove('e-item-focus');
18806
+ if (indexLocal_1 >= maxIndex_1) {
18807
+ this.isProcessingVirtualSelectAll = !this.isProcessingVirtualSelectAll;
18808
+ this.updatedataValueItems(event);
18809
+ if (!this.changeOnBlur) {
18810
+ this.updateValueState(event, this.value, this.tempValues);
18811
+ this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;
18812
+ }
18813
+ this.updateHiddenElement();
18814
+ if (this.popupWrapper && li[indexLocal_1 - 1] && li[indexLocal_1 - 1].classList.contains('e-item-focus')) {
18815
+ var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
18816
+ if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
18817
+ li[indexLocal_1 - 1].classList.remove('e-item-focus');
18818
+ }
18819
+ }
18820
+ hideSpinner(this.filterParent);
18821
+ if (this.popupObj && this.filterParent) {
18822
+ [this.popupObj.element.querySelector('.e-content'), this.popupObj.element.querySelector('.e-selectall-parent'), this.filterParent].forEach(function (el) { return el && (el.style.opacity = ''); });
18823
+ this.filterParent.querySelector('.e-input').removeAttribute('readonly');
18824
+ this.filterParent.style.cursor = '';
18825
+ }
18826
+ return;
18566
18827
  }
18567
- }
18568
- }, 0);
18828
+ // process up to CHUNK_SIZE items this frame
18829
+ var processed = 0;
18830
+ while (processed < CHUNK_SIZE_1 && indexLocal_1 < maxIndex_1) {
18831
+ this.isSelectAllTarget = (length === indexLocal_1 + 1);
18832
+ this.updateListSelection(li[indexLocal_1], event, length - indexLocal_1);
18833
+ if (this.enableGroupCheckBox) {
18834
+ this.findGroupStart(li[indexLocal_1]);
18835
+ }
18836
+ indexLocal_1++;
18837
+ processed++;
18838
+ }
18839
+ requestAnimationFrame(processFrame.bind(this));
18840
+ }.bind(_this));
18841
+ });
18569
18842
  }
18570
18843
  }
18571
18844
  }
18572
18845
  else {
18573
- for (var i = 0; i < li.length && i < count_1; i++) {
18846
+ for (var i = 0; i < li.length && i < count; i++) {
18574
18847
  this.removeHover();
18575
18848
  var customVal = li[i].getAttribute('data-value');
18576
18849
  var value = this.getFormattedValue(customVal);
@@ -18614,7 +18887,10 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
18614
18887
  this.trigger('selectedAll', args);
18615
18888
  }
18616
18889
  }
18617
- this.updatedataValueItems(event);
18890
+ if (!this.isProcessingVirtualSelectAll &&
18891
+ ((!this.isSelectAllClicked) || (this.isSelectAllClicked && (this.enableVirtualization ? length > 30 : length <= 50)))) {
18892
+ this.updatedataValueItems(event);
18893
+ }
18618
18894
  this.checkPlaceholderSize();
18619
18895
  if (length <= 50 && !beforeSelectArgs.preventSelectEvent) {
18620
18896
  if (!this.changeOnBlur) {
@@ -18707,6 +18983,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
18707
18983
  };
18708
18984
  MultiSelect.prototype.selectAllItems = function (state, event) {
18709
18985
  var _this = this;
18986
+ this.isSelectAllClicked = state;
18710
18987
  if (isNullOrUndefined(this.list)) {
18711
18988
  this.selectAllAction = function () {
18712
18989
  if (_this.mode === 'CheckBox' && _this.showSelectAll) {
@@ -19200,7 +19477,8 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
19200
19477
  _this.renderItems(_this.mainData, _this.fields);
19201
19478
  }
19202
19479
  _this.virtualCustomData = null;
19203
- _this.isVirtualTrackHeight = _this.totalItemCount >= (_this.itemCount * 2) ? false : true;
19480
+ _this.isVirtualTrackHeight = (_this.totalItemCount >= (_this.itemCount * 2) ||
19481
+ _this.dataSource instanceof DataManager) ? false : true;
19204
19482
  }
19205
19483
  });
19206
19484
  }
@@ -19417,7 +19695,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
19417
19695
  }
19418
19696
  else {
19419
19697
  this.chipCollectionWrapper = this.createElement('span', {
19420
- className: CHIP_WRAPPER$1, attrs: { role: 'listbox' }
19698
+ className: CHIP_WRAPPER$1
19421
19699
  });
19422
19700
  this.chipCollectionWrapper.style.display = 'none';
19423
19701
  if (this.mode === 'Default') {
@@ -19991,6 +20269,50 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
19991
20269
  if (this.delimiterWrapper && this.delimiterWrapper.parentElement) {
19992
20270
  this.delimiterWrapper.parentElement.remove();
19993
20271
  }
20272
+ if (this.hiddenElement) {
20273
+ if (this.hiddenElement.onchange) {
20274
+ this.hiddenElement.onchange = null;
20275
+ }
20276
+ this.hiddenElement.onchange = null;
20277
+ this.hiddenElement.onclick = null;
20278
+ this.hiddenElement.oninput = null;
20279
+ var attrs = Array.prototype.slice.call(this.hiddenElement.attributes);
20280
+ for (var n = 0; n < attrs.length; n++) {
20281
+ this.hiddenElement.removeAttribute(attrs[n].name);
20282
+ }
20283
+ var children = this.hiddenElement.children;
20284
+ for (var i = 0; i < children.length; i++) {
20285
+ var child = children[i];
20286
+ child.onclick = null;
20287
+ child.onchange = null;
20288
+ child.textContent = '';
20289
+ var attr = Array.prototype.slice.call(child.attributes);
20290
+ for (var n = 0; n < attr.length; n++) {
20291
+ child.removeAttribute(attr[n].name);
20292
+ }
20293
+ }
20294
+ var selectedElement = this.hiddenElement.querySelector('option');
20295
+ if (selectedElement) {
20296
+ selectedElement.removeAttribute('value');
20297
+ selectedElement.removeAttribute('selected');
20298
+ selectedElement.text = '';
20299
+ selectedElement.innerHTML = '';
20300
+ selectedElement = null;
20301
+ }
20302
+ while (this.hiddenElement.firstChild) {
20303
+ this.hiddenElement.removeChild(this.hiddenElement.firstChild);
20304
+ }
20305
+ if (this.hiddenElement.attributes) {
20306
+ var attr = Array.prototype.slice.call(this.hiddenElement.attributes);
20307
+ for (var n = 0; n < attr.length; n++) {
20308
+ this.hiddenElement.removeAttribute(attr[n].name);
20309
+ }
20310
+ }
20311
+ if (this.hiddenElement.parentNode) {
20312
+ this.hiddenElement.parentNode.removeChild(this.hiddenElement);
20313
+ }
20314
+ this.hiddenElement.innerHTML = '';
20315
+ }
19994
20316
  // Remove the select element if it exists
19995
20317
  var selectElement = this.overAllWrapper.querySelector('select.e-multi-hidden');
19996
20318
  if (selectElement && selectElement.parentElement) {
@@ -20010,7 +20332,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
20010
20332
  var attrArray = ['readonly', 'aria-disabled', 'placeholder', 'aria-labelledby',
20011
20333
  'aria-expanded', 'autocomplete', 'aria-readonly', 'autocapitalize',
20012
20334
  'spellcheck', 'aria-autocomplete', 'aria-live', 'aria-label', 'aria-hidden', 'tabindex', 'aria-controls',
20013
- 'aria-describedby', 'size', 'role', 'type', 'class'];
20335
+ 'aria-describedby', 'size', 'role', 'type', 'class', 'aria-activedescendant'];
20014
20336
  for (var i = 0; i < attrArray.length; i++) {
20015
20337
  this.inputElement.removeAttribute(attrArray[i]);
20016
20338
  }
@@ -23884,8 +24206,10 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
23884
24206
  return;
23885
24207
  }
23886
24208
  this.isTyped = e.code !== 'Enter' && e.code !== 'Space' && e.code !== 'ArrowDown' && e.code !== 'ArrowUp' ? true : false;
23887
- var isRteImage = document.activeElement.parentElement && document.activeElement.parentElement.querySelector('.e-rte-image') ? true : false;
23888
- if (document.activeElement !== this.inputElement && !isRteImage) {
24209
+ var activeParent = document.activeElement && document.activeElement.parentElement;
24210
+ var isRteImage = activeParent && !!activeParent.querySelector('.e-rte-image');
24211
+ var isBECodeDropdownFocused = activeParent && !!activeParent.querySelector('.e-blockeditor .e-code-block-container .e-input-group.e-input-focus');
24212
+ if (document.activeElement !== this.inputElement && !isRteImage && !isBECodeDropdownFocused) {
23889
24213
  this.inputElement.focus();
23890
24214
  }
23891
24215
  if (this.isContentEditable(this.inputElement)) {
@@ -23910,7 +24234,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
23910
24234
  if (!this.requireLeadingSpace && lastWordRange && lastWordRange.includes(this.mentionChar)) {
23911
24235
  lastWordRange = this.mentionChar + lastWordRange.split(this.mentionChar).pop();
23912
24236
  }
23913
- if (lastWordRange.includes(' ')) {
24237
+ if (/\s|\u00A0/.test(lastWordRange)) {
23914
24238
  return;
23915
24239
  }
23916
24240
  }
@@ -24444,7 +24768,9 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
24444
24768
  };
24445
24769
  Mention.prototype.setHeight = function (popupEle) {
24446
24770
  if (this.popupHeight !== 'auto' && this.list) {
24447
- this.list.style.maxHeight = (parseInt(this.listHeight, 10) - 2).toString() + 'px'; // due to box-sizing property
24771
+ var parentStyle = getComputedStyle(this.list.parentElement);
24772
+ var paddingY = parseInt(parentStyle.paddingTop || '0', 10) + parseInt(parentStyle.paddingBottom || '0', 10);
24773
+ this.list.style.maxHeight = (parseInt(this.listHeight, 10) - 2 - paddingY).toString() + 'px'; // due to box-sizing property
24448
24774
  popupEle.style.maxHeight = formatUnit(this.popupHeight);
24449
24775
  }
24450
24776
  else {