@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
@@ -178,7 +178,6 @@ var Stepper = /** @class */ (function (_super) {
178
178
  this.updateStepperStatus(true);
179
179
  };
180
180
  Stepper.prototype.initialize = function () {
181
- var _this = this;
182
181
  this.element.setAttribute('aria-label', this.element.id);
183
182
  this.updatePosition();
184
183
  this.stepperItemList = this.createElement('ol', { className: ITEMLIST });
@@ -198,28 +197,30 @@ var Stepper = /** @class */ (function (_super) {
198
197
  this.updateTemplateFunction();
199
198
  this.renderItems();
200
199
  if (this.steps.length > 0) {
201
- if (this.steps.length > 1) {
202
- if (this.isAngular && this.template) {
203
- setTimeout(function () {
204
- _this.renderProgressBar(_this.element);
205
- });
206
- }
207
- else {
208
- this.renderProgressBar(this.element);
209
- }
210
- }
200
+ this.initiateProgressBar();
211
201
  this.checkValidStep();
212
202
  this.updateAnimation();
213
203
  this.updateTooltip();
214
204
  this.wireKeyboardEvent();
215
205
  }
216
206
  };
207
+ Stepper.prototype.initiateProgressBar = function () {
208
+ var _this = this;
209
+ if (this.steps.length > 1) {
210
+ if (this.isAngular && this.template) {
211
+ setTimeout(function () { _this.renderProgressBar(_this.element); });
212
+ }
213
+ else {
214
+ this.renderProgressBar(this.element);
215
+ }
216
+ }
217
+ };
217
218
  Stepper.prototype.updatePosition = function () {
218
219
  this.progressBarPosition = this.beforeLabelWidth = this.textEleWidth = 0;
219
220
  };
220
221
  Stepper.prototype.renderDefault = function (index) {
221
- return (!this.steps[parseInt((index).toString(), 10)].iconCss && !this.steps[parseInt((index).toString(), 10)].text &&
222
- !this.steps[parseInt((index).toString(), 10)].label) ? true : false;
222
+ var step = this.steps[parseInt(index.toString(), 10)];
223
+ return !step.iconCss && !step.text && !step.label;
223
224
  };
224
225
  Stepper.prototype.updateAnimation = function () {
225
226
  var progressEle = this.element.querySelector('.e-progressbar-value');
@@ -243,12 +244,16 @@ var Stepper = /** @class */ (function (_super) {
243
244
  }
244
245
  };
245
246
  Stepper.prototype.updateStepType = function () {
246
- if (!(isNullOrUndefined(this.stepType)) && (this.stepType.toLowerCase() === 'indicator' || this.stepType.toLowerCase() === 'label' || this.stepType.toLowerCase() === 'default')) {
247
- if (this.stepType.toLowerCase() !== 'default') {
248
- this.element.classList.add('e-step-type-' + this.stepType.toLowerCase());
249
- }
250
- if (((this.stepType.toLowerCase() === 'indicator' || 'label') && (this.labelContainer))) {
251
- this.clearLabelPosition();
247
+ if (!isNullOrUndefined(this.stepType)) {
248
+ var stepTypeLower = this.stepType.toLowerCase();
249
+ var validStepTypes = ['indicator', 'label', 'default'];
250
+ if (validStepTypes.indexOf(stepTypeLower) !== -1) {
251
+ if (stepTypeLower !== 'default') {
252
+ this.element.classList.add('e-step-type-' + stepTypeLower);
253
+ }
254
+ if ((stepTypeLower === 'indicator' || stepTypeLower === 'label') && this.labelContainer) {
255
+ this.clearLabelPosition();
256
+ }
252
257
  }
253
258
  }
254
259
  };
@@ -321,23 +326,28 @@ var Stepper = /** @class */ (function (_super) {
321
326
  };
322
327
  Stepper.prototype.renderItems = function () {
323
328
  var _this = this;
329
+ var _a;
330
+ var isHorizontal = this.element.classList.contains(HORIZSTEP);
331
+ var isVertical = this.element.classList.contains(VERTICALSTEP);
332
+ var labelPositionLower = !isNullOrUndefined(this.labelPosition) ? this.labelPosition.toLowerCase() : '';
324
333
  for (var index = 0; index < this.steps.length; index++) {
325
334
  this.stepperItemContainer = this.createElement('li', { className: ITEMCONTAINER });
326
- this.stepperItemContainer.classList[(index === 0) ? 'add' : 'remove'](SELECTED, INPROGRESS);
327
- this.stepperItemContainer.classList[(index !== 0) ? 'add' : 'remove'](NOTSTARTED);
328
- if (this.element.classList.contains(HORIZSTEP)) {
329
- this.stepperItemContainer.style.setProperty('--max-width', 100 / this.steps.length + '%');
330
- }
331
335
  var stepSpan = this.createElement('span', { className: 'e-step' });
332
336
  var item = this.steps[parseInt(index.toString(), 10)];
333
337
  var isItemLabel = item.label ? true : false;
334
338
  var isItemText = item.text ? true : false;
339
+ var isIndicator = this.element.classList.contains(STEPINDICATOR);
340
+ this.stepperItemContainer.classList[(index === 0) ? 'add' : 'remove'](SELECTED, INPROGRESS);
341
+ this.stepperItemContainer.classList[(index !== 0) ? 'add' : 'remove'](NOTSTARTED);
342
+ if (isHorizontal) {
343
+ this.stepperItemContainer.style.setProperty('--max-width', 100 / this.steps.length + '%');
344
+ }
335
345
  if (this.renderDefault(index) && (isNullOrUndefined(this.template) || this.template === '')) {
336
- var isIndicator = (!this.element.classList.contains('e-step-type-default') && this.stepType.toLowerCase() === 'indicator') ? true : false;
337
- if (isIndicator) {
346
+ var isIndicator_1 = !this.element.classList.contains('e-step-type-default') && this.stepType.toLowerCase() === 'indicator';
347
+ if (isIndicator_1) {
338
348
  stepSpan.classList.add('e-icons', INDICATORICON);
339
349
  }
340
- if (!isIndicator && item.isValid == null) {
350
+ if (!isIndicator_1 && item.isValid == null) {
341
351
  stepSpan.classList.add('e-step-content');
342
352
  stepSpan.innerHTML = (index + 1).toString();
343
353
  }
@@ -349,10 +359,7 @@ var Stepper = /** @class */ (function (_super) {
349
359
  !this.element.classList.contains(LABELINDICATOR)))) {
350
360
  if (item.iconCss) {
351
361
  var itemIcon = item.iconCss.trim().split(' ');
352
- stepSpan.classList.add(ICONCSS);
353
- for (var i = 0; i < itemIcon.length; i++) {
354
- stepSpan.classList.add(itemIcon[parseInt(i.toString(), 10)]);
355
- }
362
+ (_a = stepSpan.classList).add.apply(_a, [ICONCSS].concat(itemIcon));
356
363
  this.stepperItemContainer.classList.add(STEPICON);
357
364
  }
358
365
  else if (!item.iconCss && isItemText && isItemLabel) {
@@ -361,51 +368,41 @@ var Stepper = /** @class */ (function (_super) {
361
368
  this.stepperItemContainer.classList.add(STEPICON);
362
369
  }
363
370
  this.stepperItemContainer.appendChild(stepSpan);
364
- if ((this.element.classList.contains(HORIZSTEP) && (this.labelPosition.toLowerCase() === 'start' || this.labelPosition.toLowerCase() === 'end') && isItemLabel) ||
365
- (this.element.classList.contains(VERTICALSTEP) && (this.labelPosition.toLowerCase() === 'top' || this.labelPosition.toLowerCase() === 'bottom') && isItemLabel)) {
366
- this.element.classList.add('e-label-' + this.labelPosition.toLowerCase());
367
- var textSpan = this.createElement('span', { className: TEXTCSS + ' ' + TEXT });
368
- textSpan.innerText = item.label;
369
- this.stepperItemContainer.appendChild(textSpan);
370
- this.stepperItemContainer.classList.add(STEPTEXT);
371
+ if (((isHorizontal && (labelPositionLower === 'start' || labelPositionLower === 'end') && isItemLabel) ||
372
+ (isVertical && (labelPositionLower === 'top' || labelPositionLower === 'bottom') && isItemLabel)) && !isIndicator) {
373
+ this.element.classList.add('e-label-' + labelPositionLower);
374
+ this.createTextLabelElement(item.label);
371
375
  isRender = false;
372
376
  }
373
377
  }
374
- if (isItemText && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender &&
378
+ if (isItemText && (!item.iconCss || !isIndicator) && isRender &&
375
379
  !(item.iconCss && isItemLabel)) {
376
- if ((!item.iconCss && this.element.classList.contains(STEPINDICATOR)) ||
380
+ if ((!item.iconCss && isIndicator) ||
377
381
  ((!item.iconCss || this.element.classList.contains(LABELINDICATOR)) && !isItemLabel)) {
378
382
  if (!item.iconCss && !isItemLabel) {
379
383
  this.element.classList.add('e-step-type-indicator');
380
384
  }
381
385
  this.checkValidState(item, stepSpan);
382
- isItemLabel = null;
386
+ isItemLabel = false;
383
387
  }
384
388
  else {
385
- var textSpan = this.createElement('span', { className: TEXT });
386
389
  if (!isItemLabel) {
387
- textSpan.innerText = item.text;
388
- textSpan.classList.add(TEXTCSS);
389
- this.stepperItemContainer.appendChild(textSpan);
390
- this.stepperItemContainer.classList.add(STEPTEXT);
390
+ this.createTextLabelElement(item.text);
391
391
  }
392
392
  if (isItemLabel && this.element.classList.contains(LABELINDICATOR)) {
393
+ var textSpan = this.createElement('span', { className: TEXT });
393
394
  textSpan.innerText = item.label;
394
395
  }
395
- isItemText = item.label ? false : true;
396
+ isItemText = isItemLabel ? false : true;
396
397
  }
397
398
  }
398
- if (isItemLabel && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender) {
399
- if (!item.iconCss && !isItemText && this.element.classList.contains(STEPINDICATOR)) {
399
+ if (isItemLabel && isItemLabel && (!item.iconCss || !isIndicator) && isRender) {
400
+ if (!item.iconCss && !isItemText && isIndicator) {
400
401
  this.checkValidState(item, stepSpan, true);
401
402
  }
402
403
  else if ((!((this.element.classList.contains(LABELINDICATOR)) && isItemText)) ||
403
404
  (this.element.classList.contains(LABELINDICATOR) && isItemLabel)) {
404
- this.labelContainer = this.createElement('span', { className: STEPLABEL });
405
- var labelSpan = this.createElement('span', { className: LABEL });
406
- labelSpan.innerText = item.label;
407
- this.labelContainer.appendChild(labelSpan);
408
- this.stepperItemContainer.classList.add(STEPSLABEL);
405
+ this.createTextLabelElement(item.label, true);
409
406
  this.updateLabelPosition();
410
407
  if ((!item.iconCss && !isItemText && !this.stepperItemContainer.classList.contains(STEPICON)) ||
411
408
  this.element.classList.contains(LABELINDICATOR)) {
@@ -424,8 +421,8 @@ var Stepper = /** @class */ (function (_super) {
424
421
  var optionalContent = this.l10n.getConstant('optional');
425
422
  optionalSpan.innerText = optionalContent;
426
423
  if (isItemLabel && (this.labelContainer && ((this.element.classList.contains(LABELAFTER) && !this.stepperItemContainer.classList.contains('e-step-label-only'))
427
- || (this.element.classList.contains(HORIZSTEP) && this.element.classList.contains(LABELBEFORE) && !this.stepperItemContainer.classList.contains('e-step-label-only'))))
428
- || (this.element.classList.contains(VERTICALSTEP) && this.element.classList.contains(LABELBEFORE))) {
424
+ || (isHorizontal && this.element.classList.contains(LABELBEFORE) && !this.stepperItemContainer.classList.contains('e-step-label-only'))))
425
+ || (isVertical && this.element.classList.contains(LABELBEFORE))) {
429
426
  this.labelContainer.appendChild(optionalSpan);
430
427
  }
431
428
  else {
@@ -463,16 +460,16 @@ var Stepper = /** @class */ (function (_super) {
463
460
  this.trigger('beforeStepRender', eventArgs, function (args) {
464
461
  _this.stepperItemList.appendChild(args.element);
465
462
  });
466
- if (this.isAngular && this.template) {
467
- setTimeout(function () {
468
- _this.calculateProgressBarPosition();
469
- });
470
- }
471
- else {
472
- this.calculateProgressBarPosition();
463
+ if (isVertical) {
464
+ if (this.isAngular && this.template) {
465
+ setTimeout(function () { _this.calculateProgressBarPosition(); });
466
+ }
467
+ else {
468
+ this.calculateProgressBarPosition();
469
+ }
473
470
  }
474
471
  }
475
- if (this.element.classList.contains(VERTICALSTEP)) {
472
+ if (isVertical) {
476
473
  if (this.element.classList.contains(LABELBEFORE)) {
477
474
  var listItems = this.stepperItemList.querySelectorAll('.' + LABEL);
478
475
  for (var i = 0; i < listItems.length; i++) {
@@ -482,37 +479,48 @@ var Stepper = /** @class */ (function (_super) {
482
479
  }
483
480
  }
484
481
  };
482
+ Stepper.prototype.createTextLabelElement = function (content, isLabelEle) {
483
+ if (isLabelEle === void 0) { isLabelEle = false; }
484
+ var spanEle = this.createElement('span', { className: isLabelEle ? LABEL : TEXTCSS + " " + TEXT });
485
+ spanEle.innerText = content;
486
+ if (isLabelEle) {
487
+ this.labelContainer = this.createElement('span', { className: STEPLABEL });
488
+ this.labelContainer.appendChild(spanEle);
489
+ }
490
+ else {
491
+ this.stepperItemContainer.appendChild(spanEle);
492
+ }
493
+ this.stepperItemContainer.classList.add(isLabelEle ? STEPSLABEL : STEPTEXT);
494
+ };
485
495
  Stepper.prototype.calculateProgressBarPosition = function () {
486
496
  var isBeforeLabel = (this.element.classList.contains(LABELBEFORE)) ? true : false;
487
- var isStepVertical = (this.element.classList.contains(VERTICALSTEP)) ? true : false;
488
- if (isStepVertical) {
489
- var iconOnly = (this.stepperItemContainer.classList.contains(STEPICON) &&
490
- !this.stepperItemContainer.classList.contains(STEPTEXT) &&
491
- !this.stepperItemContainer.classList.contains(STEPSLABEL)) ? true : false;
492
- var textEle = (this.stepperItemContainer.querySelector('.' + TEXTCSS));
493
- if (textEle) {
494
- this.textEleWidth = this.textEleWidth < textEle.offsetWidth ? textEle.offsetWidth : this.textEleWidth;
495
- }
496
- if (isBeforeLabel) {
497
- var itemWidth = void 0;
498
- var labelWidth = this.stepperItemContainer.querySelector('.' + LABEL).offsetWidth + 15;
499
- if (this.beforeLabelWidth < labelWidth) {
500
- this.beforeLabelWidth = labelWidth;
501
- }
502
- if (this.element.querySelector('ol').lastChild.querySelector('.' + ICONCSS)) {
503
- itemWidth = (this.beforeLabelWidth + (this.stepperItemContainer.querySelector('.' + ICONCSS).offsetWidth / 2));
504
- }
505
- else if (this.stepperItemContainer.querySelector('.' + TEXTCSS)) {
506
- itemWidth = (this.beforeLabelWidth + (this.stepperItemContainer.querySelector('.' + TEXTCSS).offsetWidth / 2));
507
- }
508
- if (this.progressBarPosition < itemWidth) {
509
- this.progressBarPosition = itemWidth;
510
- }
497
+ var iconOnly = (this.stepperItemContainer.classList.contains(STEPICON) &&
498
+ !this.stepperItemContainer.classList.contains(STEPTEXT) &&
499
+ !this.stepperItemContainer.classList.contains(STEPSLABEL));
500
+ var textEle = (this.stepperItemContainer.querySelector('.' + TEXTCSS));
501
+ if (textEle) {
502
+ this.textEleWidth = this.textEleWidth < textEle.offsetWidth ? textEle.offsetWidth : this.textEleWidth;
503
+ }
504
+ if (isBeforeLabel) {
505
+ var labelWidth = this.stepperItemContainer.querySelector('.' + LABEL).offsetWidth + 15;
506
+ this.beforeLabelWidth = Math.max(this.beforeLabelWidth, labelWidth);
507
+ var iconEle = this.element.querySelector('ol').lastChild.querySelector('.' + ICONCSS);
508
+ var textEle_1 = this.stepperItemContainer.querySelector('.' + TEXTCSS);
509
+ if (iconEle || textEle_1) {
510
+ var itemWidth = this.beforeLabelWidth + ((this.stepperItemContainer.querySelector('.' + ICONCSS)
511
+ || textEle_1).offsetWidth / 2);
512
+ this.progressBarPosition = Math.max(this.progressBarPosition, itemWidth);
511
513
  }
512
- else if (this.progressBarPosition < (iconOnly ? this.stepperItemContainer.offsetWidth : this.element.querySelector('ol').lastChild.firstChild.offsetWidth)) {
513
- this.progressBarPosition = iconOnly ? this.stepperItemContainer.offsetWidth : this.element.querySelector('ol').lastChild.firstChild.offsetWidth;
514
+ else {
515
+ this.progressBarPosition = Math.max(this.progressBarPosition, (this.beforeLabelWidth / 2));
514
516
  }
515
517
  }
518
+ else {
519
+ var lastChild = this.element.querySelector('ol').lastChild;
520
+ var lastChildWidth = iconOnly ? this.stepperItemContainer.offsetWidth :
521
+ lastChild.firstChild.offsetWidth;
522
+ this.progressBarPosition = Math.max(this.progressBarPosition, lastChildWidth);
523
+ }
516
524
  };
517
525
  Stepper.prototype.checkValidState = function (item, stepSpan, isLabel) {
518
526
  if (item.isValid == null) {
@@ -532,13 +540,10 @@ var Stepper = /** @class */ (function (_super) {
532
540
  }
533
541
  };
534
542
  Stepper.prototype.updateCurrentLabel = function () {
535
- var currentLabelPos;
536
- if (this.element.classList.contains(HORIZSTEP)) {
537
- currentLabelPos = this.labelPosition.toLowerCase() === 'top' ? 'before' : this.labelPosition.toLowerCase() === 'bottom' ? 'after' : this.labelPosition.toLowerCase();
538
- }
539
- else {
540
- currentLabelPos = this.labelPosition.toLowerCase() === 'start' ? 'before' : this.labelPosition.toLowerCase() === 'end' ? 'after' : this.labelPosition.toLowerCase();
541
- }
543
+ var labelPos = this.labelPosition.toLowerCase();
544
+ var currentLabelPos = this.element.classList.contains(HORIZSTEP)
545
+ ? (labelPos === 'top' ? 'before' : labelPos === 'bottom' ? 'after' : labelPos)
546
+ : (labelPos === 'start' ? 'before' : labelPos === 'end' ? 'after' : labelPos);
542
547
  return currentLabelPos;
543
548
  };
544
549
  Stepper.prototype.updateLabelPosition = function () {
@@ -565,49 +570,49 @@ var Stepper = /** @class */ (function (_super) {
565
570
  }
566
571
  };
567
572
  Stepper.prototype.checkValidStep = function () {
568
- for (var index = 0; index < this.steps.length; index++) {
569
- var item = this.steps[parseInt(index.toString(), 10)];
570
- var itemElement = this.stepperItemElements[parseInt(index.toString(), 10)];
573
+ var isStepIndicator = this.element.classList.contains(STEPINDICATOR);
574
+ var _loop_1 = function (index) {
575
+ var item = this_1.steps[parseInt(index.toString(), 10)];
576
+ var itemElement = this_1.stepperItemElements[parseInt(index.toString(), 10)];
571
577
  if (item.isValid !== null) {
572
578
  var indicatorEle = void 0;
573
- var iconEle = void 0;
574
- if (this.element.classList.contains(STEPINDICATOR) && !item.iconCss) {
579
+ var iconEle_1;
580
+ if (isStepIndicator && !item.iconCss) {
575
581
  indicatorEle = itemElement.querySelector('.' + ICONCSS);
576
582
  }
577
583
  else {
578
- iconEle = itemElement.querySelector('.' + ICONCSS);
584
+ iconEle_1 = itemElement.querySelector('.' + ICONCSS);
579
585
  }
580
- if (!indicatorEle && this.element.classList.contains(STEPINDICATOR) && this.renderDefault(index)) {
586
+ if (!indicatorEle && isStepIndicator && this_1.renderDefault(index)) {
581
587
  indicatorEle = itemElement.querySelector('.' + INDICATORICON);
582
588
  }
583
589
  var textLabelIcon = itemElement.querySelector('.e-step-validation-icon');
584
590
  var itemIcon = item.iconCss.trim().split(' ');
585
591
  var validStep = itemElement.classList.contains('e-step-valid');
592
+ var validIconClass = validStep ? 'e-check' : 'e-circle-info';
586
593
  if (indicatorEle) {
587
594
  indicatorEle.classList.remove(INDICATORICON);
588
595
  if (indicatorEle.innerHTML !== '') {
589
596
  indicatorEle.innerHTML = '';
590
597
  }
591
- indicatorEle.classList.add('e-icons', validStep ? 'e-check' : 'e-circle-info', ICONCSS);
598
+ indicatorEle.classList.add('e-icons', validIconClass, ICONCSS);
592
599
  }
593
- if (this.renderDefault(index) && !this.element.classList.contains(STEPINDICATOR)) {
600
+ if (this_1.renderDefault(index) && !isStepIndicator) {
594
601
  var stepSpan = itemElement.querySelector('.e-step');
595
- stepSpan.classList.add('e-icons', validStep ? 'e-check' : 'e-circle-info', ICONCSS);
602
+ stepSpan.classList.add('e-icons', validIconClass, ICONCSS);
596
603
  }
597
- if (iconEle) {
598
- if (iconEle.innerHTML !== '') {
599
- iconEle.innerHTML = '';
604
+ if (iconEle_1) {
605
+ if (iconEle_1.innerHTML !== '') {
606
+ iconEle_1.innerHTML = '';
600
607
  }
601
608
  else if (itemIcon.length > 0) {
602
- for (var i = 0; i < itemIcon.length; i++) {
603
- iconEle.classList.remove(itemIcon[parseInt(i.toString(), 10)]);
604
- }
609
+ itemIcon.forEach(function (icon) { iconEle_1.classList.remove(icon); });
605
610
  }
606
- iconEle.classList.add('e-icons', validStep ? 'e-check' : 'e-circle-info');
611
+ iconEle_1.classList.add('e-icons', validIconClass);
607
612
  }
608
613
  if (textLabelIcon) {
609
614
  textLabelIcon.classList.add(validStep ? 'e-circle-check' : 'e-circle-info');
610
- if (this.element.classList.contains(VERTICALSTEP)) {
615
+ if (this_1.element.classList.contains(VERTICALSTEP)) {
611
616
  var labelEle = itemElement.querySelector('.' + LABEL);
612
617
  var textEle = itemElement.querySelector('.' + TEXT);
613
618
  var itemWidth = textEle ? textEle.offsetWidth + textEle.getBoundingClientRect().left :
@@ -617,6 +622,10 @@ var Stepper = /** @class */ (function (_super) {
617
622
  }
618
623
  }
619
624
  }
625
+ };
626
+ var this_1 = this;
627
+ for (var index = 0; index < this.steps.length; index++) {
628
+ _loop_1(index);
620
629
  }
621
630
  };
622
631
  Stepper.prototype.updateTooltip = function () {
@@ -636,20 +645,28 @@ var Stepper = /** @class */ (function (_super) {
636
645
  }
637
646
  };
638
647
  Stepper.prototype.wireItemsEvents = function (itemElement, index) {
639
- var _this = this;
640
- EventHandler.add(itemElement, 'click', function (e) {
641
- if (_this.linear) {
642
- var linearModeValue = index - _this.activeStep;
643
- if (Math.abs(linearModeValue) === 1) {
644
- _this.stepClickHandler(index, e, itemElement);
645
- }
646
- }
647
- else {
648
- _this.stepClickHandler(index, e, itemElement);
648
+ EventHandler.add(itemElement, 'click', this.linearModeHandler.bind(this, itemElement, index), this);
649
+ EventHandler.add(itemElement, 'mouseover', this.openStepperTooltip.bind(this, index), this);
650
+ EventHandler.add(itemElement, 'mouseleave', this.closeStepperTooltip, this);
651
+ };
652
+ Stepper.prototype.unWireItemsEvents = function () {
653
+ for (var index = 0; index < this.steps.length; index++) {
654
+ var itemElement = this.stepperItemElements[parseInt(index.toString(), 10)];
655
+ EventHandler.remove(itemElement, 'click', this.linearModeHandler.bind(this, itemElement, index));
656
+ EventHandler.remove(itemElement, 'mouseover', this.openStepperTooltip.bind(this, index));
657
+ EventHandler.remove(itemElement, 'mouseleave', this.closeStepperTooltip);
658
+ }
659
+ };
660
+ Stepper.prototype.linearModeHandler = function (itemElement, index, e) {
661
+ if (this.linear) {
662
+ var linearModeValue = index - this.activeStep;
663
+ if (Math.abs(linearModeValue) === 1) {
664
+ this.stepClickHandler(index, e, itemElement);
649
665
  }
650
- }, this);
651
- EventHandler.add(itemElement, 'mouseover', function () { return _this.openStepperTooltip(index); }, this);
652
- EventHandler.add(itemElement, 'mouseleave', function () { return _this.closeStepperTooltip(); }, this);
666
+ }
667
+ else {
668
+ this.stepClickHandler(index, e, itemElement);
669
+ }
653
670
  };
654
671
  Stepper.prototype.openStepperTooltip = function (index) {
655
672
  var currentStep = this.steps[parseInt(index.toString(), 10)];
@@ -791,7 +808,7 @@ var Stepper = /** @class */ (function (_super) {
791
808
  }
792
809
  };
793
810
  Stepper.prototype.navigationHandler = function (index, stepStatus, isUpdated) {
794
- index = (index >= this.steps.length - 1) ? this.steps.length - 1 : index;
811
+ index = Math.min(index, this.steps.length - 1);
795
812
  var Itemslength = this.stepperItemElements.length;
796
813
  if (index >= 0 && index < Itemslength - 1) {
797
814
  index = this.stepperItemElements[parseInt(index.toString(), 10)].classList.contains(DISABLED) ? this.activeStep : index;
@@ -809,45 +826,7 @@ var Stepper = /** @class */ (function (_super) {
809
826
  }
810
827
  if (this.activeStep >= 0 && this.progressbar) {
811
828
  if (this.element.classList.contains(HORIZSTEP)) {
812
- if ((this.element.classList.contains(LABELBEFORE) || this.element.classList.contains(LABELAFTER)) &&
813
- !this.element.classList.contains(STEPINDICATOR) &&
814
- this.stepperItemElements[parseInt(this.activeStep.toString(), 10)].classList.contains(STEPICON)) {
815
- var progressPos = this.element.querySelector('.e-stepper-progressbar');
816
- var selectedEle = this.stepperItemElements[parseInt(this.activeStep.toString(), 10)]
817
- .firstChild;
818
- var value = this.activeStep === 0 ? 0 : (selectedEle.offsetLeft - progressPos.offsetLeft +
819
- (selectedEle.offsetWidth / 2)) / progressPos.offsetWidth * 100;
820
- if (this.element.classList.contains(RTL)) {
821
- value = (progressPos.getBoundingClientRect().right - selectedEle.getBoundingClientRect().right +
822
- (selectedEle.offsetWidth / 2)) / progressPos.offsetWidth * 100;
823
- this.progressbar.style.setProperty(PROGRESSVALUE, (value) + '%');
824
- }
825
- else {
826
- this.progressbar.style.setProperty(PROGRESSVALUE, (value) + '%');
827
- }
828
- }
829
- else {
830
- var totalLiWidth = 0;
831
- var activeLiWidth = 0;
832
- for (var j = 0; j < this.stepperItemElements.length; j++) {
833
- totalLiWidth = totalLiWidth + this.stepperItemElements[parseInt(j.toString(), 10)].offsetWidth;
834
- if (j <= this.activeStep) {
835
- if (j < this.activeStep) {
836
- activeLiWidth = activeLiWidth +
837
- this.stepperItemElements[parseInt(j.toString(), 10)].offsetWidth;
838
- }
839
- else if (j === this.activeStep && j !== 0) {
840
- activeLiWidth = activeLiWidth +
841
- (this.stepperItemElements[parseInt(j.toString(), 10)].offsetWidth / 2);
842
- }
843
- }
844
- }
845
- var spaceWidth = (this.stepperItemList.offsetWidth - totalLiWidth) /
846
- (this.stepperItemElements.length - 1);
847
- var progressValue = ((activeLiWidth + (spaceWidth * this.activeStep)) /
848
- this.stepperItemList.offsetWidth) * 100;
849
- this.progressbar.style.setProperty(PROGRESSVALUE, (progressValue) + '%');
850
- }
829
+ this.calculateProgressbarPos();
851
830
  }
852
831
  else {
853
832
  this.progressbar.style.setProperty(PROGRESSVALUE, ((100 / (this.steps.length - 1)) * index) + '%');
@@ -896,27 +875,65 @@ var Stepper = /** @class */ (function (_super) {
896
875
  }
897
876
  }
898
877
  this.isProtectedOnChange = prevOnChange_1;
899
- if (this.renderDefault(i) && this.element.classList.contains(STEPINDICATOR) && !itemElement.classList.contains('e-step-valid') && !itemElement.classList.contains('e-step-error')) {
900
- if (itemElement.classList.contains(COMPLETED)) {
901
- itemElement.firstChild.classList.remove('e-icons', 'e-step-indicator');
902
- itemElement.firstChild.classList.add(ICONCSS, 'e-icons', 'e-check');
903
- }
904
- else if (itemElement.classList.contains(INPROGRESS) || itemElement.classList.contains(NOTSTARTED)) {
905
- itemElement.firstChild.classList.remove(ICONCSS, 'e-icons', 'e-check');
906
- itemElement.firstChild.classList.add('e-icons', 'e-step-indicator');
878
+ this.updateIndicatorStatus(i, itemElement);
879
+ }
880
+ this.updateStepInteractions();
881
+ };
882
+ Stepper.prototype.calculateProgressbarPos = function () {
883
+ var _this = this;
884
+ if ((this.element.classList.contains(LABELBEFORE) || this.element.classList.contains(LABELAFTER)) &&
885
+ !this.element.classList.contains(STEPINDICATOR) &&
886
+ this.stepperItemElements[parseInt(this.activeStep.toString(), 10)].classList.contains(STEPICON)) {
887
+ var progressPos = this.element.querySelector('.e-stepper-progressbar');
888
+ var selectedEle = this.stepperItemElements[parseInt(this.activeStep.toString(), 10)]
889
+ .firstChild;
890
+ var value = this.activeStep === 0 ? 0 : (selectedEle.offsetLeft - progressPos.offsetLeft +
891
+ (selectedEle.offsetWidth / 2)) / progressPos.offsetWidth * 100;
892
+ if (this.element.classList.contains(RTL)) {
893
+ value = (progressPos.getBoundingClientRect().right - selectedEle.getBoundingClientRect().right +
894
+ (selectedEle.offsetWidth / 2)) / progressPos.offsetWidth * 100;
895
+ this.progressbar.style.setProperty(PROGRESSVALUE, (value) + '%');
896
+ }
897
+ else {
898
+ this.progressbar.style.setProperty(PROGRESSVALUE, (value) + '%');
899
+ }
900
+ }
901
+ else {
902
+ var totalLiWidth_1 = 0;
903
+ var activeLiWidth_1 = 0;
904
+ this.stepperItemElements.forEach(function (element, index) {
905
+ var itemWidth = element.offsetWidth;
906
+ totalLiWidth_1 += itemWidth;
907
+ if (index <= _this.activeStep) {
908
+ activeLiWidth_1 += (index === _this.activeStep && index !== 0) ? (itemWidth / 2) : itemWidth;
907
909
  }
910
+ });
911
+ var spaceWidth = (this.stepperItemList.offsetWidth - totalLiWidth_1) /
912
+ (this.stepperItemElements.length - 1);
913
+ var progressValue = ((activeLiWidth_1 + (spaceWidth * this.activeStep)) /
914
+ this.stepperItemList.offsetWidth) * 100;
915
+ this.progressbar.style.setProperty(PROGRESSVALUE, (progressValue) + '%');
916
+ }
917
+ };
918
+ Stepper.prototype.updateIndicatorStatus = function (index, itemElement) {
919
+ if (this.renderDefault(index) && this.element.classList.contains(STEPINDICATOR) && !itemElement.classList.contains('e-step-valid')
920
+ && !itemElement.classList.contains('e-step-error')) {
921
+ if (itemElement.classList.contains(COMPLETED)) {
922
+ itemElement.firstChild.classList.remove('e-icons', 'e-step-indicator');
923
+ itemElement.firstChild.classList.add(ICONCSS, 'e-icons', 'e-check');
924
+ }
925
+ else if (itemElement.classList.contains(INPROGRESS) || itemElement.classList.contains(NOTSTARTED)) {
926
+ itemElement.firstChild.classList.remove(ICONCSS, 'e-icons', 'e-check');
927
+ itemElement.firstChild.classList.add('e-icons', 'e-step-indicator');
908
928
  }
909
929
  }
910
- this.updateStepInteractions();
911
930
  };
912
931
  Stepper.prototype.updateStepInteractions = function () {
913
932
  var _this = this;
914
933
  this.element.classList.toggle(LINEARSTEP, this.linear);
915
934
  this.stepperItemElements.forEach(function (step, index) {
916
- var isPreviousStep = (index === _this.activeStep - 1);
917
- var isNextStep = (index === _this.activeStep + 1);
918
- step.classList.toggle(PREVSTEP, isPreviousStep);
919
- step.classList.toggle(NEXTSTEP, isNextStep);
935
+ step.classList.toggle(PREVSTEP, (index === _this.activeStep - 1));
936
+ step.classList.toggle(NEXTSTEP, (index === _this.activeStep + 1));
920
937
  });
921
938
  };
922
939
  Stepper.prototype.removeItemElements = function () {
@@ -983,6 +1000,7 @@ var Stepper = /** @class */ (function (_super) {
983
1000
  Stepper.prototype.destroy = function () {
984
1001
  _super.prototype.destroy.call(this);
985
1002
  this.unWireEvents();
1003
+ this.unWireItemsEvents();
986
1004
  // unwires the events and detach the li elements
987
1005
  this.removeItemElements();
988
1006
  this.clearTemplate();
@@ -1129,6 +1147,66 @@ var Stepper = /** @class */ (function (_super) {
1129
1147
  this.updateAnimation();
1130
1148
  this.navigateToStep(this.activeStep, null, this.stepperItemElements[this.activeStep], true);
1131
1149
  };
1150
+ Stepper.prototype.updateDynamicSteps = function (steps, prevSteps) {
1151
+ if (!(steps instanceof Array && prevSteps instanceof Array)) {
1152
+ var stepCounts = Object.keys(steps);
1153
+ for (var i = 0; i < stepCounts.length; i++) {
1154
+ var index = parseInt(Object.keys(steps)[i], 10);
1155
+ var changedPropsCount = Object.keys(steps[index]).length;
1156
+ for (var j = 0; j < changedPropsCount; j++) {
1157
+ var property = Object.keys(steps[index])[j];
1158
+ if (property === 'status') {
1159
+ if (this.activeStep === index) {
1160
+ this.navigationHandler(index, steps[index].status);
1161
+ }
1162
+ else {
1163
+ this.steps[index].status = prevSteps[index].status;
1164
+ }
1165
+ }
1166
+ else {
1167
+ this.removeItemElements();
1168
+ this.renderItems();
1169
+ this.updateStepperStatus();
1170
+ }
1171
+ if (property === 'label' && (this.steps[index].iconCss || this.steps[index].text) &&
1172
+ this.stepType.toLowerCase() === 'default') {
1173
+ this.refreshProgressbar();
1174
+ }
1175
+ this.updateStepInteractions();
1176
+ this.checkValidStep();
1177
+ }
1178
+ }
1179
+ }
1180
+ else {
1181
+ this.renderStepperItems(true, true);
1182
+ }
1183
+ };
1184
+ Stepper.prototype.updateDynamicActiveStep = function (activeStep, preActiveStep) {
1185
+ this.activeStep = (activeStep > this.steps.length - 1 || activeStep < -1) ? preActiveStep : this.activeStep;
1186
+ if (this.activeStep >= 0 && this.stepperItemElements[parseInt(this.activeStep.toString(), 10)].classList.contains(DISABLED)) {
1187
+ this.activeStep = preActiveStep;
1188
+ }
1189
+ if (this.linear) {
1190
+ var linearModeValue = preActiveStep - this.activeStep;
1191
+ if (Math.abs(linearModeValue) === 1) {
1192
+ this.navigateToStep(this.activeStep, null, null, true);
1193
+ }
1194
+ }
1195
+ else {
1196
+ this.navigateToStep(this.activeStep, null, this.stepperItemElements[this.activeStep], true);
1197
+ }
1198
+ };
1199
+ Stepper.prototype.updateDynamicCssClass = function (cssClass, prevCssClass) {
1200
+ if (prevCssClass) {
1201
+ removeClass([this.element], prevCssClass.trim().split(' '));
1202
+ }
1203
+ if (cssClass) {
1204
+ addClass([this.element], cssClass.trim().split(' '));
1205
+ }
1206
+ if (this.tooltipObj) {
1207
+ this.tooltipObj.setProperties({ cssClass: this.cssClass ? (STEPPERTOOLTIP + ' ' + this.cssClass) : STEPPERTOOLTIP });
1208
+ }
1209
+ };
1132
1210
  /**
1133
1211
  * Called internally if any of the property value changed.
1134
1212
  *
@@ -1142,38 +1220,7 @@ var Stepper = /** @class */ (function (_super) {
1142
1220
  var prop = _a[_i];
1143
1221
  switch (prop) {
1144
1222
  case 'steps': {
1145
- if (!(newProp.steps instanceof Array && oldProp.steps instanceof Array)) {
1146
- var stepCounts = Object.keys(newProp.steps);
1147
- for (var i = 0; i < stepCounts.length; i++) {
1148
- var index = parseInt(Object.keys(newProp.steps)[i], 10);
1149
- var changedPropsCount = Object.keys(newProp.steps[index]).length;
1150
- for (var j = 0; j < changedPropsCount; j++) {
1151
- var property = Object.keys(newProp.steps[index])[j];
1152
- if (property === 'status') {
1153
- if (this.activeStep === index) {
1154
- this.navigationHandler(index, newProp.steps[index].status);
1155
- }
1156
- else {
1157
- this.steps[index].status = oldProp.steps[index].status;
1158
- }
1159
- }
1160
- else {
1161
- this.removeItemElements();
1162
- this.renderItems();
1163
- this.updateStepperStatus();
1164
- }
1165
- if (property === 'label' && (this.steps[index].iconCss || this.steps[index].text) &&
1166
- this.stepType.toLowerCase() === 'default') {
1167
- this.refreshProgressbar();
1168
- }
1169
- this.updateStepInteractions();
1170
- this.checkValidStep();
1171
- }
1172
- }
1173
- }
1174
- else {
1175
- this.renderStepperItems(true, true);
1176
- }
1223
+ this.updateDynamicSteps(newProp.steps, oldProp.steps);
1177
1224
  break;
1178
1225
  }
1179
1226
  case 'orientation':
@@ -1181,21 +1228,7 @@ var Stepper = /** @class */ (function (_super) {
1181
1228
  this.renderStepperItems(true);
1182
1229
  break;
1183
1230
  case 'activeStep':
1184
- this.activeStep = (newProp.activeStep > this.steps.length - 1 || newProp.activeStep < -1) ?
1185
- oldProp.activeStep : this.activeStep;
1186
- if (this.activeStep >= 0 && this.stepperItemElements[parseInt(this.activeStep.toString(), 10)]
1187
- .classList.contains(DISABLED)) {
1188
- this.activeStep = oldProp.activeStep;
1189
- }
1190
- if (this.linear) {
1191
- var linearModeValue = oldProp.activeStep - this.activeStep;
1192
- if (Math.abs(linearModeValue) === 1) {
1193
- this.navigateToStep(this.activeStep, null, null, true);
1194
- }
1195
- }
1196
- else {
1197
- this.navigateToStep(this.activeStep, null, this.stepperItemElements[this.activeStep], true);
1198
- }
1231
+ this.updateDynamicActiveStep(newProp.activeStep, oldProp.activeStep);
1199
1232
  break;
1200
1233
  case 'enableRtl':
1201
1234
  this.element.classList[this.enableRtl ? 'add' : 'remove'](RTL);
@@ -1204,15 +1237,7 @@ var Stepper = /** @class */ (function (_super) {
1204
1237
  this.element.classList[this.readOnly ? 'add' : 'remove'](READONLY);
1205
1238
  break;
1206
1239
  case 'cssClass':
1207
- if (oldProp.cssClass) {
1208
- removeClass([this.element], oldProp.cssClass.trim().split(' '));
1209
- }
1210
- if (newProp.cssClass) {
1211
- addClass([this.element], newProp.cssClass.trim().split(' '));
1212
- }
1213
- if (this.tooltipObj) {
1214
- this.tooltipObj.setProperties({ cssClass: this.cssClass ? (STEPPERTOOLTIP + ' ' + this.cssClass) : STEPPERTOOLTIP });
1215
- }
1240
+ this.updateDynamicCssClass(newProp.cssClass, oldProp.cssClass);
1216
1241
  break;
1217
1242
  case 'labelPosition':
1218
1243
  this.renderStepperItems(true);