flexlayout-react 0.8.3 → 0.8.4

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 (48) hide show
  1. package/ChangeLog.txt +5 -0
  2. package/declarations/Types.d.ts +3 -1
  3. package/declarations/model/BorderNode.d.ts +1 -0
  4. package/declarations/model/IJsonModel.d.ts +29 -1
  5. package/declarations/model/TabSetNode.d.ts +1 -0
  6. package/declarations/view/Layout.d.ts +1 -1
  7. package/dist/flexlayout.js +9 -9
  8. package/dist/flexlayout_min.js +1 -1
  9. package/lib/Types.js +2 -0
  10. package/lib/Types.js.map +1 -1
  11. package/lib/model/BorderNode.js +4 -0
  12. package/lib/model/BorderNode.js.map +1 -1
  13. package/lib/model/Model.js +2 -0
  14. package/lib/model/Model.js.map +1 -1
  15. package/lib/model/TabSetNode.js +4 -0
  16. package/lib/model/TabSetNode.js.map +1 -1
  17. package/lib/view/BorderTabSet.js +17 -13
  18. package/lib/view/BorderTabSet.js.map +1 -1
  19. package/lib/view/Layout.js +1 -1
  20. package/lib/view/Splitter.js +2 -2
  21. package/lib/view/TabOverflowHook.js +141 -114
  22. package/lib/view/TabOverflowHook.js.map +1 -1
  23. package/lib/view/TabSet.js +14 -20
  24. package/lib/view/TabSet.js.map +1 -1
  25. package/package.json +1 -1
  26. package/src/Types.ts +3 -0
  27. package/src/model/BorderNode.ts +7 -0
  28. package/src/model/IJsonModel.ts +33 -1
  29. package/src/model/Model.ts +2 -0
  30. package/src/model/TabSetNode.ts +9 -0
  31. package/src/view/BorderTabSet.tsx +26 -15
  32. package/src/view/Layout.tsx +1 -1
  33. package/src/view/Splitter.tsx +2 -2
  34. package/src/view/TabOverflowHook.tsx +165 -128
  35. package/src/view/TabSet.tsx +19 -21
  36. package/style/_base.scss +26 -3
  37. package/style/dark.css +701 -685
  38. package/style/dark.css.map +1 -1
  39. package/style/gray.css +684 -668
  40. package/style/gray.css.map +1 -1
  41. package/style/light.css +685 -669
  42. package/style/light.css.map +1 -1
  43. package/style/rounded.css +730 -697
  44. package/style/rounded.css.map +1 -1
  45. package/style/rounded.scss +22 -5
  46. package/style/underline.css +705 -690
  47. package/style/underline.css.map +1 -1
  48. package/style/underline.scss +1 -1
package/ChangeLog.txt CHANGED
@@ -1,3 +1,8 @@
1
+ 0.8.4
2
+ Added attribute 'enableTabScrollbar' to TabSet and Border nodes
3
+ Enabling this attribute will show a mini 'scrollbar' for the tabs to indicate the scroll position
4
+ See the Demo apps default layout for an example.
5
+
1
6
  0.8.3
2
7
  Prevent sticky buttons scrolling when there are no tabs
3
8
  Fix border 'show' attribute
@@ -91,5 +91,7 @@ export declare enum CLASSES {
91
91
  FLEXLAYOUT__TAB_TOOLBAR_BUTTON_CLOSE = "flexlayout__tab_toolbar_button-close",
92
92
  FLEXLAYOUT__POPUP_MENU_CONTAINER = "flexlayout__popup_menu_container",
93
93
  FLEXLAYOUT__POPUP_MENU_ITEM = "flexlayout__popup_menu_item",
94
- FLEXLAYOUT__POPUP_MENU = "flexlayout__popup_menu"
94
+ FLEXLAYOUT__POPUP_MENU = "flexlayout__popup_menu",
95
+ FLEXLAYOUT__MINI_SCROLLBAR = "flexlayout__mini_scrollbar",
96
+ FLEXLAYOUT__MINI_SCROLLBAR_HIDDEN = "flexlayout__mini_scrollbar_hidden"
95
97
  }
@@ -27,4 +27,5 @@ export declare class BorderNode extends Node implements IDropTarget {
27
27
  isMaximized(): boolean;
28
28
  isShowing(): boolean;
29
29
  toJson(): IJsonBorderNode;
30
+ isEnableTabScrollbar(): boolean;
30
31
  }
@@ -76,6 +76,14 @@ export interface IGlobalAttributes {
76
76
  Default: true
77
77
  */
78
78
  borderEnableDrop?: boolean;
79
+ /**
80
+ Value for BorderNode attribute enableTabScrollbar if not overridden
81
+
82
+ whether to show a mini scrollbar for the tabs
83
+
84
+ Default: false
85
+ */
86
+ borderEnableTabScrollbar?: boolean;
79
87
  /**
80
88
  Value for BorderNode attribute maxSize if not overridden
81
89
 
@@ -359,6 +367,14 @@ export interface IGlobalAttributes {
359
367
  Default: false
360
368
  */
361
369
  tabSetEnableSingleTabStretch?: boolean;
370
+ /**
371
+ Value for TabSetNode attribute enableTabScrollbar if not overridden
372
+
373
+ whether to show a mini scrollbar for the tabs
374
+
375
+ Default: false
376
+ */
377
+ tabSetEnableTabScrollbar?: boolean;
362
378
  /**
363
379
  Value for TabSetNode attribute enableTabStrip if not overridden
364
380
 
@@ -370,7 +386,7 @@ export interface IGlobalAttributes {
370
386
  /**
371
387
  Value for TabSetNode attribute enableTabWrap if not overridden
372
388
 
373
- show tabs in location top or bottom
389
+ wrap tabs onto multiple lines
374
390
 
375
391
  Default: false
376
392
  */
@@ -503,6 +519,12 @@ export interface ITabSetAttributes {
503
519
  Default: inherited from Global attribute tabSetEnableSingleTabStretch (default false)
504
520
  */
505
521
  enableSingleTabStretch?: boolean;
522
+ /**
523
+ whether to show a mini scrollbar for the tabs
524
+
525
+ Default: inherited from Global attribute tabSetEnableTabScrollbar (default false)
526
+ */
527
+ enableTabScrollbar?: boolean;
506
528
  /**
507
529
  enable tab strip and allow multiple tabs in this tabset
508
530
 
@@ -772,6 +794,12 @@ export interface IBorderAttributes {
772
794
  Default: inherited from Global attribute borderEnableDrop (default true)
773
795
  */
774
796
  enableDrop?: boolean;
797
+ /**
798
+ whether to show a mini scrollbar for the tabs
799
+
800
+ Default: inherited from Global attribute borderEnableTabScrollbar (default false)
801
+ */
802
+ enableTabScrollbar?: boolean;
775
803
  /**
776
804
  the maximum size of the tab area
777
805
 
@@ -37,6 +37,7 @@ export declare class TabSetNode extends Node implements IDraggable, IDropTarget
37
37
  isEnableSingleTabStretch(): boolean;
38
38
  isEnableTabStrip(): boolean;
39
39
  isAutoSelectTab(): boolean;
40
+ isEnableTabScrollbar(): boolean;
40
41
  getClassNameTabStrip(): string | undefined;
41
42
  getTabLocation(): string;
42
43
  toJson(): IJsonTabSetNode;
@@ -96,7 +96,7 @@ export declare class Layout extends React.Component<ILayoutProps> {
96
96
  /** Get the root div element of the layout */
97
97
  getRootDiv(): HTMLDivElement | null;
98
98
  }
99
- export declare const FlexLayoutVersion = "0.8.1";
99
+ export declare const FlexLayoutVersion = "0.8.4";
100
100
  export type DragRectRenderCallback = (content: React.ReactNode | undefined, node?: Node, json?: IJsonTabNode) => React.ReactNode | undefined;
101
101
  export type NodeMouseEvent = (node: TabNode | TabSetNode | BorderNode, event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
102
102
  export type ShowOverflowMenuCallback = (node: TabSetNode | BorderNode, mouseEvent: React.MouseEvent<HTMLElement, MouseEvent>, items: {