@syncfusion/ej2-navigations 19.3.57 → 19.4.47

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 (259) hide show
  1. package/.github/PULL_REQUEST_TEMPLATE/Bug.md +63 -0
  2. package/.github/PULL_REQUEST_TEMPLATE/feature.md +39 -0
  3. package/CHANGELOG.md +57 -0
  4. package/dist/ej2-navigations.umd.min.js +2 -2
  5. package/dist/ej2-navigations.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-navigations.es2015.js +517 -142
  7. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  8. package/dist/es6/ej2-navigations.es5.js +524 -143
  9. package/dist/es6/ej2-navigations.es5.js.map +1 -1
  10. package/dist/global/ej2-navigations.min.js +2 -2
  11. package/dist/global/ej2-navigations.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/package.json +11 -11
  14. package/src/accordion/accordion-model.d.ts +5 -5
  15. package/src/accordion/accordion.d.ts +5 -5
  16. package/src/accordion/accordion.js +2 -19
  17. package/src/breadcrumb/breadcrumb-model.d.ts +23 -11
  18. package/src/breadcrumb/breadcrumb.d.ts +33 -10
  19. package/src/breadcrumb/breadcrumb.js +320 -78
  20. package/src/common/menu-base.js +8 -2
  21. package/src/common/v-scroll.js +1 -1
  22. package/src/tab/tab-model.d.ts +14 -6
  23. package/src/tab/tab.d.ts +33 -16
  24. package/src/tab/tab.js +66 -31
  25. package/src/toolbar/toolbar-model.d.ts +7 -7
  26. package/src/toolbar/toolbar.d.ts +6 -6
  27. package/src/toolbar/toolbar.js +81 -13
  28. package/src/treeview/treeview-model.d.ts +10 -0
  29. package/src/treeview/treeview.d.ts +13 -0
  30. package/src/treeview/treeview.js +48 -0
  31. package/styles/accordion/_bootstrap-dark-definition.scss +4 -0
  32. package/styles/accordion/_bootstrap-definition.scss +4 -0
  33. package/styles/accordion/_bootstrap4-definition.scss +4 -0
  34. package/styles/accordion/_bootstrap5-definition.scss +39 -35
  35. package/styles/accordion/_fabric-dark-definition.scss +4 -0
  36. package/styles/accordion/_fabric-definition.scss +4 -0
  37. package/styles/accordion/_fluent-definition.scss +85 -0
  38. package/styles/accordion/_highcontrast-definition.scss +5 -1
  39. package/styles/accordion/_highcontrast-light-definition.scss +4 -0
  40. package/styles/accordion/_layout.scss +6 -14
  41. package/styles/accordion/_material-dark-definition.scss +4 -0
  42. package/styles/accordion/_material-definition.scss +4 -0
  43. package/styles/accordion/_tailwind-definition.scss +83 -79
  44. package/styles/accordion/_theme.scss +12 -11
  45. package/styles/accordion/bootstrap4.css +1 -2
  46. package/styles/accordion/bootstrap5-dark.css +11 -2
  47. package/styles/accordion/bootstrap5.css +11 -2
  48. package/styles/accordion/highcontrast-light.css +0 -4
  49. package/styles/accordion/highcontrast.css +1 -5
  50. package/styles/accordion/icons/_fluent.scss +17 -0
  51. package/styles/accordion/icons/_tailwind.scss +17 -17
  52. package/styles/bootstrap-dark.css +319 -85
  53. package/styles/bootstrap.css +318 -84
  54. package/styles/bootstrap4.css +319 -77
  55. package/styles/bootstrap5-dark.css +341 -76
  56. package/styles/bootstrap5.css +343 -78
  57. package/styles/breadcrumb/_bootstrap-dark-definition.scss +14 -0
  58. package/styles/breadcrumb/_bootstrap-definition.scss +13 -0
  59. package/styles/breadcrumb/_bootstrap4-definition.scss +13 -0
  60. package/styles/breadcrumb/_bootstrap5-definition.scss +15 -2
  61. package/styles/breadcrumb/_fabric-dark-definition.scss +13 -0
  62. package/styles/breadcrumb/_fabric-definition.scss +13 -0
  63. package/styles/breadcrumb/_fluent-definition.scss +59 -0
  64. package/styles/breadcrumb/_highcontrast-definition.scss +13 -0
  65. package/styles/breadcrumb/_highcontrast-light-definition.scss +13 -0
  66. package/styles/breadcrumb/_layout.scss +171 -22
  67. package/styles/breadcrumb/_material-dark-definition.scss +13 -0
  68. package/styles/breadcrumb/_material-definition.scss +13 -0
  69. package/styles/breadcrumb/_tailwind-dark-definition.scss +13 -0
  70. package/styles/breadcrumb/_tailwind-definition.scss +13 -0
  71. package/styles/breadcrumb/_theme.scss +27 -8
  72. package/styles/breadcrumb/bootstrap-dark.css +194 -17
  73. package/styles/breadcrumb/bootstrap.css +194 -17
  74. package/styles/breadcrumb/bootstrap4.css +194 -17
  75. package/styles/breadcrumb/bootstrap5-dark.css +198 -24
  76. package/styles/breadcrumb/bootstrap5.css +198 -24
  77. package/styles/breadcrumb/fabric-dark.css +197 -20
  78. package/styles/breadcrumb/fabric.css +197 -20
  79. package/styles/breadcrumb/highcontrast-light.css +200 -22
  80. package/styles/breadcrumb/highcontrast.css +200 -22
  81. package/styles/breadcrumb/icons/_bootstrap-dark.scss +2 -1
  82. package/styles/breadcrumb/icons/_bootstrap.scss +2 -1
  83. package/styles/breadcrumb/icons/_bootstrap4.scss +2 -1
  84. package/styles/breadcrumb/icons/_bootstrap5.scss +2 -1
  85. package/styles/breadcrumb/icons/_fabric-dark.scss +2 -1
  86. package/styles/breadcrumb/icons/_fabric.scss +2 -1
  87. package/styles/breadcrumb/icons/_fluent.scss +25 -0
  88. package/styles/breadcrumb/icons/_highcontrast-light.scss +2 -1
  89. package/styles/breadcrumb/icons/_highcontrast.scss +2 -1
  90. package/styles/breadcrumb/icons/_material-dark.scss +2 -1
  91. package/styles/breadcrumb/icons/_material.scss +2 -1
  92. package/styles/breadcrumb/icons/_tailwind-dark.scss +2 -1
  93. package/styles/breadcrumb/icons/_tailwind.scss +2 -1
  94. package/styles/breadcrumb/material-dark.css +186 -13
  95. package/styles/breadcrumb/material.css +186 -13
  96. package/styles/breadcrumb/tailwind-dark.css +195 -22
  97. package/styles/breadcrumb/tailwind.css +195 -22
  98. package/styles/context-menu/_bootstrap-dark-definition.scss +1 -1
  99. package/styles/context-menu/_bootstrap-definition.scss +1 -1
  100. package/styles/context-menu/_bootstrap4-definition.scss +1 -1
  101. package/styles/context-menu/_bootstrap5-definition.scss +5 -5
  102. package/styles/context-menu/_fluent-definition.scss +52 -0
  103. package/styles/context-menu/_material-dark-definition.scss +1 -1
  104. package/styles/context-menu/_material-definition.scss +1 -1
  105. package/styles/context-menu/_tailwind-definition.scss +1 -1
  106. package/styles/context-menu/bootstrap-dark.css +1 -1
  107. package/styles/context-menu/bootstrap.css +1 -1
  108. package/styles/context-menu/bootstrap4.css +1 -1
  109. package/styles/context-menu/bootstrap5-dark.css +5 -5
  110. package/styles/context-menu/bootstrap5.css +6 -6
  111. package/styles/context-menu/icons/_fluent.scss +32 -0
  112. package/styles/context-menu/material-dark.css +1 -1
  113. package/styles/context-menu/material.css +1 -1
  114. package/styles/context-menu/tailwind-dark.css +1 -1
  115. package/styles/context-menu/tailwind.css +1 -1
  116. package/styles/fabric-dark.css +307 -42
  117. package/styles/fabric.css +310 -45
  118. package/styles/h-scroll/_fluent-definition.scss +78 -0
  119. package/styles/h-scroll/_tailwind-definition.scss +78 -78
  120. package/styles/h-scroll/_theme.scss +1 -1
  121. package/styles/h-scroll/bootstrap-dark.css +1 -1
  122. package/styles/h-scroll/bootstrap.css +1 -1
  123. package/styles/h-scroll/bootstrap4.css +1 -1
  124. package/styles/h-scroll/bootstrap5-dark.css +1 -1
  125. package/styles/h-scroll/bootstrap5.css +1 -1
  126. package/styles/h-scroll/fabric-dark.css +1 -1
  127. package/styles/h-scroll/fabric.css +1 -1
  128. package/styles/h-scroll/highcontrast-light.css +1 -1
  129. package/styles/h-scroll/highcontrast.css +1 -1
  130. package/styles/h-scroll/icons/_fluent.scss +49 -0
  131. package/styles/h-scroll/icons/_tailwind.scss +49 -49
  132. package/styles/h-scroll/material-dark.css +1 -1
  133. package/styles/h-scroll/material.css +1 -1
  134. package/styles/h-scroll/tailwind-dark.css +1 -1
  135. package/styles/h-scroll/tailwind.css +1 -1
  136. package/styles/highcontrast-light.css +319 -48
  137. package/styles/highcontrast.css +324 -53
  138. package/styles/material-dark.css +297 -33
  139. package/styles/material.css +298 -34
  140. package/styles/menu/_fluent-definition.scss +68 -0
  141. package/styles/menu/_layout.scss +3 -2
  142. package/styles/menu/_theme.scss +9 -0
  143. package/styles/menu/bootstrap-dark.css +3 -2
  144. package/styles/menu/bootstrap.css +3 -2
  145. package/styles/menu/bootstrap4.css +3 -2
  146. package/styles/menu/bootstrap5-dark.css +6 -5
  147. package/styles/menu/bootstrap5.css +7 -6
  148. package/styles/menu/fabric-dark.css +2 -1
  149. package/styles/menu/fabric.css +2 -1
  150. package/styles/menu/highcontrast-light.css +2 -1
  151. package/styles/menu/highcontrast.css +2 -1
  152. package/styles/menu/icons/_fluent.scss +133 -0
  153. package/styles/menu/material-dark.css +3 -2
  154. package/styles/menu/material.css +3 -2
  155. package/styles/menu/tailwind-dark.css +3 -2
  156. package/styles/menu/tailwind.css +3 -2
  157. package/styles/sidebar/_bootstrap5-definition.scss +5 -5
  158. package/styles/sidebar/_fluent-definition.scss +5 -0
  159. package/styles/sidebar/_theme.scss +4 -2
  160. package/styles/sidebar/bootstrap5-dark.css +0 -1
  161. package/styles/sidebar/bootstrap5.css +0 -1
  162. package/styles/sidebar/tailwind-dark.css +0 -1
  163. package/styles/sidebar/tailwind.css +0 -1
  164. package/styles/tab/_bootstrap-dark-definition.scss +10 -1
  165. package/styles/tab/_bootstrap-definition.scss +10 -1
  166. package/styles/tab/_bootstrap4-definition.scss +9 -1
  167. package/styles/tab/_bootstrap5-definition.scss +401 -401
  168. package/styles/tab/_fabric-dark-definition.scss +10 -0
  169. package/styles/tab/_fabric-definition.scss +10 -0
  170. package/styles/tab/_fluent-definition.scss +409 -0
  171. package/styles/tab/_highcontrast-definition.scss +10 -0
  172. package/styles/tab/_highcontrast-light-definition.scss +10 -0
  173. package/styles/tab/_layout.scss +145 -0
  174. package/styles/tab/_material-dark-definition.scss +10 -0
  175. package/styles/tab/_material-definition.scss +10 -0
  176. package/styles/tab/_tailwind-definition.scss +431 -420
  177. package/styles/tab/_theme.scss +188 -113
  178. package/styles/tab/bootstrap-dark.css +43 -18
  179. package/styles/tab/bootstrap.css +42 -17
  180. package/styles/tab/bootstrap4.css +47 -28
  181. package/styles/tab/bootstrap5-dark.css +53 -30
  182. package/styles/tab/bootstrap5.css +53 -30
  183. package/styles/tab/fabric-dark.css +43 -20
  184. package/styles/tab/fabric.css +46 -23
  185. package/styles/tab/highcontrast-light.css +52 -19
  186. package/styles/tab/highcontrast.css +56 -23
  187. package/styles/tab/icons/_bootstrap-dark.scss +2 -2
  188. package/styles/tab/icons/_fabric-dark.scss +2 -2
  189. package/styles/tab/icons/_fluent.scss +140 -0
  190. package/styles/tab/icons/_tailwind.scss +140 -140
  191. package/styles/tab/material-dark.css +42 -15
  192. package/styles/tab/material.css +42 -15
  193. package/styles/tab/tailwind-dark.css +42 -17
  194. package/styles/tab/tailwind.css +42 -17
  195. package/styles/tailwind-dark.css +315 -51
  196. package/styles/tailwind.css +315 -51
  197. package/styles/toolbar/_bootstrap-dark-definition.scss +7 -1
  198. package/styles/toolbar/_bootstrap-definition.scss +7 -1
  199. package/styles/toolbar/_bootstrap4-definition.scss +8 -2
  200. package/styles/toolbar/_bootstrap5-definition.scss +104 -86
  201. package/styles/toolbar/_fabric-dark-definition.scss +7 -0
  202. package/styles/toolbar/_fabric-definition.scss +7 -0
  203. package/styles/toolbar/_fluent-definition.scss +149 -0
  204. package/styles/toolbar/_highcontrast-definition.scss +7 -0
  205. package/styles/toolbar/_highcontrast-light-definition.scss +7 -0
  206. package/styles/toolbar/_layout.scss +27 -72
  207. package/styles/toolbar/_material-dark-definition.scss +7 -1
  208. package/styles/toolbar/_material-definition.scss +7 -1
  209. package/styles/toolbar/_tailwind-definition.scss +149 -143
  210. package/styles/toolbar/_theme.scss +12 -15
  211. package/styles/toolbar/bootstrap-dark.css +17 -46
  212. package/styles/toolbar/bootstrap.css +17 -46
  213. package/styles/toolbar/bootstrap4.css +12 -26
  214. package/styles/toolbar/bootstrap5-dark.css +6 -7
  215. package/styles/toolbar/bootstrap5.css +6 -7
  216. package/styles/toolbar/fabric-dark.css +4 -0
  217. package/styles/toolbar/fabric.css +4 -0
  218. package/styles/toolbar/highcontrast-light.css +4 -1
  219. package/styles/toolbar/highcontrast.css +4 -1
  220. package/styles/toolbar/icons/_fluent.scss +16 -0
  221. package/styles/toolbar/icons/_tailwind.scss +16 -16
  222. package/styles/toolbar/material-dark.css +4 -1
  223. package/styles/toolbar/material.css +5 -2
  224. package/styles/toolbar/tailwind-dark.css +8 -6
  225. package/styles/toolbar/tailwind.css +8 -6
  226. package/styles/treeview/_bootstrap-dark-definition.scss +11 -0
  227. package/styles/treeview/_bootstrap-definition.scss +11 -0
  228. package/styles/treeview/_bootstrap4-definition.scss +11 -0
  229. package/styles/treeview/_bootstrap5-definition.scss +120 -109
  230. package/styles/treeview/_fabric-dark-definition.scss +11 -0
  231. package/styles/treeview/_fabric-definition.scss +11 -0
  232. package/styles/treeview/_fluent-definition.scss +120 -0
  233. package/styles/treeview/_highcontrast-definition.scss +11 -0
  234. package/styles/treeview/_highcontrast-light-definition.scss +11 -0
  235. package/styles/treeview/_layout.scss +116 -20
  236. package/styles/treeview/_material-dark-definition.scss +13 -0
  237. package/styles/treeview/_material-definition.scss +11 -0
  238. package/styles/treeview/_tailwind-definition.scss +12 -0
  239. package/styles/treeview/_theme.scss +5 -5
  240. package/styles/treeview/bootstrap-dark.css +60 -0
  241. package/styles/treeview/bootstrap.css +60 -0
  242. package/styles/treeview/bootstrap4.css +60 -0
  243. package/styles/treeview/bootstrap5-dark.css +61 -1
  244. package/styles/treeview/bootstrap5.css +61 -1
  245. package/styles/treeview/fabric-dark.css +60 -0
  246. package/styles/treeview/fabric.css +60 -0
  247. package/styles/treeview/highcontrast-light.css +60 -0
  248. package/styles/treeview/highcontrast.css +60 -0
  249. package/styles/treeview/icons/_bootstrap5.scss +43 -43
  250. package/styles/treeview/icons/_fluent.scss +43 -0
  251. package/styles/treeview/icons/_tailwind-dark.scss +43 -43
  252. package/styles/treeview/material-dark.css +60 -0
  253. package/styles/treeview/material.css +60 -0
  254. package/styles/treeview/tailwind-dark.css +65 -1
  255. package/styles/treeview/tailwind.css +65 -1
  256. package/styles/v-scroll/_fluent-definition.scss +49 -0
  257. package/styles/v-scroll/_tailwind-definition.scss +49 -49
  258. package/styles/v-scroll/icons/_fluent.scss +26 -0
  259. package/styles/v-scroll/icons/_tailwind.scss +26 -26
@@ -616,7 +616,7 @@ var VScroll = /** @__PURE__ @class */ (function (_super) {
616
616
  }
617
617
  scrollBar.appendChild(scrollCnt);
618
618
  ele.appendChild(scrollBar);
619
- scrollBar.style.overflowY = 'hidden';
619
+ scrollBar.style.overflow = 'hidden';
620
620
  this.scrollEle = scrollBar;
621
621
  this.scrollItems = scrollCnt;
622
622
  };
@@ -2015,8 +2015,14 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2015
2015
  _this.setBlankIconStyle(_this.popupWrapper);
2016
2016
  _this.wireKeyboardEvent(_this.popupWrapper);
2017
2017
  rippleEffect(_this.popupWrapper, { selector: '.' + ITEM });
2018
- _this.popupWrapper.style.left = _this.left + 'px';
2019
- _this.popupWrapper.style.top = _this.top + 'px';
2018
+ if (_this.popupWrapper.style.position === 'fixed' && _this.top > 0) {
2019
+ _this.popupWrapper.style.left = _this.left + 'px';
2020
+ _this.popupWrapper.style.top = _this.top + scrollY + 'px';
2021
+ }
2022
+ else {
2023
+ _this.popupWrapper.style.left = _this.left + 'px';
2024
+ _this.popupWrapper.style.top = _this.top + 'px';
2025
+ }
2020
2026
  var animationOptions = _this.animationSettings.effect !== 'None' ? {
2021
2027
  name: _this.animationSettings.effect, duration: _this.animationSettings.duration,
2022
2028
  timingFunction: _this.animationSettings.easing
@@ -3284,6 +3290,7 @@ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators,
3284
3290
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3285
3291
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3286
3292
  };
3293
+ /* eslint-disable @typescript-eslint/no-explicit-any */
3287
3294
  var CLS_VERTICAL = 'e-vertical';
3288
3295
  var CLS_ITEMS = 'e-toolbar-items';
3289
3296
  var CLS_ITEM = 'e-toolbar-item';
@@ -4271,9 +4278,15 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
4271
4278
  };
4272
4279
  Toolbar.prototype.tbarPopupHandler = function (isOpen) {
4273
4280
  if (this.overflowMode === 'Extended') {
4274
- isOpen ? this.add(this.element, CLS_EXTENDEDPOPOPEN) : this.remove(this.element, CLS_EXTENDEDPOPOPEN);
4281
+ if (isOpen) {
4282
+ this.add(this.element, CLS_EXTENDEDPOPOPEN);
4283
+ }
4284
+ else {
4285
+ this.remove(this.element, CLS_EXTENDEDPOPOPEN);
4286
+ }
4275
4287
  }
4276
4288
  };
4289
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4277
4290
  Toolbar.prototype.popupOpen = function (e) {
4278
4291
  var popObj = this.popObj;
4279
4292
  if (!this.isVertical) {
@@ -4319,6 +4332,7 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
4319
4332
  popObj.refreshPosition();
4320
4333
  }
4321
4334
  };
4335
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4322
4336
  Toolbar.prototype.popupClose = function (e) {
4323
4337
  var element = this.element;
4324
4338
  var popupNav = element.querySelector('.' + CLS_TBARNAV);
@@ -4683,10 +4697,20 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
4683
4697
  var popWid = (this.isVertical ? popupNav.offsetHeight : popupNav.offsetWidth) + 'px';
4684
4698
  innerItem[2].removeAttribute('style');
4685
4699
  if (this.isVertical) {
4686
- this.enableRtl ? innerItem[2].style.top = popWid : innerItem[2].style.bottom = popWid;
4700
+ if (this.enableRtl) {
4701
+ innerItem[2].style.top = popWid;
4702
+ }
4703
+ else {
4704
+ innerItem[2].style.bottom = popWid;
4705
+ }
4687
4706
  }
4688
4707
  else {
4689
- this.enableRtl ? innerItem[2].style.left = popWid : innerItem[2].style.right = popWid;
4708
+ if (this.enableRtl) {
4709
+ innerItem[2].style.left = popWid;
4710
+ }
4711
+ else {
4712
+ innerItem[2].style.right = popWid;
4713
+ }
4690
4714
  }
4691
4715
  }
4692
4716
  if (tbarWid <= margin) {
@@ -4696,10 +4720,20 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
4696
4720
  innerItem[1].removeAttribute('style');
4697
4721
  var mrgn = ((!this.isVertical ? innerItem[0].offsetWidth : innerItem[0].offsetHeight) + value) + 'px';
4698
4722
  if (this.isVertical) {
4699
- this.enableRtl ? innerItem[1].style.marginBottom = mrgn : innerItem[1].style.marginTop = mrgn;
4723
+ if (this.enableRtl) {
4724
+ innerItem[1].style.marginBottom = mrgn;
4725
+ }
4726
+ else {
4727
+ innerItem[1].style.marginTop = mrgn;
4728
+ }
4700
4729
  }
4701
4730
  else {
4702
- this.enableRtl ? innerItem[1].style.marginRight = mrgn : innerItem[1].style.marginLeft = mrgn;
4731
+ if (this.enableRtl) {
4732
+ innerItem[1].style.marginRight = mrgn;
4733
+ }
4734
+ else {
4735
+ innerItem[1].style.marginLeft = mrgn;
4736
+ }
4703
4737
  }
4704
4738
  };
4705
4739
  Toolbar.prototype.tbarItemAlign = function (item, itemEle, pos) {
@@ -4769,7 +4803,12 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
4769
4803
  var keyVal;
4770
4804
  for (var i = 0; i < key.length; i++) {
4771
4805
  keyVal = key[i];
4772
- keyVal === 'class' ? this.add(element, attr[keyVal]) : element.setAttribute(keyVal, attr[keyVal]);
4806
+ if (keyVal === 'class') {
4807
+ this.add(element, attr[keyVal]);
4808
+ }
4809
+ else {
4810
+ element.setAttribute(keyVal, attr[keyVal]);
4811
+ }
4773
4812
  }
4774
4813
  };
4775
4814
  /**
@@ -4814,7 +4853,12 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
4814
4853
  }
4815
4854
  enable(isEnable, ele);
4816
4855
  }
4817
- isEnable ? removeClass(elements, CLS_DISABLE$2) : addClass(elements, CLS_DISABLE$2);
4856
+ if (isEnable) {
4857
+ removeClass(elements, CLS_DISABLE$2);
4858
+ }
4859
+ else {
4860
+ addClass(elements, CLS_DISABLE$2);
4861
+ }
4818
4862
  }
4819
4863
  else {
4820
4864
  if (typeof (elements) === 'number') {
@@ -5002,7 +5046,12 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
5002
5046
  }
5003
5047
  else if (itemType === 'Input') {
5004
5048
  var ele = this.createElement('input');
5005
- item.id ? (ele.id = item.id) : (ele.id = getUniqueID('tbr-ipt'));
5049
+ if (item.id) {
5050
+ ele.id = item.id;
5051
+ }
5052
+ else {
5053
+ ele.id = getUniqueID('tbr-ipt');
5054
+ }
5006
5055
  innerEle.appendChild(ele);
5007
5056
  eleObj.appendTo(ele);
5008
5057
  }
@@ -5015,7 +5064,12 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
5015
5064
  var textStr = item.text;
5016
5065
  var iconCss;
5017
5066
  var iconPos;
5018
- item.id ? (dom.id = item.id) : dom.id = getUniqueID('e-tbr-btn');
5067
+ if (item.id) {
5068
+ dom.id = item.id;
5069
+ }
5070
+ else {
5071
+ dom.id = getUniqueID('e-tbr-btn');
5072
+ }
5019
5073
  var btnTxt = this.createElement('span', { className: 'e-tbar-btn-text' });
5020
5074
  if (textStr) {
5021
5075
  btnTxt.innerHTML = this.enableHtmlSanitizer ? SanitizeHtmlHelper.sanitize(textStr) : textStr;
@@ -5283,12 +5337,27 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
5283
5337
  this.refreshOverflow();
5284
5338
  break;
5285
5339
  case 'enableRtl':
5286
- newProp.enableRtl ? this.add(tEle, CLS_RTL$2) : this.remove(tEle, CLS_RTL$2);
5340
+ if (newProp.enableRtl) {
5341
+ this.add(tEle, CLS_RTL$2);
5342
+ }
5343
+ else {
5344
+ this.remove(tEle, CLS_RTL$2);
5345
+ }
5287
5346
  if (!isNullOrUndefined(this.scrollModule)) {
5288
- newProp.enableRtl ? this.add(this.scrollModule.element, CLS_RTL$2) : this.remove(this.scrollModule.element, CLS_RTL$2);
5347
+ if (newProp.enableRtl) {
5348
+ this.add(this.scrollModule.element, CLS_RTL$2);
5349
+ }
5350
+ else {
5351
+ this.remove(this.scrollModule.element, CLS_RTL$2);
5352
+ }
5289
5353
  }
5290
5354
  if (!isNullOrUndefined(this.popObj)) {
5291
- newProp.enableRtl ? this.add(this.popObj.element, CLS_RTL$2) : this.remove(this.popObj.element, CLS_RTL$2);
5355
+ if (newProp.enableRtl) {
5356
+ this.add(this.popObj.element, CLS_RTL$2);
5357
+ }
5358
+ else {
5359
+ this.remove(this.popObj.element, CLS_RTL$2);
5360
+ }
5292
5361
  }
5293
5362
  if (this.tbarAlign) {
5294
5363
  this.itemPositioning();
@@ -5342,7 +5411,12 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
5342
5411
  ele = innerItems_1[eleIndex];
5343
5412
  }
5344
5413
  if (ele) {
5345
- value ? ele.classList.add(CLS_HIDDEN) : ele.classList.remove(CLS_HIDDEN);
5414
+ if (value) {
5415
+ ele.classList.add(CLS_HIDDEN);
5416
+ }
5417
+ else {
5418
+ ele.classList.remove(CLS_HIDDEN);
5419
+ }
5346
5420
  if (value && isNullOrUndefined(this.element.getAttribute('tabindex')) && !ele.classList.contains(CLS_SEPARATOR)) {
5347
5421
  if (isNullOrUndefined(ele.firstElementChild.getAttribute('tabindex'))) {
5348
5422
  ele.firstElementChild.setAttribute('tabindex', '-1');
@@ -5460,6 +5534,7 @@ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators,
5460
5534
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5461
5535
  return c > 3 && r && Object.defineProperty(target, key, r), r;
5462
5536
  };
5537
+ /* eslint-disable @typescript-eslint/no-explicit-any */
5463
5538
  var CLS_ACRDN_ROOT = 'e-acrdn-root';
5464
5539
  var CLS_ROOT$2 = 'e-accordion';
5465
5540
  var CLS_ITEM$1 = 'e-acrdn-item';
@@ -5733,11 +5808,9 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
5733
5808
  this.itemTemplateFn = this.templateParser(this.itemTemplate);
5734
5809
  }
5735
5810
  };
5736
- /* eslint-disable */
5737
5811
  Accordion.prototype.getHeaderTemplate = function () {
5738
5812
  return this.headerTemplateFn;
5739
5813
  };
5740
- /* eslint-disable */
5741
5814
  Accordion.prototype.getItemTemplate = function () {
5742
5815
  return this.itemTemplateFn;
5743
5816
  };
@@ -5758,7 +5831,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
5758
5831
  innerEles = this.element.children;
5759
5832
  }
5760
5833
  var items = [];
5761
- /* eslint-disable */
5762
5834
  [].slice.call(innerEles).forEach(function (el) {
5763
5835
  items.push({
5764
5836
  header: (el.childElementCount > 0 && el.children[0]) ? (el.children[0]) : '',
@@ -5766,7 +5838,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
5766
5838
  });
5767
5839
  el.parentNode.removeChild(el);
5768
5840
  });
5769
- /* eslint-enable */
5770
5841
  if (rootEle) {
5771
5842
  this.element.removeChild(rootEle);
5772
5843
  }
@@ -5791,7 +5862,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
5791
5862
  this.expandItem(true, this.initExpand[i]);
5792
5863
  }
5793
5864
  }
5794
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5795
5865
  if (this.isReact) {
5796
5866
  this.renderReactTemplates();
5797
5867
  }
@@ -5827,7 +5897,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
5827
5897
  });
5828
5898
  }
5829
5899
  }
5830
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5831
5900
  if (this.isReact) {
5832
5901
  this.renderReactTemplates();
5833
5902
  }
@@ -5873,7 +5942,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
5873
5942
  else {
5874
5943
  this.afterContentRender(trgt, eventArgs, acrdnItem, acrdnHdr, acrdnCtn, acrdnCtnItem);
5875
5944
  }
5876
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5877
5945
  if (this.isReact) {
5878
5946
  this.renderReactTemplates();
5879
5947
  }
@@ -6081,7 +6149,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6081
6149
  };
6082
6150
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
6083
6151
  Accordion.prototype.fetchElement = function (ele, value, index, isHeader) {
6084
- /* eslint-disable */
6085
6152
  var templateFn;
6086
6153
  var temString;
6087
6154
  try {
@@ -6095,12 +6162,10 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6095
6162
  catch (e) {
6096
6163
  if (typeof (value) === 'string') {
6097
6164
  ele.innerHTML = SanitizeHtmlHelper.sanitize(value);
6098
- /* eslint-disable */
6099
6165
  }
6100
6166
  else if (!isNullOrUndefined(this.trgtEle) && (value instanceof (HTMLElement))) {
6101
6167
  ele.appendChild(value);
6102
6168
  ele.firstElementChild.style.display = '';
6103
- /* eslint-enable */
6104
6169
  }
6105
6170
  else {
6106
6171
  templateFn = compile(value);
@@ -6108,7 +6173,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6108
6173
  }
6109
6174
  var tempArray;
6110
6175
  if (!isNullOrUndefined(templateFn)) {
6111
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6112
6176
  if (this.isReact) {
6113
6177
  this.renderReactTemplates();
6114
6178
  }
@@ -6154,7 +6218,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6154
6218
  attributes(itemcnt, { 'aria-hidden': 'true' });
6155
6219
  var ctn = this.createElement('div', { className: CLS_CTENT });
6156
6220
  if (this.dataSource.length > 0) {
6157
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6158
6221
  if (this.isReact) {
6159
6222
  this.renderReactTemplates();
6160
6223
  }
@@ -6304,7 +6367,7 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6304
6367
  this.trigger('expanding', eventArgs, function (expandArgs) {
6305
6368
  if (!expandArgs.cancel) {
6306
6369
  _this.expandedItemsPop(trgtItemEle);
6307
- trgtItemEle.classList.add(CLS_EXPANDSTATE);
6370
+ trgtItemEle.classList.remove(CLS_EXPANDSTATE);
6308
6371
  icon.classList.add(CLS_TOGANIMATE);
6309
6372
  if ((animation.name === 'None')) {
6310
6373
  _this.collapseProgress('begin', icon, trgt, trgtItemEle, expandArgs);
@@ -6434,7 +6497,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6434
6497
  }
6435
6498
  });
6436
6499
  }
6437
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6438
6500
  if (this.isReact) {
6439
6501
  this.renderReactTemplates();
6440
6502
  }
@@ -6456,7 +6518,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6456
6518
  * @returns {void}.
6457
6519
  */
6458
6520
  Accordion.prototype.removeItem = function (index) {
6459
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6460
6521
  if (this.isReact) {
6461
6522
  this.clearTemplate(['headerTemplate', 'itemTemplate'], index);
6462
6523
  }
@@ -6604,14 +6665,12 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6604
6665
  this.collapse(ctn);
6605
6666
  }
6606
6667
  }
6607
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6608
6668
  if (this.isReact) {
6609
6669
  this.renderReactTemplates();
6610
6670
  }
6611
6671
  };
6612
6672
  Accordion.prototype.destroyItems = function () {
6613
6673
  this.restoreContent(null);
6614
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6615
6674
  if (this.isReact) {
6616
6675
  this.clearTemplate();
6617
6676
  }
@@ -6646,12 +6705,10 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6646
6705
  Accordion.prototype.setTemplate = function (template, toElement, index) {
6647
6706
  toElement.innerHTML = '';
6648
6707
  this.templateCompile(toElement, template, index);
6649
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6650
6708
  if (this.isReact) {
6651
6709
  this.renderReactTemplates();
6652
6710
  }
6653
6711
  };
6654
- // eslint-disable-next-line
6655
6712
  Accordion.prototype.templateCompile = function (ele, cnt, index) {
6656
6713
  var tempEle = this.createElement('div');
6657
6714
  this.fetchElement(tempEle, cnt, index, false);
@@ -7312,6 +7369,7 @@ var CLS_VRIGHT = 'e-vertical-right';
7312
7369
  var CLS_HBOTTOM = 'e-horizontal-bottom';
7313
7370
  var CLS_FILL = 'e-fill-mode';
7314
7371
  var TABITEMPREFIX = 'tabitem_';
7372
+ var CLS_REORDER_ACTIVE_ITEM = 'e-reorder-active-item';
7315
7373
  /**
7316
7374
  * Objects used for configuring the Tab selecting item action properties.
7317
7375
  */
@@ -7422,11 +7480,12 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
7422
7480
  _this.hide = {};
7423
7481
  _this.maxHeight = 0;
7424
7482
  _this.title = 'Close';
7483
+ _this.isInteracted = false;
7425
7484
  _this.lastIndex = 0;
7426
7485
  _this.isAdd = false;
7427
7486
  _this.isIconAlone = false;
7428
7487
  _this.draggableItems = [];
7429
- _this.resizeContext = _this.refreshActElePosition.bind(_this);
7488
+ _this.resizeContext = _this.refreshActiveTabBorder.bind(_this);
7430
7489
  /**
7431
7490
  * Contains the keyboard configuration of the Tab.
7432
7491
  */
@@ -7879,7 +7938,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
7879
7938
  trg.classList.remove(CLS_CLOSE_SHOW);
7880
7939
  }
7881
7940
  this.tbObj.refreshOverflow();
7882
- this.refreshActElePosition();
7941
+ this.refreshActiveTabBorder();
7883
7942
  };
7884
7943
  Tab.prototype.prevCtnAnimation = function (prev, current) {
7885
7944
  var animation;
@@ -8006,7 +8065,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8006
8065
  }
8007
8066
  else {
8008
8067
  if (!isNullOrUndefined(trgParent) && trgParent.classList.contains(CLS_ACTIVE$1) === false) {
8009
- this.select(trgIndex);
8068
+ this.selectTab(trgIndex, null, true);
8010
8069
  if (!isNullOrUndefined(this.popEle)) {
8011
8070
  this.popObj.hide(this.hide);
8012
8071
  }
@@ -8279,9 +8338,20 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8279
8338
  Tab.prototype.setActiveBorder = function () {
8280
8339
  var trgHdrEle = this.getTabHeader();
8281
8340
  var trg = select('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE$1, trgHdrEle);
8282
- if (trg === null) {
8341
+ if (isNullOrUndefined(trg)) {
8283
8342
  return;
8284
8343
  }
8344
+ if (!this.reorderActiveTab) {
8345
+ if (trg.classList.contains(CLS_TB_POPUP) && !this.bdrLine.classList.contains(CLS_HIDDEN$1)) {
8346
+ this.bdrLine.classList.add(CLS_HIDDEN$1);
8347
+ }
8348
+ if (trgHdrEle && !trgHdrEle.classList.contains(CLS_REORDER_ACTIVE_ITEM)) {
8349
+ trgHdrEle.classList.add(CLS_REORDER_ACTIVE_ITEM);
8350
+ }
8351
+ }
8352
+ else if (trgHdrEle) {
8353
+ trgHdrEle.classList.remove(CLS_REORDER_ACTIVE_ITEM);
8354
+ }
8285
8355
  var root = closest(trg, '.' + CLS_TAB);
8286
8356
  if (this.element !== root) {
8287
8357
  return;
@@ -8315,12 +8385,13 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8315
8385
  setStyleAttribute(bar, { 'left': 'auto', 'right': 'auto' });
8316
8386
  }
8317
8387
  }
8318
- if (!isNullOrUndefined(this.bdrLine)) {
8388
+ if (!isNullOrUndefined(this.bdrLine) && !trg.classList.contains(CLS_TB_POPUP)) {
8319
8389
  this.bdrLine.classList.remove(CLS_HIDDEN$1);
8320
8390
  }
8321
8391
  };
8322
- Tab.prototype.setActive = function (value, skipDataBind) {
8392
+ Tab.prototype.setActive = function (value, skipDataBind, isInteracted) {
8323
8393
  if (skipDataBind === void 0) { skipDataBind = false; }
8394
+ if (isInteracted === void 0) { isInteracted = false; }
8324
8395
  this.tbItem = selectAll('.' + CLS_TB_ITEM, this.getTabHeader());
8325
8396
  var trg = this.tbItem[value];
8326
8397
  if (value < 0 || isNaN(value) || this.tbItem.length === 0) {
@@ -8391,7 +8462,8 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8391
8462
  selectedItem: trg,
8392
8463
  selectedIndex: value,
8393
8464
  selectedContent: select('#' + CLS_CONTENT$1 + this.tabId + '_' + this.selectingID, this.content),
8394
- isSwiped: this.isSwipeed
8465
+ isSwiped: this.isSwipeed,
8466
+ isInteracted: isInteracted
8395
8467
  };
8396
8468
  this.trigger('selected', eventArg);
8397
8469
  }
@@ -8483,7 +8555,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8483
8555
  else {
8484
8556
  this.isPopup = false;
8485
8557
  if (!isNullOrUndefined(trgParent) && (trgIndex !== this.selectedItem || trgIndex !== this.prevIndex)) {
8486
- this.select(trgIndex, args.originalEvent);
8558
+ this.selectTab(trgIndex, args.originalEvent, true);
8487
8559
  }
8488
8560
  }
8489
8561
  };
@@ -8498,7 +8570,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8498
8570
  if (e.swipeDirection === 'Right' && this.selectedItem !== 0) {
8499
8571
  for (var k = this.selectedItem - 1; k >= 0; k--) {
8500
8572
  if (!this.tbItem[k].classList.contains(CLS_HIDDEN$1)) {
8501
- this.select(k);
8573
+ this.selectTab(k, null, true);
8502
8574
  break;
8503
8575
  }
8504
8576
  }
@@ -8506,7 +8578,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8506
8578
  else if (e.swipeDirection === 'Left' && (this.selectedItem !== selectAll('.' + CLS_TB_ITEM, this.element).length - 1)) {
8507
8579
  for (var i = this.selectedItem + 1; i < this.tbItem.length; i++) {
8508
8580
  if (!this.tbItem[i].classList.contains(CLS_HIDDEN$1)) {
8509
- this.select(i);
8581
+ this.selectTab(i, null, true);
8510
8582
  break;
8511
8583
  }
8512
8584
  }
@@ -8582,9 +8654,15 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8582
8654
  break;
8583
8655
  }
8584
8656
  };
8585
- Tab.prototype.refreshActElePosition = function () {
8657
+ /**
8658
+ * Refresh the active tab border
8659
+ *
8660
+ * @returns {void}
8661
+ * @private
8662
+ */
8663
+ Tab.prototype.refreshActiveTabBorder = function () {
8586
8664
  var activeEle = select('.' + CLS_TB_ITEM + '.' + CLS_TB_POPUP + '.' + CLS_ACTIVE$1, this.element);
8587
- if (!isNullOrUndefined(activeEle)) {
8665
+ if (!isNullOrUndefined(activeEle) && this.reorderActiveTab) {
8588
8666
  this.select(this.getEleIndex(activeEle));
8589
8667
  }
8590
8668
  this.refreshActiveBorder();
@@ -8927,7 +9005,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8927
9005
  else {
8928
9006
  _this.dragItem.querySelector('.' + CLS_WRAP).style.visibility = '';
8929
9007
  removeClass([_this.tbItems.querySelector('.' + CLS_INDICATOR)], CLS_HIDDEN$1);
8930
- _this.select(_this.droppedIndex);
9008
+ _this.selectTab(_this.droppedIndex, null, true);
8931
9009
  }
8932
9010
  }
8933
9011
  });
@@ -8935,8 +9013,8 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8935
9013
  /**
8936
9014
  * Enables or disables the specified Tab item. On passing value as `false`, the item will be disabled.
8937
9015
  *
8938
- * @param {number} index - Index value of target Tab item.
8939
- * @param {boolean} value - Boolean value that determines whether the command should be enabled or disabled.
9016
+ * @param {number} index - Index value of target Tab item.
9017
+ * @param {boolean} value - Boolean value that determines whether the command should be enabled or disabled.
8940
9018
  * By default, isEnable is true.
8941
9019
  * @returns {void}.
8942
9020
  */
@@ -8965,8 +9043,8 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8965
9043
  /**
8966
9044
  * Adds new items to the Tab that accepts an array as Tab items.
8967
9045
  *
8968
- * @param {TabItemModel[]} items - An array of item that is added to the Tab.
8969
- * @param {number} index - Number value that determines where the items to be added. By default, index is 0.
9046
+ * @param {TabItemModel[]} items - An array of item that is added to the Tab.
9047
+ * @param {number} index - Number value that determines where the items to be added. By default, index is 0.
8970
9048
  * @returns {void}.
8971
9049
  */
8972
9050
  Tab.prototype.addTab = function (items, index) {
@@ -9051,7 +9129,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9051
9129
  /**
9052
9130
  * Removes the items in the Tab from the specified index.
9053
9131
  *
9054
- * @param {number} index - Index of target item that is going to be removed.
9132
+ * @param {number} index - Index of target item that is going to be removed.
9055
9133
  * @returns {void}.
9056
9134
  */
9057
9135
  Tab.prototype.removeTab = function (index) {
@@ -9091,8 +9169,8 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9091
9169
  /**
9092
9170
  * Shows or hides the Tab that is in the specified index.
9093
9171
  *
9094
- * @param {number} index - Index value of target item.
9095
- * @param {boolean} value - Based on this Boolean value, item will be hide (false) or show (true). By default, value is true.
9172
+ * @param {number} index - Index value of target item.
9173
+ * @param {boolean} value - Based on this Boolean value, item will be hide (false) or show (true). By default, value is true.
9096
9174
  * @returns {void}.
9097
9175
  */
9098
9176
  Tab.prototype.hideTab = function (index, value) {
@@ -9152,12 +9230,18 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9152
9230
  this.tbObj.refreshOverflow();
9153
9231
  }
9154
9232
  };
9233
+ Tab.prototype.selectTab = function (args, event, isInteracted) {
9234
+ if (event === void 0) { event = null; }
9235
+ if (isInteracted === void 0) { isInteracted = false; }
9236
+ this.isInteracted = isInteracted;
9237
+ this.select(args, event);
9238
+ };
9155
9239
  /**
9156
9240
  * Specifies the index or HTMLElement to select an item from the Tab.
9157
9241
  *
9158
- * @param {number | HTMLElement} args - Index or DOM element is used for selecting an item from the Tab.
9242
+ * @param {number | HTMLElement} args - Index or DOM element is used for selecting an item from the Tab.
9159
9243
  * @param {Event} event - An event which takes place in DOM.
9160
- * @returns {void}.
9244
+ * @returns {void}
9161
9245
  */
9162
9246
  Tab.prototype.select = function (args, event) {
9163
9247
  var _this = this;
@@ -9195,20 +9279,22 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9195
9279
  selectingContent: !isNullOrUndefined(this.content) ?
9196
9280
  select('#' + CLS_CONTENT$1 + this.tabId + '_' + this.selectingID, this.content) : null,
9197
9281
  isSwiped: this.isSwipeed,
9282
+ isInteracted: this.isInteracted,
9198
9283
  cancel: false
9199
9284
  };
9200
9285
  if (!this.initRender) {
9201
9286
  this.trigger('selecting', eventArg, function (selectArgs) {
9202
9287
  if (!selectArgs.cancel) {
9203
- _this.selectingContent(args);
9288
+ _this.selectingContent(args, _this.isInteracted);
9204
9289
  }
9205
9290
  });
9206
9291
  }
9207
9292
  else {
9208
- this.selectingContent(args);
9293
+ this.selectingContent(args, this.isInteracted);
9209
9294
  }
9295
+ this.isInteracted = false;
9210
9296
  };
9211
- Tab.prototype.selectingContent = function (args) {
9297
+ Tab.prototype.selectingContent = function (args, isInteracted) {
9212
9298
  if (typeof args === 'number') {
9213
9299
  if (!isNullOrUndefined(this.tbItem[args]) && (this.tbItem[args].classList.contains(CLS_DISABLE$4) ||
9214
9300
  this.tbItem[args].classList.contains(CLS_HIDDEN$1))) {
@@ -9224,8 +9310,8 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9224
9310
  }
9225
9311
  if (this.tbItem.length > args && args >= 0 && !isNaN(args)) {
9226
9312
  this.prevIndex = this.selectedItem;
9227
- if (this.tbItem[args].classList.contains(CLS_TB_POPUP)) {
9228
- this.setActive(this.popupHandler(this.tbItem[args]));
9313
+ if (this.tbItem[args].classList.contains(CLS_TB_POPUP) && this.reorderActiveTab) {
9314
+ this.setActive(this.popupHandler(this.tbItem[args]), null, isInteracted);
9229
9315
  if ((!isNullOrUndefined(this.items) && this.items.length > 0) && this.allowDragAndDrop) {
9230
9316
  this.tbItem = selectAll('.' + CLS_TB_ITEMS + ' .' + CLS_TB_ITEM, this.hdrEle);
9231
9317
  var item = this.items[args];
@@ -9234,15 +9320,15 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9234
9320
  }
9235
9321
  }
9236
9322
  else {
9237
- this.setActive(args);
9323
+ this.setActive(args, null, isInteracted);
9238
9324
  }
9239
9325
  }
9240
9326
  else {
9241
- this.setActive(0);
9327
+ this.setActive(0, null, isInteracted);
9242
9328
  }
9243
9329
  }
9244
9330
  else if (args instanceof (HTMLElement)) {
9245
- this.setActive(this.getEleIndex(args));
9331
+ this.setActive(this.getEleIndex(args), null, isInteracted);
9246
9332
  }
9247
9333
  };
9248
9334
  /**
@@ -9325,6 +9411,9 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9325
9411
  case 'showCloseButton':
9326
9412
  this.setCloseButton(newProp.showCloseButton);
9327
9413
  break;
9414
+ case 'reorderActiveTab':
9415
+ this.refreshActiveTabBorder();
9416
+ break;
9328
9417
  case 'selectedItem':
9329
9418
  this.selectedItem = oldProp.selectedItem;
9330
9419
  this.select(newProp.selectedItem);
@@ -9338,7 +9427,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9338
9427
  case 'overflowMode':
9339
9428
  this.tbObj.overflowMode = newProp.overflowMode;
9340
9429
  this.tbObj.dataBind();
9341
- this.refreshActElePosition();
9430
+ this.refreshActiveTabBorder();
9342
9431
  break;
9343
9432
  case 'heightAdjustMode':
9344
9433
  this.setContentHeight(false);
@@ -9517,6 +9606,9 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9517
9606
  __decorate$7([
9518
9607
  Property(false)
9519
9608
  ], Tab.prototype, "showCloseButton", void 0);
9609
+ __decorate$7([
9610
+ Property(true)
9611
+ ], Tab.prototype, "reorderActiveTab", void 0);
9520
9612
  __decorate$7([
9521
9613
  Property()
9522
9614
  ], Tab.prototype, "scrollStep", void 0);
@@ -9597,6 +9689,8 @@ var COLLAPSIBLE = 'e-icon-collapsible';
9597
9689
  var EXPANDABLE = 'e-icon-expandable';
9598
9690
  var LISTITEM = 'e-list-item';
9599
9691
  var LISTTEXT = 'e-list-text';
9692
+ var LISTWRAP = 'e-text-wrap';
9693
+ var IELISTWRAP = 'e-ie-wrap';
9600
9694
  var PARENTITEM = 'e-list-parent';
9601
9695
  var HOVER = 'e-hover';
9602
9696
  var ACTIVE = 'e-active';
@@ -9765,6 +9859,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
9765
9859
  _this.isFieldChange = false;
9766
9860
  _this.changeDataSource = false;
9767
9861
  _this.hasTemplate = false;
9862
+ _this.isFirstRender = false;
9768
9863
  _this.mouseDownStatus = false;
9769
9864
  return _this;
9770
9865
  }
@@ -9890,6 +9985,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
9890
9985
  this.setCssClass(null, this.cssClass);
9891
9986
  this.setEnableRtl();
9892
9987
  this.setFullRow(this.fullRowSelect);
9988
+ this.setTextWrap();
9893
9989
  this.nodeTemplateFn = this.templateComplier(this.nodeTemplate);
9894
9990
  };
9895
9991
  TreeView.prototype.setDisabledMode = function () {
@@ -10878,11 +10974,36 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
10878
10974
  addClass([firstNode], FOCUS);
10879
10975
  this.updateIdAttr(null, firstNode);
10880
10976
  }
10977
+ if (this.allowTextWrap) {
10978
+ this.updateWrap();
10979
+ }
10881
10980
  this.renderReactTemplates();
10882
10981
  this.hasPid = this.rootData[0] ? this.rootData[0].hasOwnProperty(this.fields.parentID) : false;
10883
10982
  this.doExpandAction();
10884
10983
  }
10885
10984
  };
10985
+ TreeView.prototype.setTextWrap = function () {
10986
+ (this.allowTextWrap ? addClass : removeClass)([this.element], LISTWRAP);
10987
+ if (Browser.isIE) {
10988
+ (this.allowTextWrap ? addClass : removeClass)([this.element], IELISTWRAP);
10989
+ }
10990
+ };
10991
+ TreeView.prototype.updateWrap = function (ulEle) {
10992
+ if (!this.fullRowSelect) {
10993
+ return;
10994
+ }
10995
+ var liEle = ulEle ? selectAll('.' + LISTITEM, ulEle) : this.liList;
10996
+ var length = liEle.length;
10997
+ for (var i = 0; i < length; i++) {
10998
+ this.calculateWrap(liEle[i]);
10999
+ }
11000
+ };
11001
+ TreeView.prototype.calculateWrap = function (liEle) {
11002
+ var element = select('.' + FULLROW, liEle);
11003
+ if (element && element.nextElementSibling) {
11004
+ element.style.height = this.allowTextWrap ? element.nextElementSibling.offsetHeight + 'px' : '';
11005
+ }
11006
+ };
10886
11007
  TreeView.prototype.doExpandAction = function () {
10887
11008
  var eUids = this.expandedNodes;
10888
11009
  if (this.isInitalExpand && eUids.length > 0) {
@@ -11119,6 +11240,10 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11119
11240
  currLi.style.height = '';
11120
11241
  removeClass([icon], PROCESS);
11121
11242
  this.addExpand(currLi);
11243
+ if (this.allowTextWrap && this.isLoaded && this.isFirstRender) {
11244
+ this.updateWrap(currLi);
11245
+ this.isFirstRender = false;
11246
+ }
11122
11247
  if (this.isLoaded && this.expandArgs && !this.isRefreshed) {
11123
11248
  this.expandArgs = this.getExpandEvent(currLi, null);
11124
11249
  this.trigger('nodeExpanded', this.expandArgs);
@@ -11627,6 +11752,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11627
11752
  this.expandNode(currLi, icon);
11628
11753
  }
11629
11754
  else {
11755
+ this.isFirstRender = true;
11630
11756
  this.renderChildNodes(currLi, expandChild, callback);
11631
11757
  var liEles = selectAll('.' + LISTITEM, currLi);
11632
11758
  for (var i = 0; i < liEles.length; i++) {
@@ -12323,6 +12449,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
12323
12449
  removeClass([liEle], EDITING);
12324
12450
  txtEle.focus();
12325
12451
  }
12452
+ if (this.allowTextWrap) {
12453
+ this.calculateWrap(liEle);
12454
+ }
12326
12455
  };
12327
12456
  TreeView.prototype.getElement = function (ele) {
12328
12457
  if (isNullOrUndefined(ele)) {
@@ -13917,6 +14046,10 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
13917
14046
  this.setMultiSelect(this.allowMultiSelection);
13918
14047
  this.addMultiSelect(this.allowMultiSelection);
13919
14048
  break;
14049
+ case 'allowTextWrap':
14050
+ this.setTextWrap();
14051
+ this.updateWrap();
14052
+ break;
13920
14053
  case 'checkedNodes':
13921
14054
  if (this.showCheckBox) {
13922
14055
  this.checkedNodes = oldProp.checkedNodes;
@@ -13968,6 +14101,10 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
13968
14101
  case 'fullRowSelect':
13969
14102
  this.setFullRow(this.fullRowSelect);
13970
14103
  this.addFullRow(this.fullRowSelect);
14104
+ if (this.allowTextWrap) {
14105
+ this.setTextWrap();
14106
+ this.updateWrap();
14107
+ }
13971
14108
  break;
13972
14109
  case 'loadOnDemand':
13973
14110
  if (this.loadOnDemand === false && !this.onLoaded) {
@@ -14407,6 +14544,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
14407
14544
  __decorate$8([
14408
14545
  Property(false)
14409
14546
  ], TreeView.prototype, "allowMultiSelection", void 0);
14547
+ __decorate$8([
14548
+ Property(false)
14549
+ ], TreeView.prototype, "allowTextWrap", void 0);
14410
14550
  __decorate$8([
14411
14551
  Complex({}, NodeAnimationSettings)
14412
14552
  ], TreeView.prototype, "animation", void 0);
@@ -15279,6 +15419,15 @@ var __decorate$10 = (undefined && undefined.__decorate) || function (decorators,
15279
15419
  var ICONRIGHT = 'e-icon-right';
15280
15420
  var ITEMTEXTCLASS = 'e-breadcrumb-text';
15281
15421
  var ICONCLASS = 'e-breadcrumb-icon';
15422
+ var MENUCLASS = 'e-breadcrumb-menu';
15423
+ var ITEMCLASS = 'e-breadcrumb-item';
15424
+ var POPUPCLASS = 'e-breadcrumb-popup';
15425
+ var WRAPMODECLASS = 'e-breadcrumb-wrap-mode';
15426
+ var SCROLLMODECLASS = 'e-breadcrumb-scroll-mode';
15427
+ var TABINDEX = 'tabindex';
15428
+ var DISABLEDCLASS = 'e-disabled';
15429
+ var ARIADISABLED = 'aria-disabled';
15430
+ var DOT = '.';
15282
15431
  var BreadcrumbItem = /** @__PURE__ @class */ (function (_super) {
15283
15432
  __extends$10(BreadcrumbItem, _super);
15284
15433
  function BreadcrumbItem() {
@@ -15293,6 +15442,9 @@ var BreadcrumbItem = /** @__PURE__ @class */ (function (_super) {
15293
15442
  __decorate$10([
15294
15443
  Property(null)
15295
15444
  ], BreadcrumbItem.prototype, "iconCss", void 0);
15445
+ __decorate$10([
15446
+ Property(false)
15447
+ ], BreadcrumbItem.prototype, "disabled", void 0);
15296
15448
  return BreadcrumbItem;
15297
15449
  }(ChildProperty));
15298
15450
  /**
@@ -15347,20 +15499,49 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15347
15499
  if (this.enableRtl) {
15348
15500
  this.element.classList.add('e-rtl');
15349
15501
  }
15350
- this.setWidth();
15502
+ if (this.disabled) {
15503
+ this.element.classList.add(DISABLEDCLASS);
15504
+ this.element.setAttribute(ARIADISABLED, 'true');
15505
+ }
15506
+ if (this.overflowMode === 'Wrap') {
15507
+ this.element.classList.add(WRAPMODECLASS);
15508
+ }
15509
+ else if (this.overflowMode === 'Scroll') {
15510
+ this.element.classList.add(SCROLLMODECLASS);
15511
+ }
15351
15512
  this.initItems();
15352
15513
  this.initPvtProps();
15353
15514
  };
15354
15515
  Breadcrumb.prototype.initPvtProps = function () {
15355
- if (this.overflowMode === 'Default' && this._maxItems > 0) {
15356
- this.startIndex = this.items.length - (this._maxItems - 1);
15357
- this.endIndex = this.items.length - 1;
15516
+ if (this.overflowMode === 'Hidden' && this._maxItems > 0) {
15517
+ this.endIndex = this.getEndIndex();
15518
+ this.startIndex = this.endIndex + 1 - (this._maxItems - 1);
15519
+ }
15520
+ if (this.overflowMode === 'Menu') {
15521
+ if (this._maxItems >= 0) {
15522
+ this.startIndex = this._maxItems > 1 ? 1 : 0;
15523
+ this.endIndex = this.getEndIndex();
15524
+ this.popupUl = this.createElement('ul', { attrs: { TABINDEX: '0', 'role': 'menu' } });
15525
+ }
15526
+ else {
15527
+ this.startIndex = this.endIndex = null;
15528
+ }
15358
15529
  }
15359
15530
  };
15360
- Breadcrumb.prototype.setWidth = function () {
15361
- if (this.width) {
15362
- this.element.style.width = this.width;
15531
+ Breadcrumb.prototype.getEndIndex = function () {
15532
+ var _this = this;
15533
+ var endIndex;
15534
+ if (this.activeItem) {
15535
+ this.items.forEach(function (item, idx) {
15536
+ if (item.url === _this.activeItem || item.text === _this.activeItem) {
15537
+ endIndex = idx;
15538
+ }
15539
+ });
15363
15540
  }
15541
+ else {
15542
+ endIndex = this.items.length - 1;
15543
+ }
15544
+ return endIndex;
15364
15545
  };
15365
15546
  Breadcrumb.prototype.initItems = function () {
15366
15547
  if (!this.items.length) {
@@ -15368,7 +15549,7 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15368
15549
  var uri = void 0;
15369
15550
  var items = [];
15370
15551
  if (this.url) {
15371
- var url = new URL(this.url);
15552
+ var url = new URL(this.url, window.location.origin);
15372
15553
  baseUri = url.origin + '/';
15373
15554
  uri = url.href.split(baseUri)[1].split('/');
15374
15555
  }
@@ -15395,13 +15576,19 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15395
15576
  if (itemsLength) {
15396
15577
  var isActiveItem = void 0;
15397
15578
  var isLastItem = void 0;
15579
+ var isLastItemInPopup_1;
15398
15580
  var j_1 = 0;
15581
+ var wrapDiv = void 0;
15399
15582
  var len = (itemsLength * 2) - 1;
15400
- var ol = this.createElement('ol');
15583
+ var isItemCancelled_1 = false;
15584
+ var ol = this.createElement('ol', { className: this.overflowMode === 'Wrap' ? 'e-breadcrumb-wrapped-ol' : '' });
15585
+ var firstOl = this.createElement('ol', { className: this.overflowMode === 'Wrap' ? 'e-breadcrumb-first-ol' : '' });
15401
15586
  var showIcon = this.hasField(items, 'iconCss');
15402
- var isDisabled_1 = this.element.classList.contains('e-disabled');
15403
- var isCollasped = (this.overflowMode === 'Collapsed' && this._maxItems > 0 && itemsLength > this.maxItems && !this.isExpanded);
15404
- var isDefaultOverflowMode_1 = (this.overflowMode === 'Default' && this._maxItems > 0);
15587
+ var isCollasped = (this.overflowMode === 'Collapsed' && this._maxItems > 0 && itemsLength > this._maxItems && !this.isExpanded);
15588
+ var isDefaultOverflowMode_1 = (this.overflowMode === 'Hidden' && this._maxItems > 0);
15589
+ if (this.overflowMode === 'Menu' && this.popupUl) {
15590
+ this.popupUl.innerHTML = '';
15591
+ }
15405
15592
  var listBaseOptions = {
15406
15593
  moduleName: this.getModuleName(),
15407
15594
  showIcon: showIcon,
@@ -15410,7 +15597,9 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15410
15597
  var isLastItem = args.curData.isLastItem;
15411
15598
  if (isLastItem && args.item.children.length && !_this.itemTemplate) {
15412
15599
  delete args.curData.isLastItem;
15413
- args.item.innerHTML = _this.createElement('span', { className: ITEMTEXTCLASS, innerHTML: args.item.children[0].innerHTML }).outerHTML;
15600
+ if (!isLastItemInPopup_1 && !_this.enableActiveItemNavigation) {
15601
+ args.item.innerHTML = _this.createElement('span', { className: ITEMTEXTCLASS, innerHTML: args.item.children[0].innerHTML }).outerHTML;
15602
+ }
15414
15603
  }
15415
15604
  if (args.curData.iconCss && !args.curData.text && !_this.itemTemplate) {
15416
15605
  args.item.classList.add('e-icon-item');
@@ -15418,41 +15607,40 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15418
15607
  if (isDefaultOverflowMode_1) {
15419
15608
  args.item.setAttribute('item-index', j_1.toString());
15420
15609
  }
15421
- if (args.item.querySelector('.' + ITEMTEXTCLASS)) {
15422
- EventHandler.add(args.item.querySelector('.' + ITEMTEXTCLASS), 'focus', function () {
15423
- args.item.classList.add('e-focus');
15424
- }, _this);
15425
- EventHandler.add(args.item.querySelector('.' + ITEMTEXTCLASS), 'focusout', function () {
15426
- args.item.classList.remove('e-focus');
15427
- }, _this);
15428
- }
15429
15610
  var eventArgs = {
15430
15611
  item: extend({}, args.curData.properties ?
15431
- args.curData.properties : args.curData), element: args.item
15612
+ args.curData.properties : args.curData), element: args.item, cancel: false
15432
15613
  };
15433
15614
  _this.trigger('beforeItemRender', eventArgs);
15434
- var isItemDisabled = isDisabled_1 || eventArgs.element.classList.contains('e-disabled');
15615
+ isItemCancelled_1 = eventArgs.cancel;
15435
15616
  var containsRightIcon = (isIconRight || eventArgs.element.classList.contains(ICONRIGHT));
15436
15617
  if (containsRightIcon && args.curData.iconCss && !_this.itemTemplate) {
15437
- args.item.querySelector('.e-anchor-wrap').append(args.item.querySelector('.' + ICONCLASS));
15618
+ args.item.querySelector('.e-anchor-wrap').appendChild(args.item.querySelector(DOT + ICONCLASS));
15438
15619
  }
15439
- if (isItemDisabled) {
15440
- args.item.setAttribute('aria-disabled', 'true');
15620
+ if (eventArgs.item.disabled) {
15621
+ args.item.setAttribute(ARIADISABLED, 'true');
15622
+ args.item.classList.add(DISABLEDCLASS);
15623
+ }
15624
+ if ((eventArgs.item.disabled || _this.disabled) && args.item.children.length && !_this.itemTemplate) {
15625
+ args.item.children[0].setAttribute(TABINDEX, '-1');
15441
15626
  }
15442
15627
  if (args.curData.isEmptyUrl) {
15443
15628
  args.item.children[0].removeAttribute('href');
15444
- if ((!isLastItem || (isLastItem && _this.enableActiveItemNavigation)) && !isItemDisabled) {
15445
- args.item.children[0].setAttribute('tabindex', '0');
15629
+ if ((!isLastItem || (isLastItem && _this.enableActiveItemNavigation)) && !(eventArgs.item.disabled || _this.disabled)) {
15630
+ args.item.children[0].setAttribute(TABINDEX, '0');
15446
15631
  EventHandler.add(args.item.children[0], 'keydown', _this.keyDownHandler, _this);
15447
15632
  }
15448
15633
  }
15634
+ if (isLastItem) {
15635
+ args.item.setAttribute('data-active-item', '');
15636
+ }
15449
15637
  if (!_this.itemTemplate) {
15450
15638
  _this.beforeItemRenderChanges(args.curData, eventArgs.item, args.item, containsRightIcon);
15451
15639
  }
15452
15640
  }
15453
15641
  };
15454
15642
  for (var i = 0; i < len; i % 2 && j_1++, i++) {
15455
- isActiveItem = (this.activeItem && this.activeItem === items[j_1].url);
15643
+ isActiveItem = (this.activeItem && (this.activeItem === items[j_1].url || this.activeItem === items[j_1].text));
15456
15644
  if (isCollasped && i > 1 && i < len - 2) {
15457
15645
  continue;
15458
15646
  }
@@ -15462,10 +15650,11 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15462
15650
  }
15463
15651
  if (i % 2) {
15464
15652
  // separator item
15653
+ wrapDiv = this.createElement('div', { className: 'e-breadcrumb-item-wrapper' });
15465
15654
  listBaseOptions.template = this.separatorTemplate ? this.separatorTemplate : '/';
15466
15655
  listBaseOptions.itemClass = 'e-breadcrumb-separator';
15467
15656
  isSingleLevel = false;
15468
- item = [{ previousItem: item.pop(), nextItem: items[j_1] }];
15657
+ item = [{ previousItem: items[j_1], nextItem: items[j_1 + 1] }];
15469
15658
  }
15470
15659
  else {
15471
15660
  // list item
@@ -15482,47 +15671,129 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15482
15671
  if (!item[0].url && !this.itemTemplate) {
15483
15672
  item = [extend({}, item[0], { isEmptyUrl: true, url: '#' })];
15484
15673
  }
15485
- isLastItem = isDefaultOverflowMode_1 && (j_1 === this.endIndex);
15486
- if ((((i === len - 1 || isLastItem) && !this.itemTemplate) || isActiveItem) && !this.enableActiveItemNavigation) {
15674
+ isLastItem = (isDefaultOverflowMode_1 || this.overflowMode === 'Menu') && (j_1 === this.endIndex);
15675
+ if (((i === len - 1 || isLastItem) && !this.itemTemplate) || isActiveItem) {
15487
15676
  item[0].isLastItem = true;
15488
15677
  }
15489
15678
  }
15490
- append(ListBase.createList(this.createElement, item, listBaseOptions, isSingleLevel, this)
15491
- .childNodes, ol);
15679
+ var parent_1 = ol;
15680
+ var lastPopupItemIdx = this.startIndex + this.endIndex - this._maxItems;
15681
+ if (this.overflowMode === 'Menu' && ((j_1 >= this.startIndex && (j_1 <= lastPopupItemIdx && (i % 2 ? !(j_1 === lastPopupItemIdx) : true)) && this.endIndex >= this._maxItems && this._maxItems > 0) || this._maxItems === 0)) {
15682
+ if (i % 2) {
15683
+ continue;
15684
+ }
15685
+ else {
15686
+ parent_1 = this.popupUl;
15687
+ if (isLastItem) {
15688
+ isLastItemInPopup_1 = true;
15689
+ }
15690
+ }
15691
+ }
15692
+ else if (this.overflowMode === 'Wrap') {
15693
+ if (i === 0) {
15694
+ parent_1 = firstOl;
15695
+ }
15696
+ else {
15697
+ parent_1 = wrapDiv;
15698
+ }
15699
+ }
15700
+ var li = ListBase.createList(this.createElement, item, listBaseOptions, isSingleLevel, this).childNodes;
15701
+ if (!isItemCancelled_1) {
15702
+ append(li, parent_1);
15703
+ }
15704
+ else if (isDefaultOverflowMode_1 || isCollasped || this.overflowMode === 'Menu' || this.overflowMode === 'Wrap') {
15705
+ items.splice(j_1, 1);
15706
+ this.initPvtProps();
15707
+ return this.reRenderItems();
15708
+ }
15709
+ else if ((i === len - 1 || isLastItem)) {
15710
+ remove(parent_1.lastElementChild);
15711
+ }
15712
+ if (this.overflowMode === 'Wrap' && i !== 0 && i % 2 === 0) {
15713
+ ol.appendChild(wrapDiv);
15714
+ }
15492
15715
  if (isCollasped && i === 1) {
15493
- var li = this.createElement('li', { className: 'e-icons e-breadcrumb-collapsed', attrs: { 'tabindex': '0' } });
15494
- EventHandler.add(li, 'keyup', this.expandHandler, this);
15495
- ol.append(li);
15716
+ var li_1 = this.createElement('li', { className: 'e-icons e-breadcrumb-collapsed', attrs: { TABINDEX: '0' } });
15717
+ EventHandler.add(li_1, 'keyup', this.expandHandler, this);
15718
+ ol.appendChild(li_1);
15719
+ }
15720
+ if (this.overflowMode === 'Menu' && this.startIndex === i && this.endIndex >= this._maxItems && this._maxItems >= 0) {
15721
+ var menu = this.getMenuElement();
15722
+ EventHandler.add(menu, 'keyup', this.keyDownHandler, this);
15723
+ ol.appendChild(menu);
15496
15724
  }
15497
15725
  if (isActiveItem || isLastItem) {
15498
15726
  break;
15499
15727
  }
15728
+ if (isItemCancelled_1) {
15729
+ i++;
15730
+ }
15500
15731
  }
15501
15732
  if (this.isReact) {
15502
15733
  this.renderReactTemplates();
15503
15734
  }
15504
- this.element.append(ol);
15735
+ if (this.overflowMode === 'Wrap') {
15736
+ this.element.appendChild(firstOl);
15737
+ }
15738
+ this.element.appendChild(ol);
15505
15739
  this.calculateMaxItems();
15506
15740
  }
15507
15741
  };
15508
15742
  Breadcrumb.prototype.calculateMaxItems = function () {
15509
- if (!this._maxItems) {
15510
- if (this.overflowMode === 'Default' || this.overflowMode === 'Collapsed') {
15511
- var width = this.element.offsetWidth;
15512
- var liWidth = this.element.children[0].children[0].offsetWidth;
15513
- var liElems = [].slice.call(this.element.children[0].children).reverse();
15514
- for (var i = 0; i < liElems.length; i++) {
15515
- if (liWidth > width) {
15516
- this._maxItems = Math.ceil((i - 1) / 2) + 1;
15743
+ if (this.overflowMode === 'Hidden' || this.overflowMode === 'Collapsed' || this.overflowMode === 'Menu') {
15744
+ var maxItems = void 0;
15745
+ var width = this.element.offsetWidth;
15746
+ var liElems = [].slice.call(this.element.children[0].children).reverse();
15747
+ var liWidth = this.overflowMode === 'Menu' ? 0 : liElems[liElems.length - 1].offsetWidth + (liElems[liElems.length - 2] ? liElems[liElems.length - 2].offsetWidth : 0);
15748
+ if (this.overflowMode === 'Menu') {
15749
+ var menuEle = this.getMenuElement();
15750
+ this.element.appendChild(menuEle);
15751
+ liWidth += menuEle.offsetWidth;
15752
+ remove(menuEle);
15753
+ }
15754
+ for (var i = 0; i < liElems.length - 2; i++) {
15755
+ if (liWidth > width) {
15756
+ maxItems = Math.ceil((i - 1) / 2) + ((this.overflowMode === 'Menu' && i <= 2) ? 0 : 1);
15757
+ if (((this.maxItems > maxItems && !(this.maxItems > -1 && maxItems == -1)) || this.maxItems == -1) && this._maxItems != maxItems) {
15758
+ this._maxItems = maxItems;
15517
15759
  this.initPvtProps();
15518
15760
  return this.reRenderItems();
15519
15761
  }
15520
15762
  else {
15763
+ break;
15764
+ }
15765
+ }
15766
+ else {
15767
+ if (this.overflowMode === 'Menu' && i === 2) {
15768
+ liWidth += liElems[liElems.length - 1].offsetWidth + liElems[liElems.length - 2].offsetWidth;
15769
+ if (liWidth > width) {
15770
+ this._maxItems = 1;
15771
+ this.initPvtProps();
15772
+ return this.reRenderItems();
15773
+ }
15774
+ }
15775
+ if (!(this.overflowMode === 'Menu' && liElems[i].classList.contains(MENUCLASS))) {
15521
15776
  liWidth += liElems[i].offsetWidth;
15522
15777
  }
15523
15778
  }
15524
15779
  }
15525
15780
  }
15781
+ else if ((this.overflowMode === 'Wrap' || this.overflowMode === 'Scroll') && this._maxItems > 0) {
15782
+ var width = 0;
15783
+ var liElems = this.element.querySelectorAll(DOT + ITEMCLASS);
15784
+ if (liElems.length > this._maxItems + this._maxItems - 1) {
15785
+ for (var i = this.overflowMode === 'Wrap' ? 1 : 0; i < this._maxItems + this._maxItems - 1; i++) {
15786
+ width += liElems[i].offsetWidth;
15787
+ }
15788
+ width = width + 5 + (parseInt(getComputedStyle(this.element.children[0]).paddingLeft, 10) * 2);
15789
+ if (this.overflowMode === 'Wrap') {
15790
+ this.element.querySelector('.e-breadcrumb-wrapped-ol').style.width = width + 'px';
15791
+ }
15792
+ else {
15793
+ this.element.style.width = width + 'px';
15794
+ }
15795
+ }
15796
+ }
15526
15797
  };
15527
15798
  Breadcrumb.prototype.hasField = function (items, field) {
15528
15799
  for (var i = 0, len = items.length; i < len; i++) {
@@ -15532,6 +15803,9 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15532
15803
  }
15533
15804
  return false;
15534
15805
  };
15806
+ Breadcrumb.prototype.getMenuElement = function () {
15807
+ return this.createElement('li', { className: 'e-icons e-breadcrumb-menu', attrs: { TABINDEX: '0' } });
15808
+ };
15535
15809
  Breadcrumb.prototype.beforeItemRenderChanges = function (prevItem, currItem, elem, isRightIcon) {
15536
15810
  var wrapElem = elem.querySelector('.e-anchor-wrap');
15537
15811
  if (currItem.text !== prevItem.text) {
@@ -15541,15 +15815,15 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15541
15815
  }
15542
15816
  });
15543
15817
  }
15544
- if (currItem.iconCss !== prevItem.iconCss) {
15545
- var iconElem = elem.querySelector('.' + ICONCLASS);
15818
+ if (currItem.iconCss !== prevItem.iconCss && wrapElem) { // wrapElem - for checking it is item not a separator
15819
+ var iconElem = elem.querySelector(DOT + ICONCLASS);
15546
15820
  if (iconElem) {
15547
15821
  if (currItem.iconCss) {
15548
15822
  removeClass([iconElem], prevItem.iconCss.split(' '));
15549
15823
  addClass([iconElem], currItem.iconCss.split(' '));
15550
15824
  }
15551
15825
  else {
15552
- iconElem.remove();
15826
+ remove(iconElem);
15553
15827
  }
15554
15828
  }
15555
15829
  else if (currItem.iconCss) {
@@ -15579,31 +15853,86 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15579
15853
  this.renderItems(this.items);
15580
15854
  };
15581
15855
  Breadcrumb.prototype.clickHandler = function (e) {
15582
- var li = closest(e.target, '.e-breadcrumb-item');
15583
- if (li && (closest(e.target, '.' + ITEMTEXTCLASS) || this.itemTemplate)) {
15584
- var idx = [].slice.call(li.parentElement.children).indexOf(li);
15585
- idx = Math.floor(idx / 2);
15586
- if (this.overflowMode === 'Default' && this._maxItems > 0 && this.endIndex !== 0) {
15856
+ var li = closest(e.target, DOT + ITEMCLASS + ':not(.e-breadcrumb-separator)');
15857
+ if (!this.enableNavigation) {
15858
+ e.preventDefault();
15859
+ }
15860
+ if (li && (closest(e.target, DOT + ITEMTEXTCLASS) || this.itemTemplate)) {
15861
+ var idx = void 0;
15862
+ if (this.overflowMode === 'Wrap') {
15863
+ idx = [].slice.call(this.element.querySelectorAll(DOT + ITEMCLASS)).indexOf(li);
15864
+ }
15865
+ else {
15866
+ idx = [].slice.call(li.parentElement.children).indexOf(li);
15867
+ }
15868
+ if (this.overflowMode === 'Menu') {
15869
+ if (closest(e.target, DOT + POPUPCLASS)) {
15870
+ idx += this.startIndex;
15871
+ this.endIndex = idx;
15872
+ if (e.type === 'keydown') {
15873
+ this.documentClickHandler(e);
15874
+ }
15875
+ }
15876
+ else if (this.element.querySelector(DOT + MENUCLASS)) {
15877
+ if (idx > [].slice.call(this.element.children[0].children).indexOf(this.element.querySelector(DOT + MENUCLASS))) {
15878
+ idx += (this.popupUl.childElementCount * 2) - 2;
15879
+ idx = Math.floor(idx / 2);
15880
+ this.endIndex = idx;
15881
+ }
15882
+ else {
15883
+ this.startIndex = this.endIndex = idx;
15884
+ }
15885
+ }
15886
+ else {
15887
+ idx = Math.floor(idx / 2);
15888
+ this.startIndex = this.endIndex = idx;
15889
+ }
15890
+ }
15891
+ else {
15892
+ idx = Math.floor(idx / 2);
15893
+ }
15894
+ if (this.overflowMode === 'Hidden' && this._maxItems > 0 && this.endIndex !== 0) {
15587
15895
  idx = parseInt(li.getAttribute('item-index'), 10);
15588
15896
  if (this.startIndex > 1) {
15589
15897
  this.startIndex -= (this.endIndex - idx);
15590
15898
  }
15591
15899
  this.endIndex = idx;
15592
- this.reRenderItems();
15593
15900
  }
15594
15901
  this.trigger('itemClick', { element: li, item: this.items[idx], event: e });
15595
- if (this.items[idx].url) {
15596
- this.activeItem = this.items[idx].url;
15597
- this.dataBind();
15598
- }
15599
- }
15600
- if (!this.enableNavigation) {
15601
- e.preventDefault();
15902
+ this.activeItem = this.items[idx].url || this.items[idx].text;
15903
+ this.dataBind();
15602
15904
  }
15603
15905
  if (e.target.classList.contains('e-breadcrumb-collapsed')) {
15604
15906
  this.isExpanded = true;
15605
15907
  this.reRenderItems();
15606
15908
  }
15909
+ if (e.target.classList.contains(MENUCLASS)) {
15910
+ this.renderPopup();
15911
+ }
15912
+ };
15913
+ Breadcrumb.prototype.renderPopup = function () {
15914
+ var _this = this;
15915
+ var wrapper = this.createElement('div', { className: POPUPCLASS + ' ' + this.cssClass + (this.enableRtl ? ' e-rtl' : '') });
15916
+ document.body.appendChild(wrapper);
15917
+ this.popupObj = new Popup(wrapper, {
15918
+ content: this.popupUl,
15919
+ relateTo: this.element.querySelector(DOT + MENUCLASS),
15920
+ enableRtl: this.enableRtl,
15921
+ position: { X: 'left', Y: 'bottom' },
15922
+ collision: { X: 'fit', Y: 'flip' },
15923
+ open: function () {
15924
+ _this.popupUl.focus();
15925
+ }
15926
+ });
15927
+ this.popupWireEvents();
15928
+ this.popupObj.show();
15929
+ };
15930
+ Breadcrumb.prototype.documentClickHandler = function (e) {
15931
+ if (this.overflowMode === 'Menu' && this.popupObj && this.popupObj.element.classList.contains('e-popup-open') && !closest(e.target, DOT + MENUCLASS)) {
15932
+ this.popupObj.hide();
15933
+ this.popupObj.destroy();
15934
+ detach(this.popupObj.element);
15935
+ }
15607
15936
  };
15608
15937
  Breadcrumb.prototype.resize = function () {
15609
15938
  this._maxItems = this.maxItems;
@@ -15621,6 +15950,11 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15621
15950
  this.clickHandler(e);
15622
15951
  }
15623
15952
  };
15953
+ Breadcrumb.prototype.popupKeyDownHandler = function (e) {
15954
+ if (e.key === 'Escape') {
15955
+ this.documentClickHandler(e);
15956
+ }
15957
+ };
15624
15958
  /**
15625
15959
  * Called internally if any of the property value changed.
15626
15960
  *
@@ -15633,26 +15967,37 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15633
15967
  for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
15634
15968
  var prop = _a[_i];
15635
15969
  switch (prop) {
15636
- case 'activeItem':
15637
15970
  case 'items':
15638
15971
  case 'enableActiveItemNavigation':
15639
15972
  this.reRenderItems();
15640
15973
  break;
15974
+ case 'activeItem':
15975
+ this._maxItems = this.maxItems;
15976
+ this.initPvtProps();
15977
+ this.reRenderItems();
15978
+ break;
15641
15979
  case 'overflowMode':
15642
15980
  case 'maxItems':
15981
+ this._maxItems = this.maxItems;
15643
15982
  this.initPvtProps();
15644
15983
  this.reRenderItems();
15984
+ if (oldProp.overflowMode === 'Wrap') {
15985
+ this.element.classList.remove(WRAPMODECLASS);
15986
+ }
15987
+ else if (newProp.overflowMode === 'Wrap') {
15988
+ this.element.classList.add(WRAPMODECLASS);
15989
+ }
15990
+ if (oldProp.overflowMode === 'Scroll') {
15991
+ this.element.classList.remove(SCROLLMODECLASS);
15992
+ }
15993
+ else if (newProp.overflowMode === 'Scroll') {
15994
+ this.element.classList.add(SCROLLMODECLASS);
15995
+ }
15645
15996
  break;
15646
15997
  case 'url':
15647
15998
  this.initItems();
15648
15999
  this.reRenderItems();
15649
16000
  break;
15650
- case 'width':
15651
- this.setWidth();
15652
- this._maxItems = this.maxItems;
15653
- this.initPvtProps();
15654
- this.reRenderItems();
15655
- break;
15656
16001
  case 'cssClass':
15657
16002
  if (oldProp.cssClass) {
15658
16003
  removeClass([this.element], oldProp.cssClass.split(' '));
@@ -15669,16 +16014,31 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15669
16014
  case 'enableRtl':
15670
16015
  this.element.classList.toggle('e-rtl');
15671
16016
  break;
16017
+ case 'disabled':
16018
+ this.element.classList.toggle(DISABLEDCLASS);
16019
+ this.element.setAttribute(ARIADISABLED, newProp.disabled + '');
16020
+ break;
15672
16021
  }
15673
16022
  }
15674
16023
  };
15675
16024
  Breadcrumb.prototype.wireEvents = function () {
16025
+ this.delegateClickHanlder = this.documentClickHandler.bind(this);
16026
+ EventHandler.add(document, 'click', this.delegateClickHanlder, this);
15676
16027
  EventHandler.add(this.element, 'click', this.clickHandler, this);
15677
16028
  window.addEventListener('resize', this.resize.bind(this));
15678
16029
  };
16030
+ Breadcrumb.prototype.popupWireEvents = function () {
16031
+ EventHandler.add(this.popupObj.element, 'click', this.clickHandler, this);
16032
+ EventHandler.add(this.popupObj.element, 'keydown', this.popupKeyDownHandler, this);
16033
+ };
15679
16034
  Breadcrumb.prototype.unWireEvents = function () {
16035
+ EventHandler.remove(document, 'click', this.delegateClickHanlder);
15680
16036
  EventHandler.remove(this.element, 'click', this.clickHandler);
15681
16037
  window.removeEventListener('resize', this.resize.bind(this));
16038
+ if (this.popupObj) {
16039
+ EventHandler.remove(this.popupObj.element, 'click', this.clickHandler);
16040
+ EventHandler.remove(this.popupObj.element, 'keydown', this.popupKeyDownHandler);
16041
+ }
15682
16042
  };
15683
16043
  /**
15684
16044
  * Get the properties to be maintained in the persisted state.
@@ -15703,11 +16063,32 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15703
16063
  * @returns {void}
15704
16064
  */
15705
16065
  Breadcrumb.prototype.destroy = function () {
15706
- this.unWireEvents();
15707
- this.element.innerHTML = '';
16066
+ var _this = this;
16067
+ var classes = [];
16068
+ var attributes$$1 = ['aria-label'];
15708
16069
  if (this.cssClass) {
15709
- removeClass([this.element], this.cssClass.split(' '));
16070
+ classes.concat(this.cssClass.split(' '));
16071
+ }
16072
+ if (this.enableRtl) {
16073
+ classes.push('e-rtl');
15710
16074
  }
16075
+ if (this.disabled) {
16076
+ classes.push(DISABLEDCLASS);
16077
+ attributes$$1.push(ARIADISABLED);
16078
+ }
16079
+ if (this.overflowMode === 'Wrap') {
16080
+ classes.push(WRAPMODECLASS);
16081
+ }
16082
+ else if (this.overflowMode === 'Scroll') {
16083
+ classes.push(SCROLLMODECLASS);
16084
+ }
16085
+ this.unWireEvents();
16086
+ this.element.innerHTML = '';
16087
+ removeClass([this.element], classes);
16088
+ attributes$$1.forEach(function (attribute) {
16089
+ _this.element.removeAttribute(attribute);
16090
+ });
16091
+ _super.prototype.destroy.call(this);
15711
16092
  };
15712
16093
  __decorate$10([
15713
16094
  Property('')
@@ -15719,17 +16100,14 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15719
16100
  Property('')
15720
16101
  ], Breadcrumb.prototype, "activeItem", void 0);
15721
16102
  __decorate$10([
15722
- Property(0)
16103
+ Property(-1)
15723
16104
  ], Breadcrumb.prototype, "maxItems", void 0);
15724
16105
  __decorate$10([
15725
- Property('Default')
16106
+ Property('Menu')
15726
16107
  ], Breadcrumb.prototype, "overflowMode", void 0);
15727
16108
  __decorate$10([
15728
16109
  Property('')
15729
16110
  ], Breadcrumb.prototype, "cssClass", void 0);
15730
- __decorate$10([
15731
- Property('')
15732
- ], Breadcrumb.prototype, "width", void 0);
15733
16111
  __decorate$10([
15734
16112
  Property(null)
15735
16113
  ], Breadcrumb.prototype, "itemTemplate", void 0);
@@ -15742,6 +16120,9 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15742
16120
  __decorate$10([
15743
16121
  Property(false)
15744
16122
  ], Breadcrumb.prototype, "enableActiveItemNavigation", void 0);
16123
+ __decorate$10([
16124
+ Property(false)
16125
+ ], Breadcrumb.prototype, "disabled", void 0);
15745
16126
  __decorate$10([
15746
16127
  Property('')
15747
16128
  ], Breadcrumb.prototype, "locale", void 0);