@syncfusion/ej2-navigations 19.3.54 → 19.4.40

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 (256) 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 +58 -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 +525 -147
  7. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  8. package/dist/es6/ej2-navigations.es5.js +532 -148
  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 -12
  14. package/src/accordion/accordion-model.d.ts +5 -5
  15. package/src/accordion/accordion.d.ts +5 -5
  16. package/src/accordion/accordion.js +2 -19
  17. package/src/breadcrumb/breadcrumb-model.d.ts +23 -11
  18. package/src/breadcrumb/breadcrumb.d.ts +33 -10
  19. package/src/breadcrumb/breadcrumb.js +320 -78
  20. package/src/common/menu-base.js +2 -2
  21. package/src/common/v-scroll.js +1 -1
  22. package/src/sidebar/sidebar.js +4 -4
  23. package/src/tab/tab-model.d.ts +14 -6
  24. package/src/tab/tab.d.ts +26 -15
  25. package/src/tab/tab.js +56 -27
  26. package/src/toolbar/toolbar-model.d.ts +7 -7
  27. package/src/toolbar/toolbar.d.ts +6 -6
  28. package/src/toolbar/toolbar.js +81 -13
  29. package/src/treeview/treeview-model.d.ts +10 -0
  30. package/src/treeview/treeview.d.ts +13 -0
  31. package/src/treeview/treeview.js +68 -5
  32. package/styles/accordion/_bootstrap-dark-definition.scss +4 -0
  33. package/styles/accordion/_bootstrap-definition.scss +4 -0
  34. package/styles/accordion/_bootstrap4-definition.scss +4 -0
  35. package/styles/accordion/_bootstrap5-definition.scss +39 -35
  36. package/styles/accordion/_fabric-dark-definition.scss +4 -0
  37. package/styles/accordion/_fabric-definition.scss +4 -0
  38. package/styles/accordion/_fluent-definition.scss +85 -0
  39. package/styles/accordion/_highcontrast-definition.scss +5 -1
  40. package/styles/accordion/_highcontrast-light-definition.scss +4 -0
  41. package/styles/accordion/_layout.scss +6 -14
  42. package/styles/accordion/_material-dark-definition.scss +4 -0
  43. package/styles/accordion/_material-definition.scss +4 -0
  44. package/styles/accordion/_tailwind-definition.scss +83 -79
  45. package/styles/accordion/_theme.scss +12 -11
  46. package/styles/accordion/bootstrap4.css +1 -2
  47. package/styles/accordion/bootstrap5-dark.css +11 -2
  48. package/styles/accordion/bootstrap5.css +11 -2
  49. package/styles/accordion/highcontrast-light.css +0 -4
  50. package/styles/accordion/highcontrast.css +1 -5
  51. package/styles/accordion/icons/_fluent.scss +17 -0
  52. package/styles/accordion/icons/_tailwind.scss +17 -17
  53. package/styles/bootstrap-dark.css +317 -84
  54. package/styles/bootstrap.css +316 -83
  55. package/styles/bootstrap4.css +317 -76
  56. package/styles/bootstrap5-dark.css +339 -75
  57. package/styles/bootstrap5.css +341 -77
  58. package/styles/breadcrumb/_bootstrap-dark-definition.scss +14 -0
  59. package/styles/breadcrumb/_bootstrap-definition.scss +13 -0
  60. package/styles/breadcrumb/_bootstrap4-definition.scss +13 -0
  61. package/styles/breadcrumb/_bootstrap5-definition.scss +15 -2
  62. package/styles/breadcrumb/_fabric-dark-definition.scss +13 -0
  63. package/styles/breadcrumb/_fabric-definition.scss +13 -0
  64. package/styles/breadcrumb/_fluent-definition.scss +59 -0
  65. package/styles/breadcrumb/_highcontrast-definition.scss +13 -0
  66. package/styles/breadcrumb/_highcontrast-light-definition.scss +13 -0
  67. package/styles/breadcrumb/_layout.scss +171 -22
  68. package/styles/breadcrumb/_material-dark-definition.scss +13 -0
  69. package/styles/breadcrumb/_material-definition.scss +13 -0
  70. package/styles/breadcrumb/_tailwind-dark-definition.scss +13 -0
  71. package/styles/breadcrumb/_tailwind-definition.scss +13 -0
  72. package/styles/breadcrumb/_theme.scss +27 -8
  73. package/styles/breadcrumb/bootstrap-dark.css +194 -17
  74. package/styles/breadcrumb/bootstrap.css +194 -17
  75. package/styles/breadcrumb/bootstrap4.css +194 -17
  76. package/styles/breadcrumb/bootstrap5-dark.css +198 -24
  77. package/styles/breadcrumb/bootstrap5.css +198 -24
  78. package/styles/breadcrumb/fabric-dark.css +197 -20
  79. package/styles/breadcrumb/fabric.css +197 -20
  80. package/styles/breadcrumb/highcontrast-light.css +200 -22
  81. package/styles/breadcrumb/highcontrast.css +200 -22
  82. package/styles/breadcrumb/icons/_bootstrap-dark.scss +2 -1
  83. package/styles/breadcrumb/icons/_bootstrap.scss +2 -1
  84. package/styles/breadcrumb/icons/_bootstrap4.scss +2 -1
  85. package/styles/breadcrumb/icons/_bootstrap5.scss +2 -1
  86. package/styles/breadcrumb/icons/_fabric-dark.scss +2 -1
  87. package/styles/breadcrumb/icons/_fabric.scss +2 -1
  88. package/styles/breadcrumb/icons/_fluent.scss +25 -0
  89. package/styles/breadcrumb/icons/_highcontrast-light.scss +2 -1
  90. package/styles/breadcrumb/icons/_highcontrast.scss +2 -1
  91. package/styles/breadcrumb/icons/_material-dark.scss +2 -1
  92. package/styles/breadcrumb/icons/_material.scss +2 -1
  93. package/styles/breadcrumb/icons/_tailwind-dark.scss +2 -1
  94. package/styles/breadcrumb/icons/_tailwind.scss +2 -1
  95. package/styles/breadcrumb/material-dark.css +186 -13
  96. package/styles/breadcrumb/material.css +186 -13
  97. package/styles/breadcrumb/tailwind-dark.css +195 -22
  98. package/styles/breadcrumb/tailwind.css +195 -22
  99. package/styles/context-menu/_bootstrap-dark-definition.scss +1 -1
  100. package/styles/context-menu/_bootstrap-definition.scss +1 -1
  101. package/styles/context-menu/_bootstrap4-definition.scss +1 -1
  102. package/styles/context-menu/_bootstrap5-definition.scss +5 -5
  103. package/styles/context-menu/_fluent-definition.scss +52 -0
  104. package/styles/context-menu/_material-dark-definition.scss +1 -1
  105. package/styles/context-menu/_material-definition.scss +1 -1
  106. package/styles/context-menu/_tailwind-definition.scss +1 -1
  107. package/styles/context-menu/bootstrap-dark.css +1 -1
  108. package/styles/context-menu/bootstrap.css +1 -1
  109. package/styles/context-menu/bootstrap4.css +1 -1
  110. package/styles/context-menu/bootstrap5-dark.css +5 -5
  111. package/styles/context-menu/bootstrap5.css +6 -6
  112. package/styles/context-menu/icons/_fluent.scss +32 -0
  113. package/styles/context-menu/material-dark.css +1 -1
  114. package/styles/context-menu/material.css +1 -1
  115. package/styles/context-menu/tailwind-dark.css +1 -1
  116. package/styles/context-menu/tailwind.css +1 -1
  117. package/styles/fabric-dark.css +305 -41
  118. package/styles/fabric.css +308 -44
  119. package/styles/h-scroll/_fluent-definition.scss +78 -0
  120. package/styles/h-scroll/_tailwind-definition.scss +78 -78
  121. package/styles/h-scroll/_theme.scss +1 -1
  122. package/styles/h-scroll/bootstrap-dark.css +1 -1
  123. package/styles/h-scroll/bootstrap.css +1 -1
  124. package/styles/h-scroll/bootstrap4.css +1 -1
  125. package/styles/h-scroll/bootstrap5-dark.css +1 -1
  126. package/styles/h-scroll/bootstrap5.css +1 -1
  127. package/styles/h-scroll/fabric-dark.css +1 -1
  128. package/styles/h-scroll/fabric.css +1 -1
  129. package/styles/h-scroll/highcontrast-light.css +1 -1
  130. package/styles/h-scroll/highcontrast.css +1 -1
  131. package/styles/h-scroll/icons/_fluent.scss +49 -0
  132. package/styles/h-scroll/icons/_tailwind.scss +49 -49
  133. package/styles/h-scroll/material-dark.css +1 -1
  134. package/styles/h-scroll/material.css +1 -1
  135. package/styles/h-scroll/tailwind-dark.css +1 -1
  136. package/styles/h-scroll/tailwind.css +1 -1
  137. package/styles/highcontrast-light.css +317 -47
  138. package/styles/highcontrast.css +322 -52
  139. package/styles/material-dark.css +295 -32
  140. package/styles/material.css +296 -33
  141. package/styles/menu/_fluent-definition.scss +68 -0
  142. package/styles/menu/_layout.scss +1 -1
  143. package/styles/menu/_theme.scss +9 -0
  144. package/styles/menu/bootstrap-dark.css +1 -1
  145. package/styles/menu/bootstrap.css +1 -1
  146. package/styles/menu/bootstrap4.css +1 -1
  147. package/styles/menu/bootstrap5-dark.css +4 -4
  148. package/styles/menu/bootstrap5.css +5 -5
  149. package/styles/menu/icons/_fluent.scss +133 -0
  150. package/styles/menu/material-dark.css +1 -1
  151. package/styles/menu/material.css +1 -1
  152. package/styles/menu/tailwind-dark.css +1 -1
  153. package/styles/menu/tailwind.css +1 -1
  154. package/styles/sidebar/_bootstrap5-definition.scss +5 -5
  155. package/styles/sidebar/_fluent-definition.scss +5 -0
  156. package/styles/sidebar/_theme.scss +4 -2
  157. package/styles/sidebar/bootstrap5-dark.css +0 -1
  158. package/styles/sidebar/bootstrap5.css +0 -1
  159. package/styles/sidebar/tailwind-dark.css +0 -1
  160. package/styles/sidebar/tailwind.css +0 -1
  161. package/styles/tab/_bootstrap-dark-definition.scss +10 -1
  162. package/styles/tab/_bootstrap-definition.scss +10 -1
  163. package/styles/tab/_bootstrap4-definition.scss +9 -1
  164. package/styles/tab/_bootstrap5-definition.scss +401 -401
  165. package/styles/tab/_fabric-dark-definition.scss +10 -0
  166. package/styles/tab/_fabric-definition.scss +10 -0
  167. package/styles/tab/_fluent-definition.scss +409 -0
  168. package/styles/tab/_highcontrast-definition.scss +10 -0
  169. package/styles/tab/_highcontrast-light-definition.scss +10 -0
  170. package/styles/tab/_layout.scss +145 -0
  171. package/styles/tab/_material-dark-definition.scss +10 -0
  172. package/styles/tab/_material-definition.scss +10 -0
  173. package/styles/tab/_tailwind-definition.scss +431 -420
  174. package/styles/tab/_theme.scss +188 -113
  175. package/styles/tab/bootstrap-dark.css +43 -18
  176. package/styles/tab/bootstrap.css +42 -17
  177. package/styles/tab/bootstrap4.css +47 -28
  178. package/styles/tab/bootstrap5-dark.css +53 -30
  179. package/styles/tab/bootstrap5.css +53 -30
  180. package/styles/tab/fabric-dark.css +43 -20
  181. package/styles/tab/fabric.css +46 -23
  182. package/styles/tab/highcontrast-light.css +52 -19
  183. package/styles/tab/highcontrast.css +56 -23
  184. package/styles/tab/icons/_bootstrap-dark.scss +2 -2
  185. package/styles/tab/icons/_fabric-dark.scss +2 -2
  186. package/styles/tab/icons/_fluent.scss +140 -0
  187. package/styles/tab/icons/_tailwind.scss +140 -140
  188. package/styles/tab/material-dark.css +42 -15
  189. package/styles/tab/material.css +42 -15
  190. package/styles/tab/tailwind-dark.css +42 -17
  191. package/styles/tab/tailwind.css +42 -17
  192. package/styles/tailwind-dark.css +313 -50
  193. package/styles/tailwind.css +313 -50
  194. package/styles/toolbar/_bootstrap-dark-definition.scss +7 -1
  195. package/styles/toolbar/_bootstrap-definition.scss +7 -1
  196. package/styles/toolbar/_bootstrap4-definition.scss +8 -2
  197. package/styles/toolbar/_bootstrap5-definition.scss +104 -86
  198. package/styles/toolbar/_fabric-dark-definition.scss +7 -0
  199. package/styles/toolbar/_fabric-definition.scss +7 -0
  200. package/styles/toolbar/_fluent-definition.scss +149 -0
  201. package/styles/toolbar/_highcontrast-definition.scss +7 -0
  202. package/styles/toolbar/_highcontrast-light-definition.scss +7 -0
  203. package/styles/toolbar/_layout.scss +27 -72
  204. package/styles/toolbar/_material-dark-definition.scss +7 -1
  205. package/styles/toolbar/_material-definition.scss +7 -1
  206. package/styles/toolbar/_tailwind-definition.scss +149 -143
  207. package/styles/toolbar/_theme.scss +12 -15
  208. package/styles/toolbar/bootstrap-dark.css +17 -46
  209. package/styles/toolbar/bootstrap.css +17 -46
  210. package/styles/toolbar/bootstrap4.css +12 -26
  211. package/styles/toolbar/bootstrap5-dark.css +6 -7
  212. package/styles/toolbar/bootstrap5.css +6 -7
  213. package/styles/toolbar/fabric-dark.css +4 -0
  214. package/styles/toolbar/fabric.css +4 -0
  215. package/styles/toolbar/highcontrast-light.css +4 -1
  216. package/styles/toolbar/highcontrast.css +4 -1
  217. package/styles/toolbar/icons/_fluent.scss +16 -0
  218. package/styles/toolbar/icons/_tailwind.scss +16 -16
  219. package/styles/toolbar/material-dark.css +4 -1
  220. package/styles/toolbar/material.css +5 -2
  221. package/styles/toolbar/tailwind-dark.css +8 -6
  222. package/styles/toolbar/tailwind.css +8 -6
  223. package/styles/treeview/_bootstrap-dark-definition.scss +11 -0
  224. package/styles/treeview/_bootstrap-definition.scss +11 -0
  225. package/styles/treeview/_bootstrap4-definition.scss +11 -0
  226. package/styles/treeview/_bootstrap5-definition.scss +120 -109
  227. package/styles/treeview/_fabric-dark-definition.scss +11 -0
  228. package/styles/treeview/_fabric-definition.scss +11 -0
  229. package/styles/treeview/_fluent-definition.scss +120 -0
  230. package/styles/treeview/_highcontrast-definition.scss +11 -0
  231. package/styles/treeview/_highcontrast-light-definition.scss +11 -0
  232. package/styles/treeview/_layout.scss +116 -20
  233. package/styles/treeview/_material-dark-definition.scss +13 -0
  234. package/styles/treeview/_material-definition.scss +11 -0
  235. package/styles/treeview/_tailwind-definition.scss +12 -0
  236. package/styles/treeview/_theme.scss +5 -5
  237. package/styles/treeview/bootstrap-dark.css +60 -0
  238. package/styles/treeview/bootstrap.css +60 -0
  239. package/styles/treeview/bootstrap4.css +60 -0
  240. package/styles/treeview/bootstrap5-dark.css +61 -1
  241. package/styles/treeview/bootstrap5.css +61 -1
  242. package/styles/treeview/fabric-dark.css +60 -0
  243. package/styles/treeview/fabric.css +60 -0
  244. package/styles/treeview/highcontrast-light.css +60 -0
  245. package/styles/treeview/highcontrast.css +60 -0
  246. package/styles/treeview/icons/_bootstrap5.scss +43 -43
  247. package/styles/treeview/icons/_fluent.scss +43 -0
  248. package/styles/treeview/icons/_tailwind-dark.scss +43 -43
  249. package/styles/treeview/material-dark.css +60 -0
  250. package/styles/treeview/material.css +60 -0
  251. package/styles/treeview/tailwind-dark.css +65 -1
  252. package/styles/treeview/tailwind.css +65 -1
  253. package/styles/v-scroll/_fluent-definition.scss +49 -0
  254. package/styles/v-scroll/_tailwind-definition.scss +49 -49
  255. package/styles/v-scroll/icons/_fluent.scss +26 -0
  256. package/styles/v-scroll/icons/_tailwind.scss +26 -26
@@ -579,7 +579,7 @@ let VScroll = class VScroll extends Component {
579
579
  }
580
580
  scrollBar.appendChild(scrollCnt);
581
581
  ele.appendChild(scrollBar);
582
- scrollBar.style.overflowY = 'hidden';
582
+ scrollBar.style.overflow = 'hidden';
583
583
  this.scrollEle = scrollBar;
584
584
  this.scrollItems = scrollCnt;
585
585
  }
@@ -1926,8 +1926,8 @@ let MenuBase = class MenuBase extends Component {
1926
1926
  this.setBlankIconStyle(this.popupWrapper);
1927
1927
  this.wireKeyboardEvent(this.popupWrapper);
1928
1928
  rippleEffect(this.popupWrapper, { selector: '.' + ITEM });
1929
- this.popupWrapper.style.left = this.left + pageXOffset + 'px';
1930
- this.popupWrapper.style.top = this.top + pageYOffset + 'px';
1929
+ this.popupWrapper.style.left = this.left + 'px';
1930
+ this.popupWrapper.style.top = this.top + 'px';
1931
1931
  const animationOptions = this.animationSettings.effect !== 'None' ? {
1932
1932
  name: this.animationSettings.effect, duration: this.animationSettings.duration,
1933
1933
  timingFunction: this.animationSettings.easing
@@ -3156,6 +3156,7 @@ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators,
3156
3156
  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;
3157
3157
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3158
3158
  };
3159
+ /* eslint-disable @typescript-eslint/no-explicit-any */
3159
3160
  const CLS_VERTICAL = 'e-vertical';
3160
3161
  const CLS_ITEMS = 'e-toolbar-items';
3161
3162
  const CLS_ITEM = 'e-toolbar-item';
@@ -4131,9 +4132,15 @@ let Toolbar = class Toolbar extends Component {
4131
4132
  }
4132
4133
  tbarPopupHandler(isOpen) {
4133
4134
  if (this.overflowMode === 'Extended') {
4134
- isOpen ? this.add(this.element, CLS_EXTENDEDPOPOPEN) : this.remove(this.element, CLS_EXTENDEDPOPOPEN);
4135
+ if (isOpen) {
4136
+ this.add(this.element, CLS_EXTENDEDPOPOPEN);
4137
+ }
4138
+ else {
4139
+ this.remove(this.element, CLS_EXTENDEDPOPOPEN);
4140
+ }
4135
4141
  }
4136
4142
  }
4143
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4137
4144
  popupOpen(e) {
4138
4145
  const popObj = this.popObj;
4139
4146
  if (!this.isVertical) {
@@ -4179,6 +4186,7 @@ let Toolbar = class Toolbar extends Component {
4179
4186
  popObj.refreshPosition();
4180
4187
  }
4181
4188
  }
4189
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4182
4190
  popupClose(e) {
4183
4191
  const element = this.element;
4184
4192
  const popupNav = element.querySelector('.' + CLS_TBARNAV);
@@ -4535,10 +4543,20 @@ let Toolbar = class Toolbar extends Component {
4535
4543
  const popWid = (this.isVertical ? popupNav.offsetHeight : popupNav.offsetWidth) + 'px';
4536
4544
  innerItem[2].removeAttribute('style');
4537
4545
  if (this.isVertical) {
4538
- this.enableRtl ? innerItem[2].style.top = popWid : innerItem[2].style.bottom = popWid;
4546
+ if (this.enableRtl) {
4547
+ innerItem[2].style.top = popWid;
4548
+ }
4549
+ else {
4550
+ innerItem[2].style.bottom = popWid;
4551
+ }
4539
4552
  }
4540
4553
  else {
4541
- this.enableRtl ? innerItem[2].style.left = popWid : innerItem[2].style.right = popWid;
4554
+ if (this.enableRtl) {
4555
+ innerItem[2].style.left = popWid;
4556
+ }
4557
+ else {
4558
+ innerItem[2].style.right = popWid;
4559
+ }
4542
4560
  }
4543
4561
  }
4544
4562
  if (tbarWid <= margin) {
@@ -4548,10 +4566,20 @@ let Toolbar = class Toolbar extends Component {
4548
4566
  innerItem[1].removeAttribute('style');
4549
4567
  const mrgn = ((!this.isVertical ? innerItem[0].offsetWidth : innerItem[0].offsetHeight) + value) + 'px';
4550
4568
  if (this.isVertical) {
4551
- this.enableRtl ? innerItem[1].style.marginBottom = mrgn : innerItem[1].style.marginTop = mrgn;
4569
+ if (this.enableRtl) {
4570
+ innerItem[1].style.marginBottom = mrgn;
4571
+ }
4572
+ else {
4573
+ innerItem[1].style.marginTop = mrgn;
4574
+ }
4552
4575
  }
4553
4576
  else {
4554
- this.enableRtl ? innerItem[1].style.marginRight = mrgn : innerItem[1].style.marginLeft = mrgn;
4577
+ if (this.enableRtl) {
4578
+ innerItem[1].style.marginRight = mrgn;
4579
+ }
4580
+ else {
4581
+ innerItem[1].style.marginLeft = mrgn;
4582
+ }
4555
4583
  }
4556
4584
  }
4557
4585
  tbarItemAlign(item, itemEle, pos) {
@@ -4619,7 +4647,12 @@ let Toolbar = class Toolbar extends Component {
4619
4647
  let keyVal;
4620
4648
  for (let i = 0; i < key.length; i++) {
4621
4649
  keyVal = key[i];
4622
- keyVal === 'class' ? this.add(element, attr[keyVal]) : element.setAttribute(keyVal, attr[keyVal]);
4650
+ if (keyVal === 'class') {
4651
+ this.add(element, attr[keyVal]);
4652
+ }
4653
+ else {
4654
+ element.setAttribute(keyVal, attr[keyVal]);
4655
+ }
4623
4656
  }
4624
4657
  }
4625
4658
  /**
@@ -4664,7 +4697,12 @@ let Toolbar = class Toolbar extends Component {
4664
4697
  }
4665
4698
  enable(isEnable, ele);
4666
4699
  }
4667
- isEnable ? removeClass(elements, CLS_DISABLE$2) : addClass(elements, CLS_DISABLE$2);
4700
+ if (isEnable) {
4701
+ removeClass(elements, CLS_DISABLE$2);
4702
+ }
4703
+ else {
4704
+ addClass(elements, CLS_DISABLE$2);
4705
+ }
4668
4706
  }
4669
4707
  else {
4670
4708
  if (typeof (elements) === 'number') {
@@ -4850,7 +4888,12 @@ let Toolbar = class Toolbar extends Component {
4850
4888
  }
4851
4889
  else if (itemType === 'Input') {
4852
4890
  const ele = this.createElement('input');
4853
- item.id ? (ele.id = item.id) : (ele.id = getUniqueID('tbr-ipt'));
4891
+ if (item.id) {
4892
+ ele.id = item.id;
4893
+ }
4894
+ else {
4895
+ ele.id = getUniqueID('tbr-ipt');
4896
+ }
4854
4897
  innerEle.appendChild(ele);
4855
4898
  eleObj.appendTo(ele);
4856
4899
  }
@@ -4863,7 +4906,12 @@ let Toolbar = class Toolbar extends Component {
4863
4906
  const textStr = item.text;
4864
4907
  let iconCss;
4865
4908
  let iconPos;
4866
- item.id ? (dom.id = item.id) : dom.id = getUniqueID('e-tbr-btn');
4909
+ if (item.id) {
4910
+ dom.id = item.id;
4911
+ }
4912
+ else {
4913
+ dom.id = getUniqueID('e-tbr-btn');
4914
+ }
4867
4915
  const btnTxt = this.createElement('span', { className: 'e-tbar-btn-text' });
4868
4916
  if (textStr) {
4869
4917
  btnTxt.innerHTML = this.enableHtmlSanitizer ? SanitizeHtmlHelper.sanitize(textStr) : textStr;
@@ -5130,12 +5178,27 @@ let Toolbar = class Toolbar extends Component {
5130
5178
  this.refreshOverflow();
5131
5179
  break;
5132
5180
  case 'enableRtl':
5133
- newProp.enableRtl ? this.add(tEle, CLS_RTL$2) : this.remove(tEle, CLS_RTL$2);
5181
+ if (newProp.enableRtl) {
5182
+ this.add(tEle, CLS_RTL$2);
5183
+ }
5184
+ else {
5185
+ this.remove(tEle, CLS_RTL$2);
5186
+ }
5134
5187
  if (!isNullOrUndefined(this.scrollModule)) {
5135
- newProp.enableRtl ? this.add(this.scrollModule.element, CLS_RTL$2) : this.remove(this.scrollModule.element, CLS_RTL$2);
5188
+ if (newProp.enableRtl) {
5189
+ this.add(this.scrollModule.element, CLS_RTL$2);
5190
+ }
5191
+ else {
5192
+ this.remove(this.scrollModule.element, CLS_RTL$2);
5193
+ }
5136
5194
  }
5137
5195
  if (!isNullOrUndefined(this.popObj)) {
5138
- newProp.enableRtl ? this.add(this.popObj.element, CLS_RTL$2) : this.remove(this.popObj.element, CLS_RTL$2);
5196
+ if (newProp.enableRtl) {
5197
+ this.add(this.popObj.element, CLS_RTL$2);
5198
+ }
5199
+ else {
5200
+ this.remove(this.popObj.element, CLS_RTL$2);
5201
+ }
5139
5202
  }
5140
5203
  if (this.tbarAlign) {
5141
5204
  this.itemPositioning();
@@ -5189,7 +5252,12 @@ let Toolbar = class Toolbar extends Component {
5189
5252
  ele = innerItems[eleIndex];
5190
5253
  }
5191
5254
  if (ele) {
5192
- value ? ele.classList.add(CLS_HIDDEN) : ele.classList.remove(CLS_HIDDEN);
5255
+ if (value) {
5256
+ ele.classList.add(CLS_HIDDEN);
5257
+ }
5258
+ else {
5259
+ ele.classList.remove(CLS_HIDDEN);
5260
+ }
5193
5261
  if (value && isNullOrUndefined(this.element.getAttribute('tabindex')) && !ele.classList.contains(CLS_SEPARATOR)) {
5194
5262
  if (isNullOrUndefined(ele.firstElementChild.getAttribute('tabindex'))) {
5195
5263
  ele.firstElementChild.setAttribute('tabindex', '-1');
@@ -5293,6 +5361,7 @@ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators,
5293
5361
  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;
5294
5362
  return c > 3 && r && Object.defineProperty(target, key, r), r;
5295
5363
  };
5364
+ /* eslint-disable @typescript-eslint/no-explicit-any */
5296
5365
  const CLS_ACRDN_ROOT = 'e-acrdn-root';
5297
5366
  const CLS_ROOT$2 = 'e-accordion';
5298
5367
  const CLS_ITEM$1 = 'e-acrdn-item';
@@ -5547,11 +5616,9 @@ let Accordion = class Accordion extends Component {
5547
5616
  this.itemTemplateFn = this.templateParser(this.itemTemplate);
5548
5617
  }
5549
5618
  }
5550
- /* eslint-disable */
5551
5619
  getHeaderTemplate() {
5552
5620
  return this.headerTemplateFn;
5553
5621
  }
5554
- /* eslint-disable */
5555
5622
  getItemTemplate() {
5556
5623
  return this.itemTemplateFn;
5557
5624
  }
@@ -5572,7 +5639,6 @@ let Accordion = class Accordion extends Component {
5572
5639
  innerEles = this.element.children;
5573
5640
  }
5574
5641
  const items = [];
5575
- /* eslint-disable */
5576
5642
  [].slice.call(innerEles).forEach((el) => {
5577
5643
  items.push({
5578
5644
  header: (el.childElementCount > 0 && el.children[0]) ? (el.children[0]) : '',
@@ -5580,7 +5646,6 @@ let Accordion = class Accordion extends Component {
5580
5646
  });
5581
5647
  el.parentNode.removeChild(el);
5582
5648
  });
5583
- /* eslint-enable */
5584
5649
  if (rootEle) {
5585
5650
  this.element.removeChild(rootEle);
5586
5651
  }
@@ -5605,7 +5670,6 @@ let Accordion = class Accordion extends Component {
5605
5670
  this.expandItem(true, this.initExpand[i]);
5606
5671
  }
5607
5672
  }
5608
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5609
5673
  if (this.isReact) {
5610
5674
  this.renderReactTemplates();
5611
5675
  }
@@ -5640,7 +5704,6 @@ let Accordion = class Accordion extends Component {
5640
5704
  });
5641
5705
  }
5642
5706
  }
5643
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5644
5707
  if (this.isReact) {
5645
5708
  this.renderReactTemplates();
5646
5709
  }
@@ -5686,7 +5749,6 @@ let Accordion = class Accordion extends Component {
5686
5749
  else {
5687
5750
  this.afterContentRender(trgt, eventArgs, acrdnItem, acrdnHdr, acrdnCtn, acrdnCtnItem);
5688
5751
  }
5689
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5690
5752
  if (this.isReact) {
5691
5753
  this.renderReactTemplates();
5692
5754
  }
@@ -5892,7 +5954,6 @@ let Accordion = class Accordion extends Component {
5892
5954
  }
5893
5955
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
5894
5956
  fetchElement(ele, value, index, isHeader) {
5895
- /* eslint-disable */
5896
5957
  let templateFn;
5897
5958
  let temString;
5898
5959
  try {
@@ -5906,12 +5967,10 @@ let Accordion = class Accordion extends Component {
5906
5967
  catch (e) {
5907
5968
  if (typeof (value) === 'string') {
5908
5969
  ele.innerHTML = SanitizeHtmlHelper.sanitize(value);
5909
- /* eslint-disable */
5910
5970
  }
5911
5971
  else if (!isNullOrUndefined(this.trgtEle) && (value instanceof (HTMLElement))) {
5912
5972
  ele.appendChild(value);
5913
5973
  ele.firstElementChild.style.display = '';
5914
- /* eslint-enable */
5915
5974
  }
5916
5975
  else {
5917
5976
  templateFn = compile(value);
@@ -5919,7 +5978,6 @@ let Accordion = class Accordion extends Component {
5919
5978
  }
5920
5979
  let tempArray;
5921
5980
  if (!isNullOrUndefined(templateFn)) {
5922
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5923
5981
  if (this.isReact) {
5924
5982
  this.renderReactTemplates();
5925
5983
  }
@@ -5965,7 +6023,6 @@ let Accordion = class Accordion extends Component {
5965
6023
  attributes(itemcnt, { 'aria-hidden': 'true' });
5966
6024
  const ctn = this.createElement('div', { className: CLS_CTENT });
5967
6025
  if (this.dataSource.length > 0) {
5968
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5969
6026
  if (this.isReact) {
5970
6027
  this.renderReactTemplates();
5971
6028
  }
@@ -6112,7 +6169,7 @@ let Accordion = class Accordion extends Component {
6112
6169
  this.trigger('expanding', eventArgs, (expandArgs) => {
6113
6170
  if (!expandArgs.cancel) {
6114
6171
  this.expandedItemsPop(trgtItemEle);
6115
- trgtItemEle.classList.add(CLS_EXPANDSTATE);
6172
+ trgtItemEle.classList.remove(CLS_EXPANDSTATE);
6116
6173
  icon.classList.add(CLS_TOGANIMATE);
6117
6174
  if ((animation.name === 'None')) {
6118
6175
  this.collapseProgress('begin', icon, trgt, trgtItemEle, expandArgs);
@@ -6240,7 +6297,6 @@ let Accordion = class Accordion extends Component {
6240
6297
  }
6241
6298
  });
6242
6299
  }
6243
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6244
6300
  if (this.isReact) {
6245
6301
  this.renderReactTemplates();
6246
6302
  }
@@ -6261,7 +6317,6 @@ let Accordion = class Accordion extends Component {
6261
6317
  * @returns {void}.
6262
6318
  */
6263
6319
  removeItem(index) {
6264
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6265
6320
  if (this.isReact) {
6266
6321
  this.clearTemplate(['headerTemplate', 'itemTemplate'], index);
6267
6322
  }
@@ -6408,14 +6463,12 @@ let Accordion = class Accordion extends Component {
6408
6463
  this.collapse(ctn);
6409
6464
  }
6410
6465
  }
6411
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6412
6466
  if (this.isReact) {
6413
6467
  this.renderReactTemplates();
6414
6468
  }
6415
6469
  }
6416
6470
  destroyItems() {
6417
6471
  this.restoreContent(null);
6418
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6419
6472
  if (this.isReact) {
6420
6473
  this.clearTemplate();
6421
6474
  }
@@ -6450,12 +6503,10 @@ let Accordion = class Accordion extends Component {
6450
6503
  setTemplate(template, toElement, index) {
6451
6504
  toElement.innerHTML = '';
6452
6505
  this.templateCompile(toElement, template, index);
6453
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6454
6506
  if (this.isReact) {
6455
6507
  this.renderReactTemplates();
6456
6508
  }
6457
6509
  }
6458
- // eslint-disable-next-line
6459
6510
  templateCompile(ele, cnt, index) {
6460
6511
  const tempEle = this.createElement('div');
6461
6512
  this.fetchElement(tempEle, cnt, index, false);
@@ -7067,6 +7118,7 @@ const CLS_VRIGHT = 'e-vertical-right';
7067
7118
  const CLS_HBOTTOM = 'e-horizontal-bottom';
7068
7119
  const CLS_FILL = 'e-fill-mode';
7069
7120
  const TABITEMPREFIX = 'tabitem_';
7121
+ const CLS_REORDER_ACTIVE_ITEM = 'e-reorder-active-item';
7070
7122
  /**
7071
7123
  * Objects used for configuring the Tab selecting item action properties.
7072
7124
  */
@@ -7156,6 +7208,7 @@ let Tab = class Tab extends Component {
7156
7208
  this.hide = {};
7157
7209
  this.maxHeight = 0;
7158
7210
  this.title = 'Close';
7211
+ this.isInteracted = false;
7159
7212
  this.lastIndex = 0;
7160
7213
  this.isAdd = false;
7161
7214
  this.isIconAlone = false;
@@ -7734,7 +7787,7 @@ let Tab = class Tab extends Component {
7734
7787
  }
7735
7788
  else {
7736
7789
  if (!isNullOrUndefined(trgParent) && trgParent.classList.contains(CLS_ACTIVE$1) === false) {
7737
- this.select(trgIndex);
7790
+ this.selectTab(trgIndex, null, true);
7738
7791
  if (!isNullOrUndefined(this.popEle)) {
7739
7792
  this.popObj.hide(this.hide);
7740
7793
  }
@@ -8006,9 +8059,20 @@ let Tab = class Tab extends Component {
8006
8059
  setActiveBorder() {
8007
8060
  const trgHdrEle = this.getTabHeader();
8008
8061
  const trg = select('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE$1, trgHdrEle);
8009
- if (trg === null) {
8062
+ if (isNullOrUndefined(trg)) {
8010
8063
  return;
8011
8064
  }
8065
+ if (!this.reorderActiveTab) {
8066
+ if (trg.classList.contains(CLS_TB_POPUP) && !this.bdrLine.classList.contains(CLS_HIDDEN$1)) {
8067
+ this.bdrLine.classList.add(CLS_HIDDEN$1);
8068
+ }
8069
+ if (trgHdrEle && !trgHdrEle.classList.contains(CLS_REORDER_ACTIVE_ITEM)) {
8070
+ trgHdrEle.classList.add(CLS_REORDER_ACTIVE_ITEM);
8071
+ }
8072
+ }
8073
+ else if (trgHdrEle) {
8074
+ trgHdrEle.classList.remove(CLS_REORDER_ACTIVE_ITEM);
8075
+ }
8012
8076
  const root = closest(trg, '.' + CLS_TAB);
8013
8077
  if (this.element !== root) {
8014
8078
  return;
@@ -8042,11 +8106,11 @@ let Tab = class Tab extends Component {
8042
8106
  setStyleAttribute(bar, { 'left': 'auto', 'right': 'auto' });
8043
8107
  }
8044
8108
  }
8045
- if (!isNullOrUndefined(this.bdrLine)) {
8109
+ if (!isNullOrUndefined(this.bdrLine) && !trg.classList.contains(CLS_TB_POPUP)) {
8046
8110
  this.bdrLine.classList.remove(CLS_HIDDEN$1);
8047
8111
  }
8048
8112
  }
8049
- setActive(value, skipDataBind = false) {
8113
+ setActive(value, skipDataBind = false, isInteracted = false) {
8050
8114
  this.tbItem = selectAll('.' + CLS_TB_ITEM, this.getTabHeader());
8051
8115
  const trg = this.tbItem[value];
8052
8116
  if (value < 0 || isNaN(value) || this.tbItem.length === 0) {
@@ -8117,7 +8181,8 @@ let Tab = class Tab extends Component {
8117
8181
  selectedItem: trg,
8118
8182
  selectedIndex: value,
8119
8183
  selectedContent: select('#' + CLS_CONTENT$1 + this.tabId + '_' + this.selectingID, this.content),
8120
- isSwiped: this.isSwipeed
8184
+ isSwiped: this.isSwipeed,
8185
+ isInteracted: isInteracted
8121
8186
  };
8122
8187
  this.trigger('selected', eventArg);
8123
8188
  }
@@ -8208,7 +8273,7 @@ let Tab = class Tab extends Component {
8208
8273
  else {
8209
8274
  this.isPopup = false;
8210
8275
  if (!isNullOrUndefined(trgParent) && (trgIndex !== this.selectedItem || trgIndex !== this.prevIndex)) {
8211
- this.select(trgIndex, args.originalEvent);
8276
+ this.selectTab(trgIndex, args.originalEvent, true);
8212
8277
  }
8213
8278
  }
8214
8279
  }
@@ -8223,7 +8288,7 @@ let Tab = class Tab extends Component {
8223
8288
  if (e.swipeDirection === 'Right' && this.selectedItem !== 0) {
8224
8289
  for (let k = this.selectedItem - 1; k >= 0; k--) {
8225
8290
  if (!this.tbItem[k].classList.contains(CLS_HIDDEN$1)) {
8226
- this.select(k);
8291
+ this.selectTab(k, null, true);
8227
8292
  break;
8228
8293
  }
8229
8294
  }
@@ -8231,7 +8296,7 @@ let Tab = class Tab extends Component {
8231
8296
  else if (e.swipeDirection === 'Left' && (this.selectedItem !== selectAll('.' + CLS_TB_ITEM, this.element).length - 1)) {
8232
8297
  for (let i = this.selectedItem + 1; i < this.tbItem.length; i++) {
8233
8298
  if (!this.tbItem[i].classList.contains(CLS_HIDDEN$1)) {
8234
- this.select(i);
8299
+ this.selectTab(i, null, true);
8235
8300
  break;
8236
8301
  }
8237
8302
  }
@@ -8309,7 +8374,7 @@ let Tab = class Tab extends Component {
8309
8374
  }
8310
8375
  refreshActElePosition() {
8311
8376
  const activeEle = select('.' + CLS_TB_ITEM + '.' + CLS_TB_POPUP + '.' + CLS_ACTIVE$1, this.element);
8312
- if (!isNullOrUndefined(activeEle)) {
8377
+ if (!isNullOrUndefined(activeEle) && this.reorderActiveTab) {
8313
8378
  this.select(this.getEleIndex(activeEle));
8314
8379
  }
8315
8380
  this.refreshActiveBorder();
@@ -8649,7 +8714,7 @@ let Tab = class Tab extends Component {
8649
8714
  else {
8650
8715
  this.dragItem.querySelector('.' + CLS_WRAP).style.visibility = '';
8651
8716
  removeClass([this.tbItems.querySelector('.' + CLS_INDICATOR)], CLS_HIDDEN$1);
8652
- this.select(this.droppedIndex);
8717
+ this.selectTab(this.droppedIndex, null, true);
8653
8718
  }
8654
8719
  }
8655
8720
  });
@@ -8657,8 +8722,8 @@ let Tab = class Tab extends Component {
8657
8722
  /**
8658
8723
  * Enables or disables the specified Tab item. On passing value as `false`, the item will be disabled.
8659
8724
  *
8660
- * @param {number} index - Index value of target Tab item.
8661
- * @param {boolean} value - Boolean value that determines whether the command should be enabled or disabled.
8725
+ * @param {number} index - Index value of target Tab item.
8726
+ * @param {boolean} value - Boolean value that determines whether the command should be enabled or disabled.
8662
8727
  * By default, isEnable is true.
8663
8728
  * @returns {void}.
8664
8729
  */
@@ -8687,8 +8752,8 @@ let Tab = class Tab extends Component {
8687
8752
  /**
8688
8753
  * Adds new items to the Tab that accepts an array as Tab items.
8689
8754
  *
8690
- * @param {TabItemModel[]} items - An array of item that is added to the Tab.
8691
- * @param {number} index - Number value that determines where the items to be added. By default, index is 0.
8755
+ * @param {TabItemModel[]} items - An array of item that is added to the Tab.
8756
+ * @param {number} index - Number value that determines where the items to be added. By default, index is 0.
8692
8757
  * @returns {void}.
8693
8758
  */
8694
8759
  addTab(items, index) {
@@ -8771,7 +8836,7 @@ let Tab = class Tab extends Component {
8771
8836
  /**
8772
8837
  * Removes the items in the Tab from the specified index.
8773
8838
  *
8774
- * @param {number} index - Index of target item that is going to be removed.
8839
+ * @param {number} index - Index of target item that is going to be removed.
8775
8840
  * @returns {void}.
8776
8841
  */
8777
8842
  removeTab(index) {
@@ -8810,8 +8875,8 @@ let Tab = class Tab extends Component {
8810
8875
  /**
8811
8876
  * Shows or hides the Tab that is in the specified index.
8812
8877
  *
8813
- * @param {number} index - Index value of target item.
8814
- * @param {boolean} value - Based on this Boolean value, item will be hide (false) or show (true). By default, value is true.
8878
+ * @param {number} index - Index value of target item.
8879
+ * @param {boolean} value - Based on this Boolean value, item will be hide (false) or show (true). By default, value is true.
8815
8880
  * @returns {void}.
8816
8881
  */
8817
8882
  hideTab(index, value) {
@@ -8871,12 +8936,16 @@ let Tab = class Tab extends Component {
8871
8936
  this.tbObj.refreshOverflow();
8872
8937
  }
8873
8938
  }
8939
+ selectTab(args, event = null, isInteracted = false) {
8940
+ this.isInteracted = isInteracted;
8941
+ this.select(args, event);
8942
+ }
8874
8943
  /**
8875
8944
  * Specifies the index or HTMLElement to select an item from the Tab.
8876
8945
  *
8877
- * @param {number | HTMLElement} args - Index or DOM element is used for selecting an item from the Tab.
8946
+ * @param {number | HTMLElement} args - Index or DOM element is used for selecting an item from the Tab.
8878
8947
  * @param {Event} event - An event which takes place in DOM.
8879
- * @returns {void}.
8948
+ * @returns {void}
8880
8949
  */
8881
8950
  select(args, event) {
8882
8951
  const tabHeader = this.getTabHeader();
@@ -8913,20 +8982,22 @@ let Tab = class Tab extends Component {
8913
8982
  selectingContent: !isNullOrUndefined(this.content) ?
8914
8983
  select('#' + CLS_CONTENT$1 + this.tabId + '_' + this.selectingID, this.content) : null,
8915
8984
  isSwiped: this.isSwipeed,
8985
+ isInteracted: this.isInteracted,
8916
8986
  cancel: false
8917
8987
  };
8918
8988
  if (!this.initRender) {
8919
8989
  this.trigger('selecting', eventArg, (selectArgs) => {
8920
8990
  if (!selectArgs.cancel) {
8921
- this.selectingContent(args);
8991
+ this.selectingContent(args, this.isInteracted);
8922
8992
  }
8923
8993
  });
8924
8994
  }
8925
8995
  else {
8926
- this.selectingContent(args);
8996
+ this.selectingContent(args, this.isInteracted);
8927
8997
  }
8998
+ this.isInteracted = false;
8928
8999
  }
8929
- selectingContent(args) {
9000
+ selectingContent(args, isInteracted) {
8930
9001
  if (typeof args === 'number') {
8931
9002
  if (!isNullOrUndefined(this.tbItem[args]) && (this.tbItem[args].classList.contains(CLS_DISABLE$4) ||
8932
9003
  this.tbItem[args].classList.contains(CLS_HIDDEN$1))) {
@@ -8942,8 +9013,8 @@ let Tab = class Tab extends Component {
8942
9013
  }
8943
9014
  if (this.tbItem.length > args && args >= 0 && !isNaN(args)) {
8944
9015
  this.prevIndex = this.selectedItem;
8945
- if (this.tbItem[args].classList.contains(CLS_TB_POPUP)) {
8946
- this.setActive(this.popupHandler(this.tbItem[args]));
9016
+ if (this.tbItem[args].classList.contains(CLS_TB_POPUP) && this.reorderActiveTab) {
9017
+ this.setActive(this.popupHandler(this.tbItem[args]), null, isInteracted);
8947
9018
  if ((!isNullOrUndefined(this.items) && this.items.length > 0) && this.allowDragAndDrop) {
8948
9019
  this.tbItem = selectAll('.' + CLS_TB_ITEMS + ' .' + CLS_TB_ITEM, this.hdrEle);
8949
9020
  let item = this.items[args];
@@ -8952,15 +9023,15 @@ let Tab = class Tab extends Component {
8952
9023
  }
8953
9024
  }
8954
9025
  else {
8955
- this.setActive(args);
9026
+ this.setActive(args, null, isInteracted);
8956
9027
  }
8957
9028
  }
8958
9029
  else {
8959
- this.setActive(0);
9030
+ this.setActive(0, null, isInteracted);
8960
9031
  }
8961
9032
  }
8962
9033
  else if (args instanceof (HTMLElement)) {
8963
- this.setActive(this.getEleIndex(args));
9034
+ this.setActive(this.getEleIndex(args), null, isInteracted);
8964
9035
  }
8965
9036
  }
8966
9037
  /**
@@ -9041,6 +9112,9 @@ let Tab = class Tab extends Component {
9041
9112
  case 'showCloseButton':
9042
9113
  this.setCloseButton(newProp.showCloseButton);
9043
9114
  break;
9115
+ case 'reorderActiveTab':
9116
+ this.refreshActElePosition();
9117
+ break;
9044
9118
  case 'selectedItem':
9045
9119
  this.selectedItem = oldProp.selectedItem;
9046
9120
  this.select(newProp.selectedItem);
@@ -9234,6 +9308,9 @@ __decorate$7([
9234
9308
  __decorate$7([
9235
9309
  Property(false)
9236
9310
  ], Tab.prototype, "showCloseButton", void 0);
9311
+ __decorate$7([
9312
+ Property(true)
9313
+ ], Tab.prototype, "reorderActiveTab", void 0);
9237
9314
  __decorate$7([
9238
9315
  Property()
9239
9316
  ], Tab.prototype, "scrollStep", void 0);
@@ -9300,6 +9377,8 @@ const COLLAPSIBLE = 'e-icon-collapsible';
9300
9377
  const EXPANDABLE = 'e-icon-expandable';
9301
9378
  const LISTITEM = 'e-list-item';
9302
9379
  const LISTTEXT = 'e-list-text';
9380
+ const LISTWRAP = 'e-text-wrap';
9381
+ const IELISTWRAP = 'e-ie-wrap';
9303
9382
  const PARENTITEM = 'e-list-parent';
9304
9383
  const HOVER = 'e-hover';
9305
9384
  const ACTIVE = 'e-active';
@@ -9452,6 +9531,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
9452
9531
  this.isFieldChange = false;
9453
9532
  this.changeDataSource = false;
9454
9533
  this.hasTemplate = false;
9534
+ this.isFirstRender = false;
9455
9535
  this.mouseDownStatus = false;
9456
9536
  }
9457
9537
  /**
@@ -9574,6 +9654,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
9574
9654
  this.setCssClass(null, this.cssClass);
9575
9655
  this.setEnableRtl();
9576
9656
  this.setFullRow(this.fullRowSelect);
9657
+ this.setTextWrap();
9577
9658
  this.nodeTemplateFn = this.templateComplier(this.nodeTemplate);
9578
9659
  }
9579
9660
  setDisabledMode() {
@@ -10238,6 +10319,10 @@ let TreeView = TreeView_1 = class TreeView extends Component {
10238
10319
  let id = childItems[i][this.fields.id] ? childItems[i][this.fields.id].toString() : null;
10239
10320
  if (this.checkedNodes.indexOf(id) !== -1) {
10240
10321
  this.checkedNodes.splice(this.checkedNodes.indexOf(id), 1);
10322
+ let ele = this.element.querySelector('[data-uid="' + id + '"]');
10323
+ if (ele) {
10324
+ this.changeState(ele, 'uncheck', null);
10325
+ }
10241
10326
  }
10242
10327
  }
10243
10328
  if (this.parentNodeCheck.indexOf(node) !== -1) {
@@ -10468,6 +10553,9 @@ let TreeView = TreeView_1 = class TreeView extends Component {
10468
10553
  changeState(wrapper, state, e, isPrevent, isAdd, doCheck) {
10469
10554
  let eventArgs;
10470
10555
  let currLi = closest(wrapper, '.' + LISTITEM);
10556
+ if (wrapper === currLi) {
10557
+ wrapper = select('.' + CHECKBOXWRAP, currLi);
10558
+ }
10471
10559
  if (!isPrevent) {
10472
10560
  this.checkActionNodes = [];
10473
10561
  eventArgs = this.getCheckEvent(currLi, state, e);
@@ -10551,11 +10639,36 @@ let TreeView = TreeView_1 = class TreeView extends Component {
10551
10639
  addClass([firstNode], FOCUS);
10552
10640
  this.updateIdAttr(null, firstNode);
10553
10641
  }
10642
+ if (this.allowTextWrap) {
10643
+ this.updateWrap();
10644
+ }
10554
10645
  this.renderReactTemplates();
10555
10646
  this.hasPid = this.rootData[0] ? this.rootData[0].hasOwnProperty(this.fields.parentID) : false;
10556
10647
  this.doExpandAction();
10557
10648
  }
10558
10649
  }
10650
+ setTextWrap() {
10651
+ (this.allowTextWrap ? addClass : removeClass)([this.element], LISTWRAP);
10652
+ if (Browser.isIE) {
10653
+ (this.allowTextWrap ? addClass : removeClass)([this.element], IELISTWRAP);
10654
+ }
10655
+ }
10656
+ updateWrap(ulEle) {
10657
+ if (!this.fullRowSelect) {
10658
+ return;
10659
+ }
10660
+ const liEle = ulEle ? selectAll('.' + LISTITEM, ulEle) : this.liList;
10661
+ const length = liEle.length;
10662
+ for (let i = 0; i < length; i++) {
10663
+ this.calculateWrap(liEle[i]);
10664
+ }
10665
+ }
10666
+ calculateWrap(liEle) {
10667
+ const element = select('.' + FULLROW, liEle);
10668
+ if (element && element.nextElementSibling) {
10669
+ element.style.height = this.allowTextWrap ? element.nextElementSibling.offsetHeight + 'px' : '';
10670
+ }
10671
+ }
10559
10672
  doExpandAction() {
10560
10673
  let eUids = this.expandedNodes;
10561
10674
  if (this.isInitalExpand && eUids.length > 0) {
@@ -10791,6 +10904,10 @@ let TreeView = TreeView_1 = class TreeView extends Component {
10791
10904
  currLi.style.height = '';
10792
10905
  removeClass([icon], PROCESS);
10793
10906
  this.addExpand(currLi);
10907
+ if (this.allowTextWrap && this.isLoaded && this.isFirstRender) {
10908
+ this.updateWrap(currLi);
10909
+ this.isFirstRender = false;
10910
+ }
10794
10911
  if (this.isLoaded && this.expandArgs && !this.isRefreshed) {
10795
10912
  this.expandArgs = this.getExpandEvent(currLi, null);
10796
10913
  this.trigger('nodeExpanded', this.expandArgs);
@@ -11291,6 +11408,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
11291
11408
  this.expandNode(currLi, icon);
11292
11409
  }
11293
11410
  else {
11411
+ this.isFirstRender = true;
11294
11412
  this.renderChildNodes(currLi, expandChild, callback);
11295
11413
  let liEles = selectAll('.' + LISTITEM, currLi);
11296
11414
  for (let i = 0; i < liEles.length; i++) {
@@ -11461,8 +11579,10 @@ let TreeView = TreeView_1 = class TreeView extends Component {
11461
11579
  nodeCheckingAction(checkWrap, isCheck, li, eventArgs, e) {
11462
11580
  if (this.checkedElement.indexOf(li.getAttribute('data-uid')) === -1) {
11463
11581
  this.checkedElement.push(li.getAttribute('data-uid'));
11464
- let child = this.getChildNodes(this.treeData, li.getAttribute('data-uid'));
11465
- (child !== null) ? this.allCheckNode(child, this.checkedElement, null, null, false) : child = null;
11582
+ if (this.autoCheck) {
11583
+ let child = this.getChildNodes(this.treeData, li.getAttribute('data-uid'));
11584
+ (child !== null) ? this.allCheckNode(child, this.checkedElement, null, null, false) : child = null;
11585
+ }
11466
11586
  }
11467
11587
  this.changeState(checkWrap, isCheck ? 'uncheck' : 'check', e, true);
11468
11588
  if (this.autoCheck) {
@@ -11628,11 +11748,17 @@ let TreeView = TreeView_1 = class TreeView extends Component {
11628
11748
  if (newCheck.indexOf(childId.toString()) === -1 && isNullOrUndefined(checked)) {
11629
11749
  newCheck.push(childId.toString());
11630
11750
  }
11751
+ let hierChildId = getValue(this.fields.child.toString(), child[length]);
11631
11752
  //Gets if any next level children are available for child nodes
11632
- if (getValue(this.fields.hasChildren, child[length]) === true ||
11633
- getValue(this.fields.child.toString(), child[length])) {
11753
+ if (getValue(this.fields.hasChildren, child[length]) === true || hierChildId) {
11634
11754
  let id = getValue(this.fields.id, child[length]);
11635
- let childId = this.getChildNodes(this.treeData, id.toString());
11755
+ let childId;
11756
+ if (this.dataType === 1) {
11757
+ childId = this.getChildNodes(this.treeData, id.toString());
11758
+ }
11759
+ else {
11760
+ childId = hierChildId;
11761
+ }
11636
11762
  if (childId) {
11637
11763
  (isNullOrUndefined(validateCheck)) ? this.allCheckNode(childId, newCheck, checked, childCheck) :
11638
11764
  this.allCheckNode(childId, newCheck, checked, childCheck, validateCheck);
@@ -11975,6 +12101,9 @@ let TreeView = TreeView_1 = class TreeView extends Component {
11975
12101
  removeClass([liEle], EDITING);
11976
12102
  txtEle.focus();
11977
12103
  }
12104
+ if (this.allowTextWrap) {
12105
+ this.calculateWrap(liEle);
12106
+ }
11978
12107
  }
11979
12108
  getElement(ele) {
11980
12109
  if (isNullOrUndefined(ele)) {
@@ -13561,6 +13690,10 @@ let TreeView = TreeView_1 = class TreeView extends Component {
13561
13690
  this.setMultiSelect(this.allowMultiSelection);
13562
13691
  this.addMultiSelect(this.allowMultiSelection);
13563
13692
  break;
13693
+ case 'allowTextWrap':
13694
+ this.setTextWrap();
13695
+ this.updateWrap();
13696
+ break;
13564
13697
  case 'checkedNodes':
13565
13698
  if (this.showCheckBox) {
13566
13699
  this.checkedNodes = oldProp.checkedNodes;
@@ -13612,6 +13745,10 @@ let TreeView = TreeView_1 = class TreeView extends Component {
13612
13745
  case 'fullRowSelect':
13613
13746
  this.setFullRow(this.fullRowSelect);
13614
13747
  this.addFullRow(this.fullRowSelect);
13748
+ if (this.allowTextWrap) {
13749
+ this.setTextWrap();
13750
+ this.updateWrap();
13751
+ }
13615
13752
  break;
13616
13753
  case 'loadOnDemand':
13617
13754
  if (this.loadOnDemand === false && !this.onLoaded) {
@@ -14050,6 +14187,9 @@ __decorate$8([
14050
14187
  __decorate$8([
14051
14188
  Property(false)
14052
14189
  ], TreeView.prototype, "allowMultiSelection", void 0);
14190
+ __decorate$8([
14191
+ Property(false)
14192
+ ], TreeView.prototype, "allowTextWrap", void 0);
14053
14193
  __decorate$8([
14054
14194
  Complex({}, NodeAnimationSettings)
14055
14195
  ], TreeView.prototype, "animation", void 0);
@@ -14417,7 +14557,7 @@ let Sidebar = class Sidebar extends Component {
14417
14557
  setTimeOut() {
14418
14558
  const sibling = document.querySelector('.e-main-content') || this.targetEle;
14419
14559
  const elementWidth = this.element.getBoundingClientRect().width;
14420
- if (this.element.classList.contains(OPEN) && sibling) {
14560
+ if (this.element.classList.contains(OPEN) && sibling && !(this.type === 'Over' && this.enableDock)) {
14421
14561
  if (this.position === 'Left') {
14422
14562
  sibling.style.marginLeft = this.setDimension(this.width === 'auto' ? elementWidth : this.width);
14423
14563
  }
@@ -14724,7 +14864,7 @@ let Sidebar = class Sidebar extends Component {
14724
14864
  const sibling = document.querySelector('.e-main-content') || this.targetEle;
14725
14865
  if (sibling) {
14726
14866
  sibling.style.transform = 'translateX(' + 0 + 'px)';
14727
- if (!Browser.isDevice && this.type !== 'Auto') {
14867
+ if (!Browser.isDevice && this.type !== 'Auto' && !(this.type === 'Over' && this.enableDock)) {
14728
14868
  sibling.style[this.position === 'Left' ? 'marginLeft' : 'marginRight'] = '0px';
14729
14869
  }
14730
14870
  }
@@ -14746,9 +14886,9 @@ let Sidebar = class Sidebar extends Component {
14746
14886
  break;
14747
14887
  case 'Over':
14748
14888
  addClass([this.element], [OVER]);
14749
- if (this.enableDock && this.element.classList.contains(CLOSE)) {
14889
+ if (this.enableDock && (this.element.classList.contains(CLOSE) || this.isOpen)) {
14750
14890
  if (sibling) {
14751
- sibling.style[this.position === 'Left' ? 'marginLeft' : 'marginRight'] = margin;
14891
+ sibling.style[this.position === 'Left' ? 'marginLeft' : 'marginRight'] = this.setDimension(this.dockSize);
14752
14892
  }
14753
14893
  }
14754
14894
  break;
@@ -14889,6 +15029,15 @@ var __decorate$10 = (undefined && undefined.__decorate) || function (decorators,
14889
15029
  const ICONRIGHT = 'e-icon-right';
14890
15030
  const ITEMTEXTCLASS = 'e-breadcrumb-text';
14891
15031
  const ICONCLASS = 'e-breadcrumb-icon';
15032
+ const MENUCLASS = 'e-breadcrumb-menu';
15033
+ const ITEMCLASS = 'e-breadcrumb-item';
15034
+ const POPUPCLASS = 'e-breadcrumb-popup';
15035
+ const WRAPMODECLASS = 'e-breadcrumb-wrap-mode';
15036
+ const SCROLLMODECLASS = 'e-breadcrumb-scroll-mode';
15037
+ const TABINDEX = 'tabindex';
15038
+ const DISABLEDCLASS = 'e-disabled';
15039
+ const ARIADISABLED = 'aria-disabled';
15040
+ const DOT = '.';
14892
15041
  class BreadcrumbItem extends ChildProperty {
14893
15042
  }
14894
15043
  __decorate$10([
@@ -14900,6 +15049,9 @@ __decorate$10([
14900
15049
  __decorate$10([
14901
15050
  Property(null)
14902
15051
  ], BreadcrumbItem.prototype, "iconCss", void 0);
15052
+ __decorate$10([
15053
+ Property(false)
15054
+ ], BreadcrumbItem.prototype, "disabled", void 0);
14903
15055
  /**
14904
15056
  * Breadcrumb is a graphical user interface that helps to identify or highlight the current location within a hierarchical structure of websites.
14905
15057
  * The aim is to make the user aware of their current position in a hierarchy of website links.
@@ -14951,20 +15103,48 @@ let Breadcrumb = class Breadcrumb extends Component {
14951
15103
  if (this.enableRtl) {
14952
15104
  this.element.classList.add('e-rtl');
14953
15105
  }
14954
- this.setWidth();
15106
+ if (this.disabled) {
15107
+ this.element.classList.add(DISABLEDCLASS);
15108
+ this.element.setAttribute(ARIADISABLED, 'true');
15109
+ }
15110
+ if (this.overflowMode === 'Wrap') {
15111
+ this.element.classList.add(WRAPMODECLASS);
15112
+ }
15113
+ else if (this.overflowMode === 'Scroll') {
15114
+ this.element.classList.add(SCROLLMODECLASS);
15115
+ }
14955
15116
  this.initItems();
14956
15117
  this.initPvtProps();
14957
15118
  }
14958
15119
  initPvtProps() {
14959
- if (this.overflowMode === 'Default' && this._maxItems > 0) {
14960
- this.startIndex = this.items.length - (this._maxItems - 1);
14961
- this.endIndex = this.items.length - 1;
15120
+ if (this.overflowMode === 'Hidden' && this._maxItems > 0) {
15121
+ this.endIndex = this.getEndIndex();
15122
+ this.startIndex = this.endIndex + 1 - (this._maxItems - 1);
15123
+ }
15124
+ if (this.overflowMode === 'Menu') {
15125
+ if (this._maxItems >= 0) {
15126
+ this.startIndex = this._maxItems > 1 ? 1 : 0;
15127
+ this.endIndex = this.getEndIndex();
15128
+ this.popupUl = this.createElement('ul', { attrs: { TABINDEX: '0', 'role': 'menu' } });
15129
+ }
15130
+ else {
15131
+ this.startIndex = this.endIndex = null;
15132
+ }
14962
15133
  }
14963
15134
  }
14964
- setWidth() {
14965
- if (this.width) {
14966
- this.element.style.width = this.width;
15135
+ getEndIndex() {
15136
+ let endIndex;
15137
+ if (this.activeItem) {
15138
+ this.items.forEach((item, idx) => {
15139
+ if (item.url === this.activeItem || item.text === this.activeItem) {
15140
+ endIndex = idx;
15141
+ }
15142
+ });
15143
+ }
15144
+ else {
15145
+ endIndex = this.items.length - 1;
14967
15146
  }
15147
+ return endIndex;
14968
15148
  }
14969
15149
  initItems() {
14970
15150
  if (!this.items.length) {
@@ -14972,7 +15152,7 @@ let Breadcrumb = class Breadcrumb extends Component {
14972
15152
  let uri;
14973
15153
  const items = [];
14974
15154
  if (this.url) {
14975
- const url = new URL(this.url);
15155
+ const url = new URL(this.url, window.location.origin);
14976
15156
  baseUri = url.origin + '/';
14977
15157
  uri = url.href.split(baseUri)[1].split('/');
14978
15158
  }
@@ -14998,13 +15178,19 @@ let Breadcrumb = class Breadcrumb extends Component {
14998
15178
  if (itemsLength) {
14999
15179
  let isActiveItem;
15000
15180
  let isLastItem;
15181
+ let isLastItemInPopup;
15001
15182
  let j = 0;
15183
+ let wrapDiv;
15002
15184
  const len = (itemsLength * 2) - 1;
15003
- const ol = this.createElement('ol');
15185
+ let isItemCancelled = false;
15186
+ const ol = this.createElement('ol', { className: this.overflowMode === 'Wrap' ? 'e-breadcrumb-wrapped-ol' : '' });
15187
+ const firstOl = this.createElement('ol', { className: this.overflowMode === 'Wrap' ? 'e-breadcrumb-first-ol' : '' });
15004
15188
  const showIcon = this.hasField(items, 'iconCss');
15005
- const isDisabled = this.element.classList.contains('e-disabled');
15006
- const isCollasped = (this.overflowMode === 'Collapsed' && this._maxItems > 0 && itemsLength > this.maxItems && !this.isExpanded);
15007
- const isDefaultOverflowMode = (this.overflowMode === 'Default' && this._maxItems > 0);
15189
+ const isCollasped = (this.overflowMode === 'Collapsed' && this._maxItems > 0 && itemsLength > this._maxItems && !this.isExpanded);
15190
+ const isDefaultOverflowMode = (this.overflowMode === 'Hidden' && this._maxItems > 0);
15191
+ if (this.overflowMode === 'Menu' && this.popupUl) {
15192
+ this.popupUl.innerHTML = '';
15193
+ }
15008
15194
  const listBaseOptions = {
15009
15195
  moduleName: this.getModuleName(),
15010
15196
  showIcon: showIcon,
@@ -15013,7 +15199,9 @@ let Breadcrumb = class Breadcrumb extends Component {
15013
15199
  const isLastItem = args.curData.isLastItem;
15014
15200
  if (isLastItem && args.item.children.length && !this.itemTemplate) {
15015
15201
  delete args.curData.isLastItem;
15016
- args.item.innerHTML = this.createElement('span', { className: ITEMTEXTCLASS, innerHTML: args.item.children[0].innerHTML }).outerHTML;
15202
+ if (!isLastItemInPopup && !this.enableActiveItemNavigation) {
15203
+ args.item.innerHTML = this.createElement('span', { className: ITEMTEXTCLASS, innerHTML: args.item.children[0].innerHTML }).outerHTML;
15204
+ }
15017
15205
  }
15018
15206
  if (args.curData.iconCss && !args.curData.text && !this.itemTemplate) {
15019
15207
  args.item.classList.add('e-icon-item');
@@ -15021,41 +15209,40 @@ let Breadcrumb = class Breadcrumb extends Component {
15021
15209
  if (isDefaultOverflowMode) {
15022
15210
  args.item.setAttribute('item-index', j.toString());
15023
15211
  }
15024
- if (args.item.querySelector('.' + ITEMTEXTCLASS)) {
15025
- EventHandler.add(args.item.querySelector('.' + ITEMTEXTCLASS), 'focus', () => {
15026
- args.item.classList.add('e-focus');
15027
- }, this);
15028
- EventHandler.add(args.item.querySelector('.' + ITEMTEXTCLASS), 'focusout', () => {
15029
- args.item.classList.remove('e-focus');
15030
- }, this);
15031
- }
15032
15212
  const eventArgs = {
15033
15213
  item: extend({}, args.curData.properties ?
15034
- args.curData.properties : args.curData), element: args.item
15214
+ args.curData.properties : args.curData), element: args.item, cancel: false
15035
15215
  };
15036
15216
  this.trigger('beforeItemRender', eventArgs);
15037
- const isItemDisabled = isDisabled || eventArgs.element.classList.contains('e-disabled');
15217
+ isItemCancelled = eventArgs.cancel;
15038
15218
  const containsRightIcon = (isIconRight || eventArgs.element.classList.contains(ICONRIGHT));
15039
15219
  if (containsRightIcon && args.curData.iconCss && !this.itemTemplate) {
15040
- args.item.querySelector('.e-anchor-wrap').append(args.item.querySelector('.' + ICONCLASS));
15220
+ args.item.querySelector('.e-anchor-wrap').appendChild(args.item.querySelector(DOT + ICONCLASS));
15041
15221
  }
15042
- if (isItemDisabled) {
15043
- args.item.setAttribute('aria-disabled', 'true');
15222
+ if (eventArgs.item.disabled) {
15223
+ args.item.setAttribute(ARIADISABLED, 'true');
15224
+ args.item.classList.add(DISABLEDCLASS);
15225
+ }
15226
+ if ((eventArgs.item.disabled || this.disabled) && args.item.children.length && !this.itemTemplate) {
15227
+ args.item.children[0].setAttribute(TABINDEX, '-1');
15044
15228
  }
15045
15229
  if (args.curData.isEmptyUrl) {
15046
15230
  args.item.children[0].removeAttribute('href');
15047
- if ((!isLastItem || (isLastItem && this.enableActiveItemNavigation)) && !isItemDisabled) {
15048
- args.item.children[0].setAttribute('tabindex', '0');
15231
+ if ((!isLastItem || (isLastItem && this.enableActiveItemNavigation)) && !(eventArgs.item.disabled || this.disabled)) {
15232
+ args.item.children[0].setAttribute(TABINDEX, '0');
15049
15233
  EventHandler.add(args.item.children[0], 'keydown', this.keyDownHandler, this);
15050
15234
  }
15051
15235
  }
15236
+ if (isLastItem) {
15237
+ args.item.setAttribute('data-active-item', '');
15238
+ }
15052
15239
  if (!this.itemTemplate) {
15053
15240
  this.beforeItemRenderChanges(args.curData, eventArgs.item, args.item, containsRightIcon);
15054
15241
  }
15055
15242
  }
15056
15243
  };
15057
15244
  for (let i = 0; i < len; i % 2 && j++, i++) {
15058
- isActiveItem = (this.activeItem && this.activeItem === items[j].url);
15245
+ isActiveItem = (this.activeItem && (this.activeItem === items[j].url || this.activeItem === items[j].text));
15059
15246
  if (isCollasped && i > 1 && i < len - 2) {
15060
15247
  continue;
15061
15248
  }
@@ -15065,10 +15252,11 @@ let Breadcrumb = class Breadcrumb extends Component {
15065
15252
  }
15066
15253
  if (i % 2) {
15067
15254
  // separator item
15255
+ wrapDiv = this.createElement('div', { className: 'e-breadcrumb-item-wrapper' });
15068
15256
  listBaseOptions.template = this.separatorTemplate ? this.separatorTemplate : '/';
15069
15257
  listBaseOptions.itemClass = 'e-breadcrumb-separator';
15070
15258
  isSingleLevel = false;
15071
- item = [{ previousItem: item.pop(), nextItem: items[j] }];
15259
+ item = [{ previousItem: items[j], nextItem: items[j + 1] }];
15072
15260
  }
15073
15261
  else {
15074
15262
  // list item
@@ -15085,47 +15273,129 @@ let Breadcrumb = class Breadcrumb extends Component {
15085
15273
  if (!item[0].url && !this.itemTemplate) {
15086
15274
  item = [extend({}, item[0], { isEmptyUrl: true, url: '#' })];
15087
15275
  }
15088
- isLastItem = isDefaultOverflowMode && (j === this.endIndex);
15089
- if ((((i === len - 1 || isLastItem) && !this.itemTemplate) || isActiveItem) && !this.enableActiveItemNavigation) {
15276
+ isLastItem = (isDefaultOverflowMode || this.overflowMode === 'Menu') && (j === this.endIndex);
15277
+ if (((i === len - 1 || isLastItem) && !this.itemTemplate) || isActiveItem) {
15090
15278
  item[0].isLastItem = true;
15091
15279
  }
15092
15280
  }
15093
- append(ListBase.createList(this.createElement, item, listBaseOptions, isSingleLevel, this)
15094
- .childNodes, ol);
15281
+ let parent = ol;
15282
+ const lastPopupItemIdx = this.startIndex + this.endIndex - this._maxItems;
15283
+ if (this.overflowMode === 'Menu' && ((j >= this.startIndex && (j <= lastPopupItemIdx && (i % 2 ? !(j === lastPopupItemIdx) : true)) && this.endIndex >= this._maxItems && this._maxItems > 0) || this._maxItems === 0)) {
15284
+ if (i % 2) {
15285
+ continue;
15286
+ }
15287
+ else {
15288
+ parent = this.popupUl;
15289
+ if (isLastItem) {
15290
+ isLastItemInPopup = true;
15291
+ }
15292
+ }
15293
+ }
15294
+ else if (this.overflowMode === 'Wrap') {
15295
+ if (i === 0) {
15296
+ parent = firstOl;
15297
+ }
15298
+ else {
15299
+ parent = wrapDiv;
15300
+ }
15301
+ }
15302
+ const li = ListBase.createList(this.createElement, item, listBaseOptions, isSingleLevel, this).childNodes;
15303
+ if (!isItemCancelled) {
15304
+ append(li, parent);
15305
+ }
15306
+ else if (isDefaultOverflowMode || isCollasped || this.overflowMode === 'Menu' || this.overflowMode === 'Wrap') {
15307
+ items.splice(j, 1);
15308
+ this.initPvtProps();
15309
+ return this.reRenderItems();
15310
+ }
15311
+ else if ((i === len - 1 || isLastItem)) {
15312
+ remove(parent.lastElementChild);
15313
+ }
15314
+ if (this.overflowMode === 'Wrap' && i !== 0 && i % 2 === 0) {
15315
+ ol.appendChild(wrapDiv);
15316
+ }
15095
15317
  if (isCollasped && i === 1) {
15096
- const li = this.createElement('li', { className: 'e-icons e-breadcrumb-collapsed', attrs: { 'tabindex': '0' } });
15318
+ const li = this.createElement('li', { className: 'e-icons e-breadcrumb-collapsed', attrs: { TABINDEX: '0' } });
15097
15319
  EventHandler.add(li, 'keyup', this.expandHandler, this);
15098
- ol.append(li);
15320
+ ol.appendChild(li);
15321
+ }
15322
+ if (this.overflowMode === 'Menu' && this.startIndex === i && this.endIndex >= this._maxItems && this._maxItems >= 0) {
15323
+ const menu = this.getMenuElement();
15324
+ EventHandler.add(menu, 'keyup', this.keyDownHandler, this);
15325
+ ol.appendChild(menu);
15099
15326
  }
15100
15327
  if (isActiveItem || isLastItem) {
15101
15328
  break;
15102
15329
  }
15330
+ if (isItemCancelled) {
15331
+ i++;
15332
+ }
15103
15333
  }
15104
15334
  if (this.isReact) {
15105
15335
  this.renderReactTemplates();
15106
15336
  }
15107
- this.element.append(ol);
15337
+ if (this.overflowMode === 'Wrap') {
15338
+ this.element.appendChild(firstOl);
15339
+ }
15340
+ this.element.appendChild(ol);
15108
15341
  this.calculateMaxItems();
15109
15342
  }
15110
15343
  }
15111
15344
  calculateMaxItems() {
15112
- if (!this._maxItems) {
15113
- if (this.overflowMode === 'Default' || this.overflowMode === 'Collapsed') {
15114
- const width = this.element.offsetWidth;
15115
- let liWidth = this.element.children[0].children[0].offsetWidth;
15116
- const liElems = [].slice.call(this.element.children[0].children).reverse();
15117
- for (let i = 0; i < liElems.length; i++) {
15118
- if (liWidth > width) {
15119
- this._maxItems = Math.ceil((i - 1) / 2) + 1;
15345
+ if (this.overflowMode === 'Hidden' || this.overflowMode === 'Collapsed' || this.overflowMode === 'Menu') {
15346
+ let maxItems;
15347
+ const width = this.element.offsetWidth;
15348
+ const liElems = [].slice.call(this.element.children[0].children).reverse();
15349
+ let liWidth = this.overflowMode === 'Menu' ? 0 : liElems[liElems.length - 1].offsetWidth + (liElems[liElems.length - 2] ? liElems[liElems.length - 2].offsetWidth : 0);
15350
+ if (this.overflowMode === 'Menu') {
15351
+ const menuEle = this.getMenuElement();
15352
+ this.element.appendChild(menuEle);
15353
+ liWidth += menuEle.offsetWidth;
15354
+ remove(menuEle);
15355
+ }
15356
+ for (let i = 0; i < liElems.length - 2; i++) {
15357
+ if (liWidth > width) {
15358
+ maxItems = Math.ceil((i - 1) / 2) + ((this.overflowMode === 'Menu' && i <= 2) ? 0 : 1);
15359
+ if (((this.maxItems > maxItems && !(this.maxItems > -1 && maxItems == -1)) || this.maxItems == -1) && this._maxItems != maxItems) {
15360
+ this._maxItems = maxItems;
15120
15361
  this.initPvtProps();
15121
15362
  return this.reRenderItems();
15122
15363
  }
15123
15364
  else {
15365
+ break;
15366
+ }
15367
+ }
15368
+ else {
15369
+ if (this.overflowMode === 'Menu' && i === 2) {
15370
+ liWidth += liElems[liElems.length - 1].offsetWidth + liElems[liElems.length - 2].offsetWidth;
15371
+ if (liWidth > width) {
15372
+ this._maxItems = 1;
15373
+ this.initPvtProps();
15374
+ return this.reRenderItems();
15375
+ }
15376
+ }
15377
+ if (!(this.overflowMode === 'Menu' && liElems[i].classList.contains(MENUCLASS))) {
15124
15378
  liWidth += liElems[i].offsetWidth;
15125
15379
  }
15126
15380
  }
15127
15381
  }
15128
15382
  }
15383
+ else if ((this.overflowMode === 'Wrap' || this.overflowMode === 'Scroll') && this._maxItems > 0) {
15384
+ let width = 0;
15385
+ const liElems = this.element.querySelectorAll(DOT + ITEMCLASS);
15386
+ if (liElems.length > this._maxItems + this._maxItems - 1) {
15387
+ for (let i = this.overflowMode === 'Wrap' ? 1 : 0; i < this._maxItems + this._maxItems - 1; i++) {
15388
+ width += liElems[i].offsetWidth;
15389
+ }
15390
+ width = width + 5 + (parseInt(getComputedStyle(this.element.children[0]).paddingLeft, 10) * 2);
15391
+ if (this.overflowMode === 'Wrap') {
15392
+ this.element.querySelector('.e-breadcrumb-wrapped-ol').style.width = width + 'px';
15393
+ }
15394
+ else {
15395
+ this.element.style.width = width + 'px';
15396
+ }
15397
+ }
15398
+ }
15129
15399
  }
15130
15400
  hasField(items, field) {
15131
15401
  for (let i = 0, len = items.length; i < len; i++) {
@@ -15135,6 +15405,9 @@ let Breadcrumb = class Breadcrumb extends Component {
15135
15405
  }
15136
15406
  return false;
15137
15407
  }
15408
+ getMenuElement() {
15409
+ return this.createElement('li', { className: 'e-icons e-breadcrumb-menu', attrs: { TABINDEX: '0' } });
15410
+ }
15138
15411
  beforeItemRenderChanges(prevItem, currItem, elem, isRightIcon) {
15139
15412
  const wrapElem = elem.querySelector('.e-anchor-wrap');
15140
15413
  if (currItem.text !== prevItem.text) {
@@ -15144,15 +15417,15 @@ let Breadcrumb = class Breadcrumb extends Component {
15144
15417
  }
15145
15418
  });
15146
15419
  }
15147
- if (currItem.iconCss !== prevItem.iconCss) {
15148
- const iconElem = elem.querySelector('.' + ICONCLASS);
15420
+ if (currItem.iconCss !== prevItem.iconCss && wrapElem) { // wrapElem - for checking it is item not a separator
15421
+ const iconElem = elem.querySelector(DOT + ICONCLASS);
15149
15422
  if (iconElem) {
15150
15423
  if (currItem.iconCss) {
15151
15424
  removeClass([iconElem], prevItem.iconCss.split(' '));
15152
15425
  addClass([iconElem], currItem.iconCss.split(' '));
15153
15426
  }
15154
15427
  else {
15155
- iconElem.remove();
15428
+ remove(iconElem);
15156
15429
  }
15157
15430
  }
15158
15431
  else if (currItem.iconCss) {
@@ -15182,31 +15455,85 @@ let Breadcrumb = class Breadcrumb extends Component {
15182
15455
  this.renderItems(this.items);
15183
15456
  }
15184
15457
  clickHandler(e) {
15185
- const li = closest(e.target, '.e-breadcrumb-item');
15186
- if (li && (closest(e.target, '.' + ITEMTEXTCLASS) || this.itemTemplate)) {
15187
- let idx = [].slice.call(li.parentElement.children).indexOf(li);
15188
- idx = Math.floor(idx / 2);
15189
- if (this.overflowMode === 'Default' && this._maxItems > 0 && this.endIndex !== 0) {
15458
+ const li = closest(e.target, DOT + ITEMCLASS + ':not(.e-breadcrumb-separator)');
15459
+ if (!this.enableNavigation) {
15460
+ e.preventDefault();
15461
+ }
15462
+ if (li && (closest(e.target, DOT + ITEMTEXTCLASS) || this.itemTemplate)) {
15463
+ let idx;
15464
+ if (this.overflowMode === 'Wrap') {
15465
+ idx = [].slice.call(this.element.querySelectorAll(DOT + ITEMCLASS)).indexOf(li);
15466
+ }
15467
+ else {
15468
+ idx = [].slice.call(li.parentElement.children).indexOf(li);
15469
+ }
15470
+ if (this.overflowMode === 'Menu') {
15471
+ if (closest(e.target, DOT + POPUPCLASS)) {
15472
+ idx += this.startIndex;
15473
+ this.endIndex = idx;
15474
+ if (e.type === 'keydown') {
15475
+ this.documentClickHandler(e);
15476
+ }
15477
+ }
15478
+ else if (this.element.querySelector(DOT + MENUCLASS)) {
15479
+ if (idx > [].slice.call(this.element.children[0].children).indexOf(this.element.querySelector(DOT + MENUCLASS))) {
15480
+ idx += (this.popupUl.childElementCount * 2) - 2;
15481
+ idx = Math.floor(idx / 2);
15482
+ this.endIndex = idx;
15483
+ }
15484
+ else {
15485
+ this.startIndex = this.endIndex = idx;
15486
+ }
15487
+ }
15488
+ else {
15489
+ idx = Math.floor(idx / 2);
15490
+ this.startIndex = this.endIndex = idx;
15491
+ }
15492
+ }
15493
+ else {
15494
+ idx = Math.floor(idx / 2);
15495
+ }
15496
+ if (this.overflowMode === 'Hidden' && this._maxItems > 0 && this.endIndex !== 0) {
15190
15497
  idx = parseInt(li.getAttribute('item-index'), 10);
15191
15498
  if (this.startIndex > 1) {
15192
15499
  this.startIndex -= (this.endIndex - idx);
15193
15500
  }
15194
15501
  this.endIndex = idx;
15195
- this.reRenderItems();
15196
15502
  }
15197
15503
  this.trigger('itemClick', { element: li, item: this.items[idx], event: e });
15198
- if (this.items[idx].url) {
15199
- this.activeItem = this.items[idx].url;
15200
- this.dataBind();
15201
- }
15202
- }
15203
- if (!this.enableNavigation) {
15204
- e.preventDefault();
15504
+ this.activeItem = this.items[idx].url || this.items[idx].text;
15505
+ this.dataBind();
15205
15506
  }
15206
15507
  if (e.target.classList.contains('e-breadcrumb-collapsed')) {
15207
15508
  this.isExpanded = true;
15208
15509
  this.reRenderItems();
15209
15510
  }
15511
+ if (e.target.classList.contains(MENUCLASS)) {
15512
+ this.renderPopup();
15513
+ }
15514
+ }
15515
+ renderPopup() {
15516
+ const wrapper = this.createElement('div', { className: POPUPCLASS + ' ' + this.cssClass + (this.enableRtl ? ' e-rtl' : '') });
15517
+ document.body.appendChild(wrapper);
15518
+ this.popupObj = new Popup(wrapper, {
15519
+ content: this.popupUl,
15520
+ relateTo: this.element.querySelector(DOT + MENUCLASS),
15521
+ enableRtl: this.enableRtl,
15522
+ position: { X: 'left', Y: 'bottom' },
15523
+ collision: { X: 'fit', Y: 'flip' },
15524
+ open: () => {
15525
+ this.popupUl.focus();
15526
+ }
15527
+ });
15528
+ this.popupWireEvents();
15529
+ this.popupObj.show();
15530
+ }
15531
+ documentClickHandler(e) {
15532
+ if (this.overflowMode === 'Menu' && this.popupObj && this.popupObj.element.classList.contains('e-popup-open') && !closest(e.target, DOT + MENUCLASS)) {
15533
+ this.popupObj.hide();
15534
+ this.popupObj.destroy();
15535
+ detach(this.popupObj.element);
15536
+ }
15210
15537
  }
15211
15538
  resize() {
15212
15539
  this._maxItems = this.maxItems;
@@ -15224,6 +15551,11 @@ let Breadcrumb = class Breadcrumb extends Component {
15224
15551
  this.clickHandler(e);
15225
15552
  }
15226
15553
  }
15554
+ popupKeyDownHandler(e) {
15555
+ if (e.key === 'Escape') {
15556
+ this.documentClickHandler(e);
15557
+ }
15558
+ }
15227
15559
  /**
15228
15560
  * Called internally if any of the property value changed.
15229
15561
  *
@@ -15235,26 +15567,37 @@ let Breadcrumb = class Breadcrumb extends Component {
15235
15567
  onPropertyChanged(newProp, oldProp) {
15236
15568
  for (const prop of Object.keys(newProp)) {
15237
15569
  switch (prop) {
15238
- case 'activeItem':
15239
15570
  case 'items':
15240
15571
  case 'enableActiveItemNavigation':
15241
15572
  this.reRenderItems();
15242
15573
  break;
15574
+ case 'activeItem':
15575
+ this._maxItems = this.maxItems;
15576
+ this.initPvtProps();
15577
+ this.reRenderItems();
15578
+ break;
15243
15579
  case 'overflowMode':
15244
15580
  case 'maxItems':
15581
+ this._maxItems = this.maxItems;
15245
15582
  this.initPvtProps();
15246
15583
  this.reRenderItems();
15584
+ if (oldProp.overflowMode === 'Wrap') {
15585
+ this.element.classList.remove(WRAPMODECLASS);
15586
+ }
15587
+ else if (newProp.overflowMode === 'Wrap') {
15588
+ this.element.classList.add(WRAPMODECLASS);
15589
+ }
15590
+ if (oldProp.overflowMode === 'Scroll') {
15591
+ this.element.classList.remove(SCROLLMODECLASS);
15592
+ }
15593
+ else if (newProp.overflowMode === 'Scroll') {
15594
+ this.element.classList.add(SCROLLMODECLASS);
15595
+ }
15247
15596
  break;
15248
15597
  case 'url':
15249
15598
  this.initItems();
15250
15599
  this.reRenderItems();
15251
15600
  break;
15252
- case 'width':
15253
- this.setWidth();
15254
- this._maxItems = this.maxItems;
15255
- this.initPvtProps();
15256
- this.reRenderItems();
15257
- break;
15258
15601
  case 'cssClass':
15259
15602
  if (oldProp.cssClass) {
15260
15603
  removeClass([this.element], oldProp.cssClass.split(' '));
@@ -15271,16 +15614,31 @@ let Breadcrumb = class Breadcrumb extends Component {
15271
15614
  case 'enableRtl':
15272
15615
  this.element.classList.toggle('e-rtl');
15273
15616
  break;
15617
+ case 'disabled':
15618
+ this.element.classList.toggle(DISABLEDCLASS);
15619
+ this.element.setAttribute(ARIADISABLED, newProp.disabled + '');
15620
+ break;
15274
15621
  }
15275
15622
  }
15276
15623
  }
15277
15624
  wireEvents() {
15625
+ this.delegateClickHanlder = this.documentClickHandler.bind(this);
15626
+ EventHandler.add(document, 'click', this.delegateClickHanlder, this);
15278
15627
  EventHandler.add(this.element, 'click', this.clickHandler, this);
15279
15628
  window.addEventListener('resize', this.resize.bind(this));
15280
15629
  }
15630
+ popupWireEvents() {
15631
+ EventHandler.add(this.popupObj.element, 'click', this.clickHandler, this);
15632
+ EventHandler.add(this.popupObj.element, 'keydown', this.popupKeyDownHandler, this);
15633
+ }
15281
15634
  unWireEvents() {
15635
+ EventHandler.remove(document, 'click', this.delegateClickHanlder);
15282
15636
  EventHandler.remove(this.element, 'click', this.clickHandler);
15283
15637
  window.removeEventListener('resize', this.resize.bind(this));
15638
+ if (this.popupObj) {
15639
+ EventHandler.remove(this.popupObj.element, 'click', this.clickHandler);
15640
+ EventHandler.remove(this.popupObj.element, 'keydown', this.popupKeyDownHandler);
15641
+ }
15284
15642
  }
15285
15643
  /**
15286
15644
  * Get the properties to be maintained in the persisted state.
@@ -15305,11 +15663,31 @@ let Breadcrumb = class Breadcrumb extends Component {
15305
15663
  * @returns {void}
15306
15664
  */
15307
15665
  destroy() {
15308
- this.unWireEvents();
15309
- this.element.innerHTML = '';
15666
+ let classes = [];
15667
+ let attributes$$1 = ['aria-label'];
15310
15668
  if (this.cssClass) {
15311
- removeClass([this.element], this.cssClass.split(' '));
15669
+ classes.concat(this.cssClass.split(' '));
15670
+ }
15671
+ if (this.enableRtl) {
15672
+ classes.push('e-rtl');
15312
15673
  }
15674
+ if (this.disabled) {
15675
+ classes.push(DISABLEDCLASS);
15676
+ attributes$$1.push(ARIADISABLED);
15677
+ }
15678
+ if (this.overflowMode === 'Wrap') {
15679
+ classes.push(WRAPMODECLASS);
15680
+ }
15681
+ else if (this.overflowMode === 'Scroll') {
15682
+ classes.push(SCROLLMODECLASS);
15683
+ }
15684
+ this.unWireEvents();
15685
+ this.element.innerHTML = '';
15686
+ removeClass([this.element], classes);
15687
+ attributes$$1.forEach((attribute) => {
15688
+ this.element.removeAttribute(attribute);
15689
+ });
15690
+ super.destroy();
15313
15691
  }
15314
15692
  };
15315
15693
  __decorate$10([
@@ -15322,17 +15700,14 @@ __decorate$10([
15322
15700
  Property('')
15323
15701
  ], Breadcrumb.prototype, "activeItem", void 0);
15324
15702
  __decorate$10([
15325
- Property(0)
15703
+ Property(-1)
15326
15704
  ], Breadcrumb.prototype, "maxItems", void 0);
15327
15705
  __decorate$10([
15328
- Property('Default')
15706
+ Property('Menu')
15329
15707
  ], Breadcrumb.prototype, "overflowMode", void 0);
15330
15708
  __decorate$10([
15331
15709
  Property('')
15332
15710
  ], Breadcrumb.prototype, "cssClass", void 0);
15333
- __decorate$10([
15334
- Property('')
15335
- ], Breadcrumb.prototype, "width", void 0);
15336
15711
  __decorate$10([
15337
15712
  Property(null)
15338
15713
  ], Breadcrumb.prototype, "itemTemplate", void 0);
@@ -15345,6 +15720,9 @@ __decorate$10([
15345
15720
  __decorate$10([
15346
15721
  Property(false)
15347
15722
  ], Breadcrumb.prototype, "enableActiveItemNavigation", void 0);
15723
+ __decorate$10([
15724
+ Property(false)
15725
+ ], Breadcrumb.prototype, "disabled", void 0);
15348
15726
  __decorate$10([
15349
15727
  Property('')
15350
15728
  ], Breadcrumb.prototype, "locale", void 0);