@syncfusion/ej2-dropdowns 25.2.7 → 26.1.35

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 (266) 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 +505 -224
  6. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  7. package/dist/es6/ej2-dropdowns.es5.js +498 -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 +52 -38
  25. package/src/list-box/list-box.js +30 -9
  26. package/src/mention/mention.js +23 -8
  27. package/src/multi-select/interface.js +0 -1
  28. package/src/multi-select/multi-select.d.ts +15 -0
  29. package/src/multi-select/multi-select.js +135 -12
  30. package/styles/auto-complete/_bootstrap5.3-definition.scss +2 -0
  31. package/styles/auto-complete/_fluent2-definition.scss +2 -0
  32. package/styles/auto-complete/bootstrap-dark.css +5 -2
  33. package/styles/auto-complete/bootstrap.css +5 -2
  34. package/styles/auto-complete/bootstrap4.css +6 -2
  35. package/styles/auto-complete/bootstrap5-dark.css +6 -2
  36. package/styles/auto-complete/bootstrap5.css +6 -2
  37. package/styles/auto-complete/fabric-dark.css +3 -1
  38. package/styles/auto-complete/fabric.css +3 -1
  39. package/styles/auto-complete/fluent-dark.css +6 -2
  40. package/styles/auto-complete/fluent.css +6 -2
  41. package/styles/auto-complete/fluent2.css +1140 -0
  42. package/styles/auto-complete/fluent2.scss +4 -0
  43. package/styles/auto-complete/highcontrast-light.css +3 -1
  44. package/styles/auto-complete/highcontrast.css +3 -1
  45. package/styles/auto-complete/material-dark.css +16 -5
  46. package/styles/auto-complete/material.css +16 -5
  47. package/styles/auto-complete/material3-dark.css +17 -6
  48. package/styles/auto-complete/material3.css +17 -6
  49. package/styles/auto-complete/tailwind-dark.css +16 -5
  50. package/styles/auto-complete/tailwind.css +16 -5
  51. package/styles/bootstrap-dark.css +196 -228
  52. package/styles/bootstrap-dark.scss +28 -8
  53. package/styles/bootstrap.css +196 -228
  54. package/styles/bootstrap.scss +28 -8
  55. package/styles/bootstrap4.css +199 -229
  56. package/styles/bootstrap4.scss +28 -8
  57. package/styles/bootstrap5-dark.css +196 -221
  58. package/styles/bootstrap5-dark.scss +28 -8
  59. package/styles/bootstrap5.css +196 -221
  60. package/styles/bootstrap5.scss +28 -8
  61. package/styles/combo-box/_bootstrap5.3-definition.scss +2 -0
  62. package/styles/combo-box/_fluent2-definition.scss +2 -0
  63. package/styles/combo-box/bootstrap-dark.css +5 -2
  64. package/styles/combo-box/bootstrap.css +5 -2
  65. package/styles/combo-box/bootstrap4.css +6 -2
  66. package/styles/combo-box/bootstrap5-dark.css +6 -2
  67. package/styles/combo-box/bootstrap5.css +6 -2
  68. package/styles/combo-box/fabric-dark.css +3 -1
  69. package/styles/combo-box/fabric.css +3 -1
  70. package/styles/combo-box/fluent-dark.css +6 -2
  71. package/styles/combo-box/fluent.css +6 -2
  72. package/styles/combo-box/fluent2.css +1140 -0
  73. package/styles/combo-box/fluent2.scss +4 -0
  74. package/styles/combo-box/highcontrast-light.css +3 -1
  75. package/styles/combo-box/highcontrast.css +3 -1
  76. package/styles/combo-box/material-dark.css +16 -5
  77. package/styles/combo-box/material.css +16 -5
  78. package/styles/combo-box/material3-dark.css +17 -6
  79. package/styles/combo-box/material3.css +17 -6
  80. package/styles/combo-box/tailwind-dark.css +16 -5
  81. package/styles/combo-box/tailwind.css +16 -5
  82. package/styles/drop-down-base/_bds-definition.scss +2 -2
  83. package/styles/drop-down-base/_bootstrap5.3-definition.scss +117 -0
  84. package/styles/drop-down-base/_fluent2-definition.scss +134 -0
  85. package/styles/drop-down-base/_layout.scss +12 -2
  86. package/styles/drop-down-base/_material3-definition.scss +0 -11
  87. package/styles/drop-down-base/_theme.scss +2 -11
  88. package/styles/drop-down-base/bootstrap-dark.css +2 -1
  89. package/styles/drop-down-base/bootstrap.css +2 -1
  90. package/styles/drop-down-base/bootstrap4.css +2 -1
  91. package/styles/drop-down-base/bootstrap5-dark.css +2 -1
  92. package/styles/drop-down-base/bootstrap5.css +2 -1
  93. package/styles/drop-down-base/fabric-dark.css +2 -1
  94. package/styles/drop-down-base/fabric.css +2 -1
  95. package/styles/drop-down-base/fluent-dark.css +2 -1
  96. package/styles/drop-down-base/fluent.css +2 -1
  97. package/styles/drop-down-base/fluent2.css +1447 -0
  98. package/styles/drop-down-base/fluent2.scss +3 -0
  99. package/styles/drop-down-base/highcontrast-light.css +2 -1
  100. package/styles/drop-down-base/highcontrast.css +2 -1
  101. package/styles/drop-down-base/material-dark.css +2 -1
  102. package/styles/drop-down-base/material.css +2 -1
  103. package/styles/drop-down-base/material3-dark.css +9 -2
  104. package/styles/drop-down-base/material3.css +9 -2
  105. package/styles/drop-down-base/tailwind-dark.css +2 -1
  106. package/styles/drop-down-base/tailwind.css +2 -1
  107. package/styles/drop-down-list/_bootstrap5.3-definition.scss +201 -0
  108. package/styles/drop-down-list/_fluent2-definition.scss +134 -0
  109. package/styles/drop-down-list/_layout.scss +5 -3
  110. package/styles/drop-down-list/_material3-definition.scss +0 -8
  111. package/styles/drop-down-list/bootstrap-dark.css +38 -3
  112. package/styles/drop-down-list/bootstrap.css +38 -3
  113. package/styles/drop-down-list/bootstrap4.css +39 -3
  114. package/styles/drop-down-list/bootstrap5-dark.css +39 -3
  115. package/styles/drop-down-list/bootstrap5.css +39 -3
  116. package/styles/drop-down-list/fabric-dark.css +36 -2
  117. package/styles/drop-down-list/fabric.css +36 -2
  118. package/styles/drop-down-list/fluent-dark.css +39 -3
  119. package/styles/drop-down-list/fluent.css +39 -3
  120. package/styles/drop-down-list/fluent2.css +1684 -0
  121. package/styles/drop-down-list/fluent2.scss +9 -0
  122. package/styles/drop-down-list/highcontrast-light.css +36 -2
  123. package/styles/drop-down-list/highcontrast.css +36 -2
  124. package/styles/drop-down-list/icons/_bootstrap5.3.scss +14 -0
  125. package/styles/drop-down-list/icons/_fluent2.scss +14 -0
  126. package/styles/drop-down-list/material-dark.css +58 -7
  127. package/styles/drop-down-list/material.css +72 -9
  128. package/styles/drop-down-list/material3-dark.css +74 -10
  129. package/styles/drop-down-list/material3.css +74 -10
  130. package/styles/drop-down-list/tailwind-dark.css +49 -6
  131. package/styles/drop-down-list/tailwind.css +49 -6
  132. package/styles/drop-down-tree/_bds-definition.scss +5 -0
  133. package/styles/drop-down-tree/_bootstrap4-definition.scss +1 -0
  134. package/styles/drop-down-tree/_bootstrap5-definition.scss +5 -0
  135. package/styles/drop-down-tree/_bootstrap5.3-definition.scss +66 -0
  136. package/styles/drop-down-tree/_fluent-definition.scss +4 -0
  137. package/styles/drop-down-tree/_fluent2-definition.scss +75 -0
  138. package/styles/drop-down-tree/_layout.scss +289 -327
  139. package/styles/drop-down-tree/_material3-definition.scss +3 -5
  140. package/styles/drop-down-tree/_tailwind-definition.scss +7 -2
  141. package/styles/drop-down-tree/_theme.scss +24 -41
  142. package/styles/drop-down-tree/bootstrap-dark.css +63 -29
  143. package/styles/drop-down-tree/bootstrap.css +63 -29
  144. package/styles/drop-down-tree/bootstrap4.css +64 -30
  145. package/styles/drop-down-tree/bootstrap5-dark.css +63 -27
  146. package/styles/drop-down-tree/bootstrap5.css +63 -27
  147. package/styles/drop-down-tree/fabric-dark.css +63 -29
  148. package/styles/drop-down-tree/fabric.css +63 -29
  149. package/styles/drop-down-tree/fluent-dark.css +71 -35
  150. package/styles/drop-down-tree/fluent.css +71 -35
  151. package/styles/drop-down-tree/fluent2.css +1732 -0
  152. package/styles/drop-down-tree/fluent2.scss +9 -0
  153. package/styles/drop-down-tree/highcontrast-light.css +63 -29
  154. package/styles/drop-down-tree/highcontrast.css +63 -23
  155. package/styles/drop-down-tree/icons/_bootstrap5.3.scss +11 -0
  156. package/styles/drop-down-tree/icons/_fluent2.scss +14 -0
  157. package/styles/drop-down-tree/material-dark.css +80 -43
  158. package/styles/drop-down-tree/material.css +97 -51
  159. package/styles/drop-down-tree/material3-dark.css +85 -32
  160. package/styles/drop-down-tree/material3.css +85 -32
  161. package/styles/drop-down-tree/tailwind-dark.css +72 -28
  162. package/styles/drop-down-tree/tailwind.css +72 -28
  163. package/styles/fabric-dark.css +194 -227
  164. package/styles/fabric-dark.scss +28 -8
  165. package/styles/fabric.css +194 -227
  166. package/styles/fabric.scss +28 -8
  167. package/styles/fluent-dark.css +206 -236
  168. package/styles/fluent-dark.scss +28 -8
  169. package/styles/fluent.css +206 -236
  170. package/styles/fluent.scss +28 -8
  171. package/styles/fluent2.css +4771 -0
  172. package/styles/fluent2.scss +28 -0
  173. package/styles/highcontrast-light.css +197 -227
  174. package/styles/highcontrast-light.scss +28 -8
  175. package/styles/highcontrast.css +197 -221
  176. package/styles/highcontrast.scss +28 -8
  177. package/styles/list-box/_bootstrap-dark-definition.scss +0 -2
  178. package/styles/list-box/_bootstrap5.3-definition.scss +120 -0
  179. package/styles/list-box/_fabric-dark-definition.scss +0 -2
  180. package/styles/list-box/_fluent2-definition.scss +121 -0
  181. package/styles/list-box/_highcontrast-light-definition.scss +0 -2
  182. package/styles/list-box/_layout.scss +65 -44
  183. package/styles/list-box/_material-dark-definition.scss +0 -2
  184. package/styles/list-box/_tailwind-definition.scss +1 -1
  185. package/styles/list-box/_theme.scss +36 -65
  186. package/styles/list-box/bootstrap-dark.css +72 -112
  187. package/styles/list-box/bootstrap.css +72 -112
  188. package/styles/list-box/bootstrap4.css +72 -112
  189. package/styles/list-box/bootstrap5-dark.css +72 -106
  190. package/styles/list-box/bootstrap5.css +72 -106
  191. package/styles/list-box/fabric-dark.css +72 -112
  192. package/styles/list-box/fabric.css +72 -112
  193. package/styles/list-box/fluent-dark.css +72 -112
  194. package/styles/list-box/fluent.css +72 -112
  195. package/styles/list-box/fluent2.css +2029 -0
  196. package/styles/list-box/fluent2.scss +5 -0
  197. package/styles/list-box/highcontrast-light.css +72 -112
  198. package/styles/list-box/highcontrast.css +72 -112
  199. package/styles/list-box/icons/_bootstrap5.3.scss +25 -0
  200. package/styles/list-box/icons/_fluent2.scss +25 -0
  201. package/styles/list-box/material-dark.css +72 -112
  202. package/styles/list-box/material.css +72 -112
  203. package/styles/list-box/material3-dark.css +73 -113
  204. package/styles/list-box/material3.css +73 -113
  205. package/styles/list-box/tailwind-dark.css +74 -114
  206. package/styles/list-box/tailwind.css +74 -114
  207. package/styles/material-dark.css +236 -260
  208. package/styles/material-dark.scss +28 -8
  209. package/styles/material.css +253 -284
  210. package/styles/material.scss +28 -8
  211. package/styles/material3-dark.css +253 -266
  212. package/styles/material3-dark.scss +28 -8
  213. package/styles/material3.css +253 -266
  214. package/styles/material3.scss +28 -8
  215. package/styles/mention/_bootstrap5.3-definition.scss +1 -0
  216. package/styles/mention/_fluent2-definition.scss +1 -0
  217. package/styles/mention/bootstrap-dark.css +24 -0
  218. package/styles/mention/bootstrap.css +24 -0
  219. package/styles/mention/bootstrap4.css +24 -0
  220. package/styles/mention/bootstrap5-dark.css +24 -0
  221. package/styles/mention/bootstrap5.css +24 -0
  222. package/styles/mention/fabric-dark.css +24 -0
  223. package/styles/mention/fabric.css +24 -0
  224. package/styles/mention/fluent-dark.css +24 -0
  225. package/styles/mention/fluent.css +24 -0
  226. package/styles/mention/fluent2.css +1130 -0
  227. package/styles/mention/fluent2.scss +6 -0
  228. package/styles/mention/highcontrast-light.css +24 -0
  229. package/styles/mention/highcontrast.css +24 -0
  230. package/styles/mention/material-dark.css +24 -0
  231. package/styles/mention/material.css +24 -0
  232. package/styles/mention/material3-dark.css +25 -1
  233. package/styles/mention/material3.css +25 -1
  234. package/styles/mention/tailwind-dark.css +24 -0
  235. package/styles/mention/tailwind.css +24 -0
  236. package/styles/multi-select/_bootstrap5.3-definition.scss +230 -0
  237. package/styles/multi-select/_fluent2-definition.scss +236 -0
  238. package/styles/multi-select/_layout.scss +32 -38
  239. package/styles/multi-select/_material3-definition.scss +0 -15
  240. package/styles/multi-select/_theme.scss +0 -4
  241. package/styles/multi-select/bootstrap-dark.css +67 -28
  242. package/styles/multi-select/bootstrap.css +67 -28
  243. package/styles/multi-select/bootstrap4.css +70 -29
  244. package/styles/multi-select/bootstrap5-dark.css +67 -28
  245. package/styles/multi-select/bootstrap5.css +67 -28
  246. package/styles/multi-select/fabric-dark.css +67 -28
  247. package/styles/multi-select/fabric.css +67 -28
  248. package/styles/multi-select/fluent-dark.css +69 -29
  249. package/styles/multi-select/fluent.css +69 -29
  250. package/styles/multi-select/fluent2.css +2663 -0
  251. package/styles/multi-select/fluent2.scss +9 -0
  252. package/styles/multi-select/highcontrast-light.css +70 -28
  253. package/styles/multi-select/highcontrast.css +70 -28
  254. package/styles/multi-select/icons/_bootstrap5.3.scss +26 -0
  255. package/styles/multi-select/icons/_fluent2.scss +692 -0
  256. package/styles/multi-select/material-dark.css +88 -32
  257. package/styles/multi-select/material.css +102 -34
  258. package/styles/multi-select/material3-dark.css +109 -35
  259. package/styles/multi-select/material3.css +109 -35
  260. package/styles/multi-select/tailwind-dark.css +67 -28
  261. package/styles/multi-select/tailwind.css +67 -28
  262. package/styles/tailwind-dark.css +217 -233
  263. package/styles/tailwind-dark.scss +28 -8
  264. package/styles/tailwind.css +217 -233
  265. package/styles/tailwind.scss +28 -8
  266. 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, ChildProperty, Property, Component, selectAll, compile, L10n, addClass, removeClass, extend, append, setStyleAttribute, prepend, rippleEffect, detach, Complex, Event, NotifyPropertyChanges, 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
  let queryString = '';
14
14
  let prevString = '';
15
15
  let tempQueryString = '';
16
- let matches$1 = [];
16
+ let matches = [];
17
17
  const activeClass = 'e-active';
18
18
  let prevElementId = '';
19
19
  /**
@@ -56,21 +56,21 @@ function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId,
56
56
  let index;
57
57
  queryString = ignoreCase ? queryString.toLowerCase() : queryString;
58
58
  if (prevElementId === elementId && prevString === queryString && !refresh) {
59
- for (let i = 0; i < matches$1.length; i++) {
60
- if (matches$1[i].classList.contains(activeClass)) {
59
+ for (let 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
  const listItems = items;
@@ -79,7 +79,7 @@ function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId,
79
79
  let item;
80
80
  selectedIndex = selectedIndex ? selectedIndex + 1 : 0;
81
81
  let 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 (let i = 0; i < matches$1.length; i++) {
105
- if (currentValue && matches$1[i].textContent.toLowerCase() === currentValue.toLowerCase()) {
104
+ for (let i = 0; i < matches.length; i++) {
105
+ if (currentValue && matches[i].textContent.toLowerCase() === currentValue.toLowerCase()) {
106
106
  index = i;
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
  /**
@@ -171,7 +171,7 @@ function resetIncrementalSearchValues(elementId) {
171
171
  prevElementId = '';
172
172
  prevString = '';
173
173
  queryString = '';
174
- matches$1 = [];
174
+ matches = [];
175
175
  }
176
176
  }
177
177
 
@@ -507,6 +507,7 @@ class VirtualScroll {
507
507
  this.parent.updatevirtualizationList();
508
508
  }
509
509
  this.parent.getSkeletonCount();
510
+ this.parent.skeletonCount = this.parent.totalItemCount != 0 && this.parent.totalItemCount < (this.parent.itemCount * 2) ? 0 : this.parent.skeletonCount;
510
511
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
511
512
  const virtualTrackElement = this.parent.list.getElementsByClassName('e-virtual-ddl')[0];
512
513
  if (virtualTrackElement) {
@@ -731,10 +732,6 @@ class VirtualScroll {
731
732
  }
732
733
  }
733
734
 
734
- /**
735
- * Common source
736
- */
737
-
738
735
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
739
736
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
740
737
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -758,6 +755,9 @@ __decorate([
758
755
  __decorate([
759
756
  Property()
760
757
  ], FieldSettings.prototype, "htmlAttributes", void 0);
758
+ __decorate([
759
+ Property()
760
+ ], FieldSettings.prototype, "disabled", void 0);
761
761
  const dropDownBaseClasses = {
762
762
  root: 'e-dropdownbase',
763
763
  rtl: 'e-rtl',
@@ -797,7 +797,6 @@ let DropDownBase = class DropDownBase extends Component {
797
797
  constructor(options, element) {
798
798
  super(options, element);
799
799
  this.preventChange = false;
800
- this.isAngular = false;
801
800
  this.isPreventChange = false;
802
801
  this.isDynamicDataChange = false;
803
802
  this.addedNewItem = false;
@@ -1005,7 +1004,7 @@ let DropDownBase = class DropDownBase extends Component {
1005
1004
  }
1006
1005
  l10nUpdate(actionFailure) {
1007
1006
  const ele = this.getModuleName() === 'listbox' ? this.ulElement : this.list;
1008
- if (this.noRecordsTemplate !== 'No records found' || this.actionFailureTemplate !== 'Request failed') {
1007
+ if ((!isNullOrUndefined(this.noRecordsTemplate) && this.noRecordsTemplate !== 'No records found') || this.actionFailureTemplate !== 'Request failed') {
1009
1008
  const template = actionFailure ? this.actionFailureTemplate : this.noRecordsTemplate;
1010
1009
  let compiledString;
1011
1010
  const templateId = actionFailure ? this.actionFailureTemplateId : this.noRecordsTemplateId;
@@ -1167,7 +1166,7 @@ let DropDownBase = class DropDownBase extends Component {
1167
1166
  getTransformValues() {
1168
1167
  let translateY = this.viewPortInfo.startIndex * this.listItemHeight;
1169
1168
  translateY = translateY - (this.skeletonCount * this.listItemHeight);
1170
- translateY = this.viewPortInfo.startIndex === 0 && this.listData && this.listData.length === 0 ? 0 : translateY;
1169
+ translateY = ((this.viewPortInfo.startIndex === 0 && this.listData && this.listData.length === 0) || this.skeletonCount === 0) ? 0 : translateY;
1171
1170
  const styleText = `transform: translate(0px, ${translateY}px);`;
1172
1171
  return styleText;
1173
1172
  }
@@ -1312,17 +1311,18 @@ let DropDownBase = class DropDownBase extends Component {
1312
1311
  }
1313
1312
  element.querySelectorAll('select>option');
1314
1313
  }
1315
- this.updateFields(fields.text, fields.value, this.fields.groupBy, this.fields.htmlAttributes, this.fields.iconCss);
1314
+ this.updateFields(fields.text, fields.value, this.fields.groupBy, this.fields.htmlAttributes, this.fields.iconCss, this.fields.disabled);
1316
1315
  this.resetList(jsonElement, fields);
1317
1316
  }
1318
- updateFields(text, value, groupBy, htmlAttributes, iconCss) {
1317
+ updateFields(text, value, groupBy, htmlAttributes, iconCss, disabled) {
1319
1318
  const field = {
1320
1319
  'fields': {
1321
1320
  text: text,
1322
1321
  value: value,
1323
1322
  groupBy: !isNullOrUndefined(groupBy) ? groupBy : this.fields && this.fields.groupBy,
1324
1323
  htmlAttributes: !isNullOrUndefined(htmlAttributes) ? htmlAttributes : this.fields && this.fields.htmlAttributes,
1325
- iconCss: !isNullOrUndefined(iconCss) ? iconCss : this.fields && this.fields.iconCss
1324
+ iconCss: !isNullOrUndefined(iconCss) ? iconCss : this.fields && this.fields.iconCss,
1325
+ disabled: !isNullOrUndefined(disabled) ? disabled : this.fields && this.fields.disabled
1326
1326
  }
1327
1327
  };
1328
1328
  this.setProperties(field, true);
@@ -1690,8 +1690,16 @@ let DropDownBase = class DropDownBase extends Component {
1690
1690
  }
1691
1691
  /* eslint-disable @typescript-eslint/no-unused-vars */
1692
1692
  postRender(listElement, list, bindEvent) {
1693
+ if (this.fields.disabled) {
1694
+ const liCollections = listElement.querySelectorAll('.' + dropDownBaseClasses.li);
1695
+ for (let index = 0; index < liCollections.length; index++) {
1696
+ if (JSON.parse(JSON.stringify(this.listData[index]))[this.fields.disabled]) {
1697
+ this.disableListItem(liCollections[index]);
1698
+ }
1699
+ }
1700
+ }
1693
1701
  /* eslint-enable @typescript-eslint/no-unused-vars */
1694
- const focusItem = listElement.querySelector('.' + dropDownBaseClasses.li);
1702
+ const focusItem = this.fields.disabled ? listElement.querySelector('.' + dropDownBaseClasses.li + ':not(.e-disabled') : listElement.querySelector('.' + dropDownBaseClasses.li);
1695
1703
  const selectedItem = listElement.querySelector('.' + dropDownBaseClasses.selected);
1696
1704
  if (focusItem && !selectedItem) {
1697
1705
  focusItem.classList.add(dropDownBaseClasses.focus);
@@ -1826,9 +1834,7 @@ let DropDownBase = class DropDownBase extends Component {
1826
1834
  break;
1827
1835
  }
1828
1836
  if (isDownkey) {
1829
- 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')) {
1830
-
1831
- }
1837
+ 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')) ;
1832
1838
  }
1833
1839
  }
1834
1840
  else {
@@ -2039,7 +2045,13 @@ let DropDownBase = class DropDownBase extends Component {
2039
2045
  */
2040
2046
  getIndexByValue(value) {
2041
2047
  let index;
2042
- const listItems = this.getItems();
2048
+ let listItems = [];
2049
+ if (this.fields.disabled && this.getModuleName() === 'multiselect' && this.liCollections) {
2050
+ listItems = this.liCollections;
2051
+ }
2052
+ else {
2053
+ listItems = this.getItems();
2054
+ }
2043
2055
  for (let i = 0; i < listItems.length; i++) {
2044
2056
  if (!isNullOrUndefined(value) && listItems[i].getAttribute('data-value') === value.toString()) {
2045
2057
  index = i;
@@ -2327,6 +2339,9 @@ let DropDownBase = class DropDownBase extends Component {
2327
2339
  this.notify('addItem', { module: 'CheckBoxSelection', item: li });
2328
2340
  liCollections.push(li);
2329
2341
  if (this.getModuleName() === 'listbox') {
2342
+ if (item.disabled) {
2343
+ li.classList.add('e-disabled');
2344
+ }
2330
2345
  this.listData.splice(isListboxEmpty ? this.listData.length : index, 0, item);
2331
2346
  if (this.listData.length !== this.sortedData.length) {
2332
2347
  this.sortedData = this.listData;
@@ -2412,18 +2427,53 @@ let DropDownBase = class DropDownBase extends Component {
2412
2427
  }
2413
2428
  this.addedNewItem = true;
2414
2429
  }
2430
+ /**
2431
+ * Checks if the given HTML element is disabled.
2432
+ *
2433
+ * @param {HTMLElement} li - The HTML element to check.
2434
+ * @returns {boolean} - Returns true if the element is disabled, otherwise false.
2435
+ */
2436
+ isDisabledElement(li) {
2437
+ if (li && li.classList.contains('e-disabled')) {
2438
+ return true;
2439
+ }
2440
+ return false;
2441
+ }
2442
+ /**
2443
+ * Checks whether the list item at the specified index is disabled.
2444
+ *
2445
+ * @param {number} index - The index of the list item to check.
2446
+ * @returns {boolean} True if the list item is disabled, false otherwise.
2447
+ */
2448
+ isDisabledItemByIndex(index) {
2449
+ if (this.fields.disabled && this.liCollections) {
2450
+ return this.isDisabledElement(this.liCollections[index]);
2451
+ }
2452
+ return false;
2453
+ }
2454
+ /**
2455
+ * Disables the given list item.
2456
+ *
2457
+ * @param { HTMLLIElement } li - The list item to disable.
2458
+ * @returns {void}
2459
+ */
2460
+ disableListItem(li) {
2461
+ li.classList.add('e-disabled');
2462
+ li.setAttribute('aria-disabled', 'true');
2463
+ li.setAttribute('aria-selected', 'false');
2464
+ }
2415
2465
  validationAttribute(target, hidden) {
2416
2466
  const name = target.getAttribute('name') ? target.getAttribute('name') : target.getAttribute('id');
2417
2467
  hidden.setAttribute('name', name);
2418
2468
  target.removeAttribute('name');
2419
- const attributes$$1 = ['required', 'aria-required', 'form'];
2420
- for (let i = 0; i < attributes$$1.length; i++) {
2421
- if (!target.getAttribute(attributes$$1[i])) {
2469
+ const attributes = ['required', 'aria-required', 'form'];
2470
+ for (let i = 0; i < attributes.length; i++) {
2471
+ if (!target.getAttribute(attributes[i])) {
2422
2472
  continue;
2423
2473
  }
2424
- const attr = target.getAttribute(attributes$$1[i]);
2425
- hidden.setAttribute(attributes$$1[i], attr);
2426
- target.removeAttribute(attributes$$1[i]);
2474
+ const attr = target.getAttribute(attributes[i]);
2475
+ hidden.setAttribute(attributes[i], attr);
2476
+ target.removeAttribute(attributes[i]);
2427
2477
  }
2428
2478
  }
2429
2479
  setZIndex() {
@@ -2494,7 +2544,7 @@ let DropDownBase = class DropDownBase extends Component {
2494
2544
  }
2495
2545
  };
2496
2546
  __decorate([
2497
- Complex({ text: null, value: null, iconCss: null, groupBy: null }, FieldSettings)
2547
+ Complex({ text: null, value: null, iconCss: null, groupBy: null, disabled: null }, FieldSettings)
2498
2548
  ], DropDownBase.prototype, "fields", void 0);
2499
2549
  __decorate([
2500
2550
  Property(null)
@@ -2557,18 +2607,12 @@ DropDownBase = __decorate([
2557
2607
  NotifyPropertyChanges
2558
2608
  ], DropDownBase);
2559
2609
 
2560
- /**
2561
- * export all modules from current location
2562
- */
2563
-
2564
2610
  var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2565
2611
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2566
2612
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2567
2613
  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;
2568
2614
  return c > 3 && r && Object.defineProperty(target, key, r), r;
2569
2615
  };
2570
- // eslint-disable-next-line @typescript-eslint/triple-slash-reference
2571
- /// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>
2572
2616
  // don't use space in classnames
2573
2617
  const dropDownListClasses = {
2574
2618
  root: 'e-dropdownlist',
@@ -2627,17 +2671,10 @@ let DropDownList = class DropDownList extends DropDownBase {
2627
2671
  super(options, element);
2628
2672
  this.isListSearched = false;
2629
2673
  this.preventChange = false;
2630
- this.isAngular = false;
2631
2674
  this.isTouched = false;
2632
2675
  this.IsScrollerAtEnd = function () {
2633
2676
  return this.list && this.list.scrollTop + this.list.clientHeight >= this.list.scrollHeight;
2634
2677
  };
2635
- this.removeAllChildren = function (element) {
2636
- while (element.children[0]) {
2637
- this.removeAllChildren(element.children[0]);
2638
- element.removeChild(element.children[0]);
2639
- }
2640
- };
2641
2678
  }
2642
2679
  /**
2643
2680
  * Initialize the event handler.
@@ -2757,7 +2794,7 @@ let DropDownList = class DropDownList extends DropDownBase {
2757
2794
  this.removeFocus();
2758
2795
  this.list.scrollTop = 0;
2759
2796
  if (this.getModuleName() !== 'autocomplete' && !isNullOrUndefined(this.ulElement)) {
2760
- let li = this.ulElement.querySelector('.' + dropDownListClasses.li);
2797
+ let li = this.fields.disabled ? this.ulElement.querySelector('.' + dropDownListClasses.li + ':not(.e-disabled)') : this.ulElement.querySelector('.' + dropDownListClasses.li);
2761
2798
  if (this.enableVirtualization) {
2762
2799
  li = this.liCollections[this.skeletonCount];
2763
2800
  }
@@ -2960,7 +2997,32 @@ let DropDownList = class DropDownList extends DropDownBase {
2960
2997
  this.updateValues();
2961
2998
  }
2962
2999
  }
3000
+ /**
3001
+ * Checks if the given value is disabled.
3002
+ *
3003
+ * @param { string | number | boolean | object } value - The value to check for disablement. Can be a string, number, boolean, or object.
3004
+ * @returns { boolean } A boolean indicating whether the value is disabled.
3005
+ */
3006
+ isDisableItemValue(value) {
3007
+ if (typeof (value) === 'object') {
3008
+ const objectValue = JSON.parse(JSON.stringify(value))[this.fields.value];
3009
+ return this.isDisabledItemByIndex(this.getIndexByValue(objectValue));
3010
+ }
3011
+ return this.isDisabledItemByIndex(this.getIndexByValue(value));
3012
+ }
2963
3013
  updateValues() {
3014
+ if (this.fields.disabled) {
3015
+ if (this.value != null) {
3016
+ this.value = !this.isDisableItemValue(this.value) ? this.value : null;
3017
+ }
3018
+ if (this.text != null) {
3019
+ this.text = !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
3020
+ }
3021
+ if (this.index != null) {
3022
+ this.index = !this.isDisabledItemByIndex(this.index) ? this.index : null;
3023
+ this.activeIndex = this.index;
3024
+ }
3025
+ }
2964
3026
  this.selectedValueInfo = this.viewPortInfo;
2965
3027
  if (!isNullOrUndefined(this.value)) {
2966
3028
  const value = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue(((this.fields.value) ? this.fields.value : ''), this.value) : this.value;
@@ -3153,7 +3215,7 @@ let DropDownList = class DropDownList extends DropDownBase {
3153
3215
  const target = e.target;
3154
3216
  this.keyboardEvent = null;
3155
3217
  const li = closest(target, '.' + dropDownBaseClasses.li);
3156
- if (!this.isValidLI(li)) {
3218
+ if (!this.isValidLI(li) || this.isDisabledElement(li)) {
3157
3219
  return;
3158
3220
  }
3159
3221
  this.setSelection(li, e);
@@ -3297,7 +3359,14 @@ let DropDownList = class DropDownList extends DropDownBase {
3297
3359
  }
3298
3360
  }
3299
3361
  else {
3300
- const li = incrementalSearch(e.charCode, this.liCollections, this.activeIndex, true, this.element.id);
3362
+ let li;
3363
+ if (this.fields.disabled) {
3364
+ const enableLiCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li + ':not(.e-disabled)');
3365
+ li = incrementalSearch(e.charCode, enableLiCollections, this.activeIndex, true, this.element.id);
3366
+ }
3367
+ else {
3368
+ li = incrementalSearch(e.charCode, this.liCollections, this.activeIndex, true, this.element.id);
3369
+ }
3301
3370
  if (!isNullOrUndefined(li)) {
3302
3371
  this.setSelection(li, e);
3303
3372
  this.setScrollPosition();
@@ -3427,6 +3496,9 @@ let DropDownList = class DropDownList extends DropDownBase {
3427
3496
  }
3428
3497
  }
3429
3498
  updateUpDownAction(e, isVirtualKeyAction) {
3499
+ if (this.fields.disabled && this.list && this.list.querySelectorAll('.e-list-item:not(.e-disabled)').length === 0) {
3500
+ return;
3501
+ }
3430
3502
  if (this.allowFiltering && !this.enableVirtualization && this.getModuleName() !== 'autocomplete') {
3431
3503
  let value = this.getItemData().value;
3432
3504
  if (isNullOrUndefined(value)) {
@@ -3537,6 +3609,25 @@ let DropDownList = class DropDownList extends DropDownBase {
3537
3609
  attributes(this.filterInput, { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-active')[0].id });
3538
3610
  }
3539
3611
  }
3612
+ let itemIndex;
3613
+ for (let index = 0; index < this.liCollections.length; index++) {
3614
+ if (this.liCollections[index].classList.contains(dropDownListClasses.focus)
3615
+ || this.liCollections[index].classList.contains(dropDownListClasses.selected)) {
3616
+ itemIndex = index;
3617
+ break;
3618
+ }
3619
+ }
3620
+ if (itemIndex != null && this.isDisabledElement(this.liCollections[itemIndex])) {
3621
+ if (this.getModuleName() !== 'autocomplete') {
3622
+ if (this.liCollections.length - 1 === itemIndex && e.action === 'down') {
3623
+ e.action = 'up';
3624
+ }
3625
+ if (itemIndex === 0 && e.action === 'up') {
3626
+ e.action = 'down';
3627
+ }
3628
+ }
3629
+ this.updateUpDownAction(e);
3630
+ }
3540
3631
  e.preventDefault();
3541
3632
  }
3542
3633
  updateHomeEndAction(e, isVirtualKeyAction) {
@@ -3637,6 +3728,9 @@ let DropDownList = class DropDownList extends DropDownBase {
3637
3728
  selectCurrentItem(e) {
3638
3729
  if (this.isPopupOpen) {
3639
3730
  const li = this.list.querySelector('.' + dropDownListClasses.focus);
3731
+ if (this.isDisabledElement(li)) {
3732
+ return;
3733
+ }
3640
3734
  if (li) {
3641
3735
  this.setSelection(li, e);
3642
3736
  this.isTyped = false;
@@ -4319,7 +4413,6 @@ let DropDownList = class DropDownList extends DropDownBase {
4319
4413
  }
4320
4414
  }
4321
4415
  }
4322
- let skipExists = false;
4323
4416
  if (filterQuery && filterQuery.queries.length > 0) {
4324
4417
  for (let queryElements = 0; queryElements < filterQuery.queries.length; queryElements++) {
4325
4418
  if (filterQuery.queries[queryElements].fn === 'onSkip') {
@@ -4335,7 +4428,7 @@ let DropDownList = class DropDownList extends DropDownBase {
4335
4428
  }
4336
4429
  }
4337
4430
  }
4338
- if (!skipExists && (this.allowFiltering || !this.isPopupOpen || !alreadySkipAdded)) {
4431
+ if ( (this.allowFiltering || !this.isPopupOpen || !alreadySkipAdded)) {
4339
4432
  if (querySkipValue > 0) {
4340
4433
  filterQuery.skip(querySkipValue);
4341
4434
  }
@@ -5225,7 +5318,6 @@ let DropDownList = class DropDownList extends DropDownBase {
5225
5318
  this.list.scrollTop = this.virtualListInfo && this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight : 0;
5226
5319
  }
5227
5320
  isScrollerCHanged = this.isKeyBoardAction;
5228
-
5229
5321
  }
5230
5322
  this.isKeyBoardAction = isScrollerCHanged;
5231
5323
  if (this.enableVirtualization && this.fields.groupBy && this.fixedHeaderElement && (keyAction == "down")) {
@@ -5874,6 +5966,10 @@ let DropDownList = class DropDownList extends DropDownBase {
5874
5966
  this.setEnable();
5875
5967
  break;
5876
5968
  case 'text':
5969
+ if (this.fields.disabled) {
5970
+ newProp.text = newProp.text && !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(newProp.text)))
5971
+ ? newProp.text : null;
5972
+ }
5877
5973
  if (newProp.text === null) {
5878
5974
  this.clearAll();
5879
5975
  break;
@@ -5925,6 +6021,9 @@ let DropDownList = class DropDownList extends DropDownBase {
5925
6021
  }
5926
6022
  break;
5927
6023
  case 'value':
6024
+ if (this.fields.disabled) {
6025
+ newProp.value = newProp.value != null && !this.isDisableItemValue(newProp.value) ? newProp.value : null;
6026
+ }
5928
6027
  if (newProp.value === null) {
5929
6028
  this.clearAll();
5930
6029
  break;
@@ -5984,6 +6083,9 @@ let DropDownList = class DropDownList extends DropDownBase {
5984
6083
  }
5985
6084
  break;
5986
6085
  case 'index':
6086
+ if (this.fields.disabled) {
6087
+ newProp.index = newProp.index != null && !this.isDisabledItemByIndex(newProp.index) ? newProp.index : null;
6088
+ }
5987
6089
  if (newProp.index === null) {
5988
6090
  this.clearAll();
5989
6091
  break;
@@ -6293,6 +6395,65 @@ let DropDownList = class DropDownList extends DropDownBase {
6293
6395
  Input.calculateWidth(this.inputElement, this.inputWrapper.container);
6294
6396
  }
6295
6397
  }
6398
+ /**
6399
+ * Method to disable specific item in the popup.
6400
+ *
6401
+ * @param {string | number | object | HTMLLIElement} item - Specifies the item to be disabled.
6402
+ * @returns {void}
6403
+ * @deprecated
6404
+ */
6405
+ disableItem(item) {
6406
+ if (this.fields.disabled) {
6407
+ if (!this.list) {
6408
+ this.renderList();
6409
+ }
6410
+ let itemIndex = -1;
6411
+ if (this.liCollections && this.liCollections.length > 0 && this.listData && this.fields.disabled) {
6412
+ if (typeof (item) === 'string') {
6413
+ itemIndex = this.getIndexByValue(item);
6414
+ }
6415
+ else if (typeof item === 'object') {
6416
+ if (item instanceof HTMLLIElement) {
6417
+ for (let index = 0; index < this.liCollections.length; index++) {
6418
+ if (this.liCollections[index] === item) {
6419
+ itemIndex = this.getIndexByValue(item.getAttribute('data-value'));
6420
+ break;
6421
+ }
6422
+ }
6423
+ }
6424
+ else {
6425
+ const value = JSON.parse(JSON.stringify(item))[this.fields.value];
6426
+ for (let index = 0; index < this.listData.length; index++) {
6427
+ if (JSON.parse(JSON.stringify(this.listData[index]))[this.fields.value] === value) {
6428
+ itemIndex = this.getIndexByValue(value);
6429
+ break;
6430
+ }
6431
+ }
6432
+ }
6433
+ }
6434
+ else {
6435
+ itemIndex = item;
6436
+ }
6437
+ const isValidIndex = itemIndex < this.liCollections.length && itemIndex > -1;
6438
+ if (isValidIndex && !(JSON.parse(JSON.stringify(this.listData[itemIndex]))[this.fields.disabled])) {
6439
+ const li = this.liCollections[itemIndex];
6440
+ if (li) {
6441
+ this.disableListItem(li);
6442
+ const parsedData = JSON.parse(JSON.stringify(this.listData[itemIndex]));
6443
+ parsedData[this.fields.disabled] = true;
6444
+ this.listData[itemIndex] = parsedData;
6445
+ this.dataSource = this.listData;
6446
+ if (li.classList.contains(dropDownListClasses.focus)) {
6447
+ this.removeFocus();
6448
+ }
6449
+ if (li.classList.contains(dropDownListClasses.selected)) {
6450
+ this.clear();
6451
+ }
6452
+ }
6453
+ }
6454
+ }
6455
+ }
6456
+ }
6296
6457
  /**
6297
6458
  * Removes the component from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.
6298
6459
  *
@@ -6342,9 +6503,6 @@ let DropDownList = class DropDownList extends DropDownBase {
6342
6503
  delete this.hiddenElement;
6343
6504
  this.filterInput = null;
6344
6505
  this.keyboardModule = null;
6345
- if (!isNullOrUndefined(this.ulElement)) {
6346
- this.removeAllChildren(this.ulElement);
6347
- }
6348
6506
  this.ulElement = null;
6349
6507
  this.list = null;
6350
6508
  this.clearIconElement = null;
@@ -6501,10 +6659,6 @@ DropDownList = __decorate$1([
6501
6659
  NotifyPropertyChanges
6502
6660
  ], DropDownList);
6503
6661
 
6504
- /**
6505
- * export all modules from current location
6506
- */
6507
-
6508
6662
  var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
6509
6663
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
6510
6664
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -6882,7 +7036,6 @@ let DropDownTree = class DropDownTree extends Component {
6882
7036
  if (args.text === '') {
6883
7037
  this.isFilteredData = false;
6884
7038
  this.isFilterRestore = true;
6885
- this.isFromFilterChange = false;
6886
7039
  fields = this.cloneFields(this.fields);
6887
7040
  }
6888
7041
  else if (args.preventDefaultAction) {
@@ -6933,17 +7086,17 @@ let DropDownTree = class DropDownTree extends Component {
6933
7086
  });
6934
7087
  }
6935
7088
  remoteDataFilter(value, filteredFields) {
6936
- filteredFields.dataSource = this.treeData.map(item => this.remoteChildFilter(value, item)).filter(filteredChild => !isNullOrUndefined(filteredChild));
7089
+ filteredFields.dataSource = this.treeData.map((item) => this.remoteChildFilter(value, item)).filter((filteredChild) => !isNullOrUndefined(filteredChild));
6937
7090
  return filteredFields;
6938
7091
  }
6939
7092
  remoteChildFilter(value, node, isChild, isChildFiltering) {
6940
- let children = this.isChildObject() ? node['child'] : node[this.fields.child];
7093
+ const children = this.isChildObject() ? node['child'] : node[this.fields.child];
6941
7094
  if (isNullOrUndefined(children)) {
6942
7095
  return (this.isMatchedNode(value, node, isChild, isChildFiltering)) ? node : null;
6943
7096
  }
6944
- let matchedChildren = [];
7097
+ const matchedChildren = [];
6945
7098
  for (let i = 0; i < children.length; i++) {
6946
- let filteredChild = this.remoteChildFilter(value, children[i], true, true);
7099
+ const filteredChild = this.remoteChildFilter(value, children[i], true, true);
6947
7100
  if (!isNullOrUndefined(filteredChild)) {
6948
7101
  matchedChildren.push(filteredChild);
6949
7102
  }
@@ -6962,8 +7115,7 @@ let DropDownTree = class DropDownTree extends Component {
6962
7115
  nestedFilter(value, filteredFields) {
6963
7116
  const matchedDataSource = [];
6964
7117
  for (let i = 0; i < this.treeData.length; i++) {
6965
- // eslint-disable-next-line
6966
- const filteredChild = this.nestedChildFilter(value, this.treeData[i]);
7118
+ const filteredChild = this.nestedChildFilter(value, this.treeData[parseInt(i.toString(), 10)]);
6967
7119
  if (!isNullOrUndefined(filteredChild)) {
6968
7120
  matchedDataSource.push(filteredChild);
6969
7121
  }
@@ -6979,13 +7131,12 @@ let DropDownTree = class DropDownTree extends Component {
6979
7131
  else {
6980
7132
  const matchedChildren = [];
6981
7133
  for (let i = 0; i < children.length; i++) {
6982
- // eslint-disable-next-line
6983
- const filteredChild = this.nestedChildFilter(value, children[i]);
7134
+ const filteredChild = this.nestedChildFilter(value, children[parseInt(i.toString(), 10)]);
6984
7135
  if (!isNullOrUndefined(filteredChild)) {
6985
7136
  matchedChildren.push(filteredChild);
6986
7137
  }
6987
7138
  }
6988
- let filteredItems = Object.assign({}, node);
7139
+ const filteredItems = Object.assign({}, node);
6989
7140
  if (matchedChildren.length !== 0) {
6990
7141
  filteredItems[this.fields.child] = matchedChildren;
6991
7142
  return filteredItems;
@@ -7007,13 +7158,11 @@ let DropDownTree = class DropDownTree extends Component {
7007
7158
  for (let i = 0; i < matchedData.length; i++) {
7008
7159
  if (matchedDataSource.indexOf(matchedData[i]) === -1) {
7009
7160
  matchedDataSource.push(matchedData[i]);
7010
- // eslint-disable-next-line
7011
- let parentId = matchedData[i][this.fields.parentValue];
7161
+ let parentId = matchedData[parseInt(i.toString(), 10)][this.fields.parentValue];
7012
7162
  while (!isNullOrUndefined(parentId)) {
7013
7163
  let parent = null;
7014
7164
  for (let j = 0; j < this.treeData.length; j++) {
7015
- // eslint-disable-next-line
7016
- const value = this.treeData[j][this.fields.value];
7165
+ const value = this.treeData[parseInt(j.toString(), 10)][this.fields.value];
7017
7166
  if (!isNullOrUndefined(value) && (value === parentId)) {
7018
7167
  parent = this.treeData[j];
7019
7168
  break;
@@ -7034,7 +7183,7 @@ let DropDownTree = class DropDownTree extends Component {
7034
7183
  }
7035
7184
  isMatchedNode(value, node, isChild, isChildFiltering) {
7036
7185
  let checkValue;
7037
- let isObjectValue = isChild && isChildFiltering && this.isChildObject();
7186
+ const isObjectValue = isChild && isChildFiltering && this.isChildObject();
7038
7187
  checkValue = isObjectValue ? node[this.fields.child.text] : node[this.fields.text];
7039
7188
  if (!checkValue) {
7040
7189
  let tempChild = this.fields.child;
@@ -7107,6 +7256,11 @@ let DropDownTree = class DropDownTree extends Component {
7107
7256
  if (formElement) {
7108
7257
  EventHandler.remove(formElement, 'reset', this.resetValueHandler);
7109
7258
  }
7259
+ this.keyboardModule.destroy();
7260
+ if (this.showSelectAll && this.checkAllParent) {
7261
+ EventHandler.remove(this.checkAllParent, 'mouseup', this.clickHandler);
7262
+ }
7263
+ EventHandler.remove(document, 'mousedown', this.onDocumentClick);
7110
7264
  }
7111
7265
  /* Trigger when the dropdown is clicked */
7112
7266
  dropDownClick(e) {
@@ -7310,24 +7464,6 @@ let DropDownTree = class DropDownTree extends Component {
7310
7464
  this.selectAll(true);
7311
7465
  }
7312
7466
  break;
7313
- case 'moveRight':
7314
- case 'moveLeft':
7315
- case 'shiftDown':
7316
- case 'moveDown':
7317
- case 'ctrlDown':
7318
- case 'csDown':
7319
- case 'shiftUp':
7320
- case 'moveUp':
7321
- case 'ctrlUp':
7322
- case 'csUp':
7323
- case 'home':
7324
- case 'shiftHome':
7325
- case 'ctrlHome':
7326
- case 'csHome':
7327
- case 'end':
7328
- case 'shiftEnd':
7329
- case 'ctrlEnd':
7330
- case 'csEnd':
7331
7467
  }
7332
7468
  }
7333
7469
  else {
@@ -7378,6 +7514,7 @@ let DropDownTree = class DropDownTree extends Component {
7378
7514
  cancel: false,
7379
7515
  event: e
7380
7516
  };
7517
+ let focusedElement;
7381
7518
  this.trigger('keyPress', eventArgs, (observedArgs) => {
7382
7519
  if (!observedArgs.cancel) {
7383
7520
  switch (e.action) {
@@ -7385,9 +7522,10 @@ let DropDownTree = class DropDownTree extends Component {
7385
7522
  this.clickHandler(e);
7386
7523
  break;
7387
7524
  case 'moveDown':
7388
- const focusedElement = this.treeObj.element.querySelector('li');
7525
+ focusedElement = this.treeObj.element.querySelector('li');
7389
7526
  focusedElement.focus();
7390
7527
  addClass([focusedElement], ['e-node-focus']);
7528
+ break;
7391
7529
  }
7392
7530
  }
7393
7531
  });
@@ -7546,8 +7684,7 @@ let DropDownTree = class DropDownTree extends Component {
7546
7684
  return remainElement;
7547
7685
  }
7548
7686
  getOverflowVal(index) {
7549
- // eslint-disable-next-line
7550
- const selectedData = this.getSelectedData(this.value[index]);
7687
+ const selectedData = this.getSelectedData(this.value[parseInt(index.toString(), 10)]);
7551
7688
  return getValue(this.treeSettings.loadOnDemand ? this.fields.text : 'text', selectedData);
7552
7689
  }
7553
7690
  updateDelimMode() {
@@ -7593,12 +7730,12 @@ let DropDownTree = class DropDownTree extends Component {
7593
7730
  const name = this.inputEle.getAttribute('name') ? this.inputEle.getAttribute('name') : this.inputEle.getAttribute('id');
7594
7731
  this.hiddenElement.setAttribute('name', name);
7595
7732
  this.inputEle.removeAttribute('name');
7596
- const attributes$$1 = ['required', 'aria-required', 'form'];
7597
- for (let i = 0; i < attributes$$1.length; i++) {
7598
- const attr = this.inputEle.getAttribute(attributes$$1[i]);
7733
+ const attributes = ['required', 'aria-required', 'form'];
7734
+ for (let i = 0; i < attributes.length; i++) {
7735
+ const attr = this.inputEle.getAttribute(attributes[i]);
7599
7736
  if (attr) {
7600
- this.hiddenElement.setAttribute(attributes$$1[i], attr);
7601
- this.inputEle.removeAttribute(attributes$$1[i]);
7737
+ this.hiddenElement.setAttribute(attributes[i], attr);
7738
+ this.inputEle.removeAttribute(attributes[i]);
7602
7739
  }
7603
7740
  }
7604
7741
  }
@@ -7916,8 +8053,7 @@ let DropDownTree = class DropDownTree extends Component {
7916
8053
  let data;
7917
8054
  if (this.treeDataType === 1) {
7918
8055
  for (let i = 0; i < this.treeItems.length; i++) {
7919
- // eslint-disable-next-line
7920
- const text = getValue(this.fields.text, this.treeItems[i]);
8056
+ const text = getValue(this.fields.text, this.treeItems[parseInt(i.toString(), 10)]);
7921
8057
  if (!isNullOrUndefined(this.treeItems[i]) && !isNullOrUndefined(text) && text === givenText) {
7922
8058
  data = this.treeItems[i];
7923
8059
  break;
@@ -7932,14 +8068,12 @@ let DropDownTree = class DropDownTree extends Component {
7932
8068
  getNestedItems(data, field, givenText) {
7933
8069
  let newData;
7934
8070
  for (let i = 0, objlen = data.length; i < objlen; i++) {
7935
- // eslint-disable-next-line
7936
- const dataId = getValue(this.fields.text, data[i]);
8071
+ const dataId = getValue(this.fields.text, data[parseInt(i.toString(), 10)]);
7937
8072
  if (data[i] && dataId && dataId.toString() === givenText) {
7938
8073
  return data[i];
7939
8074
  }
7940
8075
  else if (typeof field.child === 'string' && !isNullOrUndefined(getValue(field.child, data[i]))) {
7941
- // eslint-disable-next-line
7942
- const childData = getValue(field.child, data[i]);
8076
+ const childData = getValue(field.child, data[parseInt(i.toString(), 10)]);
7943
8077
  newData = this.getNestedItems(childData, this.getChildType(field), givenText);
7944
8078
  if (newData !== undefined) {
7945
8079
  break;
@@ -7947,8 +8081,7 @@ let DropDownTree = class DropDownTree extends Component {
7947
8081
  }
7948
8082
  else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined(getValue('child', data[i]))) {
7949
8083
  const child = 'child';
7950
- // eslint-disable-next-line
7951
- newData = this.getNestedItems(getValue(child, data[i]), this.getChildType(field), givenText);
8084
+ newData = this.getNestedItems(getValue(child, data[parseInt(i.toString(), 10)]), this.getChildType(field), givenText);
7952
8085
  if (newData !== undefined) {
7953
8086
  break;
7954
8087
  }
@@ -8037,12 +8170,10 @@ let DropDownTree = class DropDownTree extends Component {
8037
8170
  this.setFooterTemplate();
8038
8171
  }
8039
8172
  this.isFirstRender = false;
8040
- /* eslint-disable */
8041
8173
  if (this.hasTemplate && this.portals) {
8042
8174
  if (this.treeObj.portals) {
8043
8175
  this.portals = this.portals.concat(this.treeObj.portals.filter((item) => !this.portals.includes(item)));
8044
8176
  }
8045
- /* eslint-enable */
8046
8177
  if (this.isReact) {
8047
8178
  this.renderReactTemplates(this.reactCallBack);
8048
8179
  }
@@ -8063,9 +8194,9 @@ let DropDownTree = class DropDownTree extends Component {
8063
8194
  focusedElement.setAttribute('tabindex', '0');
8064
8195
  }
8065
8196
  else {
8066
- let oldFocussedNode = this.treeObj.element.querySelector('.e-node-focus');
8197
+ const oldFocussedNode = this.treeObj.element.querySelector('.e-node-focus');
8067
8198
  focusedElement = this.treeObj.element.querySelector('li:not(.e-disable):not(.e-prevent)');
8068
- if (oldFocussedNode && oldFocussedNode != focusedElement) {
8199
+ if (oldFocussedNode && oldFocussedNode !== focusedElement) {
8069
8200
  oldFocussedNode.setAttribute('tabindex', '-1');
8070
8201
  removeClass([oldFocussedNode], 'e-node-focus');
8071
8202
  }
@@ -8190,8 +8321,9 @@ let DropDownTree = class DropDownTree extends Component {
8190
8321
  const isHeader = closest(target, '.' + HEADER);
8191
8322
  const isFooter = closest(target, '.' + FOOTER);
8192
8323
  const isScroller = target.classList.contains(DROPDOWN) ? true :
8193
- (matches(target, '.e-ddt .e-popup') || matches(target, '.e-ddt .e-treeview'));
8194
- if ((this.isPopupOpen && ((!isNullOrUndefined(this.inputWrapper) && this.inputWrapper.contains(target)) || isTree || isScroller || isHeader || isFooter)) ||
8324
+ (matches$1(target, '.e-ddt .e-popup') || matches$1(target, '.e-ddt .e-treeview'));
8325
+ if ((this.isPopupOpen && ((!isNullOrUndefined(this.inputWrapper) &&
8326
+ this.inputWrapper.contains(target)) || isTree || isScroller || isHeader || isFooter)) ||
8195
8327
  ((this.allowMultiSelection || this.showCheckBox) && (this.isPopupOpen && target.classList.contains(CHIP_CLOSE) ||
8196
8328
  (this.isPopupOpen && (target.classList.contains(CHECKALLPARENT) || target.classList.contains(ALLTEXT)
8197
8329
  || target.classList.contains(CHECKBOXFRAME)))))) {
@@ -8218,7 +8350,9 @@ let DropDownTree = class DropDownTree extends Component {
8218
8350
  removeClass([this.popupDiv], NODATA);
8219
8351
  this.hideCheckAll(false);
8220
8352
  }
8221
- this.treeDataType = this.getTreeDataType(this.treeItems, this.fields);
8353
+ if (!this.isFilteredData) {
8354
+ this.treeDataType = this.getTreeDataType(this.treeItems, this.fields);
8355
+ }
8222
8356
  if (this.isFirstRender && this.isRemoteData) {
8223
8357
  this.setTreeValue();
8224
8358
  this.setTreeText();
@@ -8314,7 +8448,8 @@ let DropDownTree = class DropDownTree extends Component {
8314
8448
  dataSource: fields.dataSource, value: fields.value, text: fields.text, parentValue: fields.parentValue,
8315
8449
  child: (fields.child ? this.cloneChildField(fields.child) : null), hasChildren: fields.hasChildren,
8316
8450
  expanded: fields.expanded, iconCss: fields.iconCss, imageUrl: fields.imageUrl, htmlAttributes: fields.htmlAttributes,
8317
- query: fields.query, selected: fields.selected, selectable: fields.selectable, tableName: fields.tableName, tooltip: fields.tooltip
8451
+ query: fields.query, selected: fields.selected, selectable: fields.selectable,
8452
+ tableName: fields.tableName, tooltip: fields.tooltip
8318
8453
  };
8319
8454
  return clonedField;
8320
8455
  }
@@ -8368,7 +8503,8 @@ let DropDownTree = class DropDownTree extends Component {
8368
8503
  if ((typeof field.child === 'string') && !isNullOrUndefined(getValue(field.child, this.fields.dataSource[i]))) {
8369
8504
  return 2;
8370
8505
  }
8371
- if (!isNullOrUndefined(getValue(field.parentValue, this.fields.dataSource[i])) || !isNullOrUndefined(getValue(field.hasChildren, this.fields.dataSource[i]))) {
8506
+ if (!isNullOrUndefined(getValue(field.parentValue, this.fields.dataSource[i])) ||
8507
+ !isNullOrUndefined(getValue(field.hasChildren, this.fields.dataSource[i]))) {
8372
8508
  return 1;
8373
8509
  }
8374
8510
  }
@@ -8517,14 +8653,13 @@ let DropDownTree = class DropDownTree extends Component {
8517
8653
  this.oldValue = this.value ? this.value.slice() : this.value;
8518
8654
  }
8519
8655
  }
8520
- onNodeExpanded(args) {
8656
+ onNodeExpanded() {
8521
8657
  if (this.hasTemplate && this.portals && this.treeObj.portals) {
8522
8658
  for (let i = 0; i < this.treeObj.portals.length; i++) {
8523
8659
  if (this.portals.indexOf(this.treeObj.portals[i]) === -1) {
8524
8660
  this.portals.push(this.treeObj.portals[i]);
8525
8661
  }
8526
8662
  }
8527
- /* eslint-enable */
8528
8663
  this.renderReactTemplates();
8529
8664
  }
8530
8665
  }
@@ -8620,7 +8755,7 @@ let DropDownTree = class DropDownTree extends Component {
8620
8755
  if (!this.isFilteredData) {
8621
8756
  this.setProperties({ value: this.isFromFilterChange && newValues && newValues.length === 0 ? this.value : newValues }, true);
8622
8757
  this.isFromFilterChange = false;
8623
- if (newValues && newValues.length !== 0 && !this.showCheckBox) {
8758
+ if (newValues && newValues.length !== 0 && !this.showCheckBox && !this.ddtCompareValues(this.treeObj.selectedNodes, this.value.slice())) {
8624
8759
  this.treeObj.selectedNodes = this.value.slice();
8625
8760
  this.treeObj.dataBind();
8626
8761
  }
@@ -8902,7 +9037,6 @@ let DropDownTree = class DropDownTree extends Component {
8902
9037
  }
8903
9038
  templateComplier(template) {
8904
9039
  if (template) {
8905
- // eslint-disable-next-line
8906
9040
  try {
8907
9041
  if (typeof template !== 'function' && document.querySelectorAll(template).length) {
8908
9042
  return compile(document.querySelector(template).innerHTML.trim());
@@ -8988,7 +9122,7 @@ let DropDownTree = class DropDownTree extends Component {
8988
9122
  this.ensurePlaceHolder();
8989
9123
  }
8990
9124
  resetValue(isDynamicChange) {
8991
- if (this.value === [] && this.text == null) {
9125
+ if (Array.isArray(this.value) && this.value.length === 0 && this.text == null) {
8992
9126
  return;
8993
9127
  }
8994
9128
  Input.setValue(null, this.inputEle, this.floatLabelType);
@@ -9102,9 +9236,7 @@ let DropDownTree = class DropDownTree extends Component {
9102
9236
  updateTemplate() {
9103
9237
  if (this.popupObj) {
9104
9238
  this.clearTemplate();
9105
- /* eslint-disable */
9106
9239
  this.portals = [];
9107
- /* eslint-enable */
9108
9240
  this.popupObj.destroy();
9109
9241
  if (this.isPopupOpen) {
9110
9242
  this.hidePopup();
@@ -9480,22 +9612,34 @@ let DropDownTree = class DropDownTree extends Component {
9480
9612
  detach(this.inputWrapper);
9481
9613
  detach(this.popupDiv);
9482
9614
  detach(this.hiddenElement);
9615
+ Input.setRipple(false, [this.inputObj]);
9483
9616
  this.element.classList.remove('e-input');
9484
9617
  if (this.showCheckBox || this.allowMultiSelection) {
9485
9618
  this.element.classList.remove(CHIP_INPUT);
9486
9619
  }
9620
+ detach(this.inputObj.container);
9621
+ if (this.inputObj.buttons.length) {
9622
+ detach(this.inputObj.buttons[0]);
9623
+ }
9487
9624
  this.inputObj = null;
9488
9625
  while (this.hiddenElement.options.length > 0) {
9489
9626
  this.hiddenElement.remove(0);
9490
9627
  }
9491
9628
  this.hiddenElement.innerHTML = '';
9492
9629
  this.hiddenElement = null;
9630
+ this.inputWrapper.innerHTML = '';
9493
9631
  this.inputWrapper = null;
9494
9632
  this.popupDiv = null;
9495
9633
  this.tree = null;
9496
9634
  this.popupObj = null;
9497
9635
  this.treeObj = null;
9498
9636
  this.overAllClear = null;
9637
+ if (this.chipCollection) {
9638
+ const chipsIcons = selectAll('.e-chips-close', this.chipCollection);
9639
+ for (const element of chipsIcons) {
9640
+ EventHandler.remove(element, 'mousedown', this.removeChip);
9641
+ }
9642
+ }
9499
9643
  this.chipWrapper = null;
9500
9644
  this.chipCollection = null;
9501
9645
  this.checkAllParent = null;
@@ -9554,7 +9698,11 @@ let DropDownTree = class DropDownTree extends Component {
9554
9698
  * @returns {void}
9555
9699
  */
9556
9700
  hidePopup() {
9557
- const eventArgs = { popup: this.popupObj };
9701
+ const eventArgs = { popup: this.popupObj, cancel: false };
9702
+ this.trigger('close', eventArgs);
9703
+ if (eventArgs.cancel) {
9704
+ return;
9705
+ }
9558
9706
  this.inputWrapper.classList.remove(ICONANIMATION);
9559
9707
  if (this.popupEle) {
9560
9708
  addClass([this.popupEle], DDTHIDEICON);
@@ -9568,7 +9716,6 @@ let DropDownTree = class DropDownTree extends Component {
9568
9716
  addClass([this.inputWrapper], [INPUTFOCUS]);
9569
9717
  }
9570
9718
  }
9571
- this.trigger('close', eventArgs);
9572
9719
  if (this.destroyPopupOnHide) {
9573
9720
  this.isFirstRender = true;
9574
9721
  this.destroyPopup();
@@ -9767,18 +9914,12 @@ DropDownTree = __decorate$2([
9767
9914
  NotifyPropertyChanges
9768
9915
  ], DropDownTree);
9769
9916
 
9770
- /**
9771
- * export all modules from current location
9772
- */
9773
-
9774
9917
  var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
9775
9918
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9776
9919
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9777
9920
  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;
9778
9921
  return c > 3 && r && Object.defineProperty(target, key, r), r;
9779
9922
  };
9780
- // eslint-disable-next-line @typescript-eslint/triple-slash-reference
9781
- /// <reference path='../drop-down-list/drop-down-list-model.d.ts'/>
9782
9923
  const SPINNER_CLASS = 'e-atc-spinner-icon';
9783
9924
  dropDownListClasses.root = 'e-combobox';
9784
9925
  const inputObject$1 = {
@@ -9896,6 +10037,18 @@ let ComboBox = class ComboBox extends DropDownList {
9896
10037
  }
9897
10038
  }
9898
10039
  updateValues() {
10040
+ if (this.fields.disabled) {
10041
+ if (this.value != null) {
10042
+ this.value = !this.isDisableItemValue(this.value) ? this.value : null;
10043
+ }
10044
+ if (this.text != null) {
10045
+ this.text = !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
10046
+ }
10047
+ if (this.index != null) {
10048
+ this.index = !this.isDisabledItemByIndex(this.index) ? this.index : null;
10049
+ this.activeIndex = this.index;
10050
+ }
10051
+ }
9899
10052
  if (!isNullOrUndefined(this.value)) {
9900
10053
  let currentValue = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
9901
10054
  const li = this.getElementByValue(currentValue);
@@ -10142,9 +10295,9 @@ let ComboBox = class ComboBox extends DropDownList {
10142
10295
  const value = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
10143
10296
  this.itemData = this.getDataByValue(value);
10144
10297
  const dataItem = this.getItemData();
10145
- const setValue$$1 = this.allowObjectBinding ? this.itemData : dataItem.value;
10298
+ const setValue = this.allowObjectBinding ? this.itemData : dataItem.value;
10146
10299
  if (!(this.allowCustom && isNullOrUndefined(dataItem.value) && isNullOrUndefined(dataItem.text))) {
10147
- this.setProperties({ 'value': setValue$$1 }, !this.allowCustom);
10300
+ this.setProperties({ 'value': setValue }, !this.allowCustom);
10148
10301
  }
10149
10302
  }
10150
10303
  /**
@@ -10327,6 +10480,9 @@ let ComboBox = class ComboBox extends DropDownList {
10327
10480
  else {
10328
10481
  li = this.list.querySelector('.' + dropDownListClasses.focus);
10329
10482
  }
10483
+ if (this.isDisabledElement(li)) {
10484
+ return;
10485
+ }
10330
10486
  if (li) {
10331
10487
  this.setSelection(li, e);
10332
10488
  this.isTyped = false;
@@ -10742,18 +10898,12 @@ ComboBox = __decorate$3([
10742
10898
  NotifyPropertyChanges
10743
10899
  ], ComboBox);
10744
10900
 
10745
- /**
10746
- * export all modules from current location
10747
- */
10748
-
10749
10901
  var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
10750
10902
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
10751
10903
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
10752
10904
  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;
10753
10905
  return c > 3 && r && Object.defineProperty(target, key, r), r;
10754
10906
  };
10755
- // eslint-disable-next-line @typescript-eslint/triple-slash-reference
10756
- /// <reference path='../combo-box/combo-box-model.d.ts'/>
10757
10907
  dropDownListClasses.root = 'e-autocomplete';
10758
10908
  dropDownListClasses.icon = 'e-input-group-icon e-ddl-icon e-search-icon';
10759
10909
  /**
@@ -11207,7 +11357,7 @@ let AutoComplete = class AutoComplete extends ComboBox {
11207
11357
  }
11208
11358
  };
11209
11359
  __decorate$4([
11210
- Complex({ value: null, iconCss: null, groupBy: null }, FieldSettings)
11360
+ Complex({ value: null, iconCss: null, groupBy: null, disabled: null }, FieldSettings)
11211
11361
  ], AutoComplete.prototype, "fields", void 0);
11212
11362
  __decorate$4([
11213
11363
  Property(true)
@@ -11258,10 +11408,6 @@ AutoComplete = __decorate$4([
11258
11408
  NotifyPropertyChanges
11259
11409
  ], AutoComplete);
11260
11410
 
11261
- /**
11262
- * export all modules from current location
11263
- */
11264
-
11265
11411
  /**
11266
11412
  * FloatLable Moduel
11267
11413
  * Specifies whether to display the floating label above the input element.
@@ -11423,8 +11569,6 @@ var __decorate$5 = (undefined && undefined.__decorate) || function (decorators,
11423
11569
  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;
11424
11570
  return c > 3 && r && Object.defineProperty(target, key, r), r;
11425
11571
  };
11426
- // eslint-disable-next-line @typescript-eslint/triple-slash-reference
11427
- /// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>
11428
11572
  const FOCUS = 'e-input-focus';
11429
11573
  const DISABLED$1 = 'e-disabled';
11430
11574
  const OVER_ALL_WRAPPER = 'e-multiselect e-input-group e-control-wrapper';
@@ -11747,13 +11891,26 @@ let MultiSelect = class MultiSelect extends DropDownBase {
11747
11891
  }
11748
11892
  else {
11749
11893
  if (this.enableVirtualization) {
11750
- element = this.ulElement.querySelector('li.'
11751
- + dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)');
11894
+ if (this.fields.disabled) {
11895
+ element = this.ulElement.querySelector('li.'
11896
+ + dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)' + ':not(.' + DISABLED$1 + ')');
11897
+ }
11898
+ else {
11899
+ element = this.ulElement.querySelector('li.'
11900
+ + dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)');
11901
+ }
11752
11902
  }
11753
11903
  else {
11754
- element = this.ulElement.querySelector('li.'
11755
- + dropDownBaseClasses.li + ':not(.'
11756
- + HIDE_LIST + ')');
11904
+ if (this.fields.disabled) {
11905
+ element = this.ulElement.querySelector('li.'
11906
+ + dropDownBaseClasses.li + ':not(.'
11907
+ + HIDE_LIST + ')' + ':not(.' + DISABLED$1 + ')');
11908
+ }
11909
+ else {
11910
+ element = this.ulElement.querySelector('li.'
11911
+ + dropDownBaseClasses.li + ':not(.'
11912
+ + HIDE_LIST + ')');
11913
+ }
11757
11914
  }
11758
11915
  }
11759
11916
  if (element !== null) {
@@ -12213,9 +12370,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
12213
12370
  if (filterQuery.queries[queryElements].fn === 'onSkip') {
12214
12371
  isSkip = false;
12215
12372
  }
12216
- if (filterQuery.queries[queryElements].fn === 'onTake') {
12217
-
12218
- }
12373
+ if (filterQuery.queries[queryElements].fn === 'onTake') ;
12219
12374
  }
12220
12375
  let queryTakeValue = 0;
12221
12376
  if (filterQuery && filterQuery.queries.length > 0) {
@@ -13203,7 +13358,6 @@ let MultiSelect = class MultiSelect extends DropDownBase {
13203
13358
  this.list.scrollTop = this.virtualListInfo && this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight : 0;
13204
13359
  }
13205
13360
  isScrollerCHanged = this.isKeyBoardAction;
13206
-
13207
13361
  }
13208
13362
  this.isKeyBoardAction = isScrollerCHanged;
13209
13363
  }
@@ -13480,6 +13634,21 @@ let MultiSelect = class MultiSelect extends DropDownBase {
13480
13634
  }
13481
13635
  }
13482
13636
  }
13637
+ const focusedLi = this.list ? this.list.querySelector('.e-item-focus') : null;
13638
+ if (this.isDisabledElement(focusedLi)) {
13639
+ if (this.list.querySelectorAll('.e-list-item:not(.e-hide-listitem):not(.e-disabled)').length === 0) {
13640
+ this.removeFocus();
13641
+ return;
13642
+ }
13643
+ const index = this.getIndexByValue(focusedLi.getAttribute('data-value'));
13644
+ if (index === 0 && this.mode !== 'CheckBox') {
13645
+ position = 1;
13646
+ }
13647
+ if (index === (this.list.querySelectorAll('.e-list-item:not(.e-hide-listitem)').length - 1)) {
13648
+ position = -1;
13649
+ }
13650
+ this.moveByList(position);
13651
+ }
13483
13652
  }
13484
13653
  getElementByValue(value) {
13485
13654
  let item;
@@ -13668,7 +13837,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
13668
13837
  }
13669
13838
  this.setProperties({ value: [].concat([], removeVal) }, true);
13670
13839
  if (this.enableVirtualization) {
13671
- let 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], '');
13840
+ let 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], '');
13672
13841
  this.setProperties({ text: currentText.toString() }, true);
13673
13842
  }
13674
13843
  if (element !== null) {
@@ -15049,7 +15218,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
15049
15218
  }
15050
15219
  }
15051
15220
  addListFocus(element) {
15052
- if (this.enabled && this.isValidLI(element)) {
15221
+ if (this.enabled && (this.isValidLI(element) || (this.fields.disabled && this.isDisabledElement(element)))) {
15053
15222
  this.removeFocus();
15054
15223
  addClass([element], dropDownBaseClasses.focus);
15055
15224
  this.updateAriaActiveDescendant();
@@ -15639,14 +15808,14 @@ let MultiSelect = class MultiSelect extends DropDownBase {
15639
15808
  let li;
15640
15809
  if (!isNullOrUndefined(this.list)) {
15641
15810
  li = this.list.querySelectorAll(state ?
15642
- 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-virtual-list)' :
15643
- 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-virtual-list)');
15811
+ 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)' :
15812
+ 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)');
15644
15813
  }
15645
15814
  if (this.value && this.value.length && event && event.target
15646
15815
  && closest(event.target, '.e-close-hooker') && this.allowFiltering) {
15647
15816
  li = this.mainList.querySelectorAll(state ?
15648
- 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-virtual-list)' :
15649
- 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-virtual-list)');
15817
+ 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)' :
15818
+ 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)');
15650
15819
  }
15651
15820
  if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !isNullOrUndefined(this.fields.groupBy)) {
15652
15821
  let target = (event ? (this.groupTemplate ? closest(event.target, '.e-list-group-item') : event.target) : null);
@@ -16089,9 +16258,16 @@ let MultiSelect = class MultiSelect extends DropDownBase {
16089
16258
  this.updateClearButton(newProp.showClearButton);
16090
16259
  break;
16091
16260
  case 'text':
16261
+ if (this.fields.disabled) {
16262
+ this.text =
16263
+ this.text && !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
16264
+ }
16092
16265
  this.updateVal(this.value, this.value, 'text');
16093
16266
  break;
16094
16267
  case 'value':
16268
+ if (this.fields.disabled) {
16269
+ this.removeDisabledItemsValue(this.value);
16270
+ }
16095
16271
  this.updateVal(this.value, oldProp.value, 'value');
16096
16272
  this.addValidInputClass();
16097
16273
  if (!this.closePopupOnSelect && this.isPopupOpen()) {
@@ -16338,7 +16514,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
16338
16514
  const animModel = {
16339
16515
  name: 'FadeOut',
16340
16516
  duration: 100,
16341
- delay: delay ? delay : 0
16517
+ delay: delay
16342
16518
  };
16343
16519
  this.customFilterQuery = null;
16344
16520
  const eventArgs = { popup: this.popupObj, cancel: false, animation: animModel, event: e || null };
@@ -16658,7 +16834,32 @@ let MultiSelect = class MultiSelect extends DropDownBase {
16658
16834
  listParent.remove();
16659
16835
  return listItemHeight;
16660
16836
  }
16837
+ /**
16838
+ * Removes disabled values from the given array.
16839
+ *
16840
+ * @param { number[] | string[] | boolean[] | object[] } value - The array to check.
16841
+ * @returns {void}
16842
+ */
16843
+ removeDisabledItemsValue(value) {
16844
+ if (value) {
16845
+ const data = [];
16846
+ let dataIndex = 0;
16847
+ for (let index = 0; index < value.length; index++) {
16848
+ let indexValue = value[index];
16849
+ if (typeof (indexValue) === 'object') {
16850
+ indexValue = JSON.parse(JSON.stringify(indexValue))[this.fields.value];
16851
+ }
16852
+ if ((indexValue != null) && !(this.isDisabledItemByIndex(this.getIndexByValue(indexValue)))) {
16853
+ data[dataIndex++] = value[index];
16854
+ }
16855
+ }
16856
+ this.value = data.length > 0 ? data : null;
16857
+ }
16858
+ }
16661
16859
  checkInitialValue() {
16860
+ if (this.fields.disabled) {
16861
+ this.removeDisabledItemsValue(this.value);
16862
+ }
16662
16863
  const isData = this.dataSource instanceof Array ? (this.dataSource.length > 0)
16663
16864
  : !isNullOrUndefined(this.dataSource);
16664
16865
  if (!(this.value && this.value.length) &&
@@ -16697,6 +16898,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
16697
16898
  super.render();
16698
16899
  }
16699
16900
  }
16901
+ if (this.fields.disabled) {
16902
+ this.text = this.text && !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
16903
+ }
16700
16904
  if (!isNullOrUndefined(this.text) && (isNullOrUndefined(this.value) || this.value.length === 0)) {
16701
16905
  this.initialTextUpdate();
16702
16906
  }
@@ -16830,6 +17034,66 @@ let MultiSelect = class MultiSelect extends DropDownBase {
16830
17034
  this.refreshInputHight();
16831
17035
  this.checkPlaceholderSize();
16832
17036
  }
17037
+ /**
17038
+ * Method to disable specific item in the popup.
17039
+ *
17040
+ * @param {string | number | object | HTMLLIElement} item - Specifies the item to be disabled.
17041
+ * @returns {void}
17042
+ * @deprecated
17043
+ */
17044
+ disableItem(item) {
17045
+ if (this.fields.disabled) {
17046
+ if (!this.list) {
17047
+ this.renderList();
17048
+ }
17049
+ let itemIndex = -1;
17050
+ if (this.liCollections && this.liCollections.length > 0 && this.listData && this.fields.disabled) {
17051
+ if (typeof (item) === 'string') {
17052
+ itemIndex = this.getIndexByValue(item);
17053
+ }
17054
+ else if (typeof item === 'object') {
17055
+ if (item instanceof HTMLLIElement) {
17056
+ for (let index = 0; index < this.liCollections.length; index++) {
17057
+ if (this.liCollections[index] === item) {
17058
+ itemIndex = this.getIndexByValue(item.getAttribute('data-value'));
17059
+ break;
17060
+ }
17061
+ }
17062
+ }
17063
+ else {
17064
+ const value = JSON.parse(JSON.stringify(item))[this.fields.value];
17065
+ for (let index = 0; index < this.listData.length; index++) {
17066
+ if (JSON.parse(JSON.stringify(this.listData[index]))[this.fields.value] === value) {
17067
+ itemIndex = this.getIndexByValue(value);
17068
+ break;
17069
+ }
17070
+ }
17071
+ }
17072
+ }
17073
+ else {
17074
+ itemIndex = item;
17075
+ }
17076
+ const isValidIndex = itemIndex < this.liCollections.length && itemIndex > -1;
17077
+ if (isValidIndex && !(JSON.parse(JSON.stringify(this.listData[itemIndex]))[this.fields.disabled])) {
17078
+ const li = this.liCollections[itemIndex];
17079
+ if (li) {
17080
+ this.disableListItem(li);
17081
+ const parsedData = JSON.parse(JSON.stringify(this.listData[itemIndex]));
17082
+ parsedData[this.fields.disabled] = true;
17083
+ this.listData[itemIndex] = parsedData;
17084
+ if (li.classList.contains(dropDownBaseClasses.focus)) {
17085
+ this.removeFocus();
17086
+ }
17087
+ if (li.classList.contains(HIDE_LIST) || li.classList.contains(dropDownBaseClasses.selected)) {
17088
+ const oldValue = this.value;
17089
+ this.removeDisabledItemsValue(this.value);
17090
+ this.updateVal(this.value, oldValue, 'value');
17091
+ }
17092
+ }
17093
+ }
17094
+ }
17095
+ }
17096
+ }
16833
17097
  /**
16834
17098
  * Removes the component from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.
16835
17099
  *
@@ -16898,7 +17162,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
16898
17162
  }
16899
17163
  };
16900
17164
  __decorate$5([
16901
- Complex({ text: null, value: null, iconCss: null, groupBy: null }, FieldSettings)
17165
+ Complex({ text: null, value: null, iconCss: null, groupBy: null, disabled: null }, FieldSettings)
16902
17166
  ], MultiSelect.prototype, "fields", void 0);
16903
17167
  __decorate$5([
16904
17168
  Property(false)
@@ -17280,12 +17544,12 @@ class CheckBoxSelection {
17280
17544
  }
17281
17545
  if (!isNullOrUndefined(this.checkWrapper)) {
17282
17546
  const checkElement = select('.' + CHECKBOXFRAME$1, this.checkWrapper);
17283
- const selectAll$$1 = false;
17284
- this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), args.li, args.e, selectAll$$1);
17547
+ const selectAll = false;
17548
+ this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), args.li, args.e, selectAll);
17285
17549
  }
17286
17550
  }
17287
- validateCheckNode(checkWrap, isCheck, li, e, selectAll$$1) {
17288
- this.changeState(checkWrap, isCheck ? 'uncheck' : 'check', e, true, selectAll$$1);
17551
+ validateCheckNode(checkWrap, isCheck, li, e, selectAll) {
17552
+ this.changeState(checkWrap, isCheck ? 'uncheck' : 'check', e, true, selectAll);
17289
17553
  }
17290
17554
  clickHandler(e) {
17291
17555
  let target;
@@ -17296,26 +17560,26 @@ class CheckBoxSelection {
17296
17560
  target = e.currentTarget;
17297
17561
  }
17298
17562
  this.checkWrapper = closest(target, '.' + CHECKBOXWRAP$1);
17299
- const selectAll$$1 = true;
17563
+ const selectAll = true;
17300
17564
  if (!isNullOrUndefined(this.checkWrapper)) {
17301
17565
  const checkElement = select('.' + CHECKBOXFRAME$1, this.checkWrapper);
17302
- this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), null, e, selectAll$$1);
17566
+ this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), null, e, selectAll);
17303
17567
  }
17304
17568
  e.preventDefault();
17305
17569
  }
17306
- changeState(wrapper, state, e, isPrevent, selectAll$$1) {
17570
+ changeState(wrapper, state, e, isPrevent, selectAll) {
17307
17571
  const frameSpan = wrapper.getElementsByClassName(CHECKBOXFRAME$1)[0];
17308
17572
  if (state === 'check' && !frameSpan.classList.contains(CHECK$1)) {
17309
17573
  frameSpan.classList.remove(INDETERMINATE);
17310
17574
  frameSpan.classList.add(CHECK$1);
17311
- if (selectAll$$1) {
17575
+ if (selectAll) {
17312
17576
  this.parent.selectAllItems(true, e);
17313
17577
  this.setLocale(true);
17314
17578
  }
17315
17579
  }
17316
17580
  else if (state === 'uncheck' && (frameSpan.classList.contains(CHECK$1) || frameSpan.classList.contains(INDETERMINATE))) {
17317
17581
  removeClass([frameSpan], [CHECK$1, INDETERMINATE]);
17318
- if (selectAll$$1) {
17582
+ if (selectAll) {
17319
17583
  this.parent.selectAllItems(false, e);
17320
17584
  this.setLocale();
17321
17585
  }
@@ -17323,7 +17587,7 @@ class CheckBoxSelection {
17323
17587
  else if (state === 'indeterminate' && !(frameSpan.classList.contains(INDETERMINATE))) {
17324
17588
  removeClass([frameSpan], [CHECK$1]);
17325
17589
  frameSpan.classList.add(INDETERMINATE);
17326
- if (selectAll$$1) {
17590
+ if (selectAll) {
17327
17591
  this.parent.selectAllItems(false, e);
17328
17592
  this.setLocale();
17329
17593
  }
@@ -17613,10 +17877,6 @@ class CheckBoxSelection {
17613
17877
  }
17614
17878
  }
17615
17879
 
17616
- /**
17617
- * export all modules from current location
17618
- */
17619
-
17620
17880
  var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
17621
17881
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
17622
17882
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -17624,8 +17884,6 @@ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators,
17624
17884
  return c > 3 && r && Object.defineProperty(target, key, r), r;
17625
17885
  };
17626
17886
  var ListBox_1;
17627
- // eslint-disable-next-line @typescript-eslint/triple-slash-reference
17628
- /// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>
17629
17887
  /**
17630
17888
  * Defines the Selection settings of List Box.
17631
17889
  */
@@ -17726,6 +17984,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
17726
17984
  const hiddenSelect = this.createElement('select', { className: 'e-hidden-select', attrs: { 'multiple': '' } });
17727
17985
  hiddenSelect.style.visibility = 'hidden';
17728
17986
  this.list.classList.add('e-listbox-wrapper');
17987
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17729
17988
  this.list.querySelector('.e-list-parent').setAttribute('role', 'presentation');
17730
17989
  const groupHdrs = this.list.querySelectorAll('.e-list-group-item');
17731
17990
  for (let i = 0; i < groupHdrs.length; i++) {
@@ -17744,7 +18003,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
17744
18003
  }
17745
18004
  }
17746
18005
  else {
17747
- if (this.initLoad) {
18006
+ if (this.initLoad && this.element.parentElement) {
17748
18007
  this.element.parentElement.insertBefore(this.list, this.element);
17749
18008
  }
17750
18009
  this.list.insertBefore(this.element, this.list.firstChild);
@@ -17811,6 +18070,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
17811
18070
  initToolbar() {
17812
18071
  const pos = this.toolbarSettings.position;
17813
18072
  const prevScope = this.element.getAttribute('data-value');
18073
+ this.toolbarSettings.items = isNullOrUndefined(this.toolbarSettings.items) ? [] : this.toolbarSettings.items;
17814
18074
  if (this.toolbarSettings.items.length) {
17815
18075
  const toolElem = this.createElement('div', { className: 'e-listbox-tool', attrs: { 'role': 'toolbar' } });
17816
18076
  const wrapper = this.createElement('div', {
@@ -17904,7 +18164,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
17904
18164
  this.spinner = this.createElement('div', { className: 'e-listbox-wrapper' });
17905
18165
  }
17906
18166
  this.spinner.style.height = formatUnit(this.height);
17907
- this.element.parentElement.insertBefore(this.spinner, this.element.nextSibling);
18167
+ if (this.element.parentElement) {
18168
+ this.element.parentElement.insertBefore(this.spinner, this.element.nextSibling);
18169
+ }
17908
18170
  createSpinner({ target: this.spinner }, this.createElement);
17909
18171
  showSpinner(this.spinner);
17910
18172
  }
@@ -17964,7 +18226,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
17964
18226
  this.list.insertBefore(searchEle, this.list.firstElementChild);
17965
18227
  this.filterParent = this.list.getElementsByClassName('e-filter-parent')[0];
17966
18228
  this.filterWireEvents(searchEle);
17967
- let inputSearch = searchEle.querySelector('.e-input-filter');
18229
+ const inputSearch = searchEle.querySelector('.e-input-filter');
17968
18230
  if (inputSearch) {
17969
18231
  inputSearch.addEventListener('focus', function () {
17970
18232
  if (!searchEle.childNodes[0].classList.contains('e-input-focus')) {
@@ -18102,7 +18364,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
18102
18364
  }
18103
18365
  beforeDragEnd(args) {
18104
18366
  this.stopTimer();
18105
- let items = [];
18367
+ const items = [];
18106
18368
  this.dragValue = this.getFormattedValue(args.droppedElement.getAttribute('data-value'));
18107
18369
  if (this.value.indexOf(this.dragValue) > -1) {
18108
18370
  args.items = this.getDataByValues(this.value);
@@ -18207,7 +18469,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
18207
18469
  }
18208
18470
  const fListData = [].slice.call(this.listData);
18209
18471
  const fSortData = [].slice.call(this.sortedData);
18210
- selectedOptions.forEach((value, index) => {
18472
+ selectedOptions.forEach((value) => {
18211
18473
  droppedData = this.getDataByValue(value);
18212
18474
  const srcIdx = this.listData.indexOf(droppedData);
18213
18475
  const jsonSrcIdx = this.jsonData.indexOf(droppedData);
@@ -18390,7 +18652,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
18390
18652
  }
18391
18653
  this.setSelection(items, state, !isValue);
18392
18654
  this.updateSelectedOptions();
18393
- let selElems = [];
18655
+ const selElems = [];
18394
18656
  for (let i = 0; i < items.length; i++) {
18395
18657
  const liColl = this.list.querySelectorAll('[aria-selected="true"]');
18396
18658
  for (let j = 0; j < liColl.length; j++) {
@@ -18745,6 +19007,10 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
18745
19007
  }
18746
19008
  }
18747
19009
  clickHandler(e) {
19010
+ const li = closest(e.target, '.' + 'e-list-item');
19011
+ if (isNullOrUndefined(li)) {
19012
+ return;
19013
+ }
18748
19014
  this.selectHandler(e);
18749
19015
  }
18750
19016
  checkSelectAll() {
@@ -19232,6 +19498,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
19232
19498
  }
19233
19499
  for (let i = 0; i < fListBox.ulElement.childElementCount; i++) {
19234
19500
  if (fListBox.ulElement.childNodes[i].classList.contains('e-disabled')) {
19501
+ // eslint-disable-next-line @typescript-eslint/tslint/config
19235
19502
  flistboxarray = flistboxarray.filter(function (item) { return item !== i; });
19236
19503
  tempLiColl.push(fListBox.ulElement.childNodes[i]);
19237
19504
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -19557,10 +19824,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
19557
19824
  }
19558
19825
  dataUpdater(dataSource, query, fields) {
19559
19826
  this.isDataFetched = false;
19560
- const backCommand = true;
19561
19827
  if (this.targetElement().trim() === '') {
19562
19828
  let list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
19563
- if (backCommand) {
19829
+ {
19564
19830
  this.remoteCustomValue = false;
19565
19831
  if (this.isAngular && this.itemTemplate) {
19566
19832
  list = this.renderItems(this.listData, fields);
@@ -19644,7 +19910,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
19644
19910
  });
19645
19911
  }
19646
19912
  }
19647
- setSelection(values = this.value, isSelect = true, isText = false, canFocus = true) {
19913
+ setSelection(
19914
+ // eslint-disable-next-line max-len
19915
+ values = this.value, isSelect = true, isText = false, canFocus = true) {
19648
19916
  let li;
19649
19917
  let liselect;
19650
19918
  if (values) {
@@ -19664,21 +19932,21 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
19664
19932
  li = this.list.querySelector('[data-value="' + text + '"]');
19665
19933
  }
19666
19934
  if (li) {
19667
- if (this.selectionSettings.showCheckbox) {
19935
+ if (this.selectionSettings.showCheckbox && !li.classList.contains('e-disabled')) {
19668
19936
  liselect = li.getElementsByClassName('e-frame')[0].classList.contains('e-check');
19669
19937
  }
19670
19938
  else {
19671
19939
  liselect = li.classList.contains('e-selected');
19672
19940
  }
19673
19941
  if (!isSelect && liselect || isSelect && !liselect && li) {
19674
- if (this.selectionSettings.showCheckbox) {
19942
+ if (this.selectionSettings.showCheckbox && !li.classList.contains('e-disabled')) {
19675
19943
  this.notify('updatelist', { li: li, module: 'listbox' });
19676
19944
  if (canFocus) {
19677
19945
  li.focus();
19678
19946
  }
19679
19947
  }
19680
19948
  else {
19681
- if (isSelect) {
19949
+ if (isSelect && !li.classList.contains('e-disabled')) {
19682
19950
  li.classList.add(cssClass.selected);
19683
19951
  li.setAttribute('aria-selected', 'true');
19684
19952
  if (canFocus) {
@@ -19712,7 +19980,17 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
19712
19980
  this.checkSelectAll();
19713
19981
  }
19714
19982
  checkDisabledState(inst) {
19715
- return inst.ulElement.querySelectorAll('.' + cssClass.li).length === 0;
19983
+ if (isNullOrUndefined(inst.ulElement)) {
19984
+ if (!isNullOrUndefined(this.dataSource) && isNullOrUndefined(this.dataSource.length)) {
19985
+ return false;
19986
+ }
19987
+ else {
19988
+ return true;
19989
+ }
19990
+ }
19991
+ else {
19992
+ return inst.ulElement.querySelectorAll('.' + cssClass.li).length === 0;
19993
+ }
19716
19994
  }
19717
19995
  updateToolBarState() {
19718
19996
  if (this.toolbarSettings.items.length) {
@@ -19948,6 +20226,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
19948
20226
  }
19949
20227
  }
19950
20228
  if (newProp.toolbarSettings.items) {
20229
+ oldProp.toolbarSettings.items = isNullOrUndefined(oldProp.toolbarSettings.items) ? [] : oldProp.toolbarSettings.items;
19951
20230
  if (oldProp.toolbarSettings && oldProp.toolbarSettings.items.length) {
19952
20231
  ele = this.list.parentElement;
19953
20232
  ele.parentElement.insertBefore(this.list, ele);
@@ -20082,10 +20361,6 @@ const listBoxClasses = {
20082
20361
  clearIcon: 'e-clear-icon'
20083
20362
  };
20084
20363
 
20085
- /**
20086
- * export all modules from current location
20087
- */
20088
-
20089
20364
  var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
20090
20365
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20091
20366
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -20152,12 +20427,12 @@ let Mention = class Mention extends DropDownBase {
20152
20427
  this.setCssClass(newClass, [this.popupObj.element], oldClass);
20153
20428
  }
20154
20429
  }
20155
- setCssClass(cssClass$$1, elements, oldClass) {
20430
+ setCssClass(cssClass, elements, oldClass) {
20156
20431
  if (!isNullOrUndefined(oldClass) && oldClass !== '') {
20157
20432
  removeClass(elements, oldClass.split(' '));
20158
20433
  }
20159
- if (!isNullOrUndefined(cssClass$$1) && cssClass$$1 !== '') {
20160
- addClass(elements, cssClass$$1.split(' '));
20434
+ if (!isNullOrUndefined(cssClass) && cssClass !== '') {
20435
+ addClass(elements, cssClass.split(' '));
20161
20436
  }
20162
20437
  }
20163
20438
  initializeData() {
@@ -20362,6 +20637,9 @@ let Mention = class Mention extends DropDownBase {
20362
20637
  }
20363
20638
  }
20364
20639
  updateUpDownAction(e) {
20640
+ if (this.fields.disabled && this.list && this.list.querySelectorAll('.e-list-item:not(.e-disabled)').length === 0) {
20641
+ return;
20642
+ }
20365
20643
  const focusEle = this.list.querySelector('.' + dropDownBaseClasses.focus);
20366
20644
  if (this.isSelectFocusItem(focusEle)) {
20367
20645
  this.setSelection(focusEle, e);
@@ -20382,6 +20660,17 @@ let Mention = class Mention extends DropDownBase {
20382
20660
  this.setSelection(nextItem, e);
20383
20661
  }
20384
20662
  }
20663
+ let itemIndex;
20664
+ for (let index = 0; index < this.liCollections.length; index++) {
20665
+ if (this.liCollections[index].classList.contains(dropDownBaseClasses.focus)
20666
+ || this.liCollections[index].classList.contains(dropDownBaseClasses.selected)) {
20667
+ itemIndex = index;
20668
+ break;
20669
+ }
20670
+ }
20671
+ if (itemIndex != null && this.isDisabledElement(this.liCollections[itemIndex])) {
20672
+ this.updateUpDownAction(e);
20673
+ }
20385
20674
  if (this.isPopupOpen) {
20386
20675
  e.preventDefault();
20387
20676
  }
@@ -20556,7 +20845,7 @@ let Mention = class Mention extends DropDownBase {
20556
20845
  if (!isNullOrUndefined(ulElement)) {
20557
20846
  attributes(ulElement, { 'id': this.inputElement.id + '_options', 'role': 'listbox', 'aria-hidden': 'false' });
20558
20847
  }
20559
- let focusItem = ulElement.querySelector('.' + dropDownBaseClasses.li);
20848
+ let focusItem = this.fields.disabled ? ulElement.querySelector('.' + dropDownBaseClasses.li + ':not(.e-disabled)') : ulElement.querySelector('.' + dropDownBaseClasses.li);
20560
20849
  if (focusItem) {
20561
20850
  focusItem.classList.add(dropDownBaseClasses.selected);
20562
20851
  this.selectedLI = focusItem;
@@ -20782,10 +21071,10 @@ let Mention = class Mention extends DropDownBase {
20782
21071
  }
20783
21072
  }
20784
21073
  append([this.list], popupEle);
20785
- if (this.inputElement.parentElement && this.inputElement.parentElement.parentElement &&
20786
- this.inputElement.parentElement.parentElement.classList.contains('e-richtexteditor')) {
20787
- if (popupEle.firstElementChild && popupEle.firstElementChild.childElementCount > 0) {
20788
- popupEle.firstElementChild.setAttribute('aria-owns', this.inputElement.parentElement.parentElement.id);
21074
+ if (this.inputElement.parentElement) {
21075
+ const rteRootElement = this.inputElement.parentElement.closest('.e-richtexteditor');
21076
+ if (rteRootElement && popupEle.firstElementChild && popupEle.firstElementChild.childElementCount > 0) {
21077
+ popupEle.firstElementChild.setAttribute('aria-owns', rteRootElement.id);
20789
21078
  addClass([popupEle], 'e-rte-elements');
20790
21079
  }
20791
21080
  }
@@ -21087,7 +21376,7 @@ let Mention = class Mention extends DropDownBase {
21087
21376
  onMouseClick(e) {
21088
21377
  const target = e.target;
21089
21378
  const li = closest(target, '.' + dropDownBaseClasses.li);
21090
- if (!this.isValidLI(li)) {
21379
+ if (!this.isValidLI(li) || this.isDisabledElement(li)) {
21091
21380
  return;
21092
21381
  }
21093
21382
  this.isSelected = true;
@@ -21317,6 +21606,7 @@ let Mention = class Mention extends DropDownBase {
21317
21606
  }
21318
21607
  this.isTyped = false;
21319
21608
  range.deleteContents();
21609
+ range.startContainer.parentElement.normalize();
21320
21610
  const element = this.createElement('div');
21321
21611
  element.innerHTML = value;
21322
21612
  const frag = document.createDocumentFragment();
@@ -21342,7 +21632,6 @@ let Mention = class Mention extends DropDownBase {
21342
21632
  const event = new CustomEvent('content-changed', { detail: { click: true } });
21343
21633
  this.inputElement.dispatchEvent(event);
21344
21634
  }
21345
-
21346
21635
  this.onChangeEvent(e);
21347
21636
  }
21348
21637
  }
@@ -21353,10 +21642,10 @@ let Mention = class Mention extends DropDownBase {
21353
21642
  }
21354
21643
  if (this.isContentEditable(this.inputElement)) {
21355
21644
  if (Browser.isAndroid) {
21356
- return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : ' ');
21645
+ return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '');
21357
21646
  }
21358
21647
  else {
21359
- return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : ' ');
21648
+ return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '');
21360
21649
  }
21361
21650
  }
21362
21651
  else {
@@ -21710,13 +21999,5 @@ Mention = __decorate$7([
21710
21999
  NotifyPropertyChanges
21711
22000
  ], Mention);
21712
22001
 
21713
- /**
21714
- * export all modules from current location
21715
- */
21716
-
21717
- /**
21718
- * export all modules from current location
21719
- */
21720
-
21721
- 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 };
22002
+ 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 };
21722
22003
  //# sourceMappingURL=ej2-dropdowns.es2015.js.map