flexlayout-react 0.8.0 → 0.8.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.
- package/ChangeLog.txt +12 -0
- package/README.md +6 -6
- package/declarations/view/Layout.d.ts +1 -0
- package/dist/flexlayout.js +40 -10
- package/dist/flexlayout_min.js +2 -1
- package/dist/flexlayout_min.js.LICENSE.txt +19 -0
- package/lib/model/TabSetNode.js +2 -0
- package/lib/model/TabSetNode.js.map +1 -1
- package/lib/view/BorderButton.js +7 -2
- package/lib/view/BorderButton.js.map +1 -1
- package/lib/view/Layout.js +1 -0
- package/lib/view/Layout.js.map +1 -1
- package/lib/view/TabButton.js +7 -2
- package/lib/view/TabButton.js.map +1 -1
- package/lib/view/TabSet.js +7 -2
- package/lib/view/TabSet.js.map +1 -1
- package/package.json +29 -31
- package/src/model/TabSetNode.ts +3 -0
- package/src/view/BorderButton.tsx +6 -2
- package/src/view/Layout.tsx +8 -6
- package/src/view/TabButton.tsx +6 -2
- package/src/view/TabSet.tsx +6 -2
- package/style/dark.css +5 -5
- package/style/gray.css +5 -5
- package/style/light.css +6 -6
- package/style/rounded.css +6 -6
- package/style/underline.css +6 -6
package/ChangeLog.txt
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
0.8.2
|
|
2
|
+
Updated dependencies
|
|
3
|
+
Enabled use with React 19
|
|
4
|
+
Removed strict mode from demo due to bug in React 19 (https://github.com/facebook/react/issues/29585) causing
|
|
5
|
+
tabs to re-mount when moved
|
|
6
|
+
Used CodeSandbox in README.md since react 19 doesn't create UMD versions needed by JSFiddle.
|
|
7
|
+
|
|
8
|
+
0.8.1
|
|
9
|
+
Fixed enableDrag on tab and tabset nodes.
|
|
10
|
+
Fixed calc for min/max tabset height from min/max tab height.
|
|
11
|
+
Modified style sheet code in demo to reduce flash.
|
|
12
|
+
|
|
1
13
|
0.8.0
|
|
2
14
|
New:
|
|
3
15
|
* Wrap tabs option
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ FlexLayout is a layout manager that arranges React components in multiple tab se
|
|
|
10
10
|
|
|
11
11
|
[Run the Demo](https://rawgit.com/caplin/FlexLayout/demos/demos/v0.8/demo/index.html)
|
|
12
12
|
|
|
13
|
-
Try it now using [
|
|
13
|
+
Try it now using [CodeSandbox](https://codesandbox.io/p/sandbox/yvjzqf)
|
|
14
14
|
|
|
15
15
|
[API Doc](https://rawgit.com/caplin/FlexLayout/demos/demos/v0.8/typedoc/index.html)
|
|
16
16
|
|
|
@@ -104,7 +104,7 @@ var json = {
|
|
|
104
104
|
{
|
|
105
105
|
type: "tab",
|
|
106
106
|
name: "One",
|
|
107
|
-
component: "
|
|
107
|
+
component: "placeholder",
|
|
108
108
|
}
|
|
109
109
|
]
|
|
110
110
|
},
|
|
@@ -115,7 +115,7 @@ var json = {
|
|
|
115
115
|
{
|
|
116
116
|
type: "tab",
|
|
117
117
|
name: "Two",
|
|
118
|
-
component: "
|
|
118
|
+
component: "placeholder",
|
|
119
119
|
}
|
|
120
120
|
]
|
|
121
121
|
}
|
|
@@ -134,8 +134,8 @@ function App() {
|
|
|
134
134
|
const factory = (node) => {
|
|
135
135
|
var component = node.getComponent();
|
|
136
136
|
|
|
137
|
-
if (component === "
|
|
138
|
-
return <
|
|
137
|
+
if (component === "placeholder") {
|
|
138
|
+
return <div>{node.getName()}</div>;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
|
|
@@ -149,7 +149,7 @@ function App() {
|
|
|
149
149
|
|
|
150
150
|
The above code would render two tab sets horizontally each containing a single tab that hosts a button component. The tabs could be moved and resized by dragging and dropping. Additional grids could be added to the layout by sending actions to the model.
|
|
151
151
|
|
|
152
|
-
Try it now using [
|
|
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
|
|
|
@@ -96,6 +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
100
|
export type DragRectRenderCallback = (content: React.ReactNode | undefined, node?: Node, json?: IJsonTabNode) => React.ReactNode | undefined;
|
|
100
101
|
export type NodeMouseEvent = (node: TabNode | TabSetNode | BorderNode, event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
101
102
|
export type ShowOverflowMenuCallback = (node: TabSetNode | BorderNode, mouseEvent: React.MouseEvent<HTMLElement, MouseEvent>, items: {
|