@syncfusion/ej2-navigations 27.2.5 → 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 +482 -295
  6. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  7. package/dist/es6/ej2-navigations.es5.js +501 -308
  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 +81 -14
  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 +17 -16
  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 +1 -1
  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 +16 -9
  150. package/styles/pager/tailwind.css +16 -9
  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 +27 -18
  230. package/styles/tailwind-dark.css +46 -24
  231. package/styles/tailwind-lite.css +27 -18
  232. package/styles/tailwind.css +46 -24
  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
@@ -1102,6 +1102,9 @@ __decorate$2([
1102
1102
  __decorate$2([
1103
1103
  Property('')
1104
1104
  ], MenuItem.prototype, "url", void 0);
1105
+ __decorate$2([
1106
+ Property()
1107
+ ], MenuItem.prototype, "htmlAttributes", void 0);
1105
1108
  /**
1106
1109
  * Animation configuration settings.
1107
1110
  */
@@ -1809,7 +1812,10 @@ let MenuBase = class MenuBase extends Component {
1809
1812
  const data = {
1810
1813
  text: item[this.getField('text')].toString(), iconCss: ICONS + ' e-previous'
1811
1814
  };
1812
- const hdata = new MenuItem(this.items[0], 'items', data, true);
1815
+ if (this.template) {
1816
+ item.iconCss = (item.iconCss || '') + ICONS + ' e-previous';
1817
+ }
1818
+ const hdata = new MenuItem(this.items[0], 'items', this.template ? item : data, true);
1813
1819
  const hli = this.createItems([hdata]).children[0];
1814
1820
  hli.classList.add(HEADER);
1815
1821
  this.uList.insertBefore(hli, this.uList.children[0]);
@@ -2055,6 +2061,9 @@ let MenuBase = class MenuBase extends Component {
2055
2061
  timingFunction: this.animationSettings.easing
2056
2062
  } : null;
2057
2063
  this.popupObj.show(animationOptions, this.lItem);
2064
+ if (Browser.isDevice) {
2065
+ this.popupWrapper.style.left = this.left + 'px';
2066
+ }
2058
2067
  }
2059
2068
  }
2060
2069
  else {
@@ -2195,8 +2204,34 @@ let MenuBase = class MenuBase extends Component {
2195
2204
  }
2196
2205
  }
2197
2206
  this.toggleVisiblity(ul, false);
2198
- ul.style.top = top + px;
2199
- ul.style.left = left + px;
2207
+ const wrapper = closest(this.element, '.e-' + this.getModuleName() + '-wrapper');
2208
+ if (!this.isMenu && this.enableScrolling && ul && wrapper && wrapper.offsetHeight > 0) {
2209
+ const menuVScroll = closest(ul, '.e-menu-vscroll');
2210
+ ul.style.display = 'block';
2211
+ if (menuVScroll) {
2212
+ destroyScroll(getInstance(menuVScroll, VScroll), menuVScroll);
2213
+ }
2214
+ const cmenuWidth = Math.ceil(this.getMenuWidth(ul, ul.offsetWidth, this.enableRtl));
2215
+ const cmenu = addScrolling(this.createElement, wrapper, ul, 'vscroll', this.enableRtl, wrapper.offsetHeight);
2216
+ Object.assign(cmenu.style, {
2217
+ top: `${top}px`,
2218
+ left: `${left}px`,
2219
+ width: `${cmenuWidth}px`,
2220
+ position: 'absolute',
2221
+ display: 'none'
2222
+ });
2223
+ }
2224
+ else {
2225
+ ul.style.top = top + px;
2226
+ ul.style.left = left + px;
2227
+ }
2228
+ }
2229
+ getMenuWidth(cmenu, width, isRtl) {
2230
+ const caretIcon = cmenu.getElementsByClassName(CARET)[0];
2231
+ if (caretIcon) {
2232
+ width += parseInt(getComputedStyle(caretIcon)[isRtl ? 'marginRight' : 'marginLeft'], 10);
2233
+ }
2234
+ return width < 120 ? 120 : width;
2200
2235
  }
2201
2236
  toggleVisiblity(ul, isVisible = true) {
2202
2237
  ul.style.visibility = isVisible ? 'hidden' : '';
@@ -2220,15 +2255,24 @@ let MenuBase = class MenuBase extends Component {
2220
2255
  args.curData.htmlAttributes = {};
2221
2256
  }
2222
2257
  if (Browser.isIE) {
2223
- args.curData.htmlAttributes.role = 'menuitem';
2224
- args.curData.htmlAttributes.tabindex = '-1';
2258
+ if (!args.curData.htmlAttributes.role) {
2259
+ args.curData.htmlAttributes.role = 'menuitem';
2260
+ }
2261
+ if (!args.curData.htmlAttributes.tabindex) {
2262
+ args.curData.htmlAttributes.tabindex = '-1';
2263
+ }
2225
2264
  }
2226
2265
  else {
2227
- Object.assign(args.curData.htmlAttributes, { role: 'menuitem', tabindex: '-1' });
2266
+ Object.assign(args.curData.htmlAttributes, {
2267
+ role: args.curData.htmlAttributes.role || 'menuitem',
2268
+ tabindex: args.curData.htmlAttributes.tabindex || '-1'
2269
+ });
2228
2270
  }
2229
2271
  if (this.isMenu && !args.curData[this.getField('separator', level)]) {
2230
- args.curData.htmlAttributes['aria-label'] = args.curData[args.fields.text] ?
2231
- args.curData[args.fields.text] : args.curData[args.fields.id];
2272
+ if (!args.curData.htmlAttributes['aria-label']) {
2273
+ args.curData.htmlAttributes['aria-label'] = args.curData[args.fields.text] ?
2274
+ args.curData[args.fields.text] : args.curData[args.fields.id];
2275
+ }
2232
2276
  }
2233
2277
  if (args.curData[args.fields[fields.iconCss]] === '') {
2234
2278
  args.curData[args.fields[fields.iconCss]] = null;
@@ -2237,7 +2281,9 @@ let MenuBase = class MenuBase extends Component {
2237
2281
  itemCreated: (args) => {
2238
2282
  if (args.curData[this.getField('separator', level)]) {
2239
2283
  args.item.classList.add(SEPARATOR);
2240
- args.item.setAttribute('role', 'separator');
2284
+ if (!args.curData.htmlAttributes.role) {
2285
+ args.item.setAttribute('role', 'separator');
2286
+ }
2241
2287
  }
2242
2288
  if (showIcon && !args.curData[args.fields.iconCss]
2243
2289
  && !args.curData[this.getField('separator', level)]) {
@@ -2482,9 +2528,10 @@ let MenuBase = class MenuBase extends Component {
2482
2528
  }
2483
2529
  }
2484
2530
  else {
2485
- if (this.isMenu && trgt.tagName === 'DIV' && this.navIdx.length && closest(trgt, '.e-menu-vscroll')) {
2486
- const popupEle = closest(trgt, '.' + POPUP);
2487
- const cIdx = Array.prototype.indexOf.call(this.getPopups(), popupEle) + 1;
2531
+ if (trgt.tagName === 'DIV' && closest(trgt, '.e-menu-vscroll') && (this.navIdx.length || !this.isMenu && this.enableScrolling && this.navIdx.length === 0)) {
2532
+ const popupEle = this.isMenu ? closest(trgt, '.' + POPUP) : closest(trgt, '.e-menu-vscroll');
2533
+ const cIdx = this.isMenu ? Array.prototype.indexOf.call(this.getPopups(), popupEle) + 1
2534
+ : this.getIdx(wrapper, select('ul.e-menu-parent', popupEle));
2488
2535
  if (cIdx < this.navIdx.length) {
2489
2536
  this.closeMenu(cIdx + 1, e);
2490
2537
  if (popupEle) {
@@ -2632,7 +2679,9 @@ let MenuBase = class MenuBase extends Component {
2632
2679
  }
2633
2680
  }
2634
2681
  getIdx(ul, li, skipHdr = true) {
2635
- let idx = Array.prototype.indexOf.call(ul.children, li);
2682
+ const ulElem = !this.isMenu && this.enableScrolling && select('.e-menu-vscroll', ul)
2683
+ ? selectAll('.e-menu-parent', ul) : Array.from(ul.children);
2684
+ let idx = Array.prototype.indexOf.call(ulElem, li);
2636
2685
  if (skipHdr && ul.children[0].classList.contains(HEADER)) {
2637
2686
  idx--;
2638
2687
  }
@@ -2715,7 +2764,7 @@ let MenuBase = class MenuBase extends Component {
2715
2764
  }
2716
2765
  else {
2717
2766
  let ul = wrapper.children[0];
2718
- if (this.element.classList.contains('e-vertical')) {
2767
+ if (this.element.classList.contains('e-vertical') || !this.isMenu) {
2719
2768
  destroyScroll(getInstance(ul, VScroll), ul);
2720
2769
  }
2721
2770
  else {
@@ -2877,6 +2926,8 @@ let MenuBase = class MenuBase extends Component {
2877
2926
  toggleAnimation(ul, isMenuOpen = true) {
2878
2927
  let pUlHeight;
2879
2928
  let pElement;
2929
+ const animateElement = (this.enableScrolling && !this.isMenu && closest(ul, '.e-menu-vscroll'))
2930
+ ? closest(ul, '.e-menu-vscroll') : ul;
2880
2931
  if (this.animationSettings.effect === 'None' || !isMenuOpen) {
2881
2932
  if (this.hamburgerMode && ul) {
2882
2933
  ul.style.top = '0px';
@@ -2885,7 +2936,7 @@ let MenuBase = class MenuBase extends Component {
2885
2936
  this.end(ul, isMenuOpen);
2886
2937
  }
2887
2938
  else {
2888
- this.animation.animate(ul, {
2939
+ this.animation.animate(animateElement, {
2889
2940
  name: this.animationSettings.effect,
2890
2941
  duration: this.animationSettings.duration,
2891
2942
  timingFunction: this.animationSettings.easing,
@@ -2903,7 +2954,7 @@ let MenuBase = class MenuBase extends Component {
2903
2954
  }
2904
2955
  else {
2905
2956
  options.element.style.display = 'block';
2906
- options.element.style.maxHeight = options.element.getBoundingClientRect().height + 'px';
2957
+ options.element.style.maxHeight = this.isMenu ? options.element.getBoundingClientRect().height + 'px' : options.element.scrollHeight + 'px';
2907
2958
  }
2908
2959
  },
2909
2960
  progress: (options) => {
@@ -2940,11 +2991,15 @@ let MenuBase = class MenuBase extends Component {
2940
2991
  }
2941
2992
  }
2942
2993
  end(ul, isMenuOpen) {
2943
- if (isMenuOpen && (this.isMenu || (!this.isMenu && this.isContextMenuClosed))) {
2944
- if (this.isMenu || !Browser.isDevice) {
2994
+ if (isMenuOpen && this.isContextMenuClosed) {
2995
+ if (this.isMenu || !Browser.isDevice || (!this.isMenu && this.isAnimationNone && Browser.isDevice)) {
2945
2996
  ul.style.display = 'block';
2946
2997
  }
2947
2998
  ul.style.maxHeight = '';
2999
+ const scrollMenu = this.enableScrolling && !this.isMenu ? closest(ul, '.e-menu-vscroll') : null;
3000
+ if (scrollMenu) {
3001
+ scrollMenu.style.display = 'block';
3002
+ }
2948
3003
  this.triggerOpen(ul);
2949
3004
  if (ul.querySelector('.' + FOCUSED)) {
2950
3005
  ul.querySelector('.' + FOCUSED).focus();
@@ -2972,6 +3027,10 @@ let MenuBase = class MenuBase extends Component {
2972
3027
  }
2973
3028
  }
2974
3029
  else {
3030
+ const scrollMenu = this.enableScrolling && !this.isMenu ? closest(ul, '.e-menu-vscroll') : null;
3031
+ if (scrollMenu) {
3032
+ destroyScroll(getInstance(scrollMenu, VScroll), scrollMenu);
3033
+ }
2975
3034
  if (ul === this.element) {
2976
3035
  const fli = this.getLIByClass(this.element, FOCUSED);
2977
3036
  if (fli) {
@@ -3011,7 +3070,9 @@ let MenuBase = class MenuBase extends Component {
3011
3070
  level = isCallBack ? level + 1 : 0;
3012
3071
  for (let i = 0, len = items.length; i < len; i++) {
3013
3072
  item = items[i];
3014
- if ((isUniqueId ? item[this.getField('itemId', level)] : item[this.getField('text', level)]) === data) {
3073
+ const currentField = isUniqueId ? item[this.getField('itemId', level)] : item[this.getField('text', level)];
3074
+ const itemId = (item.htmlAttributes && 'id' in item.htmlAttributes) ? item.htmlAttributes.id : currentField;
3075
+ if (itemId === data) {
3015
3076
  nIndex.push(i);
3016
3077
  break;
3017
3078
  }
@@ -7097,6 +7158,7 @@ let ContextMenu = class ContextMenu extends MenuBase {
7097
7158
  super.preRender();
7098
7159
  }
7099
7160
  initialize() {
7161
+ this.template = this.itemTemplate ? this.itemTemplate : null;
7100
7162
  super.initialize();
7101
7163
  attributes(this.element, { 'role': 'menubar', 'tabindex': '0' });
7102
7164
  this.element.style.zIndex = getZindexPartial(this.element).toString();
@@ -7142,6 +7204,9 @@ let ContextMenu = class ContextMenu extends MenuBase {
7142
7204
  this.unWireEvents(oldProp.target);
7143
7205
  this.wireEvents();
7144
7206
  break;
7207
+ case 'itemTemplate':
7208
+ this.itemTemplate = newProp.itemTemplate;
7209
+ this.refresh();
7145
7210
  }
7146
7211
  }
7147
7212
  }
@@ -7164,6 +7229,12 @@ __decorate$5([
7164
7229
  __decorate$5([
7165
7230
  Collection([], MenuItem)
7166
7231
  ], ContextMenu.prototype, "items", void 0);
7232
+ __decorate$5([
7233
+ Property(null)
7234
+ ], ContextMenu.prototype, "itemTemplate", void 0);
7235
+ __decorate$5([
7236
+ Property(false)
7237
+ ], ContextMenu.prototype, "enableScrolling", void 0);
7167
7238
  ContextMenu = __decorate$5([
7168
7239
  NotifyPropertyChanges
7169
7240
  ], ContextMenu);
@@ -7359,6 +7430,10 @@ let Menu = class Menu extends MenuBase {
7359
7430
  }
7360
7431
  }
7361
7432
  break;
7433
+ case 'template':
7434
+ this.template = newProp.template;
7435
+ this.refresh();
7436
+ break;
7362
7437
  }
7363
7438
  }
7364
7439
  super.onPropertyChanged(newProp, oldProp);
@@ -7836,6 +7911,17 @@ let Tab = class Tab extends Component {
7836
7911
  }
7837
7912
  }
7838
7913
  }
7914
+ createContentElement(index) {
7915
+ const contentElement = this.createElement('div', {
7916
+ id: CLS_CONTENT$1 + this.tabId + '_' + index, className: CLS_ITEM$2,
7917
+ attrs: { 'role': 'tabpanel', 'aria-labelledby': CLS_ITEM$2 + this.tabId + '_' + index }
7918
+ });
7919
+ if (['Dynamic', 'Demand'].indexOf(this.loadOn) !== -1 ||
7920
+ (this.loadOn === 'Init' && index === Number(this.extIndex(this.itemIndexArray[0])))) {
7921
+ addClass([contentElement], CLS_ACTIVE$1);
7922
+ }
7923
+ return contentElement;
7924
+ }
7839
7925
  renderContent() {
7840
7926
  this.cntEle = select('.' + CLS_CONTENT$1, this.element);
7841
7927
  const hdrItem = selectAll('.' + CLS_TB_ITEM, this.element);
@@ -7850,11 +7936,26 @@ let Tab = class Tab extends Component {
7850
7936
  }
7851
7937
  }
7852
7938
  }
7939
+ else {
7940
+ if (selectAll('.' + CLS_TB_ITEM, this.element).length > 0) {
7941
+ if (this.loadOn === 'Init') {
7942
+ for (let i = 0; i < this.itemIndexArray.length; i++) {
7943
+ if (this.itemIndexArray[i]) {
7944
+ this.cntEle.appendChild(this.createContentElement(Number(this.extIndex(this.itemIndexArray[i]))));
7945
+ }
7946
+ }
7947
+ }
7948
+ else if (this.loadOn === 'Dynamic') {
7949
+ this.cntEle.appendChild(this.createContentElement(this.selectedItem > 0 ?
7950
+ this.selectedItem : Number(this.extIndex(this.itemIndexArray[0]))));
7951
+ }
7952
+ }
7953
+ }
7853
7954
  }
7854
7955
  reRenderItems() {
7855
7956
  this.renderContainer();
7856
7957
  if (!isNullOrUndefined(this.cntEle)) {
7857
- this.touchModule = new Touch(this.cntEle, { swipe: this.swipeHandler.bind(this) });
7958
+ this.bindSwipeEvents();
7858
7959
  }
7859
7960
  }
7860
7961
  parseObject(items, index) {
@@ -8351,6 +8452,27 @@ let Tab = class Tab extends Component {
8351
8452
  }
8352
8453
  }
8353
8454
  }
8455
+ loadContentInitMode(ele) {
8456
+ if (!ele) {
8457
+ return;
8458
+ }
8459
+ if (this.loadOn === 'Init') {
8460
+ for (let i = 0; i < this.items.length; i++) {
8461
+ if (this.cntEle.children.item(i)) {
8462
+ this.getContent(this.cntEle.children.item(i), this.items[i].content, 'render', i);
8463
+ }
8464
+ }
8465
+ }
8466
+ if (this.prevIndex !== this.selectedItem) {
8467
+ ele.classList.remove(CLS_ACTIVE$1);
8468
+ }
8469
+ }
8470
+ loadContentElement() {
8471
+ if (!this.isTemplate) {
8472
+ const ele = this.cntEle.children.item(0);
8473
+ this.loadContentInitMode(ele);
8474
+ }
8475
+ }
8354
8476
  setContentHeight(val) {
8355
8477
  if (this.element.classList.contains(CLS_FILL)) {
8356
8478
  removeClass([this.element], [CLS_FILL]);
@@ -8360,6 +8482,7 @@ let Tab = class Tab extends Component {
8360
8482
  }
8361
8483
  const hdrEle = this.getTabHeader();
8362
8484
  if (this.heightAdjustMode === 'None') {
8485
+ this.loadContentElement();
8363
8486
  if (this.height === 'auto') {
8364
8487
  return;
8365
8488
  }
@@ -8372,6 +8495,7 @@ let Tab = class Tab extends Component {
8372
8495
  else if (this.heightAdjustMode === 'Fill') {
8373
8496
  addClass([this.element], [CLS_FILL]);
8374
8497
  setStyleAttribute(this.element, { 'height': '100%' });
8498
+ this.loadContentElement();
8375
8499
  this.cntEle.style.height = 'calc(100% - ' + this.hdrEle.offsetHeight + 'px)';
8376
8500
  }
8377
8501
  else if (this.heightAdjustMode === 'Auto') {
@@ -8386,11 +8510,8 @@ let Tab = class Tab extends Component {
8386
8510
  }
8387
8511
  else {
8388
8512
  this.cntEle = select('.' + CLS_CONTENT$1, this.element);
8389
- if (val === true) {
8390
- this.cntEle.appendChild(this.createElement('div', {
8391
- id: (CLS_CONTENT$1 + this.tabId + '_' + 0), className: CLS_ITEM$2 + ' ' + CLS_ACTIVE$1,
8392
- attrs: { 'role': 'tabpanel', 'aria-labelledby': CLS_ITEM$2 + this.tabId + '_' + 0 }
8393
- }));
8513
+ if (val === true && this.loadOn === 'Demand') {
8514
+ this.cntEle.appendChild(this.createContentElement(Number(this.extIndex(this.itemIndexArray[0]))));
8394
8515
  }
8395
8516
  const ele = this.cntEle.children.item(0);
8396
8517
  for (let i = 0; i < this.items.length; i++) {
@@ -8404,14 +8525,15 @@ let Tab = class Tab extends Component {
8404
8525
  this.clearTemplate(['content']);
8405
8526
  }
8406
8527
  this.templateEle = [];
8407
- this.getContent(ele, this.items[0].content, 'render', 0);
8408
- if (this.prevIndex !== this.selectedItem) {
8409
- ele.classList.remove(CLS_ACTIVE$1);
8528
+ if (this.loadOn === 'Demand') {
8529
+ this.getContent(ele, this.items[0].content, 'render', 0);
8410
8530
  }
8531
+ this.loadContentInitMode(ele);
8411
8532
  }
8412
8533
  setStyleAttribute(this.cntEle, { 'height': this.maxHeight + 'px' });
8413
8534
  }
8414
8535
  else {
8536
+ this.loadContentElement();
8415
8537
  setStyleAttribute(this.cntEle, { 'height': 'auto' });
8416
8538
  }
8417
8539
  }
@@ -8493,7 +8615,7 @@ let Tab = class Tab extends Component {
8493
8615
  return;
8494
8616
  }
8495
8617
  if (!this.isTemplate) {
8496
- attributes(trg.firstElementChild, { 'aria-controls': CLS_CONTENT$1 + this.tabId + '_' + value });
8618
+ attributes(trg.firstElementChild, { 'aria-controls': CLS_CONTENT$1 + this.tabId + '_' + this.extIndex(trg.id) });
8497
8619
  }
8498
8620
  const id = trg.id;
8499
8621
  this.removeActiveClass();
@@ -8514,6 +8636,9 @@ let Tab = class Tab extends Component {
8514
8636
  }
8515
8637
  else {
8516
8638
  this.cntEle = select('.' + CLS_TAB + ' > .' + CLS_CONTENT$1, this.element);
8639
+ while (this.loadOn === 'Dynamic' && this.cntEle.firstElementChild) {
8640
+ this.cntEle.removeChild(this.cntEle.firstElementChild);
8641
+ }
8517
8642
  const item = this.getTrgContent(this.cntEle, this.extIndex(id));
8518
8643
  if (isNullOrUndefined(item)) {
8519
8644
  this.cntEle.appendChild(this.createElement('div', {
@@ -8588,13 +8713,18 @@ let Tab = class Tab extends Component {
8588
8713
  }
8589
8714
  }
8590
8715
  }
8716
+ bindSwipeEvents() {
8717
+ if (this.swipeMode !== 'None') {
8718
+ this.touchModule = new Touch(this.cntEle, { swipe: this.swipeHandler.bind(this) });
8719
+ }
8720
+ }
8591
8721
  wireEvents() {
8592
8722
  this.bindDraggable();
8593
8723
  window.addEventListener('resize', this.resizeContext);
8594
8724
  EventHandler.add(this.element, 'mouseover', this.hoverHandler, this);
8595
8725
  EventHandler.add(this.element, 'keydown', this.spaceKeyDown, this);
8596
8726
  if (!isNullOrUndefined(this.cntEle)) {
8597
- this.touchModule = new Touch(this.cntEle, { swipe: this.swipeHandler.bind(this) });
8727
+ this.bindSwipeEvents();
8598
8728
  }
8599
8729
  this.keyModule = new KeyboardEvents(this.element, { keyAction: this.keyHandler.bind(this), keyConfigs: this.keyConfigs });
8600
8730
  this.tabKeyModule = new KeyboardEvents(this.element, {
@@ -8639,7 +8769,9 @@ let Tab = class Tab extends Component {
8639
8769
  }
8640
8770
  }
8641
8771
  swipeHandler(e) {
8642
- if (e.velocity < 3 && isNullOrUndefined(e.originalEvent.changedTouches)) {
8772
+ if ((e.velocity < 3 && isNullOrUndefined(e.originalEvent.changedTouches)) ||
8773
+ (this.swipeMode === 'Touch' && ((e.originalEvent.type === 'mouseup') || e.originalEvent.type === 'mouseleave')) ||
8774
+ (this.swipeMode === 'Mouse' && e.originalEvent.type === 'touchend') || (this.swipeMode === 'None')) {
8643
8775
  return;
8644
8776
  }
8645
8777
  if (this.isNested) {
@@ -9229,7 +9361,7 @@ let Tab = class Tab extends Component {
9229
9361
  this.items.splice((index + i), 0, item);
9230
9362
  i++;
9231
9363
  }
9232
- if (this.isTemplate && !isNullOrUndefined(item.header) && !isNullOrUndefined(item.header.text)) {
9364
+ if (!isNullOrUndefined(item.header) && !isNullOrUndefined(item.header.text) && (this.isTemplate || this.loadOn === 'Init')) {
9233
9365
  const no = lastEleIndex + place;
9234
9366
  const ele = this.createElement('div', {
9235
9367
  id: CLS_CONTENT$1 + this.tabId + '_' + no, className: CLS_ITEM$2,
@@ -9614,6 +9746,13 @@ let Tab = class Tab extends Component {
9614
9746
  case 'allowDragAndDrop':
9615
9747
  this.bindDraggable();
9616
9748
  break;
9749
+ case 'swipeMode':
9750
+ if (this.touchModule) {
9751
+ this.touchModule.destroy();
9752
+ this.touchModule = null;
9753
+ }
9754
+ this.bindSwipeEvents();
9755
+ break;
9617
9756
  case 'dragArea':
9618
9757
  if (this.allowDragAndDrop) {
9619
9758
  this.draggableItems.forEach((item) => {
@@ -9766,6 +9905,9 @@ __decorate$7([
9766
9905
  __decorate$7([
9767
9906
  Property('100%')
9768
9907
  ], Tab.prototype, "width", void 0);
9908
+ __decorate$7([
9909
+ Property('Both')
9910
+ ], Tab.prototype, "swipeMode", void 0);
9769
9911
  __decorate$7([
9770
9912
  Property('auto')
9771
9913
  ], Tab.prototype, "height", void 0);
@@ -9785,7 +9927,7 @@ __decorate$7([
9785
9927
  Property('Scrollable')
9786
9928
  ], Tab.prototype, "overflowMode", void 0);
9787
9929
  __decorate$7([
9788
- Property('Dynamic')
9930
+ Property('Demand')
9789
9931
  ], Tab.prototype, "loadOn", void 0);
9790
9932
  __decorate$7([
9791
9933
  Property(false)
@@ -10029,6 +10171,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
10029
10171
  this.mouseDownStatus = false;
10030
10172
  this.isDropIn = false;
10031
10173
  this.OldCheckedData = [];
10174
+ this.isHiddenItem = false;
10032
10175
  }
10033
10176
  /**
10034
10177
  * Get component name.
@@ -10515,10 +10658,6 @@ let TreeView = TreeView_1 = class TreeView extends Component {
10515
10658
  this.changeState(node, 'uncheck', null, true, true);
10516
10659
  }
10517
10660
  }
10518
- const parentElement = closest(node, '.' + PARENTITEM);
10519
- if (!isNullOrUndefined(parentElement)) {
10520
- this.ensureParentCheckState(closest(parentElement, '.' + LISTITEM));
10521
- }
10522
10661
  }
10523
10662
  }
10524
10663
  /**
@@ -11629,6 +11768,9 @@ let TreeView = TreeView_1 = class TreeView extends Component {
11629
11768
  this.expandArgs.isInteracted = this.isInteracted;
11630
11769
  this.trigger('nodeExpanded', this.expandArgs);
11631
11770
  }
11771
+ if (this.isHiddenItem) {
11772
+ this.collapseAll([this.getNodeData(currLi).id]);
11773
+ }
11632
11774
  }
11633
11775
  addExpand(liEle) {
11634
11776
  liEle.setAttribute('aria-expanded', 'true');
@@ -12148,7 +12290,9 @@ let TreeView = TreeView_1 = class TreeView extends Component {
12148
12290
  this.expandOnType = (this.expandOn === 'Auto') ? (Browser.isDevice ? 'Click' : 'DblClick') : this.expandOn;
12149
12291
  }
12150
12292
  expandHandler(e) {
12151
- const target = e.originalEvent.target;
12293
+ const target = Browser.isDevice && e.originalEvent.changedTouches && !Browser.isIos
12294
+ ? document.elementFromPoint(e.originalEvent.changedTouches[0].clientX, e.originalEvent.changedTouches[0].clientY)
12295
+ : e.originalEvent.target;
12152
12296
  if (!target || target.classList.contains(INPUT) || target.classList.contains(ROOT) ||
12153
12297
  target.classList.contains(PARENTITEM) || target.classList.contains(LISTITEM) ||
12154
12298
  target.classList.contains(ICON) || this.showCheckBox && closest(target, '.' + CHECKBOXWRAP)) {
@@ -14482,15 +14626,6 @@ let TreeView = TreeView_1 = class TreeView extends Component {
14482
14626
  }
14483
14627
  }
14484
14628
  }
14485
- /**
14486
- * Checks whether the checkedNodes entered are valid and sets the valid checkedNodes while changing via setmodel(for hierarchical DS)
14487
- *
14488
- * @param {Object[]} childItems - The child items to check.
14489
- * @param {string} node - The node to set the check state for.
14490
- * @param {Object} [treeData] - The optional tree data.
14491
- * @returns {void}
14492
- * @private
14493
- */
14494
14629
  /**
14495
14630
  * Checks whether the checkedNodes entered are valid and sets the valid checkedNodes while changing via setmodel(for hierarchical DS)
14496
14631
  *
@@ -14964,9 +15099,11 @@ let TreeView = TreeView_1 = class TreeView extends Component {
14964
15099
  const pid = getValue(this.fields.parentID, nodes[parseInt(i.toString(), 10)]);
14965
15100
  dropLi = pid ? this.getElement(pid.toString()) : pid;
14966
15101
  if (!isNullOrUndefined(pid) && isNullOrUndefined(dropLi)) {
15102
+ this.isHiddenItem = true;
14967
15103
  this.preventExpand = false;
14968
15104
  this.ensureVisible(pid);
14969
15105
  this.preventExpand = preventTargetExpand;
15106
+ this.isHiddenItem = false;
14970
15107
  dropLi = this.getElement(pid.toString());
14971
15108
  }
14972
15109
  this.addGivenNodes([nodes[parseInt(i.toString(), 10)]], dropLi, index);
@@ -15075,7 +15212,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
15075
15212
  else if (this.dataType === 2) {
15076
15213
  parentsId = this.getHierarchicalParentId(node, this.treeData, parentsId);
15077
15214
  }
15078
- this.expandAll(parentsId.reverse());
15215
+ this.expandAll(parentsId.reverse(), null, null, this.isHiddenItem);
15079
15216
  const liEle = this.getElement(node);
15080
15217
  if (!isNullOrUndefined(liEle)) {
15081
15218
  if (typeof node == 'object') {
@@ -15175,10 +15312,16 @@ let TreeView = TreeView_1 = class TreeView extends Component {
15175
15312
  * @returns {void}
15176
15313
  */
15177
15314
  moveNodes(sourceNodes, target, index, preventTargetExpand) {
15178
- const dropLi = this.getElement(target);
15315
+ if (isNullOrUndefined(sourceNodes) || sourceNodes.length === 0) {
15316
+ return;
15317
+ }
15318
+ let dropLi = this.getElement(target);
15179
15319
  const nodeData = [];
15180
15320
  if (isNullOrUndefined(dropLi)) {
15181
- return;
15321
+ this.isHiddenItem = true;
15322
+ this.ensureVisible(target);
15323
+ this.isHiddenItem = false;
15324
+ dropLi = this.getElement(target);
15182
15325
  }
15183
15326
  for (let i = 0; i < sourceNodes.length; i++) {
15184
15327
  const dragLi = this.getElement(sourceNodes[parseInt(i.toString(), 10)]);
@@ -17175,6 +17318,15 @@ let Carousel = class Carousel extends Component {
17175
17318
  this.reRenderSlides();
17176
17319
  }
17177
17320
  break;
17321
+ case 'allowKeyboardInteraction':
17322
+ if (this.keyModule) {
17323
+ this.keyModule.destroy();
17324
+ this.keyModule = null;
17325
+ }
17326
+ if (newProp.allowKeyboardInteraction) {
17327
+ this.renderKeyboardActions();
17328
+ }
17329
+ break;
17178
17330
  case 'enableRtl':
17179
17331
  rtlElement = [].slice.call(this.element.querySelectorAll(`.${CLS_PREV_BUTTON},
17180
17332
  .${CLS_NEXT_BUTTON}, .${CLS_PLAY_BUTTON}`));
@@ -17542,6 +17694,9 @@ let Carousel = class Carousel extends Component {
17542
17694
  append(template, indicatorBar);
17543
17695
  }
17544
17696
  renderKeyboardActions() {
17697
+ if (!this.allowKeyboardInteraction) {
17698
+ return;
17699
+ }
17545
17700
  this.keyModule = new KeyboardEvents(this.element, { keyAction: this.keyHandler.bind(this), keyConfigs: this.keyConfigs });
17546
17701
  }
17547
17702
  renderTouchActions() {
@@ -17858,6 +18013,9 @@ let Carousel = class Carousel extends Component {
17858
18013
  }
17859
18014
  }
17860
18015
  keyHandler(e) {
18016
+ if (!this.allowKeyboardInteraction) {
18017
+ return;
18018
+ }
17861
18019
  let direction;
17862
18020
  let slideIndex;
17863
18021
  let isSlideTransition = false;
@@ -18005,6 +18163,7 @@ let Carousel = class Carousel extends Component {
18005
18163
  if (!this.timeStampStart) {
18006
18164
  this.timeStampStart = Date.now();
18007
18165
  }
18166
+ e.preventDefault();
18008
18167
  this.isSwipe = false;
18009
18168
  this.itemsContainer.classList.add('e-swipe-start');
18010
18169
  this.prevPageX = e.touches ? e.touches[0].pageX : e.pageX;
@@ -18014,6 +18173,7 @@ let Carousel = class Carousel extends Component {
18014
18173
  if (!this.itemsContainer.classList.contains('e-swipe-start')) {
18015
18174
  return;
18016
18175
  }
18176
+ this.isSwipe = true;
18017
18177
  e.preventDefault();
18018
18178
  const pageX = e.touches ? e.touches[0].pageX : e.pageX;
18019
18179
  const positionDiff = this.prevPageX - (pageX);
@@ -18026,7 +18186,6 @@ let Carousel = class Carousel extends Component {
18026
18186
  this.itemsContainer.style.transform = `translateX(${this.initialTranslate + (this.enableRtl ? positionDiff : -positionDiff)}px)`;
18027
18187
  }
18028
18188
  swipStop() {
18029
- this.isSwipe = true;
18030
18189
  const time = Date.now() - this.timeStampStart;
18031
18190
  let distanceX = this.getTranslateValue(this.itemsContainer) - this.initialTranslate;
18032
18191
  distanceX = distanceX < 0 ? distanceX * -1 : distanceX;
@@ -18210,8 +18369,10 @@ let Carousel = class Carousel extends Component {
18210
18369
  this.touchModule.destroy();
18211
18370
  this.touchModule = null;
18212
18371
  }
18213
- this.keyModule.destroy();
18214
- this.keyModule = null;
18372
+ if (this.keyModule) {
18373
+ this.keyModule.destroy();
18374
+ this.keyModule = null;
18375
+ }
18215
18376
  this.resetSlideInterval();
18216
18377
  this.destroyButtons();
18217
18378
  this.unWireEvents();
@@ -18276,6 +18437,9 @@ __decorate$b([
18276
18437
  __decorate$b([
18277
18438
  Property(true)
18278
18439
  ], Carousel.prototype, "enableTouchSwipe", void 0);
18440
+ __decorate$b([
18441
+ Property(true)
18442
+ ], Carousel.prototype, "allowKeyboardInteraction", void 0);
18279
18443
  __decorate$b([
18280
18444
  Property(true)
18281
18445
  ], Carousel.prototype, "showIndicators", void 0);
@@ -18512,6 +18676,10 @@ var __decorate$d = (undefined && undefined.__decorate) || function (decorators,
18512
18676
  return c > 3 && r && Object.defineProperty(target, key, r), r;
18513
18677
  };
18514
18678
  const PROGRESSVALUE = '--progress-value';
18679
+ const PROGRESSPOS = '--progress-position';
18680
+ const VERTICALSTEP = 'e-vertical';
18681
+ const HORIZSTEP = 'e-horizontal';
18682
+ const ITEMLIST = 'e-stepper-steps';
18515
18683
  /**
18516
18684
  * Defines the status of the step.
18517
18685
  */
@@ -18624,8 +18792,8 @@ let StepperBase = class StepperBase extends Component {
18624
18792
  render() {
18625
18793
  }
18626
18794
  updateOrientaion(wrapper) {
18627
- if (wrapper.classList.contains('e-horizontal') || wrapper.classList.contains('e-vertical')) {
18628
- wrapper.classList.remove('e-horizontal', 'e-vertical');
18795
+ if (wrapper.classList.contains(HORIZSTEP) || wrapper.classList.contains(VERTICALSTEP)) {
18796
+ wrapper.classList.remove(HORIZSTEP, VERTICALSTEP);
18629
18797
  }
18630
18798
  if (!(isNullOrUndefined(this.orientation))) {
18631
18799
  wrapper.classList.add('e-' + this.orientation.toLocaleLowerCase());
@@ -18634,23 +18802,23 @@ let StepperBase = class StepperBase extends Component {
18634
18802
  renderProgressBar(wrapper) {
18635
18803
  this.progressStep = this.createElement('div', { className: 'e-stepper-progressbar' });
18636
18804
  this.progressbar = this.createElement('div', { className: 'e-progressbar-value' });
18805
+ const beforeLabel = (wrapper.querySelector('li').querySelector('.e-step-label-container'));
18637
18806
  this.progressStep.appendChild(this.progressbar);
18638
18807
  wrapper.prepend(this.progressStep);
18639
18808
  this.progressbar.style.setProperty(PROGRESSVALUE, (0) + '%');
18640
- const beforeLabel = (wrapper.querySelector('li').querySelector('.e-step-label-container'));
18641
- if (wrapper.classList.contains('e-vertical')) {
18809
+ if (wrapper.classList.contains(VERTICALSTEP)) {
18642
18810
  if (wrapper.classList.contains('e-label-bottom') || wrapper.classList.contains('e-label-top')) {
18643
- const stepsContainer = (wrapper.querySelector('.e-stepper-steps'));
18644
- this.progressStep.style.setProperty('--progress-position', (stepsContainer.offsetWidth / 2) + 'px');
18811
+ const stepsContainer = (wrapper.querySelector('.' + ITEMLIST));
18812
+ this.progressStep.style.setProperty(PROGRESSPOS, (stepsContainer.offsetWidth / 2) + 'px');
18645
18813
  }
18646
18814
  else {
18647
- this.progressStep.style.setProperty('--progress-position', ((this.progressBarPosition / 2) - 1) + 'px');
18815
+ this.progressStep.style.setProperty(PROGRESSPOS, ((this.progressBarPosition / 2) - 1) + 'px');
18648
18816
  }
18649
18817
  }
18650
18818
  if (beforeLabel && (beforeLabel.classList.contains('e-label-before'))) {
18651
- this.progressStep.style.setProperty('--progress-position', (((this.progressBarPosition) - 1)) + 5 + 'px');
18819
+ this.progressStep.style.setProperty(PROGRESSPOS, (((this.progressBarPosition) - 1)) + 5 + 'px');
18652
18820
  }
18653
- if (wrapper.classList.contains('e-horizontal')) {
18821
+ if (wrapper.classList.contains(HORIZSTEP)) {
18654
18822
  this.setProgressPosition(wrapper);
18655
18823
  }
18656
18824
  }
@@ -18667,9 +18835,9 @@ let StepperBase = class StepperBase extends Component {
18667
18835
  }
18668
18836
  this.progressStep.style.setProperty('--progress-top-position', topPos + 'px');
18669
18837
  }
18670
- const lastEle = wrapper.querySelector('.e-stepper-steps').lastChild.firstChild;
18838
+ const lastEle = wrapper.querySelector('.' + ITEMLIST).lastChild.firstChild;
18671
18839
  if (wrapper.classList.contains('e-rtl')) {
18672
- const leftPost = ((stepItemEle.offsetLeft + stepItemEle.offsetWidth) - wrapper.querySelector('.e-stepper-steps').offsetWidth);
18840
+ const leftPost = ((stepItemEle.offsetLeft + stepItemEle.offsetWidth) - wrapper.querySelector('.' + ITEMLIST).offsetWidth);
18673
18841
  this.progressStep.style.setProperty('--progress-left-position', Math.abs(leftPost) + 'px');
18674
18842
  this.progressStep.style.setProperty('--progress-bar-width', Math.abs(lastEle.offsetLeft - stepItemEle.offsetLeft) + 'px');
18675
18843
  }
@@ -18716,7 +18884,7 @@ var __decorate$e = (undefined && undefined.__decorate) || function (decorators,
18716
18884
  return c > 3 && r && Object.defineProperty(target, key, r), r;
18717
18885
  };
18718
18886
  const ITEMCONTAINER = 'e-step-container';
18719
- const ITEMLIST = 'e-stepper-steps';
18887
+ const ITEMLIST$1 = 'e-stepper-steps';
18720
18888
  const ICONCSS = 'e-indicator';
18721
18889
  const TEXTCSS = 'e-step-text-container';
18722
18890
  const STEPLABEL = 'e-step-label-container';
@@ -18733,8 +18901,8 @@ const RTL$3 = 'e-rtl';
18733
18901
  const TEMPLATE = 'e-step-template';
18734
18902
  const LABELAFTER = 'e-label-after';
18735
18903
  const LABELBEFORE = 'e-label-before';
18736
- const VERTICALSTEP = 'e-vertical';
18737
- const HORIZSTEP = 'e-horizontal';
18904
+ const VERTICALSTEP$1 = 'e-vertical';
18905
+ const HORIZSTEP$1 = 'e-horizontal';
18738
18906
  const STEPICON = 'e-step-item';
18739
18907
  const STEPTEXT = 'e-step-text';
18740
18908
  const TEXT = 'e-text';
@@ -18865,7 +19033,7 @@ let Stepper = class Stepper extends StepperBase {
18865
19033
  initialize() {
18866
19034
  this.element.setAttribute('aria-label', this.element.id);
18867
19035
  this.updatePosition();
18868
- this.stepperItemList = this.createElement('ol', { className: ITEMLIST });
19036
+ this.stepperItemList = this.createElement('ol', { className: ITEMLIST$1 });
18869
19037
  this.updateOrientaion(this.element);
18870
19038
  this.updateStepType();
18871
19039
  this.element.appendChild(this.stepperItemList);
@@ -18882,28 +19050,29 @@ let Stepper = class Stepper extends StepperBase {
18882
19050
  this.updateTemplateFunction();
18883
19051
  this.renderItems();
18884
19052
  if (this.steps.length > 0) {
18885
- if (this.steps.length > 1) {
18886
- if (this.isAngular && this.template) {
18887
- setTimeout(() => {
18888
- this.renderProgressBar(this.element);
18889
- });
18890
- }
18891
- else {
18892
- this.renderProgressBar(this.element);
18893
- }
18894
- }
19053
+ this.initiateProgressBar();
18895
19054
  this.checkValidStep();
18896
19055
  this.updateAnimation();
18897
19056
  this.updateTooltip();
18898
19057
  this.wireKeyboardEvent();
18899
19058
  }
18900
19059
  }
19060
+ initiateProgressBar() {
19061
+ if (this.steps.length > 1) {
19062
+ if (this.isAngular && this.template) {
19063
+ setTimeout(() => { this.renderProgressBar(this.element); });
19064
+ }
19065
+ else {
19066
+ this.renderProgressBar(this.element);
19067
+ }
19068
+ }
19069
+ }
18901
19070
  updatePosition() {
18902
19071
  this.progressBarPosition = this.beforeLabelWidth = this.textEleWidth = 0;
18903
19072
  }
18904
19073
  renderDefault(index) {
18905
- return (!this.steps[parseInt((index).toString(), 10)].iconCss && !this.steps[parseInt((index).toString(), 10)].text &&
18906
- !this.steps[parseInt((index).toString(), 10)].label) ? true : false;
19074
+ const step = this.steps[parseInt(index.toString(), 10)];
19075
+ return !step.iconCss && !step.text && !step.label;
18907
19076
  }
18908
19077
  updateAnimation() {
18909
19078
  const progressEle = this.element.querySelector('.e-progressbar-value');
@@ -18927,12 +19096,16 @@ let Stepper = class Stepper extends StepperBase {
18927
19096
  }
18928
19097
  }
18929
19098
  updateStepType() {
18930
- if (!(isNullOrUndefined(this.stepType)) && (this.stepType.toLowerCase() === 'indicator' || this.stepType.toLowerCase() === 'label' || this.stepType.toLowerCase() === 'default')) {
18931
- if (this.stepType.toLowerCase() !== 'default') {
18932
- this.element.classList.add('e-step-type-' + this.stepType.toLowerCase());
18933
- }
18934
- if (((this.stepType.toLowerCase() === 'indicator' || 'label') && (this.labelContainer))) {
18935
- this.clearLabelPosition();
19099
+ if (!isNullOrUndefined(this.stepType)) {
19100
+ const stepTypeLower = this.stepType.toLowerCase();
19101
+ const validStepTypes = ['indicator', 'label', 'default'];
19102
+ if (validStepTypes.indexOf(stepTypeLower) !== -1) {
19103
+ if (stepTypeLower !== 'default') {
19104
+ this.element.classList.add('e-step-type-' + stepTypeLower);
19105
+ }
19106
+ if ((stepTypeLower === 'indicator' || stepTypeLower === 'label') && this.labelContainer) {
19107
+ this.clearLabelPosition();
19108
+ }
18936
19109
  }
18937
19110
  }
18938
19111
  }
@@ -18945,7 +19118,7 @@ let Stepper = class Stepper extends StepperBase {
18945
19118
  EventHandler.remove(window, 'click', this.updateStepFocus);
18946
19119
  }
18947
19120
  updateResize() {
18948
- if (this.stepperItemList && this.progressbar && this.element.classList.contains(HORIZSTEP)) {
19121
+ if (this.stepperItemList && this.progressbar && this.element.classList.contains(HORIZSTEP$1)) {
18949
19122
  this.setProgressPosition(this.element, true);
18950
19123
  }
18951
19124
  this.navigateToStep(this.activeStep, null, null, false, false);
@@ -19004,19 +19177,23 @@ let Stepper = class Stepper extends StepperBase {
19004
19177
  }
19005
19178
  }
19006
19179
  renderItems() {
19180
+ const isHorizontal = this.element.classList.contains(HORIZSTEP$1);
19181
+ const isVertical = this.element.classList.contains(VERTICALSTEP$1);
19182
+ const labelPositionLower = !isNullOrUndefined(this.labelPosition) ? this.labelPosition.toLowerCase() : '';
19007
19183
  for (let index = 0; index < this.steps.length; index++) {
19008
19184
  this.stepperItemContainer = this.createElement('li', { className: ITEMCONTAINER });
19009
- this.stepperItemContainer.classList[(index === 0) ? 'add' : 'remove'](SELECTED$2, INPROGRESS);
19010
- this.stepperItemContainer.classList[(index !== 0) ? 'add' : 'remove'](NOTSTARTED);
19011
- if (this.element.classList.contains(HORIZSTEP)) {
19012
- this.stepperItemContainer.style.setProperty('--max-width', 100 / this.steps.length + '%');
19013
- }
19014
19185
  const stepSpan = this.createElement('span', { className: 'e-step' });
19015
19186
  const item = this.steps[parseInt(index.toString(), 10)];
19016
19187
  let isItemLabel = item.label ? true : false;
19017
19188
  let isItemText = item.text ? true : false;
19189
+ const isIndicator = this.element.classList.contains(STEPINDICATOR);
19190
+ this.stepperItemContainer.classList[(index === 0) ? 'add' : 'remove'](SELECTED$2, INPROGRESS);
19191
+ this.stepperItemContainer.classList[(index !== 0) ? 'add' : 'remove'](NOTSTARTED);
19192
+ if (isHorizontal) {
19193
+ this.stepperItemContainer.style.setProperty('--max-width', 100 / this.steps.length + '%');
19194
+ }
19018
19195
  if (this.renderDefault(index) && (isNullOrUndefined(this.template) || this.template === '')) {
19019
- const isIndicator = (!this.element.classList.contains('e-step-type-default') && this.stepType.toLowerCase() === 'indicator') ? true : false;
19196
+ const isIndicator = !this.element.classList.contains('e-step-type-default') && this.stepType.toLowerCase() === 'indicator';
19020
19197
  if (isIndicator) {
19021
19198
  stepSpan.classList.add('e-icons', INDICATORICON);
19022
19199
  }
@@ -19032,10 +19209,7 @@ let Stepper = class Stepper extends StepperBase {
19032
19209
  !this.element.classList.contains(LABELINDICATOR)))) {
19033
19210
  if (item.iconCss) {
19034
19211
  const itemIcon = item.iconCss.trim().split(' ');
19035
- stepSpan.classList.add(ICONCSS);
19036
- for (let i = 0; i < itemIcon.length; i++) {
19037
- stepSpan.classList.add(itemIcon[parseInt(i.toString(), 10)]);
19038
- }
19212
+ stepSpan.classList.add(ICONCSS, ...itemIcon);
19039
19213
  this.stepperItemContainer.classList.add(STEPICON);
19040
19214
  }
19041
19215
  else if (!item.iconCss && isItemText && isItemLabel) {
@@ -19044,51 +19218,41 @@ let Stepper = class Stepper extends StepperBase {
19044
19218
  this.stepperItemContainer.classList.add(STEPICON);
19045
19219
  }
19046
19220
  this.stepperItemContainer.appendChild(stepSpan);
19047
- if ((this.element.classList.contains(HORIZSTEP) && (this.labelPosition.toLowerCase() === 'start' || this.labelPosition.toLowerCase() === 'end') && isItemLabel) ||
19048
- (this.element.classList.contains(VERTICALSTEP) && (this.labelPosition.toLowerCase() === 'top' || this.labelPosition.toLowerCase() === 'bottom') && isItemLabel)) {
19049
- this.element.classList.add('e-label-' + this.labelPosition.toLowerCase());
19050
- const textSpan = this.createElement('span', { className: TEXTCSS + ' ' + TEXT });
19051
- textSpan.innerText = item.label;
19052
- this.stepperItemContainer.appendChild(textSpan);
19053
- this.stepperItemContainer.classList.add(STEPTEXT);
19221
+ if (((isHorizontal && (labelPositionLower === 'start' || labelPositionLower === 'end') && isItemLabel) ||
19222
+ (isVertical && (labelPositionLower === 'top' || labelPositionLower === 'bottom') && isItemLabel)) && !isIndicator) {
19223
+ this.element.classList.add('e-label-' + labelPositionLower);
19224
+ this.createTextLabelElement(item.label);
19054
19225
  isRender = false;
19055
19226
  }
19056
19227
  }
19057
- if (isItemText && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender &&
19228
+ if (isItemText && (!item.iconCss || !isIndicator) && isRender &&
19058
19229
  !(item.iconCss && isItemLabel)) {
19059
- if ((!item.iconCss && this.element.classList.contains(STEPINDICATOR)) ||
19230
+ if ((!item.iconCss && isIndicator) ||
19060
19231
  ((!item.iconCss || this.element.classList.contains(LABELINDICATOR)) && !isItemLabel)) {
19061
19232
  if (!item.iconCss && !isItemLabel) {
19062
19233
  this.element.classList.add('e-step-type-indicator');
19063
19234
  }
19064
19235
  this.checkValidState(item, stepSpan);
19065
- isItemLabel = null;
19236
+ isItemLabel = false;
19066
19237
  }
19067
19238
  else {
19068
- const textSpan = this.createElement('span', { className: TEXT });
19069
19239
  if (!isItemLabel) {
19070
- textSpan.innerText = item.text;
19071
- textSpan.classList.add(TEXTCSS);
19072
- this.stepperItemContainer.appendChild(textSpan);
19073
- this.stepperItemContainer.classList.add(STEPTEXT);
19240
+ this.createTextLabelElement(item.text);
19074
19241
  }
19075
19242
  if (isItemLabel && this.element.classList.contains(LABELINDICATOR)) {
19243
+ const textSpan = this.createElement('span', { className: TEXT });
19076
19244
  textSpan.innerText = item.label;
19077
19245
  }
19078
- isItemText = item.label ? false : true;
19246
+ isItemText = isItemLabel ? false : true;
19079
19247
  }
19080
19248
  }
19081
- if (isItemLabel && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender) {
19082
- if (!item.iconCss && !isItemText && this.element.classList.contains(STEPINDICATOR)) {
19249
+ if (isItemLabel && isItemLabel && (!item.iconCss || !isIndicator) && isRender) {
19250
+ if (!item.iconCss && !isItemText && isIndicator) {
19083
19251
  this.checkValidState(item, stepSpan, true);
19084
19252
  }
19085
19253
  else if ((!((this.element.classList.contains(LABELINDICATOR)) && isItemText)) ||
19086
19254
  (this.element.classList.contains(LABELINDICATOR) && isItemLabel)) {
19087
- this.labelContainer = this.createElement('span', { className: STEPLABEL });
19088
- const labelSpan = this.createElement('span', { className: LABEL });
19089
- labelSpan.innerText = item.label;
19090
- this.labelContainer.appendChild(labelSpan);
19091
- this.stepperItemContainer.classList.add(STEPSLABEL);
19255
+ this.createTextLabelElement(item.label, true);
19092
19256
  this.updateLabelPosition();
19093
19257
  if ((!item.iconCss && !isItemText && !this.stepperItemContainer.classList.contains(STEPICON)) ||
19094
19258
  this.element.classList.contains(LABELINDICATOR)) {
@@ -19107,8 +19271,8 @@ let Stepper = class Stepper extends StepperBase {
19107
19271
  const optionalContent = this.l10n.getConstant('optional');
19108
19272
  optionalSpan.innerText = optionalContent;
19109
19273
  if (isItemLabel && (this.labelContainer && ((this.element.classList.contains(LABELAFTER) && !this.stepperItemContainer.classList.contains('e-step-label-only'))
19110
- || (this.element.classList.contains(HORIZSTEP) && this.element.classList.contains(LABELBEFORE) && !this.stepperItemContainer.classList.contains('e-step-label-only'))))
19111
- || (this.element.classList.contains(VERTICALSTEP) && this.element.classList.contains(LABELBEFORE))) {
19274
+ || (isHorizontal && this.element.classList.contains(LABELBEFORE) && !this.stepperItemContainer.classList.contains('e-step-label-only'))))
19275
+ || (isVertical && this.element.classList.contains(LABELBEFORE))) {
19112
19276
  this.labelContainer.appendChild(optionalSpan);
19113
19277
  }
19114
19278
  else {
@@ -19146,16 +19310,16 @@ let Stepper = class Stepper extends StepperBase {
19146
19310
  this.trigger('beforeStepRender', eventArgs, (args) => {
19147
19311
  this.stepperItemList.appendChild(args.element);
19148
19312
  });
19149
- if (this.isAngular && this.template) {
19150
- setTimeout(() => {
19313
+ if (isVertical) {
19314
+ if (this.isAngular && this.template) {
19315
+ setTimeout(() => { this.calculateProgressBarPosition(); });
19316
+ }
19317
+ else {
19151
19318
  this.calculateProgressBarPosition();
19152
- });
19153
- }
19154
- else {
19155
- this.calculateProgressBarPosition();
19319
+ }
19156
19320
  }
19157
19321
  }
19158
- if (this.element.classList.contains(VERTICALSTEP)) {
19322
+ if (isVertical) {
19159
19323
  if (this.element.classList.contains(LABELBEFORE)) {
19160
19324
  const listItems = this.stepperItemList.querySelectorAll('.' + LABEL);
19161
19325
  for (let i = 0; i < listItems.length; i++) {
@@ -19165,37 +19329,47 @@ let Stepper = class Stepper extends StepperBase {
19165
19329
  }
19166
19330
  }
19167
19331
  }
19332
+ createTextLabelElement(content, isLabelEle = false) {
19333
+ const spanEle = this.createElement('span', { className: isLabelEle ? LABEL : `${TEXTCSS} ${TEXT}` });
19334
+ spanEle.innerText = content;
19335
+ if (isLabelEle) {
19336
+ this.labelContainer = this.createElement('span', { className: STEPLABEL });
19337
+ this.labelContainer.appendChild(spanEle);
19338
+ }
19339
+ else {
19340
+ this.stepperItemContainer.appendChild(spanEle);
19341
+ }
19342
+ this.stepperItemContainer.classList.add(isLabelEle ? STEPSLABEL : STEPTEXT);
19343
+ }
19168
19344
  calculateProgressBarPosition() {
19169
19345
  const isBeforeLabel = (this.element.classList.contains(LABELBEFORE)) ? true : false;
19170
- const isStepVertical = (this.element.classList.contains(VERTICALSTEP)) ? true : false;
19171
- if (isStepVertical) {
19172
- const iconOnly = (this.stepperItemContainer.classList.contains(STEPICON) &&
19173
- !this.stepperItemContainer.classList.contains(STEPTEXT) &&
19174
- !this.stepperItemContainer.classList.contains(STEPSLABEL)) ? true : false;
19175
- const textEle = (this.stepperItemContainer.querySelector('.' + TEXTCSS));
19176
- if (textEle) {
19177
- this.textEleWidth = this.textEleWidth < textEle.offsetWidth ? textEle.offsetWidth : this.textEleWidth;
19346
+ const iconOnly = (this.stepperItemContainer.classList.contains(STEPICON) &&
19347
+ !this.stepperItemContainer.classList.contains(STEPTEXT) &&
19348
+ !this.stepperItemContainer.classList.contains(STEPSLABEL));
19349
+ const textEle = (this.stepperItemContainer.querySelector('.' + TEXTCSS));
19350
+ if (textEle) {
19351
+ this.textEleWidth = this.textEleWidth < textEle.offsetWidth ? textEle.offsetWidth : this.textEleWidth;
19352
+ }
19353
+ if (isBeforeLabel) {
19354
+ const labelWidth = this.stepperItemContainer.querySelector('.' + LABEL).offsetWidth + 15;
19355
+ this.beforeLabelWidth = Math.max(this.beforeLabelWidth, labelWidth);
19356
+ const iconEle = this.element.querySelector('ol').lastChild.querySelector('.' + ICONCSS);
19357
+ const textEle = this.stepperItemContainer.querySelector('.' + TEXTCSS);
19358
+ if (iconEle || textEle) {
19359
+ const itemWidth = this.beforeLabelWidth + ((this.stepperItemContainer.querySelector('.' + ICONCSS)
19360
+ || textEle).offsetWidth / 2);
19361
+ this.progressBarPosition = Math.max(this.progressBarPosition, itemWidth);
19178
19362
  }
19179
- if (isBeforeLabel) {
19180
- let itemWidth;
19181
- const labelWidth = this.stepperItemContainer.querySelector('.' + LABEL).offsetWidth + 15;
19182
- if (this.beforeLabelWidth < labelWidth) {
19183
- this.beforeLabelWidth = labelWidth;
19184
- }
19185
- if (this.element.querySelector('ol').lastChild.querySelector('.' + ICONCSS)) {
19186
- itemWidth = (this.beforeLabelWidth + (this.stepperItemContainer.querySelector('.' + ICONCSS).offsetWidth / 2));
19187
- }
19188
- else if (this.stepperItemContainer.querySelector('.' + TEXTCSS)) {
19189
- itemWidth = (this.beforeLabelWidth + (this.stepperItemContainer.querySelector('.' + TEXTCSS).offsetWidth / 2));
19190
- }
19191
- if (this.progressBarPosition < itemWidth) {
19192
- this.progressBarPosition = itemWidth;
19193
- }
19194
- }
19195
- else if (this.progressBarPosition < (iconOnly ? this.stepperItemContainer.offsetWidth : this.element.querySelector('ol').lastChild.firstChild.offsetWidth)) {
19196
- this.progressBarPosition = iconOnly ? this.stepperItemContainer.offsetWidth : this.element.querySelector('ol').lastChild.firstChild.offsetWidth;
19363
+ else {
19364
+ this.progressBarPosition = Math.max(this.progressBarPosition, (this.beforeLabelWidth / 2));
19197
19365
  }
19198
19366
  }
19367
+ else {
19368
+ const lastChild = this.element.querySelector('ol').lastChild;
19369
+ const lastChildWidth = iconOnly ? this.stepperItemContainer.offsetWidth :
19370
+ lastChild.firstChild.offsetWidth;
19371
+ this.progressBarPosition = Math.max(this.progressBarPosition, lastChildWidth);
19372
+ }
19199
19373
  }
19200
19374
  checkValidState(item, stepSpan, isLabel) {
19201
19375
  if (item.isValid == null) {
@@ -19215,13 +19389,10 @@ let Stepper = class Stepper extends StepperBase {
19215
19389
  }
19216
19390
  }
19217
19391
  updateCurrentLabel() {
19218
- let currentLabelPos;
19219
- if (this.element.classList.contains(HORIZSTEP)) {
19220
- currentLabelPos = this.labelPosition.toLowerCase() === 'top' ? 'before' : this.labelPosition.toLowerCase() === 'bottom' ? 'after' : this.labelPosition.toLowerCase();
19221
- }
19222
- else {
19223
- currentLabelPos = this.labelPosition.toLowerCase() === 'start' ? 'before' : this.labelPosition.toLowerCase() === 'end' ? 'after' : this.labelPosition.toLowerCase();
19224
- }
19392
+ const labelPos = this.labelPosition.toLowerCase();
19393
+ const currentLabelPos = this.element.classList.contains(HORIZSTEP$1)
19394
+ ? (labelPos === 'top' ? 'before' : labelPos === 'bottom' ? 'after' : labelPos)
19395
+ : (labelPos === 'start' ? 'before' : labelPos === 'end' ? 'after' : labelPos);
19225
19396
  return currentLabelPos;
19226
19397
  }
19227
19398
  updateLabelPosition() {
@@ -19248,49 +19419,49 @@ let Stepper = class Stepper extends StepperBase {
19248
19419
  }
19249
19420
  }
19250
19421
  checkValidStep() {
19422
+ const isStepIndicator = this.element.classList.contains(STEPINDICATOR);
19251
19423
  for (let index = 0; index < this.steps.length; index++) {
19252
19424
  const item = this.steps[parseInt(index.toString(), 10)];
19253
19425
  const itemElement = this.stepperItemElements[parseInt(index.toString(), 10)];
19254
19426
  if (item.isValid !== null) {
19255
19427
  let indicatorEle;
19256
19428
  let iconEle;
19257
- if (this.element.classList.contains(STEPINDICATOR) && !item.iconCss) {
19429
+ if (isStepIndicator && !item.iconCss) {
19258
19430
  indicatorEle = itemElement.querySelector('.' + ICONCSS);
19259
19431
  }
19260
19432
  else {
19261
19433
  iconEle = itemElement.querySelector('.' + ICONCSS);
19262
19434
  }
19263
- if (!indicatorEle && this.element.classList.contains(STEPINDICATOR) && this.renderDefault(index)) {
19435
+ if (!indicatorEle && isStepIndicator && this.renderDefault(index)) {
19264
19436
  indicatorEle = itemElement.querySelector('.' + INDICATORICON);
19265
19437
  }
19266
19438
  const textLabelIcon = itemElement.querySelector('.e-step-validation-icon');
19267
19439
  const itemIcon = item.iconCss.trim().split(' ');
19268
19440
  const validStep = itemElement.classList.contains('e-step-valid');
19441
+ const validIconClass = validStep ? 'e-check' : 'e-circle-info';
19269
19442
  if (indicatorEle) {
19270
19443
  indicatorEle.classList.remove(INDICATORICON);
19271
19444
  if (indicatorEle.innerHTML !== '') {
19272
19445
  indicatorEle.innerHTML = '';
19273
19446
  }
19274
- indicatorEle.classList.add('e-icons', validStep ? 'e-check' : 'e-circle-info', ICONCSS);
19447
+ indicatorEle.classList.add('e-icons', validIconClass, ICONCSS);
19275
19448
  }
19276
- if (this.renderDefault(index) && !this.element.classList.contains(STEPINDICATOR)) {
19449
+ if (this.renderDefault(index) && !isStepIndicator) {
19277
19450
  const stepSpan = itemElement.querySelector('.e-step');
19278
- stepSpan.classList.add('e-icons', validStep ? 'e-check' : 'e-circle-info', ICONCSS);
19451
+ stepSpan.classList.add('e-icons', validIconClass, ICONCSS);
19279
19452
  }
19280
19453
  if (iconEle) {
19281
19454
  if (iconEle.innerHTML !== '') {
19282
19455
  iconEle.innerHTML = '';
19283
19456
  }
19284
19457
  else if (itemIcon.length > 0) {
19285
- for (let i = 0; i < itemIcon.length; i++) {
19286
- iconEle.classList.remove(itemIcon[parseInt(i.toString(), 10)]);
19287
- }
19458
+ itemIcon.forEach((icon) => { iconEle.classList.remove(icon); });
19288
19459
  }
19289
- iconEle.classList.add('e-icons', validStep ? 'e-check' : 'e-circle-info');
19460
+ iconEle.classList.add('e-icons', validIconClass);
19290
19461
  }
19291
19462
  if (textLabelIcon) {
19292
19463
  textLabelIcon.classList.add(validStep ? 'e-circle-check' : 'e-circle-info');
19293
- if (this.element.classList.contains(VERTICALSTEP)) {
19464
+ if (this.element.classList.contains(VERTICALSTEP$1)) {
19294
19465
  const labelEle = itemElement.querySelector('.' + LABEL);
19295
19466
  const textEle = itemElement.querySelector('.' + TEXT);
19296
19467
  const itemWidth = textEle ? textEle.offsetWidth + textEle.getBoundingClientRect().left :
@@ -19319,19 +19490,28 @@ let Stepper = class Stepper extends StepperBase {
19319
19490
  }
19320
19491
  }
19321
19492
  wireItemsEvents(itemElement, index) {
19322
- EventHandler.add(itemElement, 'click', (e) => {
19323
- if (this.linear) {
19324
- const linearModeValue = index - this.activeStep;
19325
- if (Math.abs(linearModeValue) === 1) {
19326
- this.stepClickHandler(index, e, itemElement);
19327
- }
19328
- }
19329
- else {
19493
+ EventHandler.add(itemElement, 'click', this.linearModeHandler.bind(this, itemElement, index), this);
19494
+ EventHandler.add(itemElement, 'mouseover', this.openStepperTooltip.bind(this, index), this);
19495
+ EventHandler.add(itemElement, 'mouseleave', this.closeStepperTooltip, this);
19496
+ }
19497
+ unWireItemsEvents() {
19498
+ for (let index = 0; index < this.steps.length; index++) {
19499
+ const itemElement = this.stepperItemElements[parseInt(index.toString(), 10)];
19500
+ EventHandler.remove(itemElement, 'click', this.linearModeHandler.bind(this, itemElement, index));
19501
+ EventHandler.remove(itemElement, 'mouseover', this.openStepperTooltip.bind(this, index));
19502
+ EventHandler.remove(itemElement, 'mouseleave', this.closeStepperTooltip);
19503
+ }
19504
+ }
19505
+ linearModeHandler(itemElement, index, e) {
19506
+ if (this.linear) {
19507
+ const linearModeValue = index - this.activeStep;
19508
+ if (Math.abs(linearModeValue) === 1) {
19330
19509
  this.stepClickHandler(index, e, itemElement);
19331
19510
  }
19332
- }, this);
19333
- EventHandler.add(itemElement, 'mouseover', () => this.openStepperTooltip(index), this);
19334
- EventHandler.add(itemElement, 'mouseleave', () => this.closeStepperTooltip(), this);
19511
+ }
19512
+ else {
19513
+ this.stepClickHandler(index, e, itemElement);
19514
+ }
19335
19515
  }
19336
19516
  openStepperTooltip(index) {
19337
19517
  const currentStep = this.steps[parseInt(index.toString(), 10)];
@@ -19472,7 +19652,7 @@ let Stepper = class Stepper extends StepperBase {
19472
19652
  }
19473
19653
  }
19474
19654
  navigationHandler(index, stepStatus, isUpdated) {
19475
- index = (index >= this.steps.length - 1) ? this.steps.length - 1 : index;
19655
+ index = Math.min(index, this.steps.length - 1);
19476
19656
  const Itemslength = this.stepperItemElements.length;
19477
19657
  if (index >= 0 && index < Itemslength - 1) {
19478
19658
  index = this.stepperItemElements[parseInt(index.toString(), 10)].classList.contains(DISABLED$2) ? this.activeStep : index;
@@ -19489,46 +19669,8 @@ let Stepper = class Stepper extends StepperBase {
19489
19669
  itemElement.classList.add(SELECTED$2);
19490
19670
  }
19491
19671
  if (this.activeStep >= 0 && this.progressbar) {
19492
- if (this.element.classList.contains(HORIZSTEP)) {
19493
- if ((this.element.classList.contains(LABELBEFORE) || this.element.classList.contains(LABELAFTER)) &&
19494
- !this.element.classList.contains(STEPINDICATOR) &&
19495
- this.stepperItemElements[parseInt(this.activeStep.toString(), 10)].classList.contains(STEPICON)) {
19496
- const progressPos = this.element.querySelector('.e-stepper-progressbar');
19497
- const selectedEle = this.stepperItemElements[parseInt(this.activeStep.toString(), 10)]
19498
- .firstChild;
19499
- let value = this.activeStep === 0 ? 0 : (selectedEle.offsetLeft - progressPos.offsetLeft +
19500
- (selectedEle.offsetWidth / 2)) / progressPos.offsetWidth * 100;
19501
- if (this.element.classList.contains(RTL$3)) {
19502
- value = (progressPos.getBoundingClientRect().right - selectedEle.getBoundingClientRect().right +
19503
- (selectedEle.offsetWidth / 2)) / progressPos.offsetWidth * 100;
19504
- this.progressbar.style.setProperty(PROGRESSVALUE$1, (value) + '%');
19505
- }
19506
- else {
19507
- this.progressbar.style.setProperty(PROGRESSVALUE$1, (value) + '%');
19508
- }
19509
- }
19510
- else {
19511
- let totalLiWidth = 0;
19512
- let activeLiWidth = 0;
19513
- for (let j = 0; j < this.stepperItemElements.length; j++) {
19514
- totalLiWidth = totalLiWidth + this.stepperItemElements[parseInt(j.toString(), 10)].offsetWidth;
19515
- if (j <= this.activeStep) {
19516
- if (j < this.activeStep) {
19517
- activeLiWidth = activeLiWidth +
19518
- this.stepperItemElements[parseInt(j.toString(), 10)].offsetWidth;
19519
- }
19520
- else if (j === this.activeStep && j !== 0) {
19521
- activeLiWidth = activeLiWidth +
19522
- (this.stepperItemElements[parseInt(j.toString(), 10)].offsetWidth / 2);
19523
- }
19524
- }
19525
- }
19526
- const spaceWidth = (this.stepperItemList.offsetWidth - totalLiWidth) /
19527
- (this.stepperItemElements.length - 1);
19528
- const progressValue = ((activeLiWidth + (spaceWidth * this.activeStep)) /
19529
- this.stepperItemList.offsetWidth) * 100;
19530
- this.progressbar.style.setProperty(PROGRESSVALUE$1, (progressValue) + '%');
19531
- }
19672
+ if (this.element.classList.contains(HORIZSTEP$1)) {
19673
+ this.calculateProgressbarPos();
19532
19674
  }
19533
19675
  else {
19534
19676
  this.progressbar.style.setProperty(PROGRESSVALUE$1, ((100 / (this.steps.length - 1)) * index) + '%');
@@ -19577,26 +19719,63 @@ let Stepper = class Stepper extends StepperBase {
19577
19719
  }
19578
19720
  }
19579
19721
  this.isProtectedOnChange = prevOnChange;
19580
- if (this.renderDefault(i) && this.element.classList.contains(STEPINDICATOR) && !itemElement.classList.contains('e-step-valid') && !itemElement.classList.contains('e-step-error')) {
19581
- if (itemElement.classList.contains(COMPLETED)) {
19582
- itemElement.firstChild.classList.remove('e-icons', 'e-step-indicator');
19583
- itemElement.firstChild.classList.add(ICONCSS, 'e-icons', 'e-check');
19584
- }
19585
- else if (itemElement.classList.contains(INPROGRESS) || itemElement.classList.contains(NOTSTARTED)) {
19586
- itemElement.firstChild.classList.remove(ICONCSS, 'e-icons', 'e-check');
19587
- itemElement.firstChild.classList.add('e-icons', 'e-step-indicator');
19722
+ this.updateIndicatorStatus(i, itemElement);
19723
+ }
19724
+ this.updateStepInteractions();
19725
+ }
19726
+ calculateProgressbarPos() {
19727
+ if ((this.element.classList.contains(LABELBEFORE) || this.element.classList.contains(LABELAFTER)) &&
19728
+ !this.element.classList.contains(STEPINDICATOR) &&
19729
+ this.stepperItemElements[parseInt(this.activeStep.toString(), 10)].classList.contains(STEPICON)) {
19730
+ const progressPos = this.element.querySelector('.e-stepper-progressbar');
19731
+ const selectedEle = this.stepperItemElements[parseInt(this.activeStep.toString(), 10)]
19732
+ .firstChild;
19733
+ let value = this.activeStep === 0 ? 0 : (selectedEle.offsetLeft - progressPos.offsetLeft +
19734
+ (selectedEle.offsetWidth / 2)) / progressPos.offsetWidth * 100;
19735
+ if (this.element.classList.contains(RTL$3)) {
19736
+ value = (progressPos.getBoundingClientRect().right - selectedEle.getBoundingClientRect().right +
19737
+ (selectedEle.offsetWidth / 2)) / progressPos.offsetWidth * 100;
19738
+ this.progressbar.style.setProperty(PROGRESSVALUE$1, (value) + '%');
19739
+ }
19740
+ else {
19741
+ this.progressbar.style.setProperty(PROGRESSVALUE$1, (value) + '%');
19742
+ }
19743
+ }
19744
+ else {
19745
+ let totalLiWidth = 0;
19746
+ let activeLiWidth = 0;
19747
+ this.stepperItemElements.forEach((element, index) => {
19748
+ const itemWidth = element.offsetWidth;
19749
+ totalLiWidth += itemWidth;
19750
+ if (index <= this.activeStep) {
19751
+ activeLiWidth += (index === this.activeStep && index !== 0) ? (itemWidth / 2) : itemWidth;
19588
19752
  }
19753
+ });
19754
+ const spaceWidth = (this.stepperItemList.offsetWidth - totalLiWidth) /
19755
+ (this.stepperItemElements.length - 1);
19756
+ const progressValue = ((activeLiWidth + (spaceWidth * this.activeStep)) /
19757
+ this.stepperItemList.offsetWidth) * 100;
19758
+ this.progressbar.style.setProperty(PROGRESSVALUE$1, (progressValue) + '%');
19759
+ }
19760
+ }
19761
+ updateIndicatorStatus(index, itemElement) {
19762
+ if (this.renderDefault(index) && this.element.classList.contains(STEPINDICATOR) && !itemElement.classList.contains('e-step-valid')
19763
+ && !itemElement.classList.contains('e-step-error')) {
19764
+ if (itemElement.classList.contains(COMPLETED)) {
19765
+ itemElement.firstChild.classList.remove('e-icons', 'e-step-indicator');
19766
+ itemElement.firstChild.classList.add(ICONCSS, 'e-icons', 'e-check');
19767
+ }
19768
+ else if (itemElement.classList.contains(INPROGRESS) || itemElement.classList.contains(NOTSTARTED)) {
19769
+ itemElement.firstChild.classList.remove(ICONCSS, 'e-icons', 'e-check');
19770
+ itemElement.firstChild.classList.add('e-icons', 'e-step-indicator');
19589
19771
  }
19590
19772
  }
19591
- this.updateStepInteractions();
19592
19773
  }
19593
19774
  updateStepInteractions() {
19594
19775
  this.element.classList.toggle(LINEARSTEP, this.linear);
19595
19776
  this.stepperItemElements.forEach((step, index) => {
19596
- const isPreviousStep = (index === this.activeStep - 1);
19597
- const isNextStep = (index === this.activeStep + 1);
19598
- step.classList.toggle(PREVSTEP, isPreviousStep);
19599
- step.classList.toggle(NEXTSTEP, isNextStep);
19777
+ step.classList.toggle(PREVSTEP, (index === this.activeStep - 1));
19778
+ step.classList.toggle(NEXTSTEP, (index === this.activeStep + 1));
19600
19779
  });
19601
19780
  }
19602
19781
  removeItemElements() {
@@ -19652,7 +19831,7 @@ let Stepper = class Stepper extends StepperBase {
19652
19831
  }
19653
19832
  updateElementClassArray() {
19654
19833
  const classArray = [RTL$3, READONLY, 'e-steps-focus', LABELAFTER, LABELBEFORE, 'e-label-top',
19655
- 'e-label-bottom', 'e-label-start', 'e-label-end', STEPINDICATOR, LABELINDICATOR, VERTICALSTEP, HORIZSTEP, LINEARSTEP];
19834
+ 'e-label-bottom', 'e-label-start', 'e-label-end', STEPINDICATOR, LABELINDICATOR, VERTICALSTEP$1, HORIZSTEP$1, LINEARSTEP];
19656
19835
  removeClass([this.element], classArray);
19657
19836
  }
19658
19837
  /**
@@ -19663,6 +19842,7 @@ let Stepper = class Stepper extends StepperBase {
19663
19842
  destroy() {
19664
19843
  super.destroy();
19665
19844
  this.unWireEvents();
19845
+ this.unWireItemsEvents();
19666
19846
  // unwires the events and detach the li elements
19667
19847
  this.removeItemElements();
19668
19848
  this.clearTemplate();
@@ -19708,7 +19888,7 @@ let Stepper = class Stepper extends StepperBase {
19708
19888
  case 'rightarrow':
19709
19889
  case 'tab':
19710
19890
  case 'shiftTab':
19711
- 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);
19891
+ 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);
19712
19892
  break;
19713
19893
  case 'space':
19714
19894
  case 'enter':
@@ -19809,6 +19989,66 @@ let Stepper = class Stepper extends StepperBase {
19809
19989
  this.updateAnimation();
19810
19990
  this.navigateToStep(this.activeStep, null, this.stepperItemElements[this.activeStep], true);
19811
19991
  }
19992
+ updateDynamicSteps(steps, prevSteps) {
19993
+ if (!(steps instanceof Array && prevSteps instanceof Array)) {
19994
+ const stepCounts = Object.keys(steps);
19995
+ for (let i = 0; i < stepCounts.length; i++) {
19996
+ const index = parseInt(Object.keys(steps)[i], 10);
19997
+ const changedPropsCount = Object.keys(steps[index]).length;
19998
+ for (let j = 0; j < changedPropsCount; j++) {
19999
+ const property = Object.keys(steps[index])[j];
20000
+ if (property === 'status') {
20001
+ if (this.activeStep === index) {
20002
+ this.navigationHandler(index, steps[index].status);
20003
+ }
20004
+ else {
20005
+ this.steps[index].status = prevSteps[index].status;
20006
+ }
20007
+ }
20008
+ else {
20009
+ this.removeItemElements();
20010
+ this.renderItems();
20011
+ this.updateStepperStatus();
20012
+ }
20013
+ if (property === 'label' && (this.steps[index].iconCss || this.steps[index].text) &&
20014
+ this.stepType.toLowerCase() === 'default') {
20015
+ this.refreshProgressbar();
20016
+ }
20017
+ this.updateStepInteractions();
20018
+ this.checkValidStep();
20019
+ }
20020
+ }
20021
+ }
20022
+ else {
20023
+ this.renderStepperItems(true, true);
20024
+ }
20025
+ }
20026
+ updateDynamicActiveStep(activeStep, preActiveStep) {
20027
+ this.activeStep = (activeStep > this.steps.length - 1 || activeStep < -1) ? preActiveStep : this.activeStep;
20028
+ if (this.activeStep >= 0 && this.stepperItemElements[parseInt(this.activeStep.toString(), 10)].classList.contains(DISABLED$2)) {
20029
+ this.activeStep = preActiveStep;
20030
+ }
20031
+ if (this.linear) {
20032
+ const linearModeValue = preActiveStep - this.activeStep;
20033
+ if (Math.abs(linearModeValue) === 1) {
20034
+ this.navigateToStep(this.activeStep, null, null, true);
20035
+ }
20036
+ }
20037
+ else {
20038
+ this.navigateToStep(this.activeStep, null, this.stepperItemElements[this.activeStep], true);
20039
+ }
20040
+ }
20041
+ updateDynamicCssClass(cssClass, prevCssClass) {
20042
+ if (prevCssClass) {
20043
+ removeClass([this.element], prevCssClass.trim().split(' '));
20044
+ }
20045
+ if (cssClass) {
20046
+ addClass([this.element], cssClass.trim().split(' '));
20047
+ }
20048
+ if (this.tooltipObj) {
20049
+ this.tooltipObj.setProperties({ cssClass: this.cssClass ? (STEPPERTOOLTIP + ' ' + this.cssClass) : STEPPERTOOLTIP });
20050
+ }
20051
+ }
19812
20052
  /**
19813
20053
  * Called internally if any of the property value changed.
19814
20054
  *
@@ -19821,38 +20061,7 @@ let Stepper = class Stepper extends StepperBase {
19821
20061
  for (const prop of Object.keys(newProp)) {
19822
20062
  switch (prop) {
19823
20063
  case 'steps': {
19824
- if (!(newProp.steps instanceof Array && oldProp.steps instanceof Array)) {
19825
- const stepCounts = Object.keys(newProp.steps);
19826
- for (let i = 0; i < stepCounts.length; i++) {
19827
- const index = parseInt(Object.keys(newProp.steps)[i], 10);
19828
- const changedPropsCount = Object.keys(newProp.steps[index]).length;
19829
- for (let j = 0; j < changedPropsCount; j++) {
19830
- const property = Object.keys(newProp.steps[index])[j];
19831
- if (property === 'status') {
19832
- if (this.activeStep === index) {
19833
- this.navigationHandler(index, newProp.steps[index].status);
19834
- }
19835
- else {
19836
- this.steps[index].status = oldProp.steps[index].status;
19837
- }
19838
- }
19839
- else {
19840
- this.removeItemElements();
19841
- this.renderItems();
19842
- this.updateStepperStatus();
19843
- }
19844
- if (property === 'label' && (this.steps[index].iconCss || this.steps[index].text) &&
19845
- this.stepType.toLowerCase() === 'default') {
19846
- this.refreshProgressbar();
19847
- }
19848
- this.updateStepInteractions();
19849
- this.checkValidStep();
19850
- }
19851
- }
19852
- }
19853
- else {
19854
- this.renderStepperItems(true, true);
19855
- }
20064
+ this.updateDynamicSteps(newProp.steps, oldProp.steps);
19856
20065
  break;
19857
20066
  }
19858
20067
  case 'orientation':
@@ -19860,21 +20069,7 @@ let Stepper = class Stepper extends StepperBase {
19860
20069
  this.renderStepperItems(true);
19861
20070
  break;
19862
20071
  case 'activeStep':
19863
- this.activeStep = (newProp.activeStep > this.steps.length - 1 || newProp.activeStep < -1) ?
19864
- oldProp.activeStep : this.activeStep;
19865
- if (this.activeStep >= 0 && this.stepperItemElements[parseInt(this.activeStep.toString(), 10)]
19866
- .classList.contains(DISABLED$2)) {
19867
- this.activeStep = oldProp.activeStep;
19868
- }
19869
- if (this.linear) {
19870
- const linearModeValue = oldProp.activeStep - this.activeStep;
19871
- if (Math.abs(linearModeValue) === 1) {
19872
- this.navigateToStep(this.activeStep, null, null, true);
19873
- }
19874
- }
19875
- else {
19876
- this.navigateToStep(this.activeStep, null, this.stepperItemElements[this.activeStep], true);
19877
- }
20072
+ this.updateDynamicActiveStep(newProp.activeStep, oldProp.activeStep);
19878
20073
  break;
19879
20074
  case 'enableRtl':
19880
20075
  this.element.classList[this.enableRtl ? 'add' : 'remove'](RTL$3);
@@ -19883,15 +20078,7 @@ let Stepper = class Stepper extends StepperBase {
19883
20078
  this.element.classList[this.readOnly ? 'add' : 'remove'](READONLY);
19884
20079
  break;
19885
20080
  case 'cssClass':
19886
- if (oldProp.cssClass) {
19887
- removeClass([this.element], oldProp.cssClass.trim().split(' '));
19888
- }
19889
- if (newProp.cssClass) {
19890
- addClass([this.element], newProp.cssClass.trim().split(' '));
19891
- }
19892
- if (this.tooltipObj) {
19893
- this.tooltipObj.setProperties({ cssClass: this.cssClass ? (STEPPERTOOLTIP + ' ' + this.cssClass) : STEPPERTOOLTIP });
19894
- }
20081
+ this.updateDynamicCssClass(newProp.cssClass, oldProp.cssClass);
19895
20082
  break;
19896
20083
  case 'labelPosition':
19897
20084
  this.renderStepperItems(true);