@syncfusion/ej2-navigations 19.3.57 → 19.4.38

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 (254) 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 +33 -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 +499 -136
  7. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  8. package/dist/es6/ej2-navigations.es5.js +506 -137
  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/tab/tab-model.d.ts +14 -6
  22. package/src/tab/tab.d.ts +26 -15
  23. package/src/tab/tab.js +56 -27
  24. package/src/toolbar/toolbar-model.d.ts +7 -7
  25. package/src/toolbar/toolbar.d.ts +6 -6
  26. package/src/toolbar/toolbar.js +81 -13
  27. package/src/treeview/treeview-model.d.ts +10 -0
  28. package/src/treeview/treeview.d.ts +13 -0
  29. package/src/treeview/treeview.js +48 -0
  30. package/styles/accordion/_bootstrap-dark-definition.scss +4 -0
  31. package/styles/accordion/_bootstrap-definition.scss +4 -0
  32. package/styles/accordion/_bootstrap4-definition.scss +4 -0
  33. package/styles/accordion/_bootstrap5-definition.scss +39 -35
  34. package/styles/accordion/_fabric-dark-definition.scss +4 -0
  35. package/styles/accordion/_fabric-definition.scss +4 -0
  36. package/styles/accordion/_fluent-definition.scss +85 -0
  37. package/styles/accordion/_highcontrast-definition.scss +5 -1
  38. package/styles/accordion/_highcontrast-light-definition.scss +4 -0
  39. package/styles/accordion/_layout.scss +6 -14
  40. package/styles/accordion/_material-dark-definition.scss +4 -0
  41. package/styles/accordion/_material-definition.scss +4 -0
  42. package/styles/accordion/_tailwind-definition.scss +83 -79
  43. package/styles/accordion/_theme.scss +12 -11
  44. package/styles/accordion/bootstrap4.css +1 -2
  45. package/styles/accordion/bootstrap5-dark.css +11 -2
  46. package/styles/accordion/bootstrap5.css +11 -2
  47. package/styles/accordion/highcontrast-light.css +0 -4
  48. package/styles/accordion/highcontrast.css +1 -5
  49. package/styles/accordion/icons/_fluent.scss +17 -0
  50. package/styles/accordion/icons/_tailwind.scss +17 -17
  51. package/styles/bootstrap-dark.css +317 -84
  52. package/styles/bootstrap.css +316 -83
  53. package/styles/bootstrap4.css +317 -76
  54. package/styles/bootstrap5-dark.css +339 -75
  55. package/styles/bootstrap5.css +341 -77
  56. package/styles/breadcrumb/_bootstrap-dark-definition.scss +14 -0
  57. package/styles/breadcrumb/_bootstrap-definition.scss +13 -0
  58. package/styles/breadcrumb/_bootstrap4-definition.scss +13 -0
  59. package/styles/breadcrumb/_bootstrap5-definition.scss +15 -2
  60. package/styles/breadcrumb/_fabric-dark-definition.scss +13 -0
  61. package/styles/breadcrumb/_fabric-definition.scss +13 -0
  62. package/styles/breadcrumb/_fluent-definition.scss +59 -0
  63. package/styles/breadcrumb/_highcontrast-definition.scss +13 -0
  64. package/styles/breadcrumb/_highcontrast-light-definition.scss +13 -0
  65. package/styles/breadcrumb/_layout.scss +171 -22
  66. package/styles/breadcrumb/_material-dark-definition.scss +13 -0
  67. package/styles/breadcrumb/_material-definition.scss +13 -0
  68. package/styles/breadcrumb/_tailwind-dark-definition.scss +13 -0
  69. package/styles/breadcrumb/_tailwind-definition.scss +13 -0
  70. package/styles/breadcrumb/_theme.scss +27 -8
  71. package/styles/breadcrumb/bootstrap-dark.css +194 -17
  72. package/styles/breadcrumb/bootstrap.css +194 -17
  73. package/styles/breadcrumb/bootstrap4.css +194 -17
  74. package/styles/breadcrumb/bootstrap5-dark.css +198 -24
  75. package/styles/breadcrumb/bootstrap5.css +198 -24
  76. package/styles/breadcrumb/fabric-dark.css +197 -20
  77. package/styles/breadcrumb/fabric.css +197 -20
  78. package/styles/breadcrumb/highcontrast-light.css +200 -22
  79. package/styles/breadcrumb/highcontrast.css +200 -22
  80. package/styles/breadcrumb/icons/_bootstrap-dark.scss +2 -1
  81. package/styles/breadcrumb/icons/_bootstrap.scss +2 -1
  82. package/styles/breadcrumb/icons/_bootstrap4.scss +2 -1
  83. package/styles/breadcrumb/icons/_bootstrap5.scss +2 -1
  84. package/styles/breadcrumb/icons/_fabric-dark.scss +2 -1
  85. package/styles/breadcrumb/icons/_fabric.scss +2 -1
  86. package/styles/breadcrumb/icons/_fluent.scss +25 -0
  87. package/styles/breadcrumb/icons/_highcontrast-light.scss +2 -1
  88. package/styles/breadcrumb/icons/_highcontrast.scss +2 -1
  89. package/styles/breadcrumb/icons/_material-dark.scss +2 -1
  90. package/styles/breadcrumb/icons/_material.scss +2 -1
  91. package/styles/breadcrumb/icons/_tailwind-dark.scss +2 -1
  92. package/styles/breadcrumb/icons/_tailwind.scss +2 -1
  93. package/styles/breadcrumb/material-dark.css +186 -13
  94. package/styles/breadcrumb/material.css +186 -13
  95. package/styles/breadcrumb/tailwind-dark.css +195 -22
  96. package/styles/breadcrumb/tailwind.css +195 -22
  97. package/styles/context-menu/_bootstrap-dark-definition.scss +1 -1
  98. package/styles/context-menu/_bootstrap-definition.scss +1 -1
  99. package/styles/context-menu/_bootstrap4-definition.scss +1 -1
  100. package/styles/context-menu/_bootstrap5-definition.scss +5 -5
  101. package/styles/context-menu/_fluent-definition.scss +52 -0
  102. package/styles/context-menu/_material-dark-definition.scss +1 -1
  103. package/styles/context-menu/_material-definition.scss +1 -1
  104. package/styles/context-menu/_tailwind-definition.scss +1 -1
  105. package/styles/context-menu/bootstrap-dark.css +1 -1
  106. package/styles/context-menu/bootstrap.css +1 -1
  107. package/styles/context-menu/bootstrap4.css +1 -1
  108. package/styles/context-menu/bootstrap5-dark.css +5 -5
  109. package/styles/context-menu/bootstrap5.css +6 -6
  110. package/styles/context-menu/icons/_fluent.scss +32 -0
  111. package/styles/context-menu/material-dark.css +1 -1
  112. package/styles/context-menu/material.css +1 -1
  113. package/styles/context-menu/tailwind-dark.css +1 -1
  114. package/styles/context-menu/tailwind.css +1 -1
  115. package/styles/fabric-dark.css +305 -41
  116. package/styles/fabric.css +308 -44
  117. package/styles/h-scroll/_fluent-definition.scss +78 -0
  118. package/styles/h-scroll/_tailwind-definition.scss +78 -78
  119. package/styles/h-scroll/_theme.scss +1 -1
  120. package/styles/h-scroll/bootstrap-dark.css +1 -1
  121. package/styles/h-scroll/bootstrap.css +1 -1
  122. package/styles/h-scroll/bootstrap4.css +1 -1
  123. package/styles/h-scroll/bootstrap5-dark.css +1 -1
  124. package/styles/h-scroll/bootstrap5.css +1 -1
  125. package/styles/h-scroll/fabric-dark.css +1 -1
  126. package/styles/h-scroll/fabric.css +1 -1
  127. package/styles/h-scroll/highcontrast-light.css +1 -1
  128. package/styles/h-scroll/highcontrast.css +1 -1
  129. package/styles/h-scroll/icons/_fluent.scss +49 -0
  130. package/styles/h-scroll/icons/_tailwind.scss +49 -49
  131. package/styles/h-scroll/material-dark.css +1 -1
  132. package/styles/h-scroll/material.css +1 -1
  133. package/styles/h-scroll/tailwind-dark.css +1 -1
  134. package/styles/h-scroll/tailwind.css +1 -1
  135. package/styles/highcontrast-light.css +317 -47
  136. package/styles/highcontrast.css +322 -52
  137. package/styles/material-dark.css +295 -32
  138. package/styles/material.css +296 -33
  139. package/styles/menu/_fluent-definition.scss +68 -0
  140. package/styles/menu/_layout.scss +1 -1
  141. package/styles/menu/_theme.scss +9 -0
  142. package/styles/menu/bootstrap-dark.css +1 -1
  143. package/styles/menu/bootstrap.css +1 -1
  144. package/styles/menu/bootstrap4.css +1 -1
  145. package/styles/menu/bootstrap5-dark.css +4 -4
  146. package/styles/menu/bootstrap5.css +5 -5
  147. package/styles/menu/icons/_fluent.scss +133 -0
  148. package/styles/menu/material-dark.css +1 -1
  149. package/styles/menu/material.css +1 -1
  150. package/styles/menu/tailwind-dark.css +1 -1
  151. package/styles/menu/tailwind.css +1 -1
  152. package/styles/sidebar/_bootstrap5-definition.scss +5 -5
  153. package/styles/sidebar/_fluent-definition.scss +5 -0
  154. package/styles/sidebar/_theme.scss +4 -2
  155. package/styles/sidebar/bootstrap5-dark.css +0 -1
  156. package/styles/sidebar/bootstrap5.css +0 -1
  157. package/styles/sidebar/tailwind-dark.css +0 -1
  158. package/styles/sidebar/tailwind.css +0 -1
  159. package/styles/tab/_bootstrap-dark-definition.scss +10 -1
  160. package/styles/tab/_bootstrap-definition.scss +10 -1
  161. package/styles/tab/_bootstrap4-definition.scss +9 -1
  162. package/styles/tab/_bootstrap5-definition.scss +401 -401
  163. package/styles/tab/_fabric-dark-definition.scss +10 -0
  164. package/styles/tab/_fabric-definition.scss +10 -0
  165. package/styles/tab/_fluent-definition.scss +409 -0
  166. package/styles/tab/_highcontrast-definition.scss +10 -0
  167. package/styles/tab/_highcontrast-light-definition.scss +10 -0
  168. package/styles/tab/_layout.scss +145 -0
  169. package/styles/tab/_material-dark-definition.scss +10 -0
  170. package/styles/tab/_material-definition.scss +10 -0
  171. package/styles/tab/_tailwind-definition.scss +431 -420
  172. package/styles/tab/_theme.scss +188 -113
  173. package/styles/tab/bootstrap-dark.css +43 -18
  174. package/styles/tab/bootstrap.css +42 -17
  175. package/styles/tab/bootstrap4.css +47 -28
  176. package/styles/tab/bootstrap5-dark.css +53 -30
  177. package/styles/tab/bootstrap5.css +53 -30
  178. package/styles/tab/fabric-dark.css +43 -20
  179. package/styles/tab/fabric.css +46 -23
  180. package/styles/tab/highcontrast-light.css +52 -19
  181. package/styles/tab/highcontrast.css +56 -23
  182. package/styles/tab/icons/_bootstrap-dark.scss +2 -2
  183. package/styles/tab/icons/_fabric-dark.scss +2 -2
  184. package/styles/tab/icons/_fluent.scss +140 -0
  185. package/styles/tab/icons/_tailwind.scss +140 -140
  186. package/styles/tab/material-dark.css +42 -15
  187. package/styles/tab/material.css +42 -15
  188. package/styles/tab/tailwind-dark.css +42 -17
  189. package/styles/tab/tailwind.css +42 -17
  190. package/styles/tailwind-dark.css +313 -50
  191. package/styles/tailwind.css +313 -50
  192. package/styles/toolbar/_bootstrap-dark-definition.scss +7 -1
  193. package/styles/toolbar/_bootstrap-definition.scss +7 -1
  194. package/styles/toolbar/_bootstrap4-definition.scss +8 -2
  195. package/styles/toolbar/_bootstrap5-definition.scss +104 -86
  196. package/styles/toolbar/_fabric-dark-definition.scss +7 -0
  197. package/styles/toolbar/_fabric-definition.scss +7 -0
  198. package/styles/toolbar/_fluent-definition.scss +149 -0
  199. package/styles/toolbar/_highcontrast-definition.scss +7 -0
  200. package/styles/toolbar/_highcontrast-light-definition.scss +7 -0
  201. package/styles/toolbar/_layout.scss +27 -72
  202. package/styles/toolbar/_material-dark-definition.scss +7 -1
  203. package/styles/toolbar/_material-definition.scss +7 -1
  204. package/styles/toolbar/_tailwind-definition.scss +149 -143
  205. package/styles/toolbar/_theme.scss +12 -15
  206. package/styles/toolbar/bootstrap-dark.css +17 -46
  207. package/styles/toolbar/bootstrap.css +17 -46
  208. package/styles/toolbar/bootstrap4.css +12 -26
  209. package/styles/toolbar/bootstrap5-dark.css +6 -7
  210. package/styles/toolbar/bootstrap5.css +6 -7
  211. package/styles/toolbar/fabric-dark.css +4 -0
  212. package/styles/toolbar/fabric.css +4 -0
  213. package/styles/toolbar/highcontrast-light.css +4 -1
  214. package/styles/toolbar/highcontrast.css +4 -1
  215. package/styles/toolbar/icons/_fluent.scss +16 -0
  216. package/styles/toolbar/icons/_tailwind.scss +16 -16
  217. package/styles/toolbar/material-dark.css +4 -1
  218. package/styles/toolbar/material.css +5 -2
  219. package/styles/toolbar/tailwind-dark.css +8 -6
  220. package/styles/toolbar/tailwind.css +8 -6
  221. package/styles/treeview/_bootstrap-dark-definition.scss +11 -0
  222. package/styles/treeview/_bootstrap-definition.scss +11 -0
  223. package/styles/treeview/_bootstrap4-definition.scss +11 -0
  224. package/styles/treeview/_bootstrap5-definition.scss +120 -109
  225. package/styles/treeview/_fabric-dark-definition.scss +11 -0
  226. package/styles/treeview/_fabric-definition.scss +11 -0
  227. package/styles/treeview/_fluent-definition.scss +120 -0
  228. package/styles/treeview/_highcontrast-definition.scss +11 -0
  229. package/styles/treeview/_highcontrast-light-definition.scss +11 -0
  230. package/styles/treeview/_layout.scss +116 -20
  231. package/styles/treeview/_material-dark-definition.scss +13 -0
  232. package/styles/treeview/_material-definition.scss +11 -0
  233. package/styles/treeview/_tailwind-definition.scss +12 -0
  234. package/styles/treeview/_theme.scss +5 -5
  235. package/styles/treeview/bootstrap-dark.css +60 -0
  236. package/styles/treeview/bootstrap.css +60 -0
  237. package/styles/treeview/bootstrap4.css +60 -0
  238. package/styles/treeview/bootstrap5-dark.css +61 -1
  239. package/styles/treeview/bootstrap5.css +61 -1
  240. package/styles/treeview/fabric-dark.css +60 -0
  241. package/styles/treeview/fabric.css +60 -0
  242. package/styles/treeview/highcontrast-light.css +60 -0
  243. package/styles/treeview/highcontrast.css +60 -0
  244. package/styles/treeview/icons/_bootstrap5.scss +43 -43
  245. package/styles/treeview/icons/_fluent.scss +43 -0
  246. package/styles/treeview/icons/_tailwind-dark.scss +43 -43
  247. package/styles/treeview/material-dark.css +60 -0
  248. package/styles/treeview/material.css +60 -0
  249. package/styles/treeview/tailwind-dark.css +65 -1
  250. package/styles/treeview/tailwind.css +65 -1
  251. package/styles/v-scroll/_fluent-definition.scss +49 -0
  252. package/styles/v-scroll/_tailwind-definition.scss +49 -49
  253. package/styles/v-scroll/icons/_fluent.scss +26 -0
  254. 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,6 +7474,7 @@ 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;
@@ -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
  }
@@ -8584,7 +8650,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8584
8650
  };
8585
8651
  Tab.prototype.refreshActElePosition = function () {
8586
8652
  var activeEle = select('.' + CLS_TB_ITEM + '.' + CLS_TB_POPUP + '.' + CLS_ACTIVE$1, this.element);
8587
- if (!isNullOrUndefined(activeEle)) {
8653
+ if (!isNullOrUndefined(activeEle) && this.reorderActiveTab) {
8588
8654
  this.select(this.getEleIndex(activeEle));
8589
8655
  }
8590
8656
  this.refreshActiveBorder();
@@ -8927,7 +8993,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8927
8993
  else {
8928
8994
  _this.dragItem.querySelector('.' + CLS_WRAP).style.visibility = '';
8929
8995
  removeClass([_this.tbItems.querySelector('.' + CLS_INDICATOR)], CLS_HIDDEN$1);
8930
- _this.select(_this.droppedIndex);
8996
+ _this.selectTab(_this.droppedIndex, null, true);
8931
8997
  }
8932
8998
  }
8933
8999
  });
@@ -8935,8 +9001,8 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8935
9001
  /**
8936
9002
  * Enables or disables the specified Tab item. On passing value as `false`, the item will be disabled.
8937
9003
  *
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.
9004
+ * @param {number} index - Index value of target Tab item.
9005
+ * @param {boolean} value - Boolean value that determines whether the command should be enabled or disabled.
8940
9006
  * By default, isEnable is true.
8941
9007
  * @returns {void}.
8942
9008
  */
@@ -8965,8 +9031,8 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8965
9031
  /**
8966
9032
  * Adds new items to the Tab that accepts an array as Tab items.
8967
9033
  *
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.
9034
+ * @param {TabItemModel[]} items - An array of item that is added to the Tab.
9035
+ * @param {number} index - Number value that determines where the items to be added. By default, index is 0.
8970
9036
  * @returns {void}.
8971
9037
  */
8972
9038
  Tab.prototype.addTab = function (items, index) {
@@ -9051,7 +9117,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9051
9117
  /**
9052
9118
  * Removes the items in the Tab from the specified index.
9053
9119
  *
9054
- * @param {number} index - Index of target item that is going to be removed.
9120
+ * @param {number} index - Index of target item that is going to be removed.
9055
9121
  * @returns {void}.
9056
9122
  */
9057
9123
  Tab.prototype.removeTab = function (index) {
@@ -9091,8 +9157,8 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9091
9157
  /**
9092
9158
  * Shows or hides the Tab that is in the specified index.
9093
9159
  *
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.
9160
+ * @param {number} index - Index value of target item.
9161
+ * @param {boolean} value - Based on this Boolean value, item will be hide (false) or show (true). By default, value is true.
9096
9162
  * @returns {void}.
9097
9163
  */
9098
9164
  Tab.prototype.hideTab = function (index, value) {
@@ -9152,12 +9218,18 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9152
9218
  this.tbObj.refreshOverflow();
9153
9219
  }
9154
9220
  };
9221
+ Tab.prototype.selectTab = function (args, event, isInteracted) {
9222
+ if (event === void 0) { event = null; }
9223
+ if (isInteracted === void 0) { isInteracted = false; }
9224
+ this.isInteracted = isInteracted;
9225
+ this.select(args, event);
9226
+ };
9155
9227
  /**
9156
9228
  * Specifies the index or HTMLElement to select an item from the Tab.
9157
9229
  *
9158
- * @param {number | HTMLElement} args - Index or DOM element is used for selecting an item from the Tab.
9230
+ * @param {number | HTMLElement} args - Index or DOM element is used for selecting an item from the Tab.
9159
9231
  * @param {Event} event - An event which takes place in DOM.
9160
- * @returns {void}.
9232
+ * @returns {void}
9161
9233
  */
9162
9234
  Tab.prototype.select = function (args, event) {
9163
9235
  var _this = this;
@@ -9195,20 +9267,22 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9195
9267
  selectingContent: !isNullOrUndefined(this.content) ?
9196
9268
  select('#' + CLS_CONTENT$1 + this.tabId + '_' + this.selectingID, this.content) : null,
9197
9269
  isSwiped: this.isSwipeed,
9270
+ isInteracted: this.isInteracted,
9198
9271
  cancel: false
9199
9272
  };
9200
9273
  if (!this.initRender) {
9201
9274
  this.trigger('selecting', eventArg, function (selectArgs) {
9202
9275
  if (!selectArgs.cancel) {
9203
- _this.selectingContent(args);
9276
+ _this.selectingContent(args, _this.isInteracted);
9204
9277
  }
9205
9278
  });
9206
9279
  }
9207
9280
  else {
9208
- this.selectingContent(args);
9281
+ this.selectingContent(args, this.isInteracted);
9209
9282
  }
9283
+ this.isInteracted = false;
9210
9284
  };
9211
- Tab.prototype.selectingContent = function (args) {
9285
+ Tab.prototype.selectingContent = function (args, isInteracted) {
9212
9286
  if (typeof args === 'number') {
9213
9287
  if (!isNullOrUndefined(this.tbItem[args]) && (this.tbItem[args].classList.contains(CLS_DISABLE$4) ||
9214
9288
  this.tbItem[args].classList.contains(CLS_HIDDEN$1))) {
@@ -9224,8 +9298,8 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9224
9298
  }
9225
9299
  if (this.tbItem.length > args && args >= 0 && !isNaN(args)) {
9226
9300
  this.prevIndex = this.selectedItem;
9227
- if (this.tbItem[args].classList.contains(CLS_TB_POPUP)) {
9228
- this.setActive(this.popupHandler(this.tbItem[args]));
9301
+ if (this.tbItem[args].classList.contains(CLS_TB_POPUP) && this.reorderActiveTab) {
9302
+ this.setActive(this.popupHandler(this.tbItem[args]), null, isInteracted);
9229
9303
  if ((!isNullOrUndefined(this.items) && this.items.length > 0) && this.allowDragAndDrop) {
9230
9304
  this.tbItem = selectAll('.' + CLS_TB_ITEMS + ' .' + CLS_TB_ITEM, this.hdrEle);
9231
9305
  var item = this.items[args];
@@ -9234,15 +9308,15 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9234
9308
  }
9235
9309
  }
9236
9310
  else {
9237
- this.setActive(args);
9311
+ this.setActive(args, null, isInteracted);
9238
9312
  }
9239
9313
  }
9240
9314
  else {
9241
- this.setActive(0);
9315
+ this.setActive(0, null, isInteracted);
9242
9316
  }
9243
9317
  }
9244
9318
  else if (args instanceof (HTMLElement)) {
9245
- this.setActive(this.getEleIndex(args));
9319
+ this.setActive(this.getEleIndex(args), null, isInteracted);
9246
9320
  }
9247
9321
  };
9248
9322
  /**
@@ -9325,6 +9399,9 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9325
9399
  case 'showCloseButton':
9326
9400
  this.setCloseButton(newProp.showCloseButton);
9327
9401
  break;
9402
+ case 'reorderActiveTab':
9403
+ this.refreshActElePosition();
9404
+ break;
9328
9405
  case 'selectedItem':
9329
9406
  this.selectedItem = oldProp.selectedItem;
9330
9407
  this.select(newProp.selectedItem);
@@ -9517,6 +9594,9 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
9517
9594
  __decorate$7([
9518
9595
  Property(false)
9519
9596
  ], Tab.prototype, "showCloseButton", void 0);
9597
+ __decorate$7([
9598
+ Property(true)
9599
+ ], Tab.prototype, "reorderActiveTab", void 0);
9520
9600
  __decorate$7([
9521
9601
  Property()
9522
9602
  ], Tab.prototype, "scrollStep", void 0);
@@ -9597,6 +9677,8 @@ var COLLAPSIBLE = 'e-icon-collapsible';
9597
9677
  var EXPANDABLE = 'e-icon-expandable';
9598
9678
  var LISTITEM = 'e-list-item';
9599
9679
  var LISTTEXT = 'e-list-text';
9680
+ var LISTWRAP = 'e-text-wrap';
9681
+ var IELISTWRAP = 'e-ie-wrap';
9600
9682
  var PARENTITEM = 'e-list-parent';
9601
9683
  var HOVER = 'e-hover';
9602
9684
  var ACTIVE = 'e-active';
@@ -9765,6 +9847,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
9765
9847
  _this.isFieldChange = false;
9766
9848
  _this.changeDataSource = false;
9767
9849
  _this.hasTemplate = false;
9850
+ _this.isFirstRender = false;
9768
9851
  _this.mouseDownStatus = false;
9769
9852
  return _this;
9770
9853
  }
@@ -9890,6 +9973,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
9890
9973
  this.setCssClass(null, this.cssClass);
9891
9974
  this.setEnableRtl();
9892
9975
  this.setFullRow(this.fullRowSelect);
9976
+ this.setTextWrap();
9893
9977
  this.nodeTemplateFn = this.templateComplier(this.nodeTemplate);
9894
9978
  };
9895
9979
  TreeView.prototype.setDisabledMode = function () {
@@ -10878,11 +10962,36 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
10878
10962
  addClass([firstNode], FOCUS);
10879
10963
  this.updateIdAttr(null, firstNode);
10880
10964
  }
10965
+ if (this.allowTextWrap) {
10966
+ this.updateWrap();
10967
+ }
10881
10968
  this.renderReactTemplates();
10882
10969
  this.hasPid = this.rootData[0] ? this.rootData[0].hasOwnProperty(this.fields.parentID) : false;
10883
10970
  this.doExpandAction();
10884
10971
  }
10885
10972
  };
10973
+ TreeView.prototype.setTextWrap = function () {
10974
+ (this.allowTextWrap ? addClass : removeClass)([this.element], LISTWRAP);
10975
+ if (Browser.isIE) {
10976
+ (this.allowTextWrap ? addClass : removeClass)([this.element], IELISTWRAP);
10977
+ }
10978
+ };
10979
+ TreeView.prototype.updateWrap = function (ulEle) {
10980
+ if (!this.fullRowSelect) {
10981
+ return;
10982
+ }
10983
+ var liEle = ulEle ? selectAll('.' + LISTITEM, ulEle) : this.liList;
10984
+ var length = liEle.length;
10985
+ for (var i = 0; i < length; i++) {
10986
+ this.calculateWrap(liEle[i]);
10987
+ }
10988
+ };
10989
+ TreeView.prototype.calculateWrap = function (liEle) {
10990
+ var element = select('.' + FULLROW, liEle);
10991
+ if (element && element.nextElementSibling) {
10992
+ element.style.height = this.allowTextWrap ? element.nextElementSibling.offsetHeight + 'px' : '';
10993
+ }
10994
+ };
10886
10995
  TreeView.prototype.doExpandAction = function () {
10887
10996
  var eUids = this.expandedNodes;
10888
10997
  if (this.isInitalExpand && eUids.length > 0) {
@@ -11119,6 +11228,10 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11119
11228
  currLi.style.height = '';
11120
11229
  removeClass([icon], PROCESS);
11121
11230
  this.addExpand(currLi);
11231
+ if (this.allowTextWrap && this.isLoaded && this.isFirstRender) {
11232
+ this.updateWrap(currLi);
11233
+ this.isFirstRender = false;
11234
+ }
11122
11235
  if (this.isLoaded && this.expandArgs && !this.isRefreshed) {
11123
11236
  this.expandArgs = this.getExpandEvent(currLi, null);
11124
11237
  this.trigger('nodeExpanded', this.expandArgs);
@@ -11627,6 +11740,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11627
11740
  this.expandNode(currLi, icon);
11628
11741
  }
11629
11742
  else {
11743
+ this.isFirstRender = true;
11630
11744
  this.renderChildNodes(currLi, expandChild, callback);
11631
11745
  var liEles = selectAll('.' + LISTITEM, currLi);
11632
11746
  for (var i = 0; i < liEles.length; i++) {
@@ -12323,6 +12437,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
12323
12437
  removeClass([liEle], EDITING);
12324
12438
  txtEle.focus();
12325
12439
  }
12440
+ if (this.allowTextWrap) {
12441
+ this.calculateWrap(liEle);
12442
+ }
12326
12443
  };
12327
12444
  TreeView.prototype.getElement = function (ele) {
12328
12445
  if (isNullOrUndefined(ele)) {
@@ -13917,6 +14034,10 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
13917
14034
  this.setMultiSelect(this.allowMultiSelection);
13918
14035
  this.addMultiSelect(this.allowMultiSelection);
13919
14036
  break;
14037
+ case 'allowTextWrap':
14038
+ this.setTextWrap();
14039
+ this.updateWrap();
14040
+ break;
13920
14041
  case 'checkedNodes':
13921
14042
  if (this.showCheckBox) {
13922
14043
  this.checkedNodes = oldProp.checkedNodes;
@@ -13968,6 +14089,10 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
13968
14089
  case 'fullRowSelect':
13969
14090
  this.setFullRow(this.fullRowSelect);
13970
14091
  this.addFullRow(this.fullRowSelect);
14092
+ if (this.allowTextWrap) {
14093
+ this.setTextWrap();
14094
+ this.updateWrap();
14095
+ }
13971
14096
  break;
13972
14097
  case 'loadOnDemand':
13973
14098
  if (this.loadOnDemand === false && !this.onLoaded) {
@@ -14407,6 +14532,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
14407
14532
  __decorate$8([
14408
14533
  Property(false)
14409
14534
  ], TreeView.prototype, "allowMultiSelection", void 0);
14535
+ __decorate$8([
14536
+ Property(false)
14537
+ ], TreeView.prototype, "allowTextWrap", void 0);
14410
14538
  __decorate$8([
14411
14539
  Complex({}, NodeAnimationSettings)
14412
14540
  ], TreeView.prototype, "animation", void 0);
@@ -15279,6 +15407,15 @@ var __decorate$10 = (undefined && undefined.__decorate) || function (decorators,
15279
15407
  var ICONRIGHT = 'e-icon-right';
15280
15408
  var ITEMTEXTCLASS = 'e-breadcrumb-text';
15281
15409
  var ICONCLASS = 'e-breadcrumb-icon';
15410
+ var MENUCLASS = 'e-breadcrumb-menu';
15411
+ var ITEMCLASS = 'e-breadcrumb-item';
15412
+ var POPUPCLASS = 'e-breadcrumb-popup';
15413
+ var WRAPMODECLASS = 'e-breadcrumb-wrap-mode';
15414
+ var SCROLLMODECLASS = 'e-breadcrumb-scroll-mode';
15415
+ var TABINDEX = 'tabindex';
15416
+ var DISABLEDCLASS = 'e-disabled';
15417
+ var ARIADISABLED = 'aria-disabled';
15418
+ var DOT = '.';
15282
15419
  var BreadcrumbItem = /** @__PURE__ @class */ (function (_super) {
15283
15420
  __extends$10(BreadcrumbItem, _super);
15284
15421
  function BreadcrumbItem() {
@@ -15293,6 +15430,9 @@ var BreadcrumbItem = /** @__PURE__ @class */ (function (_super) {
15293
15430
  __decorate$10([
15294
15431
  Property(null)
15295
15432
  ], BreadcrumbItem.prototype, "iconCss", void 0);
15433
+ __decorate$10([
15434
+ Property(false)
15435
+ ], BreadcrumbItem.prototype, "disabled", void 0);
15296
15436
  return BreadcrumbItem;
15297
15437
  }(ChildProperty));
15298
15438
  /**
@@ -15347,20 +15487,49 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15347
15487
  if (this.enableRtl) {
15348
15488
  this.element.classList.add('e-rtl');
15349
15489
  }
15350
- this.setWidth();
15490
+ if (this.disabled) {
15491
+ this.element.classList.add(DISABLEDCLASS);
15492
+ this.element.setAttribute(ARIADISABLED, 'true');
15493
+ }
15494
+ if (this.overflowMode === 'Wrap') {
15495
+ this.element.classList.add(WRAPMODECLASS);
15496
+ }
15497
+ else if (this.overflowMode === 'Scroll') {
15498
+ this.element.classList.add(SCROLLMODECLASS);
15499
+ }
15351
15500
  this.initItems();
15352
15501
  this.initPvtProps();
15353
15502
  };
15354
15503
  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;
15504
+ if (this.overflowMode === 'Hidden' && this._maxItems > 0) {
15505
+ this.endIndex = this.getEndIndex();
15506
+ this.startIndex = this.endIndex + 1 - (this._maxItems - 1);
15507
+ }
15508
+ if (this.overflowMode === 'Menu') {
15509
+ if (this._maxItems >= 0) {
15510
+ this.startIndex = this._maxItems > 1 ? 1 : 0;
15511
+ this.endIndex = this.getEndIndex();
15512
+ this.popupUl = this.createElement('ul', { attrs: { TABINDEX: '0', 'role': 'menu' } });
15513
+ }
15514
+ else {
15515
+ this.startIndex = this.endIndex = null;
15516
+ }
15358
15517
  }
15359
15518
  };
15360
- Breadcrumb.prototype.setWidth = function () {
15361
- if (this.width) {
15362
- this.element.style.width = this.width;
15519
+ Breadcrumb.prototype.getEndIndex = function () {
15520
+ var _this = this;
15521
+ var endIndex;
15522
+ if (this.activeItem) {
15523
+ this.items.forEach(function (item, idx) {
15524
+ if (item.url === _this.activeItem || item.text === _this.activeItem) {
15525
+ endIndex = idx;
15526
+ }
15527
+ });
15528
+ }
15529
+ else {
15530
+ endIndex = this.items.length - 1;
15363
15531
  }
15532
+ return endIndex;
15364
15533
  };
15365
15534
  Breadcrumb.prototype.initItems = function () {
15366
15535
  if (!this.items.length) {
@@ -15368,7 +15537,7 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15368
15537
  var uri = void 0;
15369
15538
  var items = [];
15370
15539
  if (this.url) {
15371
- var url = new URL(this.url);
15540
+ var url = new URL(this.url, window.location.origin);
15372
15541
  baseUri = url.origin + '/';
15373
15542
  uri = url.href.split(baseUri)[1].split('/');
15374
15543
  }
@@ -15395,13 +15564,19 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15395
15564
  if (itemsLength) {
15396
15565
  var isActiveItem = void 0;
15397
15566
  var isLastItem = void 0;
15567
+ var isLastItemInPopup_1;
15398
15568
  var j_1 = 0;
15569
+ var wrapDiv = void 0;
15399
15570
  var len = (itemsLength * 2) - 1;
15400
- var ol = this.createElement('ol');
15571
+ var isItemCancelled_1 = false;
15572
+ var ol = this.createElement('ol', { className: this.overflowMode === 'Wrap' ? 'e-breadcrumb-wrapped-ol' : '' });
15573
+ var firstOl = this.createElement('ol', { className: this.overflowMode === 'Wrap' ? 'e-breadcrumb-first-ol' : '' });
15401
15574
  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);
15575
+ var isCollasped = (this.overflowMode === 'Collapsed' && this._maxItems > 0 && itemsLength > this._maxItems && !this.isExpanded);
15576
+ var isDefaultOverflowMode_1 = (this.overflowMode === 'Hidden' && this._maxItems > 0);
15577
+ if (this.overflowMode === 'Menu' && this.popupUl) {
15578
+ this.popupUl.innerHTML = '';
15579
+ }
15405
15580
  var listBaseOptions = {
15406
15581
  moduleName: this.getModuleName(),
15407
15582
  showIcon: showIcon,
@@ -15410,7 +15585,9 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15410
15585
  var isLastItem = args.curData.isLastItem;
15411
15586
  if (isLastItem && args.item.children.length && !_this.itemTemplate) {
15412
15587
  delete args.curData.isLastItem;
15413
- args.item.innerHTML = _this.createElement('span', { className: ITEMTEXTCLASS, innerHTML: args.item.children[0].innerHTML }).outerHTML;
15588
+ if (!isLastItemInPopup_1 && !_this.enableActiveItemNavigation) {
15589
+ args.item.innerHTML = _this.createElement('span', { className: ITEMTEXTCLASS, innerHTML: args.item.children[0].innerHTML }).outerHTML;
15590
+ }
15414
15591
  }
15415
15592
  if (args.curData.iconCss && !args.curData.text && !_this.itemTemplate) {
15416
15593
  args.item.classList.add('e-icon-item');
@@ -15418,41 +15595,40 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15418
15595
  if (isDefaultOverflowMode_1) {
15419
15596
  args.item.setAttribute('item-index', j_1.toString());
15420
15597
  }
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
15598
  var eventArgs = {
15430
15599
  item: extend({}, args.curData.properties ?
15431
- args.curData.properties : args.curData), element: args.item
15600
+ args.curData.properties : args.curData), element: args.item, cancel: false
15432
15601
  };
15433
15602
  _this.trigger('beforeItemRender', eventArgs);
15434
- var isItemDisabled = isDisabled_1 || eventArgs.element.classList.contains('e-disabled');
15603
+ isItemCancelled_1 = eventArgs.cancel;
15435
15604
  var containsRightIcon = (isIconRight || eventArgs.element.classList.contains(ICONRIGHT));
15436
15605
  if (containsRightIcon && args.curData.iconCss && !_this.itemTemplate) {
15437
- args.item.querySelector('.e-anchor-wrap').append(args.item.querySelector('.' + ICONCLASS));
15606
+ args.item.querySelector('.e-anchor-wrap').appendChild(args.item.querySelector(DOT + ICONCLASS));
15438
15607
  }
15439
- if (isItemDisabled) {
15440
- args.item.setAttribute('aria-disabled', 'true');
15608
+ if (eventArgs.item.disabled) {
15609
+ args.item.setAttribute(ARIADISABLED, 'true');
15610
+ args.item.classList.add(DISABLEDCLASS);
15611
+ }
15612
+ if ((eventArgs.item.disabled || _this.disabled) && args.item.children.length && !_this.itemTemplate) {
15613
+ args.item.children[0].setAttribute(TABINDEX, '-1');
15441
15614
  }
15442
15615
  if (args.curData.isEmptyUrl) {
15443
15616
  args.item.children[0].removeAttribute('href');
15444
- if ((!isLastItem || (isLastItem && _this.enableActiveItemNavigation)) && !isItemDisabled) {
15445
- args.item.children[0].setAttribute('tabindex', '0');
15617
+ if ((!isLastItem || (isLastItem && _this.enableActiveItemNavigation)) && !(eventArgs.item.disabled || _this.disabled)) {
15618
+ args.item.children[0].setAttribute(TABINDEX, '0');
15446
15619
  EventHandler.add(args.item.children[0], 'keydown', _this.keyDownHandler, _this);
15447
15620
  }
15448
15621
  }
15622
+ if (isLastItem) {
15623
+ args.item.setAttribute('data-active-item', '');
15624
+ }
15449
15625
  if (!_this.itemTemplate) {
15450
15626
  _this.beforeItemRenderChanges(args.curData, eventArgs.item, args.item, containsRightIcon);
15451
15627
  }
15452
15628
  }
15453
15629
  };
15454
15630
  for (var i = 0; i < len; i % 2 && j_1++, i++) {
15455
- isActiveItem = (this.activeItem && this.activeItem === items[j_1].url);
15631
+ isActiveItem = (this.activeItem && (this.activeItem === items[j_1].url || this.activeItem === items[j_1].text));
15456
15632
  if (isCollasped && i > 1 && i < len - 2) {
15457
15633
  continue;
15458
15634
  }
@@ -15462,10 +15638,11 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15462
15638
  }
15463
15639
  if (i % 2) {
15464
15640
  // separator item
15641
+ wrapDiv = this.createElement('div', { className: 'e-breadcrumb-item-wrapper' });
15465
15642
  listBaseOptions.template = this.separatorTemplate ? this.separatorTemplate : '/';
15466
15643
  listBaseOptions.itemClass = 'e-breadcrumb-separator';
15467
15644
  isSingleLevel = false;
15468
- item = [{ previousItem: item.pop(), nextItem: items[j_1] }];
15645
+ item = [{ previousItem: items[j_1], nextItem: items[j_1 + 1] }];
15469
15646
  }
15470
15647
  else {
15471
15648
  // list item
@@ -15482,47 +15659,129 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15482
15659
  if (!item[0].url && !this.itemTemplate) {
15483
15660
  item = [extend({}, item[0], { isEmptyUrl: true, url: '#' })];
15484
15661
  }
15485
- isLastItem = isDefaultOverflowMode_1 && (j_1 === this.endIndex);
15486
- if ((((i === len - 1 || isLastItem) && !this.itemTemplate) || isActiveItem) && !this.enableActiveItemNavigation) {
15662
+ isLastItem = (isDefaultOverflowMode_1 || this.overflowMode === 'Menu') && (j_1 === this.endIndex);
15663
+ if (((i === len - 1 || isLastItem) && !this.itemTemplate) || isActiveItem) {
15487
15664
  item[0].isLastItem = true;
15488
15665
  }
15489
15666
  }
15490
- append(ListBase.createList(this.createElement, item, listBaseOptions, isSingleLevel, this)
15491
- .childNodes, ol);
15667
+ var parent_1 = ol;
15668
+ var lastPopupItemIdx = this.startIndex + this.endIndex - this._maxItems;
15669
+ 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)) {
15670
+ if (i % 2) {
15671
+ continue;
15672
+ }
15673
+ else {
15674
+ parent_1 = this.popupUl;
15675
+ if (isLastItem) {
15676
+ isLastItemInPopup_1 = true;
15677
+ }
15678
+ }
15679
+ }
15680
+ else if (this.overflowMode === 'Wrap') {
15681
+ if (i === 0) {
15682
+ parent_1 = firstOl;
15683
+ }
15684
+ else {
15685
+ parent_1 = wrapDiv;
15686
+ }
15687
+ }
15688
+ var li = ListBase.createList(this.createElement, item, listBaseOptions, isSingleLevel, this).childNodes;
15689
+ if (!isItemCancelled_1) {
15690
+ append(li, parent_1);
15691
+ }
15692
+ else if (isDefaultOverflowMode_1 || isCollasped || this.overflowMode === 'Menu' || this.overflowMode === 'Wrap') {
15693
+ items.splice(j_1, 1);
15694
+ this.initPvtProps();
15695
+ return this.reRenderItems();
15696
+ }
15697
+ else if ((i === len - 1 || isLastItem)) {
15698
+ remove(parent_1.lastElementChild);
15699
+ }
15700
+ if (this.overflowMode === 'Wrap' && i !== 0 && i % 2 === 0) {
15701
+ ol.appendChild(wrapDiv);
15702
+ }
15492
15703
  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);
15704
+ var li_1 = this.createElement('li', { className: 'e-icons e-breadcrumb-collapsed', attrs: { TABINDEX: '0' } });
15705
+ EventHandler.add(li_1, 'keyup', this.expandHandler, this);
15706
+ ol.appendChild(li_1);
15707
+ }
15708
+ if (this.overflowMode === 'Menu' && this.startIndex === i && this.endIndex >= this._maxItems && this._maxItems >= 0) {
15709
+ var menu = this.getMenuElement();
15710
+ EventHandler.add(menu, 'keyup', this.keyDownHandler, this);
15711
+ ol.appendChild(menu);
15496
15712
  }
15497
15713
  if (isActiveItem || isLastItem) {
15498
15714
  break;
15499
15715
  }
15716
+ if (isItemCancelled_1) {
15717
+ i++;
15718
+ }
15500
15719
  }
15501
15720
  if (this.isReact) {
15502
15721
  this.renderReactTemplates();
15503
15722
  }
15504
- this.element.append(ol);
15723
+ if (this.overflowMode === 'Wrap') {
15724
+ this.element.appendChild(firstOl);
15725
+ }
15726
+ this.element.appendChild(ol);
15505
15727
  this.calculateMaxItems();
15506
15728
  }
15507
15729
  };
15508
15730
  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;
15731
+ if (this.overflowMode === 'Hidden' || this.overflowMode === 'Collapsed' || this.overflowMode === 'Menu') {
15732
+ var maxItems = void 0;
15733
+ var width = this.element.offsetWidth;
15734
+ var liElems = [].slice.call(this.element.children[0].children).reverse();
15735
+ var liWidth = this.overflowMode === 'Menu' ? 0 : liElems[liElems.length - 1].offsetWidth + (liElems[liElems.length - 2] ? liElems[liElems.length - 2].offsetWidth : 0);
15736
+ if (this.overflowMode === 'Menu') {
15737
+ var menuEle = this.getMenuElement();
15738
+ this.element.appendChild(menuEle);
15739
+ liWidth += menuEle.offsetWidth;
15740
+ remove(menuEle);
15741
+ }
15742
+ for (var i = 0; i < liElems.length - 2; i++) {
15743
+ if (liWidth > width) {
15744
+ maxItems = Math.ceil((i - 1) / 2) + ((this.overflowMode === 'Menu' && i <= 2) ? 0 : 1);
15745
+ if (((this.maxItems > maxItems && !(this.maxItems > -1 && maxItems == -1)) || this.maxItems == -1) && this._maxItems != maxItems) {
15746
+ this._maxItems = maxItems;
15517
15747
  this.initPvtProps();
15518
15748
  return this.reRenderItems();
15519
15749
  }
15520
15750
  else {
15751
+ break;
15752
+ }
15753
+ }
15754
+ else {
15755
+ if (this.overflowMode === 'Menu' && i === 2) {
15756
+ liWidth += liElems[liElems.length - 1].offsetWidth + liElems[liElems.length - 2].offsetWidth;
15757
+ if (liWidth > width) {
15758
+ this._maxItems = 1;
15759
+ this.initPvtProps();
15760
+ return this.reRenderItems();
15761
+ }
15762
+ }
15763
+ if (!(this.overflowMode === 'Menu' && liElems[i].classList.contains(MENUCLASS))) {
15521
15764
  liWidth += liElems[i].offsetWidth;
15522
15765
  }
15523
15766
  }
15524
15767
  }
15525
15768
  }
15769
+ else if ((this.overflowMode === 'Wrap' || this.overflowMode === 'Scroll') && this._maxItems > 0) {
15770
+ var width = 0;
15771
+ var liElems = this.element.querySelectorAll(DOT + ITEMCLASS);
15772
+ if (liElems.length > this._maxItems + this._maxItems - 1) {
15773
+ for (var i = this.overflowMode === 'Wrap' ? 1 : 0; i < this._maxItems + this._maxItems - 1; i++) {
15774
+ width += liElems[i].offsetWidth;
15775
+ }
15776
+ width = width + 5 + (parseInt(getComputedStyle(this.element.children[0]).paddingLeft, 10) * 2);
15777
+ if (this.overflowMode === 'Wrap') {
15778
+ this.element.querySelector('.e-breadcrumb-wrapped-ol').style.width = width + 'px';
15779
+ }
15780
+ else {
15781
+ this.element.style.width = width + 'px';
15782
+ }
15783
+ }
15784
+ }
15526
15785
  };
15527
15786
  Breadcrumb.prototype.hasField = function (items, field) {
15528
15787
  for (var i = 0, len = items.length; i < len; i++) {
@@ -15532,6 +15791,9 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15532
15791
  }
15533
15792
  return false;
15534
15793
  };
15794
+ Breadcrumb.prototype.getMenuElement = function () {
15795
+ return this.createElement('li', { className: 'e-icons e-breadcrumb-menu', attrs: { TABINDEX: '0' } });
15796
+ };
15535
15797
  Breadcrumb.prototype.beforeItemRenderChanges = function (prevItem, currItem, elem, isRightIcon) {
15536
15798
  var wrapElem = elem.querySelector('.e-anchor-wrap');
15537
15799
  if (currItem.text !== prevItem.text) {
@@ -15541,15 +15803,15 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15541
15803
  }
15542
15804
  });
15543
15805
  }
15544
- if (currItem.iconCss !== prevItem.iconCss) {
15545
- var iconElem = elem.querySelector('.' + ICONCLASS);
15806
+ if (currItem.iconCss !== prevItem.iconCss && wrapElem) { // wrapElem - for checking it is item not a separator
15807
+ var iconElem = elem.querySelector(DOT + ICONCLASS);
15546
15808
  if (iconElem) {
15547
15809
  if (currItem.iconCss) {
15548
15810
  removeClass([iconElem], prevItem.iconCss.split(' '));
15549
15811
  addClass([iconElem], currItem.iconCss.split(' '));
15550
15812
  }
15551
15813
  else {
15552
- iconElem.remove();
15814
+ remove(iconElem);
15553
15815
  }
15554
15816
  }
15555
15817
  else if (currItem.iconCss) {
@@ -15579,31 +15841,86 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15579
15841
  this.renderItems(this.items);
15580
15842
  };
15581
15843
  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) {
15844
+ var li = closest(e.target, DOT + ITEMCLASS + ':not(.e-breadcrumb-separator)');
15845
+ if (!this.enableNavigation) {
15846
+ e.preventDefault();
15847
+ }
15848
+ if (li && (closest(e.target, DOT + ITEMTEXTCLASS) || this.itemTemplate)) {
15849
+ var idx = void 0;
15850
+ if (this.overflowMode === 'Wrap') {
15851
+ idx = [].slice.call(this.element.querySelectorAll(DOT + ITEMCLASS)).indexOf(li);
15852
+ }
15853
+ else {
15854
+ idx = [].slice.call(li.parentElement.children).indexOf(li);
15855
+ }
15856
+ if (this.overflowMode === 'Menu') {
15857
+ if (closest(e.target, DOT + POPUPCLASS)) {
15858
+ idx += this.startIndex;
15859
+ this.endIndex = idx;
15860
+ if (e.type === 'keydown') {
15861
+ this.documentClickHandler(e);
15862
+ }
15863
+ }
15864
+ else if (this.element.querySelector(DOT + MENUCLASS)) {
15865
+ if (idx > [].slice.call(this.element.children[0].children).indexOf(this.element.querySelector(DOT + MENUCLASS))) {
15866
+ idx += (this.popupUl.childElementCount * 2) - 2;
15867
+ idx = Math.floor(idx / 2);
15868
+ this.endIndex = idx;
15869
+ }
15870
+ else {
15871
+ this.startIndex = this.endIndex = idx;
15872
+ }
15873
+ }
15874
+ else {
15875
+ idx = Math.floor(idx / 2);
15876
+ this.startIndex = this.endIndex = idx;
15877
+ }
15878
+ }
15879
+ else {
15880
+ idx = Math.floor(idx / 2);
15881
+ }
15882
+ if (this.overflowMode === 'Hidden' && this._maxItems > 0 && this.endIndex !== 0) {
15587
15883
  idx = parseInt(li.getAttribute('item-index'), 10);
15588
15884
  if (this.startIndex > 1) {
15589
15885
  this.startIndex -= (this.endIndex - idx);
15590
15886
  }
15591
15887
  this.endIndex = idx;
15592
- this.reRenderItems();
15593
15888
  }
15594
15889
  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();
15890
+ this.activeItem = this.items[idx].url || this.items[idx].text;
15891
+ this.dataBind();
15602
15892
  }
15603
15893
  if (e.target.classList.contains('e-breadcrumb-collapsed')) {
15604
15894
  this.isExpanded = true;
15605
15895
  this.reRenderItems();
15606
15896
  }
15897
+ if (e.target.classList.contains(MENUCLASS)) {
15898
+ this.renderPopup();
15899
+ }
15900
+ };
15901
+ Breadcrumb.prototype.renderPopup = function () {
15902
+ var _this = this;
15903
+ var wrapper = this.createElement('div', { className: POPUPCLASS + ' ' + this.cssClass + (this.enableRtl ? ' e-rtl' : '') });
15904
+ document.body.appendChild(wrapper);
15905
+ this.popupObj = new Popup(wrapper, {
15906
+ content: this.popupUl,
15907
+ relateTo: this.element.querySelector(DOT + MENUCLASS),
15908
+ enableRtl: this.enableRtl,
15909
+ position: { X: 'left', Y: 'bottom' },
15910
+ collision: { X: 'fit', Y: 'flip' },
15911
+ open: function () {
15912
+ _this.popupUl.focus();
15913
+ }
15914
+ });
15915
+ this.popupWireEvents();
15916
+ this.popupObj.show();
15917
+ };
15918
+ Breadcrumb.prototype.documentClickHandler = function (e) {
15919
+ if (this.overflowMode === 'Menu' && this.popupObj && this.popupObj.element.classList.contains('e-popup-open') && !closest(e.target, DOT + MENUCLASS)) {
15920
+ this.popupObj.hide();
15921
+ this.popupObj.destroy();
15922
+ detach(this.popupObj.element);
15923
+ }
15607
15924
  };
15608
15925
  Breadcrumb.prototype.resize = function () {
15609
15926
  this._maxItems = this.maxItems;
@@ -15621,6 +15938,11 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15621
15938
  this.clickHandler(e);
15622
15939
  }
15623
15940
  };
15941
+ Breadcrumb.prototype.popupKeyDownHandler = function (e) {
15942
+ if (e.key === 'Escape') {
15943
+ this.documentClickHandler(e);
15944
+ }
15945
+ };
15624
15946
  /**
15625
15947
  * Called internally if any of the property value changed.
15626
15948
  *
@@ -15633,26 +15955,37 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15633
15955
  for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
15634
15956
  var prop = _a[_i];
15635
15957
  switch (prop) {
15636
- case 'activeItem':
15637
15958
  case 'items':
15638
15959
  case 'enableActiveItemNavigation':
15639
15960
  this.reRenderItems();
15640
15961
  break;
15962
+ case 'activeItem':
15963
+ this._maxItems = this.maxItems;
15964
+ this.initPvtProps();
15965
+ this.reRenderItems();
15966
+ break;
15641
15967
  case 'overflowMode':
15642
15968
  case 'maxItems':
15969
+ this._maxItems = this.maxItems;
15643
15970
  this.initPvtProps();
15644
15971
  this.reRenderItems();
15972
+ if (oldProp.overflowMode === 'Wrap') {
15973
+ this.element.classList.remove(WRAPMODECLASS);
15974
+ }
15975
+ else if (newProp.overflowMode === 'Wrap') {
15976
+ this.element.classList.add(WRAPMODECLASS);
15977
+ }
15978
+ if (oldProp.overflowMode === 'Scroll') {
15979
+ this.element.classList.remove(SCROLLMODECLASS);
15980
+ }
15981
+ else if (newProp.overflowMode === 'Scroll') {
15982
+ this.element.classList.add(SCROLLMODECLASS);
15983
+ }
15645
15984
  break;
15646
15985
  case 'url':
15647
15986
  this.initItems();
15648
15987
  this.reRenderItems();
15649
15988
  break;
15650
- case 'width':
15651
- this.setWidth();
15652
- this._maxItems = this.maxItems;
15653
- this.initPvtProps();
15654
- this.reRenderItems();
15655
- break;
15656
15989
  case 'cssClass':
15657
15990
  if (oldProp.cssClass) {
15658
15991
  removeClass([this.element], oldProp.cssClass.split(' '));
@@ -15669,16 +16002,31 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15669
16002
  case 'enableRtl':
15670
16003
  this.element.classList.toggle('e-rtl');
15671
16004
  break;
16005
+ case 'disabled':
16006
+ this.element.classList.toggle(DISABLEDCLASS);
16007
+ this.element.setAttribute(ARIADISABLED, newProp.disabled + '');
16008
+ break;
15672
16009
  }
15673
16010
  }
15674
16011
  };
15675
16012
  Breadcrumb.prototype.wireEvents = function () {
16013
+ this.delegateClickHanlder = this.documentClickHandler.bind(this);
16014
+ EventHandler.add(document, 'click', this.delegateClickHanlder, this);
15676
16015
  EventHandler.add(this.element, 'click', this.clickHandler, this);
15677
16016
  window.addEventListener('resize', this.resize.bind(this));
15678
16017
  };
16018
+ Breadcrumb.prototype.popupWireEvents = function () {
16019
+ EventHandler.add(this.popupObj.element, 'click', this.clickHandler, this);
16020
+ EventHandler.add(this.popupObj.element, 'keydown', this.popupKeyDownHandler, this);
16021
+ };
15679
16022
  Breadcrumb.prototype.unWireEvents = function () {
16023
+ EventHandler.remove(document, 'click', this.delegateClickHanlder);
15680
16024
  EventHandler.remove(this.element, 'click', this.clickHandler);
15681
16025
  window.removeEventListener('resize', this.resize.bind(this));
16026
+ if (this.popupObj) {
16027
+ EventHandler.remove(this.popupObj.element, 'click', this.clickHandler);
16028
+ EventHandler.remove(this.popupObj.element, 'keydown', this.popupKeyDownHandler);
16029
+ }
15682
16030
  };
15683
16031
  /**
15684
16032
  * Get the properties to be maintained in the persisted state.
@@ -15703,11 +16051,32 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15703
16051
  * @returns {void}
15704
16052
  */
15705
16053
  Breadcrumb.prototype.destroy = function () {
15706
- this.unWireEvents();
15707
- this.element.innerHTML = '';
16054
+ var _this = this;
16055
+ var classes = [];
16056
+ var attributes$$1 = ['aria-label'];
15708
16057
  if (this.cssClass) {
15709
- removeClass([this.element], this.cssClass.split(' '));
16058
+ classes.concat(this.cssClass.split(' '));
15710
16059
  }
16060
+ if (this.enableRtl) {
16061
+ classes.push('e-rtl');
16062
+ }
16063
+ if (this.disabled) {
16064
+ classes.push(DISABLEDCLASS);
16065
+ attributes$$1.push(ARIADISABLED);
16066
+ }
16067
+ if (this.overflowMode === 'Wrap') {
16068
+ classes.push(WRAPMODECLASS);
16069
+ }
16070
+ else if (this.overflowMode === 'Scroll') {
16071
+ classes.push(SCROLLMODECLASS);
16072
+ }
16073
+ this.unWireEvents();
16074
+ this.element.innerHTML = '';
16075
+ removeClass([this.element], classes);
16076
+ attributes$$1.forEach(function (attribute) {
16077
+ _this.element.removeAttribute(attribute);
16078
+ });
16079
+ _super.prototype.destroy.call(this);
15711
16080
  };
15712
16081
  __decorate$10([
15713
16082
  Property('')
@@ -15719,17 +16088,14 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15719
16088
  Property('')
15720
16089
  ], Breadcrumb.prototype, "activeItem", void 0);
15721
16090
  __decorate$10([
15722
- Property(0)
16091
+ Property(-1)
15723
16092
  ], Breadcrumb.prototype, "maxItems", void 0);
15724
16093
  __decorate$10([
15725
- Property('Default')
16094
+ Property('Menu')
15726
16095
  ], Breadcrumb.prototype, "overflowMode", void 0);
15727
16096
  __decorate$10([
15728
16097
  Property('')
15729
16098
  ], Breadcrumb.prototype, "cssClass", void 0);
15730
- __decorate$10([
15731
- Property('')
15732
- ], Breadcrumb.prototype, "width", void 0);
15733
16099
  __decorate$10([
15734
16100
  Property(null)
15735
16101
  ], Breadcrumb.prototype, "itemTemplate", void 0);
@@ -15742,6 +16108,9 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15742
16108
  __decorate$10([
15743
16109
  Property(false)
15744
16110
  ], Breadcrumb.prototype, "enableActiveItemNavigation", void 0);
16111
+ __decorate$10([
16112
+ Property(false)
16113
+ ], Breadcrumb.prototype, "disabled", void 0);
15745
16114
  __decorate$10([
15746
16115
  Property('')
15747
16116
  ], Breadcrumb.prototype, "locale", void 0);