@syncfusion/ej2-navigations 19.3.57 → 19.4.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/.github/PULL_REQUEST_TEMPLATE/Bug.md +63 -0
  2. package/.github/PULL_REQUEST_TEMPLATE/feature.md +39 -0
  3. package/CHANGELOG.md +57 -0
  4. package/dist/ej2-navigations.umd.min.js +2 -2
  5. package/dist/ej2-navigations.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-navigations.es2015.js +517 -142
  7. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  8. package/dist/es6/ej2-navigations.es5.js +524 -143
  9. package/dist/es6/ej2-navigations.es5.js.map +1 -1
  10. package/dist/global/ej2-navigations.min.js +2 -2
  11. package/dist/global/ej2-navigations.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/package.json +11 -11
  14. package/src/accordion/accordion-model.d.ts +5 -5
  15. package/src/accordion/accordion.d.ts +5 -5
  16. package/src/accordion/accordion.js +2 -19
  17. package/src/breadcrumb/breadcrumb-model.d.ts +23 -11
  18. package/src/breadcrumb/breadcrumb.d.ts +33 -10
  19. package/src/breadcrumb/breadcrumb.js +320 -78
  20. package/src/common/menu-base.js +8 -2
  21. package/src/common/v-scroll.js +1 -1
  22. package/src/tab/tab-model.d.ts +14 -6
  23. package/src/tab/tab.d.ts +33 -16
  24. package/src/tab/tab.js +66 -31
  25. package/src/toolbar/toolbar-model.d.ts +7 -7
  26. package/src/toolbar/toolbar.d.ts +6 -6
  27. package/src/toolbar/toolbar.js +81 -13
  28. package/src/treeview/treeview-model.d.ts +10 -0
  29. package/src/treeview/treeview.d.ts +13 -0
  30. package/src/treeview/treeview.js +48 -0
  31. package/styles/accordion/_bootstrap-dark-definition.scss +4 -0
  32. package/styles/accordion/_bootstrap-definition.scss +4 -0
  33. package/styles/accordion/_bootstrap4-definition.scss +4 -0
  34. package/styles/accordion/_bootstrap5-definition.scss +39 -35
  35. package/styles/accordion/_fabric-dark-definition.scss +4 -0
  36. package/styles/accordion/_fabric-definition.scss +4 -0
  37. package/styles/accordion/_fluent-definition.scss +85 -0
  38. package/styles/accordion/_highcontrast-definition.scss +5 -1
  39. package/styles/accordion/_highcontrast-light-definition.scss +4 -0
  40. package/styles/accordion/_layout.scss +6 -14
  41. package/styles/accordion/_material-dark-definition.scss +4 -0
  42. package/styles/accordion/_material-definition.scss +4 -0
  43. package/styles/accordion/_tailwind-definition.scss +83 -79
  44. package/styles/accordion/_theme.scss +12 -11
  45. package/styles/accordion/bootstrap4.css +1 -2
  46. package/styles/accordion/bootstrap5-dark.css +11 -2
  47. package/styles/accordion/bootstrap5.css +11 -2
  48. package/styles/accordion/highcontrast-light.css +0 -4
  49. package/styles/accordion/highcontrast.css +1 -5
  50. package/styles/accordion/icons/_fluent.scss +17 -0
  51. package/styles/accordion/icons/_tailwind.scss +17 -17
  52. package/styles/bootstrap-dark.css +319 -85
  53. package/styles/bootstrap.css +318 -84
  54. package/styles/bootstrap4.css +319 -77
  55. package/styles/bootstrap5-dark.css +341 -76
  56. package/styles/bootstrap5.css +343 -78
  57. package/styles/breadcrumb/_bootstrap-dark-definition.scss +14 -0
  58. package/styles/breadcrumb/_bootstrap-definition.scss +13 -0
  59. package/styles/breadcrumb/_bootstrap4-definition.scss +13 -0
  60. package/styles/breadcrumb/_bootstrap5-definition.scss +15 -2
  61. package/styles/breadcrumb/_fabric-dark-definition.scss +13 -0
  62. package/styles/breadcrumb/_fabric-definition.scss +13 -0
  63. package/styles/breadcrumb/_fluent-definition.scss +59 -0
  64. package/styles/breadcrumb/_highcontrast-definition.scss +13 -0
  65. package/styles/breadcrumb/_highcontrast-light-definition.scss +13 -0
  66. package/styles/breadcrumb/_layout.scss +171 -22
  67. package/styles/breadcrumb/_material-dark-definition.scss +13 -0
  68. package/styles/breadcrumb/_material-definition.scss +13 -0
  69. package/styles/breadcrumb/_tailwind-dark-definition.scss +13 -0
  70. package/styles/breadcrumb/_tailwind-definition.scss +13 -0
  71. package/styles/breadcrumb/_theme.scss +27 -8
  72. package/styles/breadcrumb/bootstrap-dark.css +194 -17
  73. package/styles/breadcrumb/bootstrap.css +194 -17
  74. package/styles/breadcrumb/bootstrap4.css +194 -17
  75. package/styles/breadcrumb/bootstrap5-dark.css +198 -24
  76. package/styles/breadcrumb/bootstrap5.css +198 -24
  77. package/styles/breadcrumb/fabric-dark.css +197 -20
  78. package/styles/breadcrumb/fabric.css +197 -20
  79. package/styles/breadcrumb/highcontrast-light.css +200 -22
  80. package/styles/breadcrumb/highcontrast.css +200 -22
  81. package/styles/breadcrumb/icons/_bootstrap-dark.scss +2 -1
  82. package/styles/breadcrumb/icons/_bootstrap.scss +2 -1
  83. package/styles/breadcrumb/icons/_bootstrap4.scss +2 -1
  84. package/styles/breadcrumb/icons/_bootstrap5.scss +2 -1
  85. package/styles/breadcrumb/icons/_fabric-dark.scss +2 -1
  86. package/styles/breadcrumb/icons/_fabric.scss +2 -1
  87. package/styles/breadcrumb/icons/_fluent.scss +25 -0
  88. package/styles/breadcrumb/icons/_highcontrast-light.scss +2 -1
  89. package/styles/breadcrumb/icons/_highcontrast.scss +2 -1
  90. package/styles/breadcrumb/icons/_material-dark.scss +2 -1
  91. package/styles/breadcrumb/icons/_material.scss +2 -1
  92. package/styles/breadcrumb/icons/_tailwind-dark.scss +2 -1
  93. package/styles/breadcrumb/icons/_tailwind.scss +2 -1
  94. package/styles/breadcrumb/material-dark.css +186 -13
  95. package/styles/breadcrumb/material.css +186 -13
  96. package/styles/breadcrumb/tailwind-dark.css +195 -22
  97. package/styles/breadcrumb/tailwind.css +195 -22
  98. package/styles/context-menu/_bootstrap-dark-definition.scss +1 -1
  99. package/styles/context-menu/_bootstrap-definition.scss +1 -1
  100. package/styles/context-menu/_bootstrap4-definition.scss +1 -1
  101. package/styles/context-menu/_bootstrap5-definition.scss +5 -5
  102. package/styles/context-menu/_fluent-definition.scss +52 -0
  103. package/styles/context-menu/_material-dark-definition.scss +1 -1
  104. package/styles/context-menu/_material-definition.scss +1 -1
  105. package/styles/context-menu/_tailwind-definition.scss +1 -1
  106. package/styles/context-menu/bootstrap-dark.css +1 -1
  107. package/styles/context-menu/bootstrap.css +1 -1
  108. package/styles/context-menu/bootstrap4.css +1 -1
  109. package/styles/context-menu/bootstrap5-dark.css +5 -5
  110. package/styles/context-menu/bootstrap5.css +6 -6
  111. package/styles/context-menu/icons/_fluent.scss +32 -0
  112. package/styles/context-menu/material-dark.css +1 -1
  113. package/styles/context-menu/material.css +1 -1
  114. package/styles/context-menu/tailwind-dark.css +1 -1
  115. package/styles/context-menu/tailwind.css +1 -1
  116. package/styles/fabric-dark.css +307 -42
  117. package/styles/fabric.css +310 -45
  118. package/styles/h-scroll/_fluent-definition.scss +78 -0
  119. package/styles/h-scroll/_tailwind-definition.scss +78 -78
  120. package/styles/h-scroll/_theme.scss +1 -1
  121. package/styles/h-scroll/bootstrap-dark.css +1 -1
  122. package/styles/h-scroll/bootstrap.css +1 -1
  123. package/styles/h-scroll/bootstrap4.css +1 -1
  124. package/styles/h-scroll/bootstrap5-dark.css +1 -1
  125. package/styles/h-scroll/bootstrap5.css +1 -1
  126. package/styles/h-scroll/fabric-dark.css +1 -1
  127. package/styles/h-scroll/fabric.css +1 -1
  128. package/styles/h-scroll/highcontrast-light.css +1 -1
  129. package/styles/h-scroll/highcontrast.css +1 -1
  130. package/styles/h-scroll/icons/_fluent.scss +49 -0
  131. package/styles/h-scroll/icons/_tailwind.scss +49 -49
  132. package/styles/h-scroll/material-dark.css +1 -1
  133. package/styles/h-scroll/material.css +1 -1
  134. package/styles/h-scroll/tailwind-dark.css +1 -1
  135. package/styles/h-scroll/tailwind.css +1 -1
  136. package/styles/highcontrast-light.css +319 -48
  137. package/styles/highcontrast.css +324 -53
  138. package/styles/material-dark.css +297 -33
  139. package/styles/material.css +298 -34
  140. package/styles/menu/_fluent-definition.scss +68 -0
  141. package/styles/menu/_layout.scss +3 -2
  142. package/styles/menu/_theme.scss +9 -0
  143. package/styles/menu/bootstrap-dark.css +3 -2
  144. package/styles/menu/bootstrap.css +3 -2
  145. package/styles/menu/bootstrap4.css +3 -2
  146. package/styles/menu/bootstrap5-dark.css +6 -5
  147. package/styles/menu/bootstrap5.css +7 -6
  148. package/styles/menu/fabric-dark.css +2 -1
  149. package/styles/menu/fabric.css +2 -1
  150. package/styles/menu/highcontrast-light.css +2 -1
  151. package/styles/menu/highcontrast.css +2 -1
  152. package/styles/menu/icons/_fluent.scss +133 -0
  153. package/styles/menu/material-dark.css +3 -2
  154. package/styles/menu/material.css +3 -2
  155. package/styles/menu/tailwind-dark.css +3 -2
  156. package/styles/menu/tailwind.css +3 -2
  157. package/styles/sidebar/_bootstrap5-definition.scss +5 -5
  158. package/styles/sidebar/_fluent-definition.scss +5 -0
  159. package/styles/sidebar/_theme.scss +4 -2
  160. package/styles/sidebar/bootstrap5-dark.css +0 -1
  161. package/styles/sidebar/bootstrap5.css +0 -1
  162. package/styles/sidebar/tailwind-dark.css +0 -1
  163. package/styles/sidebar/tailwind.css +0 -1
  164. package/styles/tab/_bootstrap-dark-definition.scss +10 -1
  165. package/styles/tab/_bootstrap-definition.scss +10 -1
  166. package/styles/tab/_bootstrap4-definition.scss +9 -1
  167. package/styles/tab/_bootstrap5-definition.scss +401 -401
  168. package/styles/tab/_fabric-dark-definition.scss +10 -0
  169. package/styles/tab/_fabric-definition.scss +10 -0
  170. package/styles/tab/_fluent-definition.scss +409 -0
  171. package/styles/tab/_highcontrast-definition.scss +10 -0
  172. package/styles/tab/_highcontrast-light-definition.scss +10 -0
  173. package/styles/tab/_layout.scss +145 -0
  174. package/styles/tab/_material-dark-definition.scss +10 -0
  175. package/styles/tab/_material-definition.scss +10 -0
  176. package/styles/tab/_tailwind-definition.scss +431 -420
  177. package/styles/tab/_theme.scss +188 -113
  178. package/styles/tab/bootstrap-dark.css +43 -18
  179. package/styles/tab/bootstrap.css +42 -17
  180. package/styles/tab/bootstrap4.css +47 -28
  181. package/styles/tab/bootstrap5-dark.css +53 -30
  182. package/styles/tab/bootstrap5.css +53 -30
  183. package/styles/tab/fabric-dark.css +43 -20
  184. package/styles/tab/fabric.css +46 -23
  185. package/styles/tab/highcontrast-light.css +52 -19
  186. package/styles/tab/highcontrast.css +56 -23
  187. package/styles/tab/icons/_bootstrap-dark.scss +2 -2
  188. package/styles/tab/icons/_fabric-dark.scss +2 -2
  189. package/styles/tab/icons/_fluent.scss +140 -0
  190. package/styles/tab/icons/_tailwind.scss +140 -140
  191. package/styles/tab/material-dark.css +42 -15
  192. package/styles/tab/material.css +42 -15
  193. package/styles/tab/tailwind-dark.css +42 -17
  194. package/styles/tab/tailwind.css +42 -17
  195. package/styles/tailwind-dark.css +315 -51
  196. package/styles/tailwind.css +315 -51
  197. package/styles/toolbar/_bootstrap-dark-definition.scss +7 -1
  198. package/styles/toolbar/_bootstrap-definition.scss +7 -1
  199. package/styles/toolbar/_bootstrap4-definition.scss +8 -2
  200. package/styles/toolbar/_bootstrap5-definition.scss +104 -86
  201. package/styles/toolbar/_fabric-dark-definition.scss +7 -0
  202. package/styles/toolbar/_fabric-definition.scss +7 -0
  203. package/styles/toolbar/_fluent-definition.scss +149 -0
  204. package/styles/toolbar/_highcontrast-definition.scss +7 -0
  205. package/styles/toolbar/_highcontrast-light-definition.scss +7 -0
  206. package/styles/toolbar/_layout.scss +27 -72
  207. package/styles/toolbar/_material-dark-definition.scss +7 -1
  208. package/styles/toolbar/_material-definition.scss +7 -1
  209. package/styles/toolbar/_tailwind-definition.scss +149 -143
  210. package/styles/toolbar/_theme.scss +12 -15
  211. package/styles/toolbar/bootstrap-dark.css +17 -46
  212. package/styles/toolbar/bootstrap.css +17 -46
  213. package/styles/toolbar/bootstrap4.css +12 -26
  214. package/styles/toolbar/bootstrap5-dark.css +6 -7
  215. package/styles/toolbar/bootstrap5.css +6 -7
  216. package/styles/toolbar/fabric-dark.css +4 -0
  217. package/styles/toolbar/fabric.css +4 -0
  218. package/styles/toolbar/highcontrast-light.css +4 -1
  219. package/styles/toolbar/highcontrast.css +4 -1
  220. package/styles/toolbar/icons/_fluent.scss +16 -0
  221. package/styles/toolbar/icons/_tailwind.scss +16 -16
  222. package/styles/toolbar/material-dark.css +4 -1
  223. package/styles/toolbar/material.css +5 -2
  224. package/styles/toolbar/tailwind-dark.css +8 -6
  225. package/styles/toolbar/tailwind.css +8 -6
  226. package/styles/treeview/_bootstrap-dark-definition.scss +11 -0
  227. package/styles/treeview/_bootstrap-definition.scss +11 -0
  228. package/styles/treeview/_bootstrap4-definition.scss +11 -0
  229. package/styles/treeview/_bootstrap5-definition.scss +120 -109
  230. package/styles/treeview/_fabric-dark-definition.scss +11 -0
  231. package/styles/treeview/_fabric-definition.scss +11 -0
  232. package/styles/treeview/_fluent-definition.scss +120 -0
  233. package/styles/treeview/_highcontrast-definition.scss +11 -0
  234. package/styles/treeview/_highcontrast-light-definition.scss +11 -0
  235. package/styles/treeview/_layout.scss +116 -20
  236. package/styles/treeview/_material-dark-definition.scss +13 -0
  237. package/styles/treeview/_material-definition.scss +11 -0
  238. package/styles/treeview/_tailwind-definition.scss +12 -0
  239. package/styles/treeview/_theme.scss +5 -5
  240. package/styles/treeview/bootstrap-dark.css +60 -0
  241. package/styles/treeview/bootstrap.css +60 -0
  242. package/styles/treeview/bootstrap4.css +60 -0
  243. package/styles/treeview/bootstrap5-dark.css +61 -1
  244. package/styles/treeview/bootstrap5.css +61 -1
  245. package/styles/treeview/fabric-dark.css +60 -0
  246. package/styles/treeview/fabric.css +60 -0
  247. package/styles/treeview/highcontrast-light.css +60 -0
  248. package/styles/treeview/highcontrast.css +60 -0
  249. package/styles/treeview/icons/_bootstrap5.scss +43 -43
  250. package/styles/treeview/icons/_fluent.scss +43 -0
  251. package/styles/treeview/icons/_tailwind-dark.scss +43 -43
  252. package/styles/treeview/material-dark.css +60 -0
  253. package/styles/treeview/material.css +60 -0
  254. package/styles/treeview/tailwind-dark.css +65 -1
  255. package/styles/treeview/tailwind.css +65 -1
  256. package/styles/v-scroll/_fluent-definition.scss +49 -0
  257. package/styles/v-scroll/_tailwind-definition.scss +49 -49
  258. package/styles/v-scroll/icons/_fluent.scss +26 -0
  259. package/styles/v-scroll/icons/_tailwind.scss +26 -26
@@ -270,6 +270,14 @@ export interface TabModel extends ComponentModel{
270
270
  */
271
271
  showCloseButton?: boolean;
272
272
 
273
+ /**
274
+ * Determines whether to re-order tab items to show active tab item in the header area or popup when OverflowMode is Popup.
275
+ * True, if active tab item should be visible in header area instead of pop-up. The default value is true.
276
+ *
277
+ * @default true
278
+ */
279
+ reorderActiveTab?: boolean;
280
+
273
281
  /**
274
282
  * Specifies the scrolling distance in scroller.
275
283
  *
@@ -307,42 +315,42 @@ export interface TabModel extends ComponentModel{
307
315
  created?: EmitType<Event>;
308
316
 
309
317
  /**
310
- * The event will be fired before adding the item to the Tab.
318
+ * The event will be fired before adding the item to the Tab.
311
319
  *
312
320
  * @event
313
321
  */
314
322
  adding?: EmitType<AddEventArgs>;
315
323
 
316
324
  /**
317
- * The event will be fired after adding the item to the Tab.
325
+ * The event will be fired after adding the item to the Tab.
318
326
  *
319
327
  * @event
320
328
  */
321
329
  added?: EmitType<AddEventArgs>;
322
330
 
323
331
  /**
324
- * The event will be fired before the item gets selected.
332
+ * The event will be fired before the item gets selected.
325
333
  *
326
334
  * @event
327
335
  */
328
336
  selecting?: EmitType<SelectingEventArgs>;
329
337
 
330
338
  /**
331
- * The event will be fired after the item gets selected.
339
+ * The event will be fired after the item gets selected.
332
340
  *
333
341
  * @event
334
342
  */
335
343
  selected?: EmitType<SelectEventArgs>;
336
344
 
337
345
  /**
338
- * The event will be fired before removing the item from the Tab.
346
+ * The event will be fired before removing the item from the Tab.
339
347
  *
340
348
  * @event
341
349
  */
342
350
  removing?: EmitType<RemoveEventArgs>;
343
351
 
344
352
  /**
345
- * The event will be fired after removing the item from the Tab.
353
+ * The event will be fired after removing the item from the Tab.
346
354
  *
347
355
  * @event
348
356
  */
package/src/tab/tab.d.ts CHANGED
@@ -33,6 +33,8 @@ export interface SelectEventArgs extends BaseEventArgs {
33
33
  cancel?: boolean;
34
34
  /** Defines the selected content. */
35
35
  selectedContent: HTMLElement;
36
+ /** Determines whether the event is triggered via user interaction or programmatic way. True, if the event is triggered by user interaction. */
37
+ isInteracted?: boolean;
36
38
  }
37
39
  /** An interface that holds options to control the selecting item action. */
38
40
  export interface SelectingEventArgs extends SelectEventArgs {
@@ -233,6 +235,7 @@ export declare class Tab extends Component<HTMLElement> implements INotifyProper
233
235
  private maxHeight;
234
236
  private title;
235
237
  private initRender;
238
+ private isInteracted;
236
239
  private prevActiveEle;
237
240
  private lastIndex;
238
241
  private isSwipeed;
@@ -368,6 +371,13 @@ export declare class Tab extends Component<HTMLElement> implements INotifyProper
368
371
  * @default false
369
372
  */
370
373
  showCloseButton: boolean;
374
+ /**
375
+ * Determines whether to re-order tab items to show active tab item in the header area or popup when OverflowMode is Popup.
376
+ * True, if active tab item should be visible in header area instead of pop-up. The default value is true.
377
+ *
378
+ * @default true
379
+ */
380
+ reorderActiveTab: boolean;
371
381
  /**
372
382
  * Specifies the scrolling distance in scroller.
373
383
  *
@@ -400,37 +410,37 @@ export declare class Tab extends Component<HTMLElement> implements INotifyProper
400
410
  */
401
411
  created: EmitType<Event>;
402
412
  /**
403
- * The event will be fired before adding the item to the Tab.
413
+ * The event will be fired before adding the item to the Tab.
404
414
  *
405
415
  * @event
406
416
  */
407
417
  adding: EmitType<AddEventArgs>;
408
418
  /**
409
- * The event will be fired after adding the item to the Tab.
419
+ * The event will be fired after adding the item to the Tab.
410
420
  *
411
421
  * @event
412
422
  */
413
423
  added: EmitType<AddEventArgs>;
414
424
  /**
415
- * The event will be fired before the item gets selected.
425
+ * The event will be fired before the item gets selected.
416
426
  *
417
427
  * @event
418
428
  */
419
429
  selecting: EmitType<SelectingEventArgs>;
420
430
  /**
421
- * The event will be fired after the item gets selected.
431
+ * The event will be fired after the item gets selected.
422
432
  *
423
433
  * @event
424
434
  */
425
435
  selected: EmitType<SelectEventArgs>;
426
436
  /**
427
- * The event will be fired before removing the item from the Tab.
437
+ * The event will be fired before removing the item from the Tab.
428
438
  *
429
439
  * @event
430
440
  */
431
441
  removing: EmitType<RemoveEventArgs>;
432
442
  /**
433
- * The event will be fired after removing the item from the Tab.
443
+ * The event will be fired after removing the item from the Tab.
434
444
  *
435
445
  * @event
436
446
  */
@@ -540,7 +550,13 @@ export declare class Tab extends Component<HTMLElement> implements INotifyProper
540
550
  private swipeHandler;
541
551
  private spaceKeyDown;
542
552
  private keyHandler;
543
- private refreshActElePosition;
553
+ /**
554
+ * Refresh the active tab border
555
+ *
556
+ * @returns {void}
557
+ * @private
558
+ */
559
+ refreshActiveTabBorder(): void;
544
560
  private refreshItemVisibility;
545
561
  private hoverHandler;
546
562
  private evalOnPropertyChangeItems;
@@ -552,8 +568,8 @@ export declare class Tab extends Component<HTMLElement> implements INotifyProper
552
568
  /**
553
569
  * Enables or disables the specified Tab item. On passing value as `false`, the item will be disabled.
554
570
  *
555
- * @param {number} index - Index value of target Tab item.
556
- * @param {boolean} value - Boolean value that determines whether the command should be enabled or disabled.
571
+ * @param {number} index - Index value of target Tab item.
572
+ * @param {boolean} value - Boolean value that determines whether the command should be enabled or disabled.
557
573
  * By default, isEnable is true.
558
574
  * @returns {void}.
559
575
  */
@@ -561,8 +577,8 @@ export declare class Tab extends Component<HTMLElement> implements INotifyProper
561
577
  /**
562
578
  * Adds new items to the Tab that accepts an array as Tab items.
563
579
  *
564
- * @param {TabItemModel[]} items - An array of item that is added to the Tab.
565
- * @param {number} index - Number value that determines where the items to be added. By default, index is 0.
580
+ * @param {TabItemModel[]} items - An array of item that is added to the Tab.
581
+ * @param {number} index - Number value that determines where the items to be added. By default, index is 0.
566
582
  * @returns {void}.
567
583
  */
568
584
  addTab(items: TabItemModel[], index?: number): void;
@@ -570,24 +586,25 @@ export declare class Tab extends Component<HTMLElement> implements INotifyProper
570
586
  /**
571
587
  * Removes the items in the Tab from the specified index.
572
588
  *
573
- * @param {number} index - Index of target item that is going to be removed.
589
+ * @param {number} index - Index of target item that is going to be removed.
574
590
  * @returns {void}.
575
591
  */
576
592
  removeTab(index: number): void;
577
593
  /**
578
594
  * Shows or hides the Tab that is in the specified index.
579
595
  *
580
- * @param {number} index - Index value of target item.
581
- * @param {boolean} value - Based on this Boolean value, item will be hide (false) or show (true). By default, value is true.
596
+ * @param {number} index - Index value of target item.
597
+ * @param {boolean} value - Based on this Boolean value, item will be hide (false) or show (true). By default, value is true.
582
598
  * @returns {void}.
583
599
  */
584
600
  hideTab(index: number, value?: boolean): void;
601
+ private selectTab;
585
602
  /**
586
603
  * Specifies the index or HTMLElement to select an item from the Tab.
587
604
  *
588
- * @param {number | HTMLElement} args - Index or DOM element is used for selecting an item from the Tab.
605
+ * @param {number | HTMLElement} args - Index or DOM element is used for selecting an item from the Tab.
589
606
  * @param {Event} event - An event which takes place in DOM.
590
- * @returns {void}.
607
+ * @returns {void}
591
608
  */
592
609
  select(args: number | HTEle, event?: Event): void;
593
610
  private selectingContent;
package/src/tab/tab.js CHANGED
@@ -66,6 +66,7 @@ var CLS_VRIGHT = 'e-vertical-right';
66
66
  var CLS_HBOTTOM = 'e-horizontal-bottom';
67
67
  var CLS_FILL = 'e-fill-mode';
68
68
  var TABITEMPREFIX = 'tabitem_';
69
+ var CLS_REORDER_ACTIVE_ITEM = 'e-reorder-active-item';
69
70
  /**
70
71
  * Objects used for configuring the Tab selecting item action properties.
71
72
  */
@@ -180,11 +181,12 @@ var Tab = /** @class */ (function (_super) {
180
181
  _this.hide = {};
181
182
  _this.maxHeight = 0;
182
183
  _this.title = 'Close';
184
+ _this.isInteracted = false;
183
185
  _this.lastIndex = 0;
184
186
  _this.isAdd = false;
185
187
  _this.isIconAlone = false;
186
188
  _this.draggableItems = [];
187
- _this.resizeContext = _this.refreshActElePosition.bind(_this);
189
+ _this.resizeContext = _this.refreshActiveTabBorder.bind(_this);
188
190
  /**
189
191
  * Contains the keyboard configuration of the Tab.
190
192
  */
@@ -638,7 +640,7 @@ var Tab = /** @class */ (function (_super) {
638
640
  trg.classList.remove(CLS_CLOSE_SHOW);
639
641
  }
640
642
  this.tbObj.refreshOverflow();
641
- this.refreshActElePosition();
643
+ this.refreshActiveTabBorder();
642
644
  };
643
645
  Tab.prototype.prevCtnAnimation = function (prev, current) {
644
646
  var animation;
@@ -765,7 +767,7 @@ var Tab = /** @class */ (function (_super) {
765
767
  }
766
768
  else {
767
769
  if (!isNOU(trgParent) && trgParent.classList.contains(CLS_ACTIVE) === false) {
768
- this.select(trgIndex);
770
+ this.selectTab(trgIndex, null, true);
769
771
  if (!isNOU(this.popEle)) {
770
772
  this.popObj.hide(this.hide);
771
773
  }
@@ -1038,9 +1040,20 @@ var Tab = /** @class */ (function (_super) {
1038
1040
  Tab.prototype.setActiveBorder = function () {
1039
1041
  var trgHdrEle = this.getTabHeader();
1040
1042
  var trg = select('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE, trgHdrEle);
1041
- if (trg === null) {
1043
+ if (isNOU(trg)) {
1042
1044
  return;
1043
1045
  }
1046
+ if (!this.reorderActiveTab) {
1047
+ if (trg.classList.contains(CLS_TB_POPUP) && !this.bdrLine.classList.contains(CLS_HIDDEN)) {
1048
+ this.bdrLine.classList.add(CLS_HIDDEN);
1049
+ }
1050
+ if (trgHdrEle && !trgHdrEle.classList.contains(CLS_REORDER_ACTIVE_ITEM)) {
1051
+ trgHdrEle.classList.add(CLS_REORDER_ACTIVE_ITEM);
1052
+ }
1053
+ }
1054
+ else if (trgHdrEle) {
1055
+ trgHdrEle.classList.remove(CLS_REORDER_ACTIVE_ITEM);
1056
+ }
1044
1057
  var root = closest(trg, '.' + CLS_TAB);
1045
1058
  if (this.element !== root) {
1046
1059
  return;
@@ -1074,12 +1087,13 @@ var Tab = /** @class */ (function (_super) {
1074
1087
  setStyle(bar, { 'left': 'auto', 'right': 'auto' });
1075
1088
  }
1076
1089
  }
1077
- if (!isNOU(this.bdrLine)) {
1090
+ if (!isNOU(this.bdrLine) && !trg.classList.contains(CLS_TB_POPUP)) {
1078
1091
  this.bdrLine.classList.remove(CLS_HIDDEN);
1079
1092
  }
1080
1093
  };
1081
- Tab.prototype.setActive = function (value, skipDataBind) {
1094
+ Tab.prototype.setActive = function (value, skipDataBind, isInteracted) {
1082
1095
  if (skipDataBind === void 0) { skipDataBind = false; }
1096
+ if (isInteracted === void 0) { isInteracted = false; }
1083
1097
  this.tbItem = selectAll('.' + CLS_TB_ITEM, this.getTabHeader());
1084
1098
  var trg = this.tbItem[value];
1085
1099
  if (value < 0 || isNaN(value) || this.tbItem.length === 0) {
@@ -1150,7 +1164,8 @@ var Tab = /** @class */ (function (_super) {
1150
1164
  selectedItem: trg,
1151
1165
  selectedIndex: value,
1152
1166
  selectedContent: select('#' + CLS_CONTENT + this.tabId + '_' + this.selectingID, this.content),
1153
- isSwiped: this.isSwipeed
1167
+ isSwiped: this.isSwipeed,
1168
+ isInteracted: isInteracted
1154
1169
  };
1155
1170
  this.trigger('selected', eventArg);
1156
1171
  }
@@ -1242,7 +1257,7 @@ var Tab = /** @class */ (function (_super) {
1242
1257
  else {
1243
1258
  this.isPopup = false;
1244
1259
  if (!isNOU(trgParent) && (trgIndex !== this.selectedItem || trgIndex !== this.prevIndex)) {
1245
- this.select(trgIndex, args.originalEvent);
1260
+ this.selectTab(trgIndex, args.originalEvent, true);
1246
1261
  }
1247
1262
  }
1248
1263
  };
@@ -1257,7 +1272,7 @@ var Tab = /** @class */ (function (_super) {
1257
1272
  if (e.swipeDirection === 'Right' && this.selectedItem !== 0) {
1258
1273
  for (var k = this.selectedItem - 1; k >= 0; k--) {
1259
1274
  if (!this.tbItem[k].classList.contains(CLS_HIDDEN)) {
1260
- this.select(k);
1275
+ this.selectTab(k, null, true);
1261
1276
  break;
1262
1277
  }
1263
1278
  }
@@ -1265,7 +1280,7 @@ var Tab = /** @class */ (function (_super) {
1265
1280
  else if (e.swipeDirection === 'Left' && (this.selectedItem !== selectAll('.' + CLS_TB_ITEM, this.element).length - 1)) {
1266
1281
  for (var i = this.selectedItem + 1; i < this.tbItem.length; i++) {
1267
1282
  if (!this.tbItem[i].classList.contains(CLS_HIDDEN)) {
1268
- this.select(i);
1283
+ this.selectTab(i, null, true);
1269
1284
  break;
1270
1285
  }
1271
1286
  }
@@ -1341,9 +1356,15 @@ var Tab = /** @class */ (function (_super) {
1341
1356
  break;
1342
1357
  }
1343
1358
  };
1344
- Tab.prototype.refreshActElePosition = function () {
1359
+ /**
1360
+ * Refresh the active tab border
1361
+ *
1362
+ * @returns {void}
1363
+ * @private
1364
+ */
1365
+ Tab.prototype.refreshActiveTabBorder = function () {
1345
1366
  var activeEle = select('.' + CLS_TB_ITEM + '.' + CLS_TB_POPUP + '.' + CLS_ACTIVE, this.element);
1346
- if (!isNOU(activeEle)) {
1367
+ if (!isNOU(activeEle) && this.reorderActiveTab) {
1347
1368
  this.select(this.getEleIndex(activeEle));
1348
1369
  }
1349
1370
  this.refreshActiveBorder();
@@ -1686,7 +1707,7 @@ var Tab = /** @class */ (function (_super) {
1686
1707
  else {
1687
1708
  _this.dragItem.querySelector('.' + CLS_WRAP).style.visibility = '';
1688
1709
  removeClass([_this.tbItems.querySelector('.' + CLS_INDICATOR)], CLS_HIDDEN);
1689
- _this.select(_this.droppedIndex);
1710
+ _this.selectTab(_this.droppedIndex, null, true);
1690
1711
  }
1691
1712
  }
1692
1713
  });
@@ -1694,8 +1715,8 @@ var Tab = /** @class */ (function (_super) {
1694
1715
  /**
1695
1716
  * Enables or disables the specified Tab item. On passing value as `false`, the item will be disabled.
1696
1717
  *
1697
- * @param {number} index - Index value of target Tab item.
1698
- * @param {boolean} value - Boolean value that determines whether the command should be enabled or disabled.
1718
+ * @param {number} index - Index value of target Tab item.
1719
+ * @param {boolean} value - Boolean value that determines whether the command should be enabled or disabled.
1699
1720
  * By default, isEnable is true.
1700
1721
  * @returns {void}.
1701
1722
  */
@@ -1724,8 +1745,8 @@ var Tab = /** @class */ (function (_super) {
1724
1745
  /**
1725
1746
  * Adds new items to the Tab that accepts an array as Tab items.
1726
1747
  *
1727
- * @param {TabItemModel[]} items - An array of item that is added to the Tab.
1728
- * @param {number} index - Number value that determines where the items to be added. By default, index is 0.
1748
+ * @param {TabItemModel[]} items - An array of item that is added to the Tab.
1749
+ * @param {number} index - Number value that determines where the items to be added. By default, index is 0.
1729
1750
  * @returns {void}.
1730
1751
  */
1731
1752
  Tab.prototype.addTab = function (items, index) {
@@ -1810,7 +1831,7 @@ var Tab = /** @class */ (function (_super) {
1810
1831
  /**
1811
1832
  * Removes the items in the Tab from the specified index.
1812
1833
  *
1813
- * @param {number} index - Index of target item that is going to be removed.
1834
+ * @param {number} index - Index of target item that is going to be removed.
1814
1835
  * @returns {void}.
1815
1836
  */
1816
1837
  Tab.prototype.removeTab = function (index) {
@@ -1850,8 +1871,8 @@ var Tab = /** @class */ (function (_super) {
1850
1871
  /**
1851
1872
  * Shows or hides the Tab that is in the specified index.
1852
1873
  *
1853
- * @param {number} index - Index value of target item.
1854
- * @param {boolean} value - Based on this Boolean value, item will be hide (false) or show (true). By default, value is true.
1874
+ * @param {number} index - Index value of target item.
1875
+ * @param {boolean} value - Based on this Boolean value, item will be hide (false) or show (true). By default, value is true.
1855
1876
  * @returns {void}.
1856
1877
  */
1857
1878
  Tab.prototype.hideTab = function (index, value) {
@@ -1911,12 +1932,18 @@ var Tab = /** @class */ (function (_super) {
1911
1932
  this.tbObj.refreshOverflow();
1912
1933
  }
1913
1934
  };
1935
+ Tab.prototype.selectTab = function (args, event, isInteracted) {
1936
+ if (event === void 0) { event = null; }
1937
+ if (isInteracted === void 0) { isInteracted = false; }
1938
+ this.isInteracted = isInteracted;
1939
+ this.select(args, event);
1940
+ };
1914
1941
  /**
1915
1942
  * Specifies the index or HTMLElement to select an item from the Tab.
1916
1943
  *
1917
- * @param {number | HTMLElement} args - Index or DOM element is used for selecting an item from the Tab.
1944
+ * @param {number | HTMLElement} args - Index or DOM element is used for selecting an item from the Tab.
1918
1945
  * @param {Event} event - An event which takes place in DOM.
1919
- * @returns {void}.
1946
+ * @returns {void}
1920
1947
  */
1921
1948
  Tab.prototype.select = function (args, event) {
1922
1949
  var _this = this;
@@ -1954,20 +1981,22 @@ var Tab = /** @class */ (function (_super) {
1954
1981
  selectingContent: !isNOU(this.content) ?
1955
1982
  select('#' + CLS_CONTENT + this.tabId + '_' + this.selectingID, this.content) : null,
1956
1983
  isSwiped: this.isSwipeed,
1984
+ isInteracted: this.isInteracted,
1957
1985
  cancel: false
1958
1986
  };
1959
1987
  if (!this.initRender) {
1960
1988
  this.trigger('selecting', eventArg, function (selectArgs) {
1961
1989
  if (!selectArgs.cancel) {
1962
- _this.selectingContent(args);
1990
+ _this.selectingContent(args, _this.isInteracted);
1963
1991
  }
1964
1992
  });
1965
1993
  }
1966
1994
  else {
1967
- this.selectingContent(args);
1995
+ this.selectingContent(args, this.isInteracted);
1968
1996
  }
1997
+ this.isInteracted = false;
1969
1998
  };
1970
- Tab.prototype.selectingContent = function (args) {
1999
+ Tab.prototype.selectingContent = function (args, isInteracted) {
1971
2000
  if (typeof args === 'number') {
1972
2001
  if (!isNOU(this.tbItem[args]) && (this.tbItem[args].classList.contains(CLS_DISABLE) ||
1973
2002
  this.tbItem[args].classList.contains(CLS_HIDDEN))) {
@@ -1983,8 +2012,8 @@ var Tab = /** @class */ (function (_super) {
1983
2012
  }
1984
2013
  if (this.tbItem.length > args && args >= 0 && !isNaN(args)) {
1985
2014
  this.prevIndex = this.selectedItem;
1986
- if (this.tbItem[args].classList.contains(CLS_TB_POPUP)) {
1987
- this.setActive(this.popupHandler(this.tbItem[args]));
2015
+ if (this.tbItem[args].classList.contains(CLS_TB_POPUP) && this.reorderActiveTab) {
2016
+ this.setActive(this.popupHandler(this.tbItem[args]), null, isInteracted);
1988
2017
  if ((!isNOU(this.items) && this.items.length > 0) && this.allowDragAndDrop) {
1989
2018
  this.tbItem = selectAll('.' + CLS_TB_ITEMS + ' .' + CLS_TB_ITEM, this.hdrEle);
1990
2019
  var item = this.items[args];
@@ -1993,15 +2022,15 @@ var Tab = /** @class */ (function (_super) {
1993
2022
  }
1994
2023
  }
1995
2024
  else {
1996
- this.setActive(args);
2025
+ this.setActive(args, null, isInteracted);
1997
2026
  }
1998
2027
  }
1999
2028
  else {
2000
- this.setActive(0);
2029
+ this.setActive(0, null, isInteracted);
2001
2030
  }
2002
2031
  }
2003
2032
  else if (args instanceof (HTMLElement)) {
2004
- this.setActive(this.getEleIndex(args));
2033
+ this.setActive(this.getEleIndex(args), null, isInteracted);
2005
2034
  }
2006
2035
  };
2007
2036
  /**
@@ -2084,6 +2113,9 @@ var Tab = /** @class */ (function (_super) {
2084
2113
  case 'showCloseButton':
2085
2114
  this.setCloseButton(newProp.showCloseButton);
2086
2115
  break;
2116
+ case 'reorderActiveTab':
2117
+ this.refreshActiveTabBorder();
2118
+ break;
2087
2119
  case 'selectedItem':
2088
2120
  this.selectedItem = oldProp.selectedItem;
2089
2121
  this.select(newProp.selectedItem);
@@ -2097,7 +2129,7 @@ var Tab = /** @class */ (function (_super) {
2097
2129
  case 'overflowMode':
2098
2130
  this.tbObj.overflowMode = newProp.overflowMode;
2099
2131
  this.tbObj.dataBind();
2100
- this.refreshActElePosition();
2132
+ this.refreshActiveTabBorder();
2101
2133
  break;
2102
2134
  case 'heightAdjustMode':
2103
2135
  this.setContentHeight(false);
@@ -2276,6 +2308,9 @@ var Tab = /** @class */ (function (_super) {
2276
2308
  __decorate([
2277
2309
  Property(false)
2278
2310
  ], Tab.prototype, "showCloseButton", void 0);
2311
+ __decorate([
2312
+ Property(true)
2313
+ ], Tab.prototype, "reorderActiveTab", void 0);
2279
2314
  __decorate([
2280
2315
  Property()
2281
2316
  ], Tab.prototype, "scrollStep", void 0);
@@ -1,4 +1,4 @@
1
- import { Component, EventHandler, Property, Event, EmitType, BaseEventArgs } from '@syncfusion/ej2-base';import { addClass, removeClass, isVisible, closest, attributes, detach, classList, KeyboardEvents } from '@syncfusion/ej2-base';import { selectAll, setStyleAttribute as setStyle, KeyboardEventArgs, select } from '@syncfusion/ej2-base';import { isNullOrUndefined as isNOU, getUniqueID, formatUnit, Collection, compile as templateCompiler } from '@syncfusion/ej2-base';import { INotifyPropertyChanged, NotifyPropertyChanges, ChildProperty, Browser, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { Popup } from '@syncfusion/ej2-popups';import { calculatePosition } from '@syncfusion/ej2-popups';import { Button, IconPosition } from '@syncfusion/ej2-buttons';import { HScroll } from '../common/h-scroll';import { VScroll } from '../common/v-scroll';
1
+ import { Component, EventHandler, Property, Event, EmitType, BaseEventArgs } from '@syncfusion/ej2-base';import { addClass, removeClass, isVisible, closest, attributes, detach, classList, KeyboardEvents } from '@syncfusion/ej2-base';import { selectAll, setStyleAttribute as setStyle, KeyboardEventArgs, select } from '@syncfusion/ej2-base';import { isNullOrUndefined as isNOU, getUniqueID, formatUnit, Collection, compile as templateCompiler } from '@syncfusion/ej2-base';import { INotifyPropertyChanged, NotifyPropertyChanges, ChildProperty, Browser, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { Popup } from '@syncfusion/ej2-popups';import { calculatePosition } from '@syncfusion/ej2-popups';import { Button, IconPosition } from '@syncfusion/ej2-buttons';import { HScroll } from '../common/h-scroll';import { VScroll } from '../common/v-scroll';
2
2
  import {OverflowOption,ItemType,DisplayMode,ItemAlign,ClickEventArgs,OverflowMode,BeforeCreateArgs} from "./toolbar";
3
3
  import {ComponentModel} from '@syncfusion/ej2-base';
4
4
 
@@ -160,7 +160,7 @@ export interface ItemModel {
160
160
  /**
161
161
  * Event triggers when `click` the toolbar item.
162
162
  *
163
- * @event
163
+ * @event click
164
164
  */
165
165
  click?: EmitType<ClickEventArgs>;
166
166
 
@@ -241,30 +241,30 @@ export interface ToolbarModel extends ComponentModel{
241
241
  allowKeyboard?: boolean;
242
242
 
243
243
  /**
244
- * The event will be fired on clicking the Toolbar elements.
244
+ * The event will be fired on clicking the Toolbar elements.
245
245
  *
246
- * @event
246
+ * @event clicked
247
247
  */
248
248
  clicked?: EmitType<ClickEventArgs>;
249
249
 
250
250
  /**
251
251
  * The event will be fired when the control is rendered.
252
252
  *
253
- * @event
253
+ * @event created
254
254
  */
255
255
  created?: EmitType<Event>;
256
256
 
257
257
  /**
258
258
  * The event will be fired when the control gets destroyed.
259
259
  *
260
- * @event
260
+ * @event destroyed
261
261
  */
262
262
  destroyed?: EmitType<Event>;
263
263
 
264
264
  /**
265
265
  * The event will be fired before the control is rendered on a page.
266
266
  *
267
- * @event
267
+ * @event beforeCreate
268
268
  */
269
269
  beforeCreate?: EmitType<BeforeCreateArgs>;
270
270
 
@@ -182,7 +182,7 @@ export declare class Item extends ChildProperty<Item> {
182
182
  /**
183
183
  * Event triggers when `click` the toolbar item.
184
184
  *
185
- * @event
185
+ * @event click
186
186
  */
187
187
  click: EmitType<ClickEventArgs>;
188
188
  }
@@ -280,27 +280,27 @@ export declare class Toolbar extends Component<HTMLElement> implements INotifyPr
280
280
  */
281
281
  allowKeyboard: boolean;
282
282
  /**
283
- * The event will be fired on clicking the Toolbar elements.
283
+ * The event will be fired on clicking the Toolbar elements.
284
284
  *
285
- * @event
285
+ * @event clicked
286
286
  */
287
287
  clicked: EmitType<ClickEventArgs>;
288
288
  /**
289
289
  * The event will be fired when the control is rendered.
290
290
  *
291
- * @event
291
+ * @event created
292
292
  */
293
293
  created: EmitType<Event>;
294
294
  /**
295
295
  * The event will be fired when the control gets destroyed.
296
296
  *
297
- * @event
297
+ * @event destroyed
298
298
  */
299
299
  destroyed: EmitType<Event>;
300
300
  /**
301
301
  * The event will be fired before the control is rendered on a page.
302
302
  *
303
- * @event
303
+ * @event beforeCreate
304
304
  */
305
305
  beforeCreate: EmitType<BeforeCreateArgs>;
306
306
  /**