@syncfusion/ej2-dropdowns 21.2.8 → 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 (162) hide show
  1. package/.eslintrc.json +1 -0
  2. package/CHANGELOG.md +35 -6
  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 +158 -41
  8. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  9. package/dist/es6/ej2-dropdowns.es5.js +158 -41
  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 +21 -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 +23 -14
  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 +15 -0
  30. package/src/list-box/list-box.js +53 -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 +15 -8
  34. package/src/multi-select/multi-select.d.ts +15 -7
  35. package/src/multi-select/multi-select.js +59 -15
  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 +212 -100
  43. package/styles/bootstrap.css +214 -101
  44. package/styles/bootstrap4.css +214 -101
  45. package/styles/bootstrap5-dark.css +212 -100
  46. package/styles/bootstrap5.css +212 -100
  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 +212 -100
  95. package/styles/fabric.css +214 -101
  96. package/styles/fluent-dark.css +214 -101
  97. package/styles/fluent.css +214 -101
  98. package/styles/highcontrast-light.css +212 -100
  99. package/styles/highcontrast.css +214 -101
  100. package/styles/list-box/_layout.scss +17 -3
  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/_theme.scss +2 -1
  104. package/styles/list-box/bootstrap-dark.css +207 -99
  105. package/styles/list-box/bootstrap.css +209 -100
  106. package/styles/list-box/bootstrap4.css +209 -100
  107. package/styles/list-box/bootstrap5-dark.css +207 -99
  108. package/styles/list-box/bootstrap5.css +207 -99
  109. package/styles/list-box/fabric-dark.css +207 -99
  110. package/styles/list-box/fabric.css +209 -100
  111. package/styles/list-box/fluent-dark.css +209 -100
  112. package/styles/list-box/fluent.css +209 -100
  113. package/styles/list-box/highcontrast-light.css +207 -99
  114. package/styles/list-box/highcontrast.css +209 -100
  115. package/styles/list-box/icons/_material3-dark.scss +1 -0
  116. package/styles/list-box/material-dark.css +207 -99
  117. package/styles/list-box/material.css +209 -100
  118. package/styles/list-box/material3-dark.css +956 -0
  119. package/styles/list-box/material3-dark.scss +6 -0
  120. package/styles/list-box/material3.css +1012 -0
  121. package/styles/list-box/material3.scss +6 -0
  122. package/styles/list-box/tailwind-dark.css +209 -100
  123. package/styles/list-box/tailwind.css +209 -100
  124. package/styles/material-dark.css +212 -100
  125. package/styles/material.css +214 -101
  126. package/styles/material3-dark.css +4664 -0
  127. package/styles/material3-dark.scss +10 -0
  128. package/styles/material3.css +4720 -0
  129. package/styles/material3.scss +10 -0
  130. package/styles/mention/_material3-dark-definition.scss +1 -0
  131. package/styles/mention/_material3-definition.scss +1 -0
  132. package/styles/mention/material3-dark.css +87 -0
  133. package/styles/mention/material3-dark.scss +7 -0
  134. package/styles/mention/material3.css +143 -0
  135. package/styles/mention/material3.scss +7 -0
  136. package/styles/multi-select/_layout.scss +160 -7
  137. package/styles/multi-select/_material3-dark-definition.scss +1 -0
  138. package/styles/multi-select/_material3-definition.scss +246 -0
  139. package/styles/multi-select/_theme.scss +6 -0
  140. package/styles/multi-select/bootstrap-dark.css +1 -1
  141. package/styles/multi-select/bootstrap.css +1 -1
  142. package/styles/multi-select/bootstrap4.css +1 -1
  143. package/styles/multi-select/bootstrap5-dark.css +1 -1
  144. package/styles/multi-select/bootstrap5.css +1 -1
  145. package/styles/multi-select/fabric-dark.css +1 -1
  146. package/styles/multi-select/fabric.css +1 -1
  147. package/styles/multi-select/fluent-dark.css +1 -1
  148. package/styles/multi-select/fluent.css +1 -1
  149. package/styles/multi-select/highcontrast-light.css +1 -1
  150. package/styles/multi-select/highcontrast.css +1 -1
  151. package/styles/multi-select/icons/_material3-dark.scss +1 -0
  152. package/styles/multi-select/icons/_material3.scss +3 -4
  153. package/styles/multi-select/material-dark.css +1 -1
  154. package/styles/multi-select/material.css +1 -1
  155. package/styles/multi-select/material3-dark.css +2547 -0
  156. package/styles/multi-select/material3-dark.scss +10 -0
  157. package/styles/multi-select/material3.css +2603 -0
  158. package/styles/multi-select/material3.scss +10 -0
  159. package/styles/multi-select/tailwind-dark.css +1 -1
  160. package/styles/multi-select/tailwind.css +1 -1
  161. package/styles/tailwind-dark.css +214 -101
  162. package/styles/tailwind.css +214 -101
@@ -1,5 +1,5 @@
1
1
  import { Animation, Browser, ChildProperty, Complex, Component, Event, EventHandler, KeyboardEvents, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, addClass, append, attributes, classList, closest, compile, createElement, detach, extend, formatUnit, getComponent, getUniqueID, getValue, isNullOrUndefined, isUndefined, matches, prepend, remove, removeClass, rippleEffect, select, selectAll, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
2
- import { DataManager, DataUtil, Predicate, Query } from '@syncfusion/ej2-data';
2
+ import { DataManager, DataUtil, JsonAdaptor, Predicate, Query } from '@syncfusion/ej2-data';
3
3
  import { ListBase, Sortable, cssClass, moveTo } from '@syncfusion/ej2-lists';
4
4
  import { Popup, createSpinner, getZindexPartial, hideSpinner, isCollide, showSpinner } from '@syncfusion/ej2-popups';
5
5
  import { Input, TextBox } from '@syncfusion/ej2-inputs';
@@ -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) {
@@ -1373,6 +1384,9 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1373
1384
  }
1374
1385
  }
1375
1386
  }
1387
+ if (this.getModuleName() === 'listbox' && this.isReact) {
1388
+ this.renderReactTemplates();
1389
+ }
1376
1390
  if (selectedItemValue || itemIndex === 0) {
1377
1391
  this.updateSelection();
1378
1392
  }
@@ -2242,8 +2256,11 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2242
2256
  startIndex = e.action === 'down' && isNullOrUndefined(this.activeIndex) ? 0 : this.liCollections.length - 1;
2243
2257
  index = index < 0 ? this.liCollections.length - 1 : index === this.liCollections.length ? 0 : index;
2244
2258
  }
2245
- var nextItem = isNullOrUndefined(this.activeIndex) ? this.liCollections[startIndex]
2246
- : 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
+ }
2247
2264
  if (!isNullOrUndefined(nextItem)) {
2248
2265
  this.setSelection(nextItem, e);
2249
2266
  }
@@ -2445,7 +2462,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2445
2462
  this.removeSelection();
2446
2463
  li.classList.add(dropDownBaseClasses.selected);
2447
2464
  this.removeHover();
2448
- var value = this.getFormattedValue(li.getAttribute('data-value'));
2465
+ var value = li.getAttribute('data-value') !== "null" ? this.getFormattedValue(li.getAttribute('data-value')) : null;
2449
2466
  var selectedData = this.getDataByValue(value);
2450
2467
  if (!this.initial && !preventSelect && !isNullOrUndefined(e)) {
2451
2468
  var items = this.detachChanges(selectedData);
@@ -2574,7 +2591,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2574
2591
  };
2575
2592
  DropDownList.prototype.dropdownCompiler = function (dropdownTemplate) {
2576
2593
  var checkTemplate = false;
2577
- if (dropdownTemplate) {
2594
+ if (typeof dropdownTemplate !== 'function' && dropdownTemplate) {
2578
2595
  try {
2579
2596
  checkTemplate = (document.querySelectorAll(dropdownTemplate).length) ? true : false;
2580
2597
  }
@@ -2605,7 +2622,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2605
2622
  this.valueTempElement.innerHTML = '';
2606
2623
  }
2607
2624
  var valuecheck = this.dropdownCompiler(this.valueTemplate);
2608
- if (valuecheck) {
2625
+ if (typeof this.valueTemplate !== 'function' && valuecheck) {
2609
2626
  compiledString = compile(document.querySelector(this.valueTemplate).innerHTML.trim());
2610
2627
  }
2611
2628
  else {
@@ -2614,9 +2631,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2614
2631
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2615
2632
  var valueCompTemp = compiledString(this.itemData, this, 'valueTemplate', this.valueTemplateId, this.isStringTemplate, null, this.valueTempElement);
2616
2633
  if (valueCompTemp && valueCompTemp.length > 0) {
2617
- for (var i = 0; i < valueCompTemp.length; i++) {
2618
- this.valueTempElement.appendChild(valueCompTemp[i]);
2619
- }
2634
+ append(valueCompTemp, this.valueTempElement);
2620
2635
  }
2621
2636
  this.renderReactTemplates();
2622
2637
  };
@@ -2656,7 +2671,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2656
2671
  var index = this.isSelectCustom ? null : this.activeIndex;
2657
2672
  this.setProperties({ 'index': index, 'text': dataItem.text, 'value': dataItem.value }, true);
2658
2673
  this.detachChangeEvent(eve);
2659
- this.dispatchEvent(this.hiddenElement, 'change');
2660
2674
  };
2661
2675
  DropDownList.prototype.detachChanges = function (value) {
2662
2676
  var items;
@@ -2996,6 +3010,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2996
3010
  };
2997
3011
  DropDownList.prototype.onInput = function (e) {
2998
3012
  this.isValidKey = true;
3013
+ if (this.getModuleName() === 'combobox') {
3014
+ this.updateIconState();
3015
+ }
2999
3016
  // For filtering works in mobile firefox.
3000
3017
  if (Browser.isDevice && Browser.info.name === 'mozilla') {
3001
3018
  this.typedString = this.filterInput.value;
@@ -3666,7 +3683,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3666
3683
  this.setFields();
3667
3684
  this.inputWrapper.container.style.width = formatUnit(this.width);
3668
3685
  this.inputWrapper.container.classList.add('e-ddl');
3669
- Input.calculateWidth(this.inputElement, this.inputWrapper.container);
3686
+ if (this.floatLabelType === 'Auto') {
3687
+ Input.calculateWidth(this.inputElement, this.inputWrapper.container);
3688
+ }
3670
3689
  if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && this.inputWrapper.container.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never') {
3671
3690
  this.inputWrapper.container.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
3672
3691
  }
@@ -3742,7 +3761,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3742
3761
  addClass([this.footer], dropDownListClasses.footer);
3743
3762
  }
3744
3763
  var footercheck = this.dropdownCompiler(this.footerTemplate);
3745
- if (footercheck) {
3764
+ if (typeof this.footerTemplate !== 'function' && footercheck) {
3746
3765
  compiledString = compile(select(this.footerTemplate, document).innerHTML.trim());
3747
3766
  }
3748
3767
  else {
@@ -3765,7 +3784,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3765
3784
  addClass([this.header], dropDownListClasses.header);
3766
3785
  }
3767
3786
  var headercheck = this.dropdownCompiler(this.headerTemplate);
3768
- if (headercheck) {
3787
+ if (typeof this.headerTemplate !== 'function' && headercheck) {
3769
3788
  compiledString = compile(select(this.headerTemplate, document).innerHTML.trim());
3770
3789
  }
3771
3790
  else {
@@ -4236,7 +4255,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
4236
4255
  }
4237
4256
  addClass([this.inputWrapper.container], [dropDownListClasses.inputFocus]);
4238
4257
  this.onFocus(e);
4239
- Input.calculateWidth(this.inputElement, this.inputWrapper.container);
4258
+ if (this.floatLabelType === 'Auto') {
4259
+ Input.calculateWidth(this.inputElement, this.inputWrapper.container);
4260
+ }
4240
4261
  };
4241
4262
  /**
4242
4263
  * Moves the focus from the component if the component is already focused.
@@ -4254,7 +4275,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
4254
4275
  this.targetElement().blur();
4255
4276
  }
4256
4277
  removeClass([this.inputWrapper.container], [dropDownListClasses.inputFocus]);
4257
- Input.calculateWidth(this.inputElement, this.inputWrapper.container);
4278
+ if (this.floatLabelType === 'Auto' && this.inputElement.value === '') {
4279
+ Input.calculateWidth(this.inputElement, this.inputWrapper.container);
4280
+ }
4258
4281
  };
4259
4282
  /**
4260
4283
  * Removes the component from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.
@@ -6800,7 +6823,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
6800
6823
  if (template) {
6801
6824
  // eslint-disable-next-line
6802
6825
  try {
6803
- if (document.querySelectorAll(template).length) {
6826
+ if (typeof template !== 'function' && document.querySelectorAll(template).length) {
6804
6827
  return compile(document.querySelector(template).innerHTML.trim());
6805
6828
  }
6806
6829
  else {
@@ -8795,7 +8818,7 @@ var AutoComplete = /** @__PURE__ @class */ (function (_super) {
8795
8818
  */
8796
8819
  AutoComplete.prototype.hidePopup = function (e) {
8797
8820
  _super.prototype.hidePopup.call(this, e);
8798
- this.activeIndex = -1;
8821
+ this.activeIndex = null;
8799
8822
  };
8800
8823
  /**
8801
8824
  * Dynamically change the value of properties.
@@ -9466,7 +9489,12 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
9466
9489
  predicate = predicate.or(field, 'equal', valuecheck[i]);
9467
9490
  }
9468
9491
  }
9469
- return this.getQuery(this.query).where(predicate);
9492
+ if (this.dataSource instanceof DataManager && this.dataSource.adaptor instanceof JsonAdaptor) {
9493
+ return new Query().where(predicate);
9494
+ }
9495
+ else {
9496
+ return this.getQuery(this.query).clone().where(predicate);
9497
+ }
9470
9498
  };
9471
9499
  /* eslint-disable @typescript-eslint/no-unused-vars */
9472
9500
  MultiSelect.prototype.onActionComplete = function (ulElement, list, e, isUpdated) {
@@ -9485,7 +9513,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
9485
9513
  }
9486
9514
  }
9487
9515
  var valuecheck = [];
9488
- if (!isNullOrUndefined(this.value) && !this.allowCustomValue) {
9516
+ if (!isNullOrUndefined(this.value)) {
9489
9517
  valuecheck = this.presentItemValue(this.ulElement);
9490
9518
  }
9491
9519
  if (valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
@@ -9970,7 +9998,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
9970
9998
  parseInt(getComputedStyle(this.dropIcon).marginRight);
9971
9999
  elementWidth = this.overAllWrapper.clientWidth - (downIconWidth + 2 * (parseInt(getComputedStyle(this.inputElement).paddingRight)));
9972
10000
  }
9973
- Input.calculateWidth(elementWidth, this.overAllWrapper, this.getModuleName());
10001
+ if (this.floatLabelType === 'Auto') {
10002
+ Input.calculateWidth(elementWidth, this.overAllWrapper, this.getModuleName());
10003
+ }
9974
10004
  }
9975
10005
  };
9976
10006
  MultiSelect.prototype.checkPlaceholderSize = function () {
@@ -10320,6 +10350,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
10320
10350
  + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
10321
10351
  }
10322
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;
10323
10354
  var index = Array.prototype.slice.call(list).indexOf(focuseElem);
10324
10355
  if (index <= 0 && (this.mode === 'CheckBox' && this.allowFiltering)) {
10325
10356
  this.keyAction = false;
@@ -10443,6 +10474,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
10443
10474
  var limit = this.value && this.value.length ? this.value.length : 0;
10444
10475
  var target;
10445
10476
  if (li !== null) {
10477
+ e.preventDefault();
10446
10478
  if (li.classList.contains('e-active')) {
10447
10479
  limit = limit - 1;
10448
10480
  }
@@ -10488,6 +10520,35 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
10488
10520
  this.hidePopup(e);
10489
10521
  }
10490
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
+ }
10491
10552
  this.refreshPlaceHolder();
10492
10553
  };
10493
10554
  MultiSelect.prototype.refreshListItems = function (data) {
@@ -10547,7 +10608,17 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
10547
10608
  }
10548
10609
  var selectedElem = this.list.querySelector('li.' + dropDownBaseClasses.focus);
10549
10610
  var temp = -1;
10550
- 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
+ }
10551
10622
  for (var index = 0; index < elements.length; index++) {
10552
10623
  if (elements[index] === selectedElem) {
10553
10624
  temp = index;
@@ -10966,7 +11037,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
10966
11037
  };
10967
11038
  MultiSelect.prototype.multiCompiler = function (multiselectTemplate) {
10968
11039
  var checkTemplate = false;
10969
- if (multiselectTemplate) {
11040
+ if (typeof multiselectTemplate !== 'function' && multiselectTemplate) {
10970
11041
  try {
10971
11042
  checkTemplate = (selectAll(multiselectTemplate, document).length) ? true : false;
10972
11043
  }
@@ -10991,7 +11062,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
10991
11062
  }
10992
11063
  if (this.valueTemplate && !isNullOrUndefined(itemData)) {
10993
11064
  var valuecheck = this.multiCompiler(this.valueTemplate);
10994
- if (valuecheck) {
11065
+ if (typeof this.valueTemplate !== 'function' && valuecheck) {
10995
11066
  compiledString = compile(select(this.valueTemplate, document).innerHTML.trim());
10996
11067
  }
10997
11068
  else {
@@ -11000,9 +11071,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11000
11071
  // eslint-disable-next-line
11001
11072
  var valueCompTemp = compiledString(itemData, this, 'valueTemplate', this.valueTemplateId, this.isStringTemplate, null, chipContent);
11002
11073
  if (valueCompTemp && valueCompTemp.length > 0) {
11003
- for (var i = 0; i < valueCompTemp.length; i++) {
11004
- chipContent.appendChild(valueCompTemp[i]);
11005
- }
11074
+ append(valueCompTemp, chipContent);
11006
11075
  }
11007
11076
  this.renderReactTemplates();
11008
11077
  }
@@ -11197,7 +11266,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11197
11266
  this.header = this.createElement('div');
11198
11267
  addClass([this.header], HEADER$1);
11199
11268
  var headercheck = this.multiCompiler(this.headerTemplate);
11200
- if (headercheck) {
11269
+ if (typeof this.headerTemplate !== 'function' && headercheck) {
11201
11270
  compiledString = compile(select(this.headerTemplate, document).innerHTML.trim());
11202
11271
  }
11203
11272
  else {
@@ -11224,7 +11293,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11224
11293
  this.footer = this.createElement('div');
11225
11294
  addClass([this.footer], FOOTER$1);
11226
11295
  var footercheck = this.multiCompiler(this.footerTemplate);
11227
- if (footercheck) {
11296
+ if (typeof this.footerTemplate !== 'function' && footercheck) {
11228
11297
  compiledString = compile(select(this.footerTemplate, document).innerHTML.trim());
11229
11298
  }
11230
11299
  else {
@@ -11480,7 +11549,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11480
11549
  if (delim) {
11481
11550
  this.updateWrapperText(this.delimiterWrapper, data);
11482
11551
  this.delimiterWrapper.setAttribute('id', getUniqueID('delim_val'));
11483
- this.inputElement.setAttribute('aria-describedby', this.delimiterWrapper.id);
11484
11552
  this.inputElement.setAttribute('aria-labelledby', this.delimiterWrapper.id);
11485
11553
  }
11486
11554
  var targetEle = e && e.target;
@@ -12455,7 +12523,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
12455
12523
  this.hiddenElement.innerHTML = hiddenValue;
12456
12524
  this.updateWrapperText(this.delimiterWrapper, wrapperText);
12457
12525
  this.delimiterWrapper.setAttribute('id', getUniqueID('delim_val'));
12458
- this.inputElement.setAttribute('aria-describedby', this.delimiterWrapper.id);
12459
12526
  this.inputElement.setAttribute('aria-labelledby', this.delimiterWrapper.id);
12460
12527
  this.setProperties({ text: text.toString() }, true);
12461
12528
  this.refreshInputHight();
@@ -12958,7 +13025,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
12958
13025
  }
12959
13026
  });
12960
13027
  if (this.mode === 'Default' || this.mode === 'Box') {
12961
- this.inputElement.setAttribute('aria-describedby', this.chipCollectionWrapper.id);
13028
+ this.inputElement.setAttribute('aria-labelledby', this.chipCollectionWrapper.id);
12962
13029
  }
12963
13030
  if (this.element.tagName !== this.getNgDirective()) {
12964
13031
  this.element.style.display = 'none';
@@ -14347,6 +14414,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
14347
14414
  this.trigger('drag', this.getDragArgs(args));
14348
14415
  };
14349
14416
  ListBox.prototype.beforeDragEnd = function (args) {
14417
+ var items = [];
14350
14418
  this.dragValue = this.getFormattedValue(args.droppedElement.getAttribute('data-value'));
14351
14419
  if (this.value.indexOf(this.dragValue) > -1) {
14352
14420
  args.items = this.getDataByValues(this.value);
@@ -14354,7 +14422,11 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
14354
14422
  else {
14355
14423
  args.items = this.getDataByValues([this.dragValue]);
14356
14424
  }
14425
+ extend(items, args.items);
14357
14426
  this.trigger('beforeDrop', args);
14427
+ if (args.items !== items) {
14428
+ this.customDraggedItem = args.items;
14429
+ }
14358
14430
  };
14359
14431
  ListBox.prototype.dragEnd = function (args) {
14360
14432
  var _this = this;
@@ -14402,6 +14474,12 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
14402
14474
  liColl.splice(toIdx_1, 0, liColl.splice(rIdx, 1)[0]);
14403
14475
  if (this.allowDragAll) {
14404
14476
  selectedOptions = this.value && Array.prototype.indexOf.call(this.value, dropValue) > -1 ? this.value : [dropValue];
14477
+ if (!isNullOrUndefined(this.customDraggedItem)) {
14478
+ selectedOptions = [];
14479
+ this.customDraggedItem.forEach(function (item) {
14480
+ selectedOptions.push(getValue(_this.fields.value, item));
14481
+ });
14482
+ }
14405
14483
  selectedOptions.forEach(function (value) {
14406
14484
  if (value !== dropValue) {
14407
14485
  var idx = listData.indexOf(_this.getDataByValue(value));
@@ -14434,6 +14512,12 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
14434
14512
  sortedData = [].slice.call(listObj.sortedData);
14435
14513
  selectedOptions = (this.value && Array.prototype.indexOf.call(this.value, dropValue) > -1 && this.allowDragAll)
14436
14514
  ? this.value : [dropValue];
14515
+ if (!isNullOrUndefined(this.customDraggedItem)) {
14516
+ selectedOptions = [];
14517
+ this.customDraggedItem.forEach(function (item) {
14518
+ selectedOptions.push(getValue(_this.fields.value, item));
14519
+ });
14520
+ }
14437
14521
  var fListData_1 = [].slice.call(this.listData);
14438
14522
  var fSortData_1 = [].slice.call(this.sortedData);
14439
14523
  selectedOptions.forEach(function (value, index) {
@@ -14504,6 +14588,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
14504
14588
  var dragArgs1 = extend(destArgs, { currentData: listData });
14505
14589
  dragArgs = extend(dragArgs, { destination: dragArgs1 });
14506
14590
  }
14591
+ if (!isNullOrUndefined(this.customDraggedItem)) {
14592
+ dragArgs.items = this.customDraggedItem;
14593
+ }
14507
14594
  this.trigger('drop', dragArgs);
14508
14595
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14509
14596
  var liCollElem = dragArgs.elements;
@@ -14765,6 +14852,26 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
14765
14852
  var elem = (value) ? this.getElemByValue(value) : this.getSelectedItems();
14766
14853
  this.moveUpDown(false, false, elem);
14767
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
+ };
14768
14875
  /**
14769
14876
  * Moves the given value(s) / selected value(s) to the given / default scoped ListBox.
14770
14877
  *
@@ -15223,7 +15330,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
15223
15330
  }
15224
15331
  }
15225
15332
  };
15226
- ListBox.prototype.moveUpDown = function (isUp, isKey, value) {
15333
+ ListBox.prototype.moveUpDown = function (isUp, isKey, value, isTop, isBottom) {
15227
15334
  var _this = this;
15228
15335
  var elems = this.getSelectedItems();
15229
15336
  if (value) {
@@ -15242,8 +15349,18 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
15242
15349
  (isUp ? elems : elems.reverse()).forEach(function (ele) {
15243
15350
  var jsonToIdx = Array.prototype.indexOf.call(_this.ulElement.querySelectorAll('.e-list-item'), ele);
15244
15351
  var idx = Array.prototype.indexOf.call(_this.ulElement.children, ele);
15245
- moveTo(_this.ulElement, _this.ulElement, [idx], isUp ? idx - 1 : idx + 2);
15246
- _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
+ }
15247
15364
  });
15248
15365
  this.trigger('actionComplete', { items: tempItems, eventName: this.toolbarAction });
15249
15366
  elems[0].focus();