@aptre/flex-layout 0.2.4 → 0.3.0-beta.2

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 (112) hide show
  1. package/README.md +154 -311
  2. package/dist/DockLocation.d.ts +2 -2
  3. package/dist/DropInfo.d.ts +4 -4
  4. package/dist/I18nLabel.d.ts +7 -9
  5. package/dist/Rect.d.ts +14 -1
  6. package/dist/Types.d.ts +16 -0
  7. package/dist/index.d.ts +21 -22
  8. package/dist/index.mjs +4529 -4618
  9. package/dist/model/Actions.d.ts +40 -23
  10. package/dist/model/BorderNode.d.ts +10 -14
  11. package/dist/model/BorderSet.d.ts +1 -2
  12. package/dist/model/IJsonModel.d.ts +697 -35
  13. package/dist/model/LayoutWindow.d.ts +28 -0
  14. package/dist/model/Model.d.ts +29 -24
  15. package/dist/model/Node.d.ts +5 -5
  16. package/dist/model/RowNode.d.ts +5 -6
  17. package/dist/model/TabNode.d.ts +15 -8
  18. package/dist/model/TabSetNode.d.ts +13 -10
  19. package/dist/view/BorderTab.d.ts +2 -0
  20. package/dist/view/Icons.d.ts +1 -0
  21. package/dist/view/Layout.d.ts +95 -116
  22. package/dist/view/Row.d.ts +1 -0
  23. package/dist/view/SizeTracker.d.ts +10 -0
  24. package/dist/view/Utils.d.ts +11 -1
  25. package/package.json +21 -25
  26. package/style/_base.scss +138 -32
  27. package/style/dark.css +145 -40
  28. package/style/dark.css.map +1 -1
  29. package/style/dark.scss +3 -1
  30. package/style/gray.css +144 -39
  31. package/style/gray.css.map +1 -1
  32. package/style/gray.scss +2 -0
  33. package/style/light.css +147 -42
  34. package/style/light.css.map +1 -1
  35. package/style/light.scss +4 -2
  36. package/style/rounded.css +697 -0
  37. package/style/rounded.css.map +1 -0
  38. package/style/rounded.scss +193 -0
  39. package/style/underline.css +145 -40
  40. package/style/underline.css.map +1 -1
  41. package/style/underline.scss +2 -0
  42. package/tsconfig.json +3 -3
  43. package/typedoc/assets/hierarchy.js +1 -0
  44. package/typedoc/assets/highlight.css +18 -18
  45. package/typedoc/assets/icons.js +17 -14
  46. package/typedoc/assets/icons.svg +1 -1
  47. package/typedoc/assets/main.js +5 -4
  48. package/typedoc/assets/navigation.js +1 -1
  49. package/typedoc/assets/search.js +1 -1
  50. package/typedoc/assets/style.css +1422 -1224
  51. package/typedoc/classes/Action.html +2 -2
  52. package/typedoc/classes/Actions.html +65 -52
  53. package/typedoc/classes/BorderNode.html +26 -30
  54. package/typedoc/classes/BorderSet.html +2 -2
  55. package/typedoc/classes/DockLocation.html +9 -9
  56. package/typedoc/classes/DropInfo.html +3 -3
  57. package/typedoc/classes/Layout.html +99 -83
  58. package/typedoc/classes/LayoutWindow.html +12 -0
  59. package/typedoc/classes/Model.html +44 -40
  60. package/typedoc/classes/Node.html +12 -12
  61. package/typedoc/classes/Orientation.html +5 -5
  62. package/typedoc/classes/Rect.html +18 -11
  63. package/typedoc/classes/RowNode.html +16 -17
  64. package/typedoc/classes/TabNode.html +40 -34
  65. package/typedoc/classes/TabSetNode.html +40 -41
  66. package/typedoc/enums/CLASSES.html +94 -78
  67. package/typedoc/enums/I18nLabel.html +11 -13
  68. package/typedoc/enums/ICloseType.html +4 -4
  69. package/typedoc/hierarchy.html +1 -1
  70. package/typedoc/index.html +1 -51
  71. package/typedoc/interfaces/IBorderAttributes.html +32 -9
  72. package/typedoc/interfaces/IDraggable.html +1 -1
  73. package/typedoc/interfaces/IDropTarget.html +1 -1
  74. package/typedoc/interfaces/IGlobalAttributes.html +190 -47
  75. package/typedoc/interfaces/IIcons.html +5 -4
  76. package/typedoc/interfaces/IJsonBorderNode.html +32 -9
  77. package/typedoc/interfaces/IJsonModel.html +3 -2
  78. package/typedoc/interfaces/IJsonPopout.html +3 -0
  79. package/typedoc/interfaces/IJsonRect.html +5 -0
  80. package/typedoc/interfaces/IJsonRowNode.html +8 -5
  81. package/typedoc/interfaces/IJsonTabNode.html +73 -15
  82. package/typedoc/interfaces/IJsonTabSetNode.html +68 -23
  83. package/typedoc/interfaces/ILayoutProps.html +36 -22
  84. package/typedoc/interfaces/IRowAttributes.html +8 -5
  85. package/typedoc/interfaces/ITabAttributes.html +73 -15
  86. package/typedoc/interfaces/ITabRenderValues.html +5 -3
  87. package/typedoc/interfaces/ITabSetAttributes.html +63 -24
  88. package/typedoc/interfaces/ITabSetRenderValues.html +8 -7
  89. package/typedoc/types/DragRectRenderCallback.html +1 -1
  90. package/typedoc/types/IBorderLocation.html +1 -1
  91. package/typedoc/types/ITabLocation.html +1 -1
  92. package/typedoc/types/NodeMouseEvent.html +1 -1
  93. package/typedoc/types/ShowOverflowMenuCallback.html +1 -1
  94. package/typedoc/types/TabSetPlaceHolderCallback.html +1 -1
  95. package/typedoc/variables/FlexLayoutVersion.html +1 -0
  96. package/dist/DragDrop.d.ts +0 -15
  97. package/dist/model/SplitterNode.d.ts +0 -5
  98. package/typedoc/classes/DragDrop.html +0 -10
  99. package/typedoc/classes/SplitterNode.html +0 -13
  100. package/typedoc/interfaces/ICustomDropDestination.html +0 -10
  101. package/typedoc/interfaces/IFontValues.html +0 -5
  102. package/typedoc/interfaces/ILayoutState.html +0 -9
  103. package/typedoc/interfaces/ITitleObject.html +0 -3
  104. package/typedoc/types/CustomDragCallback.html +0 -1
  105. package/typedoc/types/FloatingTabPlaceholderRenderCallback.html +0 -1
  106. package/typedoc/types/IInsets.html +0 -1
  107. package/typedoc/types/IconFactory.html +0 -1
  108. package/typedoc/types/TitleFactory.html +0 -1
  109. /package/dist/{PopupMenu.d.ts → view/DragContainer.d.ts} +0 -0
  110. /package/dist/view/{FloatingWindow.d.ts → Overlay.d.ts} +0 -0
  111. /package/dist/view/{FloatingWindowTab.d.ts → PopoutWindow.d.ts} +0 -0
  112. /package/dist/view/{TabFloating.d.ts → PopupMenu.d.ts} +0 -0
@@ -1,5 +1,6 @@
1
- import { DockLocation } from "../DockLocation.js";
2
- import { Action } from "./Action.js";
1
+ import { DockLocation } from "../DockLocation";
2
+ import { Action } from "./Action";
3
+ import { IJsonRect, IJsonRowNode } from "./IJsonModel";
3
4
  /**
4
5
  * The Action creator class for FlexLayout model actions
5
6
  */
@@ -11,13 +12,15 @@ export declare class Actions {
11
12
  static RENAME_TAB: string;
12
13
  static SELECT_TAB: string;
13
14
  static SET_ACTIVE_TABSET: string;
14
- static ADJUST_SPLIT: string;
15
+ static ADJUST_WEIGHTS: string;
15
16
  static ADJUST_BORDER_SPLIT: string;
16
17
  static MAXIMIZE_TOGGLE: string;
17
18
  static UPDATE_MODEL_ATTRIBUTES: string;
18
19
  static UPDATE_NODE_ATTRIBUTES: string;
19
- static FLOAT_TAB: string;
20
- static UNFLOAT_TAB: string;
20
+ static POPOUT_TAB: string;
21
+ static POPOUT_TABSET: string;
22
+ static CLOSE_WINDOW: string;
23
+ static CREATE_WINDOW: string;
21
24
  /**
22
25
  * Adds a tab node to the given tabset node
23
26
  * @param json the json for the new tab node e.g {type:"tab", component:"table"}
@@ -40,7 +43,7 @@ export declare class Actions {
40
43
  static moveNode(fromNodeId: string, toNodeId: string, location: DockLocation, index: number, select?: boolean): Action;
41
44
  /**
42
45
  * Deletes a tab node from the layout
43
- * @param tabsetNodeId the id of the tab node to delete
46
+ * @param tabNodeId the id of the tab node to delete
44
47
  * @returns {Action} the action
45
48
  */
46
49
  static deleteTab(tabNodeId: string): Action;
@@ -68,30 +71,21 @@ export declare class Actions {
68
71
  * @param tabsetNodeId the id of the tabset node to set as active
69
72
  * @returns {Action} the action
70
73
  */
71
- static setActiveTabset(tabsetNodeId: string | undefined): Action;
74
+ static setActiveTabset(tabsetNodeId: string | undefined, windowId?: string | undefined): Action;
72
75
  /**
73
- * Adjust the splitter between two tabsets
74
- * @example
75
- * Actions.adjustSplit({node1: "1", weight1:30, pixelWidth1:300, node2: "2", weight2:70, pixelWidth2:700});
76
- *
77
- * @param splitSpec an object the defines the new split between two tabsets, see example below.
76
+ * Adjust the weights of a row, used when the splitter is moved
77
+ * @param nodeId the row node whose childrens weights are being adjusted
78
+ * @param weights an array of weights to be applied to the children
78
79
  * @returns {Action} the action
79
80
  */
80
- static adjustSplit(splitSpec: {
81
- node1Id: string;
82
- weight1: number;
83
- pixelWidth1: number;
84
- node2Id: string;
85
- weight2: number;
86
- pixelWidth2: number;
87
- }): Action;
81
+ static adjustWeights(nodeId: string, weights: number[]): Action;
88
82
  static adjustBorderSplit(nodeId: string, pos: number): Action;
89
83
  /**
90
84
  * Maximizes the given tabset
91
85
  * @param tabsetNodeId the id of the tabset to maximize
92
86
  * @returns {Action} the action
93
87
  */
94
- static maximizeToggle(tabsetNodeId: string): Action;
88
+ static maximizeToggle(tabsetNodeId: string, windowId?: string | undefined): Action;
95
89
  /**
96
90
  * Updates the global model jsone attributes
97
91
  * @param attributes the json for the model attributes to update (merge into the existing attributes)
@@ -105,6 +99,29 @@ export declare class Actions {
105
99
  * @returns {Action} the action
106
100
  */
107
101
  static updateNodeAttributes(nodeId: string, attributes: any): Action;
108
- static floatTab(nodeId: string): Action;
109
- static unFloatTab(nodeId: string): Action;
102
+ /**
103
+ * Pops out the given tab node into a new browser window
104
+ * @param nodeId the tab node to popout
105
+ * @returns
106
+ */
107
+ static popoutTab(nodeId: string): Action;
108
+ /**
109
+ * Pops out the given tab set node into a new browser window
110
+ * @param nodeId the tab set node to popout
111
+ * @returns
112
+ */
113
+ static popoutTabset(nodeId: string): Action;
114
+ /**
115
+ * Closes the popout window
116
+ * @param windowId the id of the popout window to close
117
+ * @returns
118
+ */
119
+ static closeWindow(windowId: string): Action;
120
+ /**
121
+ * Creates a new empty popout window with the given layout
122
+ * @param layout the json layout for the new window
123
+ * @param rect the window rectangle in screen coordinates
124
+ * @returns
125
+ */
126
+ static createWindow(layout: IJsonRowNode, rect: IJsonRect): Action;
110
127
  }
@@ -1,23 +1,20 @@
1
- import { DockLocation } from "../DockLocation.js";
2
- import { Orientation } from "../Orientation.js";
3
- import { Rect } from "../Rect.js";
4
- import { IDropTarget } from "./IDropTarget.js";
5
- import { IJsonBorderNode } from "./IJsonModel.js";
6
- import { Node } from "./Node.js";
1
+ import { DockLocation } from "../DockLocation";
2
+ import { Orientation } from "../Orientation";
3
+ import { IDropTarget } from "./IDropTarget";
4
+ import { IJsonBorderNode } from "./IJsonModel";
5
+ import { Node } from "./Node";
6
+ import { TabNode } from "./TabNode";
7
7
  export declare class BorderNode extends Node implements IDropTarget {
8
8
  static readonly TYPE = "border";
9
9
  getLocation(): DockLocation;
10
- getTabHeaderRect(): Rect | undefined;
11
- getRect(): Rect;
12
- getContentRect(): Rect | undefined;
13
- isEnableDrop(): boolean;
14
- isAutoSelectTab(whenOpen?: boolean): boolean;
15
10
  getClassName(): string | undefined;
16
- getBorderBarSize(): number;
11
+ isHorizontal(): boolean;
17
12
  getSize(): any;
18
13
  getMinSize(): number;
14
+ getMaxSize(): number;
19
15
  getSelected(): number;
20
- getSelectedNode(): Node | undefined;
16
+ isAutoHide(): boolean;
17
+ getSelectedNode(): TabNode | undefined;
21
18
  getOrientation(): Orientation;
22
19
  /**
23
20
  * Returns the config attribute that can be used to store node specific data that
@@ -29,6 +26,5 @@ export declare class BorderNode extends Node implements IDropTarget {
29
26
  getConfig(): any;
30
27
  isMaximized(): boolean;
31
28
  isShowing(): boolean;
32
- isAutoHide(): boolean;
33
29
  toJson(): IJsonBorderNode;
34
30
  }
@@ -1,4 +1,3 @@
1
- import { BorderNode } from "./BorderNode.js";
2
1
  export declare class BorderSet {
3
- getBorders(): BorderNode[];
2
+ toJson(): import("./IJsonModel").IJsonBorderNode[];
4
3
  }