dockview 1.0.3 → 1.1.0
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 +243 -186
- package/dist/cjs/api/component.api.d.ts +28 -19
- package/dist/cjs/api/component.api.js +104 -33
- package/dist/cjs/api/component.api.js.map +1 -1
- package/dist/cjs/api/gridviewPanelApi.js +1 -0
- package/dist/cjs/api/gridviewPanelApi.js.map +1 -1
- package/dist/cjs/api/groupPanelApi.d.ts +11 -14
- package/dist/cjs/api/groupPanelApi.js +19 -17
- package/dist/cjs/api/groupPanelApi.js.map +1 -1
- package/dist/cjs/api/panelApi.d.ts +0 -25
- package/dist/cjs/api/panelApi.js +1 -20
- package/dist/cjs/api/panelApi.js.map +1 -1
- package/dist/cjs/api/paneviewPanelApi.js +1 -0
- package/dist/cjs/api/paneviewPanelApi.js.map +1 -1
- package/dist/cjs/api/splitviewPanelApi.d.ts +0 -1
- package/dist/cjs/api/splitviewPanelApi.js +1 -5
- package/dist/cjs/api/splitviewPanelApi.js.map +1 -1
- package/dist/cjs/dnd/abstractDragHandler.d.ts +3 -3
- package/dist/cjs/dnd/abstractDragHandler.js +15 -14
- package/dist/cjs/dnd/abstractDragHandler.js.map +1 -1
- package/dist/cjs/dnd/dataTransfer.d.ts +0 -25
- package/dist/cjs/dnd/dataTransfer.js +1 -45
- package/dist/cjs/dnd/dataTransfer.js.map +1 -1
- package/dist/cjs/dnd/dnd.d.ts +1 -14
- package/dist/cjs/dnd/dnd.js +1 -79
- package/dist/cjs/dnd/dnd.js.map +1 -1
- package/dist/cjs/dnd/droptarget.d.ts +3 -0
- package/dist/cjs/dnd/droptarget.js +69 -45
- package/dist/cjs/dnd/droptarget.js.map +1 -1
- package/dist/cjs/dockview/components/tab/defaultTab.d.ts +0 -1
- package/dist/cjs/dockview/components/tab/defaultTab.js +0 -8
- package/dist/cjs/dockview/components/tab/defaultTab.js.map +1 -1
- package/dist/cjs/dockview/dockviewComponent.d.ts +27 -19
- package/dist/cjs/dockview/dockviewComponent.js +67 -178
- package/dist/cjs/dockview/dockviewComponent.js.map +1 -1
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts +2 -5
- package/dist/cjs/dockview/dockviewGroupPanel.js +2 -31
- package/dist/cjs/dockview/dockviewGroupPanel.js.map +1 -1
- package/dist/cjs/dockview/options.d.ts +2 -1
- package/dist/cjs/events.js +25 -4
- package/dist/cjs/events.js.map +1 -1
- package/dist/cjs/gridview/baseComponentGridview.d.ts +9 -0
- package/dist/cjs/gridview/baseComponentGridview.js +14 -2
- package/dist/cjs/gridview/baseComponentGridview.js.map +1 -1
- package/dist/cjs/gridview/basePanelView.d.ts +5 -8
- package/dist/cjs/gridview/basePanelView.js +14 -8
- package/dist/cjs/gridview/basePanelView.js.map +1 -1
- package/dist/cjs/gridview/branchNode.js +1 -1
- package/dist/cjs/gridview/branchNode.js.map +1 -1
- package/dist/cjs/gridview/gridview.js +19 -17
- package/dist/cjs/gridview/gridview.js.map +1 -1
- package/dist/cjs/gridview/gridviewComponent.d.ts +4 -0
- package/dist/cjs/gridview/gridviewComponent.js +5 -0
- package/dist/cjs/gridview/gridviewComponent.js.map +1 -1
- package/dist/cjs/gridview/gridviewPanel.d.ts +0 -1
- package/dist/cjs/gridview/gridviewPanel.js +3 -6
- package/dist/cjs/gridview/gridviewPanel.js.map +1 -1
- package/dist/cjs/gridview/leafNode.js +1 -0
- package/dist/cjs/gridview/leafNode.js.map +1 -1
- package/dist/cjs/groupview/groupPanel.d.ts +0 -7
- package/dist/cjs/groupview/groupview.d.ts +15 -8
- package/dist/cjs/groupview/groupview.js +36 -123
- package/dist/cjs/groupview/groupview.js.map +1 -1
- package/dist/cjs/groupview/groupviewPanel.d.ts +5 -2
- package/dist/cjs/groupview/groupviewPanel.js.map +1 -1
- package/dist/cjs/groupview/panel/content.js +1 -0
- package/dist/cjs/groupview/panel/content.js.map +1 -1
- package/dist/cjs/groupview/tab.d.ts +10 -13
- package/dist/cjs/groupview/tab.js +22 -80
- package/dist/cjs/groupview/tab.js.map +1 -1
- package/dist/cjs/groupview/titlebar/tabsContainer.js +4 -6
- package/dist/cjs/groupview/titlebar/tabsContainer.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/lifecycle.js +2 -1
- package/dist/cjs/lifecycle.js.map +1 -1
- package/dist/cjs/panel/types.d.ts +0 -2
- package/dist/cjs/paneview/draggablePaneviewPanel.d.ts +2 -2
- package/dist/cjs/paneview/draggablePaneviewPanel.js +31 -28
- package/dist/cjs/paneview/draggablePaneviewPanel.js.map +1 -1
- package/dist/cjs/paneview/paneview.js +1 -1
- package/dist/cjs/paneview/paneview.js.map +1 -1
- package/dist/cjs/paneview/paneviewComponent.d.ts +0 -3
- package/dist/cjs/paneview/paneviewComponent.js +1 -0
- package/dist/cjs/paneview/paneviewComponent.js.map +1 -1
- package/dist/cjs/paneview/paneviewPanel.js +1 -1
- package/dist/cjs/paneview/paneviewPanel.js.map +1 -1
- package/dist/cjs/react/deserializer.js +1 -3
- package/dist/cjs/react/deserializer.js.map +1 -1
- package/dist/cjs/react/dockview/dockview.d.ts +9 -9
- package/dist/cjs/react/dockview/dockview.js +14 -1
- package/dist/cjs/react/dockview/dockview.js.map +1 -1
- package/dist/cjs/react/dockview/reactContentPart.js +4 -4
- package/dist/cjs/react/dockview/reactContentPart.js.map +1 -1
- package/dist/cjs/react/dockview/reactHeaderPart.js +1 -0
- package/dist/cjs/react/dockview/reactHeaderPart.js.map +1 -1
- package/dist/cjs/react/dockview/reactWatermarkPart.d.ts +1 -2
- package/dist/cjs/react/dockview/reactWatermarkPart.js +1 -2
- package/dist/cjs/react/dockview/reactWatermarkPart.js.map +1 -1
- package/dist/cjs/react/gridview/view.js +2 -2
- package/dist/cjs/react/gridview/view.js.map +1 -1
- package/dist/cjs/react/index.d.ts +1 -0
- package/dist/cjs/react/index.js.map +1 -1
- package/dist/cjs/react/react.js +1 -2
- package/dist/cjs/react/react.js.map +1 -1
- package/dist/cjs/react/splitview/view.js +2 -2
- package/dist/cjs/react/splitview/view.js.map +1 -1
- package/dist/cjs/splitview/splitviewComponent.d.ts +0 -3
- package/dist/cjs/splitview/splitviewComponent.js +1 -1
- package/dist/cjs/splitview/splitviewComponent.js.map +1 -1
- package/dist/cjs/splitview/splitviewPanel.d.ts +1 -6
- package/dist/cjs/splitview/splitviewPanel.js +5 -3
- package/dist/cjs/splitview/splitviewPanel.js.map +1 -1
- package/dist/dockview.amd.js +394 -532
- package/dist/dockview.amd.min.js +2 -16
- package/dist/dockview.amd.min.noStyle.js +2 -16
- package/dist/dockview.amd.noStyle.js +393 -531
- package/dist/dockview.cjs.js +394 -532
- package/dist/dockview.esm.js +395 -528
- package/dist/dockview.esm.min.js +2 -16
- package/dist/dockview.js +394 -532
- package/dist/dockview.min.js +2 -16
- package/dist/dockview.min.noStyle.js +2 -16
- package/dist/dockview.noStyle.js +393 -531
- package/dist/esm/api/component.api.d.ts +28 -19
- package/dist/esm/api/component.api.js +48 -21
- package/dist/esm/api/gridviewPanelApi.js +1 -0
- package/dist/esm/api/groupPanelApi.d.ts +11 -14
- package/dist/esm/api/groupPanelApi.js +18 -13
- package/dist/esm/api/panelApi.d.ts +0 -25
- package/dist/esm/api/panelApi.js +1 -20
- package/dist/esm/api/paneviewPanelApi.js +1 -0
- package/dist/esm/api/splitviewPanelApi.d.ts +0 -1
- package/dist/esm/api/splitviewPanelApi.js +1 -5
- package/dist/esm/dnd/abstractDragHandler.d.ts +3 -3
- package/dist/esm/dnd/abstractDragHandler.js +9 -8
- package/dist/esm/dnd/dataTransfer.d.ts +0 -25
- package/dist/esm/dnd/dataTransfer.js +0 -40
- package/dist/esm/dnd/dnd.d.ts +1 -14
- package/dist/esm/dnd/dnd.js +1 -69
- package/dist/esm/dnd/droptarget.d.ts +3 -0
- package/dist/esm/dnd/droptarget.js +69 -45
- package/dist/esm/dockview/components/tab/defaultTab.d.ts +0 -1
- package/dist/esm/dockview/components/tab/defaultTab.js +1 -9
- package/dist/esm/dockview/dockviewComponent.d.ts +27 -19
- package/dist/esm/dockview/dockviewComponent.js +54 -118
- package/dist/esm/dockview/dockviewGroupPanel.d.ts +2 -5
- package/dist/esm/dockview/dockviewGroupPanel.js +2 -30
- package/dist/esm/dockview/options.d.ts +2 -1
- package/dist/esm/events.js +2 -3
- package/dist/esm/gridview/baseComponentGridview.d.ts +9 -0
- package/dist/esm/gridview/baseComponentGridview.js +14 -2
- package/dist/esm/gridview/basePanelView.d.ts +5 -8
- package/dist/esm/gridview/basePanelView.js +10 -8
- package/dist/esm/gridview/branchNode.js +1 -1
- package/dist/esm/gridview/gridview.js +16 -15
- package/dist/esm/gridview/gridviewComponent.d.ts +4 -0
- package/dist/esm/gridview/gridviewComponent.js +5 -0
- package/dist/esm/gridview/gridviewPanel.d.ts +0 -1
- package/dist/esm/gridview/gridviewPanel.js +3 -6
- package/dist/esm/gridview/leafNode.js +1 -0
- package/dist/esm/groupview/groupPanel.d.ts +0 -7
- package/dist/esm/groupview/groupview.d.ts +15 -8
- package/dist/esm/groupview/groupview.js +22 -56
- package/dist/esm/groupview/groupviewPanel.d.ts +5 -2
- package/dist/esm/groupview/panel/content.js +1 -0
- package/dist/esm/groupview/tab.d.ts +10 -13
- package/dist/esm/groupview/tab.js +17 -24
- package/dist/esm/groupview/titlebar/tabsContainer.js +4 -6
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/lifecycle.js +2 -1
- package/dist/esm/panel/types.d.ts +0 -2
- package/dist/esm/paneview/draggablePaneviewPanel.d.ts +2 -2
- package/dist/esm/paneview/draggablePaneviewPanel.js +31 -28
- package/dist/esm/paneview/paneview.js +1 -1
- package/dist/esm/paneview/paneviewComponent.d.ts +0 -3
- package/dist/esm/paneview/paneviewComponent.js +1 -0
- package/dist/esm/paneview/paneviewPanel.js +1 -1
- package/dist/esm/react/deserializer.js +1 -3
- package/dist/esm/react/dockview/dockview.d.ts +9 -9
- package/dist/esm/react/dockview/dockview.js +15 -2
- package/dist/esm/react/dockview/reactContentPart.js +4 -4
- package/dist/esm/react/dockview/reactHeaderPart.js +1 -0
- package/dist/esm/react/dockview/reactWatermarkPart.d.ts +1 -2
- package/dist/esm/react/dockview/reactWatermarkPart.js +1 -2
- package/dist/esm/react/gridview/view.js +2 -2
- package/dist/esm/react/index.d.ts +1 -0
- package/dist/esm/react/react.js +1 -2
- package/dist/esm/react/splitview/view.js +2 -2
- package/dist/esm/splitview/splitviewComponent.d.ts +0 -3
- package/dist/esm/splitview/splitviewComponent.js +1 -1
- package/dist/esm/splitview/splitviewPanel.d.ts +1 -6
- package/dist/esm/splitview/splitviewPanel.js +5 -3
- package/dist/styles/dockview.css +5 -9
- package/package.json +2 -2
- package/dist/cjs/functions.d.ts +0 -1
- package/dist/cjs/functions.js +0 -42
- package/dist/cjs/functions.js.map +0 -1
- package/dist/cjs/groupview/panel/hostedPanel.d.ts +0 -22
- package/dist/cjs/groupview/panel/hostedPanel.js +0 -57
- package/dist/cjs/groupview/panel/hostedPanel.js.map +0 -1
- package/dist/cjs/json.d.ts +0 -1
- package/dist/cjs/json.js +0 -14
- package/dist/cjs/json.js.map +0 -1
- package/dist/esm/functions.d.ts +0 -1
- package/dist/esm/functions.js +0 -8
- package/dist/esm/groupview/panel/hostedPanel.d.ts +0 -22
- package/dist/esm/groupview/panel/hostedPanel.js +0 -43
- package/dist/esm/json.d.ts +0 -1
- package/dist/esm/json.js +0 -9
|
@@ -39,34 +39,37 @@ export class DraggablePaneviewPanel extends PaneviewPanel {
|
|
|
39
39
|
},
|
|
40
40
|
});
|
|
41
41
|
this.addDisposables(this._onDidDrop, this.handler, this.target, this.target.onDrop((event) => {
|
|
42
|
-
|
|
43
|
-
if (!data) {
|
|
44
|
-
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
const containerApi = this.params
|
|
48
|
-
.containerApi;
|
|
49
|
-
const panelId = data.paneId;
|
|
50
|
-
const existingPanel = containerApi.getPanel(panelId);
|
|
51
|
-
if (!existingPanel) {
|
|
52
|
-
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
const allPanels = containerApi.getPanels();
|
|
56
|
-
const fromIndex = allPanels.indexOf(existingPanel);
|
|
57
|
-
let toIndex = containerApi.getPanels().indexOf(this);
|
|
58
|
-
if (event.position === Position.Left ||
|
|
59
|
-
event.position === Position.Top) {
|
|
60
|
-
toIndex = Math.max(0, toIndex - 1);
|
|
61
|
-
}
|
|
62
|
-
if (event.position === Position.Right ||
|
|
63
|
-
event.position === Position.Bottom) {
|
|
64
|
-
if (fromIndex > toIndex) {
|
|
65
|
-
toIndex++;
|
|
66
|
-
}
|
|
67
|
-
toIndex = Math.min(allPanels.length - 1, toIndex);
|
|
68
|
-
}
|
|
69
|
-
containerApi.movePanel(fromIndex, toIndex);
|
|
42
|
+
this.onDrop(event);
|
|
70
43
|
}));
|
|
71
44
|
}
|
|
45
|
+
onDrop(event) {
|
|
46
|
+
const data = getPaneData();
|
|
47
|
+
if (!data) {
|
|
48
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const containerApi = this._params
|
|
52
|
+
.containerApi;
|
|
53
|
+
const panelId = data.paneId;
|
|
54
|
+
const existingPanel = containerApi.getPanel(panelId);
|
|
55
|
+
if (!existingPanel) {
|
|
56
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const allPanels = containerApi.getPanels();
|
|
60
|
+
const fromIndex = allPanels.indexOf(existingPanel);
|
|
61
|
+
let toIndex = containerApi.getPanels().indexOf(this);
|
|
62
|
+
if (event.position === Position.Left ||
|
|
63
|
+
event.position === Position.Top) {
|
|
64
|
+
toIndex = Math.max(0, toIndex - 1);
|
|
65
|
+
}
|
|
66
|
+
if (event.position === Position.Right ||
|
|
67
|
+
event.position === Position.Bottom) {
|
|
68
|
+
if (fromIndex > toIndex) {
|
|
69
|
+
toIndex++;
|
|
70
|
+
}
|
|
71
|
+
toIndex = Math.min(allPanels.length - 1, toIndex);
|
|
72
|
+
}
|
|
73
|
+
containerApi.movePanel(fromIndex, toIndex);
|
|
74
|
+
}
|
|
72
75
|
}
|
|
@@ -37,7 +37,7 @@ export class Paneview extends CompositeDisposable {
|
|
|
37
37
|
this.paneItems.push(paneItem);
|
|
38
38
|
pane.orthogonalSize = this.splitview.orthogonalSize;
|
|
39
39
|
});
|
|
40
|
-
this.addDisposables(this.splitview.onDidSashEnd(() => {
|
|
40
|
+
this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
|
|
41
41
|
this._onDidChange.fire(undefined);
|
|
42
42
|
}), this.splitview.onDidAddView(() => {
|
|
43
43
|
this._onDidChange.fire();
|
|
@@ -31,6 +31,7 @@ export class PaneviewComponent extends CompositeDisposable {
|
|
|
31
31
|
this.onDidAddView = this._onDidAddView.event;
|
|
32
32
|
this._onDidRemoveView = new Emitter();
|
|
33
33
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
34
|
+
this.addDisposables(this._onDidLayoutChange, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
|
|
34
35
|
this._options = options;
|
|
35
36
|
if (!options.components) {
|
|
36
37
|
options.components = {};
|
|
@@ -157,7 +157,7 @@ export class PaneviewPanel extends BasePanelView {
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
toJSON() {
|
|
160
|
-
const params = this.
|
|
160
|
+
const params = this._params;
|
|
161
161
|
return Object.assign(Object.assign({}, super.toJSON()), { headerComponent: this.headerComponent, title: params.title });
|
|
162
162
|
}
|
|
163
163
|
renderOnce() {
|
|
@@ -12,7 +12,6 @@ export class ReactPanelDeserialzier {
|
|
|
12
12
|
const panelId = panelData.id;
|
|
13
13
|
const params = panelData.params;
|
|
14
14
|
const title = panelData.title;
|
|
15
|
-
const state = panelData.state;
|
|
16
15
|
const suppressClosable = panelData.suppressClosable;
|
|
17
16
|
const viewData = panelData.view;
|
|
18
17
|
const view = new DefaultGroupPanelView({
|
|
@@ -21,13 +20,12 @@ export class ReactPanelDeserialzier {
|
|
|
21
20
|
? createComponent(viewData.tab.id, viewData.tab.id, this.layout.options.tabComponents, this.layout.options.frameworkTabComponents, (_c = this.layout.options.frameworkComponentFactory) === null || _c === void 0 ? void 0 : _c.tab)
|
|
22
21
|
: new DefaultTab(),
|
|
23
22
|
});
|
|
24
|
-
const panel = new DockviewGroupPanel(panelId, new DockviewApi(this.layout));
|
|
23
|
+
const panel = new DockviewGroupPanel(panelId, this.layout, new DockviewApi(this.layout));
|
|
25
24
|
panel.init({
|
|
26
25
|
view,
|
|
27
26
|
title,
|
|
28
27
|
suppressClosable,
|
|
29
28
|
params: params || {},
|
|
30
|
-
state: state || {},
|
|
31
29
|
});
|
|
32
30
|
return panel;
|
|
33
31
|
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { DockviewDropEvent } from '../../dockview/dockviewComponent';
|
|
2
3
|
import { TabContextMenuEvent } from '../../dockview/options';
|
|
3
4
|
import { DockviewPanelApi } from '../../api/groupPanelApi';
|
|
4
5
|
import { DockviewApi } from '../../api/component.api';
|
|
6
|
+
import { IWatermarkPanelProps } from './reactWatermarkPart';
|
|
5
7
|
import { PanelCollection, PanelParameters } from '../types';
|
|
8
|
+
import { DockviewDropTargets } from '../../groupview/dnd';
|
|
6
9
|
export interface IGroupPanelBaseProps<T extends {} = Record<string, any>> extends PanelParameters<T> {
|
|
7
10
|
api: DockviewPanelApi;
|
|
8
11
|
containerApi: DockviewApi;
|
|
9
12
|
}
|
|
10
|
-
export
|
|
13
|
+
export declare type IDockviewPanelHeaderProps<T extends {} = Record<string, any>> = IGroupPanelBaseProps<T>;
|
|
14
|
+
export declare type IDockviewPanelProps<T extends {
|
|
11
15
|
[index: string]: any;
|
|
12
|
-
} = any>
|
|
13
|
-
}
|
|
16
|
+
} = any> = IGroupPanelBaseProps<T>;
|
|
14
17
|
export interface DockviewReadyEvent {
|
|
15
18
|
api: DockviewApi;
|
|
16
19
|
}
|
|
17
|
-
export interface IWatermarkPanelProps<T extends {} = Record<string, any>> extends PanelParameters<T> {
|
|
18
|
-
containerApi: DockviewApi;
|
|
19
|
-
close(): void;
|
|
20
|
-
}
|
|
21
20
|
export interface IDockviewReactProps {
|
|
22
21
|
components?: PanelCollection<IDockviewPanelProps>;
|
|
23
|
-
tabComponents?: PanelCollection<
|
|
22
|
+
tabComponents?: PanelCollection<IDockviewPanelHeaderProps>;
|
|
24
23
|
watermarkComponent?: React.FunctionComponent<IWatermarkPanelProps>;
|
|
25
24
|
onReady?: (event: DockviewReadyEvent) => void;
|
|
26
25
|
debug?: boolean;
|
|
27
26
|
tabHeight?: number;
|
|
28
|
-
enableExternalDragEvents?: boolean;
|
|
29
27
|
onTabContextMenu?: (event: TabContextMenuEvent) => void;
|
|
28
|
+
onDidDrop?: (event: DockviewDropEvent) => void;
|
|
29
|
+
showDndOverlay?: (event: DragEvent, target: DockviewDropTargets) => boolean;
|
|
30
30
|
hideBorders?: boolean;
|
|
31
31
|
className?: string;
|
|
32
32
|
disableAutoResizing?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DockviewComponent } from '../../dockview/dockviewComponent';
|
|
2
|
+
import { DockviewComponent, } from '../../dockview/dockviewComponent';
|
|
3
3
|
import { ReactPanelContentPart } from './reactContentPart';
|
|
4
4
|
import { ReactPanelHeaderPart } from './reactHeaderPart';
|
|
5
5
|
import { ReactPanelDeserialzier } from '../deserializer';
|
|
@@ -59,12 +59,16 @@ export const DockviewReact = React.forwardRef((props, ref) => {
|
|
|
59
59
|
frameworkTabComponents: props.tabComponents,
|
|
60
60
|
tabHeight: props.tabHeight,
|
|
61
61
|
debug: props.debug,
|
|
62
|
-
enableExternalDragEvents: props.enableExternalDragEvents,
|
|
63
62
|
watermarkFrameworkComponent: props.watermarkComponent,
|
|
64
63
|
styles: props.hideBorders
|
|
65
64
|
? { separatorBorder: 'transparent' }
|
|
66
65
|
: undefined,
|
|
67
66
|
});
|
|
67
|
+
const disposable = dockview.onDidDrop((event) => {
|
|
68
|
+
if (props.onDidDrop) {
|
|
69
|
+
props.onDidDrop(event);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
68
72
|
(_a = domRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(dockview.element);
|
|
69
73
|
dockview.deserializer = new ReactPanelDeserialzier(dockview);
|
|
70
74
|
const { clientWidth, clientHeight } = domRef.current;
|
|
@@ -74,6 +78,7 @@ export const DockviewReact = React.forwardRef((props, ref) => {
|
|
|
74
78
|
}
|
|
75
79
|
dockviewRef.current = dockview;
|
|
76
80
|
return () => {
|
|
81
|
+
disposable.dispose();
|
|
77
82
|
dockview.dispose();
|
|
78
83
|
};
|
|
79
84
|
}, []);
|
|
@@ -85,6 +90,14 @@ export const DockviewReact = React.forwardRef((props, ref) => {
|
|
|
85
90
|
frameworkComponents: props.components,
|
|
86
91
|
});
|
|
87
92
|
}, [props.components]);
|
|
93
|
+
React.useEffect(() => {
|
|
94
|
+
if (!dockviewRef.current) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
dockviewRef.current.updateOptions({
|
|
98
|
+
showDndOverlay: props.showDndOverlay,
|
|
99
|
+
});
|
|
100
|
+
}, [props.showDndOverlay]);
|
|
88
101
|
React.useEffect(() => {
|
|
89
102
|
if (!dockviewRef.current) {
|
|
90
103
|
return;
|
|
@@ -11,16 +11,14 @@ export class ReactPanelContentPart {
|
|
|
11
11
|
this._onDidBlur = new Emitter();
|
|
12
12
|
this.onDidBlur = this._onDidBlur.event;
|
|
13
13
|
this._element = document.createElement('div');
|
|
14
|
-
this._element.
|
|
15
|
-
this._element.style.width = '100%';
|
|
14
|
+
this._element.className = 'dockview-react-part';
|
|
16
15
|
// this.hostedContainer = new HostedContainer({
|
|
17
16
|
// id,
|
|
18
17
|
// });
|
|
19
18
|
// this.hostedContainer.onDidFocus(() => this._onDidFocus.fire());
|
|
20
19
|
// this.hostedContainer.onDidBlur(() => this._onDidBlur.fire());
|
|
21
20
|
this._actionsElement = document.createElement('div');
|
|
22
|
-
this._actionsElement.
|
|
23
|
-
this._actionsElement.style.width = '100%';
|
|
21
|
+
this._actionsElement.className = 'dockview-react-part';
|
|
24
22
|
}
|
|
25
23
|
get element() {
|
|
26
24
|
return this._element;
|
|
@@ -68,6 +66,8 @@ export class ReactPanelContentPart {
|
|
|
68
66
|
}
|
|
69
67
|
dispose() {
|
|
70
68
|
var _a, _b;
|
|
69
|
+
this._onDidFocus.dispose();
|
|
70
|
+
this._onDidBlur.dispose();
|
|
71
71
|
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
72
72
|
// this.hostedContainer?.dispose();
|
|
73
73
|
(_b = this.actionsPart) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
@@ -4,7 +4,7 @@ import { GroupviewPanel } from '../../groupview/groupviewPanel';
|
|
|
4
4
|
import { ReactPortalStore } from '../react';
|
|
5
5
|
import { IGroupPanelBaseProps } from './dockview';
|
|
6
6
|
import { PanelUpdateEvent } from '../../panel/types';
|
|
7
|
-
interface IWatermarkPanelProps extends IGroupPanelBaseProps {
|
|
7
|
+
export interface IWatermarkPanelProps extends IGroupPanelBaseProps {
|
|
8
8
|
close: () => void;
|
|
9
9
|
}
|
|
10
10
|
export declare class ReactWatermarkPart implements IWatermarkRenderer {
|
|
@@ -27,4 +27,3 @@ export declare class ReactWatermarkPart implements IWatermarkRenderer {
|
|
|
27
27
|
updateParentGroup(group: GroupviewPanel, isPanelVisible: boolean): void;
|
|
28
28
|
dispose(): void;
|
|
29
29
|
}
|
|
30
|
-
export {};
|
|
@@ -8,8 +8,7 @@ export class ReactWatermarkPart {
|
|
|
8
8
|
value: undefined,
|
|
9
9
|
};
|
|
10
10
|
this._element = document.createElement('div');
|
|
11
|
-
this._element.
|
|
12
|
-
this._element.style.width = '100%';
|
|
11
|
+
this._element.className = 'dockview-react-part';
|
|
13
12
|
}
|
|
14
13
|
get element() {
|
|
15
14
|
return this._element;
|
|
@@ -9,9 +9,9 @@ export class ReactGridPanelView extends GridviewPanel {
|
|
|
9
9
|
getComponent() {
|
|
10
10
|
var _a;
|
|
11
11
|
return new ReactPart(this.element, this.reactPortalStore, this.reactComponent, {
|
|
12
|
-
params: ((_a = this.
|
|
12
|
+
params: ((_a = this._params) === null || _a === void 0 ? void 0 : _a.params) || {},
|
|
13
13
|
api: this.api,
|
|
14
|
-
containerApi: this.
|
|
14
|
+
containerApi: this._params
|
|
15
15
|
.containerApi,
|
|
16
16
|
});
|
|
17
17
|
}
|
|
@@ -4,6 +4,7 @@ export * from './splitview/splitview';
|
|
|
4
4
|
export * from './gridview/gridview';
|
|
5
5
|
export * from './dockview/reactContentPart';
|
|
6
6
|
export * from './dockview/reactHeaderPart';
|
|
7
|
+
export { IWatermarkPanelProps } from './dockview/reactWatermarkPart';
|
|
7
8
|
export * from './paneview/paneview';
|
|
8
9
|
export * from './types';
|
|
9
10
|
export * from './react';
|
package/dist/esm/react/react.js
CHANGED
|
@@ -55,14 +55,13 @@ export class ReactPart {
|
|
|
55
55
|
if (this.disposed) {
|
|
56
56
|
throw new Error('invalid operation: resource is already disposed');
|
|
57
57
|
}
|
|
58
|
-
// TODO use a better check for isReactFunctionalComponent
|
|
59
58
|
if (typeof this.component !== 'function') {
|
|
60
59
|
/**
|
|
61
60
|
* we know this isn't a React.FunctionComponent so throw an error here.
|
|
62
61
|
* if we do not intercept this the React library will throw a very obsure error
|
|
63
62
|
* for the same reason, at least at this point we will emit a sensible stacktrace.
|
|
64
63
|
*/
|
|
65
|
-
throw new Error('
|
|
64
|
+
throw new Error('Invalid Operation. dockview only supports React Functional Components.');
|
|
66
65
|
}
|
|
67
66
|
const bridgeComponent = React.createElement(React.forwardRef(ReactComponentBridge), {
|
|
68
67
|
component: this
|
|
@@ -9,9 +9,9 @@ export class ReactPanelView extends SplitviewPanel {
|
|
|
9
9
|
getComponent() {
|
|
10
10
|
var _a;
|
|
11
11
|
return new ReactPart(this.element, this.reactPortalStore, this.reactComponent, {
|
|
12
|
-
params: ((_a = this.
|
|
12
|
+
params: ((_a = this._params) === null || _a === void 0 ? void 0 : _a.params) || {},
|
|
13
13
|
api: this.api,
|
|
14
|
-
containerApi: this.
|
|
14
|
+
containerApi: this._params
|
|
15
15
|
.containerApi,
|
|
16
16
|
});
|
|
17
17
|
}
|
|
@@ -26,7 +26,7 @@ export class SplitviewComponent extends CompositeDisposable {
|
|
|
26
26
|
options.frameworkComponents = {};
|
|
27
27
|
}
|
|
28
28
|
this.splitview = new Splitview(this.element, options);
|
|
29
|
-
this.addDisposables(this._disposable);
|
|
29
|
+
this.addDisposables(this._disposable, this._onDidAddView, this._onDidRemoveView, this._onDidLayoutChange);
|
|
30
30
|
}
|
|
31
31
|
get options() {
|
|
32
32
|
return this._options;
|
|
@@ -36,12 +36,7 @@ export declare abstract class SplitviewPanel extends BasePanelView<SplitviewPane
|
|
|
36
36
|
maximumSize: number | undefined;
|
|
37
37
|
id: string;
|
|
38
38
|
component: string;
|
|
39
|
-
params?:
|
|
40
|
-
[key: string]: any;
|
|
41
|
-
} | undefined;
|
|
42
|
-
state?: {
|
|
43
|
-
[key: string]: any;
|
|
44
|
-
} | undefined;
|
|
39
|
+
params?: Record<string, any> | undefined;
|
|
45
40
|
};
|
|
46
41
|
private updateConstraints;
|
|
47
42
|
}
|
|
@@ -12,12 +12,14 @@ export class SplitviewPanel extends BasePanelView {
|
|
|
12
12
|
this._snap = false;
|
|
13
13
|
this._onDidChange = new Emitter();
|
|
14
14
|
this.onDidChange = this._onDidChange.event;
|
|
15
|
-
this.addDisposables(this.api.onVisibilityChange((event) => {
|
|
15
|
+
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
16
16
|
const { isVisible } = event;
|
|
17
|
-
const { containerApi } = this
|
|
17
|
+
const { containerApi } = this
|
|
18
|
+
._params;
|
|
18
19
|
containerApi.setVisible(this, isVisible);
|
|
19
20
|
}), this.api.onActiveChange(() => {
|
|
20
|
-
const { containerApi } = this
|
|
21
|
+
const { containerApi } = this
|
|
22
|
+
._params;
|
|
21
23
|
containerApi.setActive(this);
|
|
22
24
|
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
23
25
|
if (typeof event.minimumSize === 'number' ||
|
package/dist/styles/dockview.css
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
--dv-tabs-and-actions-container-font-size: 13px;
|
|
4
4
|
--dv-tabs-and-actions-container-height: 35px;
|
|
5
5
|
--dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>');
|
|
6
|
-
--dv-tab-dirty-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"/></svg>');
|
|
7
6
|
--dv-drag-over-background-color: rgba(83, 89, 93, 0.5);
|
|
8
7
|
--dv-drag-over-border-color: white;
|
|
9
8
|
--dv-tabs-container-scrollbar-color: #888;
|
|
@@ -27,7 +26,6 @@
|
|
|
27
26
|
--dv-tabs-and-actions-container-font-size: 13px;
|
|
28
27
|
--dv-tabs-and-actions-container-height: 35px;
|
|
29
28
|
--dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>');
|
|
30
|
-
--dv-tab-dirty-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"/></svg>');
|
|
31
29
|
--dv-drag-over-background-color: rgba(83, 89, 93, 0.5);
|
|
32
30
|
--dv-drag-over-border-color: white;
|
|
33
31
|
--dv-tabs-container-scrollbar-color: #888;
|
|
@@ -51,7 +49,6 @@
|
|
|
51
49
|
--dv-tabs-and-actions-container-font-size: 13px;
|
|
52
50
|
--dv-tabs-and-actions-container-height: 35px;
|
|
53
51
|
--dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>');
|
|
54
|
-
--dv-tab-dirty-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"/></svg>');
|
|
55
52
|
--dv-drag-over-background-color: rgba(83, 89, 93, 0.5);
|
|
56
53
|
--dv-drag-over-border-color: white;
|
|
57
54
|
--dv-tabs-container-scrollbar-color: #888;
|
|
@@ -357,6 +354,10 @@
|
|
|
357
354
|
width: 1px;
|
|
358
355
|
height: 100%;
|
|
359
356
|
}
|
|
357
|
+
.dockview-react-part {
|
|
358
|
+
height: 100%;
|
|
359
|
+
width: 100%;
|
|
360
|
+
}
|
|
360
361
|
.split-view-container {
|
|
361
362
|
position: relative;
|
|
362
363
|
overflow: hidden;
|
|
@@ -470,7 +471,7 @@
|
|
|
470
471
|
.tab.active-tab > .default-tab .tab-action {
|
|
471
472
|
visibility: visible;
|
|
472
473
|
}
|
|
473
|
-
.tab.inactive-tab > .default-tab .tab-action
|
|
474
|
+
.tab.inactive-tab > .default-tab .tab-action {
|
|
474
475
|
visibility: hidden;
|
|
475
476
|
}
|
|
476
477
|
.tab.inactive-tab > .default-tab:hover .tab-action {
|
|
@@ -515,11 +516,6 @@
|
|
|
515
516
|
.tab .default-tab .action-container .tab-list .tab-action.disable-close {
|
|
516
517
|
display: none;
|
|
517
518
|
}
|
|
518
|
-
.tab .default-tab .action-container .tab-list .tab-action.dirty:not(:hover) {
|
|
519
|
-
display: block;
|
|
520
|
-
-webkit-mask: var(--dv-tab-dirty-icon) 50% 50%/60% 60% no-repeat;
|
|
521
|
-
mask: var(--dv-tab-dirty-icon) 50% 50%/60% 60% no-repeat;
|
|
522
|
-
}
|
|
523
519
|
.watermark {
|
|
524
520
|
display: flex;
|
|
525
521
|
width: 100%;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dockview",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Zero dependency layout manager supporting tabs, grids and splitviews with ReactJS support",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"types": "./dist/cjs/index.d.ts",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"react": ">=16.8.0",
|
|
74
74
|
"react-dom": ">=16.8.0"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "1816476fbbd7c1ec674f20d0df4f443f36124660"
|
|
77
77
|
}
|
package/dist/cjs/functions.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function debounce<T extends Function>(cb: T, wait: number): T;
|
package/dist/cjs/functions.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
3
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
4
|
-
if (!m) return o;
|
|
5
|
-
var i = m.call(o), r, ar = [], e;
|
|
6
|
-
try {
|
|
7
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
8
|
-
}
|
|
9
|
-
catch (error) { e = { error: error }; }
|
|
10
|
-
finally {
|
|
11
|
-
try {
|
|
12
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
13
|
-
}
|
|
14
|
-
finally { if (e) throw e.error; }
|
|
15
|
-
}
|
|
16
|
-
return ar;
|
|
17
|
-
};
|
|
18
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
19
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
20
|
-
if (ar || !(i in from)) {
|
|
21
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
22
|
-
ar[i] = from[i];
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.debounce = void 0;
|
|
29
|
-
function debounce(cb, wait) {
|
|
30
|
-
var timeout;
|
|
31
|
-
var callable = function () {
|
|
32
|
-
var args = [];
|
|
33
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
34
|
-
args[_i] = arguments[_i];
|
|
35
|
-
}
|
|
36
|
-
clearTimeout(timeout);
|
|
37
|
-
timeout = setTimeout(function () { return cb.apply(void 0, __spreadArray([], __read(args), false)); }, wait);
|
|
38
|
-
};
|
|
39
|
-
return callable;
|
|
40
|
-
}
|
|
41
|
-
exports.debounce = debounce;
|
|
42
|
-
//# sourceMappingURL=functions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../src/functions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,QAAQ,CAAqB,EAAK,EAAE,IAAY;IAC5D,IAAI,OAAY,CAAC;IAEjB,IAAM,QAAQ,GAAG;QAAC,cAAY;aAAZ,UAAY,EAAZ,qBAAY,EAAZ,IAAY;YAAZ,yBAAY;;QAC1B,YAAY,CAAC,OAAO,CAAC,CAAC;QACtB,OAAO,GAAG,UAAU,CAAC,cAAM,OAAA,EAAE,wCAAI,IAAI,YAAV,CAAW,EAAE,IAAI,CAAC,CAAC;IAClD,CAAC,CAAC;IACF,OAAgB,QAAS,CAAC;AAC9B,CAAC;AARD,4BAQC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { IDisposable } from '../../lifecycle';
|
|
2
|
-
import { IGroupPanel } from '../groupPanel';
|
|
3
|
-
import { IRenderable } from '../types';
|
|
4
|
-
export interface HostedPanelOptions {
|
|
5
|
-
id: string;
|
|
6
|
-
parent?: HTMLElement;
|
|
7
|
-
}
|
|
8
|
-
export declare class HostedPanel implements IRenderable, IDisposable {
|
|
9
|
-
private readonly panel;
|
|
10
|
-
private readonly options;
|
|
11
|
-
private readonly _element;
|
|
12
|
-
get element(): HTMLElement;
|
|
13
|
-
get id(): string;
|
|
14
|
-
constructor(panel: IGroupPanel, options: HostedPanelOptions);
|
|
15
|
-
hide(): void;
|
|
16
|
-
show(): void;
|
|
17
|
-
layout(element: HTMLElement, dimension?: {
|
|
18
|
-
width: number;
|
|
19
|
-
height: number;
|
|
20
|
-
}): void;
|
|
21
|
-
dispose(): void;
|
|
22
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HostedPanel = void 0;
|
|
4
|
-
var HostedPanel = /** @class */ (function () {
|
|
5
|
-
function HostedPanel(panel, options) {
|
|
6
|
-
this.panel = panel;
|
|
7
|
-
this.options = options;
|
|
8
|
-
if (!options.parent) {
|
|
9
|
-
options.parent = document.getElementById('app');
|
|
10
|
-
options.parent.style.position = 'relative';
|
|
11
|
-
}
|
|
12
|
-
this._element = document.createElement('div');
|
|
13
|
-
this._element.style.visibility = 'hidden';
|
|
14
|
-
this._element.style.overflow = 'hidden';
|
|
15
|
-
// this._element.style.pointerEvents = 'none';
|
|
16
|
-
this._element.id = "webivew-".concat(options.id);
|
|
17
|
-
options.parent.appendChild(this._element);
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(HostedPanel.prototype, "element", {
|
|
20
|
-
get: function () {
|
|
21
|
-
return this._element;
|
|
22
|
-
},
|
|
23
|
-
enumerable: false,
|
|
24
|
-
configurable: true
|
|
25
|
-
});
|
|
26
|
-
Object.defineProperty(HostedPanel.prototype, "id", {
|
|
27
|
-
get: function () {
|
|
28
|
-
return this.panel.id;
|
|
29
|
-
},
|
|
30
|
-
enumerable: false,
|
|
31
|
-
configurable: true
|
|
32
|
-
});
|
|
33
|
-
HostedPanel.prototype.hide = function () {
|
|
34
|
-
this._element.style.visibility = 'hidden';
|
|
35
|
-
};
|
|
36
|
-
HostedPanel.prototype.show = function () {
|
|
37
|
-
this._element.style.visibility = 'visible';
|
|
38
|
-
};
|
|
39
|
-
HostedPanel.prototype.layout = function (element, dimension) {
|
|
40
|
-
if (!this.element || !this.element.parentElement) {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
var frameRect = element.getBoundingClientRect();
|
|
44
|
-
var containerRect = this.element.parentElement.getBoundingClientRect();
|
|
45
|
-
this.element.style.position = 'absolute';
|
|
46
|
-
this.element.style.top = "".concat(frameRect.top - containerRect.top, "px");
|
|
47
|
-
this.element.style.left = "".concat(frameRect.left - containerRect.left, "px");
|
|
48
|
-
this.element.style.width = "".concat(dimension ? dimension.width : frameRect.width, "px");
|
|
49
|
-
this.element.style.height = "".concat(dimension ? dimension.height : frameRect.height, "px");
|
|
50
|
-
};
|
|
51
|
-
HostedPanel.prototype.dispose = function () {
|
|
52
|
-
this._element.remove();
|
|
53
|
-
};
|
|
54
|
-
return HostedPanel;
|
|
55
|
-
}());
|
|
56
|
-
exports.HostedPanel = HostedPanel;
|
|
57
|
-
//# sourceMappingURL=hostedPanel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hostedPanel.js","sourceRoot":"","sources":["../../../../src/groupview/panel/hostedPanel.ts"],"names":[],"mappings":";;;AASA;IAWI,qBACqB,KAAkB,EAClB,OAA2B;QAD3B,UAAK,GAAL,KAAK,CAAa;QAClB,YAAO,GAAP,OAAO,CAAoB;QAE5C,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACjB,OAAO,CAAC,MAAM,GAAG,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAgB,CAAC;YAC/D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC;SAC9C;QAED,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC9C,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,GAAG,QAAQ,CAAC;QAC1C,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACxC,8CAA8C;QAC9C,IAAI,CAAC,QAAQ,CAAC,EAAE,GAAG,kBAAW,OAAO,CAAC,EAAE,CAAE,CAAC;QAE3C,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC9C,CAAC;IAxBD,sBAAI,gCAAO;aAAX;YACI,OAAO,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;;;OAAA;IAED,sBAAI,2BAAE;aAAN;YACI,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,CAAC;;;OAAA;IAoBD,0BAAI,GAAJ;QACI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,GAAG,QAAQ,CAAC;IAC9C,CAAC;IAED,0BAAI,GAAJ;QACI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,GAAG,SAAS,CAAC;IAC/C,CAAC;IAED,4BAAM,GAAN,UACI,OAAoB,EACpB,SAA6C;QAE7C,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;YAC9C,OAAO;SACV;QACD,IAAM,SAAS,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;QAClD,IAAM,aAAa,GACf,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,qBAAqB,EAAE,CAAC;QACvD,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC;QACzC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,GAAG,UAAG,SAAS,CAAC,GAAG,GAAG,aAAa,CAAC,GAAG,OAAI,CAAC;QAClE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,GAAG,UAAG,SAAS,CAAC,IAAI,GAAG,aAAa,CAAC,IAAI,OAAI,CAAC;QACrE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,GAAG,UACvB,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,OAC7C,CAAC;QACL,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,UACxB,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,OAC/C,CAAC;IACT,CAAC;IAED,6BAAO,GAAP;QACI,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;IAC3B,CAAC;IACL,kBAAC;AAAD,CAAC,AA7DD,IA6DC;AA7DY,kCAAW"}
|
package/dist/cjs/json.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function tryParseJSON(text: string, reviver?: (this: any, key: string, value: any) => any): any | undefined;
|
package/dist/cjs/json.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tryParseJSON = void 0;
|
|
4
|
-
function tryParseJSON(text, reviver) {
|
|
5
|
-
try {
|
|
6
|
-
return JSON.parse(text, reviver);
|
|
7
|
-
}
|
|
8
|
-
catch (err) {
|
|
9
|
-
console.warn('failed to parse JSON');
|
|
10
|
-
return undefined;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.tryParseJSON = tryParseJSON;
|
|
14
|
-
//# sourceMappingURL=json.js.map
|
package/dist/cjs/json.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../src/json.ts"],"names":[],"mappings":";;;AAIA,SAAgB,YAAY,CACxB,IAAY,EACZ,OAAqD;IAErD,IAAI;QACA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAM,CAAC;KACzC;IAAC,OAAO,GAAG,EAAE;QACV,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;QACrC,OAAO,SAAS,CAAC;KACpB;AACL,CAAC;AAVD,oCAUC"}
|
package/dist/esm/functions.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function debounce<T extends Function>(cb: T, wait: number): T;
|