@syncfusion/ej2-dropdowns 21.2.10 → 22.1.34

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 (147) hide show
  1. package/.eslintrc.json +260 -0
  2. package/CHANGELOG.md +3 -0
  3. package/README.md +201 -103
  4. package/dist/ej2-dropdowns.min.js +2 -2
  5. package/dist/ej2-dropdowns.umd.min.js +2 -2
  6. package/dist/ej2-dropdowns.umd.min.js.map +1 -1
  7. package/dist/es6/ej2-dropdowns.es2015.js +125 -34
  8. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  9. package/dist/es6/ej2-dropdowns.es5.js +125 -34
  10. package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
  11. package/dist/global/ej2-dropdowns.min.js +2 -2
  12. package/dist/global/ej2-dropdowns.min.js.map +1 -1
  13. package/dist/global/index.d.ts +1 -1
  14. package/package.json +11 -11
  15. package/src/auto-complete/auto-complete-model.d.ts +2 -1
  16. package/src/auto-complete/auto-complete.d.ts +2 -1
  17. package/src/auto-complete/auto-complete.js +1 -1
  18. package/src/combo-box/combo-box-model.d.ts +6 -3
  19. package/src/combo-box/combo-box.d.ts +6 -3
  20. package/src/drop-down-base/drop-down-base-model.d.ts +8 -4
  21. package/src/drop-down-base/drop-down-base.d.ts +8 -4
  22. package/src/drop-down-base/drop-down-base.js +18 -7
  23. package/src/drop-down-list/drop-down-list-model.d.ts +6 -3
  24. package/src/drop-down-list/drop-down-list.d.ts +6 -3
  25. package/src/drop-down-list/drop-down-list.js +22 -13
  26. package/src/drop-down-tree/drop-down-tree-model.d.ts +21 -6
  27. package/src/drop-down-tree/drop-down-tree.d.ts +55 -62
  28. package/src/drop-down-tree/drop-down-tree.js +1 -1
  29. package/src/list-box/list-box.d.ts +14 -0
  30. package/src/list-box/list-box.js +33 -3
  31. package/src/mention/mention-model.d.ts +4 -2
  32. package/src/mention/mention.d.ts +4 -2
  33. package/src/multi-select/multi-select-model.d.ts +14 -7
  34. package/src/multi-select/multi-select.d.ts +15 -7
  35. package/src/multi-select/multi-select.js +50 -9
  36. package/styles/auto-complete/_material3-dark-definition.scss +1 -0
  37. package/styles/auto-complete/_material3-definition.scss +2 -0
  38. package/styles/auto-complete/material3-dark.css +198 -0
  39. package/styles/auto-complete/material3-dark.scss +5 -0
  40. package/styles/auto-complete/material3.css +254 -0
  41. package/styles/auto-complete/material3.scss +5 -0
  42. package/styles/bootstrap-dark.css +5 -1
  43. package/styles/bootstrap.css +5 -1
  44. package/styles/bootstrap4.css +5 -1
  45. package/styles/bootstrap5-dark.css +5 -1
  46. package/styles/bootstrap5.css +5 -1
  47. package/styles/combo-box/_material3-dark-definition.scss +1 -0
  48. package/styles/combo-box/_material3-definition.scss +2 -0
  49. package/styles/combo-box/material3-dark.css +198 -0
  50. package/styles/combo-box/material3-dark.scss +5 -0
  51. package/styles/combo-box/material3.css +254 -0
  52. package/styles/combo-box/material3.scss +5 -0
  53. package/styles/drop-down-base/_layout.scss +3 -1
  54. package/styles/drop-down-base/_material3-dark-definition.scss +1 -0
  55. package/styles/drop-down-base/_material3-definition.scss +87 -0
  56. package/styles/drop-down-base/_theme.scss +10 -0
  57. package/styles/drop-down-base/bootstrap-dark.css +4 -0
  58. package/styles/drop-down-base/bootstrap.css +4 -0
  59. package/styles/drop-down-base/bootstrap4.css +4 -0
  60. package/styles/drop-down-base/bootstrap5-dark.css +4 -0
  61. package/styles/drop-down-base/bootstrap5.css +4 -0
  62. package/styles/drop-down-base/fabric-dark.css +4 -0
  63. package/styles/drop-down-base/fabric.css +4 -0
  64. package/styles/drop-down-base/fluent-dark.css +4 -0
  65. package/styles/drop-down-base/fluent.css +4 -0
  66. package/styles/drop-down-base/highcontrast-light.css +4 -0
  67. package/styles/drop-down-base/highcontrast.css +4 -0
  68. package/styles/drop-down-base/material-dark.css +4 -0
  69. package/styles/drop-down-base/material.css +4 -0
  70. package/styles/drop-down-base/material3-dark.css +439 -0
  71. package/styles/drop-down-base/material3-dark.scss +4 -0
  72. package/styles/drop-down-base/material3.css +495 -0
  73. package/styles/drop-down-base/material3.scss +4 -0
  74. package/styles/drop-down-base/tailwind-dark.css +4 -0
  75. package/styles/drop-down-base/tailwind.css +4 -0
  76. package/styles/drop-down-list/_layout.scss +15 -1
  77. package/styles/drop-down-list/_material3-dark-definition.scss +1 -0
  78. package/styles/drop-down-list/_material3-definition.scss +180 -0
  79. package/styles/drop-down-list/icons/_material3-dark.scss +1 -0
  80. package/styles/drop-down-list/material3-dark.css +503 -0
  81. package/styles/drop-down-list/material3-dark.scss +9 -0
  82. package/styles/drop-down-list/material3.css +559 -0
  83. package/styles/drop-down-list/material3.scss +9 -0
  84. package/styles/drop-down-tree/_layout.scss +13 -7
  85. package/styles/drop-down-tree/_material3-dark-definition.scss +1 -0
  86. package/styles/drop-down-tree/_material3-definition.scss +76 -0
  87. package/styles/drop-down-tree/_theme.scss +14 -2
  88. package/styles/drop-down-tree/icons/_material3-dark.scss +1 -0
  89. package/styles/drop-down-tree/icons/_material3.scss +1 -1
  90. package/styles/drop-down-tree/material3-dark.css +466 -0
  91. package/styles/drop-down-tree/material3-dark.scss +10 -0
  92. package/styles/drop-down-tree/material3.css +522 -0
  93. package/styles/drop-down-tree/material3.scss +10 -0
  94. package/styles/fabric-dark.css +5 -1
  95. package/styles/fabric.css +5 -1
  96. package/styles/fluent-dark.css +5 -1
  97. package/styles/fluent.css +5 -1
  98. package/styles/highcontrast-light.css +5 -1
  99. package/styles/highcontrast.css +5 -1
  100. package/styles/list-box/_layout.scss +9 -1
  101. package/styles/list-box/_material3-dark-definition.scss +1 -0
  102. package/styles/list-box/_material3-definition.scss +117 -0
  103. package/styles/list-box/icons/_material3-dark.scss +1 -0
  104. package/styles/list-box/material3-dark.css +956 -0
  105. package/styles/list-box/material3-dark.scss +6 -0
  106. package/styles/list-box/material3.css +1012 -0
  107. package/styles/list-box/material3.scss +6 -0
  108. package/styles/material-dark.css +5 -1
  109. package/styles/material.css +5 -1
  110. package/styles/material3-dark.css +4664 -0
  111. package/styles/material3-dark.scss +10 -0
  112. package/styles/material3.css +4720 -0
  113. package/styles/material3.scss +10 -0
  114. package/styles/mention/_material3-dark-definition.scss +1 -0
  115. package/styles/mention/_material3-definition.scss +1 -0
  116. package/styles/mention/material3-dark.css +87 -0
  117. package/styles/mention/material3-dark.scss +7 -0
  118. package/styles/mention/material3.css +143 -0
  119. package/styles/mention/material3.scss +7 -0
  120. package/styles/multi-select/_layout.scss +160 -7
  121. package/styles/multi-select/_material3-dark-definition.scss +1 -0
  122. package/styles/multi-select/_material3-definition.scss +246 -0
  123. package/styles/multi-select/_theme.scss +6 -0
  124. package/styles/multi-select/bootstrap-dark.css +1 -1
  125. package/styles/multi-select/bootstrap.css +1 -1
  126. package/styles/multi-select/bootstrap4.css +1 -1
  127. package/styles/multi-select/bootstrap5-dark.css +1 -1
  128. package/styles/multi-select/bootstrap5.css +1 -1
  129. package/styles/multi-select/fabric-dark.css +1 -1
  130. package/styles/multi-select/fabric.css +1 -1
  131. package/styles/multi-select/fluent-dark.css +1 -1
  132. package/styles/multi-select/fluent.css +1 -1
  133. package/styles/multi-select/highcontrast-light.css +1 -1
  134. package/styles/multi-select/highcontrast.css +1 -1
  135. package/styles/multi-select/icons/_material3-dark.scss +1 -0
  136. package/styles/multi-select/icons/_material3.scss +3 -4
  137. package/styles/multi-select/material-dark.css +1 -1
  138. package/styles/multi-select/material.css +1 -1
  139. package/styles/multi-select/material3-dark.css +2547 -0
  140. package/styles/multi-select/material3-dark.scss +10 -0
  141. package/styles/multi-select/material3.css +2603 -0
  142. package/styles/multi-select/material3.scss +10 -0
  143. package/styles/multi-select/tailwind-dark.css +1 -1
  144. package/styles/multi-select/tailwind.css +1 -1
  145. package/styles/tailwind-dark.css +5 -1
  146. package/styles/tailwind.css +5 -1
  147. package/tslint.json +111 -0
@@ -412,7 +412,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
412
412
  };
413
413
  DropDownBase.prototype.templateCompiler = function (baseTemplate) {
414
414
  var checkTemplate = false;
415
- if (baseTemplate) {
415
+ if (typeof baseTemplate !== 'function' && baseTemplate) {
416
416
  try {
417
417
  checkTemplate = (selectAll(baseTemplate, document).length) ? true : false;
418
418
  }
@@ -430,7 +430,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
430
430
  var templateId = actionFailure ? this.actionFailureTemplateId : this.noRecordsTemplateId;
431
431
  ele.innerHTML = '';
432
432
  var tempaltecheck = this.templateCompiler(template);
433
- if (tempaltecheck) {
433
+ if (typeof template !== 'function' && tempaltecheck) {
434
434
  compiledString = compile(select(template, document).innerHTML.trim());
435
435
  }
436
436
  else {
@@ -796,6 +796,9 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
796
796
  DropDownBase.prototype.onActionComplete = function (ulElement, list, e) {
797
797
  /* eslint-enable @typescript-eslint/no-unused-vars */
798
798
  this.listData = list;
799
+ if (this.getModuleName() !== 'listbox') {
800
+ ulElement.setAttribute('tabindex', '0');
801
+ }
799
802
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
800
803
  if (this.isReact) {
801
804
  this.clearTemplate(['itemTemplate', 'groupTemplate', 'actionFailureTemplate', 'noRecordsTemplate']);
@@ -855,7 +858,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
855
858
  var option = { groupTemplateID: this.groupTemplateId, isStringTemplate: this.isStringTemplate };
856
859
  var headerItems = listEle.querySelectorAll('.' + dropDownBaseClasses.group);
857
860
  var groupcheck = this.templateCompiler(this.groupTemplate);
858
- if (groupcheck) {
861
+ if (typeof this.groupTemplate !== 'function' && groupcheck) {
859
862
  var groupValue = select(this.groupTemplate, document).innerHTML.trim();
860
863
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
861
864
  var tempHeaders = ListBase.renderGroupTemplate(groupValue, dataSource, this.fields.properties, headerItems, option, this);
@@ -992,7 +995,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
992
995
  option.templateID = this.itemTemplateId;
993
996
  option.isStringTemplate = this.isStringTemplate;
994
997
  var itemcheck = this.templateCompiler(this.itemTemplate);
995
- if (itemcheck) {
998
+ if (typeof this.itemTemplate !== 'function' && itemcheck) {
996
999
  var itemValue = select(this.itemTemplate, document).innerHTML.trim();
997
1000
  return ListBase.renderContentTemplate(this.createElement, itemValue, dataSource, fields.properties, option, this);
998
1001
  }
@@ -1079,7 +1082,9 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1079
1082
  DropDownBase.prototype.dispatchEvent = function (element, type) {
1080
1083
  var evt = document.createEvent('HTMLEvents');
1081
1084
  evt.initEvent(type, false, true);
1082
- element.dispatchEvent(evt);
1085
+ if (element) {
1086
+ element.dispatchEvent(evt);
1087
+ }
1083
1088
  };
1084
1089
  /**
1085
1090
  * To set the current fields
@@ -1207,7 +1212,12 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1207
1212
  * @returns {void}
1208
1213
  */
1209
1214
  DropDownBase.prototype.render = function (e, isEmptyData) {
1210
- this.list = this.createElement('div', { className: dropDownBaseClasses.content, attrs: { 'tabindex': '0' } });
1215
+ if (this.getModuleName() === 'listbox') {
1216
+ this.list = this.createElement('div', { className: dropDownBaseClasses.content, attrs: { 'tabindex': '0' } });
1217
+ }
1218
+ else {
1219
+ this.list = this.createElement('div', { className: dropDownBaseClasses.content });
1220
+ }
1211
1221
  this.list.classList.add(dropDownBaseClasses.root);
1212
1222
  this.setFields();
1213
1223
  var rippleModel = { duration: 300, selector: '.' + dropDownBaseClasses.li };
@@ -1296,7 +1306,8 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1296
1306
  }
1297
1307
  if (this.itemTemplate && !isHeader) {
1298
1308
  var itemCheck = this.templateCompiler(this.itemTemplate);
1299
- var compiledString = itemCheck ? compile(select(this.itemTemplate, document).innerHTML.trim()) : compile(this.itemTemplate);
1309
+ var compiledString = typeof this.itemTemplate !== 'function' &&
1310
+ itemCheck ? compile(select(this.itemTemplate, document).innerHTML.trim()) : compile(this.itemTemplate);
1300
1311
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1301
1312
  var addItemTemplate = compiledString(item, this, 'itemTemplate', this.itemTemplateId, this.isStringTemplate, null, li);
1302
1313
  if (addItemTemplate) {
@@ -2245,8 +2256,11 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2245
2256
  startIndex = e.action === 'down' && isNullOrUndefined(this.activeIndex) ? 0 : this.liCollections.length - 1;
2246
2257
  index = index < 0 ? this.liCollections.length - 1 : index === this.liCollections.length ? 0 : index;
2247
2258
  }
2248
- var nextItem = isNullOrUndefined(this.activeIndex) ? this.liCollections[startIndex]
2249
- : this.liCollections[index];
2259
+ var nextItem = void 0;
2260
+ if (this.getModuleName() !== 'autocomplete' || this.getModuleName() === 'autocomplete' && this.isPopupOpen) {
2261
+ nextItem = isNullOrUndefined(this.activeIndex) ? this.liCollections[startIndex]
2262
+ : this.liCollections[index];
2263
+ }
2250
2264
  if (!isNullOrUndefined(nextItem)) {
2251
2265
  this.setSelection(nextItem, e);
2252
2266
  }
@@ -2564,9 +2578,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2564
2578
  }
2565
2579
  if (Browser.info.name !== 'mozilla') {
2566
2580
  if (this.targetElement()) {
2567
- if (this.getModuleName() !== 'combobox') {
2568
- attributes(this.targetElement(), { 'aria-describedby': this.inputElement.id !== '' ? this.inputElement.id : this.element.id });
2569
- }
2581
+ attributes(this.targetElement(), { 'aria-describedby': this.inputElement.id !== '' ? this.inputElement.id : this.element.id });
2570
2582
  this.targetElement().removeAttribute('aria-live');
2571
2583
  }
2572
2584
  }
@@ -2579,7 +2591,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2579
2591
  };
2580
2592
  DropDownList.prototype.dropdownCompiler = function (dropdownTemplate) {
2581
2593
  var checkTemplate = false;
2582
- if (dropdownTemplate) {
2594
+ if (typeof dropdownTemplate !== 'function' && dropdownTemplate) {
2583
2595
  try {
2584
2596
  checkTemplate = (document.querySelectorAll(dropdownTemplate).length) ? true : false;
2585
2597
  }
@@ -2610,7 +2622,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2610
2622
  this.valueTempElement.innerHTML = '';
2611
2623
  }
2612
2624
  var valuecheck = this.dropdownCompiler(this.valueTemplate);
2613
- if (valuecheck) {
2625
+ if (typeof this.valueTemplate !== 'function' && valuecheck) {
2614
2626
  compiledString = compile(document.querySelector(this.valueTemplate).innerHTML.trim());
2615
2627
  }
2616
2628
  else {
@@ -2659,7 +2671,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2659
2671
  var index = this.isSelectCustom ? null : this.activeIndex;
2660
2672
  this.setProperties({ 'index': index, 'text': dataItem.text, 'value': dataItem.value }, true);
2661
2673
  this.detachChangeEvent(eve);
2662
- this.dispatchEvent(this.hiddenElement, 'change');
2663
2674
  };
2664
2675
  DropDownList.prototype.detachChanges = function (value) {
2665
2676
  var items;
@@ -2999,6 +3010,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2999
3010
  };
3000
3011
  DropDownList.prototype.onInput = function (e) {
3001
3012
  this.isValidKey = true;
3013
+ if (this.getModuleName() === 'combobox') {
3014
+ this.updateIconState();
3015
+ }
3002
3016
  // For filtering works in mobile firefox.
3003
3017
  if (Browser.isDevice && Browser.info.name === 'mozilla') {
3004
3018
  this.typedString = this.filterInput.value;
@@ -3669,7 +3683,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3669
3683
  this.setFields();
3670
3684
  this.inputWrapper.container.style.width = formatUnit(this.width);
3671
3685
  this.inputWrapper.container.classList.add('e-ddl');
3672
- Input.calculateWidth(this.inputElement, this.inputWrapper.container);
3686
+ if (this.floatLabelType === 'Auto') {
3687
+ Input.calculateWidth(this.inputElement, this.inputWrapper.container);
3688
+ }
3673
3689
  if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && this.inputWrapper.container.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never') {
3674
3690
  this.inputWrapper.container.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
3675
3691
  }
@@ -3745,7 +3761,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3745
3761
  addClass([this.footer], dropDownListClasses.footer);
3746
3762
  }
3747
3763
  var footercheck = this.dropdownCompiler(this.footerTemplate);
3748
- if (footercheck) {
3764
+ if (typeof this.footerTemplate !== 'function' && footercheck) {
3749
3765
  compiledString = compile(select(this.footerTemplate, document).innerHTML.trim());
3750
3766
  }
3751
3767
  else {
@@ -3768,7 +3784,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3768
3784
  addClass([this.header], dropDownListClasses.header);
3769
3785
  }
3770
3786
  var headercheck = this.dropdownCompiler(this.headerTemplate);
3771
- if (headercheck) {
3787
+ if (typeof this.headerTemplate !== 'function' && headercheck) {
3772
3788
  compiledString = compile(select(this.headerTemplate, document).innerHTML.trim());
3773
3789
  }
3774
3790
  else {
@@ -4239,7 +4255,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
4239
4255
  }
4240
4256
  addClass([this.inputWrapper.container], [dropDownListClasses.inputFocus]);
4241
4257
  this.onFocus(e);
4242
- Input.calculateWidth(this.inputElement, this.inputWrapper.container);
4258
+ if (this.floatLabelType === 'Auto') {
4259
+ Input.calculateWidth(this.inputElement, this.inputWrapper.container);
4260
+ }
4243
4261
  };
4244
4262
  /**
4245
4263
  * Moves the focus from the component if the component is already focused.
@@ -4257,7 +4275,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
4257
4275
  this.targetElement().blur();
4258
4276
  }
4259
4277
  removeClass([this.inputWrapper.container], [dropDownListClasses.inputFocus]);
4260
- Input.calculateWidth(this.inputElement, this.inputWrapper.container);
4278
+ if (this.floatLabelType === 'Auto' && this.inputElement.value === '') {
4279
+ Input.calculateWidth(this.inputElement, this.inputWrapper.container);
4280
+ }
4261
4281
  };
4262
4282
  /**
4263
4283
  * Removes the component from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.
@@ -6803,7 +6823,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
6803
6823
  if (template) {
6804
6824
  // eslint-disable-next-line
6805
6825
  try {
6806
- if (document.querySelectorAll(template).length) {
6826
+ if (typeof template !== 'function' && document.querySelectorAll(template).length) {
6807
6827
  return compile(document.querySelector(template).innerHTML.trim());
6808
6828
  }
6809
6829
  else {
@@ -8798,7 +8818,7 @@ var AutoComplete = /** @__PURE__ @class */ (function (_super) {
8798
8818
  */
8799
8819
  AutoComplete.prototype.hidePopup = function (e) {
8800
8820
  _super.prototype.hidePopup.call(this, e);
8801
- this.activeIndex = -1;
8821
+ this.activeIndex = null;
8802
8822
  };
8803
8823
  /**
8804
8824
  * Dynamically change the value of properties.
@@ -9978,7 +9998,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
9978
9998
  parseInt(getComputedStyle(this.dropIcon).marginRight);
9979
9999
  elementWidth = this.overAllWrapper.clientWidth - (downIconWidth + 2 * (parseInt(getComputedStyle(this.inputElement).paddingRight)));
9980
10000
  }
9981
- Input.calculateWidth(elementWidth, this.overAllWrapper, this.getModuleName());
10001
+ if (this.floatLabelType === 'Auto') {
10002
+ Input.calculateWidth(elementWidth, this.overAllWrapper, this.getModuleName());
10003
+ }
9982
10004
  }
9983
10005
  };
9984
10006
  MultiSelect.prototype.checkPlaceholderSize = function () {
@@ -10328,6 +10350,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
10328
10350
  + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
10329
10351
  }
10330
10352
  var focuseElem = this.list.querySelector('li.' + dropDownBaseClasses.focus);
10353
+ this.focusFirstListItem = !isNullOrUndefined(this.liCollections[0]) ? this.liCollections[0].classList.contains('e-item-focus') : false;
10331
10354
  var index = Array.prototype.slice.call(list).indexOf(focuseElem);
10332
10355
  if (index <= 0 && (this.mode === 'CheckBox' && this.allowFiltering)) {
10333
10356
  this.keyAction = false;
@@ -10451,6 +10474,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
10451
10474
  var limit = this.value && this.value.length ? this.value.length : 0;
10452
10475
  var target;
10453
10476
  if (li !== null) {
10477
+ e.preventDefault();
10454
10478
  if (li.classList.contains('e-active')) {
10455
10479
  limit = limit - 1;
10456
10480
  }
@@ -10496,6 +10520,35 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
10496
10520
  this.hidePopup(e);
10497
10521
  }
10498
10522
  }
10523
+ var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
10524
+ if (selectAllParent && !selectAllParent.classList.contains('e-item-focus')) {
10525
+ e.preventDefault();
10526
+ }
10527
+ if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
10528
+ var selectAllCheckBox = selectAllParent.childNodes[0];
10529
+ if (!selectAllCheckBox.classList.contains('e-check')) {
10530
+ selectAllCheckBox.classList.add('e-check');
10531
+ var args = {
10532
+ module: 'CheckBoxSelection',
10533
+ enable: this.mode === 'CheckBox',
10534
+ value: 'check',
10535
+ name: 'checkSelectAll'
10536
+ };
10537
+ this.notify('checkSelectAll', args);
10538
+ this.selectAllItem(true, e, li);
10539
+ }
10540
+ else {
10541
+ selectAllCheckBox.classList.remove('e-check');
10542
+ var args = {
10543
+ module: 'CheckBoxSelection',
10544
+ enable: this.mode === 'CheckBox',
10545
+ value: 'check',
10546
+ name: 'checkSelectAll'
10547
+ };
10548
+ this.notify('checkSelectAll', args);
10549
+ this.selectAllItem(false, e, li);
10550
+ }
10551
+ }
10499
10552
  this.refreshPlaceHolder();
10500
10553
  };
10501
10554
  MultiSelect.prototype.refreshListItems = function (data) {
@@ -10555,7 +10608,17 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
10555
10608
  }
10556
10609
  var selectedElem = this.list.querySelector('li.' + dropDownBaseClasses.focus);
10557
10610
  var temp = -1;
10558
- if (elements.length) {
10611
+ var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
10612
+ if (this.mode === 'CheckBox' && this.showSelectAll && position == 1 && !isNullOrUndefined(selectAllParent) && !selectAllParent.classList.contains('e-item-focus') && this.list.getElementsByClassName('e-item-focus').length == 0 && this.liCollections.length > 1) {
10613
+ selectAllParent.classList.add('e-item-focus');
10614
+ }
10615
+ else if (elements.length) {
10616
+ if (this.mode === 'CheckBox' && this.showSelectAll && !isNullOrUndefined(selectAllParent)) {
10617
+ selectAllParent.classList.remove('e-item-focus');
10618
+ if (this.showSelectAll && position == -1 && !isNullOrUndefined(selectAllParent) && this.liCollections.length > 1 && (this.focusFirstListItem || this.list.getElementsByClassName('e-item-focus').length == 0)) {
10619
+ selectAllParent.classList.add('e-item-focus');
10620
+ }
10621
+ }
10559
10622
  for (var index = 0; index < elements.length; index++) {
10560
10623
  if (elements[index] === selectedElem) {
10561
10624
  temp = index;
@@ -10974,7 +11037,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
10974
11037
  };
10975
11038
  MultiSelect.prototype.multiCompiler = function (multiselectTemplate) {
10976
11039
  var checkTemplate = false;
10977
- if (multiselectTemplate) {
11040
+ if (typeof multiselectTemplate !== 'function' && multiselectTemplate) {
10978
11041
  try {
10979
11042
  checkTemplate = (selectAll(multiselectTemplate, document).length) ? true : false;
10980
11043
  }
@@ -10999,7 +11062,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
10999
11062
  }
11000
11063
  if (this.valueTemplate && !isNullOrUndefined(itemData)) {
11001
11064
  var valuecheck = this.multiCompiler(this.valueTemplate);
11002
- if (valuecheck) {
11065
+ if (typeof this.valueTemplate !== 'function' && valuecheck) {
11003
11066
  compiledString = compile(select(this.valueTemplate, document).innerHTML.trim());
11004
11067
  }
11005
11068
  else {
@@ -11203,7 +11266,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11203
11266
  this.header = this.createElement('div');
11204
11267
  addClass([this.header], HEADER$1);
11205
11268
  var headercheck = this.multiCompiler(this.headerTemplate);
11206
- if (headercheck) {
11269
+ if (typeof this.headerTemplate !== 'function' && headercheck) {
11207
11270
  compiledString = compile(select(this.headerTemplate, document).innerHTML.trim());
11208
11271
  }
11209
11272
  else {
@@ -11230,7 +11293,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11230
11293
  this.footer = this.createElement('div');
11231
11294
  addClass([this.footer], FOOTER$1);
11232
11295
  var footercheck = this.multiCompiler(this.footerTemplate);
11233
- if (footercheck) {
11296
+ if (typeof this.footerTemplate !== 'function' && footercheck) {
11234
11297
  compiledString = compile(select(this.footerTemplate, document).innerHTML.trim());
11235
11298
  }
11236
11299
  else {
@@ -11486,7 +11549,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11486
11549
  if (delim) {
11487
11550
  this.updateWrapperText(this.delimiterWrapper, data);
11488
11551
  this.delimiterWrapper.setAttribute('id', getUniqueID('delim_val'));
11489
- this.inputElement.setAttribute('aria-describedby', this.delimiterWrapper.id);
11490
11552
  this.inputElement.setAttribute('aria-labelledby', this.delimiterWrapper.id);
11491
11553
  }
11492
11554
  var targetEle = e && e.target;
@@ -12461,7 +12523,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
12461
12523
  this.hiddenElement.innerHTML = hiddenValue;
12462
12524
  this.updateWrapperText(this.delimiterWrapper, wrapperText);
12463
12525
  this.delimiterWrapper.setAttribute('id', getUniqueID('delim_val'));
12464
- this.inputElement.setAttribute('aria-describedby', this.delimiterWrapper.id);
12465
12526
  this.inputElement.setAttribute('aria-labelledby', this.delimiterWrapper.id);
12466
12527
  this.setProperties({ text: text.toString() }, true);
12467
12528
  this.refreshInputHight();
@@ -12964,7 +13025,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
12964
13025
  }
12965
13026
  });
12966
13027
  if (this.mode === 'Default' || this.mode === 'Box') {
12967
- this.inputElement.setAttribute('aria-describedby', this.chipCollectionWrapper.id);
13028
+ this.inputElement.setAttribute('aria-labelledby', this.chipCollectionWrapper.id);
12968
13029
  }
12969
13030
  if (this.element.tagName !== this.getNgDirective()) {
12970
13031
  this.element.style.display = 'none';
@@ -14791,6 +14852,26 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
14791
14852
  var elem = (value) ? this.getElemByValue(value) : this.getSelectedItems();
14792
14853
  this.moveUpDown(false, false, elem);
14793
14854
  };
14855
+ /**
14856
+ * Moves the given value(s) / selected value(s) in Top of the list.
14857
+ *
14858
+ * @param { string[] | number[] | boolean[] } value - Specifies the value(s).
14859
+ * @returns {void}
14860
+ */
14861
+ ListBox.prototype.moveTop = function (value) {
14862
+ var elem = (value) ? this.getElemByValue(value) : this.getSelectedItems();
14863
+ this.moveUpDown(null, false, elem, true);
14864
+ };
14865
+ /**
14866
+ * Moves the given value(s) / selected value(s) in bottom of the list.
14867
+ *
14868
+ * @param { string[] | number[] | boolean[] } value - Specifies the value(s).
14869
+ * @returns {void}
14870
+ */
14871
+ ListBox.prototype.moveBottom = function (value) {
14872
+ var elem = (value) ? this.getElemByValue(value) : this.getSelectedItems();
14873
+ this.moveUpDown(true, false, elem, false, true);
14874
+ };
14794
14875
  /**
14795
14876
  * Moves the given value(s) / selected value(s) to the given / default scoped ListBox.
14796
14877
  *
@@ -15249,7 +15330,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
15249
15330
  }
15250
15331
  }
15251
15332
  };
15252
- ListBox.prototype.moveUpDown = function (isUp, isKey, value) {
15333
+ ListBox.prototype.moveUpDown = function (isUp, isKey, value, isTop, isBottom) {
15253
15334
  var _this = this;
15254
15335
  var elems = this.getSelectedItems();
15255
15336
  if (value) {
@@ -15268,8 +15349,18 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
15268
15349
  (isUp ? elems : elems.reverse()).forEach(function (ele) {
15269
15350
  var jsonToIdx = Array.prototype.indexOf.call(_this.ulElement.querySelectorAll('.e-list-item'), ele);
15270
15351
  var idx = Array.prototype.indexOf.call(_this.ulElement.children, ele);
15271
- moveTo(_this.ulElement, _this.ulElement, [idx], isUp ? idx - 1 : idx + 2);
15272
- _this.changeData(idx, isUp ? idx - 1 : idx + 1, isUp ? jsonToIdx - 1 : jsonToIdx + 1, ele);
15352
+ if (isTop) {
15353
+ moveTo(_this.ulElement, _this.ulElement, [idx], 0);
15354
+ _this.changeData(idx, 0, jsonToIdx, ele);
15355
+ }
15356
+ else if (isBottom) {
15357
+ moveTo(_this.ulElement, _this.ulElement, [idx], _this.ulElement.querySelectorAll('.e-list-item').length);
15358
+ _this.changeData(idx, _this.ulElement.querySelectorAll('.e-list-item').length, jsonToIdx, ele);
15359
+ }
15360
+ else {
15361
+ moveTo(_this.ulElement, _this.ulElement, [idx], isUp ? idx - 1 : idx + 2);
15362
+ _this.changeData(idx, isUp ? idx - 1 : idx + 1, isUp ? jsonToIdx - 1 : jsonToIdx + 1, ele);
15363
+ }
15273
15364
  });
15274
15365
  this.trigger('actionComplete', { items: tempItems, eventName: this.toolbarAction });
15275
15366
  elems[0].focus();