@syncfusion/ej2-navigations 19.3.56 → 19.4.41

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 (255) 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 +513 -144
  7. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  8. package/dist/es6/ej2-navigations.es5.js +520 -145
  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/v-scroll.js +1 -1
  21. package/src/sidebar/sidebar.js +4 -4
  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 +317 -84
  53. package/styles/bootstrap.css +316 -83
  54. package/styles/bootstrap4.css +317 -76
  55. package/styles/bootstrap5-dark.css +339 -75
  56. package/styles/bootstrap5.css +341 -77
  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 +305 -41
  117. package/styles/fabric.css +308 -44
  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 +317 -47
  137. package/styles/highcontrast.css +322 -52
  138. package/styles/material-dark.css +295 -32
  139. package/styles/material.css +296 -33
  140. package/styles/menu/_fluent-definition.scss +68 -0
  141. package/styles/menu/_layout.scss +1 -1
  142. package/styles/menu/_theme.scss +9 -0
  143. package/styles/menu/bootstrap-dark.css +1 -1
  144. package/styles/menu/bootstrap.css +1 -1
  145. package/styles/menu/bootstrap4.css +1 -1
  146. package/styles/menu/bootstrap5-dark.css +4 -4
  147. package/styles/menu/bootstrap5.css +5 -5
  148. package/styles/menu/icons/_fluent.scss +133 -0
  149. package/styles/menu/material-dark.css +1 -1
  150. package/styles/menu/material.css +1 -1
  151. package/styles/menu/tailwind-dark.css +1 -1
  152. package/styles/menu/tailwind.css +1 -1
  153. package/styles/sidebar/_bootstrap5-definition.scss +5 -5
  154. package/styles/sidebar/_fluent-definition.scss +5 -0
  155. package/styles/sidebar/_theme.scss +4 -2
  156. package/styles/sidebar/bootstrap5-dark.css +0 -1
  157. package/styles/sidebar/bootstrap5.css +0 -1
  158. package/styles/sidebar/tailwind-dark.css +0 -1
  159. package/styles/sidebar/tailwind.css +0 -1
  160. package/styles/tab/_bootstrap-dark-definition.scss +10 -1
  161. package/styles/tab/_bootstrap-definition.scss +10 -1
  162. package/styles/tab/_bootstrap4-definition.scss +9 -1
  163. package/styles/tab/_bootstrap5-definition.scss +401 -401
  164. package/styles/tab/_fabric-dark-definition.scss +10 -0
  165. package/styles/tab/_fabric-definition.scss +10 -0
  166. package/styles/tab/_fluent-definition.scss +409 -0
  167. package/styles/tab/_highcontrast-definition.scss +10 -0
  168. package/styles/tab/_highcontrast-light-definition.scss +10 -0
  169. package/styles/tab/_layout.scss +145 -0
  170. package/styles/tab/_material-dark-definition.scss +10 -0
  171. package/styles/tab/_material-definition.scss +10 -0
  172. package/styles/tab/_tailwind-definition.scss +431 -420
  173. package/styles/tab/_theme.scss +188 -113
  174. package/styles/tab/bootstrap-dark.css +43 -18
  175. package/styles/tab/bootstrap.css +42 -17
  176. package/styles/tab/bootstrap4.css +47 -28
  177. package/styles/tab/bootstrap5-dark.css +53 -30
  178. package/styles/tab/bootstrap5.css +53 -30
  179. package/styles/tab/fabric-dark.css +43 -20
  180. package/styles/tab/fabric.css +46 -23
  181. package/styles/tab/highcontrast-light.css +52 -19
  182. package/styles/tab/highcontrast.css +56 -23
  183. package/styles/tab/icons/_bootstrap-dark.scss +2 -2
  184. package/styles/tab/icons/_fabric-dark.scss +2 -2
  185. package/styles/tab/icons/_fluent.scss +140 -0
  186. package/styles/tab/icons/_tailwind.scss +140 -140
  187. package/styles/tab/material-dark.css +42 -15
  188. package/styles/tab/material.css +42 -15
  189. package/styles/tab/tailwind-dark.css +42 -17
  190. package/styles/tab/tailwind.css +42 -17
  191. package/styles/tailwind-dark.css +313 -50
  192. package/styles/tailwind.css +313 -50
  193. package/styles/toolbar/_bootstrap-dark-definition.scss +7 -1
  194. package/styles/toolbar/_bootstrap-definition.scss +7 -1
  195. package/styles/toolbar/_bootstrap4-definition.scss +8 -2
  196. package/styles/toolbar/_bootstrap5-definition.scss +104 -86
  197. package/styles/toolbar/_fabric-dark-definition.scss +7 -0
  198. package/styles/toolbar/_fabric-definition.scss +7 -0
  199. package/styles/toolbar/_fluent-definition.scss +149 -0
  200. package/styles/toolbar/_highcontrast-definition.scss +7 -0
  201. package/styles/toolbar/_highcontrast-light-definition.scss +7 -0
  202. package/styles/toolbar/_layout.scss +27 -72
  203. package/styles/toolbar/_material-dark-definition.scss +7 -1
  204. package/styles/toolbar/_material-definition.scss +7 -1
  205. package/styles/toolbar/_tailwind-definition.scss +149 -143
  206. package/styles/toolbar/_theme.scss +12 -15
  207. package/styles/toolbar/bootstrap-dark.css +17 -46
  208. package/styles/toolbar/bootstrap.css +17 -46
  209. package/styles/toolbar/bootstrap4.css +12 -26
  210. package/styles/toolbar/bootstrap5-dark.css +6 -7
  211. package/styles/toolbar/bootstrap5.css +6 -7
  212. package/styles/toolbar/fabric-dark.css +4 -0
  213. package/styles/toolbar/fabric.css +4 -0
  214. package/styles/toolbar/highcontrast-light.css +4 -1
  215. package/styles/toolbar/highcontrast.css +4 -1
  216. package/styles/toolbar/icons/_fluent.scss +16 -0
  217. package/styles/toolbar/icons/_tailwind.scss +16 -16
  218. package/styles/toolbar/material-dark.css +4 -1
  219. package/styles/toolbar/material.css +5 -2
  220. package/styles/toolbar/tailwind-dark.css +8 -6
  221. package/styles/toolbar/tailwind.css +8 -6
  222. package/styles/treeview/_bootstrap-dark-definition.scss +11 -0
  223. package/styles/treeview/_bootstrap-definition.scss +11 -0
  224. package/styles/treeview/_bootstrap4-definition.scss +11 -0
  225. package/styles/treeview/_bootstrap5-definition.scss +120 -109
  226. package/styles/treeview/_fabric-dark-definition.scss +11 -0
  227. package/styles/treeview/_fabric-definition.scss +11 -0
  228. package/styles/treeview/_fluent-definition.scss +120 -0
  229. package/styles/treeview/_highcontrast-definition.scss +11 -0
  230. package/styles/treeview/_highcontrast-light-definition.scss +11 -0
  231. package/styles/treeview/_layout.scss +116 -20
  232. package/styles/treeview/_material-dark-definition.scss +13 -0
  233. package/styles/treeview/_material-definition.scss +11 -0
  234. package/styles/treeview/_tailwind-definition.scss +12 -0
  235. package/styles/treeview/_theme.scss +5 -5
  236. package/styles/treeview/bootstrap-dark.css +60 -0
  237. package/styles/treeview/bootstrap.css +60 -0
  238. package/styles/treeview/bootstrap4.css +60 -0
  239. package/styles/treeview/bootstrap5-dark.css +61 -1
  240. package/styles/treeview/bootstrap5.css +61 -1
  241. package/styles/treeview/fabric-dark.css +60 -0
  242. package/styles/treeview/fabric.css +60 -0
  243. package/styles/treeview/highcontrast-light.css +60 -0
  244. package/styles/treeview/highcontrast.css +60 -0
  245. package/styles/treeview/icons/_bootstrap5.scss +43 -43
  246. package/styles/treeview/icons/_fluent.scss +43 -0
  247. package/styles/treeview/icons/_tailwind-dark.scss +43 -43
  248. package/styles/treeview/material-dark.css +60 -0
  249. package/styles/treeview/material.css +60 -0
  250. package/styles/treeview/tailwind-dark.css +65 -1
  251. package/styles/treeview/tailwind.css +65 -1
  252. package/styles/v-scroll/_fluent-definition.scss +49 -0
  253. package/styles/v-scroll/_tailwind-definition.scss +49 -49
  254. package/styles/v-scroll/icons/_fluent.scss +26 -0
  255. 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
  };
@@ -3284,6 +3284,7 @@ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators,
3284
3284
  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
3285
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3286
3286
  };
3287
+ /* eslint-disable @typescript-eslint/no-explicit-any */
3287
3288
  var CLS_VERTICAL = 'e-vertical';
3288
3289
  var CLS_ITEMS = 'e-toolbar-items';
3289
3290
  var CLS_ITEM = 'e-toolbar-item';
@@ -4271,9 +4272,15 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
4271
4272
  };
4272
4273
  Toolbar.prototype.tbarPopupHandler = function (isOpen) {
4273
4274
  if (this.overflowMode === 'Extended') {
4274
- isOpen ? this.add(this.element, CLS_EXTENDEDPOPOPEN) : this.remove(this.element, CLS_EXTENDEDPOPOPEN);
4275
+ if (isOpen) {
4276
+ this.add(this.element, CLS_EXTENDEDPOPOPEN);
4277
+ }
4278
+ else {
4279
+ this.remove(this.element, CLS_EXTENDEDPOPOPEN);
4280
+ }
4275
4281
  }
4276
4282
  };
4283
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4277
4284
  Toolbar.prototype.popupOpen = function (e) {
4278
4285
  var popObj = this.popObj;
4279
4286
  if (!this.isVertical) {
@@ -4319,6 +4326,7 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
4319
4326
  popObj.refreshPosition();
4320
4327
  }
4321
4328
  };
4329
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4322
4330
  Toolbar.prototype.popupClose = function (e) {
4323
4331
  var element = this.element;
4324
4332
  var popupNav = element.querySelector('.' + CLS_TBARNAV);
@@ -4683,10 +4691,20 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
4683
4691
  var popWid = (this.isVertical ? popupNav.offsetHeight : popupNav.offsetWidth) + 'px';
4684
4692
  innerItem[2].removeAttribute('style');
4685
4693
  if (this.isVertical) {
4686
- this.enableRtl ? innerItem[2].style.top = popWid : innerItem[2].style.bottom = popWid;
4694
+ if (this.enableRtl) {
4695
+ innerItem[2].style.top = popWid;
4696
+ }
4697
+ else {
4698
+ innerItem[2].style.bottom = popWid;
4699
+ }
4687
4700
  }
4688
4701
  else {
4689
- this.enableRtl ? innerItem[2].style.left = popWid : innerItem[2].style.right = popWid;
4702
+ if (this.enableRtl) {
4703
+ innerItem[2].style.left = popWid;
4704
+ }
4705
+ else {
4706
+ innerItem[2].style.right = popWid;
4707
+ }
4690
4708
  }
4691
4709
  }
4692
4710
  if (tbarWid <= margin) {
@@ -4696,10 +4714,20 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
4696
4714
  innerItem[1].removeAttribute('style');
4697
4715
  var mrgn = ((!this.isVertical ? innerItem[0].offsetWidth : innerItem[0].offsetHeight) + value) + 'px';
4698
4716
  if (this.isVertical) {
4699
- this.enableRtl ? innerItem[1].style.marginBottom = mrgn : innerItem[1].style.marginTop = mrgn;
4717
+ if (this.enableRtl) {
4718
+ innerItem[1].style.marginBottom = mrgn;
4719
+ }
4720
+ else {
4721
+ innerItem[1].style.marginTop = mrgn;
4722
+ }
4700
4723
  }
4701
4724
  else {
4702
- this.enableRtl ? innerItem[1].style.marginRight = mrgn : innerItem[1].style.marginLeft = mrgn;
4725
+ if (this.enableRtl) {
4726
+ innerItem[1].style.marginRight = mrgn;
4727
+ }
4728
+ else {
4729
+ innerItem[1].style.marginLeft = mrgn;
4730
+ }
4703
4731
  }
4704
4732
  };
4705
4733
  Toolbar.prototype.tbarItemAlign = function (item, itemEle, pos) {
@@ -4769,7 +4797,12 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
4769
4797
  var keyVal;
4770
4798
  for (var i = 0; i < key.length; i++) {
4771
4799
  keyVal = key[i];
4772
- keyVal === 'class' ? this.add(element, attr[keyVal]) : element.setAttribute(keyVal, attr[keyVal]);
4800
+ if (keyVal === 'class') {
4801
+ this.add(element, attr[keyVal]);
4802
+ }
4803
+ else {
4804
+ element.setAttribute(keyVal, attr[keyVal]);
4805
+ }
4773
4806
  }
4774
4807
  };
4775
4808
  /**
@@ -4814,7 +4847,12 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
4814
4847
  }
4815
4848
  enable(isEnable, ele);
4816
4849
  }
4817
- isEnable ? removeClass(elements, CLS_DISABLE$2) : addClass(elements, CLS_DISABLE$2);
4850
+ if (isEnable) {
4851
+ removeClass(elements, CLS_DISABLE$2);
4852
+ }
4853
+ else {
4854
+ addClass(elements, CLS_DISABLE$2);
4855
+ }
4818
4856
  }
4819
4857
  else {
4820
4858
  if (typeof (elements) === 'number') {
@@ -5002,7 +5040,12 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
5002
5040
  }
5003
5041
  else if (itemType === 'Input') {
5004
5042
  var ele = this.createElement('input');
5005
- item.id ? (ele.id = item.id) : (ele.id = getUniqueID('tbr-ipt'));
5043
+ if (item.id) {
5044
+ ele.id = item.id;
5045
+ }
5046
+ else {
5047
+ ele.id = getUniqueID('tbr-ipt');
5048
+ }
5006
5049
  innerEle.appendChild(ele);
5007
5050
  eleObj.appendTo(ele);
5008
5051
  }
@@ -5015,7 +5058,12 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
5015
5058
  var textStr = item.text;
5016
5059
  var iconCss;
5017
5060
  var iconPos;
5018
- item.id ? (dom.id = item.id) : dom.id = getUniqueID('e-tbr-btn');
5061
+ if (item.id) {
5062
+ dom.id = item.id;
5063
+ }
5064
+ else {
5065
+ dom.id = getUniqueID('e-tbr-btn');
5066
+ }
5019
5067
  var btnTxt = this.createElement('span', { className: 'e-tbar-btn-text' });
5020
5068
  if (textStr) {
5021
5069
  btnTxt.innerHTML = this.enableHtmlSanitizer ? SanitizeHtmlHelper.sanitize(textStr) : textStr;
@@ -5283,12 +5331,27 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
5283
5331
  this.refreshOverflow();
5284
5332
  break;
5285
5333
  case 'enableRtl':
5286
- newProp.enableRtl ? this.add(tEle, CLS_RTL$2) : this.remove(tEle, CLS_RTL$2);
5334
+ if (newProp.enableRtl) {
5335
+ this.add(tEle, CLS_RTL$2);
5336
+ }
5337
+ else {
5338
+ this.remove(tEle, CLS_RTL$2);
5339
+ }
5287
5340
  if (!isNullOrUndefined(this.scrollModule)) {
5288
- newProp.enableRtl ? this.add(this.scrollModule.element, CLS_RTL$2) : this.remove(this.scrollModule.element, CLS_RTL$2);
5341
+ if (newProp.enableRtl) {
5342
+ this.add(this.scrollModule.element, CLS_RTL$2);
5343
+ }
5344
+ else {
5345
+ this.remove(this.scrollModule.element, CLS_RTL$2);
5346
+ }
5289
5347
  }
5290
5348
  if (!isNullOrUndefined(this.popObj)) {
5291
- newProp.enableRtl ? this.add(this.popObj.element, CLS_RTL$2) : this.remove(this.popObj.element, CLS_RTL$2);
5349
+ if (newProp.enableRtl) {
5350
+ this.add(this.popObj.element, CLS_RTL$2);
5351
+ }
5352
+ else {
5353
+ this.remove(this.popObj.element, CLS_RTL$2);
5354
+ }
5292
5355
  }
5293
5356
  if (this.tbarAlign) {
5294
5357
  this.itemPositioning();
@@ -5342,7 +5405,12 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
5342
5405
  ele = innerItems_1[eleIndex];
5343
5406
  }
5344
5407
  if (ele) {
5345
- value ? ele.classList.add(CLS_HIDDEN) : ele.classList.remove(CLS_HIDDEN);
5408
+ if (value) {
5409
+ ele.classList.add(CLS_HIDDEN);
5410
+ }
5411
+ else {
5412
+ ele.classList.remove(CLS_HIDDEN);
5413
+ }
5346
5414
  if (value && isNullOrUndefined(this.element.getAttribute('tabindex')) && !ele.classList.contains(CLS_SEPARATOR)) {
5347
5415
  if (isNullOrUndefined(ele.firstElementChild.getAttribute('tabindex'))) {
5348
5416
  ele.firstElementChild.setAttribute('tabindex', '-1');
@@ -5460,6 +5528,7 @@ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators,
5460
5528
  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
5529
  return c > 3 && r && Object.defineProperty(target, key, r), r;
5462
5530
  };
5531
+ /* eslint-disable @typescript-eslint/no-explicit-any */
5463
5532
  var CLS_ACRDN_ROOT = 'e-acrdn-root';
5464
5533
  var CLS_ROOT$2 = 'e-accordion';
5465
5534
  var CLS_ITEM$1 = 'e-acrdn-item';
@@ -5733,11 +5802,9 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
5733
5802
  this.itemTemplateFn = this.templateParser(this.itemTemplate);
5734
5803
  }
5735
5804
  };
5736
- /* eslint-disable */
5737
5805
  Accordion.prototype.getHeaderTemplate = function () {
5738
5806
  return this.headerTemplateFn;
5739
5807
  };
5740
- /* eslint-disable */
5741
5808
  Accordion.prototype.getItemTemplate = function () {
5742
5809
  return this.itemTemplateFn;
5743
5810
  };
@@ -5758,7 +5825,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
5758
5825
  innerEles = this.element.children;
5759
5826
  }
5760
5827
  var items = [];
5761
- /* eslint-disable */
5762
5828
  [].slice.call(innerEles).forEach(function (el) {
5763
5829
  items.push({
5764
5830
  header: (el.childElementCount > 0 && el.children[0]) ? (el.children[0]) : '',
@@ -5766,7 +5832,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
5766
5832
  });
5767
5833
  el.parentNode.removeChild(el);
5768
5834
  });
5769
- /* eslint-enable */
5770
5835
  if (rootEle) {
5771
5836
  this.element.removeChild(rootEle);
5772
5837
  }
@@ -5791,7 +5856,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
5791
5856
  this.expandItem(true, this.initExpand[i]);
5792
5857
  }
5793
5858
  }
5794
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5795
5859
  if (this.isReact) {
5796
5860
  this.renderReactTemplates();
5797
5861
  }
@@ -5827,7 +5891,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
5827
5891
  });
5828
5892
  }
5829
5893
  }
5830
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5831
5894
  if (this.isReact) {
5832
5895
  this.renderReactTemplates();
5833
5896
  }
@@ -5873,7 +5936,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
5873
5936
  else {
5874
5937
  this.afterContentRender(trgt, eventArgs, acrdnItem, acrdnHdr, acrdnCtn, acrdnCtnItem);
5875
5938
  }
5876
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5877
5939
  if (this.isReact) {
5878
5940
  this.renderReactTemplates();
5879
5941
  }
@@ -6081,7 +6143,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6081
6143
  };
6082
6144
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
6083
6145
  Accordion.prototype.fetchElement = function (ele, value, index, isHeader) {
6084
- /* eslint-disable */
6085
6146
  var templateFn;
6086
6147
  var temString;
6087
6148
  try {
@@ -6095,12 +6156,10 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6095
6156
  catch (e) {
6096
6157
  if (typeof (value) === 'string') {
6097
6158
  ele.innerHTML = SanitizeHtmlHelper.sanitize(value);
6098
- /* eslint-disable */
6099
6159
  }
6100
6160
  else if (!isNullOrUndefined(this.trgtEle) && (value instanceof (HTMLElement))) {
6101
6161
  ele.appendChild(value);
6102
6162
  ele.firstElementChild.style.display = '';
6103
- /* eslint-enable */
6104
6163
  }
6105
6164
  else {
6106
6165
  templateFn = compile(value);
@@ -6108,7 +6167,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6108
6167
  }
6109
6168
  var tempArray;
6110
6169
  if (!isNullOrUndefined(templateFn)) {
6111
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6112
6170
  if (this.isReact) {
6113
6171
  this.renderReactTemplates();
6114
6172
  }
@@ -6154,7 +6212,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6154
6212
  attributes(itemcnt, { 'aria-hidden': 'true' });
6155
6213
  var ctn = this.createElement('div', { className: CLS_CTENT });
6156
6214
  if (this.dataSource.length > 0) {
6157
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6158
6215
  if (this.isReact) {
6159
6216
  this.renderReactTemplates();
6160
6217
  }
@@ -6304,7 +6361,7 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6304
6361
  this.trigger('expanding', eventArgs, function (expandArgs) {
6305
6362
  if (!expandArgs.cancel) {
6306
6363
  _this.expandedItemsPop(trgtItemEle);
6307
- trgtItemEle.classList.add(CLS_EXPANDSTATE);
6364
+ trgtItemEle.classList.remove(CLS_EXPANDSTATE);
6308
6365
  icon.classList.add(CLS_TOGANIMATE);
6309
6366
  if ((animation.name === 'None')) {
6310
6367
  _this.collapseProgress('begin', icon, trgt, trgtItemEle, expandArgs);
@@ -6434,7 +6491,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6434
6491
  }
6435
6492
  });
6436
6493
  }
6437
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6438
6494
  if (this.isReact) {
6439
6495
  this.renderReactTemplates();
6440
6496
  }
@@ -6456,7 +6512,6 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6456
6512
  * @returns {void}.
6457
6513
  */
6458
6514
  Accordion.prototype.removeItem = function (index) {
6459
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6460
6515
  if (this.isReact) {
6461
6516
  this.clearTemplate(['headerTemplate', 'itemTemplate'], index);
6462
6517
  }
@@ -6604,14 +6659,12 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6604
6659
  this.collapse(ctn);
6605
6660
  }
6606
6661
  }
6607
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6608
6662
  if (this.isReact) {
6609
6663
  this.renderReactTemplates();
6610
6664
  }
6611
6665
  };
6612
6666
  Accordion.prototype.destroyItems = function () {
6613
6667
  this.restoreContent(null);
6614
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6615
6668
  if (this.isReact) {
6616
6669
  this.clearTemplate();
6617
6670
  }
@@ -6646,12 +6699,10 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6646
6699
  Accordion.prototype.setTemplate = function (template, toElement, index) {
6647
6700
  toElement.innerHTML = '';
6648
6701
  this.templateCompile(toElement, template, index);
6649
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6650
6702
  if (this.isReact) {
6651
6703
  this.renderReactTemplates();
6652
6704
  }
6653
6705
  };
6654
- // eslint-disable-next-line
6655
6706
  Accordion.prototype.templateCompile = function (ele, cnt, index) {
6656
6707
  var tempEle = this.createElement('div');
6657
6708
  this.fetchElement(tempEle, cnt, index, false);
@@ -7312,6 +7363,7 @@ var CLS_VRIGHT = 'e-vertical-right';
7312
7363
  var CLS_HBOTTOM = 'e-horizontal-bottom';
7313
7364
  var CLS_FILL = 'e-fill-mode';
7314
7365
  var TABITEMPREFIX = 'tabitem_';
7366
+ var CLS_REORDER_ACTIVE_ITEM = 'e-reorder-active-item';
7315
7367
  /**
7316
7368
  * Objects used for configuring the Tab selecting item action properties.
7317
7369
  */
@@ -7422,11 +7474,12 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
7422
7474
  _this.hide = {};
7423
7475
  _this.maxHeight = 0;
7424
7476
  _this.title = 'Close';
7477
+ _this.isInteracted = false;
7425
7478
  _this.lastIndex = 0;
7426
7479
  _this.isAdd = false;
7427
7480
  _this.isIconAlone = false;
7428
7481
  _this.draggableItems = [];
7429
- _this.resizeContext = _this.refreshActElePosition.bind(_this);
7482
+ _this.resizeContext = _this.refreshActiveTabBorder.bind(_this);
7430
7483
  /**
7431
7484
  * Contains the keyboard configuration of the Tab.
7432
7485
  */
@@ -7879,7 +7932,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
7879
7932
  trg.classList.remove(CLS_CLOSE_SHOW);
7880
7933
  }
7881
7934
  this.tbObj.refreshOverflow();
7882
- this.refreshActElePosition();
7935
+ this.refreshActiveTabBorder();
7883
7936
  };
7884
7937
  Tab.prototype.prevCtnAnimation = function (prev, current) {
7885
7938
  var animation;
@@ -8006,7 +8059,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8006
8059
  }
8007
8060
  else {
8008
8061
  if (!isNullOrUndefined(trgParent) && trgParent.classList.contains(CLS_ACTIVE$1) === false) {
8009
- this.select(trgIndex);
8062
+ this.selectTab(trgIndex, null, true);
8010
8063
  if (!isNullOrUndefined(this.popEle)) {
8011
8064
  this.popObj.hide(this.hide);
8012
8065
  }
@@ -8279,9 +8332,20 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8279
8332
  Tab.prototype.setActiveBorder = function () {
8280
8333
  var trgHdrEle = this.getTabHeader();
8281
8334
  var trg = select('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE$1, trgHdrEle);
8282
- if (trg === null) {
8335
+ if (isNullOrUndefined(trg)) {
8283
8336
  return;
8284
8337
  }
8338
+ if (!this.reorderActiveTab) {
8339
+ if (trg.classList.contains(CLS_TB_POPUP) && !this.bdrLine.classList.contains(CLS_HIDDEN$1)) {
8340
+ this.bdrLine.classList.add(CLS_HIDDEN$1);
8341
+ }
8342
+ if (trgHdrEle && !trgHdrEle.classList.contains(CLS_REORDER_ACTIVE_ITEM)) {
8343
+ trgHdrEle.classList.add(CLS_REORDER_ACTIVE_ITEM);
8344
+ }
8345
+ }
8346
+ else if (trgHdrEle) {
8347
+ trgHdrEle.classList.remove(CLS_REORDER_ACTIVE_ITEM);
8348
+ }
8285
8349
  var root = closest(trg, '.' + CLS_TAB);
8286
8350
  if (this.element !== root) {
8287
8351
  return;
@@ -8315,12 +8379,13 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8315
8379
  setStyleAttribute(bar, { 'left': 'auto', 'right': 'auto' });
8316
8380
  }
8317
8381
  }
8318
- if (!isNullOrUndefined(this.bdrLine)) {
8382
+ if (!isNullOrUndefined(this.bdrLine) && !trg.classList.contains(CLS_TB_POPUP)) {
8319
8383
  this.bdrLine.classList.remove(CLS_HIDDEN$1);
8320
8384
  }
8321
8385
  };
8322
- Tab.prototype.setActive = function (value, skipDataBind) {
8386
+ Tab.prototype.setActive = function (value, skipDataBind, isInteracted) {
8323
8387
  if (skipDataBind === void 0) { skipDataBind = false; }
8388
+ if (isInteracted === void 0) { isInteracted = false; }
8324
8389
  this.tbItem = selectAll('.' + CLS_TB_ITEM, this.getTabHeader());
8325
8390
  var trg = this.tbItem[value];
8326
8391
  if (value < 0 || isNaN(value) || this.tbItem.length === 0) {
@@ -8391,7 +8456,8 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8391
8456
  selectedItem: trg,
8392
8457
  selectedIndex: value,
8393
8458
  selectedContent: select('#' + CLS_CONTENT$1 + this.tabId + '_' + this.selectingID, this.content),
8394
- isSwiped: this.isSwipeed
8459
+ isSwiped: this.isSwipeed,
8460
+ isInteracted: isInteracted
8395
8461
  };
8396
8462
  this.trigger('selected', eventArg);
8397
8463
  }
@@ -8483,7 +8549,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8483
8549
  else {
8484
8550
  this.isPopup = false;
8485
8551
  if (!isNullOrUndefined(trgParent) && (trgIndex !== this.selectedItem || trgIndex !== this.prevIndex)) {
8486
- this.select(trgIndex, args.originalEvent);
8552
+ this.selectTab(trgIndex, args.originalEvent, true);
8487
8553
  }
8488
8554
  }
8489
8555
  };
@@ -8498,7 +8564,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8498
8564
  if (e.swipeDirection === 'Right' && this.selectedItem !== 0) {
8499
8565
  for (var k = this.selectedItem - 1; k >= 0; k--) {
8500
8566
  if (!this.tbItem[k].classList.contains(CLS_HIDDEN$1)) {
8501
- this.select(k);
8567
+ this.selectTab(k, null, true);
8502
8568
  break;
8503
8569
  }
8504
8570
  }
@@ -8506,7 +8572,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8506
8572
  else if (e.swipeDirection === 'Left' && (this.selectedItem !== selectAll('.' + CLS_TB_ITEM, this.element).length - 1)) {
8507
8573
  for (var i = this.selectedItem + 1; i < this.tbItem.length; i++) {
8508
8574
  if (!this.tbItem[i].classList.contains(CLS_HIDDEN$1)) {
8509
- this.select(i);
8575
+ this.selectTab(i, null, true);
8510
8576
  break;
8511
8577
  }
8512
8578
  }
@@ -8582,9 +8648,15 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8582
8648
  break;
8583
8649
  }
8584
8650
  };
8585
- Tab.prototype.refreshActElePosition = function () {
8651
+ /**
8652
+ * Refresh the active tab border
8653
+ *
8654
+ * @returns {void}
8655
+ * @private
8656
+ */
8657
+ Tab.prototype.refreshActiveTabBorder = function () {
8586
8658
  var activeEle = select('.' + CLS_TB_ITEM + '.' + CLS_TB_POPUP + '.' + CLS_ACTIVE$1, this.element);
8587
- if (!isNullOrUndefined(activeEle)) {
8659
+ if (!isNullOrUndefined(activeEle) && this.reorderActiveTab) {
8588
8660
  this.select(this.getEleIndex(activeEle));
8589
8661
  }
8590
8662
  this.refreshActiveBorder();
@@ -8927,7 +8999,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8927
8999
  else {
8928
9000
  _this.dragItem.querySelector('.' + CLS_WRAP).style.visibility = '';
8929
9001
  removeClass([_this.tbItems.querySelector('.' + CLS_INDICATOR)], CLS_HIDDEN$1);
8930
- _this.select(_this.droppedIndex);
9002
+ _this.selectTab(_this.droppedIndex, null, true);
8931
9003
  }
8932
9004
  }
8933
9005
  });
@@ -8935,8 +9007,8 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8935
9007
  /**
8936
9008
  * Enables or disables the specified Tab item. On passing value as `false`, the item will be disabled.
8937
9009
  *
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.
9010
+ * @param {number} index - Index value of target Tab item.
9011
+ * @param {boolean} value - Boolean value that determines whether the command should be enabled or disabled.
8940
9012
  * By default, isEnable is true.
8941
9013
  * @returns {void}.
8942
9014
  */
@@ -8965,8 +9037,8 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8965
9037
  /**
8966
9038
  * Adds new items to the Tab that accepts an array as Tab items.
8967
9039
  *
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.
9040
+ * @param {TabItemModel[]} items - An array of item that is added to the Tab.
9041
+ * @param {number} index - Number value that determines where the items to be added. By default, index is 0.
8970
9042
  * @returns {void}.
8971
9043
  */
8972
9044
  Tab.prototype.addTab = function (items, index) {
@@ -9051,7 +9123,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9051
9123
  /**
9052
9124
  * Removes the items in the Tab from the specified index.
9053
9125
  *
9054
- * @param {number} index - Index of target item that is going to be removed.
9126
+ * @param {number} index - Index of target item that is going to be removed.
9055
9127
  * @returns {void}.
9056
9128
  */
9057
9129
  Tab.prototype.removeTab = function (index) {
@@ -9091,8 +9163,8 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9091
9163
  /**
9092
9164
  * Shows or hides the Tab that is in the specified index.
9093
9165
  *
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.
9166
+ * @param {number} index - Index value of target item.
9167
+ * @param {boolean} value - Based on this Boolean value, item will be hide (false) or show (true). By default, value is true.
9096
9168
  * @returns {void}.
9097
9169
  */
9098
9170
  Tab.prototype.hideTab = function (index, value) {
@@ -9152,12 +9224,18 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9152
9224
  this.tbObj.refreshOverflow();
9153
9225
  }
9154
9226
  };
9227
+ Tab.prototype.selectTab = function (args, event, isInteracted) {
9228
+ if (event === void 0) { event = null; }
9229
+ if (isInteracted === void 0) { isInteracted = false; }
9230
+ this.isInteracted = isInteracted;
9231
+ this.select(args, event);
9232
+ };
9155
9233
  /**
9156
9234
  * Specifies the index or HTMLElement to select an item from the Tab.
9157
9235
  *
9158
- * @param {number | HTMLElement} args - Index or DOM element is used for selecting an item from the Tab.
9236
+ * @param {number | HTMLElement} args - Index or DOM element is used for selecting an item from the Tab.
9159
9237
  * @param {Event} event - An event which takes place in DOM.
9160
- * @returns {void}.
9238
+ * @returns {void}
9161
9239
  */
9162
9240
  Tab.prototype.select = function (args, event) {
9163
9241
  var _this = this;
@@ -9195,20 +9273,22 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9195
9273
  selectingContent: !isNullOrUndefined(this.content) ?
9196
9274
  select('#' + CLS_CONTENT$1 + this.tabId + '_' + this.selectingID, this.content) : null,
9197
9275
  isSwiped: this.isSwipeed,
9276
+ isInteracted: this.isInteracted,
9198
9277
  cancel: false
9199
9278
  };
9200
9279
  if (!this.initRender) {
9201
9280
  this.trigger('selecting', eventArg, function (selectArgs) {
9202
9281
  if (!selectArgs.cancel) {
9203
- _this.selectingContent(args);
9282
+ _this.selectingContent(args, _this.isInteracted);
9204
9283
  }
9205
9284
  });
9206
9285
  }
9207
9286
  else {
9208
- this.selectingContent(args);
9287
+ this.selectingContent(args, this.isInteracted);
9209
9288
  }
9289
+ this.isInteracted = false;
9210
9290
  };
9211
- Tab.prototype.selectingContent = function (args) {
9291
+ Tab.prototype.selectingContent = function (args, isInteracted) {
9212
9292
  if (typeof args === 'number') {
9213
9293
  if (!isNullOrUndefined(this.tbItem[args]) && (this.tbItem[args].classList.contains(CLS_DISABLE$4) ||
9214
9294
  this.tbItem[args].classList.contains(CLS_HIDDEN$1))) {
@@ -9224,8 +9304,8 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9224
9304
  }
9225
9305
  if (this.tbItem.length > args && args >= 0 && !isNaN(args)) {
9226
9306
  this.prevIndex = this.selectedItem;
9227
- if (this.tbItem[args].classList.contains(CLS_TB_POPUP)) {
9228
- this.setActive(this.popupHandler(this.tbItem[args]));
9307
+ if (this.tbItem[args].classList.contains(CLS_TB_POPUP) && this.reorderActiveTab) {
9308
+ this.setActive(this.popupHandler(this.tbItem[args]), null, isInteracted);
9229
9309
  if ((!isNullOrUndefined(this.items) && this.items.length > 0) && this.allowDragAndDrop) {
9230
9310
  this.tbItem = selectAll('.' + CLS_TB_ITEMS + ' .' + CLS_TB_ITEM, this.hdrEle);
9231
9311
  var item = this.items[args];
@@ -9234,15 +9314,15 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9234
9314
  }
9235
9315
  }
9236
9316
  else {
9237
- this.setActive(args);
9317
+ this.setActive(args, null, isInteracted);
9238
9318
  }
9239
9319
  }
9240
9320
  else {
9241
- this.setActive(0);
9321
+ this.setActive(0, null, isInteracted);
9242
9322
  }
9243
9323
  }
9244
9324
  else if (args instanceof (HTMLElement)) {
9245
- this.setActive(this.getEleIndex(args));
9325
+ this.setActive(this.getEleIndex(args), null, isInteracted);
9246
9326
  }
9247
9327
  };
9248
9328
  /**
@@ -9325,6 +9405,9 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9325
9405
  case 'showCloseButton':
9326
9406
  this.setCloseButton(newProp.showCloseButton);
9327
9407
  break;
9408
+ case 'reorderActiveTab':
9409
+ this.refreshActiveTabBorder();
9410
+ break;
9328
9411
  case 'selectedItem':
9329
9412
  this.selectedItem = oldProp.selectedItem;
9330
9413
  this.select(newProp.selectedItem);
@@ -9338,7 +9421,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9338
9421
  case 'overflowMode':
9339
9422
  this.tbObj.overflowMode = newProp.overflowMode;
9340
9423
  this.tbObj.dataBind();
9341
- this.refreshActElePosition();
9424
+ this.refreshActiveTabBorder();
9342
9425
  break;
9343
9426
  case 'heightAdjustMode':
9344
9427
  this.setContentHeight(false);
@@ -9517,6 +9600,9 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9517
9600
  __decorate$7([
9518
9601
  Property(false)
9519
9602
  ], Tab.prototype, "showCloseButton", void 0);
9603
+ __decorate$7([
9604
+ Property(true)
9605
+ ], Tab.prototype, "reorderActiveTab", void 0);
9520
9606
  __decorate$7([
9521
9607
  Property()
9522
9608
  ], Tab.prototype, "scrollStep", void 0);
@@ -9597,6 +9683,8 @@ var COLLAPSIBLE = 'e-icon-collapsible';
9597
9683
  var EXPANDABLE = 'e-icon-expandable';
9598
9684
  var LISTITEM = 'e-list-item';
9599
9685
  var LISTTEXT = 'e-list-text';
9686
+ var LISTWRAP = 'e-text-wrap';
9687
+ var IELISTWRAP = 'e-ie-wrap';
9600
9688
  var PARENTITEM = 'e-list-parent';
9601
9689
  var HOVER = 'e-hover';
9602
9690
  var ACTIVE = 'e-active';
@@ -9765,6 +9853,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
9765
9853
  _this.isFieldChange = false;
9766
9854
  _this.changeDataSource = false;
9767
9855
  _this.hasTemplate = false;
9856
+ _this.isFirstRender = false;
9768
9857
  _this.mouseDownStatus = false;
9769
9858
  return _this;
9770
9859
  }
@@ -9890,6 +9979,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
9890
9979
  this.setCssClass(null, this.cssClass);
9891
9980
  this.setEnableRtl();
9892
9981
  this.setFullRow(this.fullRowSelect);
9982
+ this.setTextWrap();
9893
9983
  this.nodeTemplateFn = this.templateComplier(this.nodeTemplate);
9894
9984
  };
9895
9985
  TreeView.prototype.setDisabledMode = function () {
@@ -10878,11 +10968,36 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
10878
10968
  addClass([firstNode], FOCUS);
10879
10969
  this.updateIdAttr(null, firstNode);
10880
10970
  }
10971
+ if (this.allowTextWrap) {
10972
+ this.updateWrap();
10973
+ }
10881
10974
  this.renderReactTemplates();
10882
10975
  this.hasPid = this.rootData[0] ? this.rootData[0].hasOwnProperty(this.fields.parentID) : false;
10883
10976
  this.doExpandAction();
10884
10977
  }
10885
10978
  };
10979
+ TreeView.prototype.setTextWrap = function () {
10980
+ (this.allowTextWrap ? addClass : removeClass)([this.element], LISTWRAP);
10981
+ if (Browser.isIE) {
10982
+ (this.allowTextWrap ? addClass : removeClass)([this.element], IELISTWRAP);
10983
+ }
10984
+ };
10985
+ TreeView.prototype.updateWrap = function (ulEle) {
10986
+ if (!this.fullRowSelect) {
10987
+ return;
10988
+ }
10989
+ var liEle = ulEle ? selectAll('.' + LISTITEM, ulEle) : this.liList;
10990
+ var length = liEle.length;
10991
+ for (var i = 0; i < length; i++) {
10992
+ this.calculateWrap(liEle[i]);
10993
+ }
10994
+ };
10995
+ TreeView.prototype.calculateWrap = function (liEle) {
10996
+ var element = select('.' + FULLROW, liEle);
10997
+ if (element && element.nextElementSibling) {
10998
+ element.style.height = this.allowTextWrap ? element.nextElementSibling.offsetHeight + 'px' : '';
10999
+ }
11000
+ };
10886
11001
  TreeView.prototype.doExpandAction = function () {
10887
11002
  var eUids = this.expandedNodes;
10888
11003
  if (this.isInitalExpand && eUids.length > 0) {
@@ -11119,6 +11234,10 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11119
11234
  currLi.style.height = '';
11120
11235
  removeClass([icon], PROCESS);
11121
11236
  this.addExpand(currLi);
11237
+ if (this.allowTextWrap && this.isLoaded && this.isFirstRender) {
11238
+ this.updateWrap(currLi);
11239
+ this.isFirstRender = false;
11240
+ }
11122
11241
  if (this.isLoaded && this.expandArgs && !this.isRefreshed) {
11123
11242
  this.expandArgs = this.getExpandEvent(currLi, null);
11124
11243
  this.trigger('nodeExpanded', this.expandArgs);
@@ -11627,6 +11746,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11627
11746
  this.expandNode(currLi, icon);
11628
11747
  }
11629
11748
  else {
11749
+ this.isFirstRender = true;
11630
11750
  this.renderChildNodes(currLi, expandChild, callback);
11631
11751
  var liEles = selectAll('.' + LISTITEM, currLi);
11632
11752
  for (var i = 0; i < liEles.length; i++) {
@@ -12323,6 +12443,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
12323
12443
  removeClass([liEle], EDITING);
12324
12444
  txtEle.focus();
12325
12445
  }
12446
+ if (this.allowTextWrap) {
12447
+ this.calculateWrap(liEle);
12448
+ }
12326
12449
  };
12327
12450
  TreeView.prototype.getElement = function (ele) {
12328
12451
  if (isNullOrUndefined(ele)) {
@@ -13917,6 +14040,10 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
13917
14040
  this.setMultiSelect(this.allowMultiSelection);
13918
14041
  this.addMultiSelect(this.allowMultiSelection);
13919
14042
  break;
14043
+ case 'allowTextWrap':
14044
+ this.setTextWrap();
14045
+ this.updateWrap();
14046
+ break;
13920
14047
  case 'checkedNodes':
13921
14048
  if (this.showCheckBox) {
13922
14049
  this.checkedNodes = oldProp.checkedNodes;
@@ -13968,6 +14095,10 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
13968
14095
  case 'fullRowSelect':
13969
14096
  this.setFullRow(this.fullRowSelect);
13970
14097
  this.addFullRow(this.fullRowSelect);
14098
+ if (this.allowTextWrap) {
14099
+ this.setTextWrap();
14100
+ this.updateWrap();
14101
+ }
13971
14102
  break;
13972
14103
  case 'loadOnDemand':
13973
14104
  if (this.loadOnDemand === false && !this.onLoaded) {
@@ -14407,6 +14538,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
14407
14538
  __decorate$8([
14408
14539
  Property(false)
14409
14540
  ], TreeView.prototype, "allowMultiSelection", void 0);
14541
+ __decorate$8([
14542
+ Property(false)
14543
+ ], TreeView.prototype, "allowTextWrap", void 0);
14410
14544
  __decorate$8([
14411
14545
  Complex({}, NodeAnimationSettings)
14412
14546
  ], TreeView.prototype, "animation", void 0);
@@ -14791,7 +14925,7 @@ var Sidebar = /** @__PURE__ @class */ (function (_super) {
14791
14925
  Sidebar.prototype.setTimeOut = function () {
14792
14926
  var sibling = document.querySelector('.e-main-content') || this.targetEle;
14793
14927
  var elementWidth = this.element.getBoundingClientRect().width;
14794
- if (this.element.classList.contains(OPEN) && sibling) {
14928
+ if (this.element.classList.contains(OPEN) && sibling && !(this.type === 'Over' && this.enableDock)) {
14795
14929
  if (this.position === 'Left') {
14796
14930
  sibling.style.marginLeft = this.setDimension(this.width === 'auto' ? elementWidth : this.width);
14797
14931
  }
@@ -15100,7 +15234,7 @@ var Sidebar = /** @__PURE__ @class */ (function (_super) {
15100
15234
  var sibling = document.querySelector('.e-main-content') || this.targetEle;
15101
15235
  if (sibling) {
15102
15236
  sibling.style.transform = 'translateX(' + 0 + 'px)';
15103
- if (!Browser.isDevice && this.type !== 'Auto') {
15237
+ if (!Browser.isDevice && this.type !== 'Auto' && !(this.type === 'Over' && this.enableDock)) {
15104
15238
  sibling.style[this.position === 'Left' ? 'marginLeft' : 'marginRight'] = '0px';
15105
15239
  }
15106
15240
  }
@@ -15122,9 +15256,9 @@ var Sidebar = /** @__PURE__ @class */ (function (_super) {
15122
15256
  break;
15123
15257
  case 'Over':
15124
15258
  addClass([this.element], [OVER]);
15125
- if (this.enableDock && this.element.classList.contains(CLOSE)) {
15259
+ if (this.enableDock && (this.element.classList.contains(CLOSE) || this.isOpen)) {
15126
15260
  if (sibling) {
15127
- sibling.style[this.position === 'Left' ? 'marginLeft' : 'marginRight'] = margin;
15261
+ sibling.style[this.position === 'Left' ? 'marginLeft' : 'marginRight'] = this.setDimension(this.dockSize);
15128
15262
  }
15129
15263
  }
15130
15264
  break;
@@ -15279,6 +15413,15 @@ var __decorate$10 = (undefined && undefined.__decorate) || function (decorators,
15279
15413
  var ICONRIGHT = 'e-icon-right';
15280
15414
  var ITEMTEXTCLASS = 'e-breadcrumb-text';
15281
15415
  var ICONCLASS = 'e-breadcrumb-icon';
15416
+ var MENUCLASS = 'e-breadcrumb-menu';
15417
+ var ITEMCLASS = 'e-breadcrumb-item';
15418
+ var POPUPCLASS = 'e-breadcrumb-popup';
15419
+ var WRAPMODECLASS = 'e-breadcrumb-wrap-mode';
15420
+ var SCROLLMODECLASS = 'e-breadcrumb-scroll-mode';
15421
+ var TABINDEX = 'tabindex';
15422
+ var DISABLEDCLASS = 'e-disabled';
15423
+ var ARIADISABLED = 'aria-disabled';
15424
+ var DOT = '.';
15282
15425
  var BreadcrumbItem = /** @__PURE__ @class */ (function (_super) {
15283
15426
  __extends$10(BreadcrumbItem, _super);
15284
15427
  function BreadcrumbItem() {
@@ -15293,6 +15436,9 @@ var BreadcrumbItem = /** @__PURE__ @class */ (function (_super) {
15293
15436
  __decorate$10([
15294
15437
  Property(null)
15295
15438
  ], BreadcrumbItem.prototype, "iconCss", void 0);
15439
+ __decorate$10([
15440
+ Property(false)
15441
+ ], BreadcrumbItem.prototype, "disabled", void 0);
15296
15442
  return BreadcrumbItem;
15297
15443
  }(ChildProperty));
15298
15444
  /**
@@ -15347,20 +15493,49 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15347
15493
  if (this.enableRtl) {
15348
15494
  this.element.classList.add('e-rtl');
15349
15495
  }
15350
- this.setWidth();
15496
+ if (this.disabled) {
15497
+ this.element.classList.add(DISABLEDCLASS);
15498
+ this.element.setAttribute(ARIADISABLED, 'true');
15499
+ }
15500
+ if (this.overflowMode === 'Wrap') {
15501
+ this.element.classList.add(WRAPMODECLASS);
15502
+ }
15503
+ else if (this.overflowMode === 'Scroll') {
15504
+ this.element.classList.add(SCROLLMODECLASS);
15505
+ }
15351
15506
  this.initItems();
15352
15507
  this.initPvtProps();
15353
15508
  };
15354
15509
  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;
15510
+ if (this.overflowMode === 'Hidden' && this._maxItems > 0) {
15511
+ this.endIndex = this.getEndIndex();
15512
+ this.startIndex = this.endIndex + 1 - (this._maxItems - 1);
15513
+ }
15514
+ if (this.overflowMode === 'Menu') {
15515
+ if (this._maxItems >= 0) {
15516
+ this.startIndex = this._maxItems > 1 ? 1 : 0;
15517
+ this.endIndex = this.getEndIndex();
15518
+ this.popupUl = this.createElement('ul', { attrs: { TABINDEX: '0', 'role': 'menu' } });
15519
+ }
15520
+ else {
15521
+ this.startIndex = this.endIndex = null;
15522
+ }
15358
15523
  }
15359
15524
  };
15360
- Breadcrumb.prototype.setWidth = function () {
15361
- if (this.width) {
15362
- this.element.style.width = this.width;
15525
+ Breadcrumb.prototype.getEndIndex = function () {
15526
+ var _this = this;
15527
+ var endIndex;
15528
+ if (this.activeItem) {
15529
+ this.items.forEach(function (item, idx) {
15530
+ if (item.url === _this.activeItem || item.text === _this.activeItem) {
15531
+ endIndex = idx;
15532
+ }
15533
+ });
15534
+ }
15535
+ else {
15536
+ endIndex = this.items.length - 1;
15363
15537
  }
15538
+ return endIndex;
15364
15539
  };
15365
15540
  Breadcrumb.prototype.initItems = function () {
15366
15541
  if (!this.items.length) {
@@ -15368,7 +15543,7 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15368
15543
  var uri = void 0;
15369
15544
  var items = [];
15370
15545
  if (this.url) {
15371
- var url = new URL(this.url);
15546
+ var url = new URL(this.url, window.location.origin);
15372
15547
  baseUri = url.origin + '/';
15373
15548
  uri = url.href.split(baseUri)[1].split('/');
15374
15549
  }
@@ -15395,13 +15570,19 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15395
15570
  if (itemsLength) {
15396
15571
  var isActiveItem = void 0;
15397
15572
  var isLastItem = void 0;
15573
+ var isLastItemInPopup_1;
15398
15574
  var j_1 = 0;
15575
+ var wrapDiv = void 0;
15399
15576
  var len = (itemsLength * 2) - 1;
15400
- var ol = this.createElement('ol');
15577
+ var isItemCancelled_1 = false;
15578
+ var ol = this.createElement('ol', { className: this.overflowMode === 'Wrap' ? 'e-breadcrumb-wrapped-ol' : '' });
15579
+ var firstOl = this.createElement('ol', { className: this.overflowMode === 'Wrap' ? 'e-breadcrumb-first-ol' : '' });
15401
15580
  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);
15581
+ var isCollasped = (this.overflowMode === 'Collapsed' && this._maxItems > 0 && itemsLength > this._maxItems && !this.isExpanded);
15582
+ var isDefaultOverflowMode_1 = (this.overflowMode === 'Hidden' && this._maxItems > 0);
15583
+ if (this.overflowMode === 'Menu' && this.popupUl) {
15584
+ this.popupUl.innerHTML = '';
15585
+ }
15405
15586
  var listBaseOptions = {
15406
15587
  moduleName: this.getModuleName(),
15407
15588
  showIcon: showIcon,
@@ -15410,7 +15591,9 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15410
15591
  var isLastItem = args.curData.isLastItem;
15411
15592
  if (isLastItem && args.item.children.length && !_this.itemTemplate) {
15412
15593
  delete args.curData.isLastItem;
15413
- args.item.innerHTML = _this.createElement('span', { className: ITEMTEXTCLASS, innerHTML: args.item.children[0].innerHTML }).outerHTML;
15594
+ if (!isLastItemInPopup_1 && !_this.enableActiveItemNavigation) {
15595
+ args.item.innerHTML = _this.createElement('span', { className: ITEMTEXTCLASS, innerHTML: args.item.children[0].innerHTML }).outerHTML;
15596
+ }
15414
15597
  }
15415
15598
  if (args.curData.iconCss && !args.curData.text && !_this.itemTemplate) {
15416
15599
  args.item.classList.add('e-icon-item');
@@ -15418,41 +15601,40 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15418
15601
  if (isDefaultOverflowMode_1) {
15419
15602
  args.item.setAttribute('item-index', j_1.toString());
15420
15603
  }
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
15604
  var eventArgs = {
15430
15605
  item: extend({}, args.curData.properties ?
15431
- args.curData.properties : args.curData), element: args.item
15606
+ args.curData.properties : args.curData), element: args.item, cancel: false
15432
15607
  };
15433
15608
  _this.trigger('beforeItemRender', eventArgs);
15434
- var isItemDisabled = isDisabled_1 || eventArgs.element.classList.contains('e-disabled');
15609
+ isItemCancelled_1 = eventArgs.cancel;
15435
15610
  var containsRightIcon = (isIconRight || eventArgs.element.classList.contains(ICONRIGHT));
15436
15611
  if (containsRightIcon && args.curData.iconCss && !_this.itemTemplate) {
15437
- args.item.querySelector('.e-anchor-wrap').append(args.item.querySelector('.' + ICONCLASS));
15612
+ args.item.querySelector('.e-anchor-wrap').appendChild(args.item.querySelector(DOT + ICONCLASS));
15613
+ }
15614
+ if (eventArgs.item.disabled) {
15615
+ args.item.setAttribute(ARIADISABLED, 'true');
15616
+ args.item.classList.add(DISABLEDCLASS);
15438
15617
  }
15439
- if (isItemDisabled) {
15440
- args.item.setAttribute('aria-disabled', 'true');
15618
+ if ((eventArgs.item.disabled || _this.disabled) && args.item.children.length && !_this.itemTemplate) {
15619
+ args.item.children[0].setAttribute(TABINDEX, '-1');
15441
15620
  }
15442
15621
  if (args.curData.isEmptyUrl) {
15443
15622
  args.item.children[0].removeAttribute('href');
15444
- if ((!isLastItem || (isLastItem && _this.enableActiveItemNavigation)) && !isItemDisabled) {
15445
- args.item.children[0].setAttribute('tabindex', '0');
15623
+ if ((!isLastItem || (isLastItem && _this.enableActiveItemNavigation)) && !(eventArgs.item.disabled || _this.disabled)) {
15624
+ args.item.children[0].setAttribute(TABINDEX, '0');
15446
15625
  EventHandler.add(args.item.children[0], 'keydown', _this.keyDownHandler, _this);
15447
15626
  }
15448
15627
  }
15628
+ if (isLastItem) {
15629
+ args.item.setAttribute('data-active-item', '');
15630
+ }
15449
15631
  if (!_this.itemTemplate) {
15450
15632
  _this.beforeItemRenderChanges(args.curData, eventArgs.item, args.item, containsRightIcon);
15451
15633
  }
15452
15634
  }
15453
15635
  };
15454
15636
  for (var i = 0; i < len; i % 2 && j_1++, i++) {
15455
- isActiveItem = (this.activeItem && this.activeItem === items[j_1].url);
15637
+ isActiveItem = (this.activeItem && (this.activeItem === items[j_1].url || this.activeItem === items[j_1].text));
15456
15638
  if (isCollasped && i > 1 && i < len - 2) {
15457
15639
  continue;
15458
15640
  }
@@ -15462,10 +15644,11 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15462
15644
  }
15463
15645
  if (i % 2) {
15464
15646
  // separator item
15647
+ wrapDiv = this.createElement('div', { className: 'e-breadcrumb-item-wrapper' });
15465
15648
  listBaseOptions.template = this.separatorTemplate ? this.separatorTemplate : '/';
15466
15649
  listBaseOptions.itemClass = 'e-breadcrumb-separator';
15467
15650
  isSingleLevel = false;
15468
- item = [{ previousItem: item.pop(), nextItem: items[j_1] }];
15651
+ item = [{ previousItem: items[j_1], nextItem: items[j_1 + 1] }];
15469
15652
  }
15470
15653
  else {
15471
15654
  // list item
@@ -15482,47 +15665,129 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15482
15665
  if (!item[0].url && !this.itemTemplate) {
15483
15666
  item = [extend({}, item[0], { isEmptyUrl: true, url: '#' })];
15484
15667
  }
15485
- isLastItem = isDefaultOverflowMode_1 && (j_1 === this.endIndex);
15486
- if ((((i === len - 1 || isLastItem) && !this.itemTemplate) || isActiveItem) && !this.enableActiveItemNavigation) {
15668
+ isLastItem = (isDefaultOverflowMode_1 || this.overflowMode === 'Menu') && (j_1 === this.endIndex);
15669
+ if (((i === len - 1 || isLastItem) && !this.itemTemplate) || isActiveItem) {
15487
15670
  item[0].isLastItem = true;
15488
15671
  }
15489
15672
  }
15490
- append(ListBase.createList(this.createElement, item, listBaseOptions, isSingleLevel, this)
15491
- .childNodes, ol);
15673
+ var parent_1 = ol;
15674
+ var lastPopupItemIdx = this.startIndex + this.endIndex - this._maxItems;
15675
+ 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)) {
15676
+ if (i % 2) {
15677
+ continue;
15678
+ }
15679
+ else {
15680
+ parent_1 = this.popupUl;
15681
+ if (isLastItem) {
15682
+ isLastItemInPopup_1 = true;
15683
+ }
15684
+ }
15685
+ }
15686
+ else if (this.overflowMode === 'Wrap') {
15687
+ if (i === 0) {
15688
+ parent_1 = firstOl;
15689
+ }
15690
+ else {
15691
+ parent_1 = wrapDiv;
15692
+ }
15693
+ }
15694
+ var li = ListBase.createList(this.createElement, item, listBaseOptions, isSingleLevel, this).childNodes;
15695
+ if (!isItemCancelled_1) {
15696
+ append(li, parent_1);
15697
+ }
15698
+ else if (isDefaultOverflowMode_1 || isCollasped || this.overflowMode === 'Menu' || this.overflowMode === 'Wrap') {
15699
+ items.splice(j_1, 1);
15700
+ this.initPvtProps();
15701
+ return this.reRenderItems();
15702
+ }
15703
+ else if ((i === len - 1 || isLastItem)) {
15704
+ remove(parent_1.lastElementChild);
15705
+ }
15706
+ if (this.overflowMode === 'Wrap' && i !== 0 && i % 2 === 0) {
15707
+ ol.appendChild(wrapDiv);
15708
+ }
15492
15709
  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);
15710
+ var li_1 = this.createElement('li', { className: 'e-icons e-breadcrumb-collapsed', attrs: { TABINDEX: '0' } });
15711
+ EventHandler.add(li_1, 'keyup', this.expandHandler, this);
15712
+ ol.appendChild(li_1);
15713
+ }
15714
+ if (this.overflowMode === 'Menu' && this.startIndex === i && this.endIndex >= this._maxItems && this._maxItems >= 0) {
15715
+ var menu = this.getMenuElement();
15716
+ EventHandler.add(menu, 'keyup', this.keyDownHandler, this);
15717
+ ol.appendChild(menu);
15496
15718
  }
15497
15719
  if (isActiveItem || isLastItem) {
15498
15720
  break;
15499
15721
  }
15722
+ if (isItemCancelled_1) {
15723
+ i++;
15724
+ }
15500
15725
  }
15501
15726
  if (this.isReact) {
15502
15727
  this.renderReactTemplates();
15503
15728
  }
15504
- this.element.append(ol);
15729
+ if (this.overflowMode === 'Wrap') {
15730
+ this.element.appendChild(firstOl);
15731
+ }
15732
+ this.element.appendChild(ol);
15505
15733
  this.calculateMaxItems();
15506
15734
  }
15507
15735
  };
15508
15736
  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;
15737
+ if (this.overflowMode === 'Hidden' || this.overflowMode === 'Collapsed' || this.overflowMode === 'Menu') {
15738
+ var maxItems = void 0;
15739
+ var width = this.element.offsetWidth;
15740
+ var liElems = [].slice.call(this.element.children[0].children).reverse();
15741
+ var liWidth = this.overflowMode === 'Menu' ? 0 : liElems[liElems.length - 1].offsetWidth + (liElems[liElems.length - 2] ? liElems[liElems.length - 2].offsetWidth : 0);
15742
+ if (this.overflowMode === 'Menu') {
15743
+ var menuEle = this.getMenuElement();
15744
+ this.element.appendChild(menuEle);
15745
+ liWidth += menuEle.offsetWidth;
15746
+ remove(menuEle);
15747
+ }
15748
+ for (var i = 0; i < liElems.length - 2; i++) {
15749
+ if (liWidth > width) {
15750
+ maxItems = Math.ceil((i - 1) / 2) + ((this.overflowMode === 'Menu' && i <= 2) ? 0 : 1);
15751
+ if (((this.maxItems > maxItems && !(this.maxItems > -1 && maxItems == -1)) || this.maxItems == -1) && this._maxItems != maxItems) {
15752
+ this._maxItems = maxItems;
15517
15753
  this.initPvtProps();
15518
15754
  return this.reRenderItems();
15519
15755
  }
15520
15756
  else {
15757
+ break;
15758
+ }
15759
+ }
15760
+ else {
15761
+ if (this.overflowMode === 'Menu' && i === 2) {
15762
+ liWidth += liElems[liElems.length - 1].offsetWidth + liElems[liElems.length - 2].offsetWidth;
15763
+ if (liWidth > width) {
15764
+ this._maxItems = 1;
15765
+ this.initPvtProps();
15766
+ return this.reRenderItems();
15767
+ }
15768
+ }
15769
+ if (!(this.overflowMode === 'Menu' && liElems[i].classList.contains(MENUCLASS))) {
15521
15770
  liWidth += liElems[i].offsetWidth;
15522
15771
  }
15523
15772
  }
15524
15773
  }
15525
15774
  }
15775
+ else if ((this.overflowMode === 'Wrap' || this.overflowMode === 'Scroll') && this._maxItems > 0) {
15776
+ var width = 0;
15777
+ var liElems = this.element.querySelectorAll(DOT + ITEMCLASS);
15778
+ if (liElems.length > this._maxItems + this._maxItems - 1) {
15779
+ for (var i = this.overflowMode === 'Wrap' ? 1 : 0; i < this._maxItems + this._maxItems - 1; i++) {
15780
+ width += liElems[i].offsetWidth;
15781
+ }
15782
+ width = width + 5 + (parseInt(getComputedStyle(this.element.children[0]).paddingLeft, 10) * 2);
15783
+ if (this.overflowMode === 'Wrap') {
15784
+ this.element.querySelector('.e-breadcrumb-wrapped-ol').style.width = width + 'px';
15785
+ }
15786
+ else {
15787
+ this.element.style.width = width + 'px';
15788
+ }
15789
+ }
15790
+ }
15526
15791
  };
15527
15792
  Breadcrumb.prototype.hasField = function (items, field) {
15528
15793
  for (var i = 0, len = items.length; i < len; i++) {
@@ -15532,6 +15797,9 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15532
15797
  }
15533
15798
  return false;
15534
15799
  };
15800
+ Breadcrumb.prototype.getMenuElement = function () {
15801
+ return this.createElement('li', { className: 'e-icons e-breadcrumb-menu', attrs: { TABINDEX: '0' } });
15802
+ };
15535
15803
  Breadcrumb.prototype.beforeItemRenderChanges = function (prevItem, currItem, elem, isRightIcon) {
15536
15804
  var wrapElem = elem.querySelector('.e-anchor-wrap');
15537
15805
  if (currItem.text !== prevItem.text) {
@@ -15541,15 +15809,15 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15541
15809
  }
15542
15810
  });
15543
15811
  }
15544
- if (currItem.iconCss !== prevItem.iconCss) {
15545
- var iconElem = elem.querySelector('.' + ICONCLASS);
15812
+ if (currItem.iconCss !== prevItem.iconCss && wrapElem) { // wrapElem - for checking it is item not a separator
15813
+ var iconElem = elem.querySelector(DOT + ICONCLASS);
15546
15814
  if (iconElem) {
15547
15815
  if (currItem.iconCss) {
15548
15816
  removeClass([iconElem], prevItem.iconCss.split(' '));
15549
15817
  addClass([iconElem], currItem.iconCss.split(' '));
15550
15818
  }
15551
15819
  else {
15552
- iconElem.remove();
15820
+ remove(iconElem);
15553
15821
  }
15554
15822
  }
15555
15823
  else if (currItem.iconCss) {
@@ -15579,31 +15847,86 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15579
15847
  this.renderItems(this.items);
15580
15848
  };
15581
15849
  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) {
15850
+ var li = closest(e.target, DOT + ITEMCLASS + ':not(.e-breadcrumb-separator)');
15851
+ if (!this.enableNavigation) {
15852
+ e.preventDefault();
15853
+ }
15854
+ if (li && (closest(e.target, DOT + ITEMTEXTCLASS) || this.itemTemplate)) {
15855
+ var idx = void 0;
15856
+ if (this.overflowMode === 'Wrap') {
15857
+ idx = [].slice.call(this.element.querySelectorAll(DOT + ITEMCLASS)).indexOf(li);
15858
+ }
15859
+ else {
15860
+ idx = [].slice.call(li.parentElement.children).indexOf(li);
15861
+ }
15862
+ if (this.overflowMode === 'Menu') {
15863
+ if (closest(e.target, DOT + POPUPCLASS)) {
15864
+ idx += this.startIndex;
15865
+ this.endIndex = idx;
15866
+ if (e.type === 'keydown') {
15867
+ this.documentClickHandler(e);
15868
+ }
15869
+ }
15870
+ else if (this.element.querySelector(DOT + MENUCLASS)) {
15871
+ if (idx > [].slice.call(this.element.children[0].children).indexOf(this.element.querySelector(DOT + MENUCLASS))) {
15872
+ idx += (this.popupUl.childElementCount * 2) - 2;
15873
+ idx = Math.floor(idx / 2);
15874
+ this.endIndex = idx;
15875
+ }
15876
+ else {
15877
+ this.startIndex = this.endIndex = idx;
15878
+ }
15879
+ }
15880
+ else {
15881
+ idx = Math.floor(idx / 2);
15882
+ this.startIndex = this.endIndex = idx;
15883
+ }
15884
+ }
15885
+ else {
15886
+ idx = Math.floor(idx / 2);
15887
+ }
15888
+ if (this.overflowMode === 'Hidden' && this._maxItems > 0 && this.endIndex !== 0) {
15587
15889
  idx = parseInt(li.getAttribute('item-index'), 10);
15588
15890
  if (this.startIndex > 1) {
15589
15891
  this.startIndex -= (this.endIndex - idx);
15590
15892
  }
15591
15893
  this.endIndex = idx;
15592
- this.reRenderItems();
15593
15894
  }
15594
15895
  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();
15896
+ this.activeItem = this.items[idx].url || this.items[idx].text;
15897
+ this.dataBind();
15602
15898
  }
15603
15899
  if (e.target.classList.contains('e-breadcrumb-collapsed')) {
15604
15900
  this.isExpanded = true;
15605
15901
  this.reRenderItems();
15606
15902
  }
15903
+ if (e.target.classList.contains(MENUCLASS)) {
15904
+ this.renderPopup();
15905
+ }
15906
+ };
15907
+ Breadcrumb.prototype.renderPopup = function () {
15908
+ var _this = this;
15909
+ var wrapper = this.createElement('div', { className: POPUPCLASS + ' ' + this.cssClass + (this.enableRtl ? ' e-rtl' : '') });
15910
+ document.body.appendChild(wrapper);
15911
+ this.popupObj = new Popup(wrapper, {
15912
+ content: this.popupUl,
15913
+ relateTo: this.element.querySelector(DOT + MENUCLASS),
15914
+ enableRtl: this.enableRtl,
15915
+ position: { X: 'left', Y: 'bottom' },
15916
+ collision: { X: 'fit', Y: 'flip' },
15917
+ open: function () {
15918
+ _this.popupUl.focus();
15919
+ }
15920
+ });
15921
+ this.popupWireEvents();
15922
+ this.popupObj.show();
15923
+ };
15924
+ Breadcrumb.prototype.documentClickHandler = function (e) {
15925
+ if (this.overflowMode === 'Menu' && this.popupObj && this.popupObj.element.classList.contains('e-popup-open') && !closest(e.target, DOT + MENUCLASS)) {
15926
+ this.popupObj.hide();
15927
+ this.popupObj.destroy();
15928
+ detach(this.popupObj.element);
15929
+ }
15607
15930
  };
15608
15931
  Breadcrumb.prototype.resize = function () {
15609
15932
  this._maxItems = this.maxItems;
@@ -15621,6 +15944,11 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15621
15944
  this.clickHandler(e);
15622
15945
  }
15623
15946
  };
15947
+ Breadcrumb.prototype.popupKeyDownHandler = function (e) {
15948
+ if (e.key === 'Escape') {
15949
+ this.documentClickHandler(e);
15950
+ }
15951
+ };
15624
15952
  /**
15625
15953
  * Called internally if any of the property value changed.
15626
15954
  *
@@ -15633,26 +15961,37 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15633
15961
  for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
15634
15962
  var prop = _a[_i];
15635
15963
  switch (prop) {
15636
- case 'activeItem':
15637
15964
  case 'items':
15638
15965
  case 'enableActiveItemNavigation':
15639
15966
  this.reRenderItems();
15640
15967
  break;
15968
+ case 'activeItem':
15969
+ this._maxItems = this.maxItems;
15970
+ this.initPvtProps();
15971
+ this.reRenderItems();
15972
+ break;
15641
15973
  case 'overflowMode':
15642
15974
  case 'maxItems':
15975
+ this._maxItems = this.maxItems;
15643
15976
  this.initPvtProps();
15644
15977
  this.reRenderItems();
15978
+ if (oldProp.overflowMode === 'Wrap') {
15979
+ this.element.classList.remove(WRAPMODECLASS);
15980
+ }
15981
+ else if (newProp.overflowMode === 'Wrap') {
15982
+ this.element.classList.add(WRAPMODECLASS);
15983
+ }
15984
+ if (oldProp.overflowMode === 'Scroll') {
15985
+ this.element.classList.remove(SCROLLMODECLASS);
15986
+ }
15987
+ else if (newProp.overflowMode === 'Scroll') {
15988
+ this.element.classList.add(SCROLLMODECLASS);
15989
+ }
15645
15990
  break;
15646
15991
  case 'url':
15647
15992
  this.initItems();
15648
15993
  this.reRenderItems();
15649
15994
  break;
15650
- case 'width':
15651
- this.setWidth();
15652
- this._maxItems = this.maxItems;
15653
- this.initPvtProps();
15654
- this.reRenderItems();
15655
- break;
15656
15995
  case 'cssClass':
15657
15996
  if (oldProp.cssClass) {
15658
15997
  removeClass([this.element], oldProp.cssClass.split(' '));
@@ -15669,16 +16008,31 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15669
16008
  case 'enableRtl':
15670
16009
  this.element.classList.toggle('e-rtl');
15671
16010
  break;
16011
+ case 'disabled':
16012
+ this.element.classList.toggle(DISABLEDCLASS);
16013
+ this.element.setAttribute(ARIADISABLED, newProp.disabled + '');
16014
+ break;
15672
16015
  }
15673
16016
  }
15674
16017
  };
15675
16018
  Breadcrumb.prototype.wireEvents = function () {
16019
+ this.delegateClickHanlder = this.documentClickHandler.bind(this);
16020
+ EventHandler.add(document, 'click', this.delegateClickHanlder, this);
15676
16021
  EventHandler.add(this.element, 'click', this.clickHandler, this);
15677
16022
  window.addEventListener('resize', this.resize.bind(this));
15678
16023
  };
16024
+ Breadcrumb.prototype.popupWireEvents = function () {
16025
+ EventHandler.add(this.popupObj.element, 'click', this.clickHandler, this);
16026
+ EventHandler.add(this.popupObj.element, 'keydown', this.popupKeyDownHandler, this);
16027
+ };
15679
16028
  Breadcrumb.prototype.unWireEvents = function () {
16029
+ EventHandler.remove(document, 'click', this.delegateClickHanlder);
15680
16030
  EventHandler.remove(this.element, 'click', this.clickHandler);
15681
16031
  window.removeEventListener('resize', this.resize.bind(this));
16032
+ if (this.popupObj) {
16033
+ EventHandler.remove(this.popupObj.element, 'click', this.clickHandler);
16034
+ EventHandler.remove(this.popupObj.element, 'keydown', this.popupKeyDownHandler);
16035
+ }
15682
16036
  };
15683
16037
  /**
15684
16038
  * Get the properties to be maintained in the persisted state.
@@ -15703,11 +16057,32 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15703
16057
  * @returns {void}
15704
16058
  */
15705
16059
  Breadcrumb.prototype.destroy = function () {
15706
- this.unWireEvents();
15707
- this.element.innerHTML = '';
16060
+ var _this = this;
16061
+ var classes = [];
16062
+ var attributes$$1 = ['aria-label'];
15708
16063
  if (this.cssClass) {
15709
- removeClass([this.element], this.cssClass.split(' '));
16064
+ classes.concat(this.cssClass.split(' '));
15710
16065
  }
16066
+ if (this.enableRtl) {
16067
+ classes.push('e-rtl');
16068
+ }
16069
+ if (this.disabled) {
16070
+ classes.push(DISABLEDCLASS);
16071
+ attributes$$1.push(ARIADISABLED);
16072
+ }
16073
+ if (this.overflowMode === 'Wrap') {
16074
+ classes.push(WRAPMODECLASS);
16075
+ }
16076
+ else if (this.overflowMode === 'Scroll') {
16077
+ classes.push(SCROLLMODECLASS);
16078
+ }
16079
+ this.unWireEvents();
16080
+ this.element.innerHTML = '';
16081
+ removeClass([this.element], classes);
16082
+ attributes$$1.forEach(function (attribute) {
16083
+ _this.element.removeAttribute(attribute);
16084
+ });
16085
+ _super.prototype.destroy.call(this);
15711
16086
  };
15712
16087
  __decorate$10([
15713
16088
  Property('')
@@ -15719,17 +16094,14 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15719
16094
  Property('')
15720
16095
  ], Breadcrumb.prototype, "activeItem", void 0);
15721
16096
  __decorate$10([
15722
- Property(0)
16097
+ Property(-1)
15723
16098
  ], Breadcrumb.prototype, "maxItems", void 0);
15724
16099
  __decorate$10([
15725
- Property('Default')
16100
+ Property('Menu')
15726
16101
  ], Breadcrumb.prototype, "overflowMode", void 0);
15727
16102
  __decorate$10([
15728
16103
  Property('')
15729
16104
  ], Breadcrumb.prototype, "cssClass", void 0);
15730
- __decorate$10([
15731
- Property('')
15732
- ], Breadcrumb.prototype, "width", void 0);
15733
16105
  __decorate$10([
15734
16106
  Property(null)
15735
16107
  ], Breadcrumb.prototype, "itemTemplate", void 0);
@@ -15742,6 +16114,9 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15742
16114
  __decorate$10([
15743
16115
  Property(false)
15744
16116
  ], Breadcrumb.prototype, "enableActiveItemNavigation", void 0);
16117
+ __decorate$10([
16118
+ Property(false)
16119
+ ], Breadcrumb.prototype, "disabled", void 0);
15745
16120
  __decorate$10([
15746
16121
  Property('')
15747
16122
  ], Breadcrumb.prototype, "locale", void 0);