@syncfusion/ej2-dropdowns 25.2.7 → 26.1.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (267) hide show
  1. package/.eslintrc.json +3 -2
  2. package/dist/ej2-dropdowns.min.js +2 -2
  3. package/dist/ej2-dropdowns.umd.min.js +2 -2
  4. package/dist/ej2-dropdowns.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-dropdowns.es2015.js +531 -224
  6. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  7. package/dist/es6/ej2-dropdowns.es5.js +524 -216
  8. package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
  9. package/dist/global/ej2-dropdowns.min.js +2 -2
  10. package/dist/global/ej2-dropdowns.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +14 -13
  13. package/src/auto-complete/auto-complete.js +1 -1
  14. package/src/combo-box/combo-box.js +15 -0
  15. package/src/common/interface.js +0 -1
  16. package/src/common/virtual-scroll.js +1 -0
  17. package/src/drop-down-base/drop-down-base-model.d.ts +8 -1
  18. package/src/drop-down-base/drop-down-base.d.ts +28 -2
  19. package/src/drop-down-base/drop-down-base.js +64 -9
  20. package/src/drop-down-list/drop-down-list.d.ts +15 -2
  21. package/src/drop-down-list/drop-down-list.js +129 -13
  22. package/src/drop-down-tree/drop-down-tree-model.d.ts +15 -15
  23. package/src/drop-down-tree/drop-down-tree.d.ts +17 -13
  24. package/src/drop-down-tree/drop-down-tree.js +67 -38
  25. package/src/list-box/list-box.d.ts +1 -0
  26. package/src/list-box/list-box.js +41 -9
  27. package/src/mention/mention.js +23 -8
  28. package/src/multi-select/interface.js +0 -1
  29. package/src/multi-select/multi-select.d.ts +15 -0
  30. package/src/multi-select/multi-select.js +135 -12
  31. package/styles/auto-complete/_bootstrap5.3-definition.scss +2 -0
  32. package/styles/auto-complete/_fluent2-definition.scss +2 -0
  33. package/styles/auto-complete/bootstrap-dark.css +5 -2
  34. package/styles/auto-complete/bootstrap.css +5 -2
  35. package/styles/auto-complete/bootstrap4.css +6 -2
  36. package/styles/auto-complete/bootstrap5-dark.css +6 -2
  37. package/styles/auto-complete/bootstrap5.css +6 -2
  38. package/styles/auto-complete/fabric-dark.css +3 -1
  39. package/styles/auto-complete/fabric.css +3 -1
  40. package/styles/auto-complete/fluent-dark.css +6 -2
  41. package/styles/auto-complete/fluent.css +6 -2
  42. package/styles/auto-complete/fluent2.css +1140 -0
  43. package/styles/auto-complete/fluent2.scss +4 -0
  44. package/styles/auto-complete/highcontrast-light.css +3 -1
  45. package/styles/auto-complete/highcontrast.css +3 -1
  46. package/styles/auto-complete/material-dark.css +16 -5
  47. package/styles/auto-complete/material.css +16 -5
  48. package/styles/auto-complete/material3-dark.css +17 -6
  49. package/styles/auto-complete/material3.css +17 -6
  50. package/styles/auto-complete/tailwind-dark.css +16 -5
  51. package/styles/auto-complete/tailwind.css +16 -5
  52. package/styles/bootstrap-dark.css +197 -228
  53. package/styles/bootstrap-dark.scss +28 -8
  54. package/styles/bootstrap.css +197 -228
  55. package/styles/bootstrap.scss +28 -8
  56. package/styles/bootstrap4.css +200 -229
  57. package/styles/bootstrap4.scss +28 -8
  58. package/styles/bootstrap5-dark.css +197 -221
  59. package/styles/bootstrap5-dark.scss +28 -8
  60. package/styles/bootstrap5.css +197 -221
  61. package/styles/bootstrap5.scss +28 -8
  62. package/styles/combo-box/_bootstrap5.3-definition.scss +2 -0
  63. package/styles/combo-box/_fluent2-definition.scss +2 -0
  64. package/styles/combo-box/bootstrap-dark.css +5 -2
  65. package/styles/combo-box/bootstrap.css +5 -2
  66. package/styles/combo-box/bootstrap4.css +6 -2
  67. package/styles/combo-box/bootstrap5-dark.css +6 -2
  68. package/styles/combo-box/bootstrap5.css +6 -2
  69. package/styles/combo-box/fabric-dark.css +3 -1
  70. package/styles/combo-box/fabric.css +3 -1
  71. package/styles/combo-box/fluent-dark.css +6 -2
  72. package/styles/combo-box/fluent.css +6 -2
  73. package/styles/combo-box/fluent2.css +1140 -0
  74. package/styles/combo-box/fluent2.scss +4 -0
  75. package/styles/combo-box/highcontrast-light.css +3 -1
  76. package/styles/combo-box/highcontrast.css +3 -1
  77. package/styles/combo-box/material-dark.css +16 -5
  78. package/styles/combo-box/material.css +16 -5
  79. package/styles/combo-box/material3-dark.css +17 -6
  80. package/styles/combo-box/material3.css +17 -6
  81. package/styles/combo-box/tailwind-dark.css +16 -5
  82. package/styles/combo-box/tailwind.css +16 -5
  83. package/styles/drop-down-base/_bds-definition.scss +2 -2
  84. package/styles/drop-down-base/_bootstrap5.3-definition.scss +117 -0
  85. package/styles/drop-down-base/_fluent2-definition.scss +134 -0
  86. package/styles/drop-down-base/_layout.scss +12 -2
  87. package/styles/drop-down-base/_material3-definition.scss +0 -11
  88. package/styles/drop-down-base/_theme.scss +2 -11
  89. package/styles/drop-down-base/bootstrap-dark.css +2 -1
  90. package/styles/drop-down-base/bootstrap.css +2 -1
  91. package/styles/drop-down-base/bootstrap4.css +2 -1
  92. package/styles/drop-down-base/bootstrap5-dark.css +2 -1
  93. package/styles/drop-down-base/bootstrap5.css +2 -1
  94. package/styles/drop-down-base/fabric-dark.css +2 -1
  95. package/styles/drop-down-base/fabric.css +2 -1
  96. package/styles/drop-down-base/fluent-dark.css +2 -1
  97. package/styles/drop-down-base/fluent.css +2 -1
  98. package/styles/drop-down-base/fluent2.css +1447 -0
  99. package/styles/drop-down-base/fluent2.scss +3 -0
  100. package/styles/drop-down-base/highcontrast-light.css +2 -1
  101. package/styles/drop-down-base/highcontrast.css +2 -1
  102. package/styles/drop-down-base/material-dark.css +2 -1
  103. package/styles/drop-down-base/material.css +2 -1
  104. package/styles/drop-down-base/material3-dark.css +9 -2
  105. package/styles/drop-down-base/material3.css +9 -2
  106. package/styles/drop-down-base/tailwind-dark.css +2 -1
  107. package/styles/drop-down-base/tailwind.css +2 -1
  108. package/styles/drop-down-list/_bootstrap5.3-definition.scss +201 -0
  109. package/styles/drop-down-list/_fluent2-definition.scss +134 -0
  110. package/styles/drop-down-list/_layout.scss +5 -3
  111. package/styles/drop-down-list/_material3-definition.scss +0 -8
  112. package/styles/drop-down-list/bootstrap-dark.css +38 -3
  113. package/styles/drop-down-list/bootstrap.css +38 -3
  114. package/styles/drop-down-list/bootstrap4.css +39 -3
  115. package/styles/drop-down-list/bootstrap5-dark.css +39 -3
  116. package/styles/drop-down-list/bootstrap5.css +39 -3
  117. package/styles/drop-down-list/fabric-dark.css +36 -2
  118. package/styles/drop-down-list/fabric.css +36 -2
  119. package/styles/drop-down-list/fluent-dark.css +39 -3
  120. package/styles/drop-down-list/fluent.css +39 -3
  121. package/styles/drop-down-list/fluent2.css +1684 -0
  122. package/styles/drop-down-list/fluent2.scss +9 -0
  123. package/styles/drop-down-list/highcontrast-light.css +36 -2
  124. package/styles/drop-down-list/highcontrast.css +36 -2
  125. package/styles/drop-down-list/icons/_bootstrap5.3.scss +14 -0
  126. package/styles/drop-down-list/icons/_fluent2.scss +14 -0
  127. package/styles/drop-down-list/material-dark.css +58 -7
  128. package/styles/drop-down-list/material.css +72 -9
  129. package/styles/drop-down-list/material3-dark.css +74 -10
  130. package/styles/drop-down-list/material3.css +74 -10
  131. package/styles/drop-down-list/tailwind-dark.css +49 -6
  132. package/styles/drop-down-list/tailwind.css +49 -6
  133. package/styles/drop-down-tree/_bds-definition.scss +5 -0
  134. package/styles/drop-down-tree/_bootstrap4-definition.scss +1 -0
  135. package/styles/drop-down-tree/_bootstrap5-definition.scss +5 -0
  136. package/styles/drop-down-tree/_bootstrap5.3-definition.scss +66 -0
  137. package/styles/drop-down-tree/_fluent-definition.scss +4 -0
  138. package/styles/drop-down-tree/_fluent2-definition.scss +75 -0
  139. package/styles/drop-down-tree/_layout.scss +290 -327
  140. package/styles/drop-down-tree/_material3-definition.scss +3 -5
  141. package/styles/drop-down-tree/_tailwind-definition.scss +7 -2
  142. package/styles/drop-down-tree/_theme.scss +24 -41
  143. package/styles/drop-down-tree/bootstrap-dark.css +64 -29
  144. package/styles/drop-down-tree/bootstrap.css +64 -29
  145. package/styles/drop-down-tree/bootstrap4.css +65 -30
  146. package/styles/drop-down-tree/bootstrap5-dark.css +64 -27
  147. package/styles/drop-down-tree/bootstrap5.css +64 -27
  148. package/styles/drop-down-tree/fabric-dark.css +64 -29
  149. package/styles/drop-down-tree/fabric.css +64 -29
  150. package/styles/drop-down-tree/fluent-dark.css +72 -35
  151. package/styles/drop-down-tree/fluent.css +72 -35
  152. package/styles/drop-down-tree/fluent2.css +1733 -0
  153. package/styles/drop-down-tree/fluent2.scss +9 -0
  154. package/styles/drop-down-tree/highcontrast-light.css +64 -29
  155. package/styles/drop-down-tree/highcontrast.css +64 -23
  156. package/styles/drop-down-tree/icons/_bootstrap5.3.scss +11 -0
  157. package/styles/drop-down-tree/icons/_fluent2.scss +14 -0
  158. package/styles/drop-down-tree/material-dark.css +81 -43
  159. package/styles/drop-down-tree/material.css +98 -51
  160. package/styles/drop-down-tree/material3-dark.css +86 -32
  161. package/styles/drop-down-tree/material3.css +86 -32
  162. package/styles/drop-down-tree/tailwind-dark.css +73 -28
  163. package/styles/drop-down-tree/tailwind.css +73 -28
  164. package/styles/fabric-dark.css +195 -227
  165. package/styles/fabric-dark.scss +28 -8
  166. package/styles/fabric.css +195 -227
  167. package/styles/fabric.scss +28 -8
  168. package/styles/fluent-dark.css +207 -236
  169. package/styles/fluent-dark.scss +28 -8
  170. package/styles/fluent.css +207 -236
  171. package/styles/fluent.scss +28 -8
  172. package/styles/fluent2.css +4772 -0
  173. package/styles/fluent2.scss +28 -0
  174. package/styles/highcontrast-light.css +198 -227
  175. package/styles/highcontrast-light.scss +28 -8
  176. package/styles/highcontrast.css +198 -221
  177. package/styles/highcontrast.scss +28 -8
  178. package/styles/list-box/_bootstrap-dark-definition.scss +0 -2
  179. package/styles/list-box/_bootstrap5.3-definition.scss +120 -0
  180. package/styles/list-box/_fabric-dark-definition.scss +0 -2
  181. package/styles/list-box/_fluent2-definition.scss +121 -0
  182. package/styles/list-box/_highcontrast-light-definition.scss +0 -2
  183. package/styles/list-box/_layout.scss +65 -44
  184. package/styles/list-box/_material-dark-definition.scss +0 -2
  185. package/styles/list-box/_tailwind-definition.scss +1 -1
  186. package/styles/list-box/_theme.scss +36 -65
  187. package/styles/list-box/bootstrap-dark.css +72 -112
  188. package/styles/list-box/bootstrap.css +72 -112
  189. package/styles/list-box/bootstrap4.css +72 -112
  190. package/styles/list-box/bootstrap5-dark.css +72 -106
  191. package/styles/list-box/bootstrap5.css +72 -106
  192. package/styles/list-box/fabric-dark.css +72 -112
  193. package/styles/list-box/fabric.css +72 -112
  194. package/styles/list-box/fluent-dark.css +72 -112
  195. package/styles/list-box/fluent.css +72 -112
  196. package/styles/list-box/fluent2.css +2029 -0
  197. package/styles/list-box/fluent2.scss +5 -0
  198. package/styles/list-box/highcontrast-light.css +72 -112
  199. package/styles/list-box/highcontrast.css +72 -112
  200. package/styles/list-box/icons/_bootstrap5.3.scss +25 -0
  201. package/styles/list-box/icons/_fluent2.scss +25 -0
  202. package/styles/list-box/material-dark.css +72 -112
  203. package/styles/list-box/material.css +72 -112
  204. package/styles/list-box/material3-dark.css +73 -113
  205. package/styles/list-box/material3.css +73 -113
  206. package/styles/list-box/tailwind-dark.css +74 -114
  207. package/styles/list-box/tailwind.css +74 -114
  208. package/styles/material-dark.css +237 -260
  209. package/styles/material-dark.scss +28 -8
  210. package/styles/material.css +254 -284
  211. package/styles/material.scss +28 -8
  212. package/styles/material3-dark.css +254 -266
  213. package/styles/material3-dark.scss +28 -8
  214. package/styles/material3.css +254 -266
  215. package/styles/material3.scss +28 -8
  216. package/styles/mention/_bootstrap5.3-definition.scss +1 -0
  217. package/styles/mention/_fluent2-definition.scss +1 -0
  218. package/styles/mention/bootstrap-dark.css +24 -0
  219. package/styles/mention/bootstrap.css +24 -0
  220. package/styles/mention/bootstrap4.css +24 -0
  221. package/styles/mention/bootstrap5-dark.css +24 -0
  222. package/styles/mention/bootstrap5.css +24 -0
  223. package/styles/mention/fabric-dark.css +24 -0
  224. package/styles/mention/fabric.css +24 -0
  225. package/styles/mention/fluent-dark.css +24 -0
  226. package/styles/mention/fluent.css +24 -0
  227. package/styles/mention/fluent2.css +1130 -0
  228. package/styles/mention/fluent2.scss +6 -0
  229. package/styles/mention/highcontrast-light.css +24 -0
  230. package/styles/mention/highcontrast.css +24 -0
  231. package/styles/mention/material-dark.css +24 -0
  232. package/styles/mention/material.css +24 -0
  233. package/styles/mention/material3-dark.css +25 -1
  234. package/styles/mention/material3.css +25 -1
  235. package/styles/mention/tailwind-dark.css +24 -0
  236. package/styles/mention/tailwind.css +24 -0
  237. package/styles/multi-select/_bootstrap5.3-definition.scss +230 -0
  238. package/styles/multi-select/_fluent2-definition.scss +236 -0
  239. package/styles/multi-select/_layout.scss +32 -38
  240. package/styles/multi-select/_material3-definition.scss +0 -15
  241. package/styles/multi-select/_theme.scss +0 -4
  242. package/styles/multi-select/bootstrap-dark.css +67 -28
  243. package/styles/multi-select/bootstrap.css +67 -28
  244. package/styles/multi-select/bootstrap4.css +70 -29
  245. package/styles/multi-select/bootstrap5-dark.css +67 -28
  246. package/styles/multi-select/bootstrap5.css +67 -28
  247. package/styles/multi-select/fabric-dark.css +67 -28
  248. package/styles/multi-select/fabric.css +67 -28
  249. package/styles/multi-select/fluent-dark.css +69 -29
  250. package/styles/multi-select/fluent.css +69 -29
  251. package/styles/multi-select/fluent2.css +2663 -0
  252. package/styles/multi-select/fluent2.scss +9 -0
  253. package/styles/multi-select/highcontrast-light.css +70 -28
  254. package/styles/multi-select/highcontrast.css +70 -28
  255. package/styles/multi-select/icons/_bootstrap5.3.scss +26 -0
  256. package/styles/multi-select/icons/_fluent2.scss +692 -0
  257. package/styles/multi-select/material-dark.css +88 -32
  258. package/styles/multi-select/material.css +102 -34
  259. package/styles/multi-select/material3-dark.css +109 -35
  260. package/styles/multi-select/material3.css +109 -35
  261. package/styles/multi-select/tailwind-dark.css +67 -28
  262. package/styles/multi-select/tailwind.css +67 -28
  263. package/styles/tailwind-dark.css +218 -233
  264. package/styles/tailwind-dark.scss +28 -8
  265. package/styles/tailwind.css +218 -233
  266. package/styles/tailwind.scss +28 -8
  267. package/CHANGELOG.md +0 -2200
@@ -1,10 +1,10 @@
1
- import { Animation, Browser, ChildProperty, Complex, Component, Event, EventHandler, KeyboardEvents, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, Touch, addClass, append, attributes, classList, closest, compile, createElement, debounce, detach, extend, formatUnit, getComponent, getUniqueID, getValue, isNullOrUndefined, isUndefined, matches, prepend, remove, removeClass, rippleEffect, select, selectAll, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
2
- import { DataManager, DataUtil, JsonAdaptor, Predicate, Query } from '@syncfusion/ej2-data';
1
+ import { EventHandler, Touch, isNullOrUndefined, getValue, select, Browser, debounce, 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
  }
@@ -7908,6 +8045,9 @@ let DropDownTree = class DropDownTree extends Component {
7908
8045
  }
7909
8046
  this.currentText = this.text;
7910
8047
  this.currentValue = this.value;
8048
+ if (!isNullOrUndefined(this.value) && this.value.length > 0 && !isNullOrUndefined(this.currentText)) {
8049
+ this.inputWrapper.setAttribute('aria-label', this.currentText.split(',').join(' '));
8050
+ }
7911
8051
  if (this.isInitialized) {
7912
8052
  this.triggerChangeEvent();
7913
8053
  }
@@ -7916,8 +8056,7 @@ let DropDownTree = class DropDownTree extends Component {
7916
8056
  let data;
7917
8057
  if (this.treeDataType === 1) {
7918
8058
  for (let i = 0; i < this.treeItems.length; i++) {
7919
- // eslint-disable-next-line
7920
- const text = getValue(this.fields.text, this.treeItems[i]);
8059
+ const text = getValue(this.fields.text, this.treeItems[parseInt(i.toString(), 10)]);
7921
8060
  if (!isNullOrUndefined(this.treeItems[i]) && !isNullOrUndefined(text) && text === givenText) {
7922
8061
  data = this.treeItems[i];
7923
8062
  break;
@@ -7932,14 +8071,12 @@ let DropDownTree = class DropDownTree extends Component {
7932
8071
  getNestedItems(data, field, givenText) {
7933
8072
  let newData;
7934
8073
  for (let i = 0, objlen = data.length; i < objlen; i++) {
7935
- // eslint-disable-next-line
7936
- const dataId = getValue(this.fields.text, data[i]);
8074
+ const dataId = getValue(this.fields.text, data[parseInt(i.toString(), 10)]);
7937
8075
  if (data[i] && dataId && dataId.toString() === givenText) {
7938
8076
  return data[i];
7939
8077
  }
7940
8078
  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]);
8079
+ const childData = getValue(field.child, data[parseInt(i.toString(), 10)]);
7943
8080
  newData = this.getNestedItems(childData, this.getChildType(field), givenText);
7944
8081
  if (newData !== undefined) {
7945
8082
  break;
@@ -7947,8 +8084,7 @@ let DropDownTree = class DropDownTree extends Component {
7947
8084
  }
7948
8085
  else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined(getValue('child', data[i]))) {
7949
8086
  const child = 'child';
7950
- // eslint-disable-next-line
7951
- newData = this.getNestedItems(getValue(child, data[i]), this.getChildType(field), givenText);
8087
+ newData = this.getNestedItems(getValue(child, data[parseInt(i.toString(), 10)]), this.getChildType(field), givenText);
7952
8088
  if (newData !== undefined) {
7953
8089
  break;
7954
8090
  }
@@ -8037,12 +8173,10 @@ let DropDownTree = class DropDownTree extends Component {
8037
8173
  this.setFooterTemplate();
8038
8174
  }
8039
8175
  this.isFirstRender = false;
8040
- /* eslint-disable */
8041
8176
  if (this.hasTemplate && this.portals) {
8042
8177
  if (this.treeObj.portals) {
8043
8178
  this.portals = this.portals.concat(this.treeObj.portals.filter((item) => !this.portals.includes(item)));
8044
8179
  }
8045
- /* eslint-enable */
8046
8180
  if (this.isReact) {
8047
8181
  this.renderReactTemplates(this.reactCallBack);
8048
8182
  }
@@ -8063,9 +8197,9 @@ let DropDownTree = class DropDownTree extends Component {
8063
8197
  focusedElement.setAttribute('tabindex', '0');
8064
8198
  }
8065
8199
  else {
8066
- let oldFocussedNode = this.treeObj.element.querySelector('.e-node-focus');
8200
+ const oldFocussedNode = this.treeObj.element.querySelector('.e-node-focus');
8067
8201
  focusedElement = this.treeObj.element.querySelector('li:not(.e-disable):not(.e-prevent)');
8068
- if (oldFocussedNode && oldFocussedNode != focusedElement) {
8202
+ if (oldFocussedNode && oldFocussedNode !== focusedElement) {
8069
8203
  oldFocussedNode.setAttribute('tabindex', '-1');
8070
8204
  removeClass([oldFocussedNode], 'e-node-focus');
8071
8205
  }
@@ -8190,8 +8324,9 @@ let DropDownTree = class DropDownTree extends Component {
8190
8324
  const isHeader = closest(target, '.' + HEADER);
8191
8325
  const isFooter = closest(target, '.' + FOOTER);
8192
8326
  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)) ||
8327
+ (matches$1(target, '.e-ddt .e-popup') || matches$1(target, '.e-ddt .e-treeview'));
8328
+ if ((this.isPopupOpen && ((!isNullOrUndefined(this.inputWrapper) &&
8329
+ this.inputWrapper.contains(target)) || isTree || isScroller || isHeader || isFooter)) ||
8195
8330
  ((this.allowMultiSelection || this.showCheckBox) && (this.isPopupOpen && target.classList.contains(CHIP_CLOSE) ||
8196
8331
  (this.isPopupOpen && (target.classList.contains(CHECKALLPARENT) || target.classList.contains(ALLTEXT)
8197
8332
  || target.classList.contains(CHECKBOXFRAME)))))) {
@@ -8218,7 +8353,9 @@ let DropDownTree = class DropDownTree extends Component {
8218
8353
  removeClass([this.popupDiv], NODATA);
8219
8354
  this.hideCheckAll(false);
8220
8355
  }
8221
- this.treeDataType = this.getTreeDataType(this.treeItems, this.fields);
8356
+ if (!this.isFilteredData) {
8357
+ this.treeDataType = this.getTreeDataType(this.treeItems, this.fields);
8358
+ }
8222
8359
  if (this.isFirstRender && this.isRemoteData) {
8223
8360
  this.setTreeValue();
8224
8361
  this.setTreeText();
@@ -8314,7 +8451,8 @@ let DropDownTree = class DropDownTree extends Component {
8314
8451
  dataSource: fields.dataSource, value: fields.value, text: fields.text, parentValue: fields.parentValue,
8315
8452
  child: (fields.child ? this.cloneChildField(fields.child) : null), hasChildren: fields.hasChildren,
8316
8453
  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
8454
+ query: fields.query, selected: fields.selected, selectable: fields.selectable,
8455
+ tableName: fields.tableName, tooltip: fields.tooltip
8318
8456
  };
8319
8457
  return clonedField;
8320
8458
  }
@@ -8368,7 +8506,8 @@ let DropDownTree = class DropDownTree extends Component {
8368
8506
  if ((typeof field.child === 'string') && !isNullOrUndefined(getValue(field.child, this.fields.dataSource[i]))) {
8369
8507
  return 2;
8370
8508
  }
8371
- if (!isNullOrUndefined(getValue(field.parentValue, this.fields.dataSource[i])) || !isNullOrUndefined(getValue(field.hasChildren, this.fields.dataSource[i]))) {
8509
+ if (!isNullOrUndefined(getValue(field.parentValue, this.fields.dataSource[i])) ||
8510
+ !isNullOrUndefined(getValue(field.hasChildren, this.fields.dataSource[i]))) {
8372
8511
  return 1;
8373
8512
  }
8374
8513
  }
@@ -8445,6 +8584,9 @@ let DropDownTree = class DropDownTree extends Component {
8445
8584
  this.setProperties({ text: selectedText }, true);
8446
8585
  this.currentText = this.text;
8447
8586
  this.currentValue = this.value;
8587
+ if (!isNullOrUndefined(this.value) && this.value.length > 0) {
8588
+ this.inputWrapper.setAttribute('aria-label', args.nodeData.text.toString());
8589
+ }
8448
8590
  attributes(this.inputWrapper, { 'aria-describedby': this.element.id });
8449
8591
  attributes(this.inputWrapper, { 'aria-activedescendant': id.toString() });
8450
8592
  this.updateHiddenValue();
@@ -8517,14 +8659,13 @@ let DropDownTree = class DropDownTree extends Component {
8517
8659
  this.oldValue = this.value ? this.value.slice() : this.value;
8518
8660
  }
8519
8661
  }
8520
- onNodeExpanded(args) {
8662
+ onNodeExpanded() {
8521
8663
  if (this.hasTemplate && this.portals && this.treeObj.portals) {
8522
8664
  for (let i = 0; i < this.treeObj.portals.length; i++) {
8523
8665
  if (this.portals.indexOf(this.treeObj.portals[i]) === -1) {
8524
8666
  this.portals.push(this.treeObj.portals[i]);
8525
8667
  }
8526
8668
  }
8527
- /* eslint-enable */
8528
8669
  this.renderReactTemplates();
8529
8670
  }
8530
8671
  }
@@ -8620,7 +8761,7 @@ let DropDownTree = class DropDownTree extends Component {
8620
8761
  if (!this.isFilteredData) {
8621
8762
  this.setProperties({ value: this.isFromFilterChange && newValues && newValues.length === 0 ? this.value : newValues }, true);
8622
8763
  this.isFromFilterChange = false;
8623
- if (newValues && newValues.length !== 0 && !this.showCheckBox) {
8764
+ if (newValues && newValues.length !== 0 && !this.showCheckBox && !this.ddtCompareValues(this.treeObj.selectedNodes, this.value.slice())) {
8624
8765
  this.treeObj.selectedNodes = this.value.slice();
8625
8766
  this.treeObj.dataBind();
8626
8767
  }
@@ -8815,6 +8956,12 @@ let DropDownTree = class DropDownTree extends Component {
8815
8956
  }
8816
8957
  this.currentText = this.text;
8817
8958
  this.currentValue = this.value;
8959
+ if (!isNullOrUndefined(this.value) && this.value.length > 0 && !isNullOrUndefined(this.currentText)) {
8960
+ this.inputWrapper.setAttribute('aria-label', this.currentText.split(',').join(' '));
8961
+ }
8962
+ else {
8963
+ this.inputWrapper.setAttribute('aria-label', this.getModuleName());
8964
+ }
8818
8965
  }
8819
8966
  setChipValues(text, value) {
8820
8967
  if (!this.inputWrapper.contains(this.chipWrapper)) {
@@ -8902,7 +9049,6 @@ let DropDownTree = class DropDownTree extends Component {
8902
9049
  }
8903
9050
  templateComplier(template) {
8904
9051
  if (template) {
8905
- // eslint-disable-next-line
8906
9052
  try {
8907
9053
  if (typeof template !== 'function' && document.querySelectorAll(template).length) {
8908
9054
  return compile(document.querySelector(template).innerHTML.trim());
@@ -8988,7 +9134,7 @@ let DropDownTree = class DropDownTree extends Component {
8988
9134
  this.ensurePlaceHolder();
8989
9135
  }
8990
9136
  resetValue(isDynamicChange) {
8991
- if (this.value === [] && this.text == null) {
9137
+ if (Array.isArray(this.value) && this.value.length === 0 && this.text == null) {
8992
9138
  return;
8993
9139
  }
8994
9140
  Input.setValue(null, this.inputEle, this.floatLabelType);
@@ -8996,6 +9142,9 @@ let DropDownTree = class DropDownTree extends Component {
8996
9142
  this.oldValue = this.value;
8997
9143
  this.setProperties({ value: [] }, true);
8998
9144
  }
9145
+ if (isNullOrUndefined(this.value) || this.value.length === 0) {
9146
+ this.inputWrapper.setAttribute('aria-label', this.getModuleName());
9147
+ }
8999
9148
  this.dataValue = null;
9000
9149
  this.setProperties({ text: null }, true);
9001
9150
  this.selectedData = [];
@@ -9102,9 +9251,7 @@ let DropDownTree = class DropDownTree extends Component {
9102
9251
  updateTemplate() {
9103
9252
  if (this.popupObj) {
9104
9253
  this.clearTemplate();
9105
- /* eslint-disable */
9106
9254
  this.portals = [];
9107
- /* eslint-enable */
9108
9255
  this.popupObj.destroy();
9109
9256
  if (this.isPopupOpen) {
9110
9257
  this.hidePopup();
@@ -9480,22 +9627,34 @@ let DropDownTree = class DropDownTree extends Component {
9480
9627
  detach(this.inputWrapper);
9481
9628
  detach(this.popupDiv);
9482
9629
  detach(this.hiddenElement);
9630
+ Input.setRipple(false, [this.inputObj]);
9483
9631
  this.element.classList.remove('e-input');
9484
9632
  if (this.showCheckBox || this.allowMultiSelection) {
9485
9633
  this.element.classList.remove(CHIP_INPUT);
9486
9634
  }
9635
+ detach(this.inputObj.container);
9636
+ if (this.inputObj.buttons.length) {
9637
+ detach(this.inputObj.buttons[0]);
9638
+ }
9487
9639
  this.inputObj = null;
9488
9640
  while (this.hiddenElement.options.length > 0) {
9489
9641
  this.hiddenElement.remove(0);
9490
9642
  }
9491
9643
  this.hiddenElement.innerHTML = '';
9492
9644
  this.hiddenElement = null;
9645
+ this.inputWrapper.innerHTML = '';
9493
9646
  this.inputWrapper = null;
9494
9647
  this.popupDiv = null;
9495
9648
  this.tree = null;
9496
9649
  this.popupObj = null;
9497
9650
  this.treeObj = null;
9498
9651
  this.overAllClear = null;
9652
+ if (this.chipCollection) {
9653
+ const chipsIcons = selectAll('.e-chips-close', this.chipCollection);
9654
+ for (const element of chipsIcons) {
9655
+ EventHandler.remove(element, 'mousedown', this.removeChip);
9656
+ }
9657
+ }
9499
9658
  this.chipWrapper = null;
9500
9659
  this.chipCollection = null;
9501
9660
  this.checkAllParent = null;
@@ -9554,7 +9713,11 @@ let DropDownTree = class DropDownTree extends Component {
9554
9713
  * @returns {void}
9555
9714
  */
9556
9715
  hidePopup() {
9557
- const eventArgs = { popup: this.popupObj };
9716
+ const eventArgs = { popup: this.popupObj, cancel: false };
9717
+ this.trigger('close', eventArgs);
9718
+ if (eventArgs.cancel) {
9719
+ return;
9720
+ }
9558
9721
  this.inputWrapper.classList.remove(ICONANIMATION);
9559
9722
  if (this.popupEle) {
9560
9723
  addClass([this.popupEle], DDTHIDEICON);
@@ -9568,7 +9731,6 @@ let DropDownTree = class DropDownTree extends Component {
9568
9731
  addClass([this.inputWrapper], [INPUTFOCUS]);
9569
9732
  }
9570
9733
  }
9571
- this.trigger('close', eventArgs);
9572
9734
  if (this.destroyPopupOnHide) {
9573
9735
  this.isFirstRender = true;
9574
9736
  this.destroyPopup();
@@ -9767,18 +9929,12 @@ DropDownTree = __decorate$2([
9767
9929
  NotifyPropertyChanges
9768
9930
  ], DropDownTree);
9769
9931
 
9770
- /**
9771
- * export all modules from current location
9772
- */
9773
-
9774
9932
  var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
9775
9933
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9776
9934
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9777
9935
  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
9936
  return c > 3 && r && Object.defineProperty(target, key, r), r;
9779
9937
  };
9780
- // eslint-disable-next-line @typescript-eslint/triple-slash-reference
9781
- /// <reference path='../drop-down-list/drop-down-list-model.d.ts'/>
9782
9938
  const SPINNER_CLASS = 'e-atc-spinner-icon';
9783
9939
  dropDownListClasses.root = 'e-combobox';
9784
9940
  const inputObject$1 = {
@@ -9896,6 +10052,18 @@ let ComboBox = class ComboBox extends DropDownList {
9896
10052
  }
9897
10053
  }
9898
10054
  updateValues() {
10055
+ if (this.fields.disabled) {
10056
+ if (this.value != null) {
10057
+ this.value = !this.isDisableItemValue(this.value) ? this.value : null;
10058
+ }
10059
+ if (this.text != null) {
10060
+ this.text = !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
10061
+ }
10062
+ if (this.index != null) {
10063
+ this.index = !this.isDisabledItemByIndex(this.index) ? this.index : null;
10064
+ this.activeIndex = this.index;
10065
+ }
10066
+ }
9899
10067
  if (!isNullOrUndefined(this.value)) {
9900
10068
  let currentValue = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
9901
10069
  const li = this.getElementByValue(currentValue);
@@ -10142,9 +10310,9 @@ let ComboBox = class ComboBox extends DropDownList {
10142
10310
  const value = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
10143
10311
  this.itemData = this.getDataByValue(value);
10144
10312
  const dataItem = this.getItemData();
10145
- const setValue$$1 = this.allowObjectBinding ? this.itemData : dataItem.value;
10313
+ const setValue = this.allowObjectBinding ? this.itemData : dataItem.value;
10146
10314
  if (!(this.allowCustom && isNullOrUndefined(dataItem.value) && isNullOrUndefined(dataItem.text))) {
10147
- this.setProperties({ 'value': setValue$$1 }, !this.allowCustom);
10315
+ this.setProperties({ 'value': setValue }, !this.allowCustom);
10148
10316
  }
10149
10317
  }
10150
10318
  /**
@@ -10327,6 +10495,9 @@ let ComboBox = class ComboBox extends DropDownList {
10327
10495
  else {
10328
10496
  li = this.list.querySelector('.' + dropDownListClasses.focus);
10329
10497
  }
10498
+ if (this.isDisabledElement(li)) {
10499
+ return;
10500
+ }
10330
10501
  if (li) {
10331
10502
  this.setSelection(li, e);
10332
10503
  this.isTyped = false;
@@ -10742,18 +10913,12 @@ ComboBox = __decorate$3([
10742
10913
  NotifyPropertyChanges
10743
10914
  ], ComboBox);
10744
10915
 
10745
- /**
10746
- * export all modules from current location
10747
- */
10748
-
10749
10916
  var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
10750
10917
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
10751
10918
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
10752
10919
  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
10920
  return c > 3 && r && Object.defineProperty(target, key, r), r;
10754
10921
  };
10755
- // eslint-disable-next-line @typescript-eslint/triple-slash-reference
10756
- /// <reference path='../combo-box/combo-box-model.d.ts'/>
10757
10922
  dropDownListClasses.root = 'e-autocomplete';
10758
10923
  dropDownListClasses.icon = 'e-input-group-icon e-ddl-icon e-search-icon';
10759
10924
  /**
@@ -11207,7 +11372,7 @@ let AutoComplete = class AutoComplete extends ComboBox {
11207
11372
  }
11208
11373
  };
11209
11374
  __decorate$4([
11210
- Complex({ value: null, iconCss: null, groupBy: null }, FieldSettings)
11375
+ Complex({ value: null, iconCss: null, groupBy: null, disabled: null }, FieldSettings)
11211
11376
  ], AutoComplete.prototype, "fields", void 0);
11212
11377
  __decorate$4([
11213
11378
  Property(true)
@@ -11258,10 +11423,6 @@ AutoComplete = __decorate$4([
11258
11423
  NotifyPropertyChanges
11259
11424
  ], AutoComplete);
11260
11425
 
11261
- /**
11262
- * export all modules from current location
11263
- */
11264
-
11265
11426
  /**
11266
11427
  * FloatLable Moduel
11267
11428
  * Specifies whether to display the floating label above the input element.
@@ -11423,8 +11584,6 @@ var __decorate$5 = (undefined && undefined.__decorate) || function (decorators,
11423
11584
  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
11585
  return c > 3 && r && Object.defineProperty(target, key, r), r;
11425
11586
  };
11426
- // eslint-disable-next-line @typescript-eslint/triple-slash-reference
11427
- /// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>
11428
11587
  const FOCUS = 'e-input-focus';
11429
11588
  const DISABLED$1 = 'e-disabled';
11430
11589
  const OVER_ALL_WRAPPER = 'e-multiselect e-input-group e-control-wrapper';
@@ -11747,13 +11906,26 @@ let MultiSelect = class MultiSelect extends DropDownBase {
11747
11906
  }
11748
11907
  else {
11749
11908
  if (this.enableVirtualization) {
11750
- element = this.ulElement.querySelector('li.'
11751
- + dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)');
11909
+ if (this.fields.disabled) {
11910
+ element = this.ulElement.querySelector('li.'
11911
+ + dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)' + ':not(.' + DISABLED$1 + ')');
11912
+ }
11913
+ else {
11914
+ element = this.ulElement.querySelector('li.'
11915
+ + dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)');
11916
+ }
11752
11917
  }
11753
11918
  else {
11754
- element = this.ulElement.querySelector('li.'
11755
- + dropDownBaseClasses.li + ':not(.'
11756
- + HIDE_LIST + ')');
11919
+ if (this.fields.disabled) {
11920
+ element = this.ulElement.querySelector('li.'
11921
+ + dropDownBaseClasses.li + ':not(.'
11922
+ + HIDE_LIST + ')' + ':not(.' + DISABLED$1 + ')');
11923
+ }
11924
+ else {
11925
+ element = this.ulElement.querySelector('li.'
11926
+ + dropDownBaseClasses.li + ':not(.'
11927
+ + HIDE_LIST + ')');
11928
+ }
11757
11929
  }
11758
11930
  }
11759
11931
  if (element !== null) {
@@ -12213,9 +12385,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
12213
12385
  if (filterQuery.queries[queryElements].fn === 'onSkip') {
12214
12386
  isSkip = false;
12215
12387
  }
12216
- if (filterQuery.queries[queryElements].fn === 'onTake') {
12217
-
12218
- }
12388
+ if (filterQuery.queries[queryElements].fn === 'onTake') ;
12219
12389
  }
12220
12390
  let queryTakeValue = 0;
12221
12391
  if (filterQuery && filterQuery.queries.length > 0) {
@@ -13203,7 +13373,6 @@ let MultiSelect = class MultiSelect extends DropDownBase {
13203
13373
  this.list.scrollTop = this.virtualListInfo && this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight : 0;
13204
13374
  }
13205
13375
  isScrollerCHanged = this.isKeyBoardAction;
13206
-
13207
13376
  }
13208
13377
  this.isKeyBoardAction = isScrollerCHanged;
13209
13378
  }
@@ -13480,6 +13649,21 @@ let MultiSelect = class MultiSelect extends DropDownBase {
13480
13649
  }
13481
13650
  }
13482
13651
  }
13652
+ const focusedLi = this.list ? this.list.querySelector('.e-item-focus') : null;
13653
+ if (this.isDisabledElement(focusedLi)) {
13654
+ if (this.list.querySelectorAll('.e-list-item:not(.e-hide-listitem):not(.e-disabled)').length === 0) {
13655
+ this.removeFocus();
13656
+ return;
13657
+ }
13658
+ const index = this.getIndexByValue(focusedLi.getAttribute('data-value'));
13659
+ if (index === 0 && this.mode !== 'CheckBox') {
13660
+ position = 1;
13661
+ }
13662
+ if (index === (this.list.querySelectorAll('.e-list-item:not(.e-hide-listitem)').length - 1)) {
13663
+ position = -1;
13664
+ }
13665
+ this.moveByList(position);
13666
+ }
13483
13667
  }
13484
13668
  getElementByValue(value) {
13485
13669
  let item;
@@ -13668,7 +13852,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
13668
13852
  }
13669
13853
  this.setProperties({ value: [].concat([], removeVal) }, true);
13670
13854
  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], '');
13855
+ 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
13856
  this.setProperties({ text: currentText.toString() }, true);
13673
13857
  }
13674
13858
  if (element !== null) {
@@ -15049,7 +15233,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
15049
15233
  }
15050
15234
  }
15051
15235
  addListFocus(element) {
15052
- if (this.enabled && this.isValidLI(element)) {
15236
+ if (this.enabled && (this.isValidLI(element) || (this.fields.disabled && this.isDisabledElement(element)))) {
15053
15237
  this.removeFocus();
15054
15238
  addClass([element], dropDownBaseClasses.focus);
15055
15239
  this.updateAriaActiveDescendant();
@@ -15639,14 +15823,14 @@ let MultiSelect = class MultiSelect extends DropDownBase {
15639
15823
  let li;
15640
15824
  if (!isNullOrUndefined(this.list)) {
15641
15825
  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)');
15826
+ 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)' :
15827
+ 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)');
15644
15828
  }
15645
15829
  if (this.value && this.value.length && event && event.target
15646
15830
  && closest(event.target, '.e-close-hooker') && this.allowFiltering) {
15647
15831
  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)');
15832
+ 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)' :
15833
+ 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)');
15650
15834
  }
15651
15835
  if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !isNullOrUndefined(this.fields.groupBy)) {
15652
15836
  let target = (event ? (this.groupTemplate ? closest(event.target, '.e-list-group-item') : event.target) : null);
@@ -16089,9 +16273,16 @@ let MultiSelect = class MultiSelect extends DropDownBase {
16089
16273
  this.updateClearButton(newProp.showClearButton);
16090
16274
  break;
16091
16275
  case 'text':
16276
+ if (this.fields.disabled) {
16277
+ this.text =
16278
+ this.text && !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
16279
+ }
16092
16280
  this.updateVal(this.value, this.value, 'text');
16093
16281
  break;
16094
16282
  case 'value':
16283
+ if (this.fields.disabled) {
16284
+ this.removeDisabledItemsValue(this.value);
16285
+ }
16095
16286
  this.updateVal(this.value, oldProp.value, 'value');
16096
16287
  this.addValidInputClass();
16097
16288
  if (!this.closePopupOnSelect && this.isPopupOpen()) {
@@ -16338,7 +16529,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
16338
16529
  const animModel = {
16339
16530
  name: 'FadeOut',
16340
16531
  duration: 100,
16341
- delay: delay ? delay : 0
16532
+ delay: delay
16342
16533
  };
16343
16534
  this.customFilterQuery = null;
16344
16535
  const eventArgs = { popup: this.popupObj, cancel: false, animation: animModel, event: e || null };
@@ -16658,7 +16849,32 @@ let MultiSelect = class MultiSelect extends DropDownBase {
16658
16849
  listParent.remove();
16659
16850
  return listItemHeight;
16660
16851
  }
16852
+ /**
16853
+ * Removes disabled values from the given array.
16854
+ *
16855
+ * @param { number[] | string[] | boolean[] | object[] } value - The array to check.
16856
+ * @returns {void}
16857
+ */
16858
+ removeDisabledItemsValue(value) {
16859
+ if (value) {
16860
+ const data = [];
16861
+ let dataIndex = 0;
16862
+ for (let index = 0; index < value.length; index++) {
16863
+ let indexValue = value[index];
16864
+ if (typeof (indexValue) === 'object') {
16865
+ indexValue = JSON.parse(JSON.stringify(indexValue))[this.fields.value];
16866
+ }
16867
+ if ((indexValue != null) && !(this.isDisabledItemByIndex(this.getIndexByValue(indexValue)))) {
16868
+ data[dataIndex++] = value[index];
16869
+ }
16870
+ }
16871
+ this.value = data.length > 0 ? data : null;
16872
+ }
16873
+ }
16661
16874
  checkInitialValue() {
16875
+ if (this.fields.disabled) {
16876
+ this.removeDisabledItemsValue(this.value);
16877
+ }
16662
16878
  const isData = this.dataSource instanceof Array ? (this.dataSource.length > 0)
16663
16879
  : !isNullOrUndefined(this.dataSource);
16664
16880
  if (!(this.value && this.value.length) &&
@@ -16697,6 +16913,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
16697
16913
  super.render();
16698
16914
  }
16699
16915
  }
16916
+ if (this.fields.disabled) {
16917
+ this.text = this.text && !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
16918
+ }
16700
16919
  if (!isNullOrUndefined(this.text) && (isNullOrUndefined(this.value) || this.value.length === 0)) {
16701
16920
  this.initialTextUpdate();
16702
16921
  }
@@ -16830,6 +17049,66 @@ let MultiSelect = class MultiSelect extends DropDownBase {
16830
17049
  this.refreshInputHight();
16831
17050
  this.checkPlaceholderSize();
16832
17051
  }
17052
+ /**
17053
+ * Method to disable specific item in the popup.
17054
+ *
17055
+ * @param {string | number | object | HTMLLIElement} item - Specifies the item to be disabled.
17056
+ * @returns {void}
17057
+ * @deprecated
17058
+ */
17059
+ disableItem(item) {
17060
+ if (this.fields.disabled) {
17061
+ if (!this.list) {
17062
+ this.renderList();
17063
+ }
17064
+ let itemIndex = -1;
17065
+ if (this.liCollections && this.liCollections.length > 0 && this.listData && this.fields.disabled) {
17066
+ if (typeof (item) === 'string') {
17067
+ itemIndex = this.getIndexByValue(item);
17068
+ }
17069
+ else if (typeof item === 'object') {
17070
+ if (item instanceof HTMLLIElement) {
17071
+ for (let index = 0; index < this.liCollections.length; index++) {
17072
+ if (this.liCollections[index] === item) {
17073
+ itemIndex = this.getIndexByValue(item.getAttribute('data-value'));
17074
+ break;
17075
+ }
17076
+ }
17077
+ }
17078
+ else {
17079
+ const value = JSON.parse(JSON.stringify(item))[this.fields.value];
17080
+ for (let index = 0; index < this.listData.length; index++) {
17081
+ if (JSON.parse(JSON.stringify(this.listData[index]))[this.fields.value] === value) {
17082
+ itemIndex = this.getIndexByValue(value);
17083
+ break;
17084
+ }
17085
+ }
17086
+ }
17087
+ }
17088
+ else {
17089
+ itemIndex = item;
17090
+ }
17091
+ const isValidIndex = itemIndex < this.liCollections.length && itemIndex > -1;
17092
+ if (isValidIndex && !(JSON.parse(JSON.stringify(this.listData[itemIndex]))[this.fields.disabled])) {
17093
+ const li = this.liCollections[itemIndex];
17094
+ if (li) {
17095
+ this.disableListItem(li);
17096
+ const parsedData = JSON.parse(JSON.stringify(this.listData[itemIndex]));
17097
+ parsedData[this.fields.disabled] = true;
17098
+ this.listData[itemIndex] = parsedData;
17099
+ if (li.classList.contains(dropDownBaseClasses.focus)) {
17100
+ this.removeFocus();
17101
+ }
17102
+ if (li.classList.contains(HIDE_LIST) || li.classList.contains(dropDownBaseClasses.selected)) {
17103
+ const oldValue = this.value;
17104
+ this.removeDisabledItemsValue(this.value);
17105
+ this.updateVal(this.value, oldValue, 'value');
17106
+ }
17107
+ }
17108
+ }
17109
+ }
17110
+ }
17111
+ }
16833
17112
  /**
16834
17113
  * Removes the component from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.
16835
17114
  *
@@ -16898,7 +17177,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
16898
17177
  }
16899
17178
  };
16900
17179
  __decorate$5([
16901
- Complex({ text: null, value: null, iconCss: null, groupBy: null }, FieldSettings)
17180
+ Complex({ text: null, value: null, iconCss: null, groupBy: null, disabled: null }, FieldSettings)
16902
17181
  ], MultiSelect.prototype, "fields", void 0);
16903
17182
  __decorate$5([
16904
17183
  Property(false)
@@ -17280,12 +17559,12 @@ class CheckBoxSelection {
17280
17559
  }
17281
17560
  if (!isNullOrUndefined(this.checkWrapper)) {
17282
17561
  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);
17562
+ const selectAll = false;
17563
+ this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), args.li, args.e, selectAll);
17285
17564
  }
17286
17565
  }
17287
- validateCheckNode(checkWrap, isCheck, li, e, selectAll$$1) {
17288
- this.changeState(checkWrap, isCheck ? 'uncheck' : 'check', e, true, selectAll$$1);
17566
+ validateCheckNode(checkWrap, isCheck, li, e, selectAll) {
17567
+ this.changeState(checkWrap, isCheck ? 'uncheck' : 'check', e, true, selectAll);
17289
17568
  }
17290
17569
  clickHandler(e) {
17291
17570
  let target;
@@ -17296,26 +17575,26 @@ class CheckBoxSelection {
17296
17575
  target = e.currentTarget;
17297
17576
  }
17298
17577
  this.checkWrapper = closest(target, '.' + CHECKBOXWRAP$1);
17299
- const selectAll$$1 = true;
17578
+ const selectAll = true;
17300
17579
  if (!isNullOrUndefined(this.checkWrapper)) {
17301
17580
  const checkElement = select('.' + CHECKBOXFRAME$1, this.checkWrapper);
17302
- this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), null, e, selectAll$$1);
17581
+ this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), null, e, selectAll);
17303
17582
  }
17304
17583
  e.preventDefault();
17305
17584
  }
17306
- changeState(wrapper, state, e, isPrevent, selectAll$$1) {
17585
+ changeState(wrapper, state, e, isPrevent, selectAll) {
17307
17586
  const frameSpan = wrapper.getElementsByClassName(CHECKBOXFRAME$1)[0];
17308
17587
  if (state === 'check' && !frameSpan.classList.contains(CHECK$1)) {
17309
17588
  frameSpan.classList.remove(INDETERMINATE);
17310
17589
  frameSpan.classList.add(CHECK$1);
17311
- if (selectAll$$1) {
17590
+ if (selectAll) {
17312
17591
  this.parent.selectAllItems(true, e);
17313
17592
  this.setLocale(true);
17314
17593
  }
17315
17594
  }
17316
17595
  else if (state === 'uncheck' && (frameSpan.classList.contains(CHECK$1) || frameSpan.classList.contains(INDETERMINATE))) {
17317
17596
  removeClass([frameSpan], [CHECK$1, INDETERMINATE]);
17318
- if (selectAll$$1) {
17597
+ if (selectAll) {
17319
17598
  this.parent.selectAllItems(false, e);
17320
17599
  this.setLocale();
17321
17600
  }
@@ -17323,7 +17602,7 @@ class CheckBoxSelection {
17323
17602
  else if (state === 'indeterminate' && !(frameSpan.classList.contains(INDETERMINATE))) {
17324
17603
  removeClass([frameSpan], [CHECK$1]);
17325
17604
  frameSpan.classList.add(INDETERMINATE);
17326
- if (selectAll$$1) {
17605
+ if (selectAll) {
17327
17606
  this.parent.selectAllItems(false, e);
17328
17607
  this.setLocale();
17329
17608
  }
@@ -17613,10 +17892,6 @@ class CheckBoxSelection {
17613
17892
  }
17614
17893
  }
17615
17894
 
17616
- /**
17617
- * export all modules from current location
17618
- */
17619
-
17620
17895
  var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
17621
17896
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
17622
17897
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -17624,8 +17899,6 @@ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators,
17624
17899
  return c > 3 && r && Object.defineProperty(target, key, r), r;
17625
17900
  };
17626
17901
  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
17902
  /**
17630
17903
  * Defines the Selection settings of List Box.
17631
17904
  */
@@ -17726,6 +17999,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
17726
17999
  const hiddenSelect = this.createElement('select', { className: 'e-hidden-select', attrs: { 'multiple': '' } });
17727
18000
  hiddenSelect.style.visibility = 'hidden';
17728
18001
  this.list.classList.add('e-listbox-wrapper');
18002
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17729
18003
  this.list.querySelector('.e-list-parent').setAttribute('role', 'presentation');
17730
18004
  const groupHdrs = this.list.querySelectorAll('.e-list-group-item');
17731
18005
  for (let i = 0; i < groupHdrs.length; i++) {
@@ -17744,7 +18018,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
17744
18018
  }
17745
18019
  }
17746
18020
  else {
17747
- if (this.initLoad) {
18021
+ if (this.initLoad && this.element.parentElement) {
17748
18022
  this.element.parentElement.insertBefore(this.list, this.element);
17749
18023
  }
17750
18024
  this.list.insertBefore(this.element, this.list.firstChild);
@@ -17762,6 +18036,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
17762
18036
  this.list.setAttribute('role', 'listbox');
17763
18037
  attributes(this.list, { 'role': 'listbox', 'aria-label': 'listbox', 'aria-multiselectable': this.selectionSettings.mode === 'Multiple' ? 'true' : 'false' });
17764
18038
  this.updateSelectionSettings();
18039
+ this.resizeHandler();
17765
18040
  }
17766
18041
  updateSelectionSettings() {
17767
18042
  if (this.selectionSettings.showCheckbox && this.selectionSettings.showSelectAll && this.liCollections.length) {
@@ -17811,6 +18086,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
17811
18086
  initToolbar() {
17812
18087
  const pos = this.toolbarSettings.position;
17813
18088
  const prevScope = this.element.getAttribute('data-value');
18089
+ this.toolbarSettings.items = isNullOrUndefined(this.toolbarSettings.items) ? [] : this.toolbarSettings.items;
17814
18090
  if (this.toolbarSettings.items.length) {
17815
18091
  const toolElem = this.createElement('div', { className: 'e-listbox-tool', attrs: { 'role': 'toolbar' } });
17816
18092
  const wrapper = this.createElement('div', {
@@ -17904,7 +18180,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
17904
18180
  this.spinner = this.createElement('div', { className: 'e-listbox-wrapper' });
17905
18181
  }
17906
18182
  this.spinner.style.height = formatUnit(this.height);
17907
- this.element.parentElement.insertBefore(this.spinner, this.element.nextSibling);
18183
+ if (this.element.parentElement) {
18184
+ this.element.parentElement.insertBefore(this.spinner, this.element.nextSibling);
18185
+ }
17908
18186
  createSpinner({ target: this.spinner }, this.createElement);
17909
18187
  showSpinner(this.spinner);
17910
18188
  }
@@ -17964,7 +18242,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
17964
18242
  this.list.insertBefore(searchEle, this.list.firstElementChild);
17965
18243
  this.filterParent = this.list.getElementsByClassName('e-filter-parent')[0];
17966
18244
  this.filterWireEvents(searchEle);
17967
- let inputSearch = searchEle.querySelector('.e-input-filter');
18245
+ const inputSearch = searchEle.querySelector('.e-input-filter');
17968
18246
  if (inputSearch) {
17969
18247
  inputSearch.addEventListener('focus', function () {
17970
18248
  if (!searchEle.childNodes[0].classList.contains('e-input-focus')) {
@@ -18102,7 +18380,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
18102
18380
  }
18103
18381
  beforeDragEnd(args) {
18104
18382
  this.stopTimer();
18105
- let items = [];
18383
+ const items = [];
18106
18384
  this.dragValue = this.getFormattedValue(args.droppedElement.getAttribute('data-value'));
18107
18385
  if (this.value.indexOf(this.dragValue) > -1) {
18108
18386
  args.items = this.getDataByValues(this.value);
@@ -18207,7 +18485,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
18207
18485
  }
18208
18486
  const fListData = [].slice.call(this.listData);
18209
18487
  const fSortData = [].slice.call(this.sortedData);
18210
- selectedOptions.forEach((value, index) => {
18488
+ selectedOptions.forEach((value) => {
18211
18489
  droppedData = this.getDataByValue(value);
18212
18490
  const srcIdx = this.listData.indexOf(droppedData);
18213
18491
  const jsonSrcIdx = this.jsonData.indexOf(droppedData);
@@ -18390,7 +18668,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
18390
18668
  }
18391
18669
  this.setSelection(items, state, !isValue);
18392
18670
  this.updateSelectedOptions();
18393
- let selElems = [];
18671
+ const selElems = [];
18394
18672
  for (let i = 0; i < items.length; i++) {
18395
18673
  const liColl = this.list.querySelectorAll('[aria-selected="true"]');
18396
18674
  for (let j = 0; j < liColl.length; j++) {
@@ -18722,6 +19000,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
18722
19000
  if (form) {
18723
19001
  EventHandler.add(form, 'reset', this.formResetHandler, this);
18724
19002
  }
19003
+ window.addEventListener('resize', this.resizeHandler.bind(this));
18725
19004
  }
18726
19005
  wireToolbarEvent() {
18727
19006
  if (this.toolbarSettings.items.length) {
@@ -18743,8 +19022,13 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
18743
19022
  if (form) {
18744
19023
  EventHandler.remove(form, 'reset', this.formResetHandler);
18745
19024
  }
19025
+ window.removeEventListener('resize', this.resizeHandler.bind(this));
18746
19026
  }
18747
19027
  clickHandler(e) {
19028
+ const li = closest(e.target, '.' + 'e-list-item');
19029
+ if (isNullOrUndefined(li)) {
19030
+ return;
19031
+ }
18748
19032
  this.selectHandler(e);
18749
19033
  }
18750
19034
  checkSelectAll() {
@@ -19232,6 +19516,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
19232
19516
  }
19233
19517
  for (let i = 0; i < fListBox.ulElement.childElementCount; i++) {
19234
19518
  if (fListBox.ulElement.childNodes[i].classList.contains('e-disabled')) {
19519
+ // eslint-disable-next-line @typescript-eslint/tslint/config
19235
19520
  flistboxarray = flistboxarray.filter(function (item) { return item !== i; });
19236
19521
  tempLiColl.push(fListBox.ulElement.childNodes[i]);
19237
19522
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -19557,10 +19842,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
19557
19842
  }
19558
19843
  dataUpdater(dataSource, query, fields) {
19559
19844
  this.isDataFetched = false;
19560
- const backCommand = true;
19561
19845
  if (this.targetElement().trim() === '') {
19562
19846
  let list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
19563
- if (backCommand) {
19847
+ {
19564
19848
  this.remoteCustomValue = false;
19565
19849
  if (this.isAngular && this.itemTemplate) {
19566
19850
  list = this.renderItems(this.listData, fields);
@@ -19582,6 +19866,14 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
19582
19866
  this.refreshClearIcon();
19583
19867
  }
19584
19868
  }
19869
+ resizeHandler() {
19870
+ if (this.list.scrollWidth > this.list.offsetWidth) {
19871
+ this.list.querySelector('.e-list-parent').style.display = 'inline-block';
19872
+ }
19873
+ else {
19874
+ this.list.querySelector('.e-list-parent').style.display = 'block';
19875
+ }
19876
+ }
19585
19877
  getValidIndex(cli, index, keyCode) {
19586
19878
  const cul = this.ulElement;
19587
19879
  if (cli.classList.contains('e-disabled') || cli.classList.contains(cssClass.group)) {
@@ -19644,7 +19936,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
19644
19936
  });
19645
19937
  }
19646
19938
  }
19647
- setSelection(values = this.value, isSelect = true, isText = false, canFocus = true) {
19939
+ setSelection(
19940
+ // eslint-disable-next-line max-len
19941
+ values = this.value, isSelect = true, isText = false, canFocus = true) {
19648
19942
  let li;
19649
19943
  let liselect;
19650
19944
  if (values) {
@@ -19664,21 +19958,21 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
19664
19958
  li = this.list.querySelector('[data-value="' + text + '"]');
19665
19959
  }
19666
19960
  if (li) {
19667
- if (this.selectionSettings.showCheckbox) {
19961
+ if (this.selectionSettings.showCheckbox && !li.classList.contains('e-disabled')) {
19668
19962
  liselect = li.getElementsByClassName('e-frame')[0].classList.contains('e-check');
19669
19963
  }
19670
19964
  else {
19671
19965
  liselect = li.classList.contains('e-selected');
19672
19966
  }
19673
19967
  if (!isSelect && liselect || isSelect && !liselect && li) {
19674
- if (this.selectionSettings.showCheckbox) {
19968
+ if (this.selectionSettings.showCheckbox && !li.classList.contains('e-disabled')) {
19675
19969
  this.notify('updatelist', { li: li, module: 'listbox' });
19676
19970
  if (canFocus) {
19677
19971
  li.focus();
19678
19972
  }
19679
19973
  }
19680
19974
  else {
19681
- if (isSelect) {
19975
+ if (isSelect && !li.classList.contains('e-disabled')) {
19682
19976
  li.classList.add(cssClass.selected);
19683
19977
  li.setAttribute('aria-selected', 'true');
19684
19978
  if (canFocus) {
@@ -19712,7 +20006,17 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
19712
20006
  this.checkSelectAll();
19713
20007
  }
19714
20008
  checkDisabledState(inst) {
19715
- return inst.ulElement.querySelectorAll('.' + cssClass.li).length === 0;
20009
+ if (isNullOrUndefined(inst.ulElement)) {
20010
+ if (!isNullOrUndefined(this.dataSource) && isNullOrUndefined(this.dataSource.length)) {
20011
+ return false;
20012
+ }
20013
+ else {
20014
+ return true;
20015
+ }
20016
+ }
20017
+ else {
20018
+ return inst.ulElement.querySelectorAll('.' + cssClass.li).length === 0;
20019
+ }
19716
20020
  }
19717
20021
  updateToolBarState() {
19718
20022
  if (this.toolbarSettings.items.length) {
@@ -19948,6 +20252,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
19948
20252
  }
19949
20253
  }
19950
20254
  if (newProp.toolbarSettings.items) {
20255
+ oldProp.toolbarSettings.items = isNullOrUndefined(oldProp.toolbarSettings.items) ? [] : oldProp.toolbarSettings.items;
19951
20256
  if (oldProp.toolbarSettings && oldProp.toolbarSettings.items.length) {
19952
20257
  ele = this.list.parentElement;
19953
20258
  ele.parentElement.insertBefore(this.list, ele);
@@ -20082,10 +20387,6 @@ const listBoxClasses = {
20082
20387
  clearIcon: 'e-clear-icon'
20083
20388
  };
20084
20389
 
20085
- /**
20086
- * export all modules from current location
20087
- */
20088
-
20089
20390
  var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
20090
20391
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20091
20392
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -20152,12 +20453,12 @@ let Mention = class Mention extends DropDownBase {
20152
20453
  this.setCssClass(newClass, [this.popupObj.element], oldClass);
20153
20454
  }
20154
20455
  }
20155
- setCssClass(cssClass$$1, elements, oldClass) {
20456
+ setCssClass(cssClass, elements, oldClass) {
20156
20457
  if (!isNullOrUndefined(oldClass) && oldClass !== '') {
20157
20458
  removeClass(elements, oldClass.split(' '));
20158
20459
  }
20159
- if (!isNullOrUndefined(cssClass$$1) && cssClass$$1 !== '') {
20160
- addClass(elements, cssClass$$1.split(' '));
20460
+ if (!isNullOrUndefined(cssClass) && cssClass !== '') {
20461
+ addClass(elements, cssClass.split(' '));
20161
20462
  }
20162
20463
  }
20163
20464
  initializeData() {
@@ -20362,6 +20663,9 @@ let Mention = class Mention extends DropDownBase {
20362
20663
  }
20363
20664
  }
20364
20665
  updateUpDownAction(e) {
20666
+ if (this.fields.disabled && this.list && this.list.querySelectorAll('.e-list-item:not(.e-disabled)').length === 0) {
20667
+ return;
20668
+ }
20365
20669
  const focusEle = this.list.querySelector('.' + dropDownBaseClasses.focus);
20366
20670
  if (this.isSelectFocusItem(focusEle)) {
20367
20671
  this.setSelection(focusEle, e);
@@ -20382,6 +20686,17 @@ let Mention = class Mention extends DropDownBase {
20382
20686
  this.setSelection(nextItem, e);
20383
20687
  }
20384
20688
  }
20689
+ let itemIndex;
20690
+ for (let index = 0; index < this.liCollections.length; index++) {
20691
+ if (this.liCollections[index].classList.contains(dropDownBaseClasses.focus)
20692
+ || this.liCollections[index].classList.contains(dropDownBaseClasses.selected)) {
20693
+ itemIndex = index;
20694
+ break;
20695
+ }
20696
+ }
20697
+ if (itemIndex != null && this.isDisabledElement(this.liCollections[itemIndex])) {
20698
+ this.updateUpDownAction(e);
20699
+ }
20385
20700
  if (this.isPopupOpen) {
20386
20701
  e.preventDefault();
20387
20702
  }
@@ -20556,7 +20871,7 @@ let Mention = class Mention extends DropDownBase {
20556
20871
  if (!isNullOrUndefined(ulElement)) {
20557
20872
  attributes(ulElement, { 'id': this.inputElement.id + '_options', 'role': 'listbox', 'aria-hidden': 'false' });
20558
20873
  }
20559
- let focusItem = ulElement.querySelector('.' + dropDownBaseClasses.li);
20874
+ let focusItem = this.fields.disabled ? ulElement.querySelector('.' + dropDownBaseClasses.li + ':not(.e-disabled)') : ulElement.querySelector('.' + dropDownBaseClasses.li);
20560
20875
  if (focusItem) {
20561
20876
  focusItem.classList.add(dropDownBaseClasses.selected);
20562
20877
  this.selectedLI = focusItem;
@@ -20782,10 +21097,10 @@ let Mention = class Mention extends DropDownBase {
20782
21097
  }
20783
21098
  }
20784
21099
  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);
21100
+ if (this.inputElement.parentElement) {
21101
+ const rteRootElement = this.inputElement.parentElement.closest('.e-richtexteditor');
21102
+ if (rteRootElement && popupEle.firstElementChild && popupEle.firstElementChild.childElementCount > 0) {
21103
+ popupEle.firstElementChild.setAttribute('aria-owns', rteRootElement.id);
20789
21104
  addClass([popupEle], 'e-rte-elements');
20790
21105
  }
20791
21106
  }
@@ -21087,7 +21402,7 @@ let Mention = class Mention extends DropDownBase {
21087
21402
  onMouseClick(e) {
21088
21403
  const target = e.target;
21089
21404
  const li = closest(target, '.' + dropDownBaseClasses.li);
21090
- if (!this.isValidLI(li)) {
21405
+ if (!this.isValidLI(li) || this.isDisabledElement(li)) {
21091
21406
  return;
21092
21407
  }
21093
21408
  this.isSelected = true;
@@ -21317,6 +21632,7 @@ let Mention = class Mention extends DropDownBase {
21317
21632
  }
21318
21633
  this.isTyped = false;
21319
21634
  range.deleteContents();
21635
+ range.startContainer.parentElement.normalize();
21320
21636
  const element = this.createElement('div');
21321
21637
  element.innerHTML = value;
21322
21638
  const frag = document.createDocumentFragment();
@@ -21342,7 +21658,6 @@ let Mention = class Mention extends DropDownBase {
21342
21658
  const event = new CustomEvent('content-changed', { detail: { click: true } });
21343
21659
  this.inputElement.dispatchEvent(event);
21344
21660
  }
21345
-
21346
21661
  this.onChangeEvent(e);
21347
21662
  }
21348
21663
  }
@@ -21353,10 +21668,10 @@ let Mention = class Mention extends DropDownBase {
21353
21668
  }
21354
21669
  if (this.isContentEditable(this.inputElement)) {
21355
21670
  if (Browser.isAndroid) {
21356
- return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : ' ');
21671
+ return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '');
21357
21672
  }
21358
21673
  else {
21359
- return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : ' ');
21674
+ return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '');
21360
21675
  }
21361
21676
  }
21362
21677
  else {
@@ -21710,13 +22025,5 @@ Mention = __decorate$7([
21710
22025
  NotifyPropertyChanges
21711
22026
  ], Mention);
21712
22027
 
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 };
22028
+ 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
22029
  //# sourceMappingURL=ej2-dropdowns.es2015.js.map