@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
@@ -365,8 +365,10 @@ var Mention = /** @class */ (function (_super) {
365
365
  return;
366
366
  }
367
367
  this.isTyped = e.code !== 'Enter' && e.code !== 'Space' && e.code !== 'ArrowDown' && e.code !== 'ArrowUp' ? true : false;
368
- var isRteImage = document.activeElement.parentElement && document.activeElement.parentElement.querySelector('.e-rte-image') ? true : false;
369
- if (document.activeElement !== this.inputElement && !isRteImage) {
368
+ var activeParent = document.activeElement && document.activeElement.parentElement;
369
+ var isRteImage = activeParent && !!activeParent.querySelector('.e-rte-image');
370
+ var isBECodeDropdownFocused = activeParent && !!activeParent.querySelector('.e-blockeditor .e-code-block-container .e-input-group.e-input-focus');
371
+ if (document.activeElement !== this.inputElement && !isRteImage && !isBECodeDropdownFocused) {
370
372
  this.inputElement.focus();
371
373
  }
372
374
  if (this.isContentEditable(this.inputElement)) {
@@ -391,7 +393,7 @@ var Mention = /** @class */ (function (_super) {
391
393
  if (!this.requireLeadingSpace && lastWordRange && lastWordRange.includes(this.mentionChar)) {
392
394
  lastWordRange = this.mentionChar + lastWordRange.split(this.mentionChar).pop();
393
395
  }
394
- if (lastWordRange.includes(' ')) {
396
+ if (/\s|\u00A0/.test(lastWordRange)) {
395
397
  return;
396
398
  }
397
399
  }
@@ -925,7 +927,9 @@ var Mention = /** @class */ (function (_super) {
925
927
  };
926
928
  Mention.prototype.setHeight = function (popupEle) {
927
929
  if (this.popupHeight !== 'auto' && this.list) {
928
- this.list.style.maxHeight = (parseInt(this.listHeight, 10) - 2).toString() + 'px'; // due to box-sizing property
930
+ var parentStyle = getComputedStyle(this.list.parentElement);
931
+ var paddingY = parseInt(parentStyle.paddingTop || '0', 10) + parseInt(parentStyle.paddingBottom || '0', 10);
932
+ this.list.style.maxHeight = (parseInt(this.listHeight, 10) - 2 - paddingY).toString() + 'px'; // due to box-sizing property
929
933
  popupEle.style.maxHeight = formatUnit(this.popupHeight);
930
934
  }
931
935
  else {
@@ -25,9 +25,15 @@ export function createFloatLabel(overAllWrapper, searchWrapper, element, inputEl
25
25
  var floatLabelElement = createElement('label', { className: FLOATTEXT });
26
26
  var id = element.getAttribute('id') ? element.getAttribute('id') : getUniqueID('ej2_multiselect');
27
27
  element.id = id;
28
+ var isAngularComponent = false;
29
+ if (element.tagName && element.tagName.indexOf('EJS-') === 0 && inputElement.id === '' && element !== inputElement) {
30
+ inputElement.id = id + '_input';
31
+ isAngularComponent = true;
32
+ }
28
33
  if (!isNullOrUndefined(element.id) && element.id !== '') {
29
- floatLabelElement.id = 'label_' + element.id.replace(/ /g, '_');
30
- floatLabelElement.setAttribute('for', element.id);
34
+ var labelTarget = isAngularComponent ? inputElement.id || element.id : element.id;
35
+ floatLabelElement.id = 'label_' + labelTarget.replace(/ /g, '_');
36
+ floatLabelElement.setAttribute('for', labelTarget);
31
37
  attributes(inputElement, { 'aria-labelledby': floatLabelElement.id });
32
38
  }
33
39
  if (!isNullOrUndefined(inputElement.placeholder) && inputElement.placeholder !== '') {
@@ -45,6 +45,8 @@ export declare class MultiSelect extends DropDownBase implements IInput {
45
45
  private backCommand;
46
46
  private keyAction;
47
47
  private isSelectAll;
48
+ private isSelectAllClicked;
49
+ private isProcessingVirtualSelectAll;
48
50
  private clearIconWidth;
49
51
  private previousFilterText;
50
52
  private selectedElementID;
@@ -1434,7 +1434,15 @@ var MultiSelect = /** @class */ (function (_super) {
1434
1434
  MultiSelect.prototype.setPlaceholderSize = function (downIconWidth) {
1435
1435
  if (isNullOrUndefined(this.value) || this.value.length === 0) {
1436
1436
  if (this.dropIcon.offsetWidth !== 0) {
1437
- this.searchWrapper.style.width = ('calc(100% - ' + (downIconWidth + 10)) + 'px';
1437
+ var totalIconWidth = downIconWidth + 10;
1438
+ if (this.showClearButton && this.overAllClear) {
1439
+ var display = this.overAllClear.style.display;
1440
+ this.overAllClear.style.display = 'block';
1441
+ var clearWidth = this.overAllClear.offsetWidth;
1442
+ totalIconWidth += clearWidth;
1443
+ this.overAllClear.style.display = display;
1444
+ }
1445
+ this.searchWrapper.style.width = 'calc(100% - ' + totalIconWidth + 'px)';
1438
1446
  }
1439
1447
  else {
1440
1448
  addClass([this.searchWrapper], CUSTOM_WIDTH);
@@ -2515,6 +2523,9 @@ var MultiSelect = /** @class */ (function (_super) {
2515
2523
  selectedChips[0].removeAttribute('id');
2516
2524
  if (!isNullOrUndefined(this.inputElement) && this.inputElement.hasAttribute('aria-activedescendant')) {
2517
2525
  this.inputElement.removeAttribute('aria-activedescendant');
2526
+ if (!this.inputElement.hasAttribute('aria-describedby') && this.chipCollectionWrapper.id) {
2527
+ this.inputElement.setAttribute('aria-describedby', this.chipCollectionWrapper.id);
2528
+ }
2518
2529
  }
2519
2530
  }
2520
2531
  this.removeChipFocus();
@@ -2526,6 +2537,9 @@ var MultiSelect = /** @class */ (function (_super) {
2526
2537
  element.setAttribute('id', this.element.id + '_chip_item');
2527
2538
  if (!isNullOrUndefined(this.inputElement) && element.id) {
2528
2539
  this.inputElement.setAttribute('aria-activedescendant', element.id);
2540
+ if (this.inputElement.hasAttribute('aria-describedby')) {
2541
+ this.inputElement.removeAttribute('aria-describedby');
2542
+ }
2529
2543
  }
2530
2544
  var chipClose = element.querySelector('span.' + CHIP_CLOSE.split(' ')[0]);
2531
2545
  if (chipClose) {
@@ -2827,10 +2841,12 @@ var MultiSelect = /** @class */ (function (_super) {
2827
2841
  if (!isNullOrUndefined(this.chipCollectionWrapper)) {
2828
2842
  (this.chipCollectionWrapper.style.display = '');
2829
2843
  }
2830
- if (this.mode === 'Delimiter' || this.mode === 'CheckBox') {
2844
+ if (this.mode === 'Delimiter' || (this.mode === 'CheckBox' && !this.isSelectAllClicked)) {
2831
2845
  this.showDelimWrapper();
2832
2846
  }
2833
- this.showOverAllClear();
2847
+ if (!this.isSelectAllClicked) {
2848
+ this.showOverAllClear();
2849
+ }
2834
2850
  }
2835
2851
  else {
2836
2852
  if (!isNullOrUndefined(this.chipCollectionWrapper)) {
@@ -2873,7 +2889,9 @@ var MultiSelect = /** @class */ (function (_super) {
2873
2889
  temp = this.getOverflowVal(this.value.length - 1);
2874
2890
  data += temp;
2875
2891
  temp = this.viewWrapper.innerHTML;
2876
- this.updateWrapperText(this.viewWrapper, data);
2892
+ if (!this.isSelectAllClicked) {
2893
+ this.updateWrapperText(this.viewWrapper, data);
2894
+ }
2877
2895
  }
2878
2896
  if (this.enableVirtualization && this.mode === 'CheckBox') {
2879
2897
  var currentText = [];
@@ -4341,6 +4359,7 @@ var MultiSelect = /** @class */ (function (_super) {
4341
4359
  };
4342
4360
  MultiSelect.prototype.onMouseClick = function (e) {
4343
4361
  var _this = this;
4362
+ this.isSelectAllClicked = false;
4344
4363
  if (!this.isClearAllItem) {
4345
4364
  this.keyCode = null;
4346
4365
  this.scrollFocusStatus = false;
@@ -4419,7 +4438,7 @@ var MultiSelect = /** @class */ (function (_super) {
4419
4438
  }
4420
4439
  else {
4421
4440
  e.preventDefault();
4422
- if (this.value.length === this.listData.length && this.isPopupOpen()) {
4441
+ if (this.mode !== 'CheckBox' && this.hideSelectedItem && this.value.length === this.listData.length && this.isPopupOpen()) {
4423
4442
  this.hidePopup(e);
4424
4443
  }
4425
4444
  }
@@ -4757,6 +4776,9 @@ var MultiSelect = /** @class */ (function (_super) {
4757
4776
  var remainCompildTemp = remainContent.replace('${count}', this.value.length.toString());
4758
4777
  raminElement.innerText = remainCompildTemp;
4759
4778
  this.viewWrapper.appendChild(raminElement);
4779
+ if (this.isSelectAllClicked) {
4780
+ this.showOverAllClear();
4781
+ }
4760
4782
  this.renderReactTemplates();
4761
4783
  var remainSize = raminElement.offsetWidth;
4762
4784
  remove(raminElement);
@@ -5043,9 +5065,11 @@ var MultiSelect = /** @class */ (function (_super) {
5043
5065
  firstItems.forEach(function (node) {
5044
5066
  fragment_1.appendChild(node.cloneNode(true));
5045
5067
  });
5046
- li.forEach(function (node) {
5047
- fragment_1.appendChild(node.cloneNode(true));
5048
- });
5068
+ if ((this.totalItemCount >= (this.itemCount * 2) && this.dataSource instanceof DataManager)) {
5069
+ li.forEach(function (node) {
5070
+ fragment_1.appendChild(node.cloneNode(true));
5071
+ });
5072
+ }
5049
5073
  var concatenatedNodeList = fragment_1.childNodes;
5050
5074
  if (this.virtualSelectAllData instanceof Array) {
5051
5075
  while (index < length && index <= 50 && index < count) {
@@ -5078,9 +5102,22 @@ var MultiSelect = /** @class */ (function (_super) {
5078
5102
  index++;
5079
5103
  }
5080
5104
  if (length > 50) {
5105
+ createSpinner({ target: this.filterParent, width: Browser.isDevice ? '16px' : '14px' }, this.createElement);
5106
+ showSpinner(this.filterParent);
5107
+ if (this.popupObj && this.filterParent) {
5108
+ [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'); });
5109
+ this.filterParent.querySelector('.e-input').setAttribute('readonly', 'true');
5110
+ this.filterParent.style.cursor = 'progress';
5111
+ }
5081
5112
  setTimeout(function () {
5082
- if (_this.virtualSelectAllData && _this.virtualSelectAllData.length > 0) {
5083
- _this.virtualSelectAllData.map(function (obj) {
5113
+ var dataArray = _this.virtualSelectAllData;
5114
+ var batchSize = 500;
5115
+ var currentIndex = 0;
5116
+ var processBatch = function () {
5117
+ var endIndex = Math.min(currentIndex + batchSize, dataArray.length);
5118
+ var batch = dataArray.slice(currentIndex, endIndex);
5119
+ // Use map on the batch
5120
+ batch.map(function (obj) {
5084
5121
  if (_this.value && obj[_this.fields.value] != null && Array.isArray(_this.value) &&
5085
5122
  ((!_this.allowObjectBinding && _this.value.indexOf(obj[_this.fields.value]) < 0) ||
5086
5123
  (_this.allowObjectBinding && !_this.isObjectInArray(obj[_this.fields.value], _this.value)))) {
@@ -5089,21 +5126,34 @@ var MultiSelect = /** @class */ (function (_super) {
5089
5126
  _this.dispatchSelect(value, event, null, false, length, obj, text);
5090
5127
  }
5091
5128
  });
5092
- }
5093
- _this.updatedataValueItems(event);
5094
- _this.isSelectAllLoop = false;
5095
- if (!_this.changeOnBlur) {
5096
- _this.updateValueState(event, _this.value, _this.tempValues);
5097
- _this.isSelectAll = _this.isSelectAll ? !_this.isSelectAll : _this.isSelectAll;
5098
- }
5099
- _this.updateHiddenElement(true);
5100
- if (_this.popupWrapper && li[index - 1] && li[index - 1].classList.contains('e-item-focus')) {
5101
- var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
5102
- if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
5103
- li[index - 1].classList.remove('e-item-focus');
5129
+ currentIndex = endIndex;
5130
+ if (currentIndex < dataArray.length) {
5131
+ requestAnimationFrame(processBatch);
5104
5132
  }
5105
- }
5106
- _this.checkSelectAll();
5133
+ else {
5134
+ _this.updatedataValueItems(event);
5135
+ _this.isSelectAllLoop = false;
5136
+ if (!_this.changeOnBlur) {
5137
+ _this.updateValueState(event, _this.value, _this.tempValues);
5138
+ _this.isSelectAll = _this.isSelectAll ? !_this.isSelectAll : _this.isSelectAll;
5139
+ }
5140
+ _this.updateHiddenElement(true);
5141
+ if (_this.popupWrapper && li[index - 1] && li[index - 1].classList.contains('e-item-focus')) {
5142
+ var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
5143
+ if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
5144
+ li[index - 1].classList.remove('e-item-focus');
5145
+ }
5146
+ }
5147
+ _this.checkSelectAll();
5148
+ hideSpinner(_this.filterParent);
5149
+ if (_this.popupObj && _this.filterParent) {
5150
+ [_this.popupObj.element.querySelector('.e-content'), _this.popupObj.element.querySelector('.e-selectall-parent'), _this.filterParent].forEach(function (el) { return el && (el.style.opacity = ''); });
5151
+ _this.filterParent.style.cursor = '';
5152
+ _this.filterParent.querySelector('.e-input').removeAttribute('readonly');
5153
+ }
5154
+ }
5155
+ };
5156
+ processBatch();
5107
5157
  }, 0);
5108
5158
  }
5109
5159
  else if (this.virtualSelectAllData && this.virtualSelectAllData.length > 0) {
@@ -5117,25 +5167,60 @@ var MultiSelect = /** @class */ (function (_super) {
5117
5167
  }
5118
5168
  else {
5119
5169
  if (this.virtualSelectAllData && this.virtualSelectAllData.length > 0) {
5120
- this.virtualSelectAllData.map(function (obj) {
5121
- _this.virtualSelectAll = true;
5122
- _this.removeValue(_this.value[index], event, _this.value.length - index);
5123
- });
5124
- }
5125
- this.updatedataValueItems(event);
5126
- if (!this.changeOnBlur) {
5127
- this.updateValueState(event, this.value, this.tempValues);
5128
- this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;
5129
- }
5130
- this.updateHiddenElement();
5131
- this.setProperties({ value: [] }, true);
5132
- this.selectedListData = [];
5133
- this.virtualSelectAll = false;
5134
- if (!isNullOrUndefined(this.viewPortInfo.startIndex) && !isNullOrUndefined(this.viewPortInfo.endIndex)) {
5135
- this.notify('setCurrentViewDataAsync', {
5136
- component: this.getModuleName(),
5137
- module: 'VirtualScroll'
5138
- });
5170
+ var dataArray_1 = this.virtualSelectAllData;
5171
+ var batchSize_1 = 500;
5172
+ var currentIndex_1 = 0;
5173
+ this.isProcessingVirtualSelectAll = true;
5174
+ createSpinner({ target: this.filterParent, width: Browser.isDevice ? '16px' : '14px' }, this.createElement);
5175
+ showSpinner(this.filterParent);
5176
+ if (this.popupObj && this.filterParent) {
5177
+ [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'); });
5178
+ this.filterParent.querySelector('.e-input').setAttribute('readonly', 'true');
5179
+ this.filterParent.style.cursor = 'progress';
5180
+ }
5181
+ var processBatch_1 = function () {
5182
+ var endIndex = Math.min(currentIndex_1 + batchSize_1, dataArray_1.length);
5183
+ var batch = dataArray_1.slice(currentIndex_1, endIndex);
5184
+ // Use map on the batch
5185
+ batch.map(function (obj) {
5186
+ _this.virtualSelectAll = true;
5187
+ // eslint-disable-next-line security/detect-object-injection
5188
+ _this.removeValue(_this.value[index], event, _this.value.length - index);
5189
+ });
5190
+ currentIndex_1 = endIndex;
5191
+ if (currentIndex_1 < dataArray_1.length) {
5192
+ requestAnimationFrame(processBatch_1);
5193
+ }
5194
+ else {
5195
+ // All batches completed
5196
+ _this.isProcessingVirtualSelectAll = false;
5197
+ hideSpinner(_this.filterParent);
5198
+ if (_this.popupObj && _this.filterParent) {
5199
+ [_this.popupObj.element.querySelector('.e-content'), _this.popupObj.element.querySelector('.e-selectall-parent'), _this.filterParent].forEach(function (el) { return el && (el.style.opacity = ''); });
5200
+ _this.filterParent.querySelector('.e-input').removeAttribute('readonly');
5201
+ _this.filterParent.style.cursor = '';
5202
+ }
5203
+ if (!_this.isSelectAllClicked) {
5204
+ _this.showOverAllClear();
5205
+ }
5206
+ _this.updatedataValueItems(event);
5207
+ if (!_this.changeOnBlur) {
5208
+ _this.updateValueState(event, _this.value, _this.tempValues);
5209
+ _this.isSelectAll = _this.isSelectAll ? !_this.isSelectAll : _this.isSelectAll;
5210
+ }
5211
+ _this.updateHiddenElement();
5212
+ _this.setProperties({ value: [] }, true);
5213
+ _this.selectedListData = [];
5214
+ _this.virtualSelectAll = false;
5215
+ if (!isNullOrUndefined(_this.viewPortInfo.startIndex) && !isNullOrUndefined(_this.viewPortInfo.endIndex)) {
5216
+ _this.notify('setCurrentViewDataAsync', {
5217
+ component: _this.getModuleName(),
5218
+ module: 'VirtualScroll'
5219
+ });
5220
+ }
5221
+ }
5222
+ };
5223
+ processBatch_1();
5139
5224
  }
5140
5225
  }
5141
5226
  this.checkSelectAll();
@@ -5164,13 +5249,13 @@ var MultiSelect = /** @class */ (function (_super) {
5164
5249
  };
5165
5250
  this.trigger('beforeSelectAll', beforeSelectArgs);
5166
5251
  if ((li && li.length) || (this.enableVirtualization && !state)) {
5167
- var index_1 = 0;
5168
- var count_1 = 0;
5252
+ var index = 0;
5253
+ var count = 0;
5169
5254
  if (this.enableGroupCheckBox) {
5170
- count_1 = state ? this.maximumSelectionLength - (this.value ? this.value.length : 0) : li.length;
5255
+ count = state ? this.maximumSelectionLength - (this.value ? this.value.length : 0) : li.length;
5171
5256
  }
5172
5257
  else {
5173
- count_1 = state ? this.maximumSelectionLength - (this.value ? this.value.length : 0) : this.maximumSelectionLength;
5258
+ count = state ? this.maximumSelectionLength - (this.value ? this.value.length : 0) : this.maximumSelectionLength;
5174
5259
  }
5175
5260
  if (!beforeSelectArgs.preventSelectEvent) {
5176
5261
  if (this.enableVirtualization) {
@@ -5185,42 +5270,73 @@ var MultiSelect = /** @class */ (function (_super) {
5185
5270
  }
5186
5271
  }
5187
5272
  else {
5188
- while (index_1 < length && index_1 <= 50 && index_1 < count_1) {
5189
- this.isSelectAllTarget = (length === index_1 + 1);
5190
- this.updateListSelection(li[index_1], event, length - index_1);
5273
+ while (index < length && index <= 50 && index < count) {
5274
+ this.isSelectAllTarget = (length === index + 1);
5275
+ this.updateListSelection(li[index], event, length - index);
5191
5276
  if (this.enableGroupCheckBox) {
5192
- this.findGroupStart(li[index_1]);
5277
+ this.findGroupStart(li[index]);
5193
5278
  }
5194
- index_1++;
5279
+ index++;
5195
5280
  }
5196
5281
  if (length > 50) {
5197
- setTimeout(function () {
5198
- while (index_1 < length && index_1 < count_1) {
5199
- _this.isSelectAllTarget = (length === index_1 + 1);
5200
- _this.updateListSelection(li[index_1], event, length - index_1);
5201
- if (_this.enableGroupCheckBox) {
5202
- _this.findGroupStart(li[index_1]);
5282
+ createSpinner({ target: this.filterParent, width: Browser.isDevice ? '16px' : '14px' }, this.createElement);
5283
+ showSpinner(this.filterParent);
5284
+ if (this.popupObj && this.filterParent) {
5285
+ [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'); });
5286
+ this.filterParent.querySelector('.e-input').setAttribute('readonly', 'true');
5287
+ this.filterParent.style.cursor = 'progress';
5288
+ }
5289
+ this.isProcessingVirtualSelectAll = !this.isSelectAllClicked;
5290
+ var indexLocal_1 = index; // preserve original index value
5291
+ var maxIndex_1 = Math.min(length, count);
5292
+ // Use two-frame yield to ensure spinner paints before heavy work starts
5293
+ var CHUNK_SIZE_1 = 6;
5294
+ requestAnimationFrame(function () {
5295
+ requestAnimationFrame(function processFrame() {
5296
+ if (!this.list) {
5297
+ return;
5203
5298
  }
5204
- index_1++;
5205
- }
5206
- _this.updatedataValueItems(event);
5207
- if (!_this.changeOnBlur) {
5208
- _this.updateValueState(event, _this.value, _this.tempValues);
5209
- _this.isSelectAll = _this.isSelectAll ? !_this.isSelectAll : _this.isSelectAll;
5210
- }
5211
- _this.updateHiddenElement();
5212
- if (_this.popupWrapper && li[index_1 - 1].classList.contains('e-item-focus')) {
5213
- var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
5214
- if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
5215
- li[index_1 - 1].classList.remove('e-item-focus');
5299
+ if (indexLocal_1 >= maxIndex_1) {
5300
+ this.isProcessingVirtualSelectAll = !this.isProcessingVirtualSelectAll;
5301
+ this.updatedataValueItems(event);
5302
+ if (!this.changeOnBlur) {
5303
+ this.updateValueState(event, this.value, this.tempValues);
5304
+ this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;
5305
+ }
5306
+ this.updateHiddenElement();
5307
+ if (this.popupWrapper && li[indexLocal_1 - 1] && li[indexLocal_1 - 1].classList.contains('e-item-focus')) {
5308
+ var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
5309
+ if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
5310
+ li[indexLocal_1 - 1].classList.remove('e-item-focus');
5311
+ }
5312
+ }
5313
+ hideSpinner(this.filterParent);
5314
+ if (this.popupObj && this.filterParent) {
5315
+ [this.popupObj.element.querySelector('.e-content'), this.popupObj.element.querySelector('.e-selectall-parent'), this.filterParent].forEach(function (el) { return el && (el.style.opacity = ''); });
5316
+ this.filterParent.querySelector('.e-input').removeAttribute('readonly');
5317
+ this.filterParent.style.cursor = '';
5318
+ }
5319
+ return;
5216
5320
  }
5217
- }
5218
- }, 0);
5321
+ // process up to CHUNK_SIZE items this frame
5322
+ var processed = 0;
5323
+ while (processed < CHUNK_SIZE_1 && indexLocal_1 < maxIndex_1) {
5324
+ this.isSelectAllTarget = (length === indexLocal_1 + 1);
5325
+ this.updateListSelection(li[indexLocal_1], event, length - indexLocal_1);
5326
+ if (this.enableGroupCheckBox) {
5327
+ this.findGroupStart(li[indexLocal_1]);
5328
+ }
5329
+ indexLocal_1++;
5330
+ processed++;
5331
+ }
5332
+ requestAnimationFrame(processFrame.bind(this));
5333
+ }.bind(_this));
5334
+ });
5219
5335
  }
5220
5336
  }
5221
5337
  }
5222
5338
  else {
5223
- for (var i = 0; i < li.length && i < count_1; i++) {
5339
+ for (var i = 0; i < li.length && i < count; i++) {
5224
5340
  this.removeHover();
5225
5341
  var customVal = li[i].getAttribute('data-value');
5226
5342
  var value = this.getFormattedValue(customVal);
@@ -5264,7 +5380,10 @@ var MultiSelect = /** @class */ (function (_super) {
5264
5380
  this.trigger('selectedAll', args);
5265
5381
  }
5266
5382
  }
5267
- this.updatedataValueItems(event);
5383
+ if (!this.isProcessingVirtualSelectAll &&
5384
+ ((!this.isSelectAllClicked) || (this.isSelectAllClicked && (this.enableVirtualization ? length > 30 : length <= 50)))) {
5385
+ this.updatedataValueItems(event);
5386
+ }
5268
5387
  this.checkPlaceholderSize();
5269
5388
  if (length <= 50 && !beforeSelectArgs.preventSelectEvent) {
5270
5389
  if (!this.changeOnBlur) {
@@ -5357,6 +5476,7 @@ var MultiSelect = /** @class */ (function (_super) {
5357
5476
  };
5358
5477
  MultiSelect.prototype.selectAllItems = function (state, event) {
5359
5478
  var _this = this;
5479
+ this.isSelectAllClicked = state;
5360
5480
  if (isNullOrUndefined(this.list)) {
5361
5481
  this.selectAllAction = function () {
5362
5482
  if (_this.mode === 'CheckBox' && _this.showSelectAll) {
@@ -5850,7 +5970,8 @@ var MultiSelect = /** @class */ (function (_super) {
5850
5970
  _this.renderItems(_this.mainData, _this.fields);
5851
5971
  }
5852
5972
  _this.virtualCustomData = null;
5853
- _this.isVirtualTrackHeight = _this.totalItemCount >= (_this.itemCount * 2) ? false : true;
5973
+ _this.isVirtualTrackHeight = (_this.totalItemCount >= (_this.itemCount * 2) ||
5974
+ _this.dataSource instanceof DataManager) ? false : true;
5854
5975
  }
5855
5976
  });
5856
5977
  }
@@ -6067,7 +6188,7 @@ var MultiSelect = /** @class */ (function (_super) {
6067
6188
  }
6068
6189
  else {
6069
6190
  this.chipCollectionWrapper = this.createElement('span', {
6070
- className: CHIP_WRAPPER, attrs: { role: 'listbox' }
6191
+ className: CHIP_WRAPPER
6071
6192
  });
6072
6193
  this.chipCollectionWrapper.style.display = 'none';
6073
6194
  if (this.mode === 'Default') {
@@ -6641,6 +6762,50 @@ var MultiSelect = /** @class */ (function (_super) {
6641
6762
  if (this.delimiterWrapper && this.delimiterWrapper.parentElement) {
6642
6763
  this.delimiterWrapper.parentElement.remove();
6643
6764
  }
6765
+ if (this.hiddenElement) {
6766
+ if (this.hiddenElement.onchange) {
6767
+ this.hiddenElement.onchange = null;
6768
+ }
6769
+ this.hiddenElement.onchange = null;
6770
+ this.hiddenElement.onclick = null;
6771
+ this.hiddenElement.oninput = null;
6772
+ var attrs = Array.prototype.slice.call(this.hiddenElement.attributes);
6773
+ for (var n = 0; n < attrs.length; n++) {
6774
+ this.hiddenElement.removeAttribute(attrs[n].name);
6775
+ }
6776
+ var children = this.hiddenElement.children;
6777
+ for (var i = 0; i < children.length; i++) {
6778
+ var child = children[i];
6779
+ child.onclick = null;
6780
+ child.onchange = null;
6781
+ child.textContent = '';
6782
+ var attr = Array.prototype.slice.call(child.attributes);
6783
+ for (var n = 0; n < attr.length; n++) {
6784
+ child.removeAttribute(attr[n].name);
6785
+ }
6786
+ }
6787
+ var selectedElement = this.hiddenElement.querySelector('option');
6788
+ if (selectedElement) {
6789
+ selectedElement.removeAttribute('value');
6790
+ selectedElement.removeAttribute('selected');
6791
+ selectedElement.text = '';
6792
+ selectedElement.innerHTML = '';
6793
+ selectedElement = null;
6794
+ }
6795
+ while (this.hiddenElement.firstChild) {
6796
+ this.hiddenElement.removeChild(this.hiddenElement.firstChild);
6797
+ }
6798
+ if (this.hiddenElement.attributes) {
6799
+ var attr = Array.prototype.slice.call(this.hiddenElement.attributes);
6800
+ for (var n = 0; n < attr.length; n++) {
6801
+ this.hiddenElement.removeAttribute(attr[n].name);
6802
+ }
6803
+ }
6804
+ if (this.hiddenElement.parentNode) {
6805
+ this.hiddenElement.parentNode.removeChild(this.hiddenElement);
6806
+ }
6807
+ this.hiddenElement.innerHTML = '';
6808
+ }
6644
6809
  // Remove the select element if it exists
6645
6810
  var selectElement = this.overAllWrapper.querySelector('select.e-multi-hidden');
6646
6811
  if (selectElement && selectElement.parentElement) {
@@ -6660,7 +6825,7 @@ var MultiSelect = /** @class */ (function (_super) {
6660
6825
  var attrArray = ['readonly', 'aria-disabled', 'placeholder', 'aria-labelledby',
6661
6826
  'aria-expanded', 'autocomplete', 'aria-readonly', 'autocapitalize',
6662
6827
  'spellcheck', 'aria-autocomplete', 'aria-live', 'aria-label', 'aria-hidden', 'tabindex', 'aria-controls',
6663
- 'aria-describedby', 'size', 'role', 'type', 'class'];
6828
+ 'aria-describedby', 'size', 'role', 'type', 'class', 'aria-activedescendant'];
6664
6829
  for (var i = 0; i < attrArray.length; i++) {
6665
6830
  this.inputElement.removeAttribute(attrArray[i]);
6666
6831
  }
@@ -21,11 +21,13 @@
21
21
  }
22
22
 
23
23
  .e-dropdownbase .e-list-item .e-list-icon {
24
- padding: 0 8px 0 0;
24
+ -webkit-padding-end: 8px;
25
+ padding-inline-end: 8px;
25
26
  }
26
27
 
27
28
  .e-small .e-dropdownbase .e-list-item .e-list-icon {
28
- padding: 0 4px 0 0;
29
+ -webkit-padding-end: 4px;
30
+ padding-inline-end: 4px;
29
31
  }
30
32
 
31
33
  /* stylelint-disable */
@@ -56,11 +58,13 @@
56
58
  }
57
59
 
58
60
  .e-dropdownbase .e-list-item .e-list-icon {
59
- padding: 0 8px 0 0;
61
+ -webkit-padding-end: 8px;
62
+ padding-inline-end: 8px;
60
63
  }
61
64
 
62
65
  .e-small .e-dropdownbase .e-list-item .e-list-icon {
63
- padding: 0 4px 0 0;
66
+ -webkit-padding-end: 4px;
67
+ padding-inline-end: 4px;
64
68
  }
65
69
 
66
70
  /* stylelint-disable */
@@ -121,11 +125,11 @@
121
125
 
122
126
  .e-mention.e-popup {
123
127
  background: var(--color-sf-bg-primary);
124
- border: 0;
125
128
  -webkit-box-shadow: 0 2px 3px 1px rgba(0, 0, 0, 0.21);
126
129
  box-shadow: 0 2px 3px 1px rgba(0, 0, 0, 0.21);
127
130
  margin-top: 2px;
128
131
  position: absolute;
132
+ border: 0;
129
133
  }
130
134
 
131
135
  .e-mention.e-popup .e-dropdownbase {
@@ -220,11 +224,13 @@
220
224
  }
221
225
 
222
226
  .e-dropdownbase .e-list-item .e-list-icon {
223
- padding: 0 8px 0 0;
227
+ -webkit-padding-end: 8px;
228
+ padding-inline-end: 8px;
224
229
  }
225
230
 
226
231
  .e-small .e-dropdownbase .e-list-item .e-list-icon {
227
- padding: 0 4px 0 0;
232
+ -webkit-padding-end: 4px;
233
+ padding-inline-end: 4px;
228
234
  }
229
235
 
230
236
  /* stylelint-disable */
@@ -1541,11 +1547,13 @@ ejs-dropdownlist {
1541
1547
  }
1542
1548
 
1543
1549
  .e-dropdownbase .e-list-item .e-list-icon {
1544
- padding: 0 8px 0 0;
1550
+ -webkit-padding-end: 8px;
1551
+ padding-inline-end: 8px;
1545
1552
  }
1546
1553
 
1547
1554
  .e-small .e-dropdownbase .e-list-item .e-list-icon {
1548
- padding: 0 4px 0 0;
1555
+ -webkit-padding-end: 4px;
1556
+ padding-inline-end: 4px;
1549
1557
  }
1550
1558
 
1551
1559
  /* stylelint-disable */