@syncfusion/ej2-dropdowns 25.2.7 → 26.1.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/.eslintrc.json +3 -2
  2. package/dist/ej2-dropdowns.min.js +2 -2
  3. package/dist/ej2-dropdowns.umd.min.js +2 -2
  4. package/dist/ej2-dropdowns.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-dropdowns.es2015.js +505 -224
  6. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  7. package/dist/es6/ej2-dropdowns.es5.js +498 -216
  8. package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
  9. package/dist/global/ej2-dropdowns.min.js +2 -2
  10. package/dist/global/ej2-dropdowns.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +14 -13
  13. package/src/auto-complete/auto-complete.js +1 -1
  14. package/src/combo-box/combo-box.js +15 -0
  15. package/src/common/interface.js +0 -1
  16. package/src/common/virtual-scroll.js +1 -0
  17. package/src/drop-down-base/drop-down-base-model.d.ts +8 -1
  18. package/src/drop-down-base/drop-down-base.d.ts +28 -2
  19. package/src/drop-down-base/drop-down-base.js +64 -9
  20. package/src/drop-down-list/drop-down-list.d.ts +15 -2
  21. package/src/drop-down-list/drop-down-list.js +129 -13
  22. package/src/drop-down-tree/drop-down-tree-model.d.ts +15 -15
  23. package/src/drop-down-tree/drop-down-tree.d.ts +17 -13
  24. package/src/drop-down-tree/drop-down-tree.js +52 -38
  25. package/src/list-box/list-box.js +30 -9
  26. package/src/mention/mention.js +23 -8
  27. package/src/multi-select/interface.js +0 -1
  28. package/src/multi-select/multi-select.d.ts +15 -0
  29. package/src/multi-select/multi-select.js +135 -12
  30. package/styles/auto-complete/_bootstrap5.3-definition.scss +2 -0
  31. package/styles/auto-complete/_fluent2-definition.scss +2 -0
  32. package/styles/auto-complete/bootstrap-dark.css +5 -2
  33. package/styles/auto-complete/bootstrap.css +5 -2
  34. package/styles/auto-complete/bootstrap4.css +6 -2
  35. package/styles/auto-complete/bootstrap5-dark.css +6 -2
  36. package/styles/auto-complete/bootstrap5.css +6 -2
  37. package/styles/auto-complete/fabric-dark.css +3 -1
  38. package/styles/auto-complete/fabric.css +3 -1
  39. package/styles/auto-complete/fluent-dark.css +6 -2
  40. package/styles/auto-complete/fluent.css +6 -2
  41. package/styles/auto-complete/fluent2.css +1140 -0
  42. package/styles/auto-complete/fluent2.scss +4 -0
  43. package/styles/auto-complete/highcontrast-light.css +3 -1
  44. package/styles/auto-complete/highcontrast.css +3 -1
  45. package/styles/auto-complete/material-dark.css +16 -5
  46. package/styles/auto-complete/material.css +16 -5
  47. package/styles/auto-complete/material3-dark.css +17 -6
  48. package/styles/auto-complete/material3.css +17 -6
  49. package/styles/auto-complete/tailwind-dark.css +16 -5
  50. package/styles/auto-complete/tailwind.css +16 -5
  51. package/styles/bootstrap-dark.css +196 -228
  52. package/styles/bootstrap-dark.scss +28 -8
  53. package/styles/bootstrap.css +196 -228
  54. package/styles/bootstrap.scss +28 -8
  55. package/styles/bootstrap4.css +199 -229
  56. package/styles/bootstrap4.scss +28 -8
  57. package/styles/bootstrap5-dark.css +196 -221
  58. package/styles/bootstrap5-dark.scss +28 -8
  59. package/styles/bootstrap5.css +196 -221
  60. package/styles/bootstrap5.scss +28 -8
  61. package/styles/combo-box/_bootstrap5.3-definition.scss +2 -0
  62. package/styles/combo-box/_fluent2-definition.scss +2 -0
  63. package/styles/combo-box/bootstrap-dark.css +5 -2
  64. package/styles/combo-box/bootstrap.css +5 -2
  65. package/styles/combo-box/bootstrap4.css +6 -2
  66. package/styles/combo-box/bootstrap5-dark.css +6 -2
  67. package/styles/combo-box/bootstrap5.css +6 -2
  68. package/styles/combo-box/fabric-dark.css +3 -1
  69. package/styles/combo-box/fabric.css +3 -1
  70. package/styles/combo-box/fluent-dark.css +6 -2
  71. package/styles/combo-box/fluent.css +6 -2
  72. package/styles/combo-box/fluent2.css +1140 -0
  73. package/styles/combo-box/fluent2.scss +4 -0
  74. package/styles/combo-box/highcontrast-light.css +3 -1
  75. package/styles/combo-box/highcontrast.css +3 -1
  76. package/styles/combo-box/material-dark.css +16 -5
  77. package/styles/combo-box/material.css +16 -5
  78. package/styles/combo-box/material3-dark.css +17 -6
  79. package/styles/combo-box/material3.css +17 -6
  80. package/styles/combo-box/tailwind-dark.css +16 -5
  81. package/styles/combo-box/tailwind.css +16 -5
  82. package/styles/drop-down-base/_bds-definition.scss +2 -2
  83. package/styles/drop-down-base/_bootstrap5.3-definition.scss +117 -0
  84. package/styles/drop-down-base/_fluent2-definition.scss +134 -0
  85. package/styles/drop-down-base/_layout.scss +12 -2
  86. package/styles/drop-down-base/_material3-definition.scss +0 -11
  87. package/styles/drop-down-base/_theme.scss +2 -11
  88. package/styles/drop-down-base/bootstrap-dark.css +2 -1
  89. package/styles/drop-down-base/bootstrap.css +2 -1
  90. package/styles/drop-down-base/bootstrap4.css +2 -1
  91. package/styles/drop-down-base/bootstrap5-dark.css +2 -1
  92. package/styles/drop-down-base/bootstrap5.css +2 -1
  93. package/styles/drop-down-base/fabric-dark.css +2 -1
  94. package/styles/drop-down-base/fabric.css +2 -1
  95. package/styles/drop-down-base/fluent-dark.css +2 -1
  96. package/styles/drop-down-base/fluent.css +2 -1
  97. package/styles/drop-down-base/fluent2.css +1447 -0
  98. package/styles/drop-down-base/fluent2.scss +3 -0
  99. package/styles/drop-down-base/highcontrast-light.css +2 -1
  100. package/styles/drop-down-base/highcontrast.css +2 -1
  101. package/styles/drop-down-base/material-dark.css +2 -1
  102. package/styles/drop-down-base/material.css +2 -1
  103. package/styles/drop-down-base/material3-dark.css +9 -2
  104. package/styles/drop-down-base/material3.css +9 -2
  105. package/styles/drop-down-base/tailwind-dark.css +2 -1
  106. package/styles/drop-down-base/tailwind.css +2 -1
  107. package/styles/drop-down-list/_bootstrap5.3-definition.scss +201 -0
  108. package/styles/drop-down-list/_fluent2-definition.scss +134 -0
  109. package/styles/drop-down-list/_layout.scss +5 -3
  110. package/styles/drop-down-list/_material3-definition.scss +0 -8
  111. package/styles/drop-down-list/bootstrap-dark.css +38 -3
  112. package/styles/drop-down-list/bootstrap.css +38 -3
  113. package/styles/drop-down-list/bootstrap4.css +39 -3
  114. package/styles/drop-down-list/bootstrap5-dark.css +39 -3
  115. package/styles/drop-down-list/bootstrap5.css +39 -3
  116. package/styles/drop-down-list/fabric-dark.css +36 -2
  117. package/styles/drop-down-list/fabric.css +36 -2
  118. package/styles/drop-down-list/fluent-dark.css +39 -3
  119. package/styles/drop-down-list/fluent.css +39 -3
  120. package/styles/drop-down-list/fluent2.css +1684 -0
  121. package/styles/drop-down-list/fluent2.scss +9 -0
  122. package/styles/drop-down-list/highcontrast-light.css +36 -2
  123. package/styles/drop-down-list/highcontrast.css +36 -2
  124. package/styles/drop-down-list/icons/_bootstrap5.3.scss +14 -0
  125. package/styles/drop-down-list/icons/_fluent2.scss +14 -0
  126. package/styles/drop-down-list/material-dark.css +58 -7
  127. package/styles/drop-down-list/material.css +72 -9
  128. package/styles/drop-down-list/material3-dark.css +74 -10
  129. package/styles/drop-down-list/material3.css +74 -10
  130. package/styles/drop-down-list/tailwind-dark.css +49 -6
  131. package/styles/drop-down-list/tailwind.css +49 -6
  132. package/styles/drop-down-tree/_bds-definition.scss +5 -0
  133. package/styles/drop-down-tree/_bootstrap4-definition.scss +1 -0
  134. package/styles/drop-down-tree/_bootstrap5-definition.scss +5 -0
  135. package/styles/drop-down-tree/_bootstrap5.3-definition.scss +66 -0
  136. package/styles/drop-down-tree/_fluent-definition.scss +4 -0
  137. package/styles/drop-down-tree/_fluent2-definition.scss +75 -0
  138. package/styles/drop-down-tree/_layout.scss +289 -327
  139. package/styles/drop-down-tree/_material3-definition.scss +3 -5
  140. package/styles/drop-down-tree/_tailwind-definition.scss +7 -2
  141. package/styles/drop-down-tree/_theme.scss +24 -41
  142. package/styles/drop-down-tree/bootstrap-dark.css +63 -29
  143. package/styles/drop-down-tree/bootstrap.css +63 -29
  144. package/styles/drop-down-tree/bootstrap4.css +64 -30
  145. package/styles/drop-down-tree/bootstrap5-dark.css +63 -27
  146. package/styles/drop-down-tree/bootstrap5.css +63 -27
  147. package/styles/drop-down-tree/fabric-dark.css +63 -29
  148. package/styles/drop-down-tree/fabric.css +63 -29
  149. package/styles/drop-down-tree/fluent-dark.css +71 -35
  150. package/styles/drop-down-tree/fluent.css +71 -35
  151. package/styles/drop-down-tree/fluent2.css +1732 -0
  152. package/styles/drop-down-tree/fluent2.scss +9 -0
  153. package/styles/drop-down-tree/highcontrast-light.css +63 -29
  154. package/styles/drop-down-tree/highcontrast.css +63 -23
  155. package/styles/drop-down-tree/icons/_bootstrap5.3.scss +11 -0
  156. package/styles/drop-down-tree/icons/_fluent2.scss +14 -0
  157. package/styles/drop-down-tree/material-dark.css +80 -43
  158. package/styles/drop-down-tree/material.css +97 -51
  159. package/styles/drop-down-tree/material3-dark.css +85 -32
  160. package/styles/drop-down-tree/material3.css +85 -32
  161. package/styles/drop-down-tree/tailwind-dark.css +72 -28
  162. package/styles/drop-down-tree/tailwind.css +72 -28
  163. package/styles/fabric-dark.css +194 -227
  164. package/styles/fabric-dark.scss +28 -8
  165. package/styles/fabric.css +194 -227
  166. package/styles/fabric.scss +28 -8
  167. package/styles/fluent-dark.css +206 -236
  168. package/styles/fluent-dark.scss +28 -8
  169. package/styles/fluent.css +206 -236
  170. package/styles/fluent.scss +28 -8
  171. package/styles/fluent2.css +4771 -0
  172. package/styles/fluent2.scss +28 -0
  173. package/styles/highcontrast-light.css +197 -227
  174. package/styles/highcontrast-light.scss +28 -8
  175. package/styles/highcontrast.css +197 -221
  176. package/styles/highcontrast.scss +28 -8
  177. package/styles/list-box/_bootstrap-dark-definition.scss +0 -2
  178. package/styles/list-box/_bootstrap5.3-definition.scss +120 -0
  179. package/styles/list-box/_fabric-dark-definition.scss +0 -2
  180. package/styles/list-box/_fluent2-definition.scss +121 -0
  181. package/styles/list-box/_highcontrast-light-definition.scss +0 -2
  182. package/styles/list-box/_layout.scss +65 -44
  183. package/styles/list-box/_material-dark-definition.scss +0 -2
  184. package/styles/list-box/_tailwind-definition.scss +1 -1
  185. package/styles/list-box/_theme.scss +36 -65
  186. package/styles/list-box/bootstrap-dark.css +72 -112
  187. package/styles/list-box/bootstrap.css +72 -112
  188. package/styles/list-box/bootstrap4.css +72 -112
  189. package/styles/list-box/bootstrap5-dark.css +72 -106
  190. package/styles/list-box/bootstrap5.css +72 -106
  191. package/styles/list-box/fabric-dark.css +72 -112
  192. package/styles/list-box/fabric.css +72 -112
  193. package/styles/list-box/fluent-dark.css +72 -112
  194. package/styles/list-box/fluent.css +72 -112
  195. package/styles/list-box/fluent2.css +2029 -0
  196. package/styles/list-box/fluent2.scss +5 -0
  197. package/styles/list-box/highcontrast-light.css +72 -112
  198. package/styles/list-box/highcontrast.css +72 -112
  199. package/styles/list-box/icons/_bootstrap5.3.scss +25 -0
  200. package/styles/list-box/icons/_fluent2.scss +25 -0
  201. package/styles/list-box/material-dark.css +72 -112
  202. package/styles/list-box/material.css +72 -112
  203. package/styles/list-box/material3-dark.css +73 -113
  204. package/styles/list-box/material3.css +73 -113
  205. package/styles/list-box/tailwind-dark.css +74 -114
  206. package/styles/list-box/tailwind.css +74 -114
  207. package/styles/material-dark.css +236 -260
  208. package/styles/material-dark.scss +28 -8
  209. package/styles/material.css +253 -284
  210. package/styles/material.scss +28 -8
  211. package/styles/material3-dark.css +253 -266
  212. package/styles/material3-dark.scss +28 -8
  213. package/styles/material3.css +253 -266
  214. package/styles/material3.scss +28 -8
  215. package/styles/mention/_bootstrap5.3-definition.scss +1 -0
  216. package/styles/mention/_fluent2-definition.scss +1 -0
  217. package/styles/mention/bootstrap-dark.css +24 -0
  218. package/styles/mention/bootstrap.css +24 -0
  219. package/styles/mention/bootstrap4.css +24 -0
  220. package/styles/mention/bootstrap5-dark.css +24 -0
  221. package/styles/mention/bootstrap5.css +24 -0
  222. package/styles/mention/fabric-dark.css +24 -0
  223. package/styles/mention/fabric.css +24 -0
  224. package/styles/mention/fluent-dark.css +24 -0
  225. package/styles/mention/fluent.css +24 -0
  226. package/styles/mention/fluent2.css +1130 -0
  227. package/styles/mention/fluent2.scss +6 -0
  228. package/styles/mention/highcontrast-light.css +24 -0
  229. package/styles/mention/highcontrast.css +24 -0
  230. package/styles/mention/material-dark.css +24 -0
  231. package/styles/mention/material.css +24 -0
  232. package/styles/mention/material3-dark.css +25 -1
  233. package/styles/mention/material3.css +25 -1
  234. package/styles/mention/tailwind-dark.css +24 -0
  235. package/styles/mention/tailwind.css +24 -0
  236. package/styles/multi-select/_bootstrap5.3-definition.scss +230 -0
  237. package/styles/multi-select/_fluent2-definition.scss +236 -0
  238. package/styles/multi-select/_layout.scss +32 -38
  239. package/styles/multi-select/_material3-definition.scss +0 -15
  240. package/styles/multi-select/_theme.scss +0 -4
  241. package/styles/multi-select/bootstrap-dark.css +67 -28
  242. package/styles/multi-select/bootstrap.css +67 -28
  243. package/styles/multi-select/bootstrap4.css +70 -29
  244. package/styles/multi-select/bootstrap5-dark.css +67 -28
  245. package/styles/multi-select/bootstrap5.css +67 -28
  246. package/styles/multi-select/fabric-dark.css +67 -28
  247. package/styles/multi-select/fabric.css +67 -28
  248. package/styles/multi-select/fluent-dark.css +69 -29
  249. package/styles/multi-select/fluent.css +69 -29
  250. package/styles/multi-select/fluent2.css +2663 -0
  251. package/styles/multi-select/fluent2.scss +9 -0
  252. package/styles/multi-select/highcontrast-light.css +70 -28
  253. package/styles/multi-select/highcontrast.css +70 -28
  254. package/styles/multi-select/icons/_bootstrap5.3.scss +26 -0
  255. package/styles/multi-select/icons/_fluent2.scss +692 -0
  256. package/styles/multi-select/material-dark.css +88 -32
  257. package/styles/multi-select/material.css +102 -34
  258. package/styles/multi-select/material3-dark.css +109 -35
  259. package/styles/multi-select/material3.css +109 -35
  260. package/styles/multi-select/tailwind-dark.css +67 -28
  261. package/styles/multi-select/tailwind.css +67 -28
  262. package/styles/tailwind-dark.css +217 -233
  263. package/styles/tailwind-dark.scss +28 -8
  264. package/styles/tailwind.css +217 -233
  265. package/styles/tailwind.scss +28 -8
  266. package/CHANGELOG.md +0 -2200
@@ -1,10 +1,10 @@
1
- import { Animation, Browser, ChildProperty, Complex, Component, Event, EventHandler, KeyboardEvents, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, Touch, addClass, append, attributes, classList, closest, compile, createElement, debounce, detach, extend, formatUnit, getComponent, getUniqueID, getValue, isNullOrUndefined, isUndefined, matches, prepend, remove, removeClass, rippleEffect, select, selectAll, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
2
- import { DataManager, DataUtil, JsonAdaptor, Predicate, Query } from '@syncfusion/ej2-data';
1
+ import { EventHandler, Touch, isNullOrUndefined, getValue, select, Browser, debounce, Property, ChildProperty, selectAll, compile, L10n, addClass, removeClass, extend, append, setStyleAttribute, prepend, rippleEffect, detach, Complex, Event, NotifyPropertyChanges, Component, classList, closest, KeyboardEvents, attributes, isUndefined, formatUnit, Animation, getUniqueID, remove, SanitizeHtmlHelper, setValue, matches as matches$1, createElement, getComponent } from '@syncfusion/ej2-base';
2
+ import { DataManager, Query, DataUtil, Predicate, JsonAdaptor } from '@syncfusion/ej2-data';
3
3
  import { ListBase, Sortable, cssClass, moveTo } from '@syncfusion/ej2-lists';
4
4
  import { Skeleton } from '@syncfusion/ej2-notifications';
5
- import { Popup, createSpinner, getZindexPartial, hideSpinner, isCollide, showSpinner } from '@syncfusion/ej2-popups';
5
+ import { hideSpinner, createSpinner, showSpinner, isCollide, Popup, getZindexPartial } from '@syncfusion/ej2-popups';
6
6
  import { Input, TextBox } from '@syncfusion/ej2-inputs';
7
- import { Button, createCheckBox } from '@syncfusion/ej2-buttons';
7
+ import { createCheckBox, Button } from '@syncfusion/ej2-buttons';
8
8
  import { TreeView } from '@syncfusion/ej2-navigations';
9
9
 
10
10
  /**
@@ -13,7 +13,7 @@ import { TreeView } from '@syncfusion/ej2-navigations';
13
13
  var queryString = '';
14
14
  var prevString = '';
15
15
  var tempQueryString = '';
16
- var matches$1 = [];
16
+ var matches = [];
17
17
  var activeClass = 'e-active';
18
18
  var prevElementId = '';
19
19
  /**
@@ -56,21 +56,21 @@ function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId,
56
56
  var index;
57
57
  queryString = ignoreCase ? queryString.toLowerCase() : queryString;
58
58
  if (prevElementId === elementId && prevString === queryString && !refresh) {
59
- for (var i = 0; i < matches$1.length; i++) {
60
- if (matches$1[i].classList.contains(activeClass)) {
59
+ for (var i = 0; i < matches.length; i++) {
60
+ if (matches[i].classList.contains(activeClass)) {
61
61
  index = i;
62
62
  break;
63
63
  }
64
- if (currentValue && matches$1[i].textContent.toLowerCase() === currentValue.toLowerCase()) {
64
+ if (currentValue && matches[i].textContent.toLowerCase() === currentValue.toLowerCase()) {
65
65
  index = i;
66
66
  break;
67
67
  }
68
68
  }
69
69
  index = index + 1;
70
70
  if (isVirtual) {
71
- return matches$1[index] && matches$1.length - 1 != index ? matches$1[index] : matches$1[matches$1.length];
71
+ return matches[index] && matches.length - 1 != index ? matches[index] : matches[matches.length];
72
72
  }
73
- return matches$1[index] ? matches$1[index] : matches$1[0];
73
+ return matches[index] ? matches[index] : matches[0];
74
74
  }
75
75
  else {
76
76
  var listItems = items;
@@ -79,7 +79,7 @@ function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId,
79
79
  var item = void 0;
80
80
  selectedIndex = selectedIndex ? selectedIndex + 1 : 0;
81
81
  var i = selectedIndex;
82
- matches$1 = [];
82
+ matches = [];
83
83
  do {
84
84
  if (i === listItems.length) {
85
85
  i = -1;
@@ -93,7 +93,7 @@ function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId,
93
93
  item = listItems[index];
94
94
  text = ignoreCase ? item.innerText.toLowerCase() : item.innerText;
95
95
  if (text.substr(0, strLength) === queryString) {
96
- matches$1.push(listItems[index]);
96
+ matches.push(listItems[index]);
97
97
  }
98
98
  i++;
99
99
  } while (i !== selectedIndex);
@@ -101,8 +101,8 @@ function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId,
101
101
  prevElementId = elementId;
102
102
  if (isVirtual) {
103
103
  var indexUpdated = false;
104
- for (var i_1 = 0; i_1 < matches$1.length; i_1++) {
105
- if (currentValue && matches$1[i_1].textContent.toLowerCase() === currentValue.toLowerCase()) {
104
+ for (var i_1 = 0; i_1 < matches.length; i_1++) {
105
+ if (currentValue && matches[i_1].textContent.toLowerCase() === currentValue.toLowerCase()) {
106
106
  index = i_1;
107
107
  indexUpdated = true;
108
108
  break;
@@ -111,9 +111,9 @@ function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId,
111
111
  if (currentValue && indexUpdated) {
112
112
  index = index + 1;
113
113
  }
114
- return matches$1[index] ? matches$1[index] : matches$1[0];
114
+ return matches[index] ? matches[index] : matches[0];
115
115
  }
116
- return matches$1[0];
116
+ return matches[0];
117
117
  }
118
118
  }
119
119
  /**
@@ -176,7 +176,7 @@ function resetIncrementalSearchValues(elementId) {
176
176
  prevElementId = '';
177
177
  prevString = '';
178
178
  queryString = '';
179
- matches$1 = [];
179
+ matches = [];
180
180
  }
181
181
  }
182
182
 
@@ -555,6 +555,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
555
555
  this.parent.updatevirtualizationList();
556
556
  }
557
557
  this.parent.getSkeletonCount();
558
+ this.parent.skeletonCount = this.parent.totalItemCount != 0 && this.parent.totalItemCount < (this.parent.itemCount * 2) ? 0 : this.parent.skeletonCount;
558
559
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
559
560
  var virtualTrackElement = this.parent.list.getElementsByClassName('e-virtual-ddl')[0];
560
561
  if (virtualTrackElement) {
@@ -790,10 +791,6 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
790
791
  return VirtualScroll;
791
792
  }());
792
793
 
793
- /**
794
- * Common source
795
- */
796
-
797
794
  var __extends = (undefined && undefined.__extends) || (function () {
798
795
  var extendStatics = function (d, b) {
799
796
  extendStatics = Object.setPrototypeOf ||
@@ -833,6 +830,9 @@ var FieldSettings = /** @__PURE__ @class */ (function (_super) {
833
830
  __decorate([
834
831
  Property()
835
832
  ], FieldSettings.prototype, "htmlAttributes", void 0);
833
+ __decorate([
834
+ Property()
835
+ ], FieldSettings.prototype, "disabled", void 0);
836
836
  return FieldSettings;
837
837
  }(ChildProperty));
838
838
  var dropDownBaseClasses = {
@@ -875,7 +875,6 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
875
875
  function DropDownBase(options, element) {
876
876
  var _this = _super.call(this, options, element) || this;
877
877
  _this.preventChange = false;
878
- _this.isAngular = false;
879
878
  _this.isPreventChange = false;
880
879
  _this.isDynamicDataChange = false;
881
880
  _this.addedNewItem = false;
@@ -1086,7 +1085,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1086
1085
  };
1087
1086
  DropDownBase.prototype.l10nUpdate = function (actionFailure) {
1088
1087
  var ele = this.getModuleName() === 'listbox' ? this.ulElement : this.list;
1089
- if (this.noRecordsTemplate !== 'No records found' || this.actionFailureTemplate !== 'Request failed') {
1088
+ if ((!isNullOrUndefined(this.noRecordsTemplate) && this.noRecordsTemplate !== 'No records found') || this.actionFailureTemplate !== 'Request failed') {
1090
1089
  var template = actionFailure ? this.actionFailureTemplate : this.noRecordsTemplate;
1091
1090
  var compiledString = void 0;
1092
1091
  var templateId = actionFailure ? this.actionFailureTemplateId : this.noRecordsTemplateId;
@@ -1248,7 +1247,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1248
1247
  DropDownBase.prototype.getTransformValues = function () {
1249
1248
  var translateY = this.viewPortInfo.startIndex * this.listItemHeight;
1250
1249
  translateY = translateY - (this.skeletonCount * this.listItemHeight);
1251
- translateY = this.viewPortInfo.startIndex === 0 && this.listData && this.listData.length === 0 ? 0 : translateY;
1250
+ translateY = ((this.viewPortInfo.startIndex === 0 && this.listData && this.listData.length === 0) || this.skeletonCount === 0) ? 0 : translateY;
1252
1251
  var styleText = "transform: translate(0px, " + translateY + "px);";
1253
1252
  return styleText;
1254
1253
  };
@@ -1393,17 +1392,18 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1393
1392
  }
1394
1393
  element.querySelectorAll('select>option');
1395
1394
  }
1396
- this.updateFields(fields.text, fields.value, this.fields.groupBy, this.fields.htmlAttributes, this.fields.iconCss);
1395
+ this.updateFields(fields.text, fields.value, this.fields.groupBy, this.fields.htmlAttributes, this.fields.iconCss, this.fields.disabled);
1397
1396
  this.resetList(jsonElement, fields);
1398
1397
  };
1399
- DropDownBase.prototype.updateFields = function (text, value, groupBy, htmlAttributes, iconCss) {
1398
+ DropDownBase.prototype.updateFields = function (text, value, groupBy, htmlAttributes, iconCss, disabled) {
1400
1399
  var field = {
1401
1400
  'fields': {
1402
1401
  text: text,
1403
1402
  value: value,
1404
1403
  groupBy: !isNullOrUndefined(groupBy) ? groupBy : this.fields && this.fields.groupBy,
1405
1404
  htmlAttributes: !isNullOrUndefined(htmlAttributes) ? htmlAttributes : this.fields && this.fields.htmlAttributes,
1406
- iconCss: !isNullOrUndefined(iconCss) ? iconCss : this.fields && this.fields.iconCss
1405
+ iconCss: !isNullOrUndefined(iconCss) ? iconCss : this.fields && this.fields.iconCss,
1406
+ disabled: !isNullOrUndefined(disabled) ? disabled : this.fields && this.fields.disabled
1407
1407
  }
1408
1408
  };
1409
1409
  this.setProperties(field, true);
@@ -1774,8 +1774,16 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1774
1774
  };
1775
1775
  /* eslint-disable @typescript-eslint/no-unused-vars */
1776
1776
  DropDownBase.prototype.postRender = function (listElement, list, bindEvent) {
1777
+ if (this.fields.disabled) {
1778
+ var liCollections = listElement.querySelectorAll('.' + dropDownBaseClasses.li);
1779
+ for (var index = 0; index < liCollections.length; index++) {
1780
+ if (JSON.parse(JSON.stringify(this.listData[index]))[this.fields.disabled]) {
1781
+ this.disableListItem(liCollections[index]);
1782
+ }
1783
+ }
1784
+ }
1777
1785
  /* eslint-enable @typescript-eslint/no-unused-vars */
1778
- var focusItem = listElement.querySelector('.' + dropDownBaseClasses.li);
1786
+ var focusItem = this.fields.disabled ? listElement.querySelector('.' + dropDownBaseClasses.li + ':not(.e-disabled') : listElement.querySelector('.' + dropDownBaseClasses.li);
1779
1787
  var selectedItem = listElement.querySelector('.' + dropDownBaseClasses.selected);
1780
1788
  if (focusItem && !selectedItem) {
1781
1789
  focusItem.classList.add(dropDownBaseClasses.focus);
@@ -1910,9 +1918,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1910
1918
  break;
1911
1919
  }
1912
1920
  if (isDownkey) {
1913
- if ((!isNullOrUndefined(liCollections[index]) && liCollections[index].classList.contains(dropDownBaseClasses.selected) && this.getModuleName() !== 'autocomplete') || (!isNullOrUndefined(liCollections[index]) && liCollections[index].classList.contains(dropDownBaseClasses.focus) && this.getModuleName() === 'autocomplete')) {
1914
-
1915
- }
1921
+ if ((!isNullOrUndefined(liCollections[index]) && liCollections[index].classList.contains(dropDownBaseClasses.selected) && this.getModuleName() !== 'autocomplete') || (!isNullOrUndefined(liCollections[index]) && liCollections[index].classList.contains(dropDownBaseClasses.focus) && this.getModuleName() === 'autocomplete')) ;
1916
1922
  }
1917
1923
  }
1918
1924
  else {
@@ -2123,7 +2129,13 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
2123
2129
  */
2124
2130
  DropDownBase.prototype.getIndexByValue = function (value) {
2125
2131
  var index;
2126
- var listItems = this.getItems();
2132
+ var listItems = [];
2133
+ if (this.fields.disabled && this.getModuleName() === 'multiselect' && this.liCollections) {
2134
+ listItems = this.liCollections;
2135
+ }
2136
+ else {
2137
+ listItems = this.getItems();
2138
+ }
2127
2139
  for (var i = 0; i < listItems.length; i++) {
2128
2140
  if (!isNullOrUndefined(value) && listItems[i].getAttribute('data-value') === value.toString()) {
2129
2141
  index = i;
@@ -2412,6 +2424,9 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
2412
2424
  this.notify('addItem', { module: 'CheckBoxSelection', item: li });
2413
2425
  liCollections.push(li);
2414
2426
  if (this.getModuleName() === 'listbox') {
2427
+ if (item.disabled) {
2428
+ li.classList.add('e-disabled');
2429
+ }
2415
2430
  this.listData.splice(isListboxEmpty ? this.listData.length : index, 0, item);
2416
2431
  if (this.listData.length !== this.sortedData.length) {
2417
2432
  this.sortedData = this.listData;
@@ -2497,18 +2512,53 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
2497
2512
  }
2498
2513
  this.addedNewItem = true;
2499
2514
  };
2515
+ /**
2516
+ * Checks if the given HTML element is disabled.
2517
+ *
2518
+ * @param {HTMLElement} li - The HTML element to check.
2519
+ * @returns {boolean} - Returns true if the element is disabled, otherwise false.
2520
+ */
2521
+ DropDownBase.prototype.isDisabledElement = function (li) {
2522
+ if (li && li.classList.contains('e-disabled')) {
2523
+ return true;
2524
+ }
2525
+ return false;
2526
+ };
2527
+ /**
2528
+ * Checks whether the list item at the specified index is disabled.
2529
+ *
2530
+ * @param {number} index - The index of the list item to check.
2531
+ * @returns {boolean} True if the list item is disabled, false otherwise.
2532
+ */
2533
+ DropDownBase.prototype.isDisabledItemByIndex = function (index) {
2534
+ if (this.fields.disabled && this.liCollections) {
2535
+ return this.isDisabledElement(this.liCollections[index]);
2536
+ }
2537
+ return false;
2538
+ };
2539
+ /**
2540
+ * Disables the given list item.
2541
+ *
2542
+ * @param { HTMLLIElement } li - The list item to disable.
2543
+ * @returns {void}
2544
+ */
2545
+ DropDownBase.prototype.disableListItem = function (li) {
2546
+ li.classList.add('e-disabled');
2547
+ li.setAttribute('aria-disabled', 'true');
2548
+ li.setAttribute('aria-selected', 'false');
2549
+ };
2500
2550
  DropDownBase.prototype.validationAttribute = function (target, hidden) {
2501
2551
  var name = target.getAttribute('name') ? target.getAttribute('name') : target.getAttribute('id');
2502
2552
  hidden.setAttribute('name', name);
2503
2553
  target.removeAttribute('name');
2504
- var attributes$$1 = ['required', 'aria-required', 'form'];
2505
- for (var i = 0; i < attributes$$1.length; i++) {
2506
- if (!target.getAttribute(attributes$$1[i])) {
2554
+ var attributes = ['required', 'aria-required', 'form'];
2555
+ for (var i = 0; i < attributes.length; i++) {
2556
+ if (!target.getAttribute(attributes[i])) {
2507
2557
  continue;
2508
2558
  }
2509
- var attr = target.getAttribute(attributes$$1[i]);
2510
- hidden.setAttribute(attributes$$1[i], attr);
2511
- target.removeAttribute(attributes$$1[i]);
2559
+ var attr = target.getAttribute(attributes[i]);
2560
+ hidden.setAttribute(attributes[i], attr);
2561
+ target.removeAttribute(attributes[i]);
2512
2562
  }
2513
2563
  };
2514
2564
  DropDownBase.prototype.setZIndex = function () {
@@ -2580,7 +2630,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
2580
2630
  _super.prototype.destroy.call(this);
2581
2631
  };
2582
2632
  __decorate([
2583
- Complex({ text: null, value: null, iconCss: null, groupBy: null }, FieldSettings)
2633
+ Complex({ text: null, value: null, iconCss: null, groupBy: null, disabled: null }, FieldSettings)
2584
2634
  ], DropDownBase.prototype, "fields", void 0);
2585
2635
  __decorate([
2586
2636
  Property(null)
@@ -2645,10 +2695,6 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
2645
2695
  return DropDownBase;
2646
2696
  }(Component));
2647
2697
 
2648
- /**
2649
- * export all modules from current location
2650
- */
2651
-
2652
2698
  var __extends$1 = (undefined && undefined.__extends) || (function () {
2653
2699
  var extendStatics = function (d, b) {
2654
2700
  extendStatics = Object.setPrototypeOf ||
@@ -2668,8 +2714,6 @@ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators,
2668
2714
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2669
2715
  return c > 3 && r && Object.defineProperty(target, key, r), r;
2670
2716
  };
2671
- // eslint-disable-next-line @typescript-eslint/triple-slash-reference
2672
- /// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>
2673
2717
  // don't use space in classnames
2674
2718
  var dropDownListClasses = {
2675
2719
  root: 'e-dropdownlist',
@@ -2729,17 +2773,10 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2729
2773
  var _this = _super.call(this, options, element) || this;
2730
2774
  _this.isListSearched = false;
2731
2775
  _this.preventChange = false;
2732
- _this.isAngular = false;
2733
2776
  _this.isTouched = false;
2734
2777
  _this.IsScrollerAtEnd = function () {
2735
2778
  return this.list && this.list.scrollTop + this.list.clientHeight >= this.list.scrollHeight;
2736
2779
  };
2737
- _this.removeAllChildren = function (element) {
2738
- while (element.children[0]) {
2739
- this.removeAllChildren(element.children[0]);
2740
- element.removeChild(element.children[0]);
2741
- }
2742
- };
2743
2780
  return _this;
2744
2781
  }
2745
2782
  /**
@@ -2860,7 +2897,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2860
2897
  this.removeFocus();
2861
2898
  this.list.scrollTop = 0;
2862
2899
  if (this.getModuleName() !== 'autocomplete' && !isNullOrUndefined(this.ulElement)) {
2863
- var li = this.ulElement.querySelector('.' + dropDownListClasses.li);
2900
+ var li = this.fields.disabled ? this.ulElement.querySelector('.' + dropDownListClasses.li + ':not(.e-disabled)') : this.ulElement.querySelector('.' + dropDownListClasses.li);
2864
2901
  if (this.enableVirtualization) {
2865
2902
  li = this.liCollections[this.skeletonCount];
2866
2903
  }
@@ -3065,7 +3102,32 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3065
3102
  this.updateValues();
3066
3103
  }
3067
3104
  };
3105
+ /**
3106
+ * Checks if the given value is disabled.
3107
+ *
3108
+ * @param { string | number | boolean | object } value - The value to check for disablement. Can be a string, number, boolean, or object.
3109
+ * @returns { boolean } A boolean indicating whether the value is disabled.
3110
+ */
3111
+ DropDownList.prototype.isDisableItemValue = function (value) {
3112
+ if (typeof (value) === 'object') {
3113
+ var objectValue = JSON.parse(JSON.stringify(value))[this.fields.value];
3114
+ return this.isDisabledItemByIndex(this.getIndexByValue(objectValue));
3115
+ }
3116
+ return this.isDisabledItemByIndex(this.getIndexByValue(value));
3117
+ };
3068
3118
  DropDownList.prototype.updateValues = function () {
3119
+ if (this.fields.disabled) {
3120
+ if (this.value != null) {
3121
+ this.value = !this.isDisableItemValue(this.value) ? this.value : null;
3122
+ }
3123
+ if (this.text != null) {
3124
+ this.text = !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
3125
+ }
3126
+ if (this.index != null) {
3127
+ this.index = !this.isDisabledItemByIndex(this.index) ? this.index : null;
3128
+ this.activeIndex = this.index;
3129
+ }
3130
+ }
3069
3131
  this.selectedValueInfo = this.viewPortInfo;
3070
3132
  if (!isNullOrUndefined(this.value)) {
3071
3133
  var value = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue(((this.fields.value) ? this.fields.value : ''), this.value) : this.value;
@@ -3258,7 +3320,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3258
3320
  var target = e.target;
3259
3321
  this.keyboardEvent = null;
3260
3322
  var li = closest(target, '.' + dropDownBaseClasses.li);
3261
- if (!this.isValidLI(li)) {
3323
+ if (!this.isValidLI(li) || this.isDisabledElement(li)) {
3262
3324
  return;
3263
3325
  }
3264
3326
  this.setSelection(li, e);
@@ -3402,7 +3464,14 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3402
3464
  }
3403
3465
  }
3404
3466
  else {
3405
- var li = incrementalSearch(e.charCode, this.liCollections, this.activeIndex, true, this.element.id);
3467
+ var li = void 0;
3468
+ if (this.fields.disabled) {
3469
+ var enableLiCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li + ':not(.e-disabled)');
3470
+ li = incrementalSearch(e.charCode, enableLiCollections, this.activeIndex, true, this.element.id);
3471
+ }
3472
+ else {
3473
+ li = incrementalSearch(e.charCode, this.liCollections, this.activeIndex, true, this.element.id);
3474
+ }
3406
3475
  if (!isNullOrUndefined(li)) {
3407
3476
  this.setSelection(li, e);
3408
3477
  this.setScrollPosition();
@@ -3532,6 +3601,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3532
3601
  }
3533
3602
  };
3534
3603
  DropDownList.prototype.updateUpDownAction = function (e, isVirtualKeyAction) {
3604
+ if (this.fields.disabled && this.list && this.list.querySelectorAll('.e-list-item:not(.e-disabled)').length === 0) {
3605
+ return;
3606
+ }
3535
3607
  if (this.allowFiltering && !this.enableVirtualization && this.getModuleName() !== 'autocomplete') {
3536
3608
  var value_1 = this.getItemData().value;
3537
3609
  if (isNullOrUndefined(value_1)) {
@@ -3642,6 +3714,25 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3642
3714
  attributes(this.filterInput, { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-active')[0].id });
3643
3715
  }
3644
3716
  }
3717
+ var itemIndex;
3718
+ for (var index = 0; index < this.liCollections.length; index++) {
3719
+ if (this.liCollections[index].classList.contains(dropDownListClasses.focus)
3720
+ || this.liCollections[index].classList.contains(dropDownListClasses.selected)) {
3721
+ itemIndex = index;
3722
+ break;
3723
+ }
3724
+ }
3725
+ if (itemIndex != null && this.isDisabledElement(this.liCollections[itemIndex])) {
3726
+ if (this.getModuleName() !== 'autocomplete') {
3727
+ if (this.liCollections.length - 1 === itemIndex && e.action === 'down') {
3728
+ e.action = 'up';
3729
+ }
3730
+ if (itemIndex === 0 && e.action === 'up') {
3731
+ e.action = 'down';
3732
+ }
3733
+ }
3734
+ this.updateUpDownAction(e);
3735
+ }
3645
3736
  e.preventDefault();
3646
3737
  };
3647
3738
  DropDownList.prototype.updateHomeEndAction = function (e, isVirtualKeyAction) {
@@ -3742,6 +3833,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3742
3833
  DropDownList.prototype.selectCurrentItem = function (e) {
3743
3834
  if (this.isPopupOpen) {
3744
3835
  var li = this.list.querySelector('.' + dropDownListClasses.focus);
3836
+ if (this.isDisabledElement(li)) {
3837
+ return;
3838
+ }
3745
3839
  if (li) {
3746
3840
  this.setSelection(li, e);
3747
3841
  this.isTyped = false;
@@ -5229,7 +5323,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
5229
5323
  var elementRect = element.getBoundingClientRect();
5230
5324
  return (elementRect.top >= 0 && elementRect.left >= 0 && elementRect.bottom <= window.innerHeight && elementRect.right <= window.innerWidth);
5231
5325
  };
5232
-
5233
5326
  DropDownList.prototype.setSearchBoxPosition = function () {
5234
5327
  var searchBoxHeight = this.filterInput.parentElement.getBoundingClientRect().height;
5235
5328
  this.popupObj.element.style.maxHeight = '100%';
@@ -5349,7 +5442,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
5349
5442
  this.list.scrollTop = this.virtualListInfo && this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight : 0;
5350
5443
  }
5351
5444
  isScrollerCHanged = this.isKeyBoardAction;
5352
-
5353
5445
  }
5354
5446
  this.isKeyBoardAction = isScrollerCHanged;
5355
5447
  if (this.enableVirtualization && this.fields.groupBy && this.fixedHeaderElement && (keyAction == "down")) {
@@ -6002,6 +6094,10 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6002
6094
  this_1.setEnable();
6003
6095
  break;
6004
6096
  case 'text':
6097
+ if (this_1.fields.disabled) {
6098
+ newProp.text = newProp.text && !this_1.isDisabledItemByIndex(this_1.getIndexByValue(this_1.getValueByText(newProp.text)))
6099
+ ? newProp.text : null;
6100
+ }
6005
6101
  if (newProp.text === null) {
6006
6102
  this_1.clearAll();
6007
6103
  break;
@@ -6053,6 +6149,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6053
6149
  }
6054
6150
  break;
6055
6151
  case 'value':
6152
+ if (this_1.fields.disabled) {
6153
+ newProp.value = newProp.value != null && !this_1.isDisableItemValue(newProp.value) ? newProp.value : null;
6154
+ }
6056
6155
  if (newProp.value === null) {
6057
6156
  this_1.clearAll();
6058
6157
  break;
@@ -6112,6 +6211,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6112
6211
  }
6113
6212
  break;
6114
6213
  case 'index':
6214
+ if (this_1.fields.disabled) {
6215
+ newProp.index = newProp.index != null && !this_1.isDisabledItemByIndex(newProp.index) ? newProp.index : null;
6216
+ }
6115
6217
  if (newProp.index === null) {
6116
6218
  this_1.clearAll();
6117
6219
  break;
@@ -6429,6 +6531,65 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6429
6531
  Input.calculateWidth(this.inputElement, this.inputWrapper.container);
6430
6532
  }
6431
6533
  };
6534
+ /**
6535
+ * Method to disable specific item in the popup.
6536
+ *
6537
+ * @param {string | number | object | HTMLLIElement} item - Specifies the item to be disabled.
6538
+ * @returns {void}
6539
+ * @deprecated
6540
+ */
6541
+ DropDownList.prototype.disableItem = function (item) {
6542
+ if (this.fields.disabled) {
6543
+ if (!this.list) {
6544
+ this.renderList();
6545
+ }
6546
+ var itemIndex = -1;
6547
+ if (this.liCollections && this.liCollections.length > 0 && this.listData && this.fields.disabled) {
6548
+ if (typeof (item) === 'string') {
6549
+ itemIndex = this.getIndexByValue(item);
6550
+ }
6551
+ else if (typeof item === 'object') {
6552
+ if (item instanceof HTMLLIElement) {
6553
+ for (var index = 0; index < this.liCollections.length; index++) {
6554
+ if (this.liCollections[index] === item) {
6555
+ itemIndex = this.getIndexByValue(item.getAttribute('data-value'));
6556
+ break;
6557
+ }
6558
+ }
6559
+ }
6560
+ else {
6561
+ var value = JSON.parse(JSON.stringify(item))[this.fields.value];
6562
+ for (var index = 0; index < this.listData.length; index++) {
6563
+ if (JSON.parse(JSON.stringify(this.listData[index]))[this.fields.value] === value) {
6564
+ itemIndex = this.getIndexByValue(value);
6565
+ break;
6566
+ }
6567
+ }
6568
+ }
6569
+ }
6570
+ else {
6571
+ itemIndex = item;
6572
+ }
6573
+ var isValidIndex = itemIndex < this.liCollections.length && itemIndex > -1;
6574
+ if (isValidIndex && !(JSON.parse(JSON.stringify(this.listData[itemIndex]))[this.fields.disabled])) {
6575
+ var li = this.liCollections[itemIndex];
6576
+ if (li) {
6577
+ this.disableListItem(li);
6578
+ var parsedData = JSON.parse(JSON.stringify(this.listData[itemIndex]));
6579
+ parsedData[this.fields.disabled] = true;
6580
+ this.listData[itemIndex] = parsedData;
6581
+ this.dataSource = this.listData;
6582
+ if (li.classList.contains(dropDownListClasses.focus)) {
6583
+ this.removeFocus();
6584
+ }
6585
+ if (li.classList.contains(dropDownListClasses.selected)) {
6586
+ this.clear();
6587
+ }
6588
+ }
6589
+ }
6590
+ }
6591
+ }
6592
+ };
6432
6593
  /**
6433
6594
  * Removes the component from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.
6434
6595
  *
@@ -6478,9 +6639,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6478
6639
  delete this.hiddenElement;
6479
6640
  this.filterInput = null;
6480
6641
  this.keyboardModule = null;
6481
- if (!isNullOrUndefined(this.ulElement)) {
6482
- this.removeAllChildren(this.ulElement);
6483
- }
6484
6642
  this.ulElement = null;
6485
6643
  this.list = null;
6486
6644
  this.clearIconElement = null;
@@ -6638,10 +6796,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6638
6796
  return DropDownList;
6639
6797
  }(DropDownBase));
6640
6798
 
6641
- /**
6642
- * export all modules from current location
6643
- */
6644
-
6645
6799
  var __extends$2 = (undefined && undefined.__extends) || (function () {
6646
6800
  var extendStatics = function (d, b) {
6647
6801
  extendStatics = Object.setPrototypeOf ||
@@ -7046,7 +7200,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7046
7200
  if (args.text === '') {
7047
7201
  _this.isFilteredData = false;
7048
7202
  _this.isFilterRestore = true;
7049
- _this.isFromFilterChange = false;
7050
7203
  fields = _this.cloneFields(_this.fields);
7051
7204
  }
7052
7205
  else if (args.preventDefaultAction) {
@@ -7131,8 +7284,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7131
7284
  DropDownTree.prototype.nestedFilter = function (value, filteredFields) {
7132
7285
  var matchedDataSource = [];
7133
7286
  for (var i = 0; i < this.treeData.length; i++) {
7134
- // eslint-disable-next-line
7135
- var filteredChild = this.nestedChildFilter(value, this.treeData[i]);
7287
+ var filteredChild = this.nestedChildFilter(value, this.treeData[parseInt(i.toString(), 10)]);
7136
7288
  if (!isNullOrUndefined(filteredChild)) {
7137
7289
  matchedDataSource.push(filteredChild);
7138
7290
  }
@@ -7148,8 +7300,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7148
7300
  else {
7149
7301
  var matchedChildren = [];
7150
7302
  for (var i = 0; i < children.length; i++) {
7151
- // eslint-disable-next-line
7152
- var filteredChild = this.nestedChildFilter(value, children[i]);
7303
+ var filteredChild = this.nestedChildFilter(value, children[parseInt(i.toString(), 10)]);
7153
7304
  if (!isNullOrUndefined(filteredChild)) {
7154
7305
  matchedChildren.push(filteredChild);
7155
7306
  }
@@ -7176,13 +7327,11 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7176
7327
  for (var i = 0; i < matchedData.length; i++) {
7177
7328
  if (matchedDataSource.indexOf(matchedData[i]) === -1) {
7178
7329
  matchedDataSource.push(matchedData[i]);
7179
- // eslint-disable-next-line
7180
- var parentId = matchedData[i][this.fields.parentValue];
7330
+ var parentId = matchedData[parseInt(i.toString(), 10)][this.fields.parentValue];
7181
7331
  while (!isNullOrUndefined(parentId)) {
7182
7332
  var parent_1 = null;
7183
7333
  for (var j = 0; j < this.treeData.length; j++) {
7184
- // eslint-disable-next-line
7185
- var value_1 = this.treeData[j][this.fields.value];
7334
+ var value_1 = this.treeData[parseInt(j.toString(), 10)][this.fields.value];
7186
7335
  if (!isNullOrUndefined(value_1) && (value_1 === parentId)) {
7187
7336
  parent_1 = this.treeData[j];
7188
7337
  break;
@@ -7276,6 +7425,11 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7276
7425
  if (formElement) {
7277
7426
  EventHandler.remove(formElement, 'reset', this.resetValueHandler);
7278
7427
  }
7428
+ this.keyboardModule.destroy();
7429
+ if (this.showSelectAll && this.checkAllParent) {
7430
+ EventHandler.remove(this.checkAllParent, 'mouseup', this.clickHandler);
7431
+ }
7432
+ EventHandler.remove(document, 'mousedown', this.onDocumentClick);
7279
7433
  };
7280
7434
  /* Trigger when the dropdown is clicked */
7281
7435
  DropDownTree.prototype.dropDownClick = function (e) {
@@ -7480,24 +7634,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7480
7634
  _this.selectAll(true);
7481
7635
  }
7482
7636
  break;
7483
- case 'moveRight':
7484
- case 'moveLeft':
7485
- case 'shiftDown':
7486
- case 'moveDown':
7487
- case 'ctrlDown':
7488
- case 'csDown':
7489
- case 'shiftUp':
7490
- case 'moveUp':
7491
- case 'ctrlUp':
7492
- case 'csUp':
7493
- case 'home':
7494
- case 'shiftHome':
7495
- case 'ctrlHome':
7496
- case 'csHome':
7497
- case 'end':
7498
- case 'shiftEnd':
7499
- case 'ctrlEnd':
7500
- case 'csEnd':
7501
7637
  }
7502
7638
  }
7503
7639
  else {
@@ -7550,6 +7686,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7550
7686
  cancel: false,
7551
7687
  event: e
7552
7688
  };
7689
+ var focusedElement;
7553
7690
  this.trigger('keyPress', eventArgs, function (observedArgs) {
7554
7691
  if (!observedArgs.cancel) {
7555
7692
  switch (e.action) {
@@ -7557,9 +7694,10 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7557
7694
  _this.clickHandler(e);
7558
7695
  break;
7559
7696
  case 'moveDown':
7560
- var focusedElement = _this.treeObj.element.querySelector('li');
7697
+ focusedElement = _this.treeObj.element.querySelector('li');
7561
7698
  focusedElement.focus();
7562
7699
  addClass([focusedElement], ['e-node-focus']);
7700
+ break;
7563
7701
  }
7564
7702
  }
7565
7703
  });
@@ -7718,8 +7856,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7718
7856
  return remainElement;
7719
7857
  };
7720
7858
  DropDownTree.prototype.getOverflowVal = function (index) {
7721
- // eslint-disable-next-line
7722
- var selectedData = this.getSelectedData(this.value[index]);
7859
+ var selectedData = this.getSelectedData(this.value[parseInt(index.toString(), 10)]);
7723
7860
  return getValue(this.treeSettings.loadOnDemand ? this.fields.text : 'text', selectedData);
7724
7861
  };
7725
7862
  DropDownTree.prototype.updateDelimMode = function () {
@@ -7765,12 +7902,12 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7765
7902
  var name = this.inputEle.getAttribute('name') ? this.inputEle.getAttribute('name') : this.inputEle.getAttribute('id');
7766
7903
  this.hiddenElement.setAttribute('name', name);
7767
7904
  this.inputEle.removeAttribute('name');
7768
- var attributes$$1 = ['required', 'aria-required', 'form'];
7769
- for (var i = 0; i < attributes$$1.length; i++) {
7770
- var attr = this.inputEle.getAttribute(attributes$$1[i]);
7905
+ var attributes = ['required', 'aria-required', 'form'];
7906
+ for (var i = 0; i < attributes.length; i++) {
7907
+ var attr = this.inputEle.getAttribute(attributes[i]);
7771
7908
  if (attr) {
7772
- this.hiddenElement.setAttribute(attributes$$1[i], attr);
7773
- this.inputEle.removeAttribute(attributes$$1[i]);
7909
+ this.hiddenElement.setAttribute(attributes[i], attr);
7910
+ this.inputEle.removeAttribute(attributes[i]);
7774
7911
  }
7775
7912
  }
7776
7913
  };
@@ -8091,8 +8228,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8091
8228
  var data;
8092
8229
  if (this.treeDataType === 1) {
8093
8230
  for (var i = 0; i < this.treeItems.length; i++) {
8094
- // eslint-disable-next-line
8095
- var text = getValue(this.fields.text, this.treeItems[i]);
8231
+ var text = getValue(this.fields.text, this.treeItems[parseInt(i.toString(), 10)]);
8096
8232
  if (!isNullOrUndefined(this.treeItems[i]) && !isNullOrUndefined(text) && text === givenText) {
8097
8233
  data = this.treeItems[i];
8098
8234
  break;
@@ -8107,14 +8243,12 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8107
8243
  DropDownTree.prototype.getNestedItems = function (data, field, givenText) {
8108
8244
  var newData;
8109
8245
  for (var i = 0, objlen = data.length; i < objlen; i++) {
8110
- // eslint-disable-next-line
8111
- var dataId = getValue(this.fields.text, data[i]);
8246
+ var dataId = getValue(this.fields.text, data[parseInt(i.toString(), 10)]);
8112
8247
  if (data[i] && dataId && dataId.toString() === givenText) {
8113
8248
  return data[i];
8114
8249
  }
8115
8250
  else if (typeof field.child === 'string' && !isNullOrUndefined(getValue(field.child, data[i]))) {
8116
- // eslint-disable-next-line
8117
- var childData = getValue(field.child, data[i]);
8251
+ var childData = getValue(field.child, data[parseInt(i.toString(), 10)]);
8118
8252
  newData = this.getNestedItems(childData, this.getChildType(field), givenText);
8119
8253
  if (newData !== undefined) {
8120
8254
  break;
@@ -8122,8 +8256,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8122
8256
  }
8123
8257
  else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined(getValue('child', data[i]))) {
8124
8258
  var child = 'child';
8125
- // eslint-disable-next-line
8126
- newData = this.getNestedItems(getValue(child, data[i]), this.getChildType(field), givenText);
8259
+ newData = this.getNestedItems(getValue(child, data[parseInt(i.toString(), 10)]), this.getChildType(field), givenText);
8127
8260
  if (newData !== undefined) {
8128
8261
  break;
8129
8262
  }
@@ -8213,12 +8346,12 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8213
8346
  _this.setFooterTemplate();
8214
8347
  }
8215
8348
  _this.isFirstRender = false;
8216
- /* eslint-disable */
8217
8349
  if (_this.hasTemplate && _this.portals) {
8218
8350
  if (_this.treeObj.portals) {
8219
- _this.portals = _this.portals.concat(_this.treeObj.portals.filter(function (item) { return !_this.portals.includes(item); }));
8351
+ _this.portals = _this.portals.concat(_this.treeObj.portals.filter(function (item) {
8352
+ return !_this.portals.includes(item);
8353
+ }));
8220
8354
  }
8221
- /* eslint-enable */
8222
8355
  if (_this.isReact) {
8223
8356
  _this.renderReactTemplates(_this.reactCallBack);
8224
8357
  }
@@ -8241,7 +8374,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8241
8374
  else {
8242
8375
  var oldFocussedNode = _this.treeObj.element.querySelector('.e-node-focus');
8243
8376
  focusedElement = _this.treeObj.element.querySelector('li:not(.e-disable):not(.e-prevent)');
8244
- if (oldFocussedNode && oldFocussedNode != focusedElement) {
8377
+ if (oldFocussedNode && oldFocussedNode !== focusedElement) {
8245
8378
  oldFocussedNode.setAttribute('tabindex', '-1');
8246
8379
  removeClass([oldFocussedNode], 'e-node-focus');
8247
8380
  }
@@ -8367,8 +8500,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8367
8500
  var isHeader = closest(target, '.' + HEADER);
8368
8501
  var isFooter = closest(target, '.' + FOOTER);
8369
8502
  var isScroller = target.classList.contains(DROPDOWN) ? true :
8370
- (matches(target, '.e-ddt .e-popup') || matches(target, '.e-ddt .e-treeview'));
8371
- if ((this.isPopupOpen && ((!isNullOrUndefined(this.inputWrapper) && this.inputWrapper.contains(target)) || isTree || isScroller || isHeader || isFooter)) ||
8503
+ (matches$1(target, '.e-ddt .e-popup') || matches$1(target, '.e-ddt .e-treeview'));
8504
+ if ((this.isPopupOpen && ((!isNullOrUndefined(this.inputWrapper) &&
8505
+ this.inputWrapper.contains(target)) || isTree || isScroller || isHeader || isFooter)) ||
8372
8506
  ((this.allowMultiSelection || this.showCheckBox) && (this.isPopupOpen && target.classList.contains(CHIP_CLOSE) ||
8373
8507
  (this.isPopupOpen && (target.classList.contains(CHECKALLPARENT) || target.classList.contains(ALLTEXT)
8374
8508
  || target.classList.contains(CHECKBOXFRAME)))))) {
@@ -8395,7 +8529,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8395
8529
  removeClass([this.popupDiv], NODATA);
8396
8530
  this.hideCheckAll(false);
8397
8531
  }
8398
- this.treeDataType = this.getTreeDataType(this.treeItems, this.fields);
8532
+ if (!this.isFilteredData) {
8533
+ this.treeDataType = this.getTreeDataType(this.treeItems, this.fields);
8534
+ }
8399
8535
  if (this.isFirstRender && this.isRemoteData) {
8400
8536
  this.setTreeValue();
8401
8537
  this.setTreeText();
@@ -8491,7 +8627,8 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8491
8627
  dataSource: fields.dataSource, value: fields.value, text: fields.text, parentValue: fields.parentValue,
8492
8628
  child: (fields.child ? this.cloneChildField(fields.child) : null), hasChildren: fields.hasChildren,
8493
8629
  expanded: fields.expanded, iconCss: fields.iconCss, imageUrl: fields.imageUrl, htmlAttributes: fields.htmlAttributes,
8494
- query: fields.query, selected: fields.selected, selectable: fields.selectable, tableName: fields.tableName, tooltip: fields.tooltip
8630
+ query: fields.query, selected: fields.selected, selectable: fields.selectable,
8631
+ tableName: fields.tableName, tooltip: fields.tooltip
8495
8632
  };
8496
8633
  return clonedField;
8497
8634
  }
@@ -8545,7 +8682,8 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8545
8682
  if ((typeof field.child === 'string') && !isNullOrUndefined(getValue(field.child, this.fields.dataSource[i]))) {
8546
8683
  return 2;
8547
8684
  }
8548
- if (!isNullOrUndefined(getValue(field.parentValue, this.fields.dataSource[i])) || !isNullOrUndefined(getValue(field.hasChildren, this.fields.dataSource[i]))) {
8685
+ if (!isNullOrUndefined(getValue(field.parentValue, this.fields.dataSource[i])) ||
8686
+ !isNullOrUndefined(getValue(field.hasChildren, this.fields.dataSource[i]))) {
8549
8687
  return 1;
8550
8688
  }
8551
8689
  }
@@ -8694,14 +8832,13 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8694
8832
  this.oldValue = this.value ? this.value.slice() : this.value;
8695
8833
  }
8696
8834
  };
8697
- DropDownTree.prototype.onNodeExpanded = function (args) {
8835
+ DropDownTree.prototype.onNodeExpanded = function () {
8698
8836
  if (this.hasTemplate && this.portals && this.treeObj.portals) {
8699
8837
  for (var i = 0; i < this.treeObj.portals.length; i++) {
8700
8838
  if (this.portals.indexOf(this.treeObj.portals[i]) === -1) {
8701
8839
  this.portals.push(this.treeObj.portals[i]);
8702
8840
  }
8703
8841
  }
8704
- /* eslint-enable */
8705
8842
  this.renderReactTemplates();
8706
8843
  }
8707
8844
  };
@@ -8797,7 +8934,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8797
8934
  if (!this.isFilteredData) {
8798
8935
  this.setProperties({ value: this.isFromFilterChange && newValues && newValues.length === 0 ? this.value : newValues }, true);
8799
8936
  this.isFromFilterChange = false;
8800
- if (newValues && newValues.length !== 0 && !this.showCheckBox) {
8937
+ if (newValues && newValues.length !== 0 && !this.showCheckBox && !this.ddtCompareValues(this.treeObj.selectedNodes, this.value.slice())) {
8801
8938
  this.treeObj.selectedNodes = this.value.slice();
8802
8939
  this.treeObj.dataBind();
8803
8940
  }
@@ -9079,7 +9216,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9079
9216
  };
9080
9217
  DropDownTree.prototype.templateComplier = function (template) {
9081
9218
  if (template) {
9082
- // eslint-disable-next-line
9083
9219
  try {
9084
9220
  if (typeof template !== 'function' && document.querySelectorAll(template).length) {
9085
9221
  return compile(document.querySelector(template).innerHTML.trim());
@@ -9165,7 +9301,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9165
9301
  this.ensurePlaceHolder();
9166
9302
  };
9167
9303
  DropDownTree.prototype.resetValue = function (isDynamicChange) {
9168
- if (this.value === [] && this.text == null) {
9304
+ if (Array.isArray(this.value) && this.value.length === 0 && this.text == null) {
9169
9305
  return;
9170
9306
  }
9171
9307
  Input.setValue(null, this.inputEle, this.floatLabelType);
@@ -9279,9 +9415,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9279
9415
  DropDownTree.prototype.updateTemplate = function () {
9280
9416
  if (this.popupObj) {
9281
9417
  this.clearTemplate();
9282
- /* eslint-disable */
9283
9418
  this.portals = [];
9284
- /* eslint-enable */
9285
9419
  this.popupObj.destroy();
9286
9420
  if (this.isPopupOpen) {
9287
9421
  this.hidePopup();
@@ -9658,22 +9792,35 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9658
9792
  detach(this.inputWrapper);
9659
9793
  detach(this.popupDiv);
9660
9794
  detach(this.hiddenElement);
9795
+ Input.setRipple(false, [this.inputObj]);
9661
9796
  this.element.classList.remove('e-input');
9662
9797
  if (this.showCheckBox || this.allowMultiSelection) {
9663
9798
  this.element.classList.remove(CHIP_INPUT);
9664
9799
  }
9800
+ detach(this.inputObj.container);
9801
+ if (this.inputObj.buttons.length) {
9802
+ detach(this.inputObj.buttons[0]);
9803
+ }
9665
9804
  this.inputObj = null;
9666
9805
  while (this.hiddenElement.options.length > 0) {
9667
9806
  this.hiddenElement.remove(0);
9668
9807
  }
9669
9808
  this.hiddenElement.innerHTML = '';
9670
9809
  this.hiddenElement = null;
9810
+ this.inputWrapper.innerHTML = '';
9671
9811
  this.inputWrapper = null;
9672
9812
  this.popupDiv = null;
9673
9813
  this.tree = null;
9674
9814
  this.popupObj = null;
9675
9815
  this.treeObj = null;
9676
9816
  this.overAllClear = null;
9817
+ if (this.chipCollection) {
9818
+ var chipsIcons = selectAll('.e-chips-close', this.chipCollection);
9819
+ for (var _i = 0, chipsIcons_1 = chipsIcons; _i < chipsIcons_1.length; _i++) {
9820
+ var element = chipsIcons_1[_i];
9821
+ EventHandler.remove(element, 'mousedown', this.removeChip);
9822
+ }
9823
+ }
9677
9824
  this.chipWrapper = null;
9678
9825
  this.chipCollection = null;
9679
9826
  this.checkAllParent = null;
@@ -9732,7 +9879,11 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9732
9879
  * @returns {void}
9733
9880
  */
9734
9881
  DropDownTree.prototype.hidePopup = function () {
9735
- var eventArgs = { popup: this.popupObj };
9882
+ var eventArgs = { popup: this.popupObj, cancel: false };
9883
+ this.trigger('close', eventArgs);
9884
+ if (eventArgs.cancel) {
9885
+ return;
9886
+ }
9736
9887
  this.inputWrapper.classList.remove(ICONANIMATION);
9737
9888
  if (this.popupEle) {
9738
9889
  addClass([this.popupEle], DDTHIDEICON);
@@ -9746,7 +9897,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9746
9897
  addClass([this.inputWrapper], [INPUTFOCUS]);
9747
9898
  }
9748
9899
  }
9749
- this.trigger('close', eventArgs);
9750
9900
  if (this.destroyPopupOnHide) {
9751
9901
  this.isFirstRender = true;
9752
9902
  this.destroyPopup();
@@ -9946,10 +10096,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9946
10096
  return DropDownTree;
9947
10097
  }(Component));
9948
10098
 
9949
- /**
9950
- * export all modules from current location
9951
- */
9952
-
9953
10099
  var __extends$3 = (undefined && undefined.__extends) || (function () {
9954
10100
  var extendStatics = function (d, b) {
9955
10101
  extendStatics = Object.setPrototypeOf ||
@@ -9969,8 +10115,6 @@ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators,
9969
10115
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9970
10116
  return c > 3 && r && Object.defineProperty(target, key, r), r;
9971
10117
  };
9972
- // eslint-disable-next-line @typescript-eslint/triple-slash-reference
9973
- /// <reference path='../drop-down-list/drop-down-list-model.d.ts'/>
9974
10118
  var SPINNER_CLASS = 'e-atc-spinner-icon';
9975
10119
  dropDownListClasses.root = 'e-combobox';
9976
10120
  var inputObject$1 = {
@@ -10089,6 +10233,18 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
10089
10233
  }
10090
10234
  };
10091
10235
  ComboBox.prototype.updateValues = function () {
10236
+ if (this.fields.disabled) {
10237
+ if (this.value != null) {
10238
+ this.value = !this.isDisableItemValue(this.value) ? this.value : null;
10239
+ }
10240
+ if (this.text != null) {
10241
+ this.text = !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
10242
+ }
10243
+ if (this.index != null) {
10244
+ this.index = !this.isDisabledItemByIndex(this.index) ? this.index : null;
10245
+ this.activeIndex = this.index;
10246
+ }
10247
+ }
10092
10248
  if (!isNullOrUndefined(this.value)) {
10093
10249
  var currentValue = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
10094
10250
  var li = this.getElementByValue(currentValue);
@@ -10336,9 +10492,9 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
10336
10492
  var value = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
10337
10493
  this.itemData = this.getDataByValue(value);
10338
10494
  var dataItem = this.getItemData();
10339
- var setValue$$1 = this.allowObjectBinding ? this.itemData : dataItem.value;
10495
+ var setValue = this.allowObjectBinding ? this.itemData : dataItem.value;
10340
10496
  if (!(this.allowCustom && isNullOrUndefined(dataItem.value) && isNullOrUndefined(dataItem.text))) {
10341
- this.setProperties({ 'value': setValue$$1 }, !this.allowCustom);
10497
+ this.setProperties({ 'value': setValue }, !this.allowCustom);
10342
10498
  }
10343
10499
  };
10344
10500
  /**
@@ -10522,6 +10678,9 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
10522
10678
  else {
10523
10679
  li = this.list.querySelector('.' + dropDownListClasses.focus);
10524
10680
  }
10681
+ if (this.isDisabledElement(li)) {
10682
+ return;
10683
+ }
10525
10684
  if (li) {
10526
10685
  this.setSelection(li, e);
10527
10686
  this.isTyped = false;
@@ -10941,10 +11100,6 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
10941
11100
  return ComboBox;
10942
11101
  }(DropDownList));
10943
11102
 
10944
- /**
10945
- * export all modules from current location
10946
- */
10947
-
10948
11103
  var __extends$4 = (undefined && undefined.__extends) || (function () {
10949
11104
  var extendStatics = function (d, b) {
10950
11105
  extendStatics = Object.setPrototypeOf ||
@@ -10964,8 +11119,6 @@ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators,
10964
11119
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
10965
11120
  return c > 3 && r && Object.defineProperty(target, key, r), r;
10966
11121
  };
10967
- // eslint-disable-next-line @typescript-eslint/triple-slash-reference
10968
- /// <reference path='../combo-box/combo-box-model.d.ts'/>
10969
11122
  dropDownListClasses.root = 'e-autocomplete';
10970
11123
  dropDownListClasses.icon = 'e-input-group-icon e-ddl-icon e-search-icon';
10971
11124
  /**
@@ -11423,7 +11576,7 @@ var AutoComplete = /** @__PURE__ @class */ (function (_super) {
11423
11576
  _super.prototype.render.call(this);
11424
11577
  };
11425
11578
  __decorate$4([
11426
- Complex({ value: null, iconCss: null, groupBy: null }, FieldSettings)
11579
+ Complex({ value: null, iconCss: null, groupBy: null, disabled: null }, FieldSettings)
11427
11580
  ], AutoComplete.prototype, "fields", void 0);
11428
11581
  __decorate$4([
11429
11582
  Property(true)
@@ -11476,10 +11629,6 @@ var AutoComplete = /** @__PURE__ @class */ (function (_super) {
11476
11629
  return AutoComplete;
11477
11630
  }(ComboBox));
11478
11631
 
11479
- /**
11480
- * export all modules from current location
11481
- */
11482
-
11483
11632
  /**
11484
11633
  * FloatLable Moduel
11485
11634
  * Specifies whether to display the floating label above the input element.
@@ -11654,8 +11803,6 @@ var __decorate$5 = (undefined && undefined.__decorate) || function (decorators,
11654
11803
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
11655
11804
  return c > 3 && r && Object.defineProperty(target, key, r), r;
11656
11805
  };
11657
- // eslint-disable-next-line @typescript-eslint/triple-slash-reference
11658
- /// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>
11659
11806
  var FOCUS = 'e-input-focus';
11660
11807
  var DISABLED$1 = 'e-disabled';
11661
11808
  var OVER_ALL_WRAPPER = 'e-multiselect e-input-group e-control-wrapper';
@@ -11982,13 +12129,26 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11982
12129
  }
11983
12130
  else {
11984
12131
  if (this.enableVirtualization) {
11985
- element = this.ulElement.querySelector('li.'
11986
- + dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)');
12132
+ if (this.fields.disabled) {
12133
+ element = this.ulElement.querySelector('li.'
12134
+ + dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)' + ':not(.' + DISABLED$1 + ')');
12135
+ }
12136
+ else {
12137
+ element = this.ulElement.querySelector('li.'
12138
+ + dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)');
12139
+ }
11987
12140
  }
11988
12141
  else {
11989
- element = this.ulElement.querySelector('li.'
11990
- + dropDownBaseClasses.li + ':not(.'
11991
- + HIDE_LIST + ')');
12142
+ if (this.fields.disabled) {
12143
+ element = this.ulElement.querySelector('li.'
12144
+ + dropDownBaseClasses.li + ':not(.'
12145
+ + HIDE_LIST + ')' + ':not(.' + DISABLED$1 + ')');
12146
+ }
12147
+ else {
12148
+ element = this.ulElement.querySelector('li.'
12149
+ + dropDownBaseClasses.li + ':not(.'
12150
+ + HIDE_LIST + ')');
12151
+ }
11992
12152
  }
11993
12153
  }
11994
12154
  if (element !== null) {
@@ -12448,9 +12608,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
12448
12608
  if (filterQuery.queries[queryElements].fn === 'onSkip') {
12449
12609
  isSkip = false;
12450
12610
  }
12451
- if (filterQuery.queries[queryElements].fn === 'onTake') {
12452
-
12453
- }
12611
+ if (filterQuery.queries[queryElements].fn === 'onTake') ;
12454
12612
  }
12455
12613
  var queryTakeValue = 0;
12456
12614
  if (filterQuery && filterQuery.queries.length > 0) {
@@ -13441,7 +13599,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
13441
13599
  this.list.scrollTop = this.virtualListInfo && this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight : 0;
13442
13600
  }
13443
13601
  isScrollerCHanged = this.isKeyBoardAction;
13444
-
13445
13602
  }
13446
13603
  this.isKeyBoardAction = isScrollerCHanged;
13447
13604
  };
@@ -13719,6 +13876,21 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
13719
13876
  }
13720
13877
  }
13721
13878
  }
13879
+ var focusedLi = this.list ? this.list.querySelector('.e-item-focus') : null;
13880
+ if (this.isDisabledElement(focusedLi)) {
13881
+ if (this.list.querySelectorAll('.e-list-item:not(.e-hide-listitem):not(.e-disabled)').length === 0) {
13882
+ this.removeFocus();
13883
+ return;
13884
+ }
13885
+ var index = this.getIndexByValue(focusedLi.getAttribute('data-value'));
13886
+ if (index === 0 && this.mode !== 'CheckBox') {
13887
+ position = 1;
13888
+ }
13889
+ if (index === (this.list.querySelectorAll('.e-list-item:not(.e-hide-listitem)').length - 1)) {
13890
+ position = -1;
13891
+ }
13892
+ this.moveByList(position);
13893
+ }
13722
13894
  };
13723
13895
  MultiSelect.prototype.getElementByValue = function (value) {
13724
13896
  var item;
@@ -13909,7 +14081,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
13909
14081
  }
13910
14082
  _this.setProperties({ value: [].concat([], removeVal) }, true);
13911
14083
  if (_this.enableVirtualization) {
13912
- var currentText = index == 0 ? _this.text.replace(_this.text.split(_this.delimiterChar)[index] + _this.delimiterChar, '') : _this.text.replace(_this.delimiterChar + _this.text.split(_this.delimiterChar)[index], '');
14084
+ var currentText = index == 0 && _this.text.split(_this.delimiterChar) && _this.text.split(_this.delimiterChar).length == 1 ? _this.text.replace(_this.text.split(_this.delimiterChar)[index], '') : index == 0 ? _this.text.replace(_this.text.split(_this.delimiterChar)[index] + _this.delimiterChar, '') : _this.text.replace(_this.delimiterChar + _this.text.split(_this.delimiterChar)[index], '');
13913
14085
  _this.setProperties({ text: currentText.toString() }, true);
13914
14086
  }
13915
14087
  if (element_1 !== null) {
@@ -15301,7 +15473,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
15301
15473
  }
15302
15474
  };
15303
15475
  MultiSelect.prototype.addListFocus = function (element) {
15304
- if (this.enabled && this.isValidLI(element)) {
15476
+ if (this.enabled && (this.isValidLI(element) || (this.fields.disabled && this.isDisabledElement(element)))) {
15305
15477
  this.removeFocus();
15306
15478
  addClass([element], dropDownBaseClasses.focus);
15307
15479
  this.updateAriaActiveDescendant();
@@ -15892,14 +16064,14 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
15892
16064
  var li;
15893
16065
  if (!isNullOrUndefined(this.list)) {
15894
16066
  li = this.list.querySelectorAll(state ?
15895
- 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-virtual-list)' :
15896
- 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-virtual-list)');
16067
+ 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)' :
16068
+ 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)');
15897
16069
  }
15898
16070
  if (this.value && this.value.length && event && event.target
15899
16071
  && closest(event.target, '.e-close-hooker') && this.allowFiltering) {
15900
16072
  li = this.mainList.querySelectorAll(state ?
15901
- 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-virtual-list)' :
15902
- 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-virtual-list)');
16073
+ 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)' :
16074
+ 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)');
15903
16075
  }
15904
16076
  if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !isNullOrUndefined(this.fields.groupBy)) {
15905
16077
  var target = (event ? (this.groupTemplate ? closest(event.target, '.e-list-group-item') : event.target) : null);
@@ -16347,9 +16519,16 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
16347
16519
  this.updateClearButton(newProp.showClearButton);
16348
16520
  break;
16349
16521
  case 'text':
16522
+ if (this.fields.disabled) {
16523
+ this.text =
16524
+ this.text && !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
16525
+ }
16350
16526
  this.updateVal(this.value, this.value, 'text');
16351
16527
  break;
16352
16528
  case 'value':
16529
+ if (this.fields.disabled) {
16530
+ this.removeDisabledItemsValue(this.value);
16531
+ }
16353
16532
  this.updateVal(this.value, oldProp.value, 'value');
16354
16533
  this.addValidInputClass();
16355
16534
  if (!this.closePopupOnSelect && this.isPopupOpen()) {
@@ -16512,7 +16691,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
16512
16691
  }
16513
16692
  return valuecheck;
16514
16693
  };
16515
-
16516
16694
  MultiSelect.prototype.addNonPresentItems = function (valuecheck, ulElement, list, event) {
16517
16695
  var _this = this;
16518
16696
  this.dataSource.executeQuery(this.getForQuery(valuecheck)).then(function (e) {
@@ -16522,7 +16700,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
16522
16700
  _this.updateActionList(ulElement, list, event);
16523
16701
  });
16524
16702
  };
16525
-
16526
16703
  MultiSelect.prototype.updateVal = function (newProp, oldProp, prop) {
16527
16704
  if (!this.list) {
16528
16705
  this.onLoadSelect();
@@ -16598,7 +16775,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
16598
16775
  var animModel = {
16599
16776
  name: 'FadeOut',
16600
16777
  duration: 100,
16601
- delay: delay ? delay : 0
16778
+ delay: delay
16602
16779
  };
16603
16780
  this.customFilterQuery = null;
16604
16781
  var eventArgs = { popup: this.popupObj, cancel: false, animation: animModel, event: e || null };
@@ -16921,8 +17098,33 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
16921
17098
  listParent.remove();
16922
17099
  return listItemHeight;
16923
17100
  };
17101
+ /**
17102
+ * Removes disabled values from the given array.
17103
+ *
17104
+ * @param { number[] | string[] | boolean[] | object[] } value - The array to check.
17105
+ * @returns {void}
17106
+ */
17107
+ MultiSelect.prototype.removeDisabledItemsValue = function (value) {
17108
+ if (value) {
17109
+ var data = [];
17110
+ var dataIndex = 0;
17111
+ for (var index = 0; index < value.length; index++) {
17112
+ var indexValue = value[index];
17113
+ if (typeof (indexValue) === 'object') {
17114
+ indexValue = JSON.parse(JSON.stringify(indexValue))[this.fields.value];
17115
+ }
17116
+ if ((indexValue != null) && !(this.isDisabledItemByIndex(this.getIndexByValue(indexValue)))) {
17117
+ data[dataIndex++] = value[index];
17118
+ }
17119
+ }
17120
+ this.value = data.length > 0 ? data : null;
17121
+ }
17122
+ };
16924
17123
  MultiSelect.prototype.checkInitialValue = function () {
16925
17124
  var _this = this;
17125
+ if (this.fields.disabled) {
17126
+ this.removeDisabledItemsValue(this.value);
17127
+ }
16926
17128
  var isData = this.dataSource instanceof Array ? (this.dataSource.length > 0)
16927
17129
  : !isNullOrUndefined(this.dataSource);
16928
17130
  if (!(this.value && this.value.length) &&
@@ -16961,6 +17163,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
16961
17163
  _super.prototype.render.call(this);
16962
17164
  }
16963
17165
  }
17166
+ if (this.fields.disabled) {
17167
+ this.text = this.text && !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
17168
+ }
16964
17169
  if (!isNullOrUndefined(this.text) && (isNullOrUndefined(this.value) || this.value.length === 0)) {
16965
17170
  this.initialTextUpdate();
16966
17171
  }
@@ -17095,6 +17300,66 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
17095
17300
  this.refreshInputHight();
17096
17301
  this.checkPlaceholderSize();
17097
17302
  };
17303
+ /**
17304
+ * Method to disable specific item in the popup.
17305
+ *
17306
+ * @param {string | number | object | HTMLLIElement} item - Specifies the item to be disabled.
17307
+ * @returns {void}
17308
+ * @deprecated
17309
+ */
17310
+ MultiSelect.prototype.disableItem = function (item) {
17311
+ if (this.fields.disabled) {
17312
+ if (!this.list) {
17313
+ this.renderList();
17314
+ }
17315
+ var itemIndex = -1;
17316
+ if (this.liCollections && this.liCollections.length > 0 && this.listData && this.fields.disabled) {
17317
+ if (typeof (item) === 'string') {
17318
+ itemIndex = this.getIndexByValue(item);
17319
+ }
17320
+ else if (typeof item === 'object') {
17321
+ if (item instanceof HTMLLIElement) {
17322
+ for (var index = 0; index < this.liCollections.length; index++) {
17323
+ if (this.liCollections[index] === item) {
17324
+ itemIndex = this.getIndexByValue(item.getAttribute('data-value'));
17325
+ break;
17326
+ }
17327
+ }
17328
+ }
17329
+ else {
17330
+ var value = JSON.parse(JSON.stringify(item))[this.fields.value];
17331
+ for (var index = 0; index < this.listData.length; index++) {
17332
+ if (JSON.parse(JSON.stringify(this.listData[index]))[this.fields.value] === value) {
17333
+ itemIndex = this.getIndexByValue(value);
17334
+ break;
17335
+ }
17336
+ }
17337
+ }
17338
+ }
17339
+ else {
17340
+ itemIndex = item;
17341
+ }
17342
+ var isValidIndex = itemIndex < this.liCollections.length && itemIndex > -1;
17343
+ if (isValidIndex && !(JSON.parse(JSON.stringify(this.listData[itemIndex]))[this.fields.disabled])) {
17344
+ var li = this.liCollections[itemIndex];
17345
+ if (li) {
17346
+ this.disableListItem(li);
17347
+ var parsedData = JSON.parse(JSON.stringify(this.listData[itemIndex]));
17348
+ parsedData[this.fields.disabled] = true;
17349
+ this.listData[itemIndex] = parsedData;
17350
+ if (li.classList.contains(dropDownBaseClasses.focus)) {
17351
+ this.removeFocus();
17352
+ }
17353
+ if (li.classList.contains(HIDE_LIST) || li.classList.contains(dropDownBaseClasses.selected)) {
17354
+ var oldValue = this.value;
17355
+ this.removeDisabledItemsValue(this.value);
17356
+ this.updateVal(this.value, oldValue, 'value');
17357
+ }
17358
+ }
17359
+ }
17360
+ }
17361
+ }
17362
+ };
17098
17363
  /**
17099
17364
  * Removes the component from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.
17100
17365
  *
@@ -17162,7 +17427,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
17162
17427
  this.selectAllEventEle = null;
17163
17428
  };
17164
17429
  __decorate$5([
17165
- Complex({ text: null, value: null, iconCss: null, groupBy: null }, FieldSettings)
17430
+ Complex({ text: null, value: null, iconCss: null, groupBy: null, disabled: null }, FieldSettings)
17166
17431
  ], MultiSelect.prototype, "fields", void 0);
17167
17432
  __decorate$5([
17168
17433
  Property(false)
@@ -17547,12 +17812,12 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
17547
17812
  }
17548
17813
  if (!isNullOrUndefined(this.checkWrapper)) {
17549
17814
  var checkElement = select('.' + CHECKBOXFRAME$1, this.checkWrapper);
17550
- var selectAll$$1 = false;
17551
- this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), args.li, args.e, selectAll$$1);
17815
+ var selectAll = false;
17816
+ this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), args.li, args.e, selectAll);
17552
17817
  }
17553
17818
  };
17554
- CheckBoxSelection.prototype.validateCheckNode = function (checkWrap, isCheck, li, e, selectAll$$1) {
17555
- this.changeState(checkWrap, isCheck ? 'uncheck' : 'check', e, true, selectAll$$1);
17819
+ CheckBoxSelection.prototype.validateCheckNode = function (checkWrap, isCheck, li, e, selectAll) {
17820
+ this.changeState(checkWrap, isCheck ? 'uncheck' : 'check', e, true, selectAll);
17556
17821
  };
17557
17822
  CheckBoxSelection.prototype.clickHandler = function (e) {
17558
17823
  var target;
@@ -17563,26 +17828,26 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
17563
17828
  target = e.currentTarget;
17564
17829
  }
17565
17830
  this.checkWrapper = closest(target, '.' + CHECKBOXWRAP$1);
17566
- var selectAll$$1 = true;
17831
+ var selectAll = true;
17567
17832
  if (!isNullOrUndefined(this.checkWrapper)) {
17568
17833
  var checkElement = select('.' + CHECKBOXFRAME$1, this.checkWrapper);
17569
- this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), null, e, selectAll$$1);
17834
+ this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), null, e, selectAll);
17570
17835
  }
17571
17836
  e.preventDefault();
17572
17837
  };
17573
- CheckBoxSelection.prototype.changeState = function (wrapper, state, e, isPrevent, selectAll$$1) {
17838
+ CheckBoxSelection.prototype.changeState = function (wrapper, state, e, isPrevent, selectAll) {
17574
17839
  var frameSpan = wrapper.getElementsByClassName(CHECKBOXFRAME$1)[0];
17575
17840
  if (state === 'check' && !frameSpan.classList.contains(CHECK$1)) {
17576
17841
  frameSpan.classList.remove(INDETERMINATE);
17577
17842
  frameSpan.classList.add(CHECK$1);
17578
- if (selectAll$$1) {
17843
+ if (selectAll) {
17579
17844
  this.parent.selectAllItems(true, e);
17580
17845
  this.setLocale(true);
17581
17846
  }
17582
17847
  }
17583
17848
  else if (state === 'uncheck' && (frameSpan.classList.contains(CHECK$1) || frameSpan.classList.contains(INDETERMINATE))) {
17584
17849
  removeClass([frameSpan], [CHECK$1, INDETERMINATE]);
17585
- if (selectAll$$1) {
17850
+ if (selectAll) {
17586
17851
  this.parent.selectAllItems(false, e);
17587
17852
  this.setLocale();
17588
17853
  }
@@ -17590,7 +17855,7 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
17590
17855
  else if (state === 'indeterminate' && !(frameSpan.classList.contains(INDETERMINATE))) {
17591
17856
  removeClass([frameSpan], [CHECK$1]);
17592
17857
  frameSpan.classList.add(INDETERMINATE);
17593
- if (selectAll$$1) {
17858
+ if (selectAll) {
17594
17859
  this.parent.selectAllItems(false, e);
17595
17860
  this.setLocale();
17596
17861
  }
@@ -17882,10 +18147,6 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
17882
18147
  return CheckBoxSelection;
17883
18148
  }());
17884
18149
 
17885
- /**
17886
- * export all modules from current location
17887
- */
17888
-
17889
18150
  var __extends$6 = (undefined && undefined.__extends) || (function () {
17890
18151
  var extendStatics = function (d, b) {
17891
18152
  extendStatics = Object.setPrototypeOf ||
@@ -17905,8 +18166,6 @@ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators,
17905
18166
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
17906
18167
  return c > 3 && r && Object.defineProperty(target, key, r), r;
17907
18168
  };
17908
- // eslint-disable-next-line @typescript-eslint/triple-slash-reference
17909
- /// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>
17910
18169
  /**
17911
18170
  * Defines the Selection settings of List Box.
17912
18171
  */
@@ -18020,6 +18279,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
18020
18279
  var hiddenSelect = this.createElement('select', { className: 'e-hidden-select', attrs: { 'multiple': '' } });
18021
18280
  hiddenSelect.style.visibility = 'hidden';
18022
18281
  this.list.classList.add('e-listbox-wrapper');
18282
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
18023
18283
  this.list.querySelector('.e-list-parent').setAttribute('role', 'presentation');
18024
18284
  var groupHdrs = this.list.querySelectorAll('.e-list-group-item');
18025
18285
  for (var i = 0; i < groupHdrs.length; i++) {
@@ -18038,7 +18298,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
18038
18298
  }
18039
18299
  }
18040
18300
  else {
18041
- if (this.initLoad) {
18301
+ if (this.initLoad && this.element.parentElement) {
18042
18302
  this.element.parentElement.insertBefore(this.list, this.element);
18043
18303
  }
18044
18304
  this.list.insertBefore(this.element, this.list.firstChild);
@@ -18106,6 +18366,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
18106
18366
  ListBox.prototype.initToolbar = function () {
18107
18367
  var pos = this.toolbarSettings.position;
18108
18368
  var prevScope = this.element.getAttribute('data-value');
18369
+ this.toolbarSettings.items = isNullOrUndefined(this.toolbarSettings.items) ? [] : this.toolbarSettings.items;
18109
18370
  if (this.toolbarSettings.items.length) {
18110
18371
  var toolElem = this.createElement('div', { className: 'e-listbox-tool', attrs: { 'role': 'toolbar' } });
18111
18372
  var wrapper = this.createElement('div', {
@@ -18200,7 +18461,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
18200
18461
  this.spinner = this.createElement('div', { className: 'e-listbox-wrapper' });
18201
18462
  }
18202
18463
  this.spinner.style.height = formatUnit(this.height);
18203
- this.element.parentElement.insertBefore(this.spinner, this.element.nextSibling);
18464
+ if (this.element.parentElement) {
18465
+ this.element.parentElement.insertBefore(this.spinner, this.element.nextSibling);
18466
+ }
18204
18467
  createSpinner({ target: this.spinner }, this.createElement);
18205
18468
  showSpinner(this.spinner);
18206
18469
  };
@@ -18506,7 +18769,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
18506
18769
  }
18507
18770
  var fListData_1 = [].slice.call(this.listData);
18508
18771
  var fSortData_1 = [].slice.call(this.sortedData);
18509
- selectedOptions.forEach(function (value, index) {
18772
+ selectedOptions.forEach(function (value) {
18510
18773
  droppedData = _this.getDataByValue(value);
18511
18774
  var srcIdx = _this.listData.indexOf(droppedData);
18512
18775
  var jsonSrcIdx = _this.jsonData.indexOf(droppedData);
@@ -19057,6 +19320,10 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
19057
19320
  }
19058
19321
  };
19059
19322
  ListBox.prototype.clickHandler = function (e) {
19323
+ var li = closest(e.target, '.' + 'e-list-item');
19324
+ if (isNullOrUndefined(li)) {
19325
+ return;
19326
+ }
19060
19327
  this.selectHandler(e);
19061
19328
  };
19062
19329
  ListBox.prototype.checkSelectAll = function () {
@@ -19549,6 +19816,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
19549
19816
  }
19550
19817
  var _loop_3 = function (i) {
19551
19818
  if (fListBox.ulElement.childNodes[i].classList.contains('e-disabled')) {
19819
+ // eslint-disable-next-line @typescript-eslint/tslint/config
19552
19820
  flistboxarray = flistboxarray.filter(function (item) { return item !== i; });
19553
19821
  tempLiColl.push(fListBox.ulElement.childNodes[i]);
19554
19822
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -19879,10 +20147,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
19879
20147
  };
19880
20148
  ListBox.prototype.dataUpdater = function (dataSource, query, fields) {
19881
20149
  this.isDataFetched = false;
19882
- var backCommand = true;
19883
20150
  if (this.targetElement().trim() === '') {
19884
20151
  var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
19885
- if (backCommand) {
20152
+ {
19886
20153
  this.remoteCustomValue = false;
19887
20154
  if (this.isAngular && this.itemTemplate) {
19888
20155
  list = this.renderItems(this.listData, fields);
@@ -19969,7 +20236,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
19969
20236
  });
19970
20237
  }
19971
20238
  };
19972
- ListBox.prototype.setSelection = function (values, isSelect, isText, canFocus) {
20239
+ ListBox.prototype.setSelection = function (
20240
+ // eslint-disable-next-line max-len
20241
+ values, isSelect, isText, canFocus) {
19973
20242
  var _this = this;
19974
20243
  if (values === void 0) { values = this.value; }
19975
20244
  if (isSelect === void 0) { isSelect = true; }
@@ -19994,21 +20263,21 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
19994
20263
  li = _this.list.querySelector('[data-value="' + text + '"]');
19995
20264
  }
19996
20265
  if (li) {
19997
- if (_this.selectionSettings.showCheckbox) {
20266
+ if (_this.selectionSettings.showCheckbox && !li.classList.contains('e-disabled')) {
19998
20267
  liselect = li.getElementsByClassName('e-frame')[0].classList.contains('e-check');
19999
20268
  }
20000
20269
  else {
20001
20270
  liselect = li.classList.contains('e-selected');
20002
20271
  }
20003
20272
  if (!isSelect && liselect || isSelect && !liselect && li) {
20004
- if (_this.selectionSettings.showCheckbox) {
20273
+ if (_this.selectionSettings.showCheckbox && !li.classList.contains('e-disabled')) {
20005
20274
  _this.notify('updatelist', { li: li, module: 'listbox' });
20006
20275
  if (canFocus) {
20007
20276
  li.focus();
20008
20277
  }
20009
20278
  }
20010
20279
  else {
20011
- if (isSelect) {
20280
+ if (isSelect && !li.classList.contains('e-disabled')) {
20012
20281
  li.classList.add(cssClass.selected);
20013
20282
  li.setAttribute('aria-selected', 'true');
20014
20283
  if (canFocus) {
@@ -20042,7 +20311,17 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
20042
20311
  this.checkSelectAll();
20043
20312
  };
20044
20313
  ListBox.prototype.checkDisabledState = function (inst) {
20045
- return inst.ulElement.querySelectorAll('.' + cssClass.li).length === 0;
20314
+ if (isNullOrUndefined(inst.ulElement)) {
20315
+ if (!isNullOrUndefined(this.dataSource) && isNullOrUndefined(this.dataSource.length)) {
20316
+ return false;
20317
+ }
20318
+ else {
20319
+ return true;
20320
+ }
20321
+ }
20322
+ else {
20323
+ return inst.ulElement.querySelectorAll('.' + cssClass.li).length === 0;
20324
+ }
20046
20325
  };
20047
20326
  ListBox.prototype.updateToolBarState = function () {
20048
20327
  var _this = this;
@@ -20280,6 +20559,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
20280
20559
  }
20281
20560
  }
20282
20561
  if (newProp.toolbarSettings.items) {
20562
+ oldProp.toolbarSettings.items = isNullOrUndefined(oldProp.toolbarSettings.items) ? [] : oldProp.toolbarSettings.items;
20283
20563
  if (oldProp.toolbarSettings && oldProp.toolbarSettings.items.length) {
20284
20564
  ele = this.list.parentElement;
20285
20565
  ele.parentElement.insertBefore(this.list, ele);
@@ -20416,10 +20696,6 @@ var listBoxClasses = {
20416
20696
  clearIcon: 'e-clear-icon'
20417
20697
  };
20418
20698
 
20419
- /**
20420
- * export all modules from current location
20421
- */
20422
-
20423
20699
  var __extends$7 = (undefined && undefined.__extends) || (function () {
20424
20700
  var extendStatics = function (d, b) {
20425
20701
  extendStatics = Object.setPrototypeOf ||
@@ -20501,12 +20777,12 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
20501
20777
  this.setCssClass(newClass, [this.popupObj.element], oldClass);
20502
20778
  }
20503
20779
  };
20504
- Mention.prototype.setCssClass = function (cssClass$$1, elements, oldClass) {
20780
+ Mention.prototype.setCssClass = function (cssClass, elements, oldClass) {
20505
20781
  if (!isNullOrUndefined(oldClass) && oldClass !== '') {
20506
20782
  removeClass(elements, oldClass.split(' '));
20507
20783
  }
20508
- if (!isNullOrUndefined(cssClass$$1) && cssClass$$1 !== '') {
20509
- addClass(elements, cssClass$$1.split(' '));
20784
+ if (!isNullOrUndefined(cssClass) && cssClass !== '') {
20785
+ addClass(elements, cssClass.split(' '));
20510
20786
  }
20511
20787
  };
20512
20788
  Mention.prototype.initializeData = function () {
@@ -20711,6 +20987,9 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
20711
20987
  }
20712
20988
  };
20713
20989
  Mention.prototype.updateUpDownAction = function (e) {
20990
+ if (this.fields.disabled && this.list && this.list.querySelectorAll('.e-list-item:not(.e-disabled)').length === 0) {
20991
+ return;
20992
+ }
20714
20993
  var focusEle = this.list.querySelector('.' + dropDownBaseClasses.focus);
20715
20994
  if (this.isSelectFocusItem(focusEle)) {
20716
20995
  this.setSelection(focusEle, e);
@@ -20731,6 +21010,17 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
20731
21010
  this.setSelection(nextItem, e);
20732
21011
  }
20733
21012
  }
21013
+ var itemIndex;
21014
+ for (var index = 0; index < this.liCollections.length; index++) {
21015
+ if (this.liCollections[index].classList.contains(dropDownBaseClasses.focus)
21016
+ || this.liCollections[index].classList.contains(dropDownBaseClasses.selected)) {
21017
+ itemIndex = index;
21018
+ break;
21019
+ }
21020
+ }
21021
+ if (itemIndex != null && this.isDisabledElement(this.liCollections[itemIndex])) {
21022
+ this.updateUpDownAction(e);
21023
+ }
20734
21024
  if (this.isPopupOpen) {
20735
21025
  e.preventDefault();
20736
21026
  }
@@ -20906,7 +21196,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
20906
21196
  if (!isNullOrUndefined(ulElement)) {
20907
21197
  attributes(ulElement, { 'id': this.inputElement.id + '_options', 'role': 'listbox', 'aria-hidden': 'false' });
20908
21198
  }
20909
- var focusItem = ulElement.querySelector('.' + dropDownBaseClasses.li);
21199
+ var focusItem = this.fields.disabled ? ulElement.querySelector('.' + dropDownBaseClasses.li + ':not(.e-disabled)') : ulElement.querySelector('.' + dropDownBaseClasses.li);
20910
21200
  if (focusItem) {
20911
21201
  focusItem.classList.add(dropDownBaseClasses.selected);
20912
21202
  this.selectedLI = focusItem;
@@ -21135,10 +21425,10 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
21135
21425
  }
21136
21426
  }
21137
21427
  append([_this.list], popupEle_1);
21138
- if (_this.inputElement.parentElement && _this.inputElement.parentElement.parentElement &&
21139
- _this.inputElement.parentElement.parentElement.classList.contains('e-richtexteditor')) {
21140
- if (popupEle_1.firstElementChild && popupEle_1.firstElementChild.childElementCount > 0) {
21141
- popupEle_1.firstElementChild.setAttribute('aria-owns', _this.inputElement.parentElement.parentElement.id);
21428
+ if (_this.inputElement.parentElement) {
21429
+ var rteRootElement = _this.inputElement.parentElement.closest('.e-richtexteditor');
21430
+ if (rteRootElement && popupEle_1.firstElementChild && popupEle_1.firstElementChild.childElementCount > 0) {
21431
+ popupEle_1.firstElementChild.setAttribute('aria-owns', rteRootElement.id);
21142
21432
  addClass([popupEle_1], 'e-rte-elements');
21143
21433
  }
21144
21434
  }
@@ -21441,7 +21731,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
21441
21731
  Mention.prototype.onMouseClick = function (e) {
21442
21732
  var target = e.target;
21443
21733
  var li = closest(target, '.' + dropDownBaseClasses.li);
21444
- if (!this.isValidLI(li)) {
21734
+ if (!this.isValidLI(li) || this.isDisabledElement(li)) {
21445
21735
  return;
21446
21736
  }
21447
21737
  this.isSelected = true;
@@ -21672,6 +21962,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
21672
21962
  }
21673
21963
  this.isTyped = false;
21674
21964
  range.deleteContents();
21965
+ range.startContainer.parentElement.normalize();
21675
21966
  var element = this.createElement('div');
21676
21967
  element.innerHTML = value;
21677
21968
  var frag = document.createDocumentFragment();
@@ -21697,7 +21988,6 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
21697
21988
  var event_1 = new CustomEvent('content-changed', { detail: { click: true } });
21698
21989
  this.inputElement.dispatchEvent(event_1);
21699
21990
  }
21700
-
21701
21991
  this.onChangeEvent(e);
21702
21992
  }
21703
21993
  };
@@ -21708,10 +21998,10 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
21708
21998
  }
21709
21999
  if (this.isContentEditable(this.inputElement)) {
21710
22000
  if (Browser.isAndroid) {
21711
- return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : ' ');
22001
+ return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '');
21712
22002
  }
21713
22003
  else {
21714
- return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : ' ');
22004
+ return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '');
21715
22005
  }
21716
22006
  }
21717
22007
  else {
@@ -22068,13 +22358,5 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
22068
22358
  return Mention;
22069
22359
  }(DropDownBase));
22070
22360
 
22071
- /**
22072
- * export all modules from current location
22073
- */
22074
-
22075
- /**
22076
- * export all modules from current location
22077
- */
22078
-
22079
- export { incrementalSearch, Search, escapeCharRegExp, resetIncrementalSearchValues, highlightSearch, revertHighlightSearch, VirtualScroll, FieldSettings, dropDownBaseClasses, DropDownBase, dropDownListClasses, DropDownList, Fields, TreeSettings, DropDownTree, ComboBox, AutoComplete, MultiSelect, CheckBoxSelection, createFloatLabel, updateFloatLabelState, removeFloating, setPlaceHolder, floatLabelFocus, floatLabelBlur, encodePlaceholder, SelectionSettings, ToolbarSettings, ListBox, Mention };
22361
+ export { AutoComplete, CheckBoxSelection, ComboBox, DropDownBase, DropDownList, DropDownTree, FieldSettings, Fields, ListBox, Mention, MultiSelect, Search, SelectionSettings, ToolbarSettings, TreeSettings, VirtualScroll, createFloatLabel, dropDownBaseClasses, dropDownListClasses, encodePlaceholder, escapeCharRegExp, floatLabelBlur, floatLabelFocus, highlightSearch, incrementalSearch, removeFloating, resetIncrementalSearchValues, revertHighlightSearch, setPlaceHolder, updateFloatLabelState };
22080
22362
  //# sourceMappingURL=ej2-dropdowns.es5.js.map