flexlayout-react 0.8.2 → 0.8.3
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.
- package/ChangeLog.txt +5 -0
- package/README.md +3 -3
- package/declarations/model/IJsonModel.d.ts +1 -1
- package/declarations/view/Utils.d.ts +0 -3
- package/dist/flexlayout.js +7 -7
- package/dist/flexlayout_min.js +1 -1
- package/lib/model/LayoutWindow.js +1 -3
- package/lib/model/LayoutWindow.js.map +1 -1
- package/lib/model/Model.js +0 -9
- package/lib/model/Model.js.map +1 -1
- package/lib/model/TabSetNode.js +1 -1
- package/lib/model/TabSetNode.js.map +1 -1
- package/lib/view/Layout.js +1 -1
- package/lib/view/Layout.js.map +1 -1
- package/lib/view/Tab.js +5 -0
- package/lib/view/Tab.js.map +1 -1
- package/lib/view/TabOverflowHook.js +2 -0
- package/lib/view/TabOverflowHook.js.map +1 -1
- package/lib/view/Utils.js +0 -17
- package/lib/view/Utils.js.map +1 -1
- package/package.json +1 -1
- package/src/model/IJsonModel.ts +1 -1
- package/src/model/LayoutWindow.ts +1 -3
- package/src/model/Model.ts +0 -9
- package/src/model/TabSetNode.ts +1 -1
- package/src/view/Layout.tsx +1 -1
- package/src/view/Tab.tsx +6 -0
- package/src/view/TabOverflowHook.tsx +1 -0
- package/src/view/Utils.tsx +0 -24
package/ChangeLog.txt
CHANGED
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ FlexLayout's only dependency is React.
|
|
|
20
20
|
|
|
21
21
|
Features:
|
|
22
22
|
* splitters
|
|
23
|
-
* tabs
|
|
23
|
+
* tabs (scrolling or wrapped)
|
|
24
24
|
* tab dragging and ordering
|
|
25
25
|
* tab set dragging (move all the tabs in a tab set in one operation)
|
|
26
26
|
* dock to tab set or edge of frame
|
|
@@ -147,13 +147,13 @@ function App() {
|
|
|
147
147
|
}
|
|
148
148
|
```
|
|
149
149
|
|
|
150
|
-
The above code would render two tab sets horizontally each containing a single tab that hosts a
|
|
150
|
+
The above code would render two tab sets horizontally each containing a single tab that hosts a div component (returned from the factory). The tabs could be moved and resized by dragging and dropping. Additional tabs could be added to the layout by sending actions to the model.
|
|
151
151
|
|
|
152
152
|
Try it now using [CodeSandbox](https://codesandbox.io/p/sandbox/yvjzqf)
|
|
153
153
|
|
|
154
154
|
A simple Typescript example can be found here:
|
|
155
155
|
|
|
156
|
-
https://github.com/nealus/
|
|
156
|
+
https://github.com/nealus/flexlayout-vite-example
|
|
157
157
|
|
|
158
158
|
The model json contains 4 top level elements:
|
|
159
159
|
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Node } from "../model/Node";
|
|
3
|
-
import { Rect } from "../Rect";
|
|
4
3
|
export declare function enablePointerOnIFrames(enable: boolean, currentDocument: Document): void;
|
|
5
4
|
export declare function getElementsByTagName(tag: string, currentDocument: Document): Element[];
|
|
6
5
|
export declare function startDrag(doc: Document, event: React.PointerEvent<HTMLElement>, drag: (x: number, y: number) => void, dragEnd: () => void, dragCancel: () => void): void;
|
|
7
6
|
export declare function canDockToWindow(node: Node): boolean;
|
|
8
|
-
export declare function keepOnScreen(rect: Rect): Rect;
|
|
9
|
-
export declare function isOnScreen(rect: Rect): boolean;
|
|
10
7
|
export declare function copyInlineStyles(source: HTMLElement, target: HTMLElement): boolean;
|
|
11
8
|
export declare function isSafari(): boolean;
|