@syncfusion/ej2-dropdowns 25.2.7 → 26.1.38

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 (267) hide show
  1. package/.eslintrc.json +3 -2
  2. package/dist/ej2-dropdowns.min.js +2 -2
  3. package/dist/ej2-dropdowns.umd.min.js +2 -2
  4. package/dist/ej2-dropdowns.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-dropdowns.es2015.js +531 -224
  6. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  7. package/dist/es6/ej2-dropdowns.es5.js +524 -216
  8. package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
  9. package/dist/global/ej2-dropdowns.min.js +2 -2
  10. package/dist/global/ej2-dropdowns.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +14 -13
  13. package/src/auto-complete/auto-complete.js +1 -1
  14. package/src/combo-box/combo-box.js +15 -0
  15. package/src/common/interface.js +0 -1
  16. package/src/common/virtual-scroll.js +1 -0
  17. package/src/drop-down-base/drop-down-base-model.d.ts +8 -1
  18. package/src/drop-down-base/drop-down-base.d.ts +28 -2
  19. package/src/drop-down-base/drop-down-base.js +64 -9
  20. package/src/drop-down-list/drop-down-list.d.ts +15 -2
  21. package/src/drop-down-list/drop-down-list.js +129 -13
  22. package/src/drop-down-tree/drop-down-tree-model.d.ts +15 -15
  23. package/src/drop-down-tree/drop-down-tree.d.ts +17 -13
  24. package/src/drop-down-tree/drop-down-tree.js +67 -38
  25. package/src/list-box/list-box.d.ts +1 -0
  26. package/src/list-box/list-box.js +41 -9
  27. package/src/mention/mention.js +23 -8
  28. package/src/multi-select/interface.js +0 -1
  29. package/src/multi-select/multi-select.d.ts +15 -0
  30. package/src/multi-select/multi-select.js +135 -12
  31. package/styles/auto-complete/_bootstrap5.3-definition.scss +2 -0
  32. package/styles/auto-complete/_fluent2-definition.scss +2 -0
  33. package/styles/auto-complete/bootstrap-dark.css +5 -2
  34. package/styles/auto-complete/bootstrap.css +5 -2
  35. package/styles/auto-complete/bootstrap4.css +6 -2
  36. package/styles/auto-complete/bootstrap5-dark.css +6 -2
  37. package/styles/auto-complete/bootstrap5.css +6 -2
  38. package/styles/auto-complete/fabric-dark.css +3 -1
  39. package/styles/auto-complete/fabric.css +3 -1
  40. package/styles/auto-complete/fluent-dark.css +6 -2
  41. package/styles/auto-complete/fluent.css +6 -2
  42. package/styles/auto-complete/fluent2.css +1140 -0
  43. package/styles/auto-complete/fluent2.scss +4 -0
  44. package/styles/auto-complete/highcontrast-light.css +3 -1
  45. package/styles/auto-complete/highcontrast.css +3 -1
  46. package/styles/auto-complete/material-dark.css +16 -5
  47. package/styles/auto-complete/material.css +16 -5
  48. package/styles/auto-complete/material3-dark.css +17 -6
  49. package/styles/auto-complete/material3.css +17 -6
  50. package/styles/auto-complete/tailwind-dark.css +16 -5
  51. package/styles/auto-complete/tailwind.css +16 -5
  52. package/styles/bootstrap-dark.css +197 -228
  53. package/styles/bootstrap-dark.scss +28 -8
  54. package/styles/bootstrap.css +197 -228
  55. package/styles/bootstrap.scss +28 -8
  56. package/styles/bootstrap4.css +200 -229
  57. package/styles/bootstrap4.scss +28 -8
  58. package/styles/bootstrap5-dark.css +197 -221
  59. package/styles/bootstrap5-dark.scss +28 -8
  60. package/styles/bootstrap5.css +197 -221
  61. package/styles/bootstrap5.scss +28 -8
  62. package/styles/combo-box/_bootstrap5.3-definition.scss +2 -0
  63. package/styles/combo-box/_fluent2-definition.scss +2 -0
  64. package/styles/combo-box/bootstrap-dark.css +5 -2
  65. package/styles/combo-box/bootstrap.css +5 -2
  66. package/styles/combo-box/bootstrap4.css +6 -2
  67. package/styles/combo-box/bootstrap5-dark.css +6 -2
  68. package/styles/combo-box/bootstrap5.css +6 -2
  69. package/styles/combo-box/fabric-dark.css +3 -1
  70. package/styles/combo-box/fabric.css +3 -1
  71. package/styles/combo-box/fluent-dark.css +6 -2
  72. package/styles/combo-box/fluent.css +6 -2
  73. package/styles/combo-box/fluent2.css +1140 -0
  74. package/styles/combo-box/fluent2.scss +4 -0
  75. package/styles/combo-box/highcontrast-light.css +3 -1
  76. package/styles/combo-box/highcontrast.css +3 -1
  77. package/styles/combo-box/material-dark.css +16 -5
  78. package/styles/combo-box/material.css +16 -5
  79. package/styles/combo-box/material3-dark.css +17 -6
  80. package/styles/combo-box/material3.css +17 -6
  81. package/styles/combo-box/tailwind-dark.css +16 -5
  82. package/styles/combo-box/tailwind.css +16 -5
  83. package/styles/drop-down-base/_bds-definition.scss +2 -2
  84. package/styles/drop-down-base/_bootstrap5.3-definition.scss +117 -0
  85. package/styles/drop-down-base/_fluent2-definition.scss +134 -0
  86. package/styles/drop-down-base/_layout.scss +12 -2
  87. package/styles/drop-down-base/_material3-definition.scss +0 -11
  88. package/styles/drop-down-base/_theme.scss +2 -11
  89. package/styles/drop-down-base/bootstrap-dark.css +2 -1
  90. package/styles/drop-down-base/bootstrap.css +2 -1
  91. package/styles/drop-down-base/bootstrap4.css +2 -1
  92. package/styles/drop-down-base/bootstrap5-dark.css +2 -1
  93. package/styles/drop-down-base/bootstrap5.css +2 -1
  94. package/styles/drop-down-base/fabric-dark.css +2 -1
  95. package/styles/drop-down-base/fabric.css +2 -1
  96. package/styles/drop-down-base/fluent-dark.css +2 -1
  97. package/styles/drop-down-base/fluent.css +2 -1
  98. package/styles/drop-down-base/fluent2.css +1447 -0
  99. package/styles/drop-down-base/fluent2.scss +3 -0
  100. package/styles/drop-down-base/highcontrast-light.css +2 -1
  101. package/styles/drop-down-base/highcontrast.css +2 -1
  102. package/styles/drop-down-base/material-dark.css +2 -1
  103. package/styles/drop-down-base/material.css +2 -1
  104. package/styles/drop-down-base/material3-dark.css +9 -2
  105. package/styles/drop-down-base/material3.css +9 -2
  106. package/styles/drop-down-base/tailwind-dark.css +2 -1
  107. package/styles/drop-down-base/tailwind.css +2 -1
  108. package/styles/drop-down-list/_bootstrap5.3-definition.scss +201 -0
  109. package/styles/drop-down-list/_fluent2-definition.scss +134 -0
  110. package/styles/drop-down-list/_layout.scss +5 -3
  111. package/styles/drop-down-list/_material3-definition.scss +0 -8
  112. package/styles/drop-down-list/bootstrap-dark.css +38 -3
  113. package/styles/drop-down-list/bootstrap.css +38 -3
  114. package/styles/drop-down-list/bootstrap4.css +39 -3
  115. package/styles/drop-down-list/bootstrap5-dark.css +39 -3
  116. package/styles/drop-down-list/bootstrap5.css +39 -3
  117. package/styles/drop-down-list/fabric-dark.css +36 -2
  118. package/styles/drop-down-list/fabric.css +36 -2
  119. package/styles/drop-down-list/fluent-dark.css +39 -3
  120. package/styles/drop-down-list/fluent.css +39 -3
  121. package/styles/drop-down-list/fluent2.css +1684 -0
  122. package/styles/drop-down-list/fluent2.scss +9 -0
  123. package/styles/drop-down-list/highcontrast-light.css +36 -2
  124. package/styles/drop-down-list/highcontrast.css +36 -2
  125. package/styles/drop-down-list/icons/_bootstrap5.3.scss +14 -0
  126. package/styles/drop-down-list/icons/_fluent2.scss +14 -0
  127. package/styles/drop-down-list/material-dark.css +58 -7
  128. package/styles/drop-down-list/material.css +72 -9
  129. package/styles/drop-down-list/material3-dark.css +74 -10
  130. package/styles/drop-down-list/material3.css +74 -10
  131. package/styles/drop-down-list/tailwind-dark.css +49 -6
  132. package/styles/drop-down-list/tailwind.css +49 -6
  133. package/styles/drop-down-tree/_bds-definition.scss +5 -0
  134. package/styles/drop-down-tree/_bootstrap4-definition.scss +1 -0
  135. package/styles/drop-down-tree/_bootstrap5-definition.scss +5 -0
  136. package/styles/drop-down-tree/_bootstrap5.3-definition.scss +66 -0
  137. package/styles/drop-down-tree/_fluent-definition.scss +4 -0
  138. package/styles/drop-down-tree/_fluent2-definition.scss +75 -0
  139. package/styles/drop-down-tree/_layout.scss +290 -327
  140. package/styles/drop-down-tree/_material3-definition.scss +3 -5
  141. package/styles/drop-down-tree/_tailwind-definition.scss +7 -2
  142. package/styles/drop-down-tree/_theme.scss +24 -41
  143. package/styles/drop-down-tree/bootstrap-dark.css +64 -29
  144. package/styles/drop-down-tree/bootstrap.css +64 -29
  145. package/styles/drop-down-tree/bootstrap4.css +65 -30
  146. package/styles/drop-down-tree/bootstrap5-dark.css +64 -27
  147. package/styles/drop-down-tree/bootstrap5.css +64 -27
  148. package/styles/drop-down-tree/fabric-dark.css +64 -29
  149. package/styles/drop-down-tree/fabric.css +64 -29
  150. package/styles/drop-down-tree/fluent-dark.css +72 -35
  151. package/styles/drop-down-tree/fluent.css +72 -35
  152. package/styles/drop-down-tree/fluent2.css +1733 -0
  153. package/styles/drop-down-tree/fluent2.scss +9 -0
  154. package/styles/drop-down-tree/highcontrast-light.css +64 -29
  155. package/styles/drop-down-tree/highcontrast.css +64 -23
  156. package/styles/drop-down-tree/icons/_bootstrap5.3.scss +11 -0
  157. package/styles/drop-down-tree/icons/_fluent2.scss +14 -0
  158. package/styles/drop-down-tree/material-dark.css +81 -43
  159. package/styles/drop-down-tree/material.css +98 -51
  160. package/styles/drop-down-tree/material3-dark.css +86 -32
  161. package/styles/drop-down-tree/material3.css +86 -32
  162. package/styles/drop-down-tree/tailwind-dark.css +73 -28
  163. package/styles/drop-down-tree/tailwind.css +73 -28
  164. package/styles/fabric-dark.css +195 -227
  165. package/styles/fabric-dark.scss +28 -8
  166. package/styles/fabric.css +195 -227
  167. package/styles/fabric.scss +28 -8
  168. package/styles/fluent-dark.css +207 -236
  169. package/styles/fluent-dark.scss +28 -8
  170. package/styles/fluent.css +207 -236
  171. package/styles/fluent.scss +28 -8
  172. package/styles/fluent2.css +4772 -0
  173. package/styles/fluent2.scss +28 -0
  174. package/styles/highcontrast-light.css +198 -227
  175. package/styles/highcontrast-light.scss +28 -8
  176. package/styles/highcontrast.css +198 -221
  177. package/styles/highcontrast.scss +28 -8
  178. package/styles/list-box/_bootstrap-dark-definition.scss +0 -2
  179. package/styles/list-box/_bootstrap5.3-definition.scss +120 -0
  180. package/styles/list-box/_fabric-dark-definition.scss +0 -2
  181. package/styles/list-box/_fluent2-definition.scss +121 -0
  182. package/styles/list-box/_highcontrast-light-definition.scss +0 -2
  183. package/styles/list-box/_layout.scss +65 -44
  184. package/styles/list-box/_material-dark-definition.scss +0 -2
  185. package/styles/list-box/_tailwind-definition.scss +1 -1
  186. package/styles/list-box/_theme.scss +36 -65
  187. package/styles/list-box/bootstrap-dark.css +72 -112
  188. package/styles/list-box/bootstrap.css +72 -112
  189. package/styles/list-box/bootstrap4.css +72 -112
  190. package/styles/list-box/bootstrap5-dark.css +72 -106
  191. package/styles/list-box/bootstrap5.css +72 -106
  192. package/styles/list-box/fabric-dark.css +72 -112
  193. package/styles/list-box/fabric.css +72 -112
  194. package/styles/list-box/fluent-dark.css +72 -112
  195. package/styles/list-box/fluent.css +72 -112
  196. package/styles/list-box/fluent2.css +2029 -0
  197. package/styles/list-box/fluent2.scss +5 -0
  198. package/styles/list-box/highcontrast-light.css +72 -112
  199. package/styles/list-box/highcontrast.css +72 -112
  200. package/styles/list-box/icons/_bootstrap5.3.scss +25 -0
  201. package/styles/list-box/icons/_fluent2.scss +25 -0
  202. package/styles/list-box/material-dark.css +72 -112
  203. package/styles/list-box/material.css +72 -112
  204. package/styles/list-box/material3-dark.css +73 -113
  205. package/styles/list-box/material3.css +73 -113
  206. package/styles/list-box/tailwind-dark.css +74 -114
  207. package/styles/list-box/tailwind.css +74 -114
  208. package/styles/material-dark.css +237 -260
  209. package/styles/material-dark.scss +28 -8
  210. package/styles/material.css +254 -284
  211. package/styles/material.scss +28 -8
  212. package/styles/material3-dark.css +254 -266
  213. package/styles/material3-dark.scss +28 -8
  214. package/styles/material3.css +254 -266
  215. package/styles/material3.scss +28 -8
  216. package/styles/mention/_bootstrap5.3-definition.scss +1 -0
  217. package/styles/mention/_fluent2-definition.scss +1 -0
  218. package/styles/mention/bootstrap-dark.css +24 -0
  219. package/styles/mention/bootstrap.css +24 -0
  220. package/styles/mention/bootstrap4.css +24 -0
  221. package/styles/mention/bootstrap5-dark.css +24 -0
  222. package/styles/mention/bootstrap5.css +24 -0
  223. package/styles/mention/fabric-dark.css +24 -0
  224. package/styles/mention/fabric.css +24 -0
  225. package/styles/mention/fluent-dark.css +24 -0
  226. package/styles/mention/fluent.css +24 -0
  227. package/styles/mention/fluent2.css +1130 -0
  228. package/styles/mention/fluent2.scss +6 -0
  229. package/styles/mention/highcontrast-light.css +24 -0
  230. package/styles/mention/highcontrast.css +24 -0
  231. package/styles/mention/material-dark.css +24 -0
  232. package/styles/mention/material.css +24 -0
  233. package/styles/mention/material3-dark.css +25 -1
  234. package/styles/mention/material3.css +25 -1
  235. package/styles/mention/tailwind-dark.css +24 -0
  236. package/styles/mention/tailwind.css +24 -0
  237. package/styles/multi-select/_bootstrap5.3-definition.scss +230 -0
  238. package/styles/multi-select/_fluent2-definition.scss +236 -0
  239. package/styles/multi-select/_layout.scss +32 -38
  240. package/styles/multi-select/_material3-definition.scss +0 -15
  241. package/styles/multi-select/_theme.scss +0 -4
  242. package/styles/multi-select/bootstrap-dark.css +67 -28
  243. package/styles/multi-select/bootstrap.css +67 -28
  244. package/styles/multi-select/bootstrap4.css +70 -29
  245. package/styles/multi-select/bootstrap5-dark.css +67 -28
  246. package/styles/multi-select/bootstrap5.css +67 -28
  247. package/styles/multi-select/fabric-dark.css +67 -28
  248. package/styles/multi-select/fabric.css +67 -28
  249. package/styles/multi-select/fluent-dark.css +69 -29
  250. package/styles/multi-select/fluent.css +69 -29
  251. package/styles/multi-select/fluent2.css +2663 -0
  252. package/styles/multi-select/fluent2.scss +9 -0
  253. package/styles/multi-select/highcontrast-light.css +70 -28
  254. package/styles/multi-select/highcontrast.css +70 -28
  255. package/styles/multi-select/icons/_bootstrap5.3.scss +26 -0
  256. package/styles/multi-select/icons/_fluent2.scss +692 -0
  257. package/styles/multi-select/material-dark.css +88 -32
  258. package/styles/multi-select/material.css +102 -34
  259. package/styles/multi-select/material3-dark.css +109 -35
  260. package/styles/multi-select/material3.css +109 -35
  261. package/styles/multi-select/tailwind-dark.css +67 -28
  262. package/styles/multi-select/tailwind.css +67 -28
  263. package/styles/tailwind-dark.css +218 -233
  264. package/styles/tailwind-dark.scss +28 -8
  265. package/styles/tailwind.css +218 -233
  266. package/styles/tailwind.scss +28 -8
  267. package/CHANGELOG.md +0 -2200
@@ -1,10 +1,10 @@
1
- import { Animation, Browser, ChildProperty, Complex, Component, Event, EventHandler, KeyboardEvents, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, Touch, addClass, append, attributes, classList, closest, compile, createElement, debounce, 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, JsonAdaptor, Predicate, Query } from '@syncfusion/ej2-data';
1
+ import { EventHandler, Touch, isNullOrUndefined, getValue, select, Browser, debounce, Property, ChildProperty, selectAll, compile, L10n, addClass, removeClass, extend, append, setStyleAttribute, prepend, rippleEffect, detach, Complex, Event, NotifyPropertyChanges, Component, classList, closest, KeyboardEvents, attributes, isUndefined, formatUnit, Animation, getUniqueID, remove, SanitizeHtmlHelper, setValue, matches as matches$1, createElement, getComponent } from '@syncfusion/ej2-base';
2
+ import { DataManager, Query, DataUtil, Predicate, JsonAdaptor } from '@syncfusion/ej2-data';
3
3
  import { ListBase, Sortable, cssClass, moveTo } from '@syncfusion/ej2-lists';
4
4
  import { Skeleton } from '@syncfusion/ej2-notifications';
5
- import { Popup, createSpinner, getZindexPartial, hideSpinner, isCollide, showSpinner } from '@syncfusion/ej2-popups';
5
+ import { hideSpinner, createSpinner, showSpinner, isCollide, Popup, getZindexPartial } from '@syncfusion/ej2-popups';
6
6
  import { Input, TextBox } from '@syncfusion/ej2-inputs';
7
- import { Button, createCheckBox } from '@syncfusion/ej2-buttons';
7
+ import { createCheckBox, Button } from '@syncfusion/ej2-buttons';
8
8
  import { TreeView } from '@syncfusion/ej2-navigations';
9
9
 
10
10
  /**
@@ -13,7 +13,7 @@ import { TreeView } from '@syncfusion/ej2-navigations';
13
13
  var queryString = '';
14
14
  var prevString = '';
15
15
  var tempQueryString = '';
16
- var matches$1 = [];
16
+ var matches = [];
17
17
  var activeClass = 'e-active';
18
18
  var prevElementId = '';
19
19
  /**
@@ -56,21 +56,21 @@ function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId,
56
56
  var index;
57
57
  queryString = ignoreCase ? queryString.toLowerCase() : queryString;
58
58
  if (prevElementId === elementId && prevString === queryString && !refresh) {
59
- for (var i = 0; i < matches$1.length; i++) {
60
- if (matches$1[i].classList.contains(activeClass)) {
59
+ for (var i = 0; i < matches.length; i++) {
60
+ if (matches[i].classList.contains(activeClass)) {
61
61
  index = i;
62
62
  break;
63
63
  }
64
- if (currentValue && matches$1[i].textContent.toLowerCase() === currentValue.toLowerCase()) {
64
+ if (currentValue && matches[i].textContent.toLowerCase() === currentValue.toLowerCase()) {
65
65
  index = i;
66
66
  break;
67
67
  }
68
68
  }
69
69
  index = index + 1;
70
70
  if (isVirtual) {
71
- return matches$1[index] && matches$1.length - 1 != index ? matches$1[index] : matches$1[matches$1.length];
71
+ return matches[index] && matches.length - 1 != index ? matches[index] : matches[matches.length];
72
72
  }
73
- return matches$1[index] ? matches$1[index] : matches$1[0];
73
+ return matches[index] ? matches[index] : matches[0];
74
74
  }
75
75
  else {
76
76
  var listItems = items;
@@ -79,7 +79,7 @@ function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId,
79
79
  var item = void 0;
80
80
  selectedIndex = selectedIndex ? selectedIndex + 1 : 0;
81
81
  var i = selectedIndex;
82
- matches$1 = [];
82
+ matches = [];
83
83
  do {
84
84
  if (i === listItems.length) {
85
85
  i = -1;
@@ -93,7 +93,7 @@ function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId,
93
93
  item = listItems[index];
94
94
  text = ignoreCase ? item.innerText.toLowerCase() : item.innerText;
95
95
  if (text.substr(0, strLength) === queryString) {
96
- matches$1.push(listItems[index]);
96
+ matches.push(listItems[index]);
97
97
  }
98
98
  i++;
99
99
  } while (i !== selectedIndex);
@@ -101,8 +101,8 @@ function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId,
101
101
  prevElementId = elementId;
102
102
  if (isVirtual) {
103
103
  var indexUpdated = false;
104
- for (var i_1 = 0; i_1 < matches$1.length; i_1++) {
105
- if (currentValue && matches$1[i_1].textContent.toLowerCase() === currentValue.toLowerCase()) {
104
+ for (var i_1 = 0; i_1 < matches.length; i_1++) {
105
+ if (currentValue && matches[i_1].textContent.toLowerCase() === currentValue.toLowerCase()) {
106
106
  index = i_1;
107
107
  indexUpdated = true;
108
108
  break;
@@ -111,9 +111,9 @@ function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId,
111
111
  if (currentValue && indexUpdated) {
112
112
  index = index + 1;
113
113
  }
114
- return matches$1[index] ? matches$1[index] : matches$1[0];
114
+ return matches[index] ? matches[index] : matches[0];
115
115
  }
116
- return matches$1[0];
116
+ return matches[0];
117
117
  }
118
118
  }
119
119
  /**
@@ -176,7 +176,7 @@ function resetIncrementalSearchValues(elementId) {
176
176
  prevElementId = '';
177
177
  prevString = '';
178
178
  queryString = '';
179
- matches$1 = [];
179
+ matches = [];
180
180
  }
181
181
  }
182
182
 
@@ -555,6 +555,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
555
555
  this.parent.updatevirtualizationList();
556
556
  }
557
557
  this.parent.getSkeletonCount();
558
+ this.parent.skeletonCount = this.parent.totalItemCount != 0 && this.parent.totalItemCount < (this.parent.itemCount * 2) ? 0 : this.parent.skeletonCount;
558
559
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
559
560
  var virtualTrackElement = this.parent.list.getElementsByClassName('e-virtual-ddl')[0];
560
561
  if (virtualTrackElement) {
@@ -790,10 +791,6 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
790
791
  return VirtualScroll;
791
792
  }());
792
793
 
793
- /**
794
- * Common source
795
- */
796
-
797
794
  var __extends = (undefined && undefined.__extends) || (function () {
798
795
  var extendStatics = function (d, b) {
799
796
  extendStatics = Object.setPrototypeOf ||
@@ -833,6 +830,9 @@ var FieldSettings = /** @__PURE__ @class */ (function (_super) {
833
830
  __decorate([
834
831
  Property()
835
832
  ], FieldSettings.prototype, "htmlAttributes", void 0);
833
+ __decorate([
834
+ Property()
835
+ ], FieldSettings.prototype, "disabled", void 0);
836
836
  return FieldSettings;
837
837
  }(ChildProperty));
838
838
  var dropDownBaseClasses = {
@@ -875,7 +875,6 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
875
875
  function DropDownBase(options, element) {
876
876
  var _this = _super.call(this, options, element) || this;
877
877
  _this.preventChange = false;
878
- _this.isAngular = false;
879
878
  _this.isPreventChange = false;
880
879
  _this.isDynamicDataChange = false;
881
880
  _this.addedNewItem = false;
@@ -1086,7 +1085,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1086
1085
  };
1087
1086
  DropDownBase.prototype.l10nUpdate = function (actionFailure) {
1088
1087
  var ele = this.getModuleName() === 'listbox' ? this.ulElement : this.list;
1089
- if (this.noRecordsTemplate !== 'No records found' || this.actionFailureTemplate !== 'Request failed') {
1088
+ if ((!isNullOrUndefined(this.noRecordsTemplate) && this.noRecordsTemplate !== 'No records found') || this.actionFailureTemplate !== 'Request failed') {
1090
1089
  var template = actionFailure ? this.actionFailureTemplate : this.noRecordsTemplate;
1091
1090
  var compiledString = void 0;
1092
1091
  var templateId = actionFailure ? this.actionFailureTemplateId : this.noRecordsTemplateId;
@@ -1248,7 +1247,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1248
1247
  DropDownBase.prototype.getTransformValues = function () {
1249
1248
  var translateY = this.viewPortInfo.startIndex * this.listItemHeight;
1250
1249
  translateY = translateY - (this.skeletonCount * this.listItemHeight);
1251
- translateY = this.viewPortInfo.startIndex === 0 && this.listData && this.listData.length === 0 ? 0 : translateY;
1250
+ translateY = ((this.viewPortInfo.startIndex === 0 && this.listData && this.listData.length === 0) || this.skeletonCount === 0) ? 0 : translateY;
1252
1251
  var styleText = "transform: translate(0px, " + translateY + "px);";
1253
1252
  return styleText;
1254
1253
  };
@@ -1393,17 +1392,18 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1393
1392
  }
1394
1393
  element.querySelectorAll('select>option');
1395
1394
  }
1396
- this.updateFields(fields.text, fields.value, this.fields.groupBy, this.fields.htmlAttributes, this.fields.iconCss);
1395
+ this.updateFields(fields.text, fields.value, this.fields.groupBy, this.fields.htmlAttributes, this.fields.iconCss, this.fields.disabled);
1397
1396
  this.resetList(jsonElement, fields);
1398
1397
  };
1399
- DropDownBase.prototype.updateFields = function (text, value, groupBy, htmlAttributes, iconCss) {
1398
+ DropDownBase.prototype.updateFields = function (text, value, groupBy, htmlAttributes, iconCss, disabled) {
1400
1399
  var field = {
1401
1400
  'fields': {
1402
1401
  text: text,
1403
1402
  value: value,
1404
1403
  groupBy: !isNullOrUndefined(groupBy) ? groupBy : this.fields && this.fields.groupBy,
1405
1404
  htmlAttributes: !isNullOrUndefined(htmlAttributes) ? htmlAttributes : this.fields && this.fields.htmlAttributes,
1406
- iconCss: !isNullOrUndefined(iconCss) ? iconCss : this.fields && this.fields.iconCss
1405
+ iconCss: !isNullOrUndefined(iconCss) ? iconCss : this.fields && this.fields.iconCss,
1406
+ disabled: !isNullOrUndefined(disabled) ? disabled : this.fields && this.fields.disabled
1407
1407
  }
1408
1408
  };
1409
1409
  this.setProperties(field, true);
@@ -1774,8 +1774,16 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1774
1774
  };
1775
1775
  /* eslint-disable @typescript-eslint/no-unused-vars */
1776
1776
  DropDownBase.prototype.postRender = function (listElement, list, bindEvent) {
1777
+ if (this.fields.disabled) {
1778
+ var liCollections = listElement.querySelectorAll('.' + dropDownBaseClasses.li);
1779
+ for (var index = 0; index < liCollections.length; index++) {
1780
+ if (JSON.parse(JSON.stringify(this.listData[index]))[this.fields.disabled]) {
1781
+ this.disableListItem(liCollections[index]);
1782
+ }
1783
+ }
1784
+ }
1777
1785
  /* eslint-enable @typescript-eslint/no-unused-vars */
1778
- var focusItem = listElement.querySelector('.' + dropDownBaseClasses.li);
1786
+ var focusItem = this.fields.disabled ? listElement.querySelector('.' + dropDownBaseClasses.li + ':not(.e-disabled') : listElement.querySelector('.' + dropDownBaseClasses.li);
1779
1787
  var selectedItem = listElement.querySelector('.' + dropDownBaseClasses.selected);
1780
1788
  if (focusItem && !selectedItem) {
1781
1789
  focusItem.classList.add(dropDownBaseClasses.focus);
@@ -1910,9 +1918,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1910
1918
  break;
1911
1919
  }
1912
1920
  if (isDownkey) {
1913
- if ((!isNullOrUndefined(liCollections[index]) && liCollections[index].classList.contains(dropDownBaseClasses.selected) && this.getModuleName() !== 'autocomplete') || (!isNullOrUndefined(liCollections[index]) && liCollections[index].classList.contains(dropDownBaseClasses.focus) && this.getModuleName() === 'autocomplete')) {
1914
-
1915
- }
1921
+ if ((!isNullOrUndefined(liCollections[index]) && liCollections[index].classList.contains(dropDownBaseClasses.selected) && this.getModuleName() !== 'autocomplete') || (!isNullOrUndefined(liCollections[index]) && liCollections[index].classList.contains(dropDownBaseClasses.focus) && this.getModuleName() === 'autocomplete')) ;
1916
1922
  }
1917
1923
  }
1918
1924
  else {
@@ -2123,7 +2129,13 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
2123
2129
  */
2124
2130
  DropDownBase.prototype.getIndexByValue = function (value) {
2125
2131
  var index;
2126
- var listItems = this.getItems();
2132
+ var listItems = [];
2133
+ if (this.fields.disabled && this.getModuleName() === 'multiselect' && this.liCollections) {
2134
+ listItems = this.liCollections;
2135
+ }
2136
+ else {
2137
+ listItems = this.getItems();
2138
+ }
2127
2139
  for (var i = 0; i < listItems.length; i++) {
2128
2140
  if (!isNullOrUndefined(value) && listItems[i].getAttribute('data-value') === value.toString()) {
2129
2141
  index = i;
@@ -2412,6 +2424,9 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
2412
2424
  this.notify('addItem', { module: 'CheckBoxSelection', item: li });
2413
2425
  liCollections.push(li);
2414
2426
  if (this.getModuleName() === 'listbox') {
2427
+ if (item.disabled) {
2428
+ li.classList.add('e-disabled');
2429
+ }
2415
2430
  this.listData.splice(isListboxEmpty ? this.listData.length : index, 0, item);
2416
2431
  if (this.listData.length !== this.sortedData.length) {
2417
2432
  this.sortedData = this.listData;
@@ -2497,18 +2512,53 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
2497
2512
  }
2498
2513
  this.addedNewItem = true;
2499
2514
  };
2515
+ /**
2516
+ * Checks if the given HTML element is disabled.
2517
+ *
2518
+ * @param {HTMLElement} li - The HTML element to check.
2519
+ * @returns {boolean} - Returns true if the element is disabled, otherwise false.
2520
+ */
2521
+ DropDownBase.prototype.isDisabledElement = function (li) {
2522
+ if (li && li.classList.contains('e-disabled')) {
2523
+ return true;
2524
+ }
2525
+ return false;
2526
+ };
2527
+ /**
2528
+ * Checks whether the list item at the specified index is disabled.
2529
+ *
2530
+ * @param {number} index - The index of the list item to check.
2531
+ * @returns {boolean} True if the list item is disabled, false otherwise.
2532
+ */
2533
+ DropDownBase.prototype.isDisabledItemByIndex = function (index) {
2534
+ if (this.fields.disabled && this.liCollections) {
2535
+ return this.isDisabledElement(this.liCollections[index]);
2536
+ }
2537
+ return false;
2538
+ };
2539
+ /**
2540
+ * Disables the given list item.
2541
+ *
2542
+ * @param { HTMLLIElement } li - The list item to disable.
2543
+ * @returns {void}
2544
+ */
2545
+ DropDownBase.prototype.disableListItem = function (li) {
2546
+ li.classList.add('e-disabled');
2547
+ li.setAttribute('aria-disabled', 'true');
2548
+ li.setAttribute('aria-selected', 'false');
2549
+ };
2500
2550
  DropDownBase.prototype.validationAttribute = function (target, hidden) {
2501
2551
  var name = target.getAttribute('name') ? target.getAttribute('name') : target.getAttribute('id');
2502
2552
  hidden.setAttribute('name', name);
2503
2553
  target.removeAttribute('name');
2504
- var attributes$$1 = ['required', 'aria-required', 'form'];
2505
- for (var i = 0; i < attributes$$1.length; i++) {
2506
- if (!target.getAttribute(attributes$$1[i])) {
2554
+ var attributes = ['required', 'aria-required', 'form'];
2555
+ for (var i = 0; i < attributes.length; i++) {
2556
+ if (!target.getAttribute(attributes[i])) {
2507
2557
  continue;
2508
2558
  }
2509
- var attr = target.getAttribute(attributes$$1[i]);
2510
- hidden.setAttribute(attributes$$1[i], attr);
2511
- target.removeAttribute(attributes$$1[i]);
2559
+ var attr = target.getAttribute(attributes[i]);
2560
+ hidden.setAttribute(attributes[i], attr);
2561
+ target.removeAttribute(attributes[i]);
2512
2562
  }
2513
2563
  };
2514
2564
  DropDownBase.prototype.setZIndex = function () {
@@ -2580,7 +2630,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
2580
2630
  _super.prototype.destroy.call(this);
2581
2631
  };
2582
2632
  __decorate([
2583
- Complex({ text: null, value: null, iconCss: null, groupBy: null }, FieldSettings)
2633
+ Complex({ text: null, value: null, iconCss: null, groupBy: null, disabled: null }, FieldSettings)
2584
2634
  ], DropDownBase.prototype, "fields", void 0);
2585
2635
  __decorate([
2586
2636
  Property(null)
@@ -2645,10 +2695,6 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
2645
2695
  return DropDownBase;
2646
2696
  }(Component));
2647
2697
 
2648
- /**
2649
- * export all modules from current location
2650
- */
2651
-
2652
2698
  var __extends$1 = (undefined && undefined.__extends) || (function () {
2653
2699
  var extendStatics = function (d, b) {
2654
2700
  extendStatics = Object.setPrototypeOf ||
@@ -2668,8 +2714,6 @@ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators,
2668
2714
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2669
2715
  return c > 3 && r && Object.defineProperty(target, key, r), r;
2670
2716
  };
2671
- // eslint-disable-next-line @typescript-eslint/triple-slash-reference
2672
- /// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>
2673
2717
  // don't use space in classnames
2674
2718
  var dropDownListClasses = {
2675
2719
  root: 'e-dropdownlist',
@@ -2729,17 +2773,10 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2729
2773
  var _this = _super.call(this, options, element) || this;
2730
2774
  _this.isListSearched = false;
2731
2775
  _this.preventChange = false;
2732
- _this.isAngular = false;
2733
2776
  _this.isTouched = false;
2734
2777
  _this.IsScrollerAtEnd = function () {
2735
2778
  return this.list && this.list.scrollTop + this.list.clientHeight >= this.list.scrollHeight;
2736
2779
  };
2737
- _this.removeAllChildren = function (element) {
2738
- while (element.children[0]) {
2739
- this.removeAllChildren(element.children[0]);
2740
- element.removeChild(element.children[0]);
2741
- }
2742
- };
2743
2780
  return _this;
2744
2781
  }
2745
2782
  /**
@@ -2860,7 +2897,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2860
2897
  this.removeFocus();
2861
2898
  this.list.scrollTop = 0;
2862
2899
  if (this.getModuleName() !== 'autocomplete' && !isNullOrUndefined(this.ulElement)) {
2863
- var li = this.ulElement.querySelector('.' + dropDownListClasses.li);
2900
+ var li = this.fields.disabled ? this.ulElement.querySelector('.' + dropDownListClasses.li + ':not(.e-disabled)') : this.ulElement.querySelector('.' + dropDownListClasses.li);
2864
2901
  if (this.enableVirtualization) {
2865
2902
  li = this.liCollections[this.skeletonCount];
2866
2903
  }
@@ -3065,7 +3102,32 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3065
3102
  this.updateValues();
3066
3103
  }
3067
3104
  };
3105
+ /**
3106
+ * Checks if the given value is disabled.
3107
+ *
3108
+ * @param { string | number | boolean | object } value - The value to check for disablement. Can be a string, number, boolean, or object.
3109
+ * @returns { boolean } A boolean indicating whether the value is disabled.
3110
+ */
3111
+ DropDownList.prototype.isDisableItemValue = function (value) {
3112
+ if (typeof (value) === 'object') {
3113
+ var objectValue = JSON.parse(JSON.stringify(value))[this.fields.value];
3114
+ return this.isDisabledItemByIndex(this.getIndexByValue(objectValue));
3115
+ }
3116
+ return this.isDisabledItemByIndex(this.getIndexByValue(value));
3117
+ };
3068
3118
  DropDownList.prototype.updateValues = function () {
3119
+ if (this.fields.disabled) {
3120
+ if (this.value != null) {
3121
+ this.value = !this.isDisableItemValue(this.value) ? this.value : null;
3122
+ }
3123
+ if (this.text != null) {
3124
+ this.text = !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
3125
+ }
3126
+ if (this.index != null) {
3127
+ this.index = !this.isDisabledItemByIndex(this.index) ? this.index : null;
3128
+ this.activeIndex = this.index;
3129
+ }
3130
+ }
3069
3131
  this.selectedValueInfo = this.viewPortInfo;
3070
3132
  if (!isNullOrUndefined(this.value)) {
3071
3133
  var value = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue(((this.fields.value) ? this.fields.value : ''), this.value) : this.value;
@@ -3258,7 +3320,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3258
3320
  var target = e.target;
3259
3321
  this.keyboardEvent = null;
3260
3322
  var li = closest(target, '.' + dropDownBaseClasses.li);
3261
- if (!this.isValidLI(li)) {
3323
+ if (!this.isValidLI(li) || this.isDisabledElement(li)) {
3262
3324
  return;
3263
3325
  }
3264
3326
  this.setSelection(li, e);
@@ -3402,7 +3464,14 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3402
3464
  }
3403
3465
  }
3404
3466
  else {
3405
- var li = incrementalSearch(e.charCode, this.liCollections, this.activeIndex, true, this.element.id);
3467
+ var li = void 0;
3468
+ if (this.fields.disabled) {
3469
+ var enableLiCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li + ':not(.e-disabled)');
3470
+ li = incrementalSearch(e.charCode, enableLiCollections, this.activeIndex, true, this.element.id);
3471
+ }
3472
+ else {
3473
+ li = incrementalSearch(e.charCode, this.liCollections, this.activeIndex, true, this.element.id);
3474
+ }
3406
3475
  if (!isNullOrUndefined(li)) {
3407
3476
  this.setSelection(li, e);
3408
3477
  this.setScrollPosition();
@@ -3532,6 +3601,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3532
3601
  }
3533
3602
  };
3534
3603
  DropDownList.prototype.updateUpDownAction = function (e, isVirtualKeyAction) {
3604
+ if (this.fields.disabled && this.list && this.list.querySelectorAll('.e-list-item:not(.e-disabled)').length === 0) {
3605
+ return;
3606
+ }
3535
3607
  if (this.allowFiltering && !this.enableVirtualization && this.getModuleName() !== 'autocomplete') {
3536
3608
  var value_1 = this.getItemData().value;
3537
3609
  if (isNullOrUndefined(value_1)) {
@@ -3642,6 +3714,25 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3642
3714
  attributes(this.filterInput, { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-active')[0].id });
3643
3715
  }
3644
3716
  }
3717
+ var itemIndex;
3718
+ for (var index = 0; index < this.liCollections.length; index++) {
3719
+ if (this.liCollections[index].classList.contains(dropDownListClasses.focus)
3720
+ || this.liCollections[index].classList.contains(dropDownListClasses.selected)) {
3721
+ itemIndex = index;
3722
+ break;
3723
+ }
3724
+ }
3725
+ if (itemIndex != null && this.isDisabledElement(this.liCollections[itemIndex])) {
3726
+ if (this.getModuleName() !== 'autocomplete') {
3727
+ if (this.liCollections.length - 1 === itemIndex && e.action === 'down') {
3728
+ e.action = 'up';
3729
+ }
3730
+ if (itemIndex === 0 && e.action === 'up') {
3731
+ e.action = 'down';
3732
+ }
3733
+ }
3734
+ this.updateUpDownAction(e);
3735
+ }
3645
3736
  e.preventDefault();
3646
3737
  };
3647
3738
  DropDownList.prototype.updateHomeEndAction = function (e, isVirtualKeyAction) {
@@ -3742,6 +3833,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3742
3833
  DropDownList.prototype.selectCurrentItem = function (e) {
3743
3834
  if (this.isPopupOpen) {
3744
3835
  var li = this.list.querySelector('.' + dropDownListClasses.focus);
3836
+ if (this.isDisabledElement(li)) {
3837
+ return;
3838
+ }
3745
3839
  if (li) {
3746
3840
  this.setSelection(li, e);
3747
3841
  this.isTyped = false;
@@ -5229,7 +5323,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
5229
5323
  var elementRect = element.getBoundingClientRect();
5230
5324
  return (elementRect.top >= 0 && elementRect.left >= 0 && elementRect.bottom <= window.innerHeight && elementRect.right <= window.innerWidth);
5231
5325
  };
5232
-
5233
5326
  DropDownList.prototype.setSearchBoxPosition = function () {
5234
5327
  var searchBoxHeight = this.filterInput.parentElement.getBoundingClientRect().height;
5235
5328
  this.popupObj.element.style.maxHeight = '100%';
@@ -5349,7 +5442,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
5349
5442
  this.list.scrollTop = this.virtualListInfo && this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight : 0;
5350
5443
  }
5351
5444
  isScrollerCHanged = this.isKeyBoardAction;
5352
-
5353
5445
  }
5354
5446
  this.isKeyBoardAction = isScrollerCHanged;
5355
5447
  if (this.enableVirtualization && this.fields.groupBy && this.fixedHeaderElement && (keyAction == "down")) {
@@ -6002,6 +6094,10 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6002
6094
  this_1.setEnable();
6003
6095
  break;
6004
6096
  case 'text':
6097
+ if (this_1.fields.disabled) {
6098
+ newProp.text = newProp.text && !this_1.isDisabledItemByIndex(this_1.getIndexByValue(this_1.getValueByText(newProp.text)))
6099
+ ? newProp.text : null;
6100
+ }
6005
6101
  if (newProp.text === null) {
6006
6102
  this_1.clearAll();
6007
6103
  break;
@@ -6053,6 +6149,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6053
6149
  }
6054
6150
  break;
6055
6151
  case 'value':
6152
+ if (this_1.fields.disabled) {
6153
+ newProp.value = newProp.value != null && !this_1.isDisableItemValue(newProp.value) ? newProp.value : null;
6154
+ }
6056
6155
  if (newProp.value === null) {
6057
6156
  this_1.clearAll();
6058
6157
  break;
@@ -6112,6 +6211,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6112
6211
  }
6113
6212
  break;
6114
6213
  case 'index':
6214
+ if (this_1.fields.disabled) {
6215
+ newProp.index = newProp.index != null && !this_1.isDisabledItemByIndex(newProp.index) ? newProp.index : null;
6216
+ }
6115
6217
  if (newProp.index === null) {
6116
6218
  this_1.clearAll();
6117
6219
  break;
@@ -6429,6 +6531,65 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6429
6531
  Input.calculateWidth(this.inputElement, this.inputWrapper.container);
6430
6532
  }
6431
6533
  };
6534
+ /**
6535
+ * Method to disable specific item in the popup.
6536
+ *
6537
+ * @param {string | number | object | HTMLLIElement} item - Specifies the item to be disabled.
6538
+ * @returns {void}
6539
+ * @deprecated
6540
+ */
6541
+ DropDownList.prototype.disableItem = function (item) {
6542
+ if (this.fields.disabled) {
6543
+ if (!this.list) {
6544
+ this.renderList();
6545
+ }
6546
+ var itemIndex = -1;
6547
+ if (this.liCollections && this.liCollections.length > 0 && this.listData && this.fields.disabled) {
6548
+ if (typeof (item) === 'string') {
6549
+ itemIndex = this.getIndexByValue(item);
6550
+ }
6551
+ else if (typeof item === 'object') {
6552
+ if (item instanceof HTMLLIElement) {
6553
+ for (var index = 0; index < this.liCollections.length; index++) {
6554
+ if (this.liCollections[index] === item) {
6555
+ itemIndex = this.getIndexByValue(item.getAttribute('data-value'));
6556
+ break;
6557
+ }
6558
+ }
6559
+ }
6560
+ else {
6561
+ var value = JSON.parse(JSON.stringify(item))[this.fields.value];
6562
+ for (var index = 0; index < this.listData.length; index++) {
6563
+ if (JSON.parse(JSON.stringify(this.listData[index]))[this.fields.value] === value) {
6564
+ itemIndex = this.getIndexByValue(value);
6565
+ break;
6566
+ }
6567
+ }
6568
+ }
6569
+ }
6570
+ else {
6571
+ itemIndex = item;
6572
+ }
6573
+ var isValidIndex = itemIndex < this.liCollections.length && itemIndex > -1;
6574
+ if (isValidIndex && !(JSON.parse(JSON.stringify(this.listData[itemIndex]))[this.fields.disabled])) {
6575
+ var li = this.liCollections[itemIndex];
6576
+ if (li) {
6577
+ this.disableListItem(li);
6578
+ var parsedData = JSON.parse(JSON.stringify(this.listData[itemIndex]));
6579
+ parsedData[this.fields.disabled] = true;
6580
+ this.listData[itemIndex] = parsedData;
6581
+ this.dataSource = this.listData;
6582
+ if (li.classList.contains(dropDownListClasses.focus)) {
6583
+ this.removeFocus();
6584
+ }
6585
+ if (li.classList.contains(dropDownListClasses.selected)) {
6586
+ this.clear();
6587
+ }
6588
+ }
6589
+ }
6590
+ }
6591
+ }
6592
+ };
6432
6593
  /**
6433
6594
  * Removes the component from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.
6434
6595
  *
@@ -6478,9 +6639,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6478
6639
  delete this.hiddenElement;
6479
6640
  this.filterInput = null;
6480
6641
  this.keyboardModule = null;
6481
- if (!isNullOrUndefined(this.ulElement)) {
6482
- this.removeAllChildren(this.ulElement);
6483
- }
6484
6642
  this.ulElement = null;
6485
6643
  this.list = null;
6486
6644
  this.clearIconElement = null;
@@ -6638,10 +6796,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6638
6796
  return DropDownList;
6639
6797
  }(DropDownBase));
6640
6798
 
6641
- /**
6642
- * export all modules from current location
6643
- */
6644
-
6645
6799
  var __extends$2 = (undefined && undefined.__extends) || (function () {
6646
6800
  var extendStatics = function (d, b) {
6647
6801
  extendStatics = Object.setPrototypeOf ||
@@ -7046,7 +7200,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7046
7200
  if (args.text === '') {
7047
7201
  _this.isFilteredData = false;
7048
7202
  _this.isFilterRestore = true;
7049
- _this.isFromFilterChange = false;
7050
7203
  fields = _this.cloneFields(_this.fields);
7051
7204
  }
7052
7205
  else if (args.preventDefaultAction) {
@@ -7131,8 +7284,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7131
7284
  DropDownTree.prototype.nestedFilter = function (value, filteredFields) {
7132
7285
  var matchedDataSource = [];
7133
7286
  for (var i = 0; i < this.treeData.length; i++) {
7134
- // eslint-disable-next-line
7135
- var filteredChild = this.nestedChildFilter(value, this.treeData[i]);
7287
+ var filteredChild = this.nestedChildFilter(value, this.treeData[parseInt(i.toString(), 10)]);
7136
7288
  if (!isNullOrUndefined(filteredChild)) {
7137
7289
  matchedDataSource.push(filteredChild);
7138
7290
  }
@@ -7148,8 +7300,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7148
7300
  else {
7149
7301
  var matchedChildren = [];
7150
7302
  for (var i = 0; i < children.length; i++) {
7151
- // eslint-disable-next-line
7152
- var filteredChild = this.nestedChildFilter(value, children[i]);
7303
+ var filteredChild = this.nestedChildFilter(value, children[parseInt(i.toString(), 10)]);
7153
7304
  if (!isNullOrUndefined(filteredChild)) {
7154
7305
  matchedChildren.push(filteredChild);
7155
7306
  }
@@ -7176,13 +7327,11 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7176
7327
  for (var i = 0; i < matchedData.length; i++) {
7177
7328
  if (matchedDataSource.indexOf(matchedData[i]) === -1) {
7178
7329
  matchedDataSource.push(matchedData[i]);
7179
- // eslint-disable-next-line
7180
- var parentId = matchedData[i][this.fields.parentValue];
7330
+ var parentId = matchedData[parseInt(i.toString(), 10)][this.fields.parentValue];
7181
7331
  while (!isNullOrUndefined(parentId)) {
7182
7332
  var parent_1 = null;
7183
7333
  for (var j = 0; j < this.treeData.length; j++) {
7184
- // eslint-disable-next-line
7185
- var value_1 = this.treeData[j][this.fields.value];
7334
+ var value_1 = this.treeData[parseInt(j.toString(), 10)][this.fields.value];
7186
7335
  if (!isNullOrUndefined(value_1) && (value_1 === parentId)) {
7187
7336
  parent_1 = this.treeData[j];
7188
7337
  break;
@@ -7276,6 +7425,11 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7276
7425
  if (formElement) {
7277
7426
  EventHandler.remove(formElement, 'reset', this.resetValueHandler);
7278
7427
  }
7428
+ this.keyboardModule.destroy();
7429
+ if (this.showSelectAll && this.checkAllParent) {
7430
+ EventHandler.remove(this.checkAllParent, 'mouseup', this.clickHandler);
7431
+ }
7432
+ EventHandler.remove(document, 'mousedown', this.onDocumentClick);
7279
7433
  };
7280
7434
  /* Trigger when the dropdown is clicked */
7281
7435
  DropDownTree.prototype.dropDownClick = function (e) {
@@ -7480,24 +7634,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7480
7634
  _this.selectAll(true);
7481
7635
  }
7482
7636
  break;
7483
- case 'moveRight':
7484
- case 'moveLeft':
7485
- case 'shiftDown':
7486
- case 'moveDown':
7487
- case 'ctrlDown':
7488
- case 'csDown':
7489
- case 'shiftUp':
7490
- case 'moveUp':
7491
- case 'ctrlUp':
7492
- case 'csUp':
7493
- case 'home':
7494
- case 'shiftHome':
7495
- case 'ctrlHome':
7496
- case 'csHome':
7497
- case 'end':
7498
- case 'shiftEnd':
7499
- case 'ctrlEnd':
7500
- case 'csEnd':
7501
7637
  }
7502
7638
  }
7503
7639
  else {
@@ -7550,6 +7686,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7550
7686
  cancel: false,
7551
7687
  event: e
7552
7688
  };
7689
+ var focusedElement;
7553
7690
  this.trigger('keyPress', eventArgs, function (observedArgs) {
7554
7691
  if (!observedArgs.cancel) {
7555
7692
  switch (e.action) {
@@ -7557,9 +7694,10 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7557
7694
  _this.clickHandler(e);
7558
7695
  break;
7559
7696
  case 'moveDown':
7560
- var focusedElement = _this.treeObj.element.querySelector('li');
7697
+ focusedElement = _this.treeObj.element.querySelector('li');
7561
7698
  focusedElement.focus();
7562
7699
  addClass([focusedElement], ['e-node-focus']);
7700
+ break;
7563
7701
  }
7564
7702
  }
7565
7703
  });
@@ -7718,8 +7856,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7718
7856
  return remainElement;
7719
7857
  };
7720
7858
  DropDownTree.prototype.getOverflowVal = function (index) {
7721
- // eslint-disable-next-line
7722
- var selectedData = this.getSelectedData(this.value[index]);
7859
+ var selectedData = this.getSelectedData(this.value[parseInt(index.toString(), 10)]);
7723
7860
  return getValue(this.treeSettings.loadOnDemand ? this.fields.text : 'text', selectedData);
7724
7861
  };
7725
7862
  DropDownTree.prototype.updateDelimMode = function () {
@@ -7765,12 +7902,12 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7765
7902
  var name = this.inputEle.getAttribute('name') ? this.inputEle.getAttribute('name') : this.inputEle.getAttribute('id');
7766
7903
  this.hiddenElement.setAttribute('name', name);
7767
7904
  this.inputEle.removeAttribute('name');
7768
- var attributes$$1 = ['required', 'aria-required', 'form'];
7769
- for (var i = 0; i < attributes$$1.length; i++) {
7770
- var attr = this.inputEle.getAttribute(attributes$$1[i]);
7905
+ var attributes = ['required', 'aria-required', 'form'];
7906
+ for (var i = 0; i < attributes.length; i++) {
7907
+ var attr = this.inputEle.getAttribute(attributes[i]);
7771
7908
  if (attr) {
7772
- this.hiddenElement.setAttribute(attributes$$1[i], attr);
7773
- this.inputEle.removeAttribute(attributes$$1[i]);
7909
+ this.hiddenElement.setAttribute(attributes[i], attr);
7910
+ this.inputEle.removeAttribute(attributes[i]);
7774
7911
  }
7775
7912
  }
7776
7913
  };
@@ -8083,6 +8220,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8083
8220
  }
8084
8221
  this.currentText = this.text;
8085
8222
  this.currentValue = this.value;
8223
+ if (!isNullOrUndefined(this.value) && this.value.length > 0 && !isNullOrUndefined(this.currentText)) {
8224
+ this.inputWrapper.setAttribute('aria-label', this.currentText.split(',').join(' '));
8225
+ }
8086
8226
  if (this.isInitialized) {
8087
8227
  this.triggerChangeEvent();
8088
8228
  }
@@ -8091,8 +8231,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8091
8231
  var data;
8092
8232
  if (this.treeDataType === 1) {
8093
8233
  for (var i = 0; i < this.treeItems.length; i++) {
8094
- // eslint-disable-next-line
8095
- var text = getValue(this.fields.text, this.treeItems[i]);
8234
+ var text = getValue(this.fields.text, this.treeItems[parseInt(i.toString(), 10)]);
8096
8235
  if (!isNullOrUndefined(this.treeItems[i]) && !isNullOrUndefined(text) && text === givenText) {
8097
8236
  data = this.treeItems[i];
8098
8237
  break;
@@ -8107,14 +8246,12 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8107
8246
  DropDownTree.prototype.getNestedItems = function (data, field, givenText) {
8108
8247
  var newData;
8109
8248
  for (var i = 0, objlen = data.length; i < objlen; i++) {
8110
- // eslint-disable-next-line
8111
- var dataId = getValue(this.fields.text, data[i]);
8249
+ var dataId = getValue(this.fields.text, data[parseInt(i.toString(), 10)]);
8112
8250
  if (data[i] && dataId && dataId.toString() === givenText) {
8113
8251
  return data[i];
8114
8252
  }
8115
8253
  else if (typeof field.child === 'string' && !isNullOrUndefined(getValue(field.child, data[i]))) {
8116
- // eslint-disable-next-line
8117
- var childData = getValue(field.child, data[i]);
8254
+ var childData = getValue(field.child, data[parseInt(i.toString(), 10)]);
8118
8255
  newData = this.getNestedItems(childData, this.getChildType(field), givenText);
8119
8256
  if (newData !== undefined) {
8120
8257
  break;
@@ -8122,8 +8259,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8122
8259
  }
8123
8260
  else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined(getValue('child', data[i]))) {
8124
8261
  var child = 'child';
8125
- // eslint-disable-next-line
8126
- newData = this.getNestedItems(getValue(child, data[i]), this.getChildType(field), givenText);
8262
+ newData = this.getNestedItems(getValue(child, data[parseInt(i.toString(), 10)]), this.getChildType(field), givenText);
8127
8263
  if (newData !== undefined) {
8128
8264
  break;
8129
8265
  }
@@ -8213,12 +8349,12 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8213
8349
  _this.setFooterTemplate();
8214
8350
  }
8215
8351
  _this.isFirstRender = false;
8216
- /* eslint-disable */
8217
8352
  if (_this.hasTemplate && _this.portals) {
8218
8353
  if (_this.treeObj.portals) {
8219
- _this.portals = _this.portals.concat(_this.treeObj.portals.filter(function (item) { return !_this.portals.includes(item); }));
8354
+ _this.portals = _this.portals.concat(_this.treeObj.portals.filter(function (item) {
8355
+ return !_this.portals.includes(item);
8356
+ }));
8220
8357
  }
8221
- /* eslint-enable */
8222
8358
  if (_this.isReact) {
8223
8359
  _this.renderReactTemplates(_this.reactCallBack);
8224
8360
  }
@@ -8241,7 +8377,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8241
8377
  else {
8242
8378
  var oldFocussedNode = _this.treeObj.element.querySelector('.e-node-focus');
8243
8379
  focusedElement = _this.treeObj.element.querySelector('li:not(.e-disable):not(.e-prevent)');
8244
- if (oldFocussedNode && oldFocussedNode != focusedElement) {
8380
+ if (oldFocussedNode && oldFocussedNode !== focusedElement) {
8245
8381
  oldFocussedNode.setAttribute('tabindex', '-1');
8246
8382
  removeClass([oldFocussedNode], 'e-node-focus');
8247
8383
  }
@@ -8367,8 +8503,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8367
8503
  var isHeader = closest(target, '.' + HEADER);
8368
8504
  var isFooter = closest(target, '.' + FOOTER);
8369
8505
  var isScroller = target.classList.contains(DROPDOWN) ? true :
8370
- (matches(target, '.e-ddt .e-popup') || matches(target, '.e-ddt .e-treeview'));
8371
- if ((this.isPopupOpen && ((!isNullOrUndefined(this.inputWrapper) && this.inputWrapper.contains(target)) || isTree || isScroller || isHeader || isFooter)) ||
8506
+ (matches$1(target, '.e-ddt .e-popup') || matches$1(target, '.e-ddt .e-treeview'));
8507
+ if ((this.isPopupOpen && ((!isNullOrUndefined(this.inputWrapper) &&
8508
+ this.inputWrapper.contains(target)) || isTree || isScroller || isHeader || isFooter)) ||
8372
8509
  ((this.allowMultiSelection || this.showCheckBox) && (this.isPopupOpen && target.classList.contains(CHIP_CLOSE) ||
8373
8510
  (this.isPopupOpen && (target.classList.contains(CHECKALLPARENT) || target.classList.contains(ALLTEXT)
8374
8511
  || target.classList.contains(CHECKBOXFRAME)))))) {
@@ -8395,7 +8532,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8395
8532
  removeClass([this.popupDiv], NODATA);
8396
8533
  this.hideCheckAll(false);
8397
8534
  }
8398
- this.treeDataType = this.getTreeDataType(this.treeItems, this.fields);
8535
+ if (!this.isFilteredData) {
8536
+ this.treeDataType = this.getTreeDataType(this.treeItems, this.fields);
8537
+ }
8399
8538
  if (this.isFirstRender && this.isRemoteData) {
8400
8539
  this.setTreeValue();
8401
8540
  this.setTreeText();
@@ -8491,7 +8630,8 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8491
8630
  dataSource: fields.dataSource, value: fields.value, text: fields.text, parentValue: fields.parentValue,
8492
8631
  child: (fields.child ? this.cloneChildField(fields.child) : null), hasChildren: fields.hasChildren,
8493
8632
  expanded: fields.expanded, iconCss: fields.iconCss, imageUrl: fields.imageUrl, htmlAttributes: fields.htmlAttributes,
8494
- query: fields.query, selected: fields.selected, selectable: fields.selectable, tableName: fields.tableName, tooltip: fields.tooltip
8633
+ query: fields.query, selected: fields.selected, selectable: fields.selectable,
8634
+ tableName: fields.tableName, tooltip: fields.tooltip
8495
8635
  };
8496
8636
  return clonedField;
8497
8637
  }
@@ -8545,7 +8685,8 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8545
8685
  if ((typeof field.child === 'string') && !isNullOrUndefined(getValue(field.child, this.fields.dataSource[i]))) {
8546
8686
  return 2;
8547
8687
  }
8548
- if (!isNullOrUndefined(getValue(field.parentValue, this.fields.dataSource[i])) || !isNullOrUndefined(getValue(field.hasChildren, this.fields.dataSource[i]))) {
8688
+ if (!isNullOrUndefined(getValue(field.parentValue, this.fields.dataSource[i])) ||
8689
+ !isNullOrUndefined(getValue(field.hasChildren, this.fields.dataSource[i]))) {
8549
8690
  return 1;
8550
8691
  }
8551
8692
  }
@@ -8622,6 +8763,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8622
8763
  this.setProperties({ text: selectedText }, true);
8623
8764
  this.currentText = this.text;
8624
8765
  this.currentValue = this.value;
8766
+ if (!isNullOrUndefined(this.value) && this.value.length > 0) {
8767
+ this.inputWrapper.setAttribute('aria-label', args.nodeData.text.toString());
8768
+ }
8625
8769
  attributes(this.inputWrapper, { 'aria-describedby': this.element.id });
8626
8770
  attributes(this.inputWrapper, { 'aria-activedescendant': id.toString() });
8627
8771
  this.updateHiddenValue();
@@ -8694,14 +8838,13 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8694
8838
  this.oldValue = this.value ? this.value.slice() : this.value;
8695
8839
  }
8696
8840
  };
8697
- DropDownTree.prototype.onNodeExpanded = function (args) {
8841
+ DropDownTree.prototype.onNodeExpanded = function () {
8698
8842
  if (this.hasTemplate && this.portals && this.treeObj.portals) {
8699
8843
  for (var i = 0; i < this.treeObj.portals.length; i++) {
8700
8844
  if (this.portals.indexOf(this.treeObj.portals[i]) === -1) {
8701
8845
  this.portals.push(this.treeObj.portals[i]);
8702
8846
  }
8703
8847
  }
8704
- /* eslint-enable */
8705
8848
  this.renderReactTemplates();
8706
8849
  }
8707
8850
  };
@@ -8797,7 +8940,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8797
8940
  if (!this.isFilteredData) {
8798
8941
  this.setProperties({ value: this.isFromFilterChange && newValues && newValues.length === 0 ? this.value : newValues }, true);
8799
8942
  this.isFromFilterChange = false;
8800
- if (newValues && newValues.length !== 0 && !this.showCheckBox) {
8943
+ if (newValues && newValues.length !== 0 && !this.showCheckBox && !this.ddtCompareValues(this.treeObj.selectedNodes, this.value.slice())) {
8801
8944
  this.treeObj.selectedNodes = this.value.slice();
8802
8945
  this.treeObj.dataBind();
8803
8946
  }
@@ -8992,6 +9135,12 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8992
9135
  }
8993
9136
  this.currentText = this.text;
8994
9137
  this.currentValue = this.value;
9138
+ if (!isNullOrUndefined(this.value) && this.value.length > 0 && !isNullOrUndefined(this.currentText)) {
9139
+ this.inputWrapper.setAttribute('aria-label', this.currentText.split(',').join(' '));
9140
+ }
9141
+ else {
9142
+ this.inputWrapper.setAttribute('aria-label', this.getModuleName());
9143
+ }
8995
9144
  };
8996
9145
  DropDownTree.prototype.setChipValues = function (text, value) {
8997
9146
  if (!this.inputWrapper.contains(this.chipWrapper)) {
@@ -9079,7 +9228,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9079
9228
  };
9080
9229
  DropDownTree.prototype.templateComplier = function (template) {
9081
9230
  if (template) {
9082
- // eslint-disable-next-line
9083
9231
  try {
9084
9232
  if (typeof template !== 'function' && document.querySelectorAll(template).length) {
9085
9233
  return compile(document.querySelector(template).innerHTML.trim());
@@ -9165,7 +9313,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9165
9313
  this.ensurePlaceHolder();
9166
9314
  };
9167
9315
  DropDownTree.prototype.resetValue = function (isDynamicChange) {
9168
- if (this.value === [] && this.text == null) {
9316
+ if (Array.isArray(this.value) && this.value.length === 0 && this.text == null) {
9169
9317
  return;
9170
9318
  }
9171
9319
  Input.setValue(null, this.inputEle, this.floatLabelType);
@@ -9173,6 +9321,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9173
9321
  this.oldValue = this.value;
9174
9322
  this.setProperties({ value: [] }, true);
9175
9323
  }
9324
+ if (isNullOrUndefined(this.value) || this.value.length === 0) {
9325
+ this.inputWrapper.setAttribute('aria-label', this.getModuleName());
9326
+ }
9176
9327
  this.dataValue = null;
9177
9328
  this.setProperties({ text: null }, true);
9178
9329
  this.selectedData = [];
@@ -9279,9 +9430,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9279
9430
  DropDownTree.prototype.updateTemplate = function () {
9280
9431
  if (this.popupObj) {
9281
9432
  this.clearTemplate();
9282
- /* eslint-disable */
9283
9433
  this.portals = [];
9284
- /* eslint-enable */
9285
9434
  this.popupObj.destroy();
9286
9435
  if (this.isPopupOpen) {
9287
9436
  this.hidePopup();
@@ -9658,22 +9807,35 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9658
9807
  detach(this.inputWrapper);
9659
9808
  detach(this.popupDiv);
9660
9809
  detach(this.hiddenElement);
9810
+ Input.setRipple(false, [this.inputObj]);
9661
9811
  this.element.classList.remove('e-input');
9662
9812
  if (this.showCheckBox || this.allowMultiSelection) {
9663
9813
  this.element.classList.remove(CHIP_INPUT);
9664
9814
  }
9815
+ detach(this.inputObj.container);
9816
+ if (this.inputObj.buttons.length) {
9817
+ detach(this.inputObj.buttons[0]);
9818
+ }
9665
9819
  this.inputObj = null;
9666
9820
  while (this.hiddenElement.options.length > 0) {
9667
9821
  this.hiddenElement.remove(0);
9668
9822
  }
9669
9823
  this.hiddenElement.innerHTML = '';
9670
9824
  this.hiddenElement = null;
9825
+ this.inputWrapper.innerHTML = '';
9671
9826
  this.inputWrapper = null;
9672
9827
  this.popupDiv = null;
9673
9828
  this.tree = null;
9674
9829
  this.popupObj = null;
9675
9830
  this.treeObj = null;
9676
9831
  this.overAllClear = null;
9832
+ if (this.chipCollection) {
9833
+ var chipsIcons = selectAll('.e-chips-close', this.chipCollection);
9834
+ for (var _i = 0, chipsIcons_1 = chipsIcons; _i < chipsIcons_1.length; _i++) {
9835
+ var element = chipsIcons_1[_i];
9836
+ EventHandler.remove(element, 'mousedown', this.removeChip);
9837
+ }
9838
+ }
9677
9839
  this.chipWrapper = null;
9678
9840
  this.chipCollection = null;
9679
9841
  this.checkAllParent = null;
@@ -9732,7 +9894,11 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9732
9894
  * @returns {void}
9733
9895
  */
9734
9896
  DropDownTree.prototype.hidePopup = function () {
9735
- var eventArgs = { popup: this.popupObj };
9897
+ var eventArgs = { popup: this.popupObj, cancel: false };
9898
+ this.trigger('close', eventArgs);
9899
+ if (eventArgs.cancel) {
9900
+ return;
9901
+ }
9736
9902
  this.inputWrapper.classList.remove(ICONANIMATION);
9737
9903
  if (this.popupEle) {
9738
9904
  addClass([this.popupEle], DDTHIDEICON);
@@ -9746,7 +9912,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9746
9912
  addClass([this.inputWrapper], [INPUTFOCUS]);
9747
9913
  }
9748
9914
  }
9749
- this.trigger('close', eventArgs);
9750
9915
  if (this.destroyPopupOnHide) {
9751
9916
  this.isFirstRender = true;
9752
9917
  this.destroyPopup();
@@ -9946,10 +10111,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9946
10111
  return DropDownTree;
9947
10112
  }(Component));
9948
10113
 
9949
- /**
9950
- * export all modules from current location
9951
- */
9952
-
9953
10114
  var __extends$3 = (undefined && undefined.__extends) || (function () {
9954
10115
  var extendStatics = function (d, b) {
9955
10116
  extendStatics = Object.setPrototypeOf ||
@@ -9969,8 +10130,6 @@ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators,
9969
10130
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9970
10131
  return c > 3 && r && Object.defineProperty(target, key, r), r;
9971
10132
  };
9972
- // eslint-disable-next-line @typescript-eslint/triple-slash-reference
9973
- /// <reference path='../drop-down-list/drop-down-list-model.d.ts'/>
9974
10133
  var SPINNER_CLASS = 'e-atc-spinner-icon';
9975
10134
  dropDownListClasses.root = 'e-combobox';
9976
10135
  var inputObject$1 = {
@@ -10089,6 +10248,18 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
10089
10248
  }
10090
10249
  };
10091
10250
  ComboBox.prototype.updateValues = function () {
10251
+ if (this.fields.disabled) {
10252
+ if (this.value != null) {
10253
+ this.value = !this.isDisableItemValue(this.value) ? this.value : null;
10254
+ }
10255
+ if (this.text != null) {
10256
+ this.text = !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
10257
+ }
10258
+ if (this.index != null) {
10259
+ this.index = !this.isDisabledItemByIndex(this.index) ? this.index : null;
10260
+ this.activeIndex = this.index;
10261
+ }
10262
+ }
10092
10263
  if (!isNullOrUndefined(this.value)) {
10093
10264
  var currentValue = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
10094
10265
  var li = this.getElementByValue(currentValue);
@@ -10336,9 +10507,9 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
10336
10507
  var value = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
10337
10508
  this.itemData = this.getDataByValue(value);
10338
10509
  var dataItem = this.getItemData();
10339
- var setValue$$1 = this.allowObjectBinding ? this.itemData : dataItem.value;
10510
+ var setValue = this.allowObjectBinding ? this.itemData : dataItem.value;
10340
10511
  if (!(this.allowCustom && isNullOrUndefined(dataItem.value) && isNullOrUndefined(dataItem.text))) {
10341
- this.setProperties({ 'value': setValue$$1 }, !this.allowCustom);
10512
+ this.setProperties({ 'value': setValue }, !this.allowCustom);
10342
10513
  }
10343
10514
  };
10344
10515
  /**
@@ -10522,6 +10693,9 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
10522
10693
  else {
10523
10694
  li = this.list.querySelector('.' + dropDownListClasses.focus);
10524
10695
  }
10696
+ if (this.isDisabledElement(li)) {
10697
+ return;
10698
+ }
10525
10699
  if (li) {
10526
10700
  this.setSelection(li, e);
10527
10701
  this.isTyped = false;
@@ -10941,10 +11115,6 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
10941
11115
  return ComboBox;
10942
11116
  }(DropDownList));
10943
11117
 
10944
- /**
10945
- * export all modules from current location
10946
- */
10947
-
10948
11118
  var __extends$4 = (undefined && undefined.__extends) || (function () {
10949
11119
  var extendStatics = function (d, b) {
10950
11120
  extendStatics = Object.setPrototypeOf ||
@@ -10964,8 +11134,6 @@ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators,
10964
11134
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
10965
11135
  return c > 3 && r && Object.defineProperty(target, key, r), r;
10966
11136
  };
10967
- // eslint-disable-next-line @typescript-eslint/triple-slash-reference
10968
- /// <reference path='../combo-box/combo-box-model.d.ts'/>
10969
11137
  dropDownListClasses.root = 'e-autocomplete';
10970
11138
  dropDownListClasses.icon = 'e-input-group-icon e-ddl-icon e-search-icon';
10971
11139
  /**
@@ -11423,7 +11591,7 @@ var AutoComplete = /** @__PURE__ @class */ (function (_super) {
11423
11591
  _super.prototype.render.call(this);
11424
11592
  };
11425
11593
  __decorate$4([
11426
- Complex({ value: null, iconCss: null, groupBy: null }, FieldSettings)
11594
+ Complex({ value: null, iconCss: null, groupBy: null, disabled: null }, FieldSettings)
11427
11595
  ], AutoComplete.prototype, "fields", void 0);
11428
11596
  __decorate$4([
11429
11597
  Property(true)
@@ -11476,10 +11644,6 @@ var AutoComplete = /** @__PURE__ @class */ (function (_super) {
11476
11644
  return AutoComplete;
11477
11645
  }(ComboBox));
11478
11646
 
11479
- /**
11480
- * export all modules from current location
11481
- */
11482
-
11483
11647
  /**
11484
11648
  * FloatLable Moduel
11485
11649
  * Specifies whether to display the floating label above the input element.
@@ -11654,8 +11818,6 @@ var __decorate$5 = (undefined && undefined.__decorate) || function (decorators,
11654
11818
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
11655
11819
  return c > 3 && r && Object.defineProperty(target, key, r), r;
11656
11820
  };
11657
- // eslint-disable-next-line @typescript-eslint/triple-slash-reference
11658
- /// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>
11659
11821
  var FOCUS = 'e-input-focus';
11660
11822
  var DISABLED$1 = 'e-disabled';
11661
11823
  var OVER_ALL_WRAPPER = 'e-multiselect e-input-group e-control-wrapper';
@@ -11982,13 +12144,26 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11982
12144
  }
11983
12145
  else {
11984
12146
  if (this.enableVirtualization) {
11985
- element = this.ulElement.querySelector('li.'
11986
- + dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)');
12147
+ if (this.fields.disabled) {
12148
+ element = this.ulElement.querySelector('li.'
12149
+ + dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)' + ':not(.' + DISABLED$1 + ')');
12150
+ }
12151
+ else {
12152
+ element = this.ulElement.querySelector('li.'
12153
+ + dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)');
12154
+ }
11987
12155
  }
11988
12156
  else {
11989
- element = this.ulElement.querySelector('li.'
11990
- + dropDownBaseClasses.li + ':not(.'
11991
- + HIDE_LIST + ')');
12157
+ if (this.fields.disabled) {
12158
+ element = this.ulElement.querySelector('li.'
12159
+ + dropDownBaseClasses.li + ':not(.'
12160
+ + HIDE_LIST + ')' + ':not(.' + DISABLED$1 + ')');
12161
+ }
12162
+ else {
12163
+ element = this.ulElement.querySelector('li.'
12164
+ + dropDownBaseClasses.li + ':not(.'
12165
+ + HIDE_LIST + ')');
12166
+ }
11992
12167
  }
11993
12168
  }
11994
12169
  if (element !== null) {
@@ -12448,9 +12623,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
12448
12623
  if (filterQuery.queries[queryElements].fn === 'onSkip') {
12449
12624
  isSkip = false;
12450
12625
  }
12451
- if (filterQuery.queries[queryElements].fn === 'onTake') {
12452
-
12453
- }
12626
+ if (filterQuery.queries[queryElements].fn === 'onTake') ;
12454
12627
  }
12455
12628
  var queryTakeValue = 0;
12456
12629
  if (filterQuery && filterQuery.queries.length > 0) {
@@ -13441,7 +13614,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
13441
13614
  this.list.scrollTop = this.virtualListInfo && this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight : 0;
13442
13615
  }
13443
13616
  isScrollerCHanged = this.isKeyBoardAction;
13444
-
13445
13617
  }
13446
13618
  this.isKeyBoardAction = isScrollerCHanged;
13447
13619
  };
@@ -13719,6 +13891,21 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
13719
13891
  }
13720
13892
  }
13721
13893
  }
13894
+ var focusedLi = this.list ? this.list.querySelector('.e-item-focus') : null;
13895
+ if (this.isDisabledElement(focusedLi)) {
13896
+ if (this.list.querySelectorAll('.e-list-item:not(.e-hide-listitem):not(.e-disabled)').length === 0) {
13897
+ this.removeFocus();
13898
+ return;
13899
+ }
13900
+ var index = this.getIndexByValue(focusedLi.getAttribute('data-value'));
13901
+ if (index === 0 && this.mode !== 'CheckBox') {
13902
+ position = 1;
13903
+ }
13904
+ if (index === (this.list.querySelectorAll('.e-list-item:not(.e-hide-listitem)').length - 1)) {
13905
+ position = -1;
13906
+ }
13907
+ this.moveByList(position);
13908
+ }
13722
13909
  };
13723
13910
  MultiSelect.prototype.getElementByValue = function (value) {
13724
13911
  var item;
@@ -13909,7 +14096,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
13909
14096
  }
13910
14097
  _this.setProperties({ value: [].concat([], removeVal) }, true);
13911
14098
  if (_this.enableVirtualization) {
13912
- var currentText = index == 0 ? _this.text.replace(_this.text.split(_this.delimiterChar)[index] + _this.delimiterChar, '') : _this.text.replace(_this.delimiterChar + _this.text.split(_this.delimiterChar)[index], '');
14099
+ var currentText = index == 0 && _this.text.split(_this.delimiterChar) && _this.text.split(_this.delimiterChar).length == 1 ? _this.text.replace(_this.text.split(_this.delimiterChar)[index], '') : index == 0 ? _this.text.replace(_this.text.split(_this.delimiterChar)[index] + _this.delimiterChar, '') : _this.text.replace(_this.delimiterChar + _this.text.split(_this.delimiterChar)[index], '');
13913
14100
  _this.setProperties({ text: currentText.toString() }, true);
13914
14101
  }
13915
14102
  if (element_1 !== null) {
@@ -15301,7 +15488,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
15301
15488
  }
15302
15489
  };
15303
15490
  MultiSelect.prototype.addListFocus = function (element) {
15304
- if (this.enabled && this.isValidLI(element)) {
15491
+ if (this.enabled && (this.isValidLI(element) || (this.fields.disabled && this.isDisabledElement(element)))) {
15305
15492
  this.removeFocus();
15306
15493
  addClass([element], dropDownBaseClasses.focus);
15307
15494
  this.updateAriaActiveDescendant();
@@ -15892,14 +16079,14 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
15892
16079
  var li;
15893
16080
  if (!isNullOrUndefined(this.list)) {
15894
16081
  li = this.list.querySelectorAll(state ?
15895
- 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-virtual-list)' :
15896
- 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-virtual-list)');
16082
+ 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)' :
16083
+ 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)');
15897
16084
  }
15898
16085
  if (this.value && this.value.length && event && event.target
15899
16086
  && closest(event.target, '.e-close-hooker') && this.allowFiltering) {
15900
16087
  li = this.mainList.querySelectorAll(state ?
15901
- 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-virtual-list)' :
15902
- 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-virtual-list)');
16088
+ 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)' :
16089
+ 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)');
15903
16090
  }
15904
16091
  if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !isNullOrUndefined(this.fields.groupBy)) {
15905
16092
  var target = (event ? (this.groupTemplate ? closest(event.target, '.e-list-group-item') : event.target) : null);
@@ -16347,9 +16534,16 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
16347
16534
  this.updateClearButton(newProp.showClearButton);
16348
16535
  break;
16349
16536
  case 'text':
16537
+ if (this.fields.disabled) {
16538
+ this.text =
16539
+ this.text && !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
16540
+ }
16350
16541
  this.updateVal(this.value, this.value, 'text');
16351
16542
  break;
16352
16543
  case 'value':
16544
+ if (this.fields.disabled) {
16545
+ this.removeDisabledItemsValue(this.value);
16546
+ }
16353
16547
  this.updateVal(this.value, oldProp.value, 'value');
16354
16548
  this.addValidInputClass();
16355
16549
  if (!this.closePopupOnSelect && this.isPopupOpen()) {
@@ -16512,7 +16706,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
16512
16706
  }
16513
16707
  return valuecheck;
16514
16708
  };
16515
-
16516
16709
  MultiSelect.prototype.addNonPresentItems = function (valuecheck, ulElement, list, event) {
16517
16710
  var _this = this;
16518
16711
  this.dataSource.executeQuery(this.getForQuery(valuecheck)).then(function (e) {
@@ -16522,7 +16715,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
16522
16715
  _this.updateActionList(ulElement, list, event);
16523
16716
  });
16524
16717
  };
16525
-
16526
16718
  MultiSelect.prototype.updateVal = function (newProp, oldProp, prop) {
16527
16719
  if (!this.list) {
16528
16720
  this.onLoadSelect();
@@ -16598,7 +16790,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
16598
16790
  var animModel = {
16599
16791
  name: 'FadeOut',
16600
16792
  duration: 100,
16601
- delay: delay ? delay : 0
16793
+ delay: delay
16602
16794
  };
16603
16795
  this.customFilterQuery = null;
16604
16796
  var eventArgs = { popup: this.popupObj, cancel: false, animation: animModel, event: e || null };
@@ -16921,8 +17113,33 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
16921
17113
  listParent.remove();
16922
17114
  return listItemHeight;
16923
17115
  };
17116
+ /**
17117
+ * Removes disabled values from the given array.
17118
+ *
17119
+ * @param { number[] | string[] | boolean[] | object[] } value - The array to check.
17120
+ * @returns {void}
17121
+ */
17122
+ MultiSelect.prototype.removeDisabledItemsValue = function (value) {
17123
+ if (value) {
17124
+ var data = [];
17125
+ var dataIndex = 0;
17126
+ for (var index = 0; index < value.length; index++) {
17127
+ var indexValue = value[index];
17128
+ if (typeof (indexValue) === 'object') {
17129
+ indexValue = JSON.parse(JSON.stringify(indexValue))[this.fields.value];
17130
+ }
17131
+ if ((indexValue != null) && !(this.isDisabledItemByIndex(this.getIndexByValue(indexValue)))) {
17132
+ data[dataIndex++] = value[index];
17133
+ }
17134
+ }
17135
+ this.value = data.length > 0 ? data : null;
17136
+ }
17137
+ };
16924
17138
  MultiSelect.prototype.checkInitialValue = function () {
16925
17139
  var _this = this;
17140
+ if (this.fields.disabled) {
17141
+ this.removeDisabledItemsValue(this.value);
17142
+ }
16926
17143
  var isData = this.dataSource instanceof Array ? (this.dataSource.length > 0)
16927
17144
  : !isNullOrUndefined(this.dataSource);
16928
17145
  if (!(this.value && this.value.length) &&
@@ -16961,6 +17178,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
16961
17178
  _super.prototype.render.call(this);
16962
17179
  }
16963
17180
  }
17181
+ if (this.fields.disabled) {
17182
+ this.text = this.text && !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
17183
+ }
16964
17184
  if (!isNullOrUndefined(this.text) && (isNullOrUndefined(this.value) || this.value.length === 0)) {
16965
17185
  this.initialTextUpdate();
16966
17186
  }
@@ -17095,6 +17315,66 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
17095
17315
  this.refreshInputHight();
17096
17316
  this.checkPlaceholderSize();
17097
17317
  };
17318
+ /**
17319
+ * Method to disable specific item in the popup.
17320
+ *
17321
+ * @param {string | number | object | HTMLLIElement} item - Specifies the item to be disabled.
17322
+ * @returns {void}
17323
+ * @deprecated
17324
+ */
17325
+ MultiSelect.prototype.disableItem = function (item) {
17326
+ if (this.fields.disabled) {
17327
+ if (!this.list) {
17328
+ this.renderList();
17329
+ }
17330
+ var itemIndex = -1;
17331
+ if (this.liCollections && this.liCollections.length > 0 && this.listData && this.fields.disabled) {
17332
+ if (typeof (item) === 'string') {
17333
+ itemIndex = this.getIndexByValue(item);
17334
+ }
17335
+ else if (typeof item === 'object') {
17336
+ if (item instanceof HTMLLIElement) {
17337
+ for (var index = 0; index < this.liCollections.length; index++) {
17338
+ if (this.liCollections[index] === item) {
17339
+ itemIndex = this.getIndexByValue(item.getAttribute('data-value'));
17340
+ break;
17341
+ }
17342
+ }
17343
+ }
17344
+ else {
17345
+ var value = JSON.parse(JSON.stringify(item))[this.fields.value];
17346
+ for (var index = 0; index < this.listData.length; index++) {
17347
+ if (JSON.parse(JSON.stringify(this.listData[index]))[this.fields.value] === value) {
17348
+ itemIndex = this.getIndexByValue(value);
17349
+ break;
17350
+ }
17351
+ }
17352
+ }
17353
+ }
17354
+ else {
17355
+ itemIndex = item;
17356
+ }
17357
+ var isValidIndex = itemIndex < this.liCollections.length && itemIndex > -1;
17358
+ if (isValidIndex && !(JSON.parse(JSON.stringify(this.listData[itemIndex]))[this.fields.disabled])) {
17359
+ var li = this.liCollections[itemIndex];
17360
+ if (li) {
17361
+ this.disableListItem(li);
17362
+ var parsedData = JSON.parse(JSON.stringify(this.listData[itemIndex]));
17363
+ parsedData[this.fields.disabled] = true;
17364
+ this.listData[itemIndex] = parsedData;
17365
+ if (li.classList.contains(dropDownBaseClasses.focus)) {
17366
+ this.removeFocus();
17367
+ }
17368
+ if (li.classList.contains(HIDE_LIST) || li.classList.contains(dropDownBaseClasses.selected)) {
17369
+ var oldValue = this.value;
17370
+ this.removeDisabledItemsValue(this.value);
17371
+ this.updateVal(this.value, oldValue, 'value');
17372
+ }
17373
+ }
17374
+ }
17375
+ }
17376
+ }
17377
+ };
17098
17378
  /**
17099
17379
  * Removes the component from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.
17100
17380
  *
@@ -17162,7 +17442,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
17162
17442
  this.selectAllEventEle = null;
17163
17443
  };
17164
17444
  __decorate$5([
17165
- Complex({ text: null, value: null, iconCss: null, groupBy: null }, FieldSettings)
17445
+ Complex({ text: null, value: null, iconCss: null, groupBy: null, disabled: null }, FieldSettings)
17166
17446
  ], MultiSelect.prototype, "fields", void 0);
17167
17447
  __decorate$5([
17168
17448
  Property(false)
@@ -17547,12 +17827,12 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
17547
17827
  }
17548
17828
  if (!isNullOrUndefined(this.checkWrapper)) {
17549
17829
  var checkElement = select('.' + CHECKBOXFRAME$1, this.checkWrapper);
17550
- var selectAll$$1 = false;
17551
- this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), args.li, args.e, selectAll$$1);
17830
+ var selectAll = false;
17831
+ this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), args.li, args.e, selectAll);
17552
17832
  }
17553
17833
  };
17554
- CheckBoxSelection.prototype.validateCheckNode = function (checkWrap, isCheck, li, e, selectAll$$1) {
17555
- this.changeState(checkWrap, isCheck ? 'uncheck' : 'check', e, true, selectAll$$1);
17834
+ CheckBoxSelection.prototype.validateCheckNode = function (checkWrap, isCheck, li, e, selectAll) {
17835
+ this.changeState(checkWrap, isCheck ? 'uncheck' : 'check', e, true, selectAll);
17556
17836
  };
17557
17837
  CheckBoxSelection.prototype.clickHandler = function (e) {
17558
17838
  var target;
@@ -17563,26 +17843,26 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
17563
17843
  target = e.currentTarget;
17564
17844
  }
17565
17845
  this.checkWrapper = closest(target, '.' + CHECKBOXWRAP$1);
17566
- var selectAll$$1 = true;
17846
+ var selectAll = true;
17567
17847
  if (!isNullOrUndefined(this.checkWrapper)) {
17568
17848
  var checkElement = select('.' + CHECKBOXFRAME$1, this.checkWrapper);
17569
- this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), null, e, selectAll$$1);
17849
+ this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), null, e, selectAll);
17570
17850
  }
17571
17851
  e.preventDefault();
17572
17852
  };
17573
- CheckBoxSelection.prototype.changeState = function (wrapper, state, e, isPrevent, selectAll$$1) {
17853
+ CheckBoxSelection.prototype.changeState = function (wrapper, state, e, isPrevent, selectAll) {
17574
17854
  var frameSpan = wrapper.getElementsByClassName(CHECKBOXFRAME$1)[0];
17575
17855
  if (state === 'check' && !frameSpan.classList.contains(CHECK$1)) {
17576
17856
  frameSpan.classList.remove(INDETERMINATE);
17577
17857
  frameSpan.classList.add(CHECK$1);
17578
- if (selectAll$$1) {
17858
+ if (selectAll) {
17579
17859
  this.parent.selectAllItems(true, e);
17580
17860
  this.setLocale(true);
17581
17861
  }
17582
17862
  }
17583
17863
  else if (state === 'uncheck' && (frameSpan.classList.contains(CHECK$1) || frameSpan.classList.contains(INDETERMINATE))) {
17584
17864
  removeClass([frameSpan], [CHECK$1, INDETERMINATE]);
17585
- if (selectAll$$1) {
17865
+ if (selectAll) {
17586
17866
  this.parent.selectAllItems(false, e);
17587
17867
  this.setLocale();
17588
17868
  }
@@ -17590,7 +17870,7 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
17590
17870
  else if (state === 'indeterminate' && !(frameSpan.classList.contains(INDETERMINATE))) {
17591
17871
  removeClass([frameSpan], [CHECK$1]);
17592
17872
  frameSpan.classList.add(INDETERMINATE);
17593
- if (selectAll$$1) {
17873
+ if (selectAll) {
17594
17874
  this.parent.selectAllItems(false, e);
17595
17875
  this.setLocale();
17596
17876
  }
@@ -17882,10 +18162,6 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
17882
18162
  return CheckBoxSelection;
17883
18163
  }());
17884
18164
 
17885
- /**
17886
- * export all modules from current location
17887
- */
17888
-
17889
18165
  var __extends$6 = (undefined && undefined.__extends) || (function () {
17890
18166
  var extendStatics = function (d, b) {
17891
18167
  extendStatics = Object.setPrototypeOf ||
@@ -17905,8 +18181,6 @@ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators,
17905
18181
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
17906
18182
  return c > 3 && r && Object.defineProperty(target, key, r), r;
17907
18183
  };
17908
- // eslint-disable-next-line @typescript-eslint/triple-slash-reference
17909
- /// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>
17910
18184
  /**
17911
18185
  * Defines the Selection settings of List Box.
17912
18186
  */
@@ -18020,6 +18294,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
18020
18294
  var hiddenSelect = this.createElement('select', { className: 'e-hidden-select', attrs: { 'multiple': '' } });
18021
18295
  hiddenSelect.style.visibility = 'hidden';
18022
18296
  this.list.classList.add('e-listbox-wrapper');
18297
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
18023
18298
  this.list.querySelector('.e-list-parent').setAttribute('role', 'presentation');
18024
18299
  var groupHdrs = this.list.querySelectorAll('.e-list-group-item');
18025
18300
  for (var i = 0; i < groupHdrs.length; i++) {
@@ -18038,7 +18313,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
18038
18313
  }
18039
18314
  }
18040
18315
  else {
18041
- if (this.initLoad) {
18316
+ if (this.initLoad && this.element.parentElement) {
18042
18317
  this.element.parentElement.insertBefore(this.list, this.element);
18043
18318
  }
18044
18319
  this.list.insertBefore(this.element, this.list.firstChild);
@@ -18056,6 +18331,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
18056
18331
  this.list.setAttribute('role', 'listbox');
18057
18332
  attributes(this.list, { 'role': 'listbox', 'aria-label': 'listbox', 'aria-multiselectable': this.selectionSettings.mode === 'Multiple' ? 'true' : 'false' });
18058
18333
  this.updateSelectionSettings();
18334
+ this.resizeHandler();
18059
18335
  };
18060
18336
  ListBox.prototype.updateSelectionSettings = function () {
18061
18337
  if (this.selectionSettings.showCheckbox && this.selectionSettings.showSelectAll && this.liCollections.length) {
@@ -18106,6 +18382,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
18106
18382
  ListBox.prototype.initToolbar = function () {
18107
18383
  var pos = this.toolbarSettings.position;
18108
18384
  var prevScope = this.element.getAttribute('data-value');
18385
+ this.toolbarSettings.items = isNullOrUndefined(this.toolbarSettings.items) ? [] : this.toolbarSettings.items;
18109
18386
  if (this.toolbarSettings.items.length) {
18110
18387
  var toolElem = this.createElement('div', { className: 'e-listbox-tool', attrs: { 'role': 'toolbar' } });
18111
18388
  var wrapper = this.createElement('div', {
@@ -18200,7 +18477,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
18200
18477
  this.spinner = this.createElement('div', { className: 'e-listbox-wrapper' });
18201
18478
  }
18202
18479
  this.spinner.style.height = formatUnit(this.height);
18203
- this.element.parentElement.insertBefore(this.spinner, this.element.nextSibling);
18480
+ if (this.element.parentElement) {
18481
+ this.element.parentElement.insertBefore(this.spinner, this.element.nextSibling);
18482
+ }
18204
18483
  createSpinner({ target: this.spinner }, this.createElement);
18205
18484
  showSpinner(this.spinner);
18206
18485
  };
@@ -18506,7 +18785,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
18506
18785
  }
18507
18786
  var fListData_1 = [].slice.call(this.listData);
18508
18787
  var fSortData_1 = [].slice.call(this.sortedData);
18509
- selectedOptions.forEach(function (value, index) {
18788
+ selectedOptions.forEach(function (value) {
18510
18789
  droppedData = _this.getDataByValue(value);
18511
18790
  var srcIdx = _this.listData.indexOf(droppedData);
18512
18791
  var jsonSrcIdx = _this.jsonData.indexOf(droppedData);
@@ -19034,6 +19313,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
19034
19313
  if (form) {
19035
19314
  EventHandler.add(form, 'reset', this.formResetHandler, this);
19036
19315
  }
19316
+ window.addEventListener('resize', this.resizeHandler.bind(this));
19037
19317
  };
19038
19318
  ListBox.prototype.wireToolbarEvent = function () {
19039
19319
  if (this.toolbarSettings.items.length) {
@@ -19055,8 +19335,13 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
19055
19335
  if (form) {
19056
19336
  EventHandler.remove(form, 'reset', this.formResetHandler);
19057
19337
  }
19338
+ window.removeEventListener('resize', this.resizeHandler.bind(this));
19058
19339
  };
19059
19340
  ListBox.prototype.clickHandler = function (e) {
19341
+ var li = closest(e.target, '.' + 'e-list-item');
19342
+ if (isNullOrUndefined(li)) {
19343
+ return;
19344
+ }
19060
19345
  this.selectHandler(e);
19061
19346
  };
19062
19347
  ListBox.prototype.checkSelectAll = function () {
@@ -19549,6 +19834,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
19549
19834
  }
19550
19835
  var _loop_3 = function (i) {
19551
19836
  if (fListBox.ulElement.childNodes[i].classList.contains('e-disabled')) {
19837
+ // eslint-disable-next-line @typescript-eslint/tslint/config
19552
19838
  flistboxarray = flistboxarray.filter(function (item) { return item !== i; });
19553
19839
  tempLiColl.push(fListBox.ulElement.childNodes[i]);
19554
19840
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -19879,10 +20165,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
19879
20165
  };
19880
20166
  ListBox.prototype.dataUpdater = function (dataSource, query, fields) {
19881
20167
  this.isDataFetched = false;
19882
- var backCommand = true;
19883
20168
  if (this.targetElement().trim() === '') {
19884
20169
  var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
19885
- if (backCommand) {
20170
+ {
19886
20171
  this.remoteCustomValue = false;
19887
20172
  if (this.isAngular && this.itemTemplate) {
19888
20173
  list = this.renderItems(this.listData, fields);
@@ -19904,6 +20189,14 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
19904
20189
  this.refreshClearIcon();
19905
20190
  }
19906
20191
  };
20192
+ ListBox.prototype.resizeHandler = function () {
20193
+ if (this.list.scrollWidth > this.list.offsetWidth) {
20194
+ this.list.querySelector('.e-list-parent').style.display = 'inline-block';
20195
+ }
20196
+ else {
20197
+ this.list.querySelector('.e-list-parent').style.display = 'block';
20198
+ }
20199
+ };
19907
20200
  ListBox.prototype.getValidIndex = function (cli, index, keyCode) {
19908
20201
  var cul = this.ulElement;
19909
20202
  if (cli.classList.contains('e-disabled') || cli.classList.contains(cssClass.group)) {
@@ -19969,7 +20262,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
19969
20262
  });
19970
20263
  }
19971
20264
  };
19972
- ListBox.prototype.setSelection = function (values, isSelect, isText, canFocus) {
20265
+ ListBox.prototype.setSelection = function (
20266
+ // eslint-disable-next-line max-len
20267
+ values, isSelect, isText, canFocus) {
19973
20268
  var _this = this;
19974
20269
  if (values === void 0) { values = this.value; }
19975
20270
  if (isSelect === void 0) { isSelect = true; }
@@ -19994,21 +20289,21 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
19994
20289
  li = _this.list.querySelector('[data-value="' + text + '"]');
19995
20290
  }
19996
20291
  if (li) {
19997
- if (_this.selectionSettings.showCheckbox) {
20292
+ if (_this.selectionSettings.showCheckbox && !li.classList.contains('e-disabled')) {
19998
20293
  liselect = li.getElementsByClassName('e-frame')[0].classList.contains('e-check');
19999
20294
  }
20000
20295
  else {
20001
20296
  liselect = li.classList.contains('e-selected');
20002
20297
  }
20003
20298
  if (!isSelect && liselect || isSelect && !liselect && li) {
20004
- if (_this.selectionSettings.showCheckbox) {
20299
+ if (_this.selectionSettings.showCheckbox && !li.classList.contains('e-disabled')) {
20005
20300
  _this.notify('updatelist', { li: li, module: 'listbox' });
20006
20301
  if (canFocus) {
20007
20302
  li.focus();
20008
20303
  }
20009
20304
  }
20010
20305
  else {
20011
- if (isSelect) {
20306
+ if (isSelect && !li.classList.contains('e-disabled')) {
20012
20307
  li.classList.add(cssClass.selected);
20013
20308
  li.setAttribute('aria-selected', 'true');
20014
20309
  if (canFocus) {
@@ -20042,7 +20337,17 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
20042
20337
  this.checkSelectAll();
20043
20338
  };
20044
20339
  ListBox.prototype.checkDisabledState = function (inst) {
20045
- return inst.ulElement.querySelectorAll('.' + cssClass.li).length === 0;
20340
+ if (isNullOrUndefined(inst.ulElement)) {
20341
+ if (!isNullOrUndefined(this.dataSource) && isNullOrUndefined(this.dataSource.length)) {
20342
+ return false;
20343
+ }
20344
+ else {
20345
+ return true;
20346
+ }
20347
+ }
20348
+ else {
20349
+ return inst.ulElement.querySelectorAll('.' + cssClass.li).length === 0;
20350
+ }
20046
20351
  };
20047
20352
  ListBox.prototype.updateToolBarState = function () {
20048
20353
  var _this = this;
@@ -20280,6 +20585,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
20280
20585
  }
20281
20586
  }
20282
20587
  if (newProp.toolbarSettings.items) {
20588
+ oldProp.toolbarSettings.items = isNullOrUndefined(oldProp.toolbarSettings.items) ? [] : oldProp.toolbarSettings.items;
20283
20589
  if (oldProp.toolbarSettings && oldProp.toolbarSettings.items.length) {
20284
20590
  ele = this.list.parentElement;
20285
20591
  ele.parentElement.insertBefore(this.list, ele);
@@ -20416,10 +20722,6 @@ var listBoxClasses = {
20416
20722
  clearIcon: 'e-clear-icon'
20417
20723
  };
20418
20724
 
20419
- /**
20420
- * export all modules from current location
20421
- */
20422
-
20423
20725
  var __extends$7 = (undefined && undefined.__extends) || (function () {
20424
20726
  var extendStatics = function (d, b) {
20425
20727
  extendStatics = Object.setPrototypeOf ||
@@ -20501,12 +20803,12 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
20501
20803
  this.setCssClass(newClass, [this.popupObj.element], oldClass);
20502
20804
  }
20503
20805
  };
20504
- Mention.prototype.setCssClass = function (cssClass$$1, elements, oldClass) {
20806
+ Mention.prototype.setCssClass = function (cssClass, elements, oldClass) {
20505
20807
  if (!isNullOrUndefined(oldClass) && oldClass !== '') {
20506
20808
  removeClass(elements, oldClass.split(' '));
20507
20809
  }
20508
- if (!isNullOrUndefined(cssClass$$1) && cssClass$$1 !== '') {
20509
- addClass(elements, cssClass$$1.split(' '));
20810
+ if (!isNullOrUndefined(cssClass) && cssClass !== '') {
20811
+ addClass(elements, cssClass.split(' '));
20510
20812
  }
20511
20813
  };
20512
20814
  Mention.prototype.initializeData = function () {
@@ -20711,6 +21013,9 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
20711
21013
  }
20712
21014
  };
20713
21015
  Mention.prototype.updateUpDownAction = function (e) {
21016
+ if (this.fields.disabled && this.list && this.list.querySelectorAll('.e-list-item:not(.e-disabled)').length === 0) {
21017
+ return;
21018
+ }
20714
21019
  var focusEle = this.list.querySelector('.' + dropDownBaseClasses.focus);
20715
21020
  if (this.isSelectFocusItem(focusEle)) {
20716
21021
  this.setSelection(focusEle, e);
@@ -20731,6 +21036,17 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
20731
21036
  this.setSelection(nextItem, e);
20732
21037
  }
20733
21038
  }
21039
+ var itemIndex;
21040
+ for (var index = 0; index < this.liCollections.length; index++) {
21041
+ if (this.liCollections[index].classList.contains(dropDownBaseClasses.focus)
21042
+ || this.liCollections[index].classList.contains(dropDownBaseClasses.selected)) {
21043
+ itemIndex = index;
21044
+ break;
21045
+ }
21046
+ }
21047
+ if (itemIndex != null && this.isDisabledElement(this.liCollections[itemIndex])) {
21048
+ this.updateUpDownAction(e);
21049
+ }
20734
21050
  if (this.isPopupOpen) {
20735
21051
  e.preventDefault();
20736
21052
  }
@@ -20906,7 +21222,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
20906
21222
  if (!isNullOrUndefined(ulElement)) {
20907
21223
  attributes(ulElement, { 'id': this.inputElement.id + '_options', 'role': 'listbox', 'aria-hidden': 'false' });
20908
21224
  }
20909
- var focusItem = ulElement.querySelector('.' + dropDownBaseClasses.li);
21225
+ var focusItem = this.fields.disabled ? ulElement.querySelector('.' + dropDownBaseClasses.li + ':not(.e-disabled)') : ulElement.querySelector('.' + dropDownBaseClasses.li);
20910
21226
  if (focusItem) {
20911
21227
  focusItem.classList.add(dropDownBaseClasses.selected);
20912
21228
  this.selectedLI = focusItem;
@@ -21135,10 +21451,10 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
21135
21451
  }
21136
21452
  }
21137
21453
  append([_this.list], popupEle_1);
21138
- if (_this.inputElement.parentElement && _this.inputElement.parentElement.parentElement &&
21139
- _this.inputElement.parentElement.parentElement.classList.contains('e-richtexteditor')) {
21140
- if (popupEle_1.firstElementChild && popupEle_1.firstElementChild.childElementCount > 0) {
21141
- popupEle_1.firstElementChild.setAttribute('aria-owns', _this.inputElement.parentElement.parentElement.id);
21454
+ if (_this.inputElement.parentElement) {
21455
+ var rteRootElement = _this.inputElement.parentElement.closest('.e-richtexteditor');
21456
+ if (rteRootElement && popupEle_1.firstElementChild && popupEle_1.firstElementChild.childElementCount > 0) {
21457
+ popupEle_1.firstElementChild.setAttribute('aria-owns', rteRootElement.id);
21142
21458
  addClass([popupEle_1], 'e-rte-elements');
21143
21459
  }
21144
21460
  }
@@ -21441,7 +21757,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
21441
21757
  Mention.prototype.onMouseClick = function (e) {
21442
21758
  var target = e.target;
21443
21759
  var li = closest(target, '.' + dropDownBaseClasses.li);
21444
- if (!this.isValidLI(li)) {
21760
+ if (!this.isValidLI(li) || this.isDisabledElement(li)) {
21445
21761
  return;
21446
21762
  }
21447
21763
  this.isSelected = true;
@@ -21672,6 +21988,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
21672
21988
  }
21673
21989
  this.isTyped = false;
21674
21990
  range.deleteContents();
21991
+ range.startContainer.parentElement.normalize();
21675
21992
  var element = this.createElement('div');
21676
21993
  element.innerHTML = value;
21677
21994
  var frag = document.createDocumentFragment();
@@ -21697,7 +22014,6 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
21697
22014
  var event_1 = new CustomEvent('content-changed', { detail: { click: true } });
21698
22015
  this.inputElement.dispatchEvent(event_1);
21699
22016
  }
21700
-
21701
22017
  this.onChangeEvent(e);
21702
22018
  }
21703
22019
  };
@@ -21708,10 +22024,10 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
21708
22024
  }
21709
22025
  if (this.isContentEditable(this.inputElement)) {
21710
22026
  if (Browser.isAndroid) {
21711
- return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : ' ');
22027
+ return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '');
21712
22028
  }
21713
22029
  else {
21714
- return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : ' ');
22030
+ return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '');
21715
22031
  }
21716
22032
  }
21717
22033
  else {
@@ -22068,13 +22384,5 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
22068
22384
  return Mention;
22069
22385
  }(DropDownBase));
22070
22386
 
22071
- /**
22072
- * export all modules from current location
22073
- */
22074
-
22075
- /**
22076
- * export all modules from current location
22077
- */
22078
-
22079
- export { incrementalSearch, Search, escapeCharRegExp, resetIncrementalSearchValues, highlightSearch, revertHighlightSearch, VirtualScroll, FieldSettings, dropDownBaseClasses, DropDownBase, dropDownListClasses, DropDownList, Fields, TreeSettings, DropDownTree, ComboBox, AutoComplete, MultiSelect, CheckBoxSelection, createFloatLabel, updateFloatLabelState, removeFloating, setPlaceHolder, floatLabelFocus, floatLabelBlur, encodePlaceholder, SelectionSettings, ToolbarSettings, ListBox, Mention };
22387
+ export { AutoComplete, CheckBoxSelection, ComboBox, DropDownBase, DropDownList, DropDownTree, FieldSettings, Fields, ListBox, Mention, MultiSelect, Search, SelectionSettings, ToolbarSettings, TreeSettings, VirtualScroll, createFloatLabel, dropDownBaseClasses, dropDownListClasses, encodePlaceholder, escapeCharRegExp, floatLabelBlur, floatLabelFocus, highlightSearch, incrementalSearch, removeFloating, resetIncrementalSearchValues, revertHighlightSearch, setPlaceHolder, updateFloatLabelState };
22080
22388
  //# sourceMappingURL=ej2-dropdowns.es5.js.map