@syncfusion/ej2-navigations 27.2.5 → 28.1.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) 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 +535 -341
  6. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  7. package/dist/es6/ej2-navigations.es5.js +555 -355
  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/accordion/accordion.d.ts +7 -0
  14. package/src/accordion/accordion.js +52 -45
  15. package/src/carousel/carousel-model.d.ts +12 -0
  16. package/src/carousel/carousel.d.ts +11 -0
  17. package/src/carousel/carousel.js +25 -4
  18. package/src/common/menu-base-model.d.ts +7 -0
  19. package/src/common/menu-base.d.ts +7 -0
  20. package/src/common/menu-base.js +80 -19
  21. package/src/context-menu/context-menu-model.d.ts +15 -0
  22. package/src/context-menu/context-menu.d.ts +13 -0
  23. package/src/context-menu/context-menu.js +10 -0
  24. package/src/menu/menu.js +4 -0
  25. package/src/stepper/stepper.d.ts +9 -0
  26. package/src/stepper/stepper.js +262 -237
  27. package/src/stepper-base/stepper-base.js +15 -11
  28. package/src/tab/tab-model.d.ts +15 -2
  29. package/src/tab/tab.d.ts +26 -2
  30. package/src/tab/tab.js +81 -14
  31. package/src/toolbar/toolbar-model.d.ts +0 -6
  32. package/src/toolbar/toolbar.d.ts +0 -6
  33. package/src/treeview/treeview.d.ts +1 -9
  34. package/src/treeview/treeview.js +17 -16
  35. package/styles/accordion/_tailwind3-definition.scss +168 -0
  36. package/styles/accordion/_theme.scss +2 -2
  37. package/styles/accordion/bds.css +544 -0
  38. package/styles/accordion/bds.scss +5 -0
  39. package/styles/accordion/icons/_tailwind3.scss +15 -0
  40. package/styles/accordion/tailwind3.css +552 -0
  41. package/styles/accordion/tailwind3.scss +5 -0
  42. package/styles/appbar/_layout.scss +1 -1
  43. package/styles/appbar/_tailwind3-definition.scss +6 -0
  44. package/styles/appbar/bds.css +302 -0
  45. package/styles/appbar/bds.scss +4 -0
  46. package/styles/appbar/tailwind3.css +285 -0
  47. package/styles/appbar/tailwind3.scss +4 -0
  48. package/styles/bds-lite.css +9233 -0
  49. package/styles/bds-lite.scss +47 -0
  50. package/styles/bds.css +11954 -0
  51. package/styles/bds.scss +59 -0
  52. package/styles/bootstrap-dark-lite.css +21 -13
  53. package/styles/bootstrap-dark.css +35 -14
  54. package/styles/bootstrap-lite.css +21 -13
  55. package/styles/bootstrap.css +35 -14
  56. package/styles/bootstrap4-lite.css +21 -13
  57. package/styles/bootstrap4.css +35 -14
  58. package/styles/bootstrap5-dark-lite.css +29 -21
  59. package/styles/bootstrap5-dark.css +43 -22
  60. package/styles/bootstrap5-lite.css +29 -21
  61. package/styles/bootstrap5.3-lite.css +21 -13
  62. package/styles/bootstrap5.3.css +35 -14
  63. package/styles/bootstrap5.css +43 -22
  64. package/styles/breadcrumb/_bigger.scss +6 -0
  65. package/styles/breadcrumb/_layout.scss +19 -1
  66. package/styles/breadcrumb/_tailwind3-definition.scss +61 -0
  67. package/styles/breadcrumb/_theme.scss +60 -0
  68. package/styles/breadcrumb/bds.css +418 -0
  69. package/styles/breadcrumb/bds.scss +5 -0
  70. package/styles/breadcrumb/icons/_tailwind3.scss +23 -0
  71. package/styles/breadcrumb/tailwind3.css +441 -0
  72. package/styles/breadcrumb/tailwind3.scss +5 -0
  73. package/styles/carousel/_tailwind3-definition.scss +24 -0
  74. package/styles/carousel/_theme.scss +9 -3
  75. package/styles/carousel/bds.css +426 -0
  76. package/styles/carousel/bds.scss +5 -0
  77. package/styles/carousel/fluent2.css +5 -0
  78. package/styles/carousel/icons/_tailwind3.scss +30 -0
  79. package/styles/carousel/tailwind3.css +396 -0
  80. package/styles/carousel/tailwind3.scss +5 -0
  81. package/styles/context-menu/_bigger.scss +15 -0
  82. package/styles/context-menu/_layout.scss +24 -0
  83. package/styles/context-menu/_tailwind3-definition.scss +55 -0
  84. package/styles/context-menu/bds.css +421 -0
  85. package/styles/context-menu/bds.scss +8 -0
  86. package/styles/context-menu/fluent2.css +1 -1
  87. package/styles/context-menu/icons/_tailwind3.scss +31 -0
  88. package/styles/context-menu/tailwind3.css +449 -0
  89. package/styles/context-menu/tailwind3.scss +8 -0
  90. package/styles/fabric-dark-lite.css +21 -13
  91. package/styles/fabric-dark.css +35 -14
  92. package/styles/fabric-lite.css +21 -13
  93. package/styles/fabric.css +35 -14
  94. package/styles/fluent-dark-lite.css +22 -14
  95. package/styles/fluent-dark.css +36 -15
  96. package/styles/fluent-lite.css +22 -14
  97. package/styles/fluent.css +36 -15
  98. package/styles/fluent2-lite.css +37 -21
  99. package/styles/fluent2.css +51 -22
  100. package/styles/h-scroll/_tailwind3-definition.scss +83 -0
  101. package/styles/h-scroll/bds.css +311 -0
  102. package/styles/h-scroll/bds.scss +5 -0
  103. package/styles/h-scroll/icons/_tailwind3.scss +49 -0
  104. package/styles/h-scroll/tailwind3.css +311 -0
  105. package/styles/h-scroll/tailwind3.scss +5 -0
  106. package/styles/highcontrast-light-lite.css +21 -13
  107. package/styles/highcontrast-light.css +35 -14
  108. package/styles/highcontrast-lite.css +24 -16
  109. package/styles/highcontrast.css +38 -17
  110. package/styles/material-dark-lite.css +21 -13
  111. package/styles/material-dark.css +35 -14
  112. package/styles/material-lite.css +21 -13
  113. package/styles/material.css +35 -14
  114. package/styles/material3-dark-lite.css +21 -13
  115. package/styles/material3-dark.css +38 -14
  116. package/styles/material3-lite.css +21 -13
  117. package/styles/material3.css +38 -14
  118. package/styles/menu/_bigger.scss +26 -0
  119. package/styles/menu/_layout.scss +35 -0
  120. package/styles/menu/_tailwind3-definition.scss +66 -0
  121. package/styles/menu/_theme.scss +33 -1
  122. package/styles/menu/bds.css +1155 -0
  123. package/styles/menu/bds.scss +9 -0
  124. package/styles/menu/fluent2.css +1 -1
  125. package/styles/menu/icons/_tailwind3.scss +104 -0
  126. package/styles/menu/tailwind3.css +1238 -0
  127. package/styles/menu/tailwind3.scss +9 -0
  128. package/styles/pager/_bigger.scss +65 -6
  129. package/styles/pager/_layout.scss +22 -2
  130. package/styles/pager/_tailwind-definition.scss +1 -1
  131. package/styles/pager/_tailwind3-definition.scss +166 -0
  132. package/styles/pager/bds.css +915 -0
  133. package/styles/pager/bds.scss +5 -0
  134. package/styles/pager/bootstrap-dark.css +7 -0
  135. package/styles/pager/bootstrap.css +7 -0
  136. package/styles/pager/bootstrap4.css +7 -0
  137. package/styles/pager/bootstrap5-dark.css +7 -0
  138. package/styles/pager/bootstrap5.3.css +7 -0
  139. package/styles/pager/bootstrap5.css +7 -0
  140. package/styles/pager/fabric-dark.css +7 -0
  141. package/styles/pager/fabric.css +7 -0
  142. package/styles/pager/fluent-dark.css +7 -0
  143. package/styles/pager/fluent.css +7 -0
  144. package/styles/pager/fluent2.css +7 -0
  145. package/styles/pager/highcontrast-light.css +7 -0
  146. package/styles/pager/highcontrast.css +7 -0
  147. package/styles/pager/icons/_tailwind3.scss +50 -0
  148. package/styles/pager/material-dark.css +7 -0
  149. package/styles/pager/material.css +7 -0
  150. package/styles/pager/material3-dark.css +8 -0
  151. package/styles/pager/material3.css +8 -0
  152. package/styles/pager/tailwind-dark.css +16 -9
  153. package/styles/pager/tailwind.css +16 -9
  154. package/styles/pager/tailwind3.css +875 -0
  155. package/styles/pager/tailwind3.scss +5 -0
  156. package/styles/sidebar/_tailwind3-definition.scss +6 -0
  157. package/styles/sidebar/_theme.scss +1 -1
  158. package/styles/sidebar/bds.css +263 -0
  159. package/styles/sidebar/bds.scss +3 -0
  160. package/styles/sidebar/tailwind3.css +227 -0
  161. package/styles/sidebar/tailwind3.scss +3 -0
  162. package/styles/stepper/_layout.scss +2 -0
  163. package/styles/stepper/_tailwind3-definition.scss +72 -0
  164. package/styles/stepper/_theme.scss +2 -1
  165. package/styles/stepper/bds.css +724 -0
  166. package/styles/stepper/bds.scss +6 -0
  167. package/styles/stepper/bootstrap-dark.css +4 -1
  168. package/styles/stepper/bootstrap.css +4 -1
  169. package/styles/stepper/bootstrap4.css +4 -1
  170. package/styles/stepper/bootstrap5-dark.css +4 -1
  171. package/styles/stepper/bootstrap5.3.css +4 -1
  172. package/styles/stepper/bootstrap5.css +4 -1
  173. package/styles/stepper/fabric-dark.css +4 -1
  174. package/styles/stepper/fabric.css +4 -1
  175. package/styles/stepper/fluent-dark.css +4 -1
  176. package/styles/stepper/fluent.css +4 -1
  177. package/styles/stepper/fluent2.css +4 -1
  178. package/styles/stepper/highcontrast-light.css +4 -1
  179. package/styles/stepper/highcontrast.css +4 -1
  180. package/styles/stepper/icons/_tailwind3.scss +5 -0
  181. package/styles/stepper/material-dark.css +4 -1
  182. package/styles/stepper/material.css +4 -1
  183. package/styles/stepper/material3-dark.css +4 -1
  184. package/styles/stepper/material3.css +4 -1
  185. package/styles/stepper/tailwind-dark.css +4 -1
  186. package/styles/stepper/tailwind.css +4 -1
  187. package/styles/stepper/tailwind3.css +724 -0
  188. package/styles/stepper/tailwind3.scss +6 -0
  189. package/styles/tab/_bigger.scss +16 -0
  190. package/styles/tab/_bootstrap-dark-definition.scss +0 -2
  191. package/styles/tab/_bootstrap-definition.scss +0 -2
  192. package/styles/tab/_bootstrap4-definition.scss +0 -2
  193. package/styles/tab/_bootstrap5-definition.scss +0 -2
  194. package/styles/tab/_bootstrap5.3-definition.scss +0 -2
  195. package/styles/tab/_fabric-dark-definition.scss +0 -2
  196. package/styles/tab/_fabric-definition.scss +0 -2
  197. package/styles/tab/_fluent-definition.scss +0 -2
  198. package/styles/tab/_fluent2-definition.scss +0 -2
  199. package/styles/tab/_fusionnew-definition.scss +0 -2
  200. package/styles/tab/_highcontrast-definition.scss +0 -2
  201. package/styles/tab/_highcontrast-light-definition.scss +0 -2
  202. package/styles/tab/_material-dark-definition.scss +0 -2
  203. package/styles/tab/_material-definition.scss +0 -2
  204. package/styles/tab/_material3-definition.scss +0 -2
  205. package/styles/tab/_tailwind-definition.scss +0 -2
  206. package/styles/tab/_tailwind3-definition.scss +634 -0
  207. package/styles/tab/_theme.scss +0 -12
  208. package/styles/tab/bds.css +4190 -0
  209. package/styles/tab/bds.scss +6 -0
  210. package/styles/tab/bootstrap-dark.css +7 -11
  211. package/styles/tab/bootstrap.css +7 -11
  212. package/styles/tab/bootstrap4.css +7 -11
  213. package/styles/tab/bootstrap5-dark.css +7 -11
  214. package/styles/tab/bootstrap5.3.css +7 -11
  215. package/styles/tab/bootstrap5.css +7 -11
  216. package/styles/tab/fabric-dark.css +7 -11
  217. package/styles/tab/fabric.css +7 -11
  218. package/styles/tab/fluent-dark.css +7 -11
  219. package/styles/tab/fluent.css +7 -11
  220. package/styles/tab/fluent2.css +10 -14
  221. package/styles/tab/highcontrast-light.css +7 -11
  222. package/styles/tab/highcontrast.css +7 -11
  223. package/styles/tab/icons/_tailwind3.scss +90 -0
  224. package/styles/tab/material-dark.css +7 -11
  225. package/styles/tab/material.css +7 -11
  226. package/styles/tab/material3-dark.css +9 -11
  227. package/styles/tab/material3.css +9 -11
  228. package/styles/tab/tailwind-dark.css +7 -11
  229. package/styles/tab/tailwind.css +7 -11
  230. package/styles/tab/tailwind3.css +4125 -0
  231. package/styles/tab/tailwind3.scss +6 -0
  232. package/styles/tailwind-dark-lite.css +26 -18
  233. package/styles/tailwind-dark.css +45 -24
  234. package/styles/tailwind-lite.css +26 -18
  235. package/styles/tailwind.css +45 -24
  236. package/styles/tailwind3-lite.css +9055 -0
  237. package/styles/tailwind3-lite.scss +47 -0
  238. package/styles/tailwind3.css +11743 -0
  239. package/styles/tailwind3.scss +59 -0
  240. package/styles/toolbar/_bigger.scss +14 -0
  241. package/styles/toolbar/_bootstrap5-definition.scss +6 -6
  242. package/styles/toolbar/_layout.scss +7 -1
  243. package/styles/toolbar/_tailwind3-definition.scss +199 -0
  244. package/styles/toolbar/_theme.scss +6 -6
  245. package/styles/toolbar/bds.css +1219 -0
  246. package/styles/toolbar/bds.scss +9 -0
  247. package/styles/toolbar/bootstrap-dark.css +1 -1
  248. package/styles/toolbar/bootstrap.css +1 -1
  249. package/styles/toolbar/bootstrap4.css +1 -1
  250. package/styles/toolbar/bootstrap5-dark.css +9 -9
  251. package/styles/toolbar/bootstrap5.3.css +1 -1
  252. package/styles/toolbar/bootstrap5.css +9 -9
  253. package/styles/toolbar/fabric-dark.css +1 -1
  254. package/styles/toolbar/fabric.css +1 -1
  255. package/styles/toolbar/fluent-dark.css +1 -1
  256. package/styles/toolbar/fluent.css +1 -1
  257. package/styles/toolbar/fluent2.css +1 -1
  258. package/styles/toolbar/highcontrast-light.css +1 -1
  259. package/styles/toolbar/highcontrast.css +1 -1
  260. package/styles/toolbar/icons/_tailwind3.scss +14 -0
  261. package/styles/toolbar/material-dark.css +1 -1
  262. package/styles/toolbar/material.css +1 -1
  263. package/styles/toolbar/material3-dark.css +1 -1
  264. package/styles/toolbar/material3.css +1 -1
  265. package/styles/toolbar/tailwind-dark.css +1 -1
  266. package/styles/toolbar/tailwind.css +1 -1
  267. package/styles/toolbar/tailwind3.css +1211 -0
  268. package/styles/toolbar/tailwind3.scss +9 -0
  269. package/styles/treeview/_bigger.scss +16 -3
  270. package/styles/treeview/_fluent-definition.scss +1 -1
  271. package/styles/treeview/_fluent2-definition.scss +2 -2
  272. package/styles/treeview/_highcontrast-definition.scss +3 -3
  273. package/styles/treeview/_layout.scss +42 -5
  274. package/styles/treeview/_tailwind-definition.scss +1 -1
  275. package/styles/treeview/_tailwind3-definition.scss +126 -0
  276. package/styles/treeview/_theme.scss +1 -1
  277. package/styles/treeview/bds.css +1031 -0
  278. package/styles/treeview/bds.scss +7 -0
  279. package/styles/treeview/bootstrap-dark.css +16 -1
  280. package/styles/treeview/bootstrap.css +16 -1
  281. package/styles/treeview/bootstrap4.css +16 -1
  282. package/styles/treeview/bootstrap5-dark.css +16 -1
  283. package/styles/treeview/bootstrap5.3.css +16 -1
  284. package/styles/treeview/bootstrap5.css +16 -1
  285. package/styles/treeview/fabric-dark.css +16 -1
  286. package/styles/treeview/fabric.css +16 -1
  287. package/styles/treeview/fluent-dark.css +17 -2
  288. package/styles/treeview/fluent.css +17 -2
  289. package/styles/treeview/fluent2.css +22 -4
  290. package/styles/treeview/highcontrast-light.css +16 -1
  291. package/styles/treeview/highcontrast.css +19 -4
  292. package/styles/treeview/icons/_tailwind3.scss +44 -0
  293. package/styles/treeview/material-dark.css +16 -1
  294. package/styles/treeview/material.css +16 -1
  295. package/styles/treeview/material3-dark.css +16 -1
  296. package/styles/treeview/material3.css +16 -1
  297. package/styles/treeview/tailwind-dark.css +17 -2
  298. package/styles/treeview/tailwind.css +17 -2
  299. package/styles/treeview/tailwind3.css +806 -0
  300. package/styles/treeview/tailwind3.scss +7 -0
  301. package/styles/v-scroll/_tailwind3-definition.scss +49 -0
  302. package/styles/v-scroll/bds.css +218 -0
  303. package/styles/v-scroll/bds.scss +5 -0
  304. package/styles/v-scroll/icons/_tailwind3.scss +27 -0
  305. package/styles/v-scroll/tailwind3.css +218 -0
  306. 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
  }
@@ -6102,55 +6163,59 @@ let Accordion = class Accordion extends Component {
6102
6163
  }
6103
6164
  afterContentRender(trgt, eventArgs, acrdnItem, acrdnHdr, acrdnCtn, acrdnCtnItem) {
6104
6165
  const acrdActive = [];
6105
- this.trigger('clicked', eventArgs);
6106
- let cntclkCheck = (acrdnCtn && !isNullOrUndefined(select('.e-target', acrdnCtn)));
6107
- const inlineAcrdnSel = '.' + CLS_CONTENT + ' .' + CLS_ROOT$2;
6108
- const inlineEleAcrdn = acrdnCtn && !isNullOrUndefined(select('.' + CLS_ROOT$2, acrdnCtn)) && isNullOrUndefined(closest(trgt, inlineAcrdnSel));
6109
- const nestContCheck = acrdnCtn && isNullOrUndefined(select('.' + CLS_ROOT$2, acrdnCtn)) || !(closest(trgt, '.' + CLS_ROOT$2) === this.element);
6110
- cntclkCheck = cntclkCheck && (inlineEleAcrdn || nestContCheck);
6111
- trgt.classList.remove('e-target');
6112
- if (trgt.classList.contains(CLS_CONTENT) || trgt.classList.contains(CLS_CTENT) || cntclkCheck) {
6113
- return;
6114
- }
6115
- const acrdcontainer = this.element.querySelector('.' + CLS_CONTAINER);
6116
- const acrdnchild = (acrdcontainer) ? acrdcontainer.children : this.element.children;
6117
- [].slice.call(acrdnchild).forEach((el) => {
6118
- if (el.classList.contains(CLS_ACTIVE)) {
6119
- acrdActive.push(el);
6120
- }
6121
- });
6122
- const acrdAniEle = [].slice.call(this.element.querySelectorAll('.' + CLS_ITEM$1 + ' [' + CLS_ANIMATE + ']'));
6123
- if (acrdAniEle.length > 0) {
6124
- for (const el of acrdAniEle) {
6125
- acrdActive.push(el.parentElement);
6126
- }
6127
- }
6128
- const sameContentCheck = acrdActive.indexOf(acrdnCtnItem) !== -1 && acrdnCtn.getAttribute('e-animate') === 'true';
6129
- let sameHeader = false;
6130
- if (!isNullOrUndefined(acrdnItem) && !isNullOrUndefined(acrdnHdr)) {
6131
- const acrdnCtn = select('.' + CLS_CONTENT, acrdnItem);
6132
- const acrdnRoot = closest(acrdnItem, '.' + CLS_ACRDN_ROOT);
6133
- const expandState = acrdnRoot.querySelector('.' + CLS_EXPANDSTATE);
6134
- if (isNullOrUndefined(acrdnCtn)) {
6166
+ this.trigger('clicked', eventArgs, (eventArgs) => {
6167
+ if (eventArgs.cancel) {
6135
6168
  return;
6136
6169
  }
6137
- sameHeader = (expandState === acrdnItem);
6138
- if (isVisible(acrdnCtn) && (!sameContentCheck || acrdnCtnItem.classList.contains(CLS_SLCTED))) {
6139
- this.collapse(acrdnCtn);
6170
+ let cntclkCheck = (acrdnCtn && !isNullOrUndefined(select('.e-target', acrdnCtn)));
6171
+ const inlineAcrdnSel = '.' + CLS_CONTENT + ' .' + CLS_ROOT$2;
6172
+ const inlineEleAcrdn = acrdnCtn && !isNullOrUndefined(select('.' + CLS_ROOT$2, acrdnCtn)) && isNullOrUndefined(closest(trgt, inlineAcrdnSel));
6173
+ const nestContCheck = acrdnCtn && isNullOrUndefined(select('.' + CLS_ROOT$2, acrdnCtn)) || !(closest(trgt, '.' + CLS_ROOT$2) === this.element);
6174
+ cntclkCheck = cntclkCheck && (inlineEleAcrdn || nestContCheck);
6175
+ trgt.classList.remove('e-target');
6176
+ if (trgt.classList.contains(CLS_CONTENT) || trgt.classList.contains(CLS_CTENT) || cntclkCheck) {
6177
+ return;
6140
6178
  }
6141
- else {
6142
- if ((acrdActive.length > 0) && this.expandMode === 'Single' && !sameContentCheck) {
6143
- acrdActive.forEach((el) => {
6144
- this.collapse(select('.' + CLS_CONTENT, el));
6145
- el.classList.remove(CLS_EXPANDSTATE);
6146
- });
6179
+ const acrdcontainer = this.element.querySelector('.' + CLS_CONTAINER);
6180
+ const acrdnchild = (acrdcontainer) ? acrdcontainer.children : this.element.children;
6181
+ [].slice.call(acrdnchild).forEach((el) => {
6182
+ if (el.classList.contains(CLS_ACTIVE)) {
6183
+ acrdActive.push(el);
6184
+ }
6185
+ });
6186
+ const acrdAniEle = [].slice.call(this.element.querySelectorAll('.' + CLS_ITEM$1 + ' [' + CLS_ANIMATE + ']'));
6187
+ if (acrdAniEle.length > 0) {
6188
+ for (const el of acrdAniEle) {
6189
+ acrdActive.push(el.parentElement);
6190
+ }
6191
+ }
6192
+ const sameContentCheck = acrdActive.indexOf(acrdnCtnItem) !== -1 && acrdnCtn.getAttribute('e-animate') === 'true';
6193
+ let sameHeader = false;
6194
+ if (!isNullOrUndefined(acrdnItem) && !isNullOrUndefined(acrdnHdr)) {
6195
+ const acrdnCtn = select('.' + CLS_CONTENT, acrdnItem);
6196
+ const acrdnRoot = closest(acrdnItem, '.' + CLS_ACRDN_ROOT);
6197
+ const expandState = acrdnRoot.querySelector('.' + CLS_EXPANDSTATE);
6198
+ if (isNullOrUndefined(acrdnCtn)) {
6199
+ return;
6200
+ }
6201
+ sameHeader = (expandState === acrdnItem);
6202
+ if (isVisible(acrdnCtn) && (!sameContentCheck || acrdnCtnItem.classList.contains(CLS_SLCTED))) {
6203
+ this.collapse(acrdnCtn);
6204
+ }
6205
+ else {
6206
+ if ((acrdActive.length > 0) && this.expandMode === 'Single' && !sameContentCheck) {
6207
+ acrdActive.forEach((el) => {
6208
+ this.collapse(select('.' + CLS_CONTENT, el));
6209
+ el.classList.remove(CLS_EXPANDSTATE);
6210
+ });
6211
+ }
6212
+ this.expand(acrdnCtn);
6213
+ }
6214
+ if (!isNullOrUndefined(expandState) && !sameHeader) {
6215
+ expandState.classList.remove(CLS_EXPANDSTATE);
6147
6216
  }
6148
- this.expand(acrdnCtn);
6149
- }
6150
- if (!isNullOrUndefined(expandState) && !sameHeader) {
6151
- expandState.classList.remove(CLS_EXPANDSTATE);
6152
6217
  }
6153
- }
6218
+ });
6154
6219
  }
6155
6220
  eleMoveFocus(action, root, trgt) {
6156
6221
  let clst;
@@ -6501,9 +6566,12 @@ let Accordion = class Accordion extends Component {
6501
6566
  this.setProperties({ expandedIndices: temp }, true);
6502
6567
  }
6503
6568
  collapse(trgt) {
6569
+ if (isNullOrUndefined(trgt)) {
6570
+ return;
6571
+ }
6504
6572
  const items = this.getItems();
6505
6573
  const trgtItemEle = closest(trgt, '.' + CLS_ITEM$1);
6506
- if (isNullOrUndefined(trgt) || !isVisible(trgt) || trgtItemEle.classList.contains(CLS_DISABLE$3)) {
6574
+ if (!isVisible(trgt) || trgtItemEle.classList.contains(CLS_DISABLE$3)) {
6507
6575
  return;
6508
6576
  }
6509
6577
  const animation = {
@@ -7097,6 +7165,7 @@ let ContextMenu = class ContextMenu extends MenuBase {
7097
7165
  super.preRender();
7098
7166
  }
7099
7167
  initialize() {
7168
+ this.template = this.itemTemplate ? this.itemTemplate : null;
7100
7169
  super.initialize();
7101
7170
  attributes(this.element, { 'role': 'menubar', 'tabindex': '0' });
7102
7171
  this.element.style.zIndex = getZindexPartial(this.element).toString();
@@ -7142,6 +7211,9 @@ let ContextMenu = class ContextMenu extends MenuBase {
7142
7211
  this.unWireEvents(oldProp.target);
7143
7212
  this.wireEvents();
7144
7213
  break;
7214
+ case 'itemTemplate':
7215
+ this.itemTemplate = newProp.itemTemplate;
7216
+ this.refresh();
7145
7217
  }
7146
7218
  }
7147
7219
  }
@@ -7164,6 +7236,12 @@ __decorate$5([
7164
7236
  __decorate$5([
7165
7237
  Collection([], MenuItem)
7166
7238
  ], ContextMenu.prototype, "items", void 0);
7239
+ __decorate$5([
7240
+ Property(null)
7241
+ ], ContextMenu.prototype, "itemTemplate", void 0);
7242
+ __decorate$5([
7243
+ Property(false)
7244
+ ], ContextMenu.prototype, "enableScrolling", void 0);
7167
7245
  ContextMenu = __decorate$5([
7168
7246
  NotifyPropertyChanges
7169
7247
  ], ContextMenu);
@@ -7359,6 +7437,10 @@ let Menu = class Menu extends MenuBase {
7359
7437
  }
7360
7438
  }
7361
7439
  break;
7440
+ case 'template':
7441
+ this.template = newProp.template;
7442
+ this.refresh();
7443
+ break;
7362
7444
  }
7363
7445
  }
7364
7446
  super.onPropertyChanged(newProp, oldProp);
@@ -7836,6 +7918,17 @@ let Tab = class Tab extends Component {
7836
7918
  }
7837
7919
  }
7838
7920
  }
7921
+ createContentElement(index) {
7922
+ const contentElement = this.createElement('div', {
7923
+ id: CLS_CONTENT$1 + this.tabId + '_' + index, className: CLS_ITEM$2,
7924
+ attrs: { 'role': 'tabpanel', 'aria-labelledby': CLS_ITEM$2 + this.tabId + '_' + index }
7925
+ });
7926
+ if (['Dynamic', 'Demand'].indexOf(this.loadOn) !== -1 ||
7927
+ (this.loadOn === 'Init' && index === Number(this.extIndex(this.itemIndexArray[0])))) {
7928
+ addClass([contentElement], CLS_ACTIVE$1);
7929
+ }
7930
+ return contentElement;
7931
+ }
7839
7932
  renderContent() {
7840
7933
  this.cntEle = select('.' + CLS_CONTENT$1, this.element);
7841
7934
  const hdrItem = selectAll('.' + CLS_TB_ITEM, this.element);
@@ -7850,11 +7943,26 @@ let Tab = class Tab extends Component {
7850
7943
  }
7851
7944
  }
7852
7945
  }
7946
+ else {
7947
+ if (selectAll('.' + CLS_TB_ITEM, this.element).length > 0) {
7948
+ if (this.loadOn === 'Init') {
7949
+ for (let i = 0; i < this.itemIndexArray.length; i++) {
7950
+ if (this.itemIndexArray[i]) {
7951
+ this.cntEle.appendChild(this.createContentElement(Number(this.extIndex(this.itemIndexArray[i]))));
7952
+ }
7953
+ }
7954
+ }
7955
+ else if (this.loadOn === 'Dynamic') {
7956
+ this.cntEle.appendChild(this.createContentElement(this.selectedItem > 0 ?
7957
+ this.selectedItem : Number(this.extIndex(this.itemIndexArray[0]))));
7958
+ }
7959
+ }
7960
+ }
7853
7961
  }
7854
7962
  reRenderItems() {
7855
7963
  this.renderContainer();
7856
7964
  if (!isNullOrUndefined(this.cntEle)) {
7857
- this.touchModule = new Touch(this.cntEle, { swipe: this.swipeHandler.bind(this) });
7965
+ this.bindSwipeEvents();
7858
7966
  }
7859
7967
  }
7860
7968
  parseObject(items, index) {
@@ -8351,6 +8459,27 @@ let Tab = class Tab extends Component {
8351
8459
  }
8352
8460
  }
8353
8461
  }
8462
+ loadContentInitMode(ele) {
8463
+ if (!ele) {
8464
+ return;
8465
+ }
8466
+ if (this.loadOn === 'Init') {
8467
+ for (let i = 0; i < this.items.length; i++) {
8468
+ if (this.cntEle.children.item(i)) {
8469
+ this.getContent(this.cntEle.children.item(i), this.items[i].content, 'render', i);
8470
+ }
8471
+ }
8472
+ }
8473
+ if (this.prevIndex !== this.selectedItem) {
8474
+ ele.classList.remove(CLS_ACTIVE$1);
8475
+ }
8476
+ }
8477
+ loadContentElement() {
8478
+ if (!this.isTemplate) {
8479
+ const ele = this.cntEle.children.item(0);
8480
+ this.loadContentInitMode(ele);
8481
+ }
8482
+ }
8354
8483
  setContentHeight(val) {
8355
8484
  if (this.element.classList.contains(CLS_FILL)) {
8356
8485
  removeClass([this.element], [CLS_FILL]);
@@ -8360,6 +8489,7 @@ let Tab = class Tab extends Component {
8360
8489
  }
8361
8490
  const hdrEle = this.getTabHeader();
8362
8491
  if (this.heightAdjustMode === 'None') {
8492
+ this.loadContentElement();
8363
8493
  if (this.height === 'auto') {
8364
8494
  return;
8365
8495
  }
@@ -8372,6 +8502,7 @@ let Tab = class Tab extends Component {
8372
8502
  else if (this.heightAdjustMode === 'Fill') {
8373
8503
  addClass([this.element], [CLS_FILL]);
8374
8504
  setStyleAttribute(this.element, { 'height': '100%' });
8505
+ this.loadContentElement();
8375
8506
  this.cntEle.style.height = 'calc(100% - ' + this.hdrEle.offsetHeight + 'px)';
8376
8507
  }
8377
8508
  else if (this.heightAdjustMode === 'Auto') {
@@ -8386,11 +8517,8 @@ let Tab = class Tab extends Component {
8386
8517
  }
8387
8518
  else {
8388
8519
  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
- }));
8520
+ if (val === true && this.loadOn === 'Demand') {
8521
+ this.cntEle.appendChild(this.createContentElement(Number(this.extIndex(this.itemIndexArray[0]))));
8394
8522
  }
8395
8523
  const ele = this.cntEle.children.item(0);
8396
8524
  for (let i = 0; i < this.items.length; i++) {
@@ -8404,14 +8532,15 @@ let Tab = class Tab extends Component {
8404
8532
  this.clearTemplate(['content']);
8405
8533
  }
8406
8534
  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);
8535
+ if (this.loadOn === 'Demand') {
8536
+ this.getContent(ele, this.items[0].content, 'render', 0);
8410
8537
  }
8538
+ this.loadContentInitMode(ele);
8411
8539
  }
8412
8540
  setStyleAttribute(this.cntEle, { 'height': this.maxHeight + 'px' });
8413
8541
  }
8414
8542
  else {
8543
+ this.loadContentElement();
8415
8544
  setStyleAttribute(this.cntEle, { 'height': 'auto' });
8416
8545
  }
8417
8546
  }
@@ -8493,7 +8622,7 @@ let Tab = class Tab extends Component {
8493
8622
  return;
8494
8623
  }
8495
8624
  if (!this.isTemplate) {
8496
- attributes(trg.firstElementChild, { 'aria-controls': CLS_CONTENT$1 + this.tabId + '_' + value });
8625
+ attributes(trg.firstElementChild, { 'aria-controls': CLS_CONTENT$1 + this.tabId + '_' + this.extIndex(trg.id) });
8497
8626
  }
8498
8627
  const id = trg.id;
8499
8628
  this.removeActiveClass();
@@ -8514,6 +8643,9 @@ let Tab = class Tab extends Component {
8514
8643
  }
8515
8644
  else {
8516
8645
  this.cntEle = select('.' + CLS_TAB + ' > .' + CLS_CONTENT$1, this.element);
8646
+ while (this.loadOn === 'Dynamic' && this.cntEle.firstElementChild) {
8647
+ this.cntEle.removeChild(this.cntEle.firstElementChild);
8648
+ }
8517
8649
  const item = this.getTrgContent(this.cntEle, this.extIndex(id));
8518
8650
  if (isNullOrUndefined(item)) {
8519
8651
  this.cntEle.appendChild(this.createElement('div', {
@@ -8588,13 +8720,18 @@ let Tab = class Tab extends Component {
8588
8720
  }
8589
8721
  }
8590
8722
  }
8723
+ bindSwipeEvents() {
8724
+ if (this.swipeMode !== 'None') {
8725
+ this.touchModule = new Touch(this.cntEle, { swipe: this.swipeHandler.bind(this) });
8726
+ }
8727
+ }
8591
8728
  wireEvents() {
8592
8729
  this.bindDraggable();
8593
8730
  window.addEventListener('resize', this.resizeContext);
8594
8731
  EventHandler.add(this.element, 'mouseover', this.hoverHandler, this);
8595
8732
  EventHandler.add(this.element, 'keydown', this.spaceKeyDown, this);
8596
8733
  if (!isNullOrUndefined(this.cntEle)) {
8597
- this.touchModule = new Touch(this.cntEle, { swipe: this.swipeHandler.bind(this) });
8734
+ this.bindSwipeEvents();
8598
8735
  }
8599
8736
  this.keyModule = new KeyboardEvents(this.element, { keyAction: this.keyHandler.bind(this), keyConfigs: this.keyConfigs });
8600
8737
  this.tabKeyModule = new KeyboardEvents(this.element, {
@@ -8639,7 +8776,9 @@ let Tab = class Tab extends Component {
8639
8776
  }
8640
8777
  }
8641
8778
  swipeHandler(e) {
8642
- if (e.velocity < 3 && isNullOrUndefined(e.originalEvent.changedTouches)) {
8779
+ if ((e.velocity < 3 && isNullOrUndefined(e.originalEvent.changedTouches)) ||
8780
+ (this.swipeMode === 'Touch' && ((e.originalEvent.type === 'mouseup') || e.originalEvent.type === 'mouseleave')) ||
8781
+ (this.swipeMode === 'Mouse' && e.originalEvent.type === 'touchend') || (this.swipeMode === 'None')) {
8643
8782
  return;
8644
8783
  }
8645
8784
  if (this.isNested) {
@@ -9229,7 +9368,7 @@ let Tab = class Tab extends Component {
9229
9368
  this.items.splice((index + i), 0, item);
9230
9369
  i++;
9231
9370
  }
9232
- if (this.isTemplate && !isNullOrUndefined(item.header) && !isNullOrUndefined(item.header.text)) {
9371
+ if (!isNullOrUndefined(item.header) && !isNullOrUndefined(item.header.text) && (this.isTemplate || this.loadOn === 'Init')) {
9233
9372
  const no = lastEleIndex + place;
9234
9373
  const ele = this.createElement('div', {
9235
9374
  id: CLS_CONTENT$1 + this.tabId + '_' + no, className: CLS_ITEM$2,
@@ -9614,6 +9753,13 @@ let Tab = class Tab extends Component {
9614
9753
  case 'allowDragAndDrop':
9615
9754
  this.bindDraggable();
9616
9755
  break;
9756
+ case 'swipeMode':
9757
+ if (this.touchModule) {
9758
+ this.touchModule.destroy();
9759
+ this.touchModule = null;
9760
+ }
9761
+ this.bindSwipeEvents();
9762
+ break;
9617
9763
  case 'dragArea':
9618
9764
  if (this.allowDragAndDrop) {
9619
9765
  this.draggableItems.forEach((item) => {
@@ -9766,6 +9912,9 @@ __decorate$7([
9766
9912
  __decorate$7([
9767
9913
  Property('100%')
9768
9914
  ], Tab.prototype, "width", void 0);
9915
+ __decorate$7([
9916
+ Property('Both')
9917
+ ], Tab.prototype, "swipeMode", void 0);
9769
9918
  __decorate$7([
9770
9919
  Property('auto')
9771
9920
  ], Tab.prototype, "height", void 0);
@@ -9785,7 +9934,7 @@ __decorate$7([
9785
9934
  Property('Scrollable')
9786
9935
  ], Tab.prototype, "overflowMode", void 0);
9787
9936
  __decorate$7([
9788
- Property('Dynamic')
9937
+ Property('Demand')
9789
9938
  ], Tab.prototype, "loadOn", void 0);
9790
9939
  __decorate$7([
9791
9940
  Property(false)
@@ -10029,6 +10178,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
10029
10178
  this.mouseDownStatus = false;
10030
10179
  this.isDropIn = false;
10031
10180
  this.OldCheckedData = [];
10181
+ this.isHiddenItem = false;
10032
10182
  }
10033
10183
  /**
10034
10184
  * Get component name.
@@ -10515,10 +10665,6 @@ let TreeView = TreeView_1 = class TreeView extends Component {
10515
10665
  this.changeState(node, 'uncheck', null, true, true);
10516
10666
  }
10517
10667
  }
10518
- const parentElement = closest(node, '.' + PARENTITEM);
10519
- if (!isNullOrUndefined(parentElement)) {
10520
- this.ensureParentCheckState(closest(parentElement, '.' + LISTITEM));
10521
- }
10522
10668
  }
10523
10669
  }
10524
10670
  /**
@@ -11629,6 +11775,9 @@ let TreeView = TreeView_1 = class TreeView extends Component {
11629
11775
  this.expandArgs.isInteracted = this.isInteracted;
11630
11776
  this.trigger('nodeExpanded', this.expandArgs);
11631
11777
  }
11778
+ if (this.isHiddenItem) {
11779
+ this.collapseAll([this.getNodeData(currLi).id]);
11780
+ }
11632
11781
  }
11633
11782
  addExpand(liEle) {
11634
11783
  liEle.setAttribute('aria-expanded', 'true');
@@ -12148,7 +12297,9 @@ let TreeView = TreeView_1 = class TreeView extends Component {
12148
12297
  this.expandOnType = (this.expandOn === 'Auto') ? (Browser.isDevice ? 'Click' : 'DblClick') : this.expandOn;
12149
12298
  }
12150
12299
  expandHandler(e) {
12151
- const target = e.originalEvent.target;
12300
+ const target = Browser.isDevice && e.originalEvent.changedTouches && !Browser.isIos
12301
+ ? document.elementFromPoint(e.originalEvent.changedTouches[0].clientX, e.originalEvent.changedTouches[0].clientY)
12302
+ : e.originalEvent.target;
12152
12303
  if (!target || target.classList.contains(INPUT) || target.classList.contains(ROOT) ||
12153
12304
  target.classList.contains(PARENTITEM) || target.classList.contains(LISTITEM) ||
12154
12305
  target.classList.contains(ICON) || this.showCheckBox && closest(target, '.' + CHECKBOXWRAP)) {
@@ -14482,15 +14633,6 @@ let TreeView = TreeView_1 = class TreeView extends Component {
14482
14633
  }
14483
14634
  }
14484
14635
  }
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
14636
  /**
14495
14637
  * Checks whether the checkedNodes entered are valid and sets the valid checkedNodes while changing via setmodel(for hierarchical DS)
14496
14638
  *
@@ -14964,9 +15106,11 @@ let TreeView = TreeView_1 = class TreeView extends Component {
14964
15106
  const pid = getValue(this.fields.parentID, nodes[parseInt(i.toString(), 10)]);
14965
15107
  dropLi = pid ? this.getElement(pid.toString()) : pid;
14966
15108
  if (!isNullOrUndefined(pid) && isNullOrUndefined(dropLi)) {
15109
+ this.isHiddenItem = true;
14967
15110
  this.preventExpand = false;
14968
15111
  this.ensureVisible(pid);
14969
15112
  this.preventExpand = preventTargetExpand;
15113
+ this.isHiddenItem = false;
14970
15114
  dropLi = this.getElement(pid.toString());
14971
15115
  }
14972
15116
  this.addGivenNodes([nodes[parseInt(i.toString(), 10)]], dropLi, index);
@@ -15075,7 +15219,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
15075
15219
  else if (this.dataType === 2) {
15076
15220
  parentsId = this.getHierarchicalParentId(node, this.treeData, parentsId);
15077
15221
  }
15078
- this.expandAll(parentsId.reverse());
15222
+ this.expandAll(parentsId.reverse(), null, null, this.isHiddenItem);
15079
15223
  const liEle = this.getElement(node);
15080
15224
  if (!isNullOrUndefined(liEle)) {
15081
15225
  if (typeof node == 'object') {
@@ -15175,10 +15319,16 @@ let TreeView = TreeView_1 = class TreeView extends Component {
15175
15319
  * @returns {void}
15176
15320
  */
15177
15321
  moveNodes(sourceNodes, target, index, preventTargetExpand) {
15178
- const dropLi = this.getElement(target);
15322
+ if (isNullOrUndefined(sourceNodes) || sourceNodes.length === 0) {
15323
+ return;
15324
+ }
15325
+ let dropLi = this.getElement(target);
15179
15326
  const nodeData = [];
15180
15327
  if (isNullOrUndefined(dropLi)) {
15181
- return;
15328
+ this.isHiddenItem = true;
15329
+ this.ensureVisible(target);
15330
+ this.isHiddenItem = false;
15331
+ dropLi = this.getElement(target);
15182
15332
  }
15183
15333
  for (let i = 0; i < sourceNodes.length; i++) {
15184
15334
  const dragLi = this.getElement(sourceNodes[parseInt(i.toString(), 10)]);
@@ -17175,6 +17325,15 @@ let Carousel = class Carousel extends Component {
17175
17325
  this.reRenderSlides();
17176
17326
  }
17177
17327
  break;
17328
+ case 'allowKeyboardInteraction':
17329
+ if (this.keyModule) {
17330
+ this.keyModule.destroy();
17331
+ this.keyModule = null;
17332
+ }
17333
+ if (newProp.allowKeyboardInteraction) {
17334
+ this.renderKeyboardActions();
17335
+ }
17336
+ break;
17178
17337
  case 'enableRtl':
17179
17338
  rtlElement = [].slice.call(this.element.querySelectorAll(`.${CLS_PREV_BUTTON},
17180
17339
  .${CLS_NEXT_BUTTON}, .${CLS_PLAY_BUTTON}`));
@@ -17542,6 +17701,9 @@ let Carousel = class Carousel extends Component {
17542
17701
  append(template, indicatorBar);
17543
17702
  }
17544
17703
  renderKeyboardActions() {
17704
+ if (!this.allowKeyboardInteraction) {
17705
+ return;
17706
+ }
17545
17707
  this.keyModule = new KeyboardEvents(this.element, { keyAction: this.keyHandler.bind(this), keyConfigs: this.keyConfigs });
17546
17708
  }
17547
17709
  renderTouchActions() {
@@ -17858,6 +18020,9 @@ let Carousel = class Carousel extends Component {
17858
18020
  }
17859
18021
  }
17860
18022
  keyHandler(e) {
18023
+ if (!this.allowKeyboardInteraction) {
18024
+ return;
18025
+ }
17861
18026
  let direction;
17862
18027
  let slideIndex;
17863
18028
  let isSlideTransition = false;
@@ -18005,6 +18170,7 @@ let Carousel = class Carousel extends Component {
18005
18170
  if (!this.timeStampStart) {
18006
18171
  this.timeStampStart = Date.now();
18007
18172
  }
18173
+ e.preventDefault();
18008
18174
  this.isSwipe = false;
18009
18175
  this.itemsContainer.classList.add('e-swipe-start');
18010
18176
  this.prevPageX = e.touches ? e.touches[0].pageX : e.pageX;
@@ -18014,6 +18180,7 @@ let Carousel = class Carousel extends Component {
18014
18180
  if (!this.itemsContainer.classList.contains('e-swipe-start')) {
18015
18181
  return;
18016
18182
  }
18183
+ this.isSwipe = true;
18017
18184
  e.preventDefault();
18018
18185
  const pageX = e.touches ? e.touches[0].pageX : e.pageX;
18019
18186
  const positionDiff = this.prevPageX - (pageX);
@@ -18026,7 +18193,6 @@ let Carousel = class Carousel extends Component {
18026
18193
  this.itemsContainer.style.transform = `translateX(${this.initialTranslate + (this.enableRtl ? positionDiff : -positionDiff)}px)`;
18027
18194
  }
18028
18195
  swipStop() {
18029
- this.isSwipe = true;
18030
18196
  const time = Date.now() - this.timeStampStart;
18031
18197
  let distanceX = this.getTranslateValue(this.itemsContainer) - this.initialTranslate;
18032
18198
  distanceX = distanceX < 0 ? distanceX * -1 : distanceX;
@@ -18090,7 +18256,7 @@ let Carousel = class Carousel extends Component {
18090
18256
  }
18091
18257
  }
18092
18258
  wireEvents() {
18093
- if (!(this.animationEffect === 'Custom')) {
18259
+ if (this.animationEffect !== 'Custom' && this.enableTouchSwipe) {
18094
18260
  this.swipeModehandlers();
18095
18261
  }
18096
18262
  EventHandler.add(this.element, 'focusin focusout', this.onFocusActions, this);
@@ -18210,8 +18376,10 @@ let Carousel = class Carousel extends Component {
18210
18376
  this.touchModule.destroy();
18211
18377
  this.touchModule = null;
18212
18378
  }
18213
- this.keyModule.destroy();
18214
- this.keyModule = null;
18379
+ if (this.keyModule) {
18380
+ this.keyModule.destroy();
18381
+ this.keyModule = null;
18382
+ }
18215
18383
  this.resetSlideInterval();
18216
18384
  this.destroyButtons();
18217
18385
  this.unWireEvents();
@@ -18276,6 +18444,9 @@ __decorate$b([
18276
18444
  __decorate$b([
18277
18445
  Property(true)
18278
18446
  ], Carousel.prototype, "enableTouchSwipe", void 0);
18447
+ __decorate$b([
18448
+ Property(true)
18449
+ ], Carousel.prototype, "allowKeyboardInteraction", void 0);
18279
18450
  __decorate$b([
18280
18451
  Property(true)
18281
18452
  ], Carousel.prototype, "showIndicators", void 0);
@@ -18512,6 +18683,10 @@ var __decorate$d = (undefined && undefined.__decorate) || function (decorators,
18512
18683
  return c > 3 && r && Object.defineProperty(target, key, r), r;
18513
18684
  };
18514
18685
  const PROGRESSVALUE = '--progress-value';
18686
+ const PROGRESSPOS = '--progress-position';
18687
+ const VERTICALSTEP = 'e-vertical';
18688
+ const HORIZSTEP = 'e-horizontal';
18689
+ const ITEMLIST = 'e-stepper-steps';
18515
18690
  /**
18516
18691
  * Defines the status of the step.
18517
18692
  */
@@ -18624,8 +18799,8 @@ let StepperBase = class StepperBase extends Component {
18624
18799
  render() {
18625
18800
  }
18626
18801
  updateOrientaion(wrapper) {
18627
- if (wrapper.classList.contains('e-horizontal') || wrapper.classList.contains('e-vertical')) {
18628
- wrapper.classList.remove('e-horizontal', 'e-vertical');
18802
+ if (wrapper.classList.contains(HORIZSTEP) || wrapper.classList.contains(VERTICALSTEP)) {
18803
+ wrapper.classList.remove(HORIZSTEP, VERTICALSTEP);
18629
18804
  }
18630
18805
  if (!(isNullOrUndefined(this.orientation))) {
18631
18806
  wrapper.classList.add('e-' + this.orientation.toLocaleLowerCase());
@@ -18634,23 +18809,23 @@ let StepperBase = class StepperBase extends Component {
18634
18809
  renderProgressBar(wrapper) {
18635
18810
  this.progressStep = this.createElement('div', { className: 'e-stepper-progressbar' });
18636
18811
  this.progressbar = this.createElement('div', { className: 'e-progressbar-value' });
18812
+ const beforeLabel = (wrapper.querySelector('li').querySelector('.e-step-label-container'));
18637
18813
  this.progressStep.appendChild(this.progressbar);
18638
18814
  wrapper.prepend(this.progressStep);
18639
18815
  this.progressbar.style.setProperty(PROGRESSVALUE, (0) + '%');
18640
- const beforeLabel = (wrapper.querySelector('li').querySelector('.e-step-label-container'));
18641
- if (wrapper.classList.contains('e-vertical')) {
18816
+ if (wrapper.classList.contains(VERTICALSTEP)) {
18642
18817
  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');
18818
+ const stepsContainer = (wrapper.querySelector('.' + ITEMLIST));
18819
+ this.progressStep.style.setProperty(PROGRESSPOS, (stepsContainer.offsetWidth / 2) + 'px');
18645
18820
  }
18646
18821
  else {
18647
- this.progressStep.style.setProperty('--progress-position', ((this.progressBarPosition / 2) - 1) + 'px');
18822
+ this.progressStep.style.setProperty(PROGRESSPOS, ((this.progressBarPosition / 2) - 1) + 'px');
18648
18823
  }
18649
18824
  }
18650
18825
  if (beforeLabel && (beforeLabel.classList.contains('e-label-before'))) {
18651
- this.progressStep.style.setProperty('--progress-position', (((this.progressBarPosition) - 1)) + 5 + 'px');
18826
+ this.progressStep.style.setProperty(PROGRESSPOS, (((this.progressBarPosition) - 1)) + 5 + 'px');
18652
18827
  }
18653
- if (wrapper.classList.contains('e-horizontal')) {
18828
+ if (wrapper.classList.contains(HORIZSTEP)) {
18654
18829
  this.setProgressPosition(wrapper);
18655
18830
  }
18656
18831
  }
@@ -18667,9 +18842,9 @@ let StepperBase = class StepperBase extends Component {
18667
18842
  }
18668
18843
  this.progressStep.style.setProperty('--progress-top-position', topPos + 'px');
18669
18844
  }
18670
- const lastEle = wrapper.querySelector('.e-stepper-steps').lastChild.firstChild;
18845
+ const lastEle = wrapper.querySelector('.' + ITEMLIST).lastChild.firstChild;
18671
18846
  if (wrapper.classList.contains('e-rtl')) {
18672
- const leftPost = ((stepItemEle.offsetLeft + stepItemEle.offsetWidth) - wrapper.querySelector('.e-stepper-steps').offsetWidth);
18847
+ const leftPost = ((stepItemEle.offsetLeft + stepItemEle.offsetWidth) - wrapper.querySelector('.' + ITEMLIST).offsetWidth);
18673
18848
  this.progressStep.style.setProperty('--progress-left-position', Math.abs(leftPost) + 'px');
18674
18849
  this.progressStep.style.setProperty('--progress-bar-width', Math.abs(lastEle.offsetLeft - stepItemEle.offsetLeft) + 'px');
18675
18850
  }
@@ -18716,7 +18891,7 @@ var __decorate$e = (undefined && undefined.__decorate) || function (decorators,
18716
18891
  return c > 3 && r && Object.defineProperty(target, key, r), r;
18717
18892
  };
18718
18893
  const ITEMCONTAINER = 'e-step-container';
18719
- const ITEMLIST = 'e-stepper-steps';
18894
+ const ITEMLIST$1 = 'e-stepper-steps';
18720
18895
  const ICONCSS = 'e-indicator';
18721
18896
  const TEXTCSS = 'e-step-text-container';
18722
18897
  const STEPLABEL = 'e-step-label-container';
@@ -18733,8 +18908,8 @@ const RTL$3 = 'e-rtl';
18733
18908
  const TEMPLATE = 'e-step-template';
18734
18909
  const LABELAFTER = 'e-label-after';
18735
18910
  const LABELBEFORE = 'e-label-before';
18736
- const VERTICALSTEP = 'e-vertical';
18737
- const HORIZSTEP = 'e-horizontal';
18911
+ const VERTICALSTEP$1 = 'e-vertical';
18912
+ const HORIZSTEP$1 = 'e-horizontal';
18738
18913
  const STEPICON = 'e-step-item';
18739
18914
  const STEPTEXT = 'e-step-text';
18740
18915
  const TEXT = 'e-text';
@@ -18865,7 +19040,7 @@ let Stepper = class Stepper extends StepperBase {
18865
19040
  initialize() {
18866
19041
  this.element.setAttribute('aria-label', this.element.id);
18867
19042
  this.updatePosition();
18868
- this.stepperItemList = this.createElement('ol', { className: ITEMLIST });
19043
+ this.stepperItemList = this.createElement('ol', { className: ITEMLIST$1 });
18869
19044
  this.updateOrientaion(this.element);
18870
19045
  this.updateStepType();
18871
19046
  this.element.appendChild(this.stepperItemList);
@@ -18882,28 +19057,29 @@ let Stepper = class Stepper extends StepperBase {
18882
19057
  this.updateTemplateFunction();
18883
19058
  this.renderItems();
18884
19059
  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
- }
19060
+ this.initiateProgressBar();
18895
19061
  this.checkValidStep();
18896
19062
  this.updateAnimation();
18897
19063
  this.updateTooltip();
18898
19064
  this.wireKeyboardEvent();
18899
19065
  }
18900
19066
  }
19067
+ initiateProgressBar() {
19068
+ if (this.steps.length > 1) {
19069
+ if (this.isAngular && this.template) {
19070
+ setTimeout(() => { this.renderProgressBar(this.element); });
19071
+ }
19072
+ else {
19073
+ this.renderProgressBar(this.element);
19074
+ }
19075
+ }
19076
+ }
18901
19077
  updatePosition() {
18902
19078
  this.progressBarPosition = this.beforeLabelWidth = this.textEleWidth = 0;
18903
19079
  }
18904
19080
  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;
19081
+ const step = this.steps[parseInt(index.toString(), 10)];
19082
+ return !step.iconCss && !step.text && !step.label;
18907
19083
  }
18908
19084
  updateAnimation() {
18909
19085
  const progressEle = this.element.querySelector('.e-progressbar-value');
@@ -18927,12 +19103,16 @@ let Stepper = class Stepper extends StepperBase {
18927
19103
  }
18928
19104
  }
18929
19105
  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();
19106
+ if (!isNullOrUndefined(this.stepType)) {
19107
+ const stepTypeLower = this.stepType.toLowerCase();
19108
+ const validStepTypes = ['indicator', 'label', 'default'];
19109
+ if (validStepTypes.indexOf(stepTypeLower) !== -1) {
19110
+ if (stepTypeLower !== 'default') {
19111
+ this.element.classList.add('e-step-type-' + stepTypeLower);
19112
+ }
19113
+ if ((stepTypeLower === 'indicator' || stepTypeLower === 'label') && this.labelContainer) {
19114
+ this.clearLabelPosition();
19115
+ }
18936
19116
  }
18937
19117
  }
18938
19118
  }
@@ -18945,7 +19125,7 @@ let Stepper = class Stepper extends StepperBase {
18945
19125
  EventHandler.remove(window, 'click', this.updateStepFocus);
18946
19126
  }
18947
19127
  updateResize() {
18948
- if (this.stepperItemList && this.progressbar && this.element.classList.contains(HORIZSTEP)) {
19128
+ if (this.stepperItemList && this.progressbar && this.element.classList.contains(HORIZSTEP$1)) {
18949
19129
  this.setProgressPosition(this.element, true);
18950
19130
  }
18951
19131
  this.navigateToStep(this.activeStep, null, null, false, false);
@@ -19004,19 +19184,23 @@ let Stepper = class Stepper extends StepperBase {
19004
19184
  }
19005
19185
  }
19006
19186
  renderItems() {
19187
+ const isHorizontal = this.element.classList.contains(HORIZSTEP$1);
19188
+ const isVertical = this.element.classList.contains(VERTICALSTEP$1);
19189
+ const labelPositionLower = !isNullOrUndefined(this.labelPosition) ? this.labelPosition.toLowerCase() : '';
19007
19190
  for (let index = 0; index < this.steps.length; index++) {
19008
19191
  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
19192
  const stepSpan = this.createElement('span', { className: 'e-step' });
19015
19193
  const item = this.steps[parseInt(index.toString(), 10)];
19016
19194
  let isItemLabel = item.label ? true : false;
19017
19195
  let isItemText = item.text ? true : false;
19196
+ const isIndicator = this.element.classList.contains(STEPINDICATOR);
19197
+ this.stepperItemContainer.classList[(index === 0) ? 'add' : 'remove'](SELECTED$2, INPROGRESS);
19198
+ this.stepperItemContainer.classList[(index !== 0) ? 'add' : 'remove'](NOTSTARTED);
19199
+ if (isHorizontal) {
19200
+ this.stepperItemContainer.style.setProperty('--max-width', 100 / this.steps.length + '%');
19201
+ }
19018
19202
  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;
19203
+ const isIndicator = !this.element.classList.contains('e-step-type-default') && this.stepType.toLowerCase() === 'indicator';
19020
19204
  if (isIndicator) {
19021
19205
  stepSpan.classList.add('e-icons', INDICATORICON);
19022
19206
  }
@@ -19032,10 +19216,7 @@ let Stepper = class Stepper extends StepperBase {
19032
19216
  !this.element.classList.contains(LABELINDICATOR)))) {
19033
19217
  if (item.iconCss) {
19034
19218
  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
- }
19219
+ stepSpan.classList.add(ICONCSS, ...itemIcon);
19039
19220
  this.stepperItemContainer.classList.add(STEPICON);
19040
19221
  }
19041
19222
  else if (!item.iconCss && isItemText && isItemLabel) {
@@ -19044,51 +19225,41 @@ let Stepper = class Stepper extends StepperBase {
19044
19225
  this.stepperItemContainer.classList.add(STEPICON);
19045
19226
  }
19046
19227
  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);
19228
+ if (((isHorizontal && (labelPositionLower === 'start' || labelPositionLower === 'end') && isItemLabel) ||
19229
+ (isVertical && (labelPositionLower === 'top' || labelPositionLower === 'bottom') && isItemLabel)) && !isIndicator) {
19230
+ this.element.classList.add('e-label-' + labelPositionLower);
19231
+ this.createTextLabelElement(item.label);
19054
19232
  isRender = false;
19055
19233
  }
19056
19234
  }
19057
- if (isItemText && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender &&
19235
+ if (isItemText && (!item.iconCss || !isIndicator) && isRender &&
19058
19236
  !(item.iconCss && isItemLabel)) {
19059
- if ((!item.iconCss && this.element.classList.contains(STEPINDICATOR)) ||
19237
+ if ((!item.iconCss && isIndicator) ||
19060
19238
  ((!item.iconCss || this.element.classList.contains(LABELINDICATOR)) && !isItemLabel)) {
19061
19239
  if (!item.iconCss && !isItemLabel) {
19062
19240
  this.element.classList.add('e-step-type-indicator');
19063
19241
  }
19064
19242
  this.checkValidState(item, stepSpan);
19065
- isItemLabel = null;
19243
+ isItemLabel = false;
19066
19244
  }
19067
19245
  else {
19068
- const textSpan = this.createElement('span', { className: TEXT });
19069
19246
  if (!isItemLabel) {
19070
- textSpan.innerText = item.text;
19071
- textSpan.classList.add(TEXTCSS);
19072
- this.stepperItemContainer.appendChild(textSpan);
19073
- this.stepperItemContainer.classList.add(STEPTEXT);
19247
+ this.createTextLabelElement(item.text);
19074
19248
  }
19075
19249
  if (isItemLabel && this.element.classList.contains(LABELINDICATOR)) {
19250
+ const textSpan = this.createElement('span', { className: TEXT });
19076
19251
  textSpan.innerText = item.label;
19077
19252
  }
19078
- isItemText = item.label ? false : true;
19253
+ isItemText = isItemLabel ? false : true;
19079
19254
  }
19080
19255
  }
19081
- if (isItemLabel && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender) {
19082
- if (!item.iconCss && !isItemText && this.element.classList.contains(STEPINDICATOR)) {
19256
+ if (isItemLabel && isItemLabel && (!item.iconCss || !isIndicator) && isRender) {
19257
+ if (!item.iconCss && !isItemText && isIndicator) {
19083
19258
  this.checkValidState(item, stepSpan, true);
19084
19259
  }
19085
19260
  else if ((!((this.element.classList.contains(LABELINDICATOR)) && isItemText)) ||
19086
19261
  (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);
19262
+ this.createTextLabelElement(item.label, true);
19092
19263
  this.updateLabelPosition();
19093
19264
  if ((!item.iconCss && !isItemText && !this.stepperItemContainer.classList.contains(STEPICON)) ||
19094
19265
  this.element.classList.contains(LABELINDICATOR)) {
@@ -19107,8 +19278,8 @@ let Stepper = class Stepper extends StepperBase {
19107
19278
  const optionalContent = this.l10n.getConstant('optional');
19108
19279
  optionalSpan.innerText = optionalContent;
19109
19280
  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))) {
19281
+ || (isHorizontal && this.element.classList.contains(LABELBEFORE) && !this.stepperItemContainer.classList.contains('e-step-label-only'))))
19282
+ || (isVertical && this.element.classList.contains(LABELBEFORE))) {
19112
19283
  this.labelContainer.appendChild(optionalSpan);
19113
19284
  }
19114
19285
  else {
@@ -19146,16 +19317,16 @@ let Stepper = class Stepper extends StepperBase {
19146
19317
  this.trigger('beforeStepRender', eventArgs, (args) => {
19147
19318
  this.stepperItemList.appendChild(args.element);
19148
19319
  });
19149
- if (this.isAngular && this.template) {
19150
- setTimeout(() => {
19320
+ if (isVertical) {
19321
+ if (this.isAngular && this.template) {
19322
+ setTimeout(() => { this.calculateProgressBarPosition(); });
19323
+ }
19324
+ else {
19151
19325
  this.calculateProgressBarPosition();
19152
- });
19153
- }
19154
- else {
19155
- this.calculateProgressBarPosition();
19326
+ }
19156
19327
  }
19157
19328
  }
19158
- if (this.element.classList.contains(VERTICALSTEP)) {
19329
+ if (isVertical) {
19159
19330
  if (this.element.classList.contains(LABELBEFORE)) {
19160
19331
  const listItems = this.stepperItemList.querySelectorAll('.' + LABEL);
19161
19332
  for (let i = 0; i < listItems.length; i++) {
@@ -19165,37 +19336,47 @@ let Stepper = class Stepper extends StepperBase {
19165
19336
  }
19166
19337
  }
19167
19338
  }
19339
+ createTextLabelElement(content, isLabelEle = false) {
19340
+ const spanEle = this.createElement('span', { className: isLabelEle ? LABEL : `${TEXTCSS} ${TEXT}` });
19341
+ spanEle.innerText = content;
19342
+ if (isLabelEle) {
19343
+ this.labelContainer = this.createElement('span', { className: STEPLABEL });
19344
+ this.labelContainer.appendChild(spanEle);
19345
+ }
19346
+ else {
19347
+ this.stepperItemContainer.appendChild(spanEle);
19348
+ }
19349
+ this.stepperItemContainer.classList.add(isLabelEle ? STEPSLABEL : STEPTEXT);
19350
+ }
19168
19351
  calculateProgressBarPosition() {
19169
19352
  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;
19178
- }
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
- }
19353
+ const iconOnly = (this.stepperItemContainer.classList.contains(STEPICON) &&
19354
+ !this.stepperItemContainer.classList.contains(STEPTEXT) &&
19355
+ !this.stepperItemContainer.classList.contains(STEPSLABEL));
19356
+ const textEle = (this.stepperItemContainer.querySelector('.' + TEXTCSS));
19357
+ if (textEle) {
19358
+ this.textEleWidth = this.textEleWidth < textEle.offsetWidth ? textEle.offsetWidth : this.textEleWidth;
19359
+ }
19360
+ if (isBeforeLabel) {
19361
+ const labelWidth = this.stepperItemContainer.querySelector('.' + LABEL).offsetWidth + 15;
19362
+ this.beforeLabelWidth = Math.max(this.beforeLabelWidth, labelWidth);
19363
+ const iconEle = this.element.querySelector('ol').lastChild.querySelector('.' + ICONCSS);
19364
+ const textEle = this.stepperItemContainer.querySelector('.' + TEXTCSS);
19365
+ if (iconEle || textEle) {
19366
+ const itemWidth = this.beforeLabelWidth + ((this.stepperItemContainer.querySelector('.' + ICONCSS)
19367
+ || textEle).offsetWidth / 2);
19368
+ this.progressBarPosition = Math.max(this.progressBarPosition, itemWidth);
19194
19369
  }
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;
19370
+ else {
19371
+ this.progressBarPosition = Math.max(this.progressBarPosition, (this.beforeLabelWidth / 2));
19197
19372
  }
19198
19373
  }
19374
+ else {
19375
+ const lastChild = this.element.querySelector('ol').lastChild;
19376
+ const lastChildWidth = iconOnly ? this.stepperItemContainer.offsetWidth :
19377
+ lastChild.firstChild.offsetWidth;
19378
+ this.progressBarPosition = Math.max(this.progressBarPosition, lastChildWidth);
19379
+ }
19199
19380
  }
19200
19381
  checkValidState(item, stepSpan, isLabel) {
19201
19382
  if (item.isValid == null) {
@@ -19215,13 +19396,10 @@ let Stepper = class Stepper extends StepperBase {
19215
19396
  }
19216
19397
  }
19217
19398
  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
- }
19399
+ const labelPos = this.labelPosition.toLowerCase();
19400
+ const currentLabelPos = this.element.classList.contains(HORIZSTEP$1)
19401
+ ? (labelPos === 'top' ? 'before' : labelPos === 'bottom' ? 'after' : labelPos)
19402
+ : (labelPos === 'start' ? 'before' : labelPos === 'end' ? 'after' : labelPos);
19225
19403
  return currentLabelPos;
19226
19404
  }
19227
19405
  updateLabelPosition() {
@@ -19248,49 +19426,49 @@ let Stepper = class Stepper extends StepperBase {
19248
19426
  }
19249
19427
  }
19250
19428
  checkValidStep() {
19429
+ const isStepIndicator = this.element.classList.contains(STEPINDICATOR);
19251
19430
  for (let index = 0; index < this.steps.length; index++) {
19252
19431
  const item = this.steps[parseInt(index.toString(), 10)];
19253
19432
  const itemElement = this.stepperItemElements[parseInt(index.toString(), 10)];
19254
19433
  if (item.isValid !== null) {
19255
19434
  let indicatorEle;
19256
19435
  let iconEle;
19257
- if (this.element.classList.contains(STEPINDICATOR) && !item.iconCss) {
19436
+ if (isStepIndicator && !item.iconCss) {
19258
19437
  indicatorEle = itemElement.querySelector('.' + ICONCSS);
19259
19438
  }
19260
19439
  else {
19261
19440
  iconEle = itemElement.querySelector('.' + ICONCSS);
19262
19441
  }
19263
- if (!indicatorEle && this.element.classList.contains(STEPINDICATOR) && this.renderDefault(index)) {
19442
+ if (!indicatorEle && isStepIndicator && this.renderDefault(index)) {
19264
19443
  indicatorEle = itemElement.querySelector('.' + INDICATORICON);
19265
19444
  }
19266
19445
  const textLabelIcon = itemElement.querySelector('.e-step-validation-icon');
19267
19446
  const itemIcon = item.iconCss.trim().split(' ');
19268
19447
  const validStep = itemElement.classList.contains('e-step-valid');
19448
+ const validIconClass = validStep ? 'e-check' : 'e-circle-info';
19269
19449
  if (indicatorEle) {
19270
19450
  indicatorEle.classList.remove(INDICATORICON);
19271
19451
  if (indicatorEle.innerHTML !== '') {
19272
19452
  indicatorEle.innerHTML = '';
19273
19453
  }
19274
- indicatorEle.classList.add('e-icons', validStep ? 'e-check' : 'e-circle-info', ICONCSS);
19454
+ indicatorEle.classList.add('e-icons', validIconClass, ICONCSS);
19275
19455
  }
19276
- if (this.renderDefault(index) && !this.element.classList.contains(STEPINDICATOR)) {
19456
+ if (this.renderDefault(index) && !isStepIndicator) {
19277
19457
  const stepSpan = itemElement.querySelector('.e-step');
19278
- stepSpan.classList.add('e-icons', validStep ? 'e-check' : 'e-circle-info', ICONCSS);
19458
+ stepSpan.classList.add('e-icons', validIconClass, ICONCSS);
19279
19459
  }
19280
19460
  if (iconEle) {
19281
19461
  if (iconEle.innerHTML !== '') {
19282
19462
  iconEle.innerHTML = '';
19283
19463
  }
19284
19464
  else if (itemIcon.length > 0) {
19285
- for (let i = 0; i < itemIcon.length; i++) {
19286
- iconEle.classList.remove(itemIcon[parseInt(i.toString(), 10)]);
19287
- }
19465
+ itemIcon.forEach((icon) => { iconEle.classList.remove(icon); });
19288
19466
  }
19289
- iconEle.classList.add('e-icons', validStep ? 'e-check' : 'e-circle-info');
19467
+ iconEle.classList.add('e-icons', validIconClass);
19290
19468
  }
19291
19469
  if (textLabelIcon) {
19292
19470
  textLabelIcon.classList.add(validStep ? 'e-circle-check' : 'e-circle-info');
19293
- if (this.element.classList.contains(VERTICALSTEP)) {
19471
+ if (this.element.classList.contains(VERTICALSTEP$1)) {
19294
19472
  const labelEle = itemElement.querySelector('.' + LABEL);
19295
19473
  const textEle = itemElement.querySelector('.' + TEXT);
19296
19474
  const itemWidth = textEle ? textEle.offsetWidth + textEle.getBoundingClientRect().left :
@@ -19319,19 +19497,28 @@ let Stepper = class Stepper extends StepperBase {
19319
19497
  }
19320
19498
  }
19321
19499
  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 {
19500
+ EventHandler.add(itemElement, 'click', this.linearModeHandler.bind(this, itemElement, index), this);
19501
+ EventHandler.add(itemElement, 'mouseover', this.openStepperTooltip.bind(this, index), this);
19502
+ EventHandler.add(itemElement, 'mouseleave', this.closeStepperTooltip, this);
19503
+ }
19504
+ unWireItemsEvents() {
19505
+ for (let index = 0; index < this.steps.length; index++) {
19506
+ const itemElement = this.stepperItemElements[parseInt(index.toString(), 10)];
19507
+ EventHandler.remove(itemElement, 'click', this.linearModeHandler.bind(this, itemElement, index));
19508
+ EventHandler.remove(itemElement, 'mouseover', this.openStepperTooltip.bind(this, index));
19509
+ EventHandler.remove(itemElement, 'mouseleave', this.closeStepperTooltip);
19510
+ }
19511
+ }
19512
+ linearModeHandler(itemElement, index, e) {
19513
+ if (this.linear) {
19514
+ const linearModeValue = index - this.activeStep;
19515
+ if (Math.abs(linearModeValue) === 1) {
19330
19516
  this.stepClickHandler(index, e, itemElement);
19331
19517
  }
19332
- }, this);
19333
- EventHandler.add(itemElement, 'mouseover', () => this.openStepperTooltip(index), this);
19334
- EventHandler.add(itemElement, 'mouseleave', () => this.closeStepperTooltip(), this);
19518
+ }
19519
+ else {
19520
+ this.stepClickHandler(index, e, itemElement);
19521
+ }
19335
19522
  }
19336
19523
  openStepperTooltip(index) {
19337
19524
  const currentStep = this.steps[parseInt(index.toString(), 10)];
@@ -19472,7 +19659,7 @@ let Stepper = class Stepper extends StepperBase {
19472
19659
  }
19473
19660
  }
19474
19661
  navigationHandler(index, stepStatus, isUpdated) {
19475
- index = (index >= this.steps.length - 1) ? this.steps.length - 1 : index;
19662
+ index = Math.min(index, this.steps.length - 1);
19476
19663
  const Itemslength = this.stepperItemElements.length;
19477
19664
  if (index >= 0 && index < Itemslength - 1) {
19478
19665
  index = this.stepperItemElements[parseInt(index.toString(), 10)].classList.contains(DISABLED$2) ? this.activeStep : index;
@@ -19489,46 +19676,8 @@ let Stepper = class Stepper extends StepperBase {
19489
19676
  itemElement.classList.add(SELECTED$2);
19490
19677
  }
19491
19678
  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
- }
19679
+ if (this.element.classList.contains(HORIZSTEP$1)) {
19680
+ this.calculateProgressbarPos();
19532
19681
  }
19533
19682
  else {
19534
19683
  this.progressbar.style.setProperty(PROGRESSVALUE$1, ((100 / (this.steps.length - 1)) * index) + '%');
@@ -19577,26 +19726,63 @@ let Stepper = class Stepper extends StepperBase {
19577
19726
  }
19578
19727
  }
19579
19728
  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');
19729
+ this.updateIndicatorStatus(i, itemElement);
19730
+ }
19731
+ this.updateStepInteractions();
19732
+ }
19733
+ calculateProgressbarPos() {
19734
+ if ((this.element.classList.contains(LABELBEFORE) || this.element.classList.contains(LABELAFTER)) &&
19735
+ !this.element.classList.contains(STEPINDICATOR) &&
19736
+ this.stepperItemElements[parseInt(this.activeStep.toString(), 10)].classList.contains(STEPICON)) {
19737
+ const progressPos = this.element.querySelector('.e-stepper-progressbar');
19738
+ const selectedEle = this.stepperItemElements[parseInt(this.activeStep.toString(), 10)]
19739
+ .firstChild;
19740
+ let value = this.activeStep === 0 ? 0 : (selectedEle.offsetLeft - progressPos.offsetLeft +
19741
+ (selectedEle.offsetWidth / 2)) / progressPos.offsetWidth * 100;
19742
+ if (this.element.classList.contains(RTL$3)) {
19743
+ value = (progressPos.getBoundingClientRect().right - selectedEle.getBoundingClientRect().right +
19744
+ (selectedEle.offsetWidth / 2)) / progressPos.offsetWidth * 100;
19745
+ this.progressbar.style.setProperty(PROGRESSVALUE$1, (value) + '%');
19746
+ }
19747
+ else {
19748
+ this.progressbar.style.setProperty(PROGRESSVALUE$1, (value) + '%');
19749
+ }
19750
+ }
19751
+ else {
19752
+ let totalLiWidth = 0;
19753
+ let activeLiWidth = 0;
19754
+ this.stepperItemElements.forEach((element, index) => {
19755
+ const itemWidth = element.offsetWidth;
19756
+ totalLiWidth += itemWidth;
19757
+ if (index <= this.activeStep) {
19758
+ activeLiWidth += (index === this.activeStep && index !== 0) ? (itemWidth / 2) : itemWidth;
19588
19759
  }
19760
+ });
19761
+ const spaceWidth = (this.stepperItemList.offsetWidth - totalLiWidth) /
19762
+ (this.stepperItemElements.length - 1);
19763
+ const progressValue = ((activeLiWidth + (spaceWidth * this.activeStep)) /
19764
+ this.stepperItemList.offsetWidth) * 100;
19765
+ this.progressbar.style.setProperty(PROGRESSVALUE$1, (progressValue) + '%');
19766
+ }
19767
+ }
19768
+ updateIndicatorStatus(index, itemElement) {
19769
+ if (this.renderDefault(index) && this.element.classList.contains(STEPINDICATOR) && !itemElement.classList.contains('e-step-valid')
19770
+ && !itemElement.classList.contains('e-step-error')) {
19771
+ if (itemElement.classList.contains(COMPLETED)) {
19772
+ itemElement.firstChild.classList.remove('e-icons', 'e-step-indicator');
19773
+ itemElement.firstChild.classList.add(ICONCSS, 'e-icons', 'e-check');
19774
+ }
19775
+ else if (itemElement.classList.contains(INPROGRESS) || itemElement.classList.contains(NOTSTARTED)) {
19776
+ itemElement.firstChild.classList.remove(ICONCSS, 'e-icons', 'e-check');
19777
+ itemElement.firstChild.classList.add('e-icons', 'e-step-indicator');
19589
19778
  }
19590
19779
  }
19591
- this.updateStepInteractions();
19592
19780
  }
19593
19781
  updateStepInteractions() {
19594
19782
  this.element.classList.toggle(LINEARSTEP, this.linear);
19595
19783
  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);
19784
+ step.classList.toggle(PREVSTEP, (index === this.activeStep - 1));
19785
+ step.classList.toggle(NEXTSTEP, (index === this.activeStep + 1));
19600
19786
  });
19601
19787
  }
19602
19788
  removeItemElements() {
@@ -19652,7 +19838,7 @@ let Stepper = class Stepper extends StepperBase {
19652
19838
  }
19653
19839
  updateElementClassArray() {
19654
19840
  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];
19841
+ 'e-label-bottom', 'e-label-start', 'e-label-end', STEPINDICATOR, LABELINDICATOR, VERTICALSTEP$1, HORIZSTEP$1, LINEARSTEP];
19656
19842
  removeClass([this.element], classArray);
19657
19843
  }
19658
19844
  /**
@@ -19663,6 +19849,7 @@ let Stepper = class Stepper extends StepperBase {
19663
19849
  destroy() {
19664
19850
  super.destroy();
19665
19851
  this.unWireEvents();
19852
+ this.unWireItemsEvents();
19666
19853
  // unwires the events and detach the li elements
19667
19854
  this.removeItemElements();
19668
19855
  this.clearTemplate();
@@ -19708,7 +19895,7 @@ let Stepper = class Stepper extends StepperBase {
19708
19895
  case 'rightarrow':
19709
19896
  case 'tab':
19710
19897
  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);
19898
+ 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
19899
  break;
19713
19900
  case 'space':
19714
19901
  case 'enter':
@@ -19809,6 +19996,66 @@ let Stepper = class Stepper extends StepperBase {
19809
19996
  this.updateAnimation();
19810
19997
  this.navigateToStep(this.activeStep, null, this.stepperItemElements[this.activeStep], true);
19811
19998
  }
19999
+ updateDynamicSteps(steps, prevSteps) {
20000
+ if (!(steps instanceof Array && prevSteps instanceof Array)) {
20001
+ const stepCounts = Object.keys(steps);
20002
+ for (let i = 0; i < stepCounts.length; i++) {
20003
+ const index = parseInt(Object.keys(steps)[i], 10);
20004
+ const changedPropsCount = Object.keys(steps[index]).length;
20005
+ for (let j = 0; j < changedPropsCount; j++) {
20006
+ const property = Object.keys(steps[index])[j];
20007
+ if (property === 'status') {
20008
+ if (this.activeStep === index) {
20009
+ this.navigationHandler(index, steps[index].status);
20010
+ }
20011
+ else {
20012
+ this.steps[index].status = prevSteps[index].status;
20013
+ }
20014
+ }
20015
+ else {
20016
+ this.removeItemElements();
20017
+ this.renderItems();
20018
+ this.updateStepperStatus();
20019
+ }
20020
+ if (property === 'label' && (this.steps[index].iconCss || this.steps[index].text) &&
20021
+ this.stepType.toLowerCase() === 'default') {
20022
+ this.refreshProgressbar();
20023
+ }
20024
+ this.updateStepInteractions();
20025
+ this.checkValidStep();
20026
+ }
20027
+ }
20028
+ }
20029
+ else {
20030
+ this.renderStepperItems(true, true);
20031
+ }
20032
+ }
20033
+ updateDynamicActiveStep(activeStep, preActiveStep) {
20034
+ this.activeStep = (activeStep > this.steps.length - 1 || activeStep < -1) ? preActiveStep : this.activeStep;
20035
+ if (this.activeStep >= 0 && this.stepperItemElements[parseInt(this.activeStep.toString(), 10)].classList.contains(DISABLED$2)) {
20036
+ this.activeStep = preActiveStep;
20037
+ }
20038
+ if (this.linear) {
20039
+ const linearModeValue = preActiveStep - this.activeStep;
20040
+ if (Math.abs(linearModeValue) === 1) {
20041
+ this.navigateToStep(this.activeStep, null, null, true);
20042
+ }
20043
+ }
20044
+ else {
20045
+ this.navigateToStep(this.activeStep, null, this.stepperItemElements[this.activeStep], true);
20046
+ }
20047
+ }
20048
+ updateDynamicCssClass(cssClass, prevCssClass) {
20049
+ if (prevCssClass) {
20050
+ removeClass([this.element], prevCssClass.trim().split(' '));
20051
+ }
20052
+ if (cssClass) {
20053
+ addClass([this.element], cssClass.trim().split(' '));
20054
+ }
20055
+ if (this.tooltipObj) {
20056
+ this.tooltipObj.setProperties({ cssClass: this.cssClass ? (STEPPERTOOLTIP + ' ' + this.cssClass) : STEPPERTOOLTIP });
20057
+ }
20058
+ }
19812
20059
  /**
19813
20060
  * Called internally if any of the property value changed.
19814
20061
  *
@@ -19821,38 +20068,7 @@ let Stepper = class Stepper extends StepperBase {
19821
20068
  for (const prop of Object.keys(newProp)) {
19822
20069
  switch (prop) {
19823
20070
  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
- }
20071
+ this.updateDynamicSteps(newProp.steps, oldProp.steps);
19856
20072
  break;
19857
20073
  }
19858
20074
  case 'orientation':
@@ -19860,21 +20076,7 @@ let Stepper = class Stepper extends StepperBase {
19860
20076
  this.renderStepperItems(true);
19861
20077
  break;
19862
20078
  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
- }
20079
+ this.updateDynamicActiveStep(newProp.activeStep, oldProp.activeStep);
19878
20080
  break;
19879
20081
  case 'enableRtl':
19880
20082
  this.element.classList[this.enableRtl ? 'add' : 'remove'](RTL$3);
@@ -19883,15 +20085,7 @@ let Stepper = class Stepper extends StepperBase {
19883
20085
  this.element.classList[this.readOnly ? 'add' : 'remove'](READONLY);
19884
20086
  break;
19885
20087
  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
- }
20088
+ this.updateDynamicCssClass(newProp.cssClass, oldProp.cssClass);
19895
20089
  break;
19896
20090
  case 'labelPosition':
19897
20091
  this.renderStepperItems(true);