@syncfusion/ej2-navigations 27.2.4 → 28.1.33

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 (303) hide show
  1. package/README.md +2 -2
  2. package/dist/ej2-navigations.min.js +3 -3
  3. package/dist/ej2-navigations.umd.min.js +3 -3
  4. package/dist/ej2-navigations.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-navigations.es2015.js +484 -297
  6. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  7. package/dist/es6/ej2-navigations.es5.js +503 -310
  8. package/dist/es6/ej2-navigations.es5.js.map +1 -1
  9. package/dist/global/ej2-navigations.min.js +3 -3
  10. package/dist/global/ej2-navigations.min.js.map +1 -1
  11. package/dist/global/index.d.ts +2 -2
  12. package/package.json +12 -12
  13. package/src/carousel/carousel-model.d.ts +12 -0
  14. package/src/carousel/carousel.d.ts +11 -0
  15. package/src/carousel/carousel.js +24 -3
  16. package/src/common/menu-base-model.d.ts +7 -0
  17. package/src/common/menu-base.d.ts +7 -0
  18. package/src/common/menu-base.js +80 -19
  19. package/src/context-menu/context-menu-model.d.ts +15 -0
  20. package/src/context-menu/context-menu.d.ts +13 -0
  21. package/src/context-menu/context-menu.js +10 -0
  22. package/src/menu/menu.js +4 -0
  23. package/src/stepper/stepper.d.ts +9 -0
  24. package/src/stepper/stepper.js +262 -237
  25. package/src/stepper-base/stepper-base.js +15 -11
  26. package/src/tab/tab-model.d.ts +15 -2
  27. package/src/tab/tab.d.ts +26 -2
  28. package/src/tab/tab.js +82 -15
  29. package/src/toolbar/toolbar-model.d.ts +0 -6
  30. package/src/toolbar/toolbar.d.ts +0 -6
  31. package/src/treeview/treeview.d.ts +1 -9
  32. package/src/treeview/treeview.js +18 -17
  33. package/styles/accordion/_tailwind3-definition.scss +168 -0
  34. package/styles/accordion/_theme.scss +2 -2
  35. package/styles/accordion/bds.css +544 -0
  36. package/styles/accordion/bds.scss +5 -0
  37. package/styles/accordion/icons/_tailwind3.scss +15 -0
  38. package/styles/accordion/tailwind3.css +552 -0
  39. package/styles/accordion/tailwind3.scss +5 -0
  40. package/styles/appbar/_layout.scss +1 -1
  41. package/styles/appbar/_tailwind3-definition.scss +6 -0
  42. package/styles/appbar/bds.css +302 -0
  43. package/styles/appbar/bds.scss +4 -0
  44. package/styles/appbar/tailwind3.css +285 -0
  45. package/styles/appbar/tailwind3.scss +4 -0
  46. package/styles/bds-lite.css +9234 -0
  47. package/styles/bds-lite.scss +47 -0
  48. package/styles/bds.css +11955 -0
  49. package/styles/bds.scss +59 -0
  50. package/styles/bootstrap-dark-lite.css +22 -13
  51. package/styles/bootstrap-dark.css +36 -14
  52. package/styles/bootstrap-lite.css +22 -13
  53. package/styles/bootstrap.css +36 -14
  54. package/styles/bootstrap4-lite.css +22 -13
  55. package/styles/bootstrap4.css +36 -14
  56. package/styles/bootstrap5-dark-lite.css +30 -21
  57. package/styles/bootstrap5-dark.css +44 -22
  58. package/styles/bootstrap5-lite.css +30 -21
  59. package/styles/bootstrap5.3-lite.css +22 -13
  60. package/styles/bootstrap5.3.css +36 -14
  61. package/styles/bootstrap5.css +44 -22
  62. package/styles/breadcrumb/_layout.scss +16 -1
  63. package/styles/breadcrumb/_tailwind3-definition.scss +61 -0
  64. package/styles/breadcrumb/_theme.scss +60 -0
  65. package/styles/breadcrumb/bds.css +418 -0
  66. package/styles/breadcrumb/bds.scss +5 -0
  67. package/styles/breadcrumb/icons/_tailwind3.scss +23 -0
  68. package/styles/breadcrumb/tailwind3.css +434 -0
  69. package/styles/breadcrumb/tailwind3.scss +5 -0
  70. package/styles/carousel/_tailwind3-definition.scss +24 -0
  71. package/styles/carousel/_theme.scss +9 -3
  72. package/styles/carousel/bds.css +426 -0
  73. package/styles/carousel/bds.scss +5 -0
  74. package/styles/carousel/fluent2.css +5 -0
  75. package/styles/carousel/icons/_tailwind3.scss +30 -0
  76. package/styles/carousel/tailwind3.css +396 -0
  77. package/styles/carousel/tailwind3.scss +5 -0
  78. package/styles/context-menu/_bigger.scss +15 -0
  79. package/styles/context-menu/_layout.scss +24 -0
  80. package/styles/context-menu/_tailwind3-definition.scss +55 -0
  81. package/styles/context-menu/bds.css +421 -0
  82. package/styles/context-menu/bds.scss +8 -0
  83. package/styles/context-menu/fluent2.css +1 -1
  84. package/styles/context-menu/icons/_tailwind3.scss +31 -0
  85. package/styles/context-menu/tailwind3.css +449 -0
  86. package/styles/context-menu/tailwind3.scss +8 -0
  87. package/styles/fabric-dark-lite.css +22 -13
  88. package/styles/fabric-dark.css +36 -14
  89. package/styles/fabric-lite.css +22 -13
  90. package/styles/fabric.css +36 -14
  91. package/styles/fluent-dark-lite.css +23 -14
  92. package/styles/fluent-dark.css +37 -15
  93. package/styles/fluent-lite.css +23 -14
  94. package/styles/fluent.css +37 -15
  95. package/styles/fluent2-lite.css +38 -21
  96. package/styles/fluent2.css +52 -22
  97. package/styles/h-scroll/_tailwind3-definition.scss +83 -0
  98. package/styles/h-scroll/bds.css +311 -0
  99. package/styles/h-scroll/bds.scss +5 -0
  100. package/styles/h-scroll/icons/_tailwind3.scss +49 -0
  101. package/styles/h-scroll/tailwind3.css +311 -0
  102. package/styles/h-scroll/tailwind3.scss +5 -0
  103. package/styles/highcontrast-light-lite.css +22 -13
  104. package/styles/highcontrast-light.css +36 -14
  105. package/styles/highcontrast-lite.css +25 -16
  106. package/styles/highcontrast.css +39 -17
  107. package/styles/material-dark-lite.css +22 -13
  108. package/styles/material-dark.css +36 -14
  109. package/styles/material-lite.css +22 -13
  110. package/styles/material.css +36 -14
  111. package/styles/material3-dark-lite.css +22 -13
  112. package/styles/material3-dark.css +39 -14
  113. package/styles/material3-lite.css +22 -13
  114. package/styles/material3.css +39 -14
  115. package/styles/menu/_bigger.scss +23 -0
  116. package/styles/menu/_layout.scss +32 -0
  117. package/styles/menu/_tailwind3-definition.scss +66 -0
  118. package/styles/menu/_theme.scss +36 -2
  119. package/styles/menu/bds.css +1155 -0
  120. package/styles/menu/bds.scss +9 -0
  121. package/styles/menu/fluent2.css +1 -1
  122. package/styles/menu/icons/_tailwind3.scss +104 -0
  123. package/styles/menu/tailwind3.css +1232 -0
  124. package/styles/menu/tailwind3.scss +9 -0
  125. package/styles/pager/_bigger.scss +39 -6
  126. package/styles/pager/_layout.scss +5 -2
  127. package/styles/pager/_tailwind-definition.scss +2 -2
  128. package/styles/pager/_tailwind3-definition.scss +166 -0
  129. package/styles/pager/bds.css +915 -0
  130. package/styles/pager/bds.scss +5 -0
  131. package/styles/pager/bootstrap-dark.css +7 -0
  132. package/styles/pager/bootstrap.css +7 -0
  133. package/styles/pager/bootstrap4.css +7 -0
  134. package/styles/pager/bootstrap5-dark.css +7 -0
  135. package/styles/pager/bootstrap5.3.css +7 -0
  136. package/styles/pager/bootstrap5.css +7 -0
  137. package/styles/pager/fabric-dark.css +7 -0
  138. package/styles/pager/fabric.css +7 -0
  139. package/styles/pager/fluent-dark.css +7 -0
  140. package/styles/pager/fluent.css +7 -0
  141. package/styles/pager/fluent2.css +7 -0
  142. package/styles/pager/highcontrast-light.css +7 -0
  143. package/styles/pager/highcontrast.css +7 -0
  144. package/styles/pager/icons/_tailwind3.scss +50 -0
  145. package/styles/pager/material-dark.css +7 -0
  146. package/styles/pager/material.css +7 -0
  147. package/styles/pager/material3-dark.css +8 -0
  148. package/styles/pager/material3.css +8 -0
  149. package/styles/pager/tailwind-dark.css +17 -10
  150. package/styles/pager/tailwind.css +17 -10
  151. package/styles/pager/tailwind3.css +835 -0
  152. package/styles/pager/tailwind3.scss +5 -0
  153. package/styles/sidebar/_tailwind3-definition.scss +6 -0
  154. package/styles/sidebar/_theme.scss +1 -1
  155. package/styles/sidebar/bds.css +263 -0
  156. package/styles/sidebar/bds.scss +3 -0
  157. package/styles/sidebar/tailwind3.css +227 -0
  158. package/styles/sidebar/tailwind3.scss +3 -0
  159. package/styles/stepper/_layout.scss +3 -0
  160. package/styles/stepper/_tailwind3-definition.scss +72 -0
  161. package/styles/stepper/_theme.scss +2 -1
  162. package/styles/stepper/bds.css +725 -0
  163. package/styles/stepper/bds.scss +6 -0
  164. package/styles/stepper/bootstrap-dark.css +5 -1
  165. package/styles/stepper/bootstrap.css +5 -1
  166. package/styles/stepper/bootstrap4.css +5 -1
  167. package/styles/stepper/bootstrap5-dark.css +5 -1
  168. package/styles/stepper/bootstrap5.3.css +5 -1
  169. package/styles/stepper/bootstrap5.css +5 -1
  170. package/styles/stepper/fabric-dark.css +5 -1
  171. package/styles/stepper/fabric.css +5 -1
  172. package/styles/stepper/fluent-dark.css +5 -1
  173. package/styles/stepper/fluent.css +5 -1
  174. package/styles/stepper/fluent2.css +5 -1
  175. package/styles/stepper/highcontrast-light.css +5 -1
  176. package/styles/stepper/highcontrast.css +5 -1
  177. package/styles/stepper/icons/_tailwind3.scss +5 -0
  178. package/styles/stepper/material-dark.css +5 -1
  179. package/styles/stepper/material.css +5 -1
  180. package/styles/stepper/material3-dark.css +5 -1
  181. package/styles/stepper/material3.css +5 -1
  182. package/styles/stepper/tailwind-dark.css +5 -1
  183. package/styles/stepper/tailwind.css +5 -1
  184. package/styles/stepper/tailwind3.css +725 -0
  185. package/styles/stepper/tailwind3.scss +6 -0
  186. package/styles/tab/_bigger.scss +16 -0
  187. package/styles/tab/_bootstrap-dark-definition.scss +0 -2
  188. package/styles/tab/_bootstrap-definition.scss +0 -2
  189. package/styles/tab/_bootstrap4-definition.scss +0 -2
  190. package/styles/tab/_bootstrap5-definition.scss +0 -2
  191. package/styles/tab/_bootstrap5.3-definition.scss +0 -2
  192. package/styles/tab/_fabric-dark-definition.scss +0 -2
  193. package/styles/tab/_fabric-definition.scss +0 -2
  194. package/styles/tab/_fluent-definition.scss +0 -2
  195. package/styles/tab/_fluent2-definition.scss +0 -2
  196. package/styles/tab/_fusionnew-definition.scss +0 -2
  197. package/styles/tab/_highcontrast-definition.scss +0 -2
  198. package/styles/tab/_highcontrast-light-definition.scss +0 -2
  199. package/styles/tab/_material-dark-definition.scss +0 -2
  200. package/styles/tab/_material-definition.scss +0 -2
  201. package/styles/tab/_material3-definition.scss +0 -2
  202. package/styles/tab/_tailwind-definition.scss +0 -2
  203. package/styles/tab/_tailwind3-definition.scss +634 -0
  204. package/styles/tab/_theme.scss +0 -12
  205. package/styles/tab/bds.css +4190 -0
  206. package/styles/tab/bds.scss +6 -0
  207. package/styles/tab/bootstrap-dark.css +7 -11
  208. package/styles/tab/bootstrap.css +7 -11
  209. package/styles/tab/bootstrap4.css +7 -11
  210. package/styles/tab/bootstrap5-dark.css +7 -11
  211. package/styles/tab/bootstrap5.3.css +7 -11
  212. package/styles/tab/bootstrap5.css +7 -11
  213. package/styles/tab/fabric-dark.css +7 -11
  214. package/styles/tab/fabric.css +7 -11
  215. package/styles/tab/fluent-dark.css +7 -11
  216. package/styles/tab/fluent.css +7 -11
  217. package/styles/tab/fluent2.css +10 -14
  218. package/styles/tab/highcontrast-light.css +7 -11
  219. package/styles/tab/highcontrast.css +7 -11
  220. package/styles/tab/icons/_tailwind3.scss +90 -0
  221. package/styles/tab/material-dark.css +7 -11
  222. package/styles/tab/material.css +7 -11
  223. package/styles/tab/material3-dark.css +9 -11
  224. package/styles/tab/material3.css +9 -11
  225. package/styles/tab/tailwind-dark.css +7 -11
  226. package/styles/tab/tailwind.css +7 -11
  227. package/styles/tab/tailwind3.css +4125 -0
  228. package/styles/tab/tailwind3.scss +6 -0
  229. package/styles/tailwind-dark-lite.css +28 -19
  230. package/styles/tailwind-dark.css +47 -25
  231. package/styles/tailwind-lite.css +28 -19
  232. package/styles/tailwind.css +47 -25
  233. package/styles/tailwind3-lite.css +9035 -0
  234. package/styles/tailwind3-lite.scss +47 -0
  235. package/styles/tailwind3.css +11691 -0
  236. package/styles/tailwind3.scss +59 -0
  237. package/styles/toolbar/_bigger.scss +14 -0
  238. package/styles/toolbar/_bootstrap5-definition.scss +6 -6
  239. package/styles/toolbar/_layout.scss +7 -1
  240. package/styles/toolbar/_tailwind3-definition.scss +199 -0
  241. package/styles/toolbar/_theme.scss +6 -6
  242. package/styles/toolbar/bds.css +1219 -0
  243. package/styles/toolbar/bds.scss +9 -0
  244. package/styles/toolbar/bootstrap-dark.css +1 -1
  245. package/styles/toolbar/bootstrap.css +1 -1
  246. package/styles/toolbar/bootstrap4.css +1 -1
  247. package/styles/toolbar/bootstrap5-dark.css +9 -9
  248. package/styles/toolbar/bootstrap5.3.css +1 -1
  249. package/styles/toolbar/bootstrap5.css +9 -9
  250. package/styles/toolbar/fabric-dark.css +1 -1
  251. package/styles/toolbar/fabric.css +1 -1
  252. package/styles/toolbar/fluent-dark.css +1 -1
  253. package/styles/toolbar/fluent.css +1 -1
  254. package/styles/toolbar/fluent2.css +1 -1
  255. package/styles/toolbar/highcontrast-light.css +1 -1
  256. package/styles/toolbar/highcontrast.css +1 -1
  257. package/styles/toolbar/icons/_tailwind3.scss +14 -0
  258. package/styles/toolbar/material-dark.css +1 -1
  259. package/styles/toolbar/material.css +1 -1
  260. package/styles/toolbar/material3-dark.css +1 -1
  261. package/styles/toolbar/material3.css +1 -1
  262. package/styles/toolbar/tailwind-dark.css +1 -1
  263. package/styles/toolbar/tailwind.css +1 -1
  264. package/styles/toolbar/tailwind3.css +1211 -0
  265. package/styles/toolbar/tailwind3.scss +9 -0
  266. package/styles/treeview/_bigger.scss +16 -3
  267. package/styles/treeview/_fluent-definition.scss +1 -1
  268. package/styles/treeview/_fluent2-definition.scss +2 -2
  269. package/styles/treeview/_highcontrast-definition.scss +3 -3
  270. package/styles/treeview/_layout.scss +42 -5
  271. package/styles/treeview/_tailwind-definition.scss +1 -1
  272. package/styles/treeview/_tailwind3-definition.scss +126 -0
  273. package/styles/treeview/_theme.scss +1 -1
  274. package/styles/treeview/bds.css +1031 -0
  275. package/styles/treeview/bds.scss +7 -0
  276. package/styles/treeview/bootstrap-dark.css +16 -1
  277. package/styles/treeview/bootstrap.css +16 -1
  278. package/styles/treeview/bootstrap4.css +16 -1
  279. package/styles/treeview/bootstrap5-dark.css +16 -1
  280. package/styles/treeview/bootstrap5.3.css +16 -1
  281. package/styles/treeview/bootstrap5.css +16 -1
  282. package/styles/treeview/fabric-dark.css +16 -1
  283. package/styles/treeview/fabric.css +16 -1
  284. package/styles/treeview/fluent-dark.css +17 -2
  285. package/styles/treeview/fluent.css +17 -2
  286. package/styles/treeview/fluent2.css +22 -4
  287. package/styles/treeview/highcontrast-light.css +16 -1
  288. package/styles/treeview/highcontrast.css +19 -4
  289. package/styles/treeview/icons/_tailwind3.scss +44 -0
  290. package/styles/treeview/material-dark.css +16 -1
  291. package/styles/treeview/material.css +16 -1
  292. package/styles/treeview/material3-dark.css +16 -1
  293. package/styles/treeview/material3.css +16 -1
  294. package/styles/treeview/tailwind-dark.css +17 -2
  295. package/styles/treeview/tailwind.css +17 -2
  296. package/styles/treeview/tailwind3.css +806 -0
  297. package/styles/treeview/tailwind3.scss +7 -0
  298. package/styles/v-scroll/_tailwind3-definition.scss +49 -0
  299. package/styles/v-scroll/bds.css +218 -0
  300. package/styles/v-scroll/bds.scss +5 -0
  301. package/styles/v-scroll/icons/_tailwind3.scss +27 -0
  302. package/styles/v-scroll/tailwind3.css +218 -0
  303. package/styles/v-scroll/tailwind3.scss +5 -0
@@ -1167,6 +1167,9 @@ var MenuItem = /** @__PURE__ @class */ (function (_super) {
1167
1167
  __decorate$2([
1168
1168
  Property('')
1169
1169
  ], MenuItem.prototype, "url", void 0);
1170
+ __decorate$2([
1171
+ Property()
1172
+ ], MenuItem.prototype, "htmlAttributes", void 0);
1170
1173
  return MenuItem;
1171
1174
  }(ChildProperty));
1172
1175
  /**
@@ -1896,7 +1899,10 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1896
1899
  var data = {
1897
1900
  text: item[this.getField('text')].toString(), iconCss: ICONS + ' e-previous'
1898
1901
  };
1899
- var hdata = new MenuItem(this.items[0], 'items', data, true);
1902
+ if (this.template) {
1903
+ item.iconCss = (item.iconCss || '') + ICONS + ' e-previous';
1904
+ }
1905
+ var hdata = new MenuItem(this.items[0], 'items', this.template ? item : data, true);
1900
1906
  var hli = this.createItems([hdata]).children[0];
1901
1907
  hli.classList.add(HEADER);
1902
1908
  this.uList.insertBefore(hli, this.uList.children[0]);
@@ -2145,6 +2151,9 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2145
2151
  timingFunction: _this.animationSettings.easing
2146
2152
  } : null;
2147
2153
  _this.popupObj.show(animationOptions, _this.lItem);
2154
+ if (Browser.isDevice) {
2155
+ _this.popupWrapper.style.left = _this.left + 'px';
2156
+ }
2148
2157
  }
2149
2158
  }
2150
2159
  else {
@@ -2285,8 +2294,34 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2285
2294
  }
2286
2295
  }
2287
2296
  this.toggleVisiblity(ul, false);
2288
- ul.style.top = top + px;
2289
- ul.style.left = left + px;
2297
+ var wrapper = closest(this.element, '.e-' + this.getModuleName() + '-wrapper');
2298
+ if (!this.isMenu && this.enableScrolling && ul && wrapper && wrapper.offsetHeight > 0) {
2299
+ var menuVScroll = closest(ul, '.e-menu-vscroll');
2300
+ ul.style.display = 'block';
2301
+ if (menuVScroll) {
2302
+ destroyScroll(getInstance(menuVScroll, VScroll), menuVScroll);
2303
+ }
2304
+ var cmenuWidth = Math.ceil(this.getMenuWidth(ul, ul.offsetWidth, this.enableRtl));
2305
+ var cmenu = addScrolling(this.createElement, wrapper, ul, 'vscroll', this.enableRtl, wrapper.offsetHeight);
2306
+ Object.assign(cmenu.style, {
2307
+ top: top + "px",
2308
+ left: left + "px",
2309
+ width: cmenuWidth + "px",
2310
+ position: 'absolute',
2311
+ display: 'none'
2312
+ });
2313
+ }
2314
+ else {
2315
+ ul.style.top = top + px;
2316
+ ul.style.left = left + px;
2317
+ }
2318
+ };
2319
+ MenuBase.prototype.getMenuWidth = function (cmenu, width, isRtl) {
2320
+ var caretIcon = cmenu.getElementsByClassName(CARET)[0];
2321
+ if (caretIcon) {
2322
+ width += parseInt(getComputedStyle(caretIcon)[isRtl ? 'marginRight' : 'marginLeft'], 10);
2323
+ }
2324
+ return width < 120 ? 120 : width;
2290
2325
  };
2291
2326
  MenuBase.prototype.toggleVisiblity = function (ul, isVisible) {
2292
2327
  if (isVisible === void 0) { isVisible = true; }
@@ -2312,15 +2347,24 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2312
2347
  args.curData.htmlAttributes = {};
2313
2348
  }
2314
2349
  if (Browser.isIE) {
2315
- args.curData.htmlAttributes.role = 'menuitem';
2316
- args.curData.htmlAttributes.tabindex = '-1';
2350
+ if (!args.curData.htmlAttributes.role) {
2351
+ args.curData.htmlAttributes.role = 'menuitem';
2352
+ }
2353
+ if (!args.curData.htmlAttributes.tabindex) {
2354
+ args.curData.htmlAttributes.tabindex = '-1';
2355
+ }
2317
2356
  }
2318
2357
  else {
2319
- Object.assign(args.curData.htmlAttributes, { role: 'menuitem', tabindex: '-1' });
2358
+ Object.assign(args.curData.htmlAttributes, {
2359
+ role: args.curData.htmlAttributes.role || 'menuitem',
2360
+ tabindex: args.curData.htmlAttributes.tabindex || '-1'
2361
+ });
2320
2362
  }
2321
2363
  if (_this.isMenu && !args.curData[_this.getField('separator', level)]) {
2322
- args.curData.htmlAttributes['aria-label'] = args.curData[args.fields.text] ?
2323
- args.curData[args.fields.text] : args.curData[args.fields.id];
2364
+ if (!args.curData.htmlAttributes['aria-label']) {
2365
+ args.curData.htmlAttributes['aria-label'] = args.curData[args.fields.text] ?
2366
+ args.curData[args.fields.text] : args.curData[args.fields.id];
2367
+ }
2324
2368
  }
2325
2369
  if (args.curData[args.fields[fields.iconCss]] === '') {
2326
2370
  args.curData[args.fields[fields.iconCss]] = null;
@@ -2329,7 +2373,9 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2329
2373
  itemCreated: function (args) {
2330
2374
  if (args.curData[_this.getField('separator', level)]) {
2331
2375
  args.item.classList.add(SEPARATOR);
2332
- args.item.setAttribute('role', 'separator');
2376
+ if (!args.curData.htmlAttributes.role) {
2377
+ args.item.setAttribute('role', 'separator');
2378
+ }
2333
2379
  }
2334
2380
  if (showIcon && !args.curData[args.fields.iconCss]
2335
2381
  && !args.curData[_this.getField('separator', level)]) {
@@ -2579,9 +2625,10 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2579
2625
  }
2580
2626
  }
2581
2627
  else {
2582
- if (this.isMenu && trgt.tagName === 'DIV' && this.navIdx.length && closest(trgt, '.e-menu-vscroll')) {
2583
- var popupEle = closest(trgt, '.' + POPUP);
2584
- var cIdx = Array.prototype.indexOf.call(this.getPopups(), popupEle) + 1;
2628
+ if (trgt.tagName === 'DIV' && closest(trgt, '.e-menu-vscroll') && (this.navIdx.length || !this.isMenu && this.enableScrolling && this.navIdx.length === 0)) {
2629
+ var popupEle = this.isMenu ? closest(trgt, '.' + POPUP) : closest(trgt, '.e-menu-vscroll');
2630
+ var cIdx = this.isMenu ? Array.prototype.indexOf.call(this.getPopups(), popupEle) + 1
2631
+ : this.getIdx(wrapper, select('ul.e-menu-parent', popupEle));
2585
2632
  if (cIdx < this.navIdx.length) {
2586
2633
  this.closeMenu(cIdx + 1, e);
2587
2634
  if (popupEle) {
@@ -2730,7 +2777,9 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2730
2777
  };
2731
2778
  MenuBase.prototype.getIdx = function (ul, li, skipHdr) {
2732
2779
  if (skipHdr === void 0) { skipHdr = true; }
2733
- var idx = Array.prototype.indexOf.call(ul.children, li);
2780
+ var ulElem = !this.isMenu && this.enableScrolling && select('.e-menu-vscroll', ul)
2781
+ ? selectAll('.e-menu-parent', ul) : Array.from(ul.children);
2782
+ var idx = Array.prototype.indexOf.call(ulElem, li);
2734
2783
  if (skipHdr && ul.children[0].classList.contains(HEADER)) {
2735
2784
  idx--;
2736
2785
  }
@@ -2814,7 +2863,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2814
2863
  }
2815
2864
  else {
2816
2865
  var ul_3 = wrapper.children[0];
2817
- if (this_1.element.classList.contains('e-vertical')) {
2866
+ if (this_1.element.classList.contains('e-vertical') || !this_1.isMenu) {
2818
2867
  destroyScroll(getInstance(ul_3, VScroll), ul_3);
2819
2868
  }
2820
2869
  else {
@@ -2985,6 +3034,8 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2985
3034
  if (isMenuOpen === void 0) { isMenuOpen = true; }
2986
3035
  var pUlHeight;
2987
3036
  var pElement;
3037
+ var animateElement = (this.enableScrolling && !this.isMenu && closest(ul, '.e-menu-vscroll'))
3038
+ ? closest(ul, '.e-menu-vscroll') : ul;
2988
3039
  if (this.animationSettings.effect === 'None' || !isMenuOpen) {
2989
3040
  if (this.hamburgerMode && ul) {
2990
3041
  ul.style.top = '0px';
@@ -2993,7 +3044,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2993
3044
  this.end(ul, isMenuOpen);
2994
3045
  }
2995
3046
  else {
2996
- this.animation.animate(ul, {
3047
+ this.animation.animate(animateElement, {
2997
3048
  name: this.animationSettings.effect,
2998
3049
  duration: this.animationSettings.duration,
2999
3050
  timingFunction: this.animationSettings.easing,
@@ -3011,7 +3062,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
3011
3062
  }
3012
3063
  else {
3013
3064
  options.element.style.display = 'block';
3014
- options.element.style.maxHeight = options.element.getBoundingClientRect().height + 'px';
3065
+ options.element.style.maxHeight = _this.isMenu ? options.element.getBoundingClientRect().height + 'px' : options.element.scrollHeight + 'px';
3015
3066
  }
3016
3067
  },
3017
3068
  progress: function (options) {
@@ -3048,11 +3099,15 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
3048
3099
  }
3049
3100
  };
3050
3101
  MenuBase.prototype.end = function (ul, isMenuOpen) {
3051
- if (isMenuOpen && (this.isMenu || (!this.isMenu && this.isContextMenuClosed))) {
3052
- if (this.isMenu || !Browser.isDevice) {
3102
+ if (isMenuOpen && this.isContextMenuClosed) {
3103
+ if (this.isMenu || !Browser.isDevice || (!this.isMenu && this.isAnimationNone && Browser.isDevice)) {
3053
3104
  ul.style.display = 'block';
3054
3105
  }
3055
3106
  ul.style.maxHeight = '';
3107
+ var scrollMenu = this.enableScrolling && !this.isMenu ? closest(ul, '.e-menu-vscroll') : null;
3108
+ if (scrollMenu) {
3109
+ scrollMenu.style.display = 'block';
3110
+ }
3056
3111
  this.triggerOpen(ul);
3057
3112
  if (ul.querySelector('.' + FOCUSED)) {
3058
3113
  ul.querySelector('.' + FOCUSED).focus();
@@ -3080,6 +3135,10 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
3080
3135
  }
3081
3136
  }
3082
3137
  else {
3138
+ var scrollMenu = this.enableScrolling && !this.isMenu ? closest(ul, '.e-menu-vscroll') : null;
3139
+ if (scrollMenu) {
3140
+ destroyScroll(getInstance(scrollMenu, VScroll), scrollMenu);
3141
+ }
3083
3142
  if (ul === this.element) {
3084
3143
  var fli = this.getLIByClass(this.element, FOCUSED);
3085
3144
  if (fli) {
@@ -3123,7 +3182,9 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
3123
3182
  level = isCallBack ? level + 1 : 0;
3124
3183
  for (var i = 0, len = items.length; i < len; i++) {
3125
3184
  item = items[i];
3126
- if ((isUniqueId ? item[this.getField('itemId', level)] : item[this.getField('text', level)]) === data) {
3185
+ var currentField = isUniqueId ? item[this.getField('itemId', level)] : item[this.getField('text', level)];
3186
+ var itemId = (item.htmlAttributes && 'id' in item.htmlAttributes) ? item.htmlAttributes.id : currentField;
3187
+ if (itemId === data) {
3127
3188
  nIndex.push(i);
3128
3189
  break;
3129
3190
  }
@@ -7311,6 +7372,7 @@ var ContextMenu = /** @__PURE__ @class */ (function (_super) {
7311
7372
  _super.prototype.preRender.call(this);
7312
7373
  };
7313
7374
  ContextMenu.prototype.initialize = function () {
7375
+ this.template = this.itemTemplate ? this.itemTemplate : null;
7314
7376
  _super.prototype.initialize.call(this);
7315
7377
  attributes(this.element, { 'role': 'menubar', 'tabindex': '0' });
7316
7378
  this.element.style.zIndex = getZindexPartial(this.element).toString();
@@ -7357,6 +7419,9 @@ var ContextMenu = /** @__PURE__ @class */ (function (_super) {
7357
7419
  this.unWireEvents(oldProp.target);
7358
7420
  this.wireEvents();
7359
7421
  break;
7422
+ case 'itemTemplate':
7423
+ this.itemTemplate = newProp.itemTemplate;
7424
+ this.refresh();
7360
7425
  }
7361
7426
  }
7362
7427
  };
@@ -7378,6 +7443,12 @@ var ContextMenu = /** @__PURE__ @class */ (function (_super) {
7378
7443
  __decorate$5([
7379
7444
  Collection([], MenuItem)
7380
7445
  ], ContextMenu.prototype, "items", void 0);
7446
+ __decorate$5([
7447
+ Property(null)
7448
+ ], ContextMenu.prototype, "itemTemplate", void 0);
7449
+ __decorate$5([
7450
+ Property(false)
7451
+ ], ContextMenu.prototype, "enableScrolling", void 0);
7381
7452
  ContextMenu = __decorate$5([
7382
7453
  NotifyPropertyChanges
7383
7454
  ], ContextMenu);
@@ -7592,6 +7663,10 @@ var Menu = /** @__PURE__ @class */ (function (_super) {
7592
7663
  }
7593
7664
  }
7594
7665
  break;
7666
+ case 'template':
7667
+ this.template = newProp.template;
7668
+ this.refresh();
7669
+ break;
7595
7670
  }
7596
7671
  }
7597
7672
  _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
@@ -8107,6 +8182,17 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8107
8182
  }
8108
8183
  }
8109
8184
  };
8185
+ Tab.prototype.createContentElement = function (index) {
8186
+ var contentElement = this.createElement('div', {
8187
+ id: CLS_CONTENT$1 + this.tabId + '_' + index, className: CLS_ITEM$2,
8188
+ attrs: { 'role': 'tabpanel', 'aria-labelledby': CLS_ITEM$2 + this.tabId + '_' + index }
8189
+ });
8190
+ if (['Dynamic', 'Demand'].indexOf(this.loadOn) !== -1 ||
8191
+ (this.loadOn === 'Init' && index === Number(this.extIndex(this.itemIndexArray[0])))) {
8192
+ addClass([contentElement], CLS_ACTIVE$1);
8193
+ }
8194
+ return contentElement;
8195
+ };
8110
8196
  Tab.prototype.renderContent = function () {
8111
8197
  this.cntEle = select('.' + CLS_CONTENT$1, this.element);
8112
8198
  var hdrItem = selectAll('.' + CLS_TB_ITEM, this.element);
@@ -8121,11 +8207,26 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8121
8207
  }
8122
8208
  }
8123
8209
  }
8210
+ else {
8211
+ if (selectAll('.' + CLS_TB_ITEM, this.element).length > 0) {
8212
+ if (this.loadOn === 'Init') {
8213
+ for (var i = 0; i < this.itemIndexArray.length; i++) {
8214
+ if (this.itemIndexArray[i]) {
8215
+ this.cntEle.appendChild(this.createContentElement(Number(this.extIndex(this.itemIndexArray[i]))));
8216
+ }
8217
+ }
8218
+ }
8219
+ else if (this.loadOn === 'Dynamic') {
8220
+ this.cntEle.appendChild(this.createContentElement(this.selectedItem > 0 ?
8221
+ this.selectedItem : Number(this.extIndex(this.itemIndexArray[0]))));
8222
+ }
8223
+ }
8224
+ }
8124
8225
  };
8125
8226
  Tab.prototype.reRenderItems = function () {
8126
8227
  this.renderContainer();
8127
8228
  if (!isNullOrUndefined(this.cntEle)) {
8128
- this.touchModule = new Touch(this.cntEle, { swipe: this.swipeHandler.bind(this) });
8229
+ this.bindSwipeEvents();
8129
8230
  }
8130
8231
  };
8131
8232
  Tab.prototype.parseObject = function (items, index) {
@@ -8627,6 +8728,27 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8627
8728
  }
8628
8729
  }
8629
8730
  };
8731
+ Tab.prototype.loadContentInitMode = function (ele) {
8732
+ if (!ele) {
8733
+ return;
8734
+ }
8735
+ if (this.loadOn === 'Init') {
8736
+ for (var i = 0; i < this.items.length; i++) {
8737
+ if (this.cntEle.children.item(i)) {
8738
+ this.getContent(this.cntEle.children.item(i), this.items[i].content, 'render', i);
8739
+ }
8740
+ }
8741
+ }
8742
+ if (this.prevIndex !== this.selectedItem) {
8743
+ ele.classList.remove(CLS_ACTIVE$1);
8744
+ }
8745
+ };
8746
+ Tab.prototype.loadContentElement = function () {
8747
+ if (!this.isTemplate) {
8748
+ var ele = this.cntEle.children.item(0);
8749
+ this.loadContentInitMode(ele);
8750
+ }
8751
+ };
8630
8752
  Tab.prototype.setContentHeight = function (val) {
8631
8753
  if (this.element.classList.contains(CLS_FILL)) {
8632
8754
  removeClass([this.element], [CLS_FILL]);
@@ -8636,6 +8758,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8636
8758
  }
8637
8759
  var hdrEle = this.getTabHeader();
8638
8760
  if (this.heightAdjustMode === 'None') {
8761
+ this.loadContentElement();
8639
8762
  if (this.height === 'auto') {
8640
8763
  return;
8641
8764
  }
@@ -8648,6 +8771,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8648
8771
  else if (this.heightAdjustMode === 'Fill') {
8649
8772
  addClass([this.element], [CLS_FILL]);
8650
8773
  setStyleAttribute(this.element, { 'height': '100%' });
8774
+ this.loadContentElement();
8651
8775
  this.cntEle.style.height = 'calc(100% - ' + this.hdrEle.offsetHeight + 'px)';
8652
8776
  }
8653
8777
  else if (this.heightAdjustMode === 'Auto') {
@@ -8662,11 +8786,8 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8662
8786
  }
8663
8787
  else {
8664
8788
  this.cntEle = select('.' + CLS_CONTENT$1, this.element);
8665
- if (val === true) {
8666
- this.cntEle.appendChild(this.createElement('div', {
8667
- id: (CLS_CONTENT$1 + this.tabId + '_' + 0), className: CLS_ITEM$2 + ' ' + CLS_ACTIVE$1,
8668
- attrs: { 'role': 'tabpanel', 'aria-labelledby': CLS_ITEM$2 + this.tabId + '_' + 0 }
8669
- }));
8789
+ if (val === true && this.loadOn === 'Demand') {
8790
+ this.cntEle.appendChild(this.createContentElement(Number(this.extIndex(this.itemIndexArray[0]))));
8670
8791
  }
8671
8792
  var ele = this.cntEle.children.item(0);
8672
8793
  for (var i = 0; i < this.items.length; i++) {
@@ -8680,14 +8801,15 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8680
8801
  this.clearTemplate(['content']);
8681
8802
  }
8682
8803
  this.templateEle = [];
8683
- this.getContent(ele, this.items[0].content, 'render', 0);
8684
- if (this.prevIndex !== this.selectedItem) {
8685
- ele.classList.remove(CLS_ACTIVE$1);
8804
+ if (this.loadOn === 'Demand') {
8805
+ this.getContent(ele, this.items[0].content, 'render', 0);
8686
8806
  }
8807
+ this.loadContentInitMode(ele);
8687
8808
  }
8688
8809
  setStyleAttribute(this.cntEle, { 'height': this.maxHeight + 'px' });
8689
8810
  }
8690
8811
  else {
8812
+ this.loadContentElement();
8691
8813
  setStyleAttribute(this.cntEle, { 'height': 'auto' });
8692
8814
  }
8693
8815
  };
@@ -8771,7 +8893,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8771
8893
  return;
8772
8894
  }
8773
8895
  if (!this.isTemplate) {
8774
- attributes(trg.firstElementChild, { 'aria-controls': CLS_CONTENT$1 + this.tabId + '_' + value });
8896
+ attributes(trg.firstElementChild, { 'aria-controls': CLS_CONTENT$1 + this.tabId + '_' + this.extIndex(trg.id) });
8775
8897
  }
8776
8898
  var id = trg.id;
8777
8899
  this.removeActiveClass();
@@ -8792,6 +8914,9 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8792
8914
  }
8793
8915
  else {
8794
8916
  this.cntEle = select('.' + CLS_TAB + ' > .' + CLS_CONTENT$1, this.element);
8917
+ while (this.loadOn === 'Dynamic' && this.cntEle.firstElementChild) {
8918
+ this.cntEle.removeChild(this.cntEle.firstElementChild);
8919
+ }
8795
8920
  var item = this.getTrgContent(this.cntEle, this.extIndex(id));
8796
8921
  if (isNullOrUndefined(item)) {
8797
8922
  this.cntEle.appendChild(this.createElement('div', {
@@ -8867,13 +8992,18 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8867
8992
  }
8868
8993
  }
8869
8994
  };
8995
+ Tab.prototype.bindSwipeEvents = function () {
8996
+ if (this.swipeMode !== 'None') {
8997
+ this.touchModule = new Touch(this.cntEle, { swipe: this.swipeHandler.bind(this) });
8998
+ }
8999
+ };
8870
9000
  Tab.prototype.wireEvents = function () {
8871
9001
  this.bindDraggable();
8872
9002
  window.addEventListener('resize', this.resizeContext);
8873
9003
  EventHandler.add(this.element, 'mouseover', this.hoverHandler, this);
8874
9004
  EventHandler.add(this.element, 'keydown', this.spaceKeyDown, this);
8875
9005
  if (!isNullOrUndefined(this.cntEle)) {
8876
- this.touchModule = new Touch(this.cntEle, { swipe: this.swipeHandler.bind(this) });
9006
+ this.bindSwipeEvents();
8877
9007
  }
8878
9008
  this.keyModule = new KeyboardEvents(this.element, { keyAction: this.keyHandler.bind(this), keyConfigs: this.keyConfigs });
8879
9009
  this.tabKeyModule = new KeyboardEvents(this.element, {
@@ -8918,7 +9048,9 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8918
9048
  }
8919
9049
  };
8920
9050
  Tab.prototype.swipeHandler = function (e) {
8921
- if (e.velocity < 3 && isNullOrUndefined(e.originalEvent.changedTouches)) {
9051
+ if ((e.velocity < 3 && isNullOrUndefined(e.originalEvent.changedTouches)) ||
9052
+ (this.swipeMode === 'Touch' && ((e.originalEvent.type === 'mouseup') || e.originalEvent.type === 'mouseleave')) ||
9053
+ (this.swipeMode === 'Mouse' && e.originalEvent.type === 'touchend') || (this.swipeMode === 'None')) {
8922
9054
  return;
8923
9055
  }
8924
9056
  if (this.isNested) {
@@ -9396,7 +9528,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9396
9528
  else {
9397
9529
  if (_this.items.length > 0 && _this.draggingItems.length > 0) {
9398
9530
  _this.items = _this.draggingItems;
9399
- _this.selectedItem = _this.droppedIndex;
9531
+ _this.selectedItem = isNullOrUndefined(_this.droppedIndex) ? _this.getEleIndex(_this.dragItem) : _this.droppedIndex;
9400
9532
  _this.refresh();
9401
9533
  }
9402
9534
  else {
@@ -9515,7 +9647,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9515
9647
  _this.items.splice((index + i_1), 0, item);
9516
9648
  i_1++;
9517
9649
  }
9518
- if (_this.isTemplate && !isNullOrUndefined(item.header) && !isNullOrUndefined(item.header.text)) {
9650
+ if (!isNullOrUndefined(item.header) && !isNullOrUndefined(item.header.text) && (_this.isTemplate || _this.loadOn === 'Init')) {
9519
9651
  var no = lastEleIndex + place;
9520
9652
  var ele = _this.createElement('div', {
9521
9653
  id: CLS_CONTENT$1 + _this.tabId + '_' + no, className: CLS_ITEM$2,
@@ -9906,6 +10038,13 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9906
10038
  case 'allowDragAndDrop':
9907
10039
  this.bindDraggable();
9908
10040
  break;
10041
+ case 'swipeMode':
10042
+ if (this.touchModule) {
10043
+ this.touchModule.destroy();
10044
+ this.touchModule = null;
10045
+ }
10046
+ this.bindSwipeEvents();
10047
+ break;
9909
10048
  case 'dragArea':
9910
10049
  if (this.allowDragAndDrop) {
9911
10050
  this.draggableItems.forEach(function (item) {
@@ -10057,6 +10196,9 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
10057
10196
  __decorate$7([
10058
10197
  Property('100%')
10059
10198
  ], Tab.prototype, "width", void 0);
10199
+ __decorate$7([
10200
+ Property('Both')
10201
+ ], Tab.prototype, "swipeMode", void 0);
10060
10202
  __decorate$7([
10061
10203
  Property('auto')
10062
10204
  ], Tab.prototype, "height", void 0);
@@ -10076,7 +10218,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
10076
10218
  Property('Scrollable')
10077
10219
  ], Tab.prototype, "overflowMode", void 0);
10078
10220
  __decorate$7([
10079
- Property('Dynamic')
10221
+ Property('Demand')
10080
10222
  ], Tab.prototype, "loadOn", void 0);
10081
10223
  __decorate$7([
10082
10224
  Property(false)
@@ -10350,6 +10492,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
10350
10492
  _this.mouseDownStatus = false;
10351
10493
  _this.isDropIn = false;
10352
10494
  _this.OldCheckedData = [];
10495
+ _this.isHiddenItem = false;
10353
10496
  return _this;
10354
10497
  }
10355
10498
  TreeView_1 = TreeView;
@@ -10846,10 +10989,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
10846
10989
  this.changeState(node, 'uncheck', null, true, true);
10847
10990
  }
10848
10991
  }
10849
- var parentElement = closest(node, '.' + PARENTITEM);
10850
- if (!isNullOrUndefined(parentElement)) {
10851
- this.ensureParentCheckState(closest(parentElement, '.' + LISTITEM));
10852
- }
10853
10992
  }
10854
10993
  };
10855
10994
  /**
@@ -11968,6 +12107,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11968
12107
  this.expandArgs.isInteracted = this.isInteracted;
11969
12108
  this.trigger('nodeExpanded', this.expandArgs);
11970
12109
  }
12110
+ if (this.isHiddenItem) {
12111
+ this.collapseAll([this.getNodeData(currLi).id]);
12112
+ }
11971
12113
  };
11972
12114
  TreeView.prototype.addExpand = function (liEle) {
11973
12115
  liEle.setAttribute('aria-expanded', 'true');
@@ -12500,7 +12642,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
12500
12642
  this.expandOnType = (this.expandOn === 'Auto') ? (Browser.isDevice ? 'Click' : 'DblClick') : this.expandOn;
12501
12643
  };
12502
12644
  TreeView.prototype.expandHandler = function (e) {
12503
- var target = e.originalEvent.target;
12645
+ var target = Browser.isDevice && e.originalEvent.changedTouches && !Browser.isIos
12646
+ ? document.elementFromPoint(e.originalEvent.changedTouches[0].clientX, e.originalEvent.changedTouches[0].clientY)
12647
+ : e.originalEvent.target;
12504
12648
  if (!target || target.classList.contains(INPUT) || target.classList.contains(ROOT) ||
12505
12649
  target.classList.contains(PARENTITEM) || target.classList.contains(LISTITEM) ||
12506
12650
  target.classList.contains(ICON) || this.showCheckBox && closest(target, '.' + CHECKBOXWRAP)) {
@@ -14849,15 +14993,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
14849
14993
  }
14850
14994
  }
14851
14995
  };
14852
- /**
14853
- * Checks whether the checkedNodes entered are valid and sets the valid checkedNodes while changing via setmodel(for hierarchical DS)
14854
- *
14855
- * @param {Object[]} childItems - The child items to check.
14856
- * @param {string} node - The node to set the check state for.
14857
- * @param {Object} [treeData] - The optional tree data.
14858
- * @returns {void}
14859
- * @private
14860
- */
14861
14996
  /**
14862
14997
  * Checks whether the checkedNodes entered are valid and sets the valid checkedNodes while changing via setmodel(for hierarchical DS)
14863
14998
  *
@@ -15340,9 +15475,11 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
15340
15475
  var pid = getValue(this.fields.parentID, nodes[parseInt(i.toString(), 10)]);
15341
15476
  dropLi = pid ? this.getElement(pid.toString()) : pid;
15342
15477
  if (!isNullOrUndefined(pid) && isNullOrUndefined(dropLi)) {
15478
+ this.isHiddenItem = true;
15343
15479
  this.preventExpand = false;
15344
15480
  this.ensureVisible(pid);
15345
15481
  this.preventExpand = preventTargetExpand;
15482
+ this.isHiddenItem = false;
15346
15483
  dropLi = this.getElement(pid.toString());
15347
15484
  }
15348
15485
  this.addGivenNodes([nodes[parseInt(i.toString(), 10)]], dropLi, index);
@@ -15451,7 +15588,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
15451
15588
  else if (this.dataType === 2) {
15452
15589
  parentsId = this.getHierarchicalParentId(node, this.treeData, parentsId);
15453
15590
  }
15454
- this.expandAll(parentsId.reverse());
15591
+ this.expandAll(parentsId.reverse(), null, null, this.isHiddenItem);
15455
15592
  var liEle = this.getElement(node);
15456
15593
  if (!isNullOrUndefined(liEle)) {
15457
15594
  if (typeof node == 'object') {
@@ -15483,7 +15620,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
15483
15620
  }
15484
15621
  else {
15485
15622
  this.expandAllNodes(excludeHiddenNodes);
15486
- if (!this.loadOnDemand) {
15623
+ if (!this.loadOnDemand || this.element.classList.contains('e-filtering')) {
15487
15624
  this.updateAttributes(this.element);
15488
15625
  this.updateList();
15489
15626
  }
@@ -15551,10 +15688,16 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
15551
15688
  * @returns {void}
15552
15689
  */
15553
15690
  TreeView.prototype.moveNodes = function (sourceNodes, target, index, preventTargetExpand) {
15691
+ if (isNullOrUndefined(sourceNodes) || sourceNodes.length === 0) {
15692
+ return;
15693
+ }
15554
15694
  var dropLi = this.getElement(target);
15555
15695
  var nodeData = [];
15556
15696
  if (isNullOrUndefined(dropLi)) {
15557
- return;
15697
+ this.isHiddenItem = true;
15698
+ this.ensureVisible(target);
15699
+ this.isHiddenItem = false;
15700
+ dropLi = this.getElement(target);
15558
15701
  }
15559
15702
  for (var i = 0; i < sourceNodes.length; i++) {
15560
15703
  var dragLi = this.getElement(sourceNodes[parseInt(i.toString(), 10)]);
@@ -17620,6 +17763,15 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
17620
17763
  this.reRenderSlides();
17621
17764
  }
17622
17765
  break;
17766
+ case 'allowKeyboardInteraction':
17767
+ if (this.keyModule) {
17768
+ this.keyModule.destroy();
17769
+ this.keyModule = null;
17770
+ }
17771
+ if (newProp.allowKeyboardInteraction) {
17772
+ this.renderKeyboardActions();
17773
+ }
17774
+ break;
17623
17775
  case 'enableRtl':
17624
17776
  rtlElement = [].slice.call(this.element.querySelectorAll("." + CLS_PREV_BUTTON + ",\n ." + CLS_NEXT_BUTTON + ", ." + CLS_PLAY_BUTTON));
17625
17777
  rtlElement.push(this.element);
@@ -17991,6 +18143,9 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
17991
18143
  append(template, indicatorBar);
17992
18144
  };
17993
18145
  Carousel.prototype.renderKeyboardActions = function () {
18146
+ if (!this.allowKeyboardInteraction) {
18147
+ return;
18148
+ }
17994
18149
  this.keyModule = new KeyboardEvents(this.element, { keyAction: this.keyHandler.bind(this), keyConfigs: this.keyConfigs });
17995
18150
  };
17996
18151
  Carousel.prototype.renderTouchActions = function () {
@@ -18314,6 +18469,9 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
18314
18469
  }
18315
18470
  };
18316
18471
  Carousel.prototype.keyHandler = function (e) {
18472
+ if (!this.allowKeyboardInteraction) {
18473
+ return;
18474
+ }
18317
18475
  var direction;
18318
18476
  var slideIndex;
18319
18477
  var isSlideTransition = false;
@@ -18462,6 +18620,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
18462
18620
  if (!this.timeStampStart) {
18463
18621
  this.timeStampStart = Date.now();
18464
18622
  }
18623
+ e.preventDefault();
18465
18624
  this.isSwipe = false;
18466
18625
  this.itemsContainer.classList.add('e-swipe-start');
18467
18626
  this.prevPageX = e.touches ? e.touches[0].pageX : e.pageX;
@@ -18471,6 +18630,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
18471
18630
  if (!this.itemsContainer.classList.contains('e-swipe-start')) {
18472
18631
  return;
18473
18632
  }
18633
+ this.isSwipe = true;
18474
18634
  e.preventDefault();
18475
18635
  var pageX = e.touches ? e.touches[0].pageX : e.pageX;
18476
18636
  var positionDiff = this.prevPageX - (pageX);
@@ -18483,7 +18643,6 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
18483
18643
  this.itemsContainer.style.transform = "translateX(" + (this.initialTranslate + (this.enableRtl ? positionDiff : -positionDiff)) + "px)";
18484
18644
  };
18485
18645
  Carousel.prototype.swipStop = function () {
18486
- this.isSwipe = true;
18487
18646
  var time = Date.now() - this.timeStampStart;
18488
18647
  var distanceX = this.getTranslateValue(this.itemsContainer) - this.initialTranslate;
18489
18648
  distanceX = distanceX < 0 ? distanceX * -1 : distanceX;
@@ -18669,8 +18828,10 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
18669
18828
  this.touchModule.destroy();
18670
18829
  this.touchModule = null;
18671
18830
  }
18672
- this.keyModule.destroy();
18673
- this.keyModule = null;
18831
+ if (this.keyModule) {
18832
+ this.keyModule.destroy();
18833
+ this.keyModule = null;
18834
+ }
18674
18835
  this.resetSlideInterval();
18675
18836
  this.destroyButtons();
18676
18837
  this.unWireEvents();
@@ -18734,6 +18895,9 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
18734
18895
  __decorate$b([
18735
18896
  Property(true)
18736
18897
  ], Carousel.prototype, "enableTouchSwipe", void 0);
18898
+ __decorate$b([
18899
+ Property(true)
18900
+ ], Carousel.prototype, "allowKeyboardInteraction", void 0);
18737
18901
  __decorate$b([
18738
18902
  Property(true)
18739
18903
  ], Carousel.prototype, "showIndicators", void 0);
@@ -19003,6 +19167,10 @@ var __decorate$d = (undefined && undefined.__decorate) || function (decorators,
19003
19167
  return c > 3 && r && Object.defineProperty(target, key, r), r;
19004
19168
  };
19005
19169
  var PROGRESSVALUE = '--progress-value';
19170
+ var PROGRESSPOS = '--progress-position';
19171
+ var VERTICALSTEP = 'e-vertical';
19172
+ var HORIZSTEP = 'e-horizontal';
19173
+ var ITEMLIST = 'e-stepper-steps';
19006
19174
  /**
19007
19175
  * Defines the status of the step.
19008
19176
  */
@@ -19121,8 +19289,8 @@ var StepperBase = /** @__PURE__ @class */ (function (_super) {
19121
19289
  StepperBase.prototype.render = function () {
19122
19290
  };
19123
19291
  StepperBase.prototype.updateOrientaion = function (wrapper) {
19124
- if (wrapper.classList.contains('e-horizontal') || wrapper.classList.contains('e-vertical')) {
19125
- wrapper.classList.remove('e-horizontal', 'e-vertical');
19292
+ if (wrapper.classList.contains(HORIZSTEP) || wrapper.classList.contains(VERTICALSTEP)) {
19293
+ wrapper.classList.remove(HORIZSTEP, VERTICALSTEP);
19126
19294
  }
19127
19295
  if (!(isNullOrUndefined(this.orientation))) {
19128
19296
  wrapper.classList.add('e-' + this.orientation.toLocaleLowerCase());
@@ -19131,23 +19299,23 @@ var StepperBase = /** @__PURE__ @class */ (function (_super) {
19131
19299
  StepperBase.prototype.renderProgressBar = function (wrapper) {
19132
19300
  this.progressStep = this.createElement('div', { className: 'e-stepper-progressbar' });
19133
19301
  this.progressbar = this.createElement('div', { className: 'e-progressbar-value' });
19302
+ var beforeLabel = (wrapper.querySelector('li').querySelector('.e-step-label-container'));
19134
19303
  this.progressStep.appendChild(this.progressbar);
19135
19304
  wrapper.prepend(this.progressStep);
19136
19305
  this.progressbar.style.setProperty(PROGRESSVALUE, (0) + '%');
19137
- var beforeLabel = (wrapper.querySelector('li').querySelector('.e-step-label-container'));
19138
- if (wrapper.classList.contains('e-vertical')) {
19306
+ if (wrapper.classList.contains(VERTICALSTEP)) {
19139
19307
  if (wrapper.classList.contains('e-label-bottom') || wrapper.classList.contains('e-label-top')) {
19140
- var stepsContainer = (wrapper.querySelector('.e-stepper-steps'));
19141
- this.progressStep.style.setProperty('--progress-position', (stepsContainer.offsetWidth / 2) + 'px');
19308
+ var stepsContainer = (wrapper.querySelector('.' + ITEMLIST));
19309
+ this.progressStep.style.setProperty(PROGRESSPOS, (stepsContainer.offsetWidth / 2) + 'px');
19142
19310
  }
19143
19311
  else {
19144
- this.progressStep.style.setProperty('--progress-position', ((this.progressBarPosition / 2) - 1) + 'px');
19312
+ this.progressStep.style.setProperty(PROGRESSPOS, ((this.progressBarPosition / 2) - 1) + 'px');
19145
19313
  }
19146
19314
  }
19147
19315
  if (beforeLabel && (beforeLabel.classList.contains('e-label-before'))) {
19148
- this.progressStep.style.setProperty('--progress-position', (((this.progressBarPosition) - 1)) + 5 + 'px');
19316
+ this.progressStep.style.setProperty(PROGRESSPOS, (((this.progressBarPosition) - 1)) + 5 + 'px');
19149
19317
  }
19150
- if (wrapper.classList.contains('e-horizontal')) {
19318
+ if (wrapper.classList.contains(HORIZSTEP)) {
19151
19319
  this.setProgressPosition(wrapper);
19152
19320
  }
19153
19321
  };
@@ -19164,9 +19332,9 @@ var StepperBase = /** @__PURE__ @class */ (function (_super) {
19164
19332
  }
19165
19333
  this.progressStep.style.setProperty('--progress-top-position', topPos + 'px');
19166
19334
  }
19167
- var lastEle = wrapper.querySelector('.e-stepper-steps').lastChild.firstChild;
19335
+ var lastEle = wrapper.querySelector('.' + ITEMLIST).lastChild.firstChild;
19168
19336
  if (wrapper.classList.contains('e-rtl')) {
19169
- var leftPost = ((stepItemEle.offsetLeft + stepItemEle.offsetWidth) - wrapper.querySelector('.e-stepper-steps').offsetWidth);
19337
+ var leftPost = ((stepItemEle.offsetLeft + stepItemEle.offsetWidth) - wrapper.querySelector('.' + ITEMLIST).offsetWidth);
19170
19338
  this.progressStep.style.setProperty('--progress-left-position', Math.abs(leftPost) + 'px');
19171
19339
  this.progressStep.style.setProperty('--progress-bar-width', Math.abs(lastEle.offsetLeft - stepItemEle.offsetLeft) + 'px');
19172
19340
  }
@@ -19227,7 +19395,7 @@ var __decorate$e = (undefined && undefined.__decorate) || function (decorators,
19227
19395
  return c > 3 && r && Object.defineProperty(target, key, r), r;
19228
19396
  };
19229
19397
  var ITEMCONTAINER = 'e-step-container';
19230
- var ITEMLIST = 'e-stepper-steps';
19398
+ var ITEMLIST$1 = 'e-stepper-steps';
19231
19399
  var ICONCSS = 'e-indicator';
19232
19400
  var TEXTCSS = 'e-step-text-container';
19233
19401
  var STEPLABEL = 'e-step-label-container';
@@ -19244,8 +19412,8 @@ var RTL$3 = 'e-rtl';
19244
19412
  var TEMPLATE = 'e-step-template';
19245
19413
  var LABELAFTER = 'e-label-after';
19246
19414
  var LABELBEFORE = 'e-label-before';
19247
- var VERTICALSTEP = 'e-vertical';
19248
- var HORIZSTEP = 'e-horizontal';
19415
+ var VERTICALSTEP$1 = 'e-vertical';
19416
+ var HORIZSTEP$1 = 'e-horizontal';
19249
19417
  var STEPICON = 'e-step-item';
19250
19418
  var STEPTEXT = 'e-step-text';
19251
19419
  var TEXT = 'e-text';
@@ -19381,10 +19549,9 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
19381
19549
  this.updateStepperStatus(true);
19382
19550
  };
19383
19551
  Stepper.prototype.initialize = function () {
19384
- var _this = this;
19385
19552
  this.element.setAttribute('aria-label', this.element.id);
19386
19553
  this.updatePosition();
19387
- this.stepperItemList = this.createElement('ol', { className: ITEMLIST });
19554
+ this.stepperItemList = this.createElement('ol', { className: ITEMLIST$1 });
19388
19555
  this.updateOrientaion(this.element);
19389
19556
  this.updateStepType();
19390
19557
  this.element.appendChild(this.stepperItemList);
@@ -19401,28 +19568,30 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
19401
19568
  this.updateTemplateFunction();
19402
19569
  this.renderItems();
19403
19570
  if (this.steps.length > 0) {
19404
- if (this.steps.length > 1) {
19405
- if (this.isAngular && this.template) {
19406
- setTimeout(function () {
19407
- _this.renderProgressBar(_this.element);
19408
- });
19409
- }
19410
- else {
19411
- this.renderProgressBar(this.element);
19412
- }
19413
- }
19571
+ this.initiateProgressBar();
19414
19572
  this.checkValidStep();
19415
19573
  this.updateAnimation();
19416
19574
  this.updateTooltip();
19417
19575
  this.wireKeyboardEvent();
19418
19576
  }
19419
19577
  };
19578
+ Stepper.prototype.initiateProgressBar = function () {
19579
+ var _this = this;
19580
+ if (this.steps.length > 1) {
19581
+ if (this.isAngular && this.template) {
19582
+ setTimeout(function () { _this.renderProgressBar(_this.element); });
19583
+ }
19584
+ else {
19585
+ this.renderProgressBar(this.element);
19586
+ }
19587
+ }
19588
+ };
19420
19589
  Stepper.prototype.updatePosition = function () {
19421
19590
  this.progressBarPosition = this.beforeLabelWidth = this.textEleWidth = 0;
19422
19591
  };
19423
19592
  Stepper.prototype.renderDefault = function (index) {
19424
- return (!this.steps[parseInt((index).toString(), 10)].iconCss && !this.steps[parseInt((index).toString(), 10)].text &&
19425
- !this.steps[parseInt((index).toString(), 10)].label) ? true : false;
19593
+ var step = this.steps[parseInt(index.toString(), 10)];
19594
+ return !step.iconCss && !step.text && !step.label;
19426
19595
  };
19427
19596
  Stepper.prototype.updateAnimation = function () {
19428
19597
  var progressEle = this.element.querySelector('.e-progressbar-value');
@@ -19446,12 +19615,16 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
19446
19615
  }
19447
19616
  };
19448
19617
  Stepper.prototype.updateStepType = function () {
19449
- if (!(isNullOrUndefined(this.stepType)) && (this.stepType.toLowerCase() === 'indicator' || this.stepType.toLowerCase() === 'label' || this.stepType.toLowerCase() === 'default')) {
19450
- if (this.stepType.toLowerCase() !== 'default') {
19451
- this.element.classList.add('e-step-type-' + this.stepType.toLowerCase());
19452
- }
19453
- if (((this.stepType.toLowerCase() === 'indicator' || 'label') && (this.labelContainer))) {
19454
- this.clearLabelPosition();
19618
+ if (!isNullOrUndefined(this.stepType)) {
19619
+ var stepTypeLower = this.stepType.toLowerCase();
19620
+ var validStepTypes = ['indicator', 'label', 'default'];
19621
+ if (validStepTypes.indexOf(stepTypeLower) !== -1) {
19622
+ if (stepTypeLower !== 'default') {
19623
+ this.element.classList.add('e-step-type-' + stepTypeLower);
19624
+ }
19625
+ if ((stepTypeLower === 'indicator' || stepTypeLower === 'label') && this.labelContainer) {
19626
+ this.clearLabelPosition();
19627
+ }
19455
19628
  }
19456
19629
  }
19457
19630
  };
@@ -19464,7 +19637,7 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
19464
19637
  EventHandler.remove(window, 'click', this.updateStepFocus);
19465
19638
  };
19466
19639
  Stepper.prototype.updateResize = function () {
19467
- if (this.stepperItemList && this.progressbar && this.element.classList.contains(HORIZSTEP)) {
19640
+ if (this.stepperItemList && this.progressbar && this.element.classList.contains(HORIZSTEP$1)) {
19468
19641
  this.setProgressPosition(this.element, true);
19469
19642
  }
19470
19643
  this.navigateToStep(this.activeStep, null, null, false, false);
@@ -19524,23 +19697,28 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
19524
19697
  };
19525
19698
  Stepper.prototype.renderItems = function () {
19526
19699
  var _this = this;
19700
+ var _a;
19701
+ var isHorizontal = this.element.classList.contains(HORIZSTEP$1);
19702
+ var isVertical = this.element.classList.contains(VERTICALSTEP$1);
19703
+ var labelPositionLower = !isNullOrUndefined(this.labelPosition) ? this.labelPosition.toLowerCase() : '';
19527
19704
  for (var index = 0; index < this.steps.length; index++) {
19528
19705
  this.stepperItemContainer = this.createElement('li', { className: ITEMCONTAINER });
19529
- this.stepperItemContainer.classList[(index === 0) ? 'add' : 'remove'](SELECTED$2, INPROGRESS);
19530
- this.stepperItemContainer.classList[(index !== 0) ? 'add' : 'remove'](NOTSTARTED);
19531
- if (this.element.classList.contains(HORIZSTEP)) {
19532
- this.stepperItemContainer.style.setProperty('--max-width', 100 / this.steps.length + '%');
19533
- }
19534
19706
  var stepSpan = this.createElement('span', { className: 'e-step' });
19535
19707
  var item = this.steps[parseInt(index.toString(), 10)];
19536
19708
  var isItemLabel = item.label ? true : false;
19537
19709
  var isItemText = item.text ? true : false;
19710
+ var isIndicator = this.element.classList.contains(STEPINDICATOR);
19711
+ this.stepperItemContainer.classList[(index === 0) ? 'add' : 'remove'](SELECTED$2, INPROGRESS);
19712
+ this.stepperItemContainer.classList[(index !== 0) ? 'add' : 'remove'](NOTSTARTED);
19713
+ if (isHorizontal) {
19714
+ this.stepperItemContainer.style.setProperty('--max-width', 100 / this.steps.length + '%');
19715
+ }
19538
19716
  if (this.renderDefault(index) && (isNullOrUndefined(this.template) || this.template === '')) {
19539
- var isIndicator = (!this.element.classList.contains('e-step-type-default') && this.stepType.toLowerCase() === 'indicator') ? true : false;
19540
- if (isIndicator) {
19717
+ var isIndicator_1 = !this.element.classList.contains('e-step-type-default') && this.stepType.toLowerCase() === 'indicator';
19718
+ if (isIndicator_1) {
19541
19719
  stepSpan.classList.add('e-icons', INDICATORICON);
19542
19720
  }
19543
- if (!isIndicator && item.isValid == null) {
19721
+ if (!isIndicator_1 && item.isValid == null) {
19544
19722
  stepSpan.classList.add('e-step-content');
19545
19723
  stepSpan.innerHTML = (index + 1).toString();
19546
19724
  }
@@ -19552,10 +19730,7 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
19552
19730
  !this.element.classList.contains(LABELINDICATOR)))) {
19553
19731
  if (item.iconCss) {
19554
19732
  var itemIcon = item.iconCss.trim().split(' ');
19555
- stepSpan.classList.add(ICONCSS);
19556
- for (var i = 0; i < itemIcon.length; i++) {
19557
- stepSpan.classList.add(itemIcon[parseInt(i.toString(), 10)]);
19558
- }
19733
+ (_a = stepSpan.classList).add.apply(_a, [ICONCSS].concat(itemIcon));
19559
19734
  this.stepperItemContainer.classList.add(STEPICON);
19560
19735
  }
19561
19736
  else if (!item.iconCss && isItemText && isItemLabel) {
@@ -19564,51 +19739,41 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
19564
19739
  this.stepperItemContainer.classList.add(STEPICON);
19565
19740
  }
19566
19741
  this.stepperItemContainer.appendChild(stepSpan);
19567
- if ((this.element.classList.contains(HORIZSTEP) && (this.labelPosition.toLowerCase() === 'start' || this.labelPosition.toLowerCase() === 'end') && isItemLabel) ||
19568
- (this.element.classList.contains(VERTICALSTEP) && (this.labelPosition.toLowerCase() === 'top' || this.labelPosition.toLowerCase() === 'bottom') && isItemLabel)) {
19569
- this.element.classList.add('e-label-' + this.labelPosition.toLowerCase());
19570
- var textSpan = this.createElement('span', { className: TEXTCSS + ' ' + TEXT });
19571
- textSpan.innerText = item.label;
19572
- this.stepperItemContainer.appendChild(textSpan);
19573
- this.stepperItemContainer.classList.add(STEPTEXT);
19742
+ if (((isHorizontal && (labelPositionLower === 'start' || labelPositionLower === 'end') && isItemLabel) ||
19743
+ (isVertical && (labelPositionLower === 'top' || labelPositionLower === 'bottom') && isItemLabel)) && !isIndicator) {
19744
+ this.element.classList.add('e-label-' + labelPositionLower);
19745
+ this.createTextLabelElement(item.label);
19574
19746
  isRender = false;
19575
19747
  }
19576
19748
  }
19577
- if (isItemText && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender &&
19749
+ if (isItemText && (!item.iconCss || !isIndicator) && isRender &&
19578
19750
  !(item.iconCss && isItemLabel)) {
19579
- if ((!item.iconCss && this.element.classList.contains(STEPINDICATOR)) ||
19751
+ if ((!item.iconCss && isIndicator) ||
19580
19752
  ((!item.iconCss || this.element.classList.contains(LABELINDICATOR)) && !isItemLabel)) {
19581
19753
  if (!item.iconCss && !isItemLabel) {
19582
19754
  this.element.classList.add('e-step-type-indicator');
19583
19755
  }
19584
19756
  this.checkValidState(item, stepSpan);
19585
- isItemLabel = null;
19757
+ isItemLabel = false;
19586
19758
  }
19587
19759
  else {
19588
- var textSpan = this.createElement('span', { className: TEXT });
19589
19760
  if (!isItemLabel) {
19590
- textSpan.innerText = item.text;
19591
- textSpan.classList.add(TEXTCSS);
19592
- this.stepperItemContainer.appendChild(textSpan);
19593
- this.stepperItemContainer.classList.add(STEPTEXT);
19761
+ this.createTextLabelElement(item.text);
19594
19762
  }
19595
19763
  if (isItemLabel && this.element.classList.contains(LABELINDICATOR)) {
19764
+ var textSpan = this.createElement('span', { className: TEXT });
19596
19765
  textSpan.innerText = item.label;
19597
19766
  }
19598
- isItemText = item.label ? false : true;
19767
+ isItemText = isItemLabel ? false : true;
19599
19768
  }
19600
19769
  }
19601
- if (isItemLabel && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender) {
19602
- if (!item.iconCss && !isItemText && this.element.classList.contains(STEPINDICATOR)) {
19770
+ if (isItemLabel && isItemLabel && (!item.iconCss || !isIndicator) && isRender) {
19771
+ if (!item.iconCss && !isItemText && isIndicator) {
19603
19772
  this.checkValidState(item, stepSpan, true);
19604
19773
  }
19605
19774
  else if ((!((this.element.classList.contains(LABELINDICATOR)) && isItemText)) ||
19606
19775
  (this.element.classList.contains(LABELINDICATOR) && isItemLabel)) {
19607
- this.labelContainer = this.createElement('span', { className: STEPLABEL });
19608
- var labelSpan = this.createElement('span', { className: LABEL });
19609
- labelSpan.innerText = item.label;
19610
- this.labelContainer.appendChild(labelSpan);
19611
- this.stepperItemContainer.classList.add(STEPSLABEL);
19776
+ this.createTextLabelElement(item.label, true);
19612
19777
  this.updateLabelPosition();
19613
19778
  if ((!item.iconCss && !isItemText && !this.stepperItemContainer.classList.contains(STEPICON)) ||
19614
19779
  this.element.classList.contains(LABELINDICATOR)) {
@@ -19627,8 +19792,8 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
19627
19792
  var optionalContent = this.l10n.getConstant('optional');
19628
19793
  optionalSpan.innerText = optionalContent;
19629
19794
  if (isItemLabel && (this.labelContainer && ((this.element.classList.contains(LABELAFTER) && !this.stepperItemContainer.classList.contains('e-step-label-only'))
19630
- || (this.element.classList.contains(HORIZSTEP) && this.element.classList.contains(LABELBEFORE) && !this.stepperItemContainer.classList.contains('e-step-label-only'))))
19631
- || (this.element.classList.contains(VERTICALSTEP) && this.element.classList.contains(LABELBEFORE))) {
19795
+ || (isHorizontal && this.element.classList.contains(LABELBEFORE) && !this.stepperItemContainer.classList.contains('e-step-label-only'))))
19796
+ || (isVertical && this.element.classList.contains(LABELBEFORE))) {
19632
19797
  this.labelContainer.appendChild(optionalSpan);
19633
19798
  }
19634
19799
  else {
@@ -19666,16 +19831,16 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
19666
19831
  this.trigger('beforeStepRender', eventArgs, function (args) {
19667
19832
  _this.stepperItemList.appendChild(args.element);
19668
19833
  });
19669
- if (this.isAngular && this.template) {
19670
- setTimeout(function () {
19671
- _this.calculateProgressBarPosition();
19672
- });
19673
- }
19674
- else {
19675
- this.calculateProgressBarPosition();
19834
+ if (isVertical) {
19835
+ if (this.isAngular && this.template) {
19836
+ setTimeout(function () { _this.calculateProgressBarPosition(); });
19837
+ }
19838
+ else {
19839
+ this.calculateProgressBarPosition();
19840
+ }
19676
19841
  }
19677
19842
  }
19678
- if (this.element.classList.contains(VERTICALSTEP)) {
19843
+ if (isVertical) {
19679
19844
  if (this.element.classList.contains(LABELBEFORE)) {
19680
19845
  var listItems = this.stepperItemList.querySelectorAll('.' + LABEL);
19681
19846
  for (var i = 0; i < listItems.length; i++) {
@@ -19685,37 +19850,48 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
19685
19850
  }
19686
19851
  }
19687
19852
  };
19853
+ Stepper.prototype.createTextLabelElement = function (content, isLabelEle) {
19854
+ if (isLabelEle === void 0) { isLabelEle = false; }
19855
+ var spanEle = this.createElement('span', { className: isLabelEle ? LABEL : TEXTCSS + " " + TEXT });
19856
+ spanEle.innerText = content;
19857
+ if (isLabelEle) {
19858
+ this.labelContainer = this.createElement('span', { className: STEPLABEL });
19859
+ this.labelContainer.appendChild(spanEle);
19860
+ }
19861
+ else {
19862
+ this.stepperItemContainer.appendChild(spanEle);
19863
+ }
19864
+ this.stepperItemContainer.classList.add(isLabelEle ? STEPSLABEL : STEPTEXT);
19865
+ };
19688
19866
  Stepper.prototype.calculateProgressBarPosition = function () {
19689
19867
  var isBeforeLabel = (this.element.classList.contains(LABELBEFORE)) ? true : false;
19690
- var isStepVertical = (this.element.classList.contains(VERTICALSTEP)) ? true : false;
19691
- if (isStepVertical) {
19692
- var iconOnly = (this.stepperItemContainer.classList.contains(STEPICON) &&
19693
- !this.stepperItemContainer.classList.contains(STEPTEXT) &&
19694
- !this.stepperItemContainer.classList.contains(STEPSLABEL)) ? true : false;
19695
- var textEle = (this.stepperItemContainer.querySelector('.' + TEXTCSS));
19696
- if (textEle) {
19697
- this.textEleWidth = this.textEleWidth < textEle.offsetWidth ? textEle.offsetWidth : this.textEleWidth;
19868
+ var iconOnly = (this.stepperItemContainer.classList.contains(STEPICON) &&
19869
+ !this.stepperItemContainer.classList.contains(STEPTEXT) &&
19870
+ !this.stepperItemContainer.classList.contains(STEPSLABEL));
19871
+ var textEle = (this.stepperItemContainer.querySelector('.' + TEXTCSS));
19872
+ if (textEle) {
19873
+ this.textEleWidth = this.textEleWidth < textEle.offsetWidth ? textEle.offsetWidth : this.textEleWidth;
19874
+ }
19875
+ if (isBeforeLabel) {
19876
+ var labelWidth = this.stepperItemContainer.querySelector('.' + LABEL).offsetWidth + 15;
19877
+ this.beforeLabelWidth = Math.max(this.beforeLabelWidth, labelWidth);
19878
+ var iconEle = this.element.querySelector('ol').lastChild.querySelector('.' + ICONCSS);
19879
+ var textEle_1 = this.stepperItemContainer.querySelector('.' + TEXTCSS);
19880
+ if (iconEle || textEle_1) {
19881
+ var itemWidth = this.beforeLabelWidth + ((this.stepperItemContainer.querySelector('.' + ICONCSS)
19882
+ || textEle_1).offsetWidth / 2);
19883
+ this.progressBarPosition = Math.max(this.progressBarPosition, itemWidth);
19698
19884
  }
19699
- if (isBeforeLabel) {
19700
- var itemWidth = void 0;
19701
- var labelWidth = this.stepperItemContainer.querySelector('.' + LABEL).offsetWidth + 15;
19702
- if (this.beforeLabelWidth < labelWidth) {
19703
- this.beforeLabelWidth = labelWidth;
19704
- }
19705
- if (this.element.querySelector('ol').lastChild.querySelector('.' + ICONCSS)) {
19706
- itemWidth = (this.beforeLabelWidth + (this.stepperItemContainer.querySelector('.' + ICONCSS).offsetWidth / 2));
19707
- }
19708
- else if (this.stepperItemContainer.querySelector('.' + TEXTCSS)) {
19709
- itemWidth = (this.beforeLabelWidth + (this.stepperItemContainer.querySelector('.' + TEXTCSS).offsetWidth / 2));
19710
- }
19711
- if (this.progressBarPosition < itemWidth) {
19712
- this.progressBarPosition = itemWidth;
19713
- }
19714
- }
19715
- else if (this.progressBarPosition < (iconOnly ? this.stepperItemContainer.offsetWidth : this.element.querySelector('ol').lastChild.firstChild.offsetWidth)) {
19716
- this.progressBarPosition = iconOnly ? this.stepperItemContainer.offsetWidth : this.element.querySelector('ol').lastChild.firstChild.offsetWidth;
19885
+ else {
19886
+ this.progressBarPosition = Math.max(this.progressBarPosition, (this.beforeLabelWidth / 2));
19717
19887
  }
19718
19888
  }
19889
+ else {
19890
+ var lastChild = this.element.querySelector('ol').lastChild;
19891
+ var lastChildWidth = iconOnly ? this.stepperItemContainer.offsetWidth :
19892
+ lastChild.firstChild.offsetWidth;
19893
+ this.progressBarPosition = Math.max(this.progressBarPosition, lastChildWidth);
19894
+ }
19719
19895
  };
19720
19896
  Stepper.prototype.checkValidState = function (item, stepSpan, isLabel) {
19721
19897
  if (item.isValid == null) {
@@ -19735,13 +19911,10 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
19735
19911
  }
19736
19912
  };
19737
19913
  Stepper.prototype.updateCurrentLabel = function () {
19738
- var currentLabelPos;
19739
- if (this.element.classList.contains(HORIZSTEP)) {
19740
- currentLabelPos = this.labelPosition.toLowerCase() === 'top' ? 'before' : this.labelPosition.toLowerCase() === 'bottom' ? 'after' : this.labelPosition.toLowerCase();
19741
- }
19742
- else {
19743
- currentLabelPos = this.labelPosition.toLowerCase() === 'start' ? 'before' : this.labelPosition.toLowerCase() === 'end' ? 'after' : this.labelPosition.toLowerCase();
19744
- }
19914
+ var labelPos = this.labelPosition.toLowerCase();
19915
+ var currentLabelPos = this.element.classList.contains(HORIZSTEP$1)
19916
+ ? (labelPos === 'top' ? 'before' : labelPos === 'bottom' ? 'after' : labelPos)
19917
+ : (labelPos === 'start' ? 'before' : labelPos === 'end' ? 'after' : labelPos);
19745
19918
  return currentLabelPos;
19746
19919
  };
19747
19920
  Stepper.prototype.updateLabelPosition = function () {
@@ -19768,49 +19941,49 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
19768
19941
  }
19769
19942
  };
19770
19943
  Stepper.prototype.checkValidStep = function () {
19771
- for (var index = 0; index < this.steps.length; index++) {
19772
- var item = this.steps[parseInt(index.toString(), 10)];
19773
- var itemElement = this.stepperItemElements[parseInt(index.toString(), 10)];
19944
+ var isStepIndicator = this.element.classList.contains(STEPINDICATOR);
19945
+ var _loop_1 = function (index) {
19946
+ var item = this_1.steps[parseInt(index.toString(), 10)];
19947
+ var itemElement = this_1.stepperItemElements[parseInt(index.toString(), 10)];
19774
19948
  if (item.isValid !== null) {
19775
19949
  var indicatorEle = void 0;
19776
- var iconEle = void 0;
19777
- if (this.element.classList.contains(STEPINDICATOR) && !item.iconCss) {
19950
+ var iconEle_1;
19951
+ if (isStepIndicator && !item.iconCss) {
19778
19952
  indicatorEle = itemElement.querySelector('.' + ICONCSS);
19779
19953
  }
19780
19954
  else {
19781
- iconEle = itemElement.querySelector('.' + ICONCSS);
19955
+ iconEle_1 = itemElement.querySelector('.' + ICONCSS);
19782
19956
  }
19783
- if (!indicatorEle && this.element.classList.contains(STEPINDICATOR) && this.renderDefault(index)) {
19957
+ if (!indicatorEle && isStepIndicator && this_1.renderDefault(index)) {
19784
19958
  indicatorEle = itemElement.querySelector('.' + INDICATORICON);
19785
19959
  }
19786
19960
  var textLabelIcon = itemElement.querySelector('.e-step-validation-icon');
19787
19961
  var itemIcon = item.iconCss.trim().split(' ');
19788
19962
  var validStep = itemElement.classList.contains('e-step-valid');
19963
+ var validIconClass = validStep ? 'e-check' : 'e-circle-info';
19789
19964
  if (indicatorEle) {
19790
19965
  indicatorEle.classList.remove(INDICATORICON);
19791
19966
  if (indicatorEle.innerHTML !== '') {
19792
19967
  indicatorEle.innerHTML = '';
19793
19968
  }
19794
- indicatorEle.classList.add('e-icons', validStep ? 'e-check' : 'e-circle-info', ICONCSS);
19969
+ indicatorEle.classList.add('e-icons', validIconClass, ICONCSS);
19795
19970
  }
19796
- if (this.renderDefault(index) && !this.element.classList.contains(STEPINDICATOR)) {
19971
+ if (this_1.renderDefault(index) && !isStepIndicator) {
19797
19972
  var stepSpan = itemElement.querySelector('.e-step');
19798
- stepSpan.classList.add('e-icons', validStep ? 'e-check' : 'e-circle-info', ICONCSS);
19973
+ stepSpan.classList.add('e-icons', validIconClass, ICONCSS);
19799
19974
  }
19800
- if (iconEle) {
19801
- if (iconEle.innerHTML !== '') {
19802
- iconEle.innerHTML = '';
19975
+ if (iconEle_1) {
19976
+ if (iconEle_1.innerHTML !== '') {
19977
+ iconEle_1.innerHTML = '';
19803
19978
  }
19804
19979
  else if (itemIcon.length > 0) {
19805
- for (var i = 0; i < itemIcon.length; i++) {
19806
- iconEle.classList.remove(itemIcon[parseInt(i.toString(), 10)]);
19807
- }
19980
+ itemIcon.forEach(function (icon) { iconEle_1.classList.remove(icon); });
19808
19981
  }
19809
- iconEle.classList.add('e-icons', validStep ? 'e-check' : 'e-circle-info');
19982
+ iconEle_1.classList.add('e-icons', validIconClass);
19810
19983
  }
19811
19984
  if (textLabelIcon) {
19812
19985
  textLabelIcon.classList.add(validStep ? 'e-circle-check' : 'e-circle-info');
19813
- if (this.element.classList.contains(VERTICALSTEP)) {
19986
+ if (this_1.element.classList.contains(VERTICALSTEP$1)) {
19814
19987
  var labelEle = itemElement.querySelector('.' + LABEL);
19815
19988
  var textEle = itemElement.querySelector('.' + TEXT);
19816
19989
  var itemWidth = textEle ? textEle.offsetWidth + textEle.getBoundingClientRect().left :
@@ -19820,6 +19993,10 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
19820
19993
  }
19821
19994
  }
19822
19995
  }
19996
+ };
19997
+ var this_1 = this;
19998
+ for (var index = 0; index < this.steps.length; index++) {
19999
+ _loop_1(index);
19823
20000
  }
19824
20001
  };
19825
20002
  Stepper.prototype.updateTooltip = function () {
@@ -19839,20 +20016,28 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
19839
20016
  }
19840
20017
  };
19841
20018
  Stepper.prototype.wireItemsEvents = function (itemElement, index) {
19842
- var _this = this;
19843
- EventHandler.add(itemElement, 'click', function (e) {
19844
- if (_this.linear) {
19845
- var linearModeValue = index - _this.activeStep;
19846
- if (Math.abs(linearModeValue) === 1) {
19847
- _this.stepClickHandler(index, e, itemElement);
19848
- }
19849
- }
19850
- else {
19851
- _this.stepClickHandler(index, e, itemElement);
20019
+ EventHandler.add(itemElement, 'click', this.linearModeHandler.bind(this, itemElement, index), this);
20020
+ EventHandler.add(itemElement, 'mouseover', this.openStepperTooltip.bind(this, index), this);
20021
+ EventHandler.add(itemElement, 'mouseleave', this.closeStepperTooltip, this);
20022
+ };
20023
+ Stepper.prototype.unWireItemsEvents = function () {
20024
+ for (var index = 0; index < this.steps.length; index++) {
20025
+ var itemElement = this.stepperItemElements[parseInt(index.toString(), 10)];
20026
+ EventHandler.remove(itemElement, 'click', this.linearModeHandler.bind(this, itemElement, index));
20027
+ EventHandler.remove(itemElement, 'mouseover', this.openStepperTooltip.bind(this, index));
20028
+ EventHandler.remove(itemElement, 'mouseleave', this.closeStepperTooltip);
20029
+ }
20030
+ };
20031
+ Stepper.prototype.linearModeHandler = function (itemElement, index, e) {
20032
+ if (this.linear) {
20033
+ var linearModeValue = index - this.activeStep;
20034
+ if (Math.abs(linearModeValue) === 1) {
20035
+ this.stepClickHandler(index, e, itemElement);
19852
20036
  }
19853
- }, this);
19854
- EventHandler.add(itemElement, 'mouseover', function () { return _this.openStepperTooltip(index); }, this);
19855
- EventHandler.add(itemElement, 'mouseleave', function () { return _this.closeStepperTooltip(); }, this);
20037
+ }
20038
+ else {
20039
+ this.stepClickHandler(index, e, itemElement);
20040
+ }
19856
20041
  };
19857
20042
  Stepper.prototype.openStepperTooltip = function (index) {
19858
20043
  var currentStep = this.steps[parseInt(index.toString(), 10)];
@@ -19994,7 +20179,7 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
19994
20179
  }
19995
20180
  };
19996
20181
  Stepper.prototype.navigationHandler = function (index, stepStatus, isUpdated) {
19997
- index = (index >= this.steps.length - 1) ? this.steps.length - 1 : index;
20182
+ index = Math.min(index, this.steps.length - 1);
19998
20183
  var Itemslength = this.stepperItemElements.length;
19999
20184
  if (index >= 0 && index < Itemslength - 1) {
20000
20185
  index = this.stepperItemElements[parseInt(index.toString(), 10)].classList.contains(DISABLED$2) ? this.activeStep : index;
@@ -20011,46 +20196,8 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
20011
20196
  itemElement.classList.add(SELECTED$2);
20012
20197
  }
20013
20198
  if (this.activeStep >= 0 && this.progressbar) {
20014
- if (this.element.classList.contains(HORIZSTEP)) {
20015
- if ((this.element.classList.contains(LABELBEFORE) || this.element.classList.contains(LABELAFTER)) &&
20016
- !this.element.classList.contains(STEPINDICATOR) &&
20017
- this.stepperItemElements[parseInt(this.activeStep.toString(), 10)].classList.contains(STEPICON)) {
20018
- var progressPos = this.element.querySelector('.e-stepper-progressbar');
20019
- var selectedEle = this.stepperItemElements[parseInt(this.activeStep.toString(), 10)]
20020
- .firstChild;
20021
- var value = this.activeStep === 0 ? 0 : (selectedEle.offsetLeft - progressPos.offsetLeft +
20022
- (selectedEle.offsetWidth / 2)) / progressPos.offsetWidth * 100;
20023
- if (this.element.classList.contains(RTL$3)) {
20024
- value = (progressPos.getBoundingClientRect().right - selectedEle.getBoundingClientRect().right +
20025
- (selectedEle.offsetWidth / 2)) / progressPos.offsetWidth * 100;
20026
- this.progressbar.style.setProperty(PROGRESSVALUE$1, (value) + '%');
20027
- }
20028
- else {
20029
- this.progressbar.style.setProperty(PROGRESSVALUE$1, (value) + '%');
20030
- }
20031
- }
20032
- else {
20033
- var totalLiWidth = 0;
20034
- var activeLiWidth = 0;
20035
- for (var j = 0; j < this.stepperItemElements.length; j++) {
20036
- totalLiWidth = totalLiWidth + this.stepperItemElements[parseInt(j.toString(), 10)].offsetWidth;
20037
- if (j <= this.activeStep) {
20038
- if (j < this.activeStep) {
20039
- activeLiWidth = activeLiWidth +
20040
- this.stepperItemElements[parseInt(j.toString(), 10)].offsetWidth;
20041
- }
20042
- else if (j === this.activeStep && j !== 0) {
20043
- activeLiWidth = activeLiWidth +
20044
- (this.stepperItemElements[parseInt(j.toString(), 10)].offsetWidth / 2);
20045
- }
20046
- }
20047
- }
20048
- var spaceWidth = (this.stepperItemList.offsetWidth - totalLiWidth) /
20049
- (this.stepperItemElements.length - 1);
20050
- var progressValue = ((activeLiWidth + (spaceWidth * this.activeStep)) /
20051
- this.stepperItemList.offsetWidth) * 100;
20052
- this.progressbar.style.setProperty(PROGRESSVALUE$1, (progressValue) + '%');
20053
- }
20199
+ if (this.element.classList.contains(HORIZSTEP$1)) {
20200
+ this.calculateProgressbarPos();
20054
20201
  }
20055
20202
  else {
20056
20203
  this.progressbar.style.setProperty(PROGRESSVALUE$1, ((100 / (this.steps.length - 1)) * index) + '%');
@@ -20099,27 +20246,65 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
20099
20246
  }
20100
20247
  }
20101
20248
  this.isProtectedOnChange = prevOnChange_1;
20102
- if (this.renderDefault(i) && this.element.classList.contains(STEPINDICATOR) && !itemElement.classList.contains('e-step-valid') && !itemElement.classList.contains('e-step-error')) {
20103
- if (itemElement.classList.contains(COMPLETED)) {
20104
- itemElement.firstChild.classList.remove('e-icons', 'e-step-indicator');
20105
- itemElement.firstChild.classList.add(ICONCSS, 'e-icons', 'e-check');
20106
- }
20107
- else if (itemElement.classList.contains(INPROGRESS) || itemElement.classList.contains(NOTSTARTED)) {
20108
- itemElement.firstChild.classList.remove(ICONCSS, 'e-icons', 'e-check');
20109
- itemElement.firstChild.classList.add('e-icons', 'e-step-indicator');
20249
+ this.updateIndicatorStatus(i, itemElement);
20250
+ }
20251
+ this.updateStepInteractions();
20252
+ };
20253
+ Stepper.prototype.calculateProgressbarPos = function () {
20254
+ var _this = this;
20255
+ if ((this.element.classList.contains(LABELBEFORE) || this.element.classList.contains(LABELAFTER)) &&
20256
+ !this.element.classList.contains(STEPINDICATOR) &&
20257
+ this.stepperItemElements[parseInt(this.activeStep.toString(), 10)].classList.contains(STEPICON)) {
20258
+ var progressPos = this.element.querySelector('.e-stepper-progressbar');
20259
+ var selectedEle = this.stepperItemElements[parseInt(this.activeStep.toString(), 10)]
20260
+ .firstChild;
20261
+ var value = this.activeStep === 0 ? 0 : (selectedEle.offsetLeft - progressPos.offsetLeft +
20262
+ (selectedEle.offsetWidth / 2)) / progressPos.offsetWidth * 100;
20263
+ if (this.element.classList.contains(RTL$3)) {
20264
+ value = (progressPos.getBoundingClientRect().right - selectedEle.getBoundingClientRect().right +
20265
+ (selectedEle.offsetWidth / 2)) / progressPos.offsetWidth * 100;
20266
+ this.progressbar.style.setProperty(PROGRESSVALUE$1, (value) + '%');
20267
+ }
20268
+ else {
20269
+ this.progressbar.style.setProperty(PROGRESSVALUE$1, (value) + '%');
20270
+ }
20271
+ }
20272
+ else {
20273
+ var totalLiWidth_1 = 0;
20274
+ var activeLiWidth_1 = 0;
20275
+ this.stepperItemElements.forEach(function (element, index) {
20276
+ var itemWidth = element.offsetWidth;
20277
+ totalLiWidth_1 += itemWidth;
20278
+ if (index <= _this.activeStep) {
20279
+ activeLiWidth_1 += (index === _this.activeStep && index !== 0) ? (itemWidth / 2) : itemWidth;
20110
20280
  }
20281
+ });
20282
+ var spaceWidth = (this.stepperItemList.offsetWidth - totalLiWidth_1) /
20283
+ (this.stepperItemElements.length - 1);
20284
+ var progressValue = ((activeLiWidth_1 + (spaceWidth * this.activeStep)) /
20285
+ this.stepperItemList.offsetWidth) * 100;
20286
+ this.progressbar.style.setProperty(PROGRESSVALUE$1, (progressValue) + '%');
20287
+ }
20288
+ };
20289
+ Stepper.prototype.updateIndicatorStatus = function (index, itemElement) {
20290
+ if (this.renderDefault(index) && this.element.classList.contains(STEPINDICATOR) && !itemElement.classList.contains('e-step-valid')
20291
+ && !itemElement.classList.contains('e-step-error')) {
20292
+ if (itemElement.classList.contains(COMPLETED)) {
20293
+ itemElement.firstChild.classList.remove('e-icons', 'e-step-indicator');
20294
+ itemElement.firstChild.classList.add(ICONCSS, 'e-icons', 'e-check');
20295
+ }
20296
+ else if (itemElement.classList.contains(INPROGRESS) || itemElement.classList.contains(NOTSTARTED)) {
20297
+ itemElement.firstChild.classList.remove(ICONCSS, 'e-icons', 'e-check');
20298
+ itemElement.firstChild.classList.add('e-icons', 'e-step-indicator');
20111
20299
  }
20112
20300
  }
20113
- this.updateStepInteractions();
20114
20301
  };
20115
20302
  Stepper.prototype.updateStepInteractions = function () {
20116
20303
  var _this = this;
20117
20304
  this.element.classList.toggle(LINEARSTEP, this.linear);
20118
20305
  this.stepperItemElements.forEach(function (step, index) {
20119
- var isPreviousStep = (index === _this.activeStep - 1);
20120
- var isNextStep = (index === _this.activeStep + 1);
20121
- step.classList.toggle(PREVSTEP, isPreviousStep);
20122
- step.classList.toggle(NEXTSTEP, isNextStep);
20306
+ step.classList.toggle(PREVSTEP, (index === _this.activeStep - 1));
20307
+ step.classList.toggle(NEXTSTEP, (index === _this.activeStep + 1));
20123
20308
  });
20124
20309
  };
20125
20310
  Stepper.prototype.removeItemElements = function () {
@@ -20175,7 +20360,7 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
20175
20360
  };
20176
20361
  Stepper.prototype.updateElementClassArray = function () {
20177
20362
  var classArray = [RTL$3, READONLY, 'e-steps-focus', LABELAFTER, LABELBEFORE, 'e-label-top',
20178
- 'e-label-bottom', 'e-label-start', 'e-label-end', STEPINDICATOR, LABELINDICATOR, VERTICALSTEP, HORIZSTEP, LINEARSTEP];
20363
+ 'e-label-bottom', 'e-label-start', 'e-label-end', STEPINDICATOR, LABELINDICATOR, VERTICALSTEP$1, HORIZSTEP$1, LINEARSTEP];
20179
20364
  removeClass([this.element], classArray);
20180
20365
  };
20181
20366
  /**
@@ -20186,6 +20371,7 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
20186
20371
  Stepper.prototype.destroy = function () {
20187
20372
  _super.prototype.destroy.call(this);
20188
20373
  this.unWireEvents();
20374
+ this.unWireItemsEvents();
20189
20375
  // unwires the events and detach the li elements
20190
20376
  this.removeItemElements();
20191
20377
  this.clearTemplate();
@@ -20231,7 +20417,7 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
20231
20417
  case 'rightarrow':
20232
20418
  case 'tab':
20233
20419
  case 'shiftTab':
20234
- this.handleNavigation(this.enableRtl && this.element.classList.contains(HORIZSTEP) ? (e.action === 'leftarrow' || e.action === 'tab' || e.action === 'uparrow') : (e.action === 'rightarrow' || e.action === 'tab' || e.action === 'downarrow'), e);
20420
+ this.handleNavigation(this.enableRtl && this.element.classList.contains(HORIZSTEP$1) ? (e.action === 'leftarrow' || e.action === 'tab' || e.action === 'uparrow') : (e.action === 'rightarrow' || e.action === 'tab' || e.action === 'downarrow'), e);
20235
20421
  break;
20236
20422
  case 'space':
20237
20423
  case 'enter':
@@ -20332,6 +20518,66 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
20332
20518
  this.updateAnimation();
20333
20519
  this.navigateToStep(this.activeStep, null, this.stepperItemElements[this.activeStep], true);
20334
20520
  };
20521
+ Stepper.prototype.updateDynamicSteps = function (steps, prevSteps) {
20522
+ if (!(steps instanceof Array && prevSteps instanceof Array)) {
20523
+ var stepCounts = Object.keys(steps);
20524
+ for (var i = 0; i < stepCounts.length; i++) {
20525
+ var index = parseInt(Object.keys(steps)[i], 10);
20526
+ var changedPropsCount = Object.keys(steps[index]).length;
20527
+ for (var j = 0; j < changedPropsCount; j++) {
20528
+ var property = Object.keys(steps[index])[j];
20529
+ if (property === 'status') {
20530
+ if (this.activeStep === index) {
20531
+ this.navigationHandler(index, steps[index].status);
20532
+ }
20533
+ else {
20534
+ this.steps[index].status = prevSteps[index].status;
20535
+ }
20536
+ }
20537
+ else {
20538
+ this.removeItemElements();
20539
+ this.renderItems();
20540
+ this.updateStepperStatus();
20541
+ }
20542
+ if (property === 'label' && (this.steps[index].iconCss || this.steps[index].text) &&
20543
+ this.stepType.toLowerCase() === 'default') {
20544
+ this.refreshProgressbar();
20545
+ }
20546
+ this.updateStepInteractions();
20547
+ this.checkValidStep();
20548
+ }
20549
+ }
20550
+ }
20551
+ else {
20552
+ this.renderStepperItems(true, true);
20553
+ }
20554
+ };
20555
+ Stepper.prototype.updateDynamicActiveStep = function (activeStep, preActiveStep) {
20556
+ this.activeStep = (activeStep > this.steps.length - 1 || activeStep < -1) ? preActiveStep : this.activeStep;
20557
+ if (this.activeStep >= 0 && this.stepperItemElements[parseInt(this.activeStep.toString(), 10)].classList.contains(DISABLED$2)) {
20558
+ this.activeStep = preActiveStep;
20559
+ }
20560
+ if (this.linear) {
20561
+ var linearModeValue = preActiveStep - this.activeStep;
20562
+ if (Math.abs(linearModeValue) === 1) {
20563
+ this.navigateToStep(this.activeStep, null, null, true);
20564
+ }
20565
+ }
20566
+ else {
20567
+ this.navigateToStep(this.activeStep, null, this.stepperItemElements[this.activeStep], true);
20568
+ }
20569
+ };
20570
+ Stepper.prototype.updateDynamicCssClass = function (cssClass, prevCssClass) {
20571
+ if (prevCssClass) {
20572
+ removeClass([this.element], prevCssClass.trim().split(' '));
20573
+ }
20574
+ if (cssClass) {
20575
+ addClass([this.element], cssClass.trim().split(' '));
20576
+ }
20577
+ if (this.tooltipObj) {
20578
+ this.tooltipObj.setProperties({ cssClass: this.cssClass ? (STEPPERTOOLTIP + ' ' + this.cssClass) : STEPPERTOOLTIP });
20579
+ }
20580
+ };
20335
20581
  /**
20336
20582
  * Called internally if any of the property value changed.
20337
20583
  *
@@ -20345,38 +20591,7 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
20345
20591
  var prop = _a[_i];
20346
20592
  switch (prop) {
20347
20593
  case 'steps': {
20348
- if (!(newProp.steps instanceof Array && oldProp.steps instanceof Array)) {
20349
- var stepCounts = Object.keys(newProp.steps);
20350
- for (var i = 0; i < stepCounts.length; i++) {
20351
- var index = parseInt(Object.keys(newProp.steps)[i], 10);
20352
- var changedPropsCount = Object.keys(newProp.steps[index]).length;
20353
- for (var j = 0; j < changedPropsCount; j++) {
20354
- var property = Object.keys(newProp.steps[index])[j];
20355
- if (property === 'status') {
20356
- if (this.activeStep === index) {
20357
- this.navigationHandler(index, newProp.steps[index].status);
20358
- }
20359
- else {
20360
- this.steps[index].status = oldProp.steps[index].status;
20361
- }
20362
- }
20363
- else {
20364
- this.removeItemElements();
20365
- this.renderItems();
20366
- this.updateStepperStatus();
20367
- }
20368
- if (property === 'label' && (this.steps[index].iconCss || this.steps[index].text) &&
20369
- this.stepType.toLowerCase() === 'default') {
20370
- this.refreshProgressbar();
20371
- }
20372
- this.updateStepInteractions();
20373
- this.checkValidStep();
20374
- }
20375
- }
20376
- }
20377
- else {
20378
- this.renderStepperItems(true, true);
20379
- }
20594
+ this.updateDynamicSteps(newProp.steps, oldProp.steps);
20380
20595
  break;
20381
20596
  }
20382
20597
  case 'orientation':
@@ -20384,21 +20599,7 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
20384
20599
  this.renderStepperItems(true);
20385
20600
  break;
20386
20601
  case 'activeStep':
20387
- this.activeStep = (newProp.activeStep > this.steps.length - 1 || newProp.activeStep < -1) ?
20388
- oldProp.activeStep : this.activeStep;
20389
- if (this.activeStep >= 0 && this.stepperItemElements[parseInt(this.activeStep.toString(), 10)]
20390
- .classList.contains(DISABLED$2)) {
20391
- this.activeStep = oldProp.activeStep;
20392
- }
20393
- if (this.linear) {
20394
- var linearModeValue = oldProp.activeStep - this.activeStep;
20395
- if (Math.abs(linearModeValue) === 1) {
20396
- this.navigateToStep(this.activeStep, null, null, true);
20397
- }
20398
- }
20399
- else {
20400
- this.navigateToStep(this.activeStep, null, this.stepperItemElements[this.activeStep], true);
20401
- }
20602
+ this.updateDynamicActiveStep(newProp.activeStep, oldProp.activeStep);
20402
20603
  break;
20403
20604
  case 'enableRtl':
20404
20605
  this.element.classList[this.enableRtl ? 'add' : 'remove'](RTL$3);
@@ -20407,15 +20608,7 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
20407
20608
  this.element.classList[this.readOnly ? 'add' : 'remove'](READONLY);
20408
20609
  break;
20409
20610
  case 'cssClass':
20410
- if (oldProp.cssClass) {
20411
- removeClass([this.element], oldProp.cssClass.trim().split(' '));
20412
- }
20413
- if (newProp.cssClass) {
20414
- addClass([this.element], newProp.cssClass.trim().split(' '));
20415
- }
20416
- if (this.tooltipObj) {
20417
- this.tooltipObj.setProperties({ cssClass: this.cssClass ? (STEPPERTOOLTIP + ' ' + this.cssClass) : STEPPERTOOLTIP });
20418
- }
20611
+ this.updateDynamicCssClass(newProp.cssClass, oldProp.cssClass);
20419
20612
  break;
20420
20613
  case 'labelPosition':
20421
20614
  this.renderStepperItems(true);