flexlayout-react 0.9.0 → 0.9.1
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/README.md +5 -5
- package/dist/index.js +433 -373
- package/package.json +14 -13
- package/style/_base.scss +8 -3
- package/style/_themes.scss +0 -1
- package/style/alpha_dark.css +6 -3
- package/style/alpha_dark.css.map +1 -1
- package/style/alpha_light.css +6 -3
- package/style/alpha_light.css.map +1 -1
- package/style/alpha_rounded.css +6 -4
- package/style/alpha_rounded.css.map +1 -1
- package/style/combined.css +6 -4
- package/style/combined.css.map +1 -1
- package/style/dark.css +6 -3
- package/style/dark.css.map +1 -1
- package/style/gray.css +6 -3
- package/style/gray.css.map +1 -1
- package/style/light.css +6 -3
- package/style/light.css.map +1 -1
- package/style/rounded.css +6 -3
- package/style/rounded.css.map +1 -1
- package/style/underline.css +6 -3
- package/style/underline.css.map +1 -1
- package/types/model/IJsonModel.d.ts +2 -2
- package/types/model/Model.d.ts +1 -1
- package/types/model/TabNode.d.ts +3 -5
- package/types/view/CSSClassNames.d.ts +2 -1
- package/types/view/{DragContainer.d.ts → DragTabButton.d.ts} +2 -2
- package/types/view/FloatWindow.d.ts +1 -0
- package/types/view/I18nLabel.d.ts +1 -1
- package/types/view/Layout.d.ts +17 -15
- package/types/view/Utils.d.ts +8 -0
- package/types/view/layout/LayoutInternal.d.ts +8 -12
package/style/underline.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["_themes.scss","_base.scss"],"names":[],"mappings":"AAkYQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EAEA;EACA;EACA;EAEA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EAEA;EACA;EAEA;EACA;EACA;EAEA;EACA;EACA;EAEA;EACA;;;AC5bR;AAAA;AAAA;AAII;EApBJ;EACA;EACA;EACA;EACA;EAkBQ;
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["_themes.scss","_base.scss"],"names":[],"mappings":"AAkYQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EAEA;EACA;EACA;EAEA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EAEA;EACA;EAEA;EACA;EACA;EAEA;EACA;EACA;EAEA;EACA;;;AC5bR;AAAA;AAAA;AAII;EApBJ;EACA;EACA;EACA;EACA;EAkBQ;EAEA;;AAEA;EACI;EACA;;AAGJ;EA/BR;EACA;EACA;EACA;EACA;EA6BY;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;;AAGJ;EA7CR;EACA;EACA;EACA;EA4CY;EACA;;AAIR;EApDJ;EACA;EACA;EACA;EAmDQ;;AAGJ;EAzDJ;EACA;EACA;EACA;EAwDQ;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;;AAEA;EACI;EACA;EACA;EACA;AACA;EACA;EACA;EACA;EACA;;AAIR;EACI;EACA;;AAEA;EACI;EACA;EACA;EACA;AACA;EACA;EACA;EACA;EACA;;AAIR;EACI;IACI;IACA;IACA;IACA;;;AAMR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;;AAEA;EACI;EACA;;AAGJ;EACI;EACA;;AAIR;EACI;EACA;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;EACA;EACA;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EAnMJ;EACA;EACA;EACA;EAkMQ;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EApNR;EACA;EACA;EACA;EAmNY;EACA;EACA;;AAGJ;EACI;;AAGJ;EA/NR;EACA;EACA;EACA;EA8NY;EACA;EACA;;AAGJ;EACI;;AAIA;EAEI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;;AAGJ;EAEI;EACA;EACA;EACA;EACA;;AAEA;EACI;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;;AAGJ;EACI;;AAMhB;EACI;;AAGJ;EACI;;AAIR;EACI;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EAEI;EACA;EACA;;AAGJ;EACI;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EAEA;;AAEA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;IACI;;;AAKZ;EACI;EACA;;AAGJ;EACI;IACI;;;AAIR;EACI;EACA;;AAOJ;EACI;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;EACA;;AAEA;EACI;;AAQR;EACI;IACI;;;AAIR;EACI;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIR;EACI;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;IACI;;;AAaZ;EACI;EACA;EACA;EACA;;AAKZ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;EACA;;AAGJ;EACI;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;;AAGJ;EACI;EACA;EACA;;AAKZ;EACI;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;;AAGJ;EACI;IAEI;;;AAIR;EACI;EACA;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;EACA;EACA;;AASJ;EACI;IACI;;;AAIR;EACI;;AAIR;EACI;EACA;EACA;;AAEA;EAEI;EACA;EACA;;AAGJ;EAEI;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;IACI;;;AAMR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAYhB;EACI;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;;AAIR;EACI;IACI;;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAKJ;EACI;;AAGJ;EA/wBR;EACA;EACA;EACA;EACA;;AAgxBI;EApxBJ;EACA;EACA;EACA;EACA;EAkxBQ;EACA;;AAGJ;EACI;EACA;;AAOJ;EACI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAEA;EACI;IACI;IACA;;;;AAMhB;ADxXA;AAAA;AAAA;AAKI;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EAEI;EACA;EACA;EACA;;AAGJ;EACI","file":"underline.css"}
|
|
@@ -196,7 +196,7 @@ export interface IGlobalAttributes {
|
|
|
196
196
|
/**
|
|
197
197
|
Value for TabNode attribute enablePopout if not overridden
|
|
198
198
|
|
|
199
|
-
enable popout (in popout capable browser)
|
|
199
|
+
enable window popout (in popout capable browser), to show an icon in the tabset header also set the enablePopoutIcon attribute
|
|
200
200
|
|
|
201
201
|
Default: false
|
|
202
202
|
*/
|
|
@@ -669,7 +669,7 @@ export interface ITabAttributes {
|
|
|
669
669
|
*/
|
|
670
670
|
enableDrag?: boolean;
|
|
671
671
|
/**
|
|
672
|
-
enable popout (in popout capable browser)
|
|
672
|
+
enable window popout (in popout capable browser), to show an icon in the tabset header also set the enablePopoutIcon attribute
|
|
673
673
|
|
|
674
674
|
Default: inherited from Global attribute tabEnablePopout (default false)
|
|
675
675
|
*/
|
package/types/model/Model.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export declare class Model {
|
|
|
46
46
|
* Update the node tree by performing the given action,
|
|
47
47
|
* Actions should be generated via static methods on the Actions class
|
|
48
48
|
* @param action the action to perform
|
|
49
|
-
* @returns added Node for Actions.
|
|
49
|
+
* @returns added Node for Actions.addTab, layoutId for createPopout
|
|
50
50
|
*/
|
|
51
51
|
doAction(action: Action): any;
|
|
52
52
|
/**
|
package/types/model/TabNode.d.ts
CHANGED
|
@@ -9,14 +9,14 @@ export declare class TabNode extends Node implements IDraggable {
|
|
|
9
9
|
/** @internal */
|
|
10
10
|
static fromJson(json: IJsonTabNode, model: Model, addToModel?: boolean): TabNode;
|
|
11
11
|
private tabRect;
|
|
12
|
-
private moveableElement;
|
|
13
12
|
private renderedName?;
|
|
14
13
|
private extra;
|
|
15
14
|
private visible;
|
|
16
15
|
private rendered;
|
|
16
|
+
private moveableElement;
|
|
17
|
+
private tabStamp;
|
|
17
18
|
private scrollTop?;
|
|
18
19
|
private scrollLeft?;
|
|
19
|
-
private tabStamp;
|
|
20
20
|
/** @internal */
|
|
21
21
|
constructor(model: Model, json: IJsonTabNode, addToModel?: boolean);
|
|
22
22
|
getName(): string;
|
|
@@ -90,9 +90,7 @@ export declare class TabNode extends Node implements IDraggable {
|
|
|
90
90
|
/** @internal */
|
|
91
91
|
setTabStamp(stamp: HTMLElement | null): void;
|
|
92
92
|
/** @internal */
|
|
93
|
-
getMoveableElement(): HTMLElement
|
|
94
|
-
/** @internal */
|
|
95
|
-
setMoveableElement(element: HTMLElement | null): void;
|
|
93
|
+
getMoveableElement(): HTMLElement;
|
|
96
94
|
/** @internal */
|
|
97
95
|
setRenderedName(name: string): void;
|
|
98
96
|
/** @internal */
|
|
@@ -35,7 +35,8 @@ export declare enum CLASSES {
|
|
|
35
35
|
FLEXLAYOUT__FLOAT_WINDOW_CONTENT = "flexlayout__float_window_content",
|
|
36
36
|
FLEXLAYOUT__FLOATING_WINDOW_CONTENT = "flexlayout__floating_window_content",
|
|
37
37
|
FLEXLAYOUT__LAYOUT = "flexlayout__layout",
|
|
38
|
-
|
|
38
|
+
FLEXLAYOUT__LAYOUT_METRICS = "flexlayout__layout_metrics",
|
|
39
|
+
FLEXLAYOUT__LAYOUT_MOVEABLES_HOME = "flexlayout__layout_moveables_home",
|
|
39
40
|
FLEXLAYOUT__LAYOUT_OVERLAY = "flexlayout__layout_overlay",
|
|
40
41
|
FLEXLAYOUT__LAYOUT_TAB_STAMPS = "flexlayout__layout_tab_stamps",
|
|
41
42
|
FLEXLAYOUT__LAYOUT_MAIN = "flexlayout__layout_main",
|
|
@@ -2,10 +2,10 @@ import * as React from "react";
|
|
|
2
2
|
import { TabNode } from "../model/TabNode";
|
|
3
3
|
import { LayoutController } from "./layout/LayoutInternal";
|
|
4
4
|
/** @internal */
|
|
5
|
-
export interface
|
|
5
|
+
export interface IDragTabButton {
|
|
6
6
|
tabNode: TabNode;
|
|
7
7
|
controller: LayoutController;
|
|
8
8
|
dragging: boolean;
|
|
9
9
|
}
|
|
10
10
|
/** @internal */
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const DragTabButton: React.MemoExoticComponent<(props: IDragTabButton) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -3,7 +3,7 @@ export declare enum I18nLabel {
|
|
|
3
3
|
Close_Tabset = "Close tab set",
|
|
4
4
|
Active_Tabset = "Active tab set",
|
|
5
5
|
Move_Tabset = "Move tab set",
|
|
6
|
-
Move_Tabs = "Move tabs(?)",
|
|
6
|
+
Move_Tabs = "Move tabs (?)",
|
|
7
7
|
Maximize = "Maximize tab set",
|
|
8
8
|
Restore = "Restore tab set",
|
|
9
9
|
Popout_Tab = "Popout selected tab",
|
package/types/view/Layout.d.ts
CHANGED
|
@@ -54,16 +54,18 @@ export interface ILayoutProps {
|
|
|
54
54
|
popoutWindowName?: string;
|
|
55
55
|
/** the transition speed of the drag rectangle from one position to another, default is 0.3 secs */
|
|
56
56
|
tabDragSpeed?: number;
|
|
57
|
+
/** set to constrain floating panels to within the layout control */
|
|
58
|
+
constrainFloatPanels?: boolean;
|
|
57
59
|
}
|
|
58
60
|
export interface ILayoutApi {
|
|
59
61
|
/** re-render the layout */
|
|
60
62
|
redraw(): void;
|
|
61
63
|
/**
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
* Adds a new tab to the given tabset
|
|
65
|
+
* @param tabsetId the id of the tabset where the new tab will be added
|
|
66
|
+
* @param json the json for the new tab node
|
|
67
|
+
* @returns the added tab node or undefined
|
|
68
|
+
*/
|
|
67
69
|
addTabToTabSet(tabsetId: string, json: IJsonTabNode): TabNode | undefined;
|
|
68
70
|
/**
|
|
69
71
|
* Adds a new tab by dragging an item to the drop location, must be called from within an HTML
|
|
@@ -82,18 +84,18 @@ export interface ILayoutApi {
|
|
|
82
84
|
*/
|
|
83
85
|
moveTabWithDragAndDrop(event: DragEvent, node: (TabNode | TabSetNode)): void;
|
|
84
86
|
/**
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
* Adds a new tab to the active tabset (if there is one)
|
|
88
|
+
* @param json the json for the new tab node
|
|
89
|
+
* @returns the added tab node or undefined
|
|
90
|
+
*/
|
|
89
91
|
addTabToActiveTabSet(json: IJsonTabNode): TabNode | undefined;
|
|
90
92
|
/**
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
* Sets the drag image from a react component for a drag event
|
|
94
|
+
* @param event the drag event
|
|
95
|
+
* @param component the react component to be used for the drag image
|
|
96
|
+
* @param x the x position of the drag cursor on the image
|
|
97
|
+
* @param y the x position of the drag cursor on the image
|
|
98
|
+
*/
|
|
97
99
|
setDragComponent(event: DragEvent, component: React.ReactNode, x: number, y: number): void;
|
|
98
100
|
/** Get the root div element of the layout */
|
|
99
101
|
getRootDiv(): HTMLDivElement | null | undefined;
|
package/types/view/Utils.d.ts
CHANGED
|
@@ -22,3 +22,11 @@ export declare function findParentLayout(layout: Layout): Layout | undefined;
|
|
|
22
22
|
export declare function canDockToLayout(node: Node, layout: Layout): boolean;
|
|
23
23
|
export declare function copyInlineStyles(source: HTMLElement, target: HTMLElement): boolean;
|
|
24
24
|
export declare function isSafari(): boolean;
|
|
25
|
+
export declare function getPageMetrics(): {
|
|
26
|
+
scrollTop: number;
|
|
27
|
+
scrollLeft: number;
|
|
28
|
+
fullHeight: number;
|
|
29
|
+
fullWidth: number;
|
|
30
|
+
viewportHeight: number;
|
|
31
|
+
viewportWidth: number;
|
|
32
|
+
};
|
|
@@ -27,10 +27,10 @@ export interface ILayoutInternalState {
|
|
|
27
27
|
showEdges: boolean;
|
|
28
28
|
showOverlay: boolean;
|
|
29
29
|
calculatedBorderBarSize: number;
|
|
30
|
+
calculatedSplitterSize: number;
|
|
30
31
|
layoutRedrawRevision: number;
|
|
31
32
|
fullRedrawRevision: number;
|
|
32
33
|
showHiddenBorder: DockLocation;
|
|
33
|
-
splitterSize: number;
|
|
34
34
|
}
|
|
35
35
|
/** @internal */
|
|
36
36
|
export declare const LayoutInternal: React.ForwardRefExoticComponent<ILayoutInternalProps & React.RefAttributes<LayoutController>>;
|
|
@@ -41,12 +41,12 @@ export declare class LayoutController {
|
|
|
41
41
|
private _state;
|
|
42
42
|
private _setState;
|
|
43
43
|
private _layoutRef;
|
|
44
|
-
private
|
|
44
|
+
private _moveablesHomeRef;
|
|
45
45
|
private _findBorderBarSizeRef;
|
|
46
|
+
private _findSplitterSizeRef;
|
|
46
47
|
private _mainRef;
|
|
47
48
|
private _orderedTabIds;
|
|
48
49
|
private _orderedTabMoveableIds;
|
|
49
|
-
private _moveableElementMap;
|
|
50
50
|
private _currentDocument?;
|
|
51
51
|
private _currentWindow?;
|
|
52
52
|
private _supportsPopout;
|
|
@@ -63,12 +63,7 @@ export declare class LayoutController {
|
|
|
63
63
|
renderLayout(): import("react/jsx-runtime").JSX.Element;
|
|
64
64
|
renderTabContainers(): Map<string, React.ReactNode>;
|
|
65
65
|
renderTabContents(): Map<string, React.ReactNode>;
|
|
66
|
-
|
|
67
|
-
renderTabStamps(): React.ReactNode[];
|
|
68
|
-
createMoveableDivs(): void;
|
|
69
|
-
getMoveablesDiv(): HTMLDivElement | null;
|
|
70
|
-
getMoveableElement(id: string): HTMLElement;
|
|
71
|
-
tidyMoveablesMap(): void;
|
|
66
|
+
renderDragTabButtons(): React.ReactNode[];
|
|
72
67
|
redrawLayout(): void;
|
|
73
68
|
redrawLayoutAndTabContent(isLayoutRevision?: boolean): void;
|
|
74
69
|
doAction(action: Action): Node | undefined;
|
|
@@ -80,6 +75,7 @@ export declare class LayoutController {
|
|
|
80
75
|
addTabWithDragAndDrop(event: DragEvent, json: IJsonTabNode, onDrop?: (node?: Node, event?: React.DragEvent<HTMLElement>) => void): void;
|
|
81
76
|
moveTabWithDragAndDrop(event: DragEvent, node: (TabNode | TabSetNode)): void;
|
|
82
77
|
setDragComponent(event: DragEvent, component: React.ReactNode, x: number, y: number): void;
|
|
78
|
+
getMoveablesHome(): HTMLDivElement | null;
|
|
83
79
|
getProps(): ILayoutInternalProps;
|
|
84
80
|
setProps(value: ILayoutInternalProps): void;
|
|
85
81
|
getState(): ILayoutInternalState;
|
|
@@ -88,10 +84,11 @@ export declare class LayoutController {
|
|
|
88
84
|
setSetState(value: (update: Partial<ILayoutInternalState> | ((prevState: ILayoutInternalState, props: ILayoutInternalProps) => Partial<ILayoutInternalState>)) => void): void;
|
|
89
85
|
getLayoutRef(): React.RefObject<HTMLDivElement | null>;
|
|
90
86
|
setLayoutRef(value: React.RefObject<HTMLDivElement | null>): void;
|
|
91
|
-
|
|
92
|
-
setMoveablesRef(value: React.RefObject<HTMLDivElement | null>): void;
|
|
87
|
+
setMoveablesHomeRef(value: React.RefObject<HTMLDivElement | null>): void;
|
|
93
88
|
getFindBorderBarSizeRef(): React.RefObject<HTMLDivElement | null>;
|
|
94
89
|
setFindBorderBarSizeRef(value: React.RefObject<HTMLDivElement | null>): void;
|
|
90
|
+
getFindSplitterSizeRef(): React.RefObject<HTMLDivElement | null>;
|
|
91
|
+
setFindSplitterSizeRef(value: React.RefObject<HTMLDivElement | null>): void;
|
|
95
92
|
getMainRef(): React.RefObject<HTMLDivElement | null>;
|
|
96
93
|
setMainRef(value: React.RefObject<HTMLDivElement | null>): void;
|
|
97
94
|
getOrderedTabIds(): string[];
|
|
@@ -114,7 +111,6 @@ export declare class LayoutController {
|
|
|
114
111
|
isReLayout(): boolean;
|
|
115
112
|
setReLayout(value: boolean): void;
|
|
116
113
|
getBoundingClientRect(div: HTMLElement): Rect;
|
|
117
|
-
getMoveableContainer(): HTMLDivElement | null;
|
|
118
114
|
getClassName: (defaultClassName: string) => string;
|
|
119
115
|
getDomRect(): Rect;
|
|
120
116
|
getRootDiv(): HTMLDivElement | null;
|