dockview-core 1.6.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 +52 -0
- package/dist/cjs/api/component.api.d.ts +145 -0
- package/dist/cjs/api/component.api.js +579 -0
- package/dist/cjs/api/component.api.js.map +1 -0
- package/dist/cjs/api/dockviewPanelApi.d.ts +34 -0
- package/dist/cjs/api/dockviewPanelApi.js +84 -0
- package/dist/cjs/api/dockviewPanelApi.js.map +1 -0
- package/dist/cjs/api/gridviewPanelApi.d.ts +37 -0
- package/dist/cjs/api/gridviewPanelApi.js +48 -0
- package/dist/cjs/api/gridviewPanelApi.js.map +1 -0
- package/dist/cjs/api/panelApi.d.ts +88 -0
- package/dist/cjs/api/panelApi.js +138 -0
- package/dist/cjs/api/panelApi.js.map +1 -0
- package/dist/cjs/api/paneviewPanelApi.d.ts +26 -0
- package/dist/cjs/api/paneviewPanelApi.js +58 -0
- package/dist/cjs/api/paneviewPanelApi.js.map +1 -0
- package/dist/cjs/api/splitviewPanelApi.d.ts +32 -0
- package/dist/cjs/api/splitviewPanelApi.js +48 -0
- package/dist/cjs/api/splitviewPanelApi.js.map +1 -0
- package/dist/cjs/array.d.ts +12 -0
- package/dist/cjs/array.js +59 -0
- package/dist/cjs/array.js.map +1 -0
- package/dist/cjs/dnd/abstractDragHandler.d.ts +11 -0
- package/dist/cjs/dnd/abstractDragHandler.js +126 -0
- package/dist/cjs/dnd/abstractDragHandler.js.map +1 -0
- package/dist/cjs/dnd/dataTransfer.d.ts +31 -0
- package/dist/cjs/dnd/dataTransfer.js +101 -0
- package/dist/cjs/dnd/dataTransfer.js.map +1 -0
- package/dist/cjs/dnd/dnd.d.ts +27 -0
- package/dist/cjs/dnd/dnd.js +60 -0
- package/dist/cjs/dnd/dnd.js.map +1 -0
- package/dist/cjs/dnd/droptarget.d.ts +42 -0
- package/dist/cjs/dnd/droptarget.js +281 -0
- package/dist/cjs/dnd/droptarget.js.map +1 -0
- package/dist/cjs/dnd/ghost.d.ts +1 -0
- package/dist/cjs/dnd/ghost.js +16 -0
- package/dist/cjs/dnd/ghost.js.map +1 -0
- package/dist/cjs/dnd/groupDragHandler.d.ts +11 -0
- package/dist/cjs/dnd/groupDragHandler.js +62 -0
- package/dist/cjs/dnd/groupDragHandler.js.map +1 -0
- package/dist/cjs/dockview/components/panel/content.d.ts +30 -0
- package/dist/cjs/dockview/components/panel/content.js +101 -0
- package/dist/cjs/dockview/components/panel/content.js.map +1 -0
- package/dist/cjs/dockview/components/tab/defaultTab.d.ts +21 -0
- package/dist/cjs/dockview/components/tab/defaultTab.js +106 -0
- package/dist/cjs/dockview/components/tab/defaultTab.js.map +1 -0
- package/dist/cjs/dockview/components/tab/tab.d.ts +31 -0
- package/dist/cjs/dockview/components/tab/tab.js +125 -0
- package/dist/cjs/dockview/components/tab/tab.js.map +1 -0
- package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts +63 -0
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js +248 -0
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js.map +1 -0
- package/dist/cjs/dockview/components/titlebar/voidContainer.d.ts +15 -0
- package/dist/cjs/dockview/components/titlebar/voidContainer.js +74 -0
- package/dist/cjs/dockview/components/titlebar/voidContainer.js.map +1 -0
- package/dist/cjs/dockview/components/watermark/watermark.d.ts +18 -0
- package/dist/cjs/dockview/components/watermark/watermark.js +87 -0
- package/dist/cjs/dockview/components/watermark/watermark.js.map +1 -0
- package/dist/cjs/dockview/deserializer.d.ts +12 -0
- package/dist/cjs/dockview/deserializer.js +46 -0
- package/dist/cjs/dockview/deserializer.js.map +1 -0
- package/dist/cjs/dockview/dockviewComponent.d.ts +126 -0
- package/dist/cjs/dockview/dockviewComponent.js +772 -0
- package/dist/cjs/dockview/dockviewComponent.js.map +1 -0
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts +31 -0
- package/dist/cjs/dockview/dockviewGroupPanel.js +97 -0
- package/dist/cjs/dockview/dockviewGroupPanel.js.map +1 -0
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +176 -0
- package/dist/cjs/dockview/dockviewGroupPanelModel.js +579 -0
- package/dist/cjs/dockview/dockviewGroupPanelModel.js.map +1 -0
- package/dist/cjs/dockview/dockviewPanel.d.ts +40 -0
- package/dist/cjs/dockview/dockviewPanel.js +150 -0
- package/dist/cjs/dockview/dockviewPanel.js.map +1 -0
- package/dist/cjs/dockview/dockviewPanelModel.d.ts +34 -0
- package/dist/cjs/dockview/dockviewPanelModel.js +93 -0
- package/dist/cjs/dockview/dockviewPanelModel.js.map +1 -0
- package/dist/cjs/dockview/options.d.ts +116 -0
- package/dist/cjs/dockview/options.js +32 -0
- package/dist/cjs/dockview/options.js.map +1 -0
- package/dist/cjs/dockview/types.d.ts +67 -0
- package/dist/cjs/dockview/types.js +11 -0
- package/dist/cjs/dockview/types.js.map +1 -0
- package/dist/cjs/dom.d.ts +14 -0
- package/dist/cjs/dom.js +183 -0
- package/dist/cjs/dom.js.map +1 -0
- package/dist/cjs/events.d.ts +30 -0
- package/dist/cjs/events.js +130 -0
- package/dist/cjs/events.js.map +1 -0
- package/dist/cjs/gridview/baseComponentGridview.d.ts +87 -0
- package/dist/cjs/gridview/baseComponentGridview.js +280 -0
- package/dist/cjs/gridview/baseComponentGridview.js.map +1 -0
- package/dist/cjs/gridview/basePanelView.d.ts +40 -0
- package/dist/cjs/gridview/basePanelView.js +124 -0
- package/dist/cjs/gridview/basePanelView.js.map +1 -0
- package/dist/cjs/gridview/branchNode.d.ts +49 -0
- package/dist/cjs/gridview/branchNode.js +343 -0
- package/dist/cjs/gridview/branchNode.js.map +1 -0
- package/dist/cjs/gridview/gridview.d.ts +133 -0
- package/dist/cjs/gridview/gridview.js +511 -0
- package/dist/cjs/gridview/gridview.js.map +1 -0
- package/dist/cjs/gridview/gridviewComponent.d.ts +80 -0
- package/dist/cjs/gridview/gridviewComponent.js +325 -0
- package/dist/cjs/gridview/gridviewComponent.js.map +1 -0
- package/dist/cjs/gridview/gridviewPanel.d.ts +65 -0
- package/dist/cjs/gridview/gridviewPanel.js +215 -0
- package/dist/cjs/gridview/gridviewPanel.js.map +1 -0
- package/dist/cjs/gridview/leafNode.d.ts +34 -0
- package/dist/cjs/gridview/leafNode.js +171 -0
- package/dist/cjs/gridview/leafNode.js.map +1 -0
- package/dist/cjs/gridview/options.d.ts +18 -0
- package/dist/cjs/gridview/options.js +3 -0
- package/dist/cjs/gridview/options.js.map +1 -0
- package/dist/cjs/gridview/types.d.ts +3 -0
- package/dist/cjs/gridview/types.js +3 -0
- package/dist/cjs/gridview/types.js.map +1 -0
- package/dist/cjs/index.d.ts +41 -0
- package/dist/cjs/index.js +64 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/lifecycle.d.ts +22 -0
- package/dist/cjs/lifecycle.js +89 -0
- package/dist/cjs/lifecycle.js.map +1 -0
- package/dist/cjs/math.d.ts +5 -0
- package/dist/cjs/math.js +35 -0
- package/dist/cjs/math.js.map +1 -0
- package/dist/cjs/panel/componentFactory.d.ts +10 -0
- package/dist/cjs/panel/componentFactory.js +31 -0
- package/dist/cjs/panel/componentFactory.js.map +1 -0
- package/dist/cjs/panel/types.d.ts +33 -0
- package/dist/cjs/panel/types.js +3 -0
- package/dist/cjs/panel/types.js.map +1 -0
- package/dist/cjs/paneview/defaultPaneviewHeader.d.ts +21 -0
- package/dist/cjs/paneview/defaultPaneviewHeader.js +91 -0
- package/dist/cjs/paneview/defaultPaneviewHeader.js.map +1 -0
- package/dist/cjs/paneview/draggablePaneviewPanel.d.ts +21 -0
- package/dist/cjs/paneview/draggablePaneviewPanel.js +132 -0
- package/dist/cjs/paneview/draggablePaneviewPanel.js.map +1 -0
- package/dist/cjs/paneview/options.d.ts +27 -0
- package/dist/cjs/paneview/options.js +3 -0
- package/dist/cjs/paneview/options.js.map +1 -0
- package/dist/cjs/paneview/paneview.d.ts +40 -0
- package/dist/cjs/paneview/paneview.js +202 -0
- package/dist/cjs/paneview/paneview.js.map +1 -0
- package/dist/cjs/paneview/paneviewComponent.d.ts +129 -0
- package/dist/cjs/paneview/paneviewComponent.js +395 -0
- package/dist/cjs/paneview/paneviewComponent.js.map +1 -0
- package/dist/cjs/paneview/paneviewPanel.d.ts +92 -0
- package/dist/cjs/paneview/paneviewPanel.js +276 -0
- package/dist/cjs/paneview/paneviewPanel.js.map +1 -0
- package/dist/cjs/splitview/options.d.ts +26 -0
- package/dist/cjs/splitview/options.js +3 -0
- package/dist/cjs/splitview/options.js.map +1 -0
- package/dist/cjs/splitview/splitview.d.ts +127 -0
- package/dist/cjs/splitview/splitview.js +909 -0
- package/dist/cjs/splitview/splitview.js.map +1 -0
- package/dist/cjs/splitview/splitviewComponent.d.ts +101 -0
- package/dist/cjs/splitview/splitviewComponent.js +374 -0
- package/dist/cjs/splitview/splitviewComponent.js.map +1 -0
- package/dist/cjs/splitview/splitviewPanel.d.ts +45 -0
- package/dist/cjs/splitview/splitviewPanel.js +180 -0
- package/dist/cjs/splitview/splitviewPanel.js.map +1 -0
- package/dist/cjs/splitview/viewItem.d.ts +25 -0
- package/dist/cjs/splitview/viewItem.js +120 -0
- package/dist/cjs/splitview/viewItem.js.map +1 -0
- package/dist/cjs/svg.d.ts +3 -0
- package/dist/cjs/svg.js +44 -0
- package/dist/cjs/svg.js.map +1 -0
- package/dist/cjs/types.d.ts +2 -0
- package/dist/cjs/types.js +3 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/dockview-core.amd.js +6492 -0
- package/dist/dockview-core.amd.min.js +7 -0
- package/dist/dockview-core.amd.min.noStyle.js +7 -0
- package/dist/dockview-core.amd.noStyle.js +6462 -0
- package/dist/dockview-core.cjs.js +6490 -0
- package/dist/dockview-core.esm.js +6441 -0
- package/dist/dockview-core.esm.min.js +7 -0
- package/dist/dockview-core.js +6496 -0
- package/dist/dockview-core.min.js +7 -0
- package/dist/dockview-core.min.noStyle.js +7 -0
- package/dist/dockview-core.noStyle.js +6466 -0
- package/dist/esm/api/component.api.d.ts +145 -0
- package/dist/esm/api/component.api.js +329 -0
- package/dist/esm/api/dockviewPanelApi.d.ts +34 -0
- package/dist/esm/api/dockviewPanelApi.js +48 -0
- package/dist/esm/api/gridviewPanelApi.d.ts +37 -0
- package/dist/esm/api/gridviewPanelApi.js +25 -0
- package/dist/esm/api/panelApi.d.ts +88 -0
- package/dist/esm/api/panelApi.js +95 -0
- package/dist/esm/api/paneviewPanelApi.d.ts +26 -0
- package/dist/esm/api/paneviewPanelApi.js +27 -0
- package/dist/esm/api/splitviewPanelApi.d.ts +32 -0
- package/dist/esm/api/splitviewPanelApi.js +25 -0
- package/dist/esm/array.d.ts +12 -0
- package/dist/esm/array.js +49 -0
- package/dist/esm/dnd/abstractDragHandler.d.ts +11 -0
- package/dist/esm/dnd/abstractDragHandler.js +47 -0
- package/dist/esm/dnd/dataTransfer.d.ts +31 -0
- package/dist/esm/dnd/dataTransfer.js +69 -0
- package/dist/esm/dnd/dnd.d.ts +27 -0
- package/dist/esm/dnd/dnd.js +36 -0
- package/dist/esm/dnd/droptarget.d.ts +42 -0
- package/dist/esm/dnd/droptarget.js +250 -0
- package/dist/esm/dnd/ghost.d.ts +1 -0
- package/dist/esm/dnd/ghost.js +11 -0
- package/dist/esm/dnd/groupDragHandler.d.ts +11 -0
- package/dist/esm/dnd/groupDragHandler.js +38 -0
- package/dist/esm/dockview/components/panel/content.d.ts +30 -0
- package/dist/esm/dockview/components/panel/content.js +73 -0
- package/dist/esm/dockview/components/tab/defaultTab.d.ts +21 -0
- package/dist/esm/dockview/components/tab/defaultTab.js +67 -0
- package/dist/esm/dockview/components/tab/tab.d.ts +31 -0
- package/dist/esm/dockview/components/tab/tab.js +94 -0
- package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts +63 -0
- package/dist/esm/dockview/components/titlebar/tabsContainer.js +179 -0
- package/dist/esm/dockview/components/titlebar/voidContainer.d.ts +15 -0
- package/dist/esm/dockview/components/titlebar/voidContainer.js +47 -0
- package/dist/esm/dockview/components/watermark/watermark.d.ts +18 -0
- package/dist/esm/dockview/components/watermark/watermark.js +60 -0
- package/dist/esm/dockview/deserializer.d.ts +12 -0
- package/dist/esm/dockview/deserializer.js +40 -0
- package/dist/esm/dockview/dockviewComponent.d.ts +126 -0
- package/dist/esm/dockview/dockviewComponent.js +612 -0
- package/dist/esm/dockview/dockviewGroupPanel.d.ts +31 -0
- package/dist/esm/dockview/dockviewGroupPanel.js +50 -0
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +176 -0
- package/dist/esm/dockview/dockviewGroupPanelModel.js +449 -0
- package/dist/esm/dockview/dockviewPanel.d.ts +40 -0
- package/dist/esm/dockview/dockviewPanel.js +104 -0
- package/dist/esm/dockview/dockviewPanelModel.d.ts +34 -0
- package/dist/esm/dockview/dockviewPanelModel.js +68 -0
- package/dist/esm/dockview/options.d.ts +116 -0
- package/dist/esm/dockview/options.js +24 -0
- package/dist/esm/dockview/types.d.ts +67 -0
- package/dist/esm/dockview/types.js +7 -0
- package/dist/esm/dom.d.ts +14 -0
- package/dist/esm/dom.js +113 -0
- package/dist/esm/events.d.ts +30 -0
- package/dist/esm/events.js +88 -0
- package/dist/esm/gridview/baseComponentGridview.d.ts +87 -0
- package/dist/esm/gridview/baseComponentGridview.js +189 -0
- package/dist/esm/gridview/basePanelView.d.ts +40 -0
- package/dist/esm/gridview/basePanelView.js +74 -0
- package/dist/esm/gridview/branchNode.d.ts +49 -0
- package/dist/esm/gridview/branchNode.js +218 -0
- package/dist/esm/gridview/gridview.d.ts +133 -0
- package/dist/esm/gridview/gridview.js +423 -0
- package/dist/esm/gridview/gridviewComponent.d.ts +80 -0
- package/dist/esm/gridview/gridviewComponent.js +237 -0
- package/dist/esm/gridview/gridviewPanel.d.ts +65 -0
- package/dist/esm/gridview/gridviewPanel.js +151 -0
- package/dist/esm/gridview/leafNode.d.ts +34 -0
- package/dist/esm/gridview/leafNode.js +103 -0
- package/dist/esm/gridview/options.d.ts +18 -0
- package/dist/esm/gridview/options.js +1 -0
- package/dist/esm/gridview/types.d.ts +3 -0
- package/dist/esm/gridview/types.js +1 -0
- package/dist/esm/index.d.ts +41 -0
- package/dist/esm/index.js +35 -0
- package/dist/esm/lifecycle.d.ts +22 -0
- package/dist/esm/lifecycle.js +39 -0
- package/dist/esm/math.d.ts +5 -0
- package/dist/esm/math.js +28 -0
- package/dist/esm/panel/componentFactory.d.ts +10 -0
- package/dist/esm/panel/componentFactory.js +24 -0
- package/dist/esm/panel/types.d.ts +33 -0
- package/dist/esm/panel/types.js +1 -0
- package/dist/esm/paneview/defaultPaneviewHeader.d.ts +21 -0
- package/dist/esm/paneview/defaultPaneviewHeader.js +63 -0
- package/dist/esm/paneview/draggablePaneviewPanel.d.ts +21 -0
- package/dist/esm/paneview/draggablePaneviewPanel.js +92 -0
- package/dist/esm/paneview/options.d.ts +27 -0
- package/dist/esm/paneview/options.js +1 -0
- package/dist/esm/paneview/paneview.d.ts +40 -0
- package/dist/esm/paneview/paneview.js +145 -0
- package/dist/esm/paneview/paneviewComponent.d.ts +129 -0
- package/dist/esm/paneview/paneviewComponent.js +270 -0
- package/dist/esm/paneview/paneviewPanel.d.ts +92 -0
- package/dist/esm/paneview/paneviewPanel.js +192 -0
- package/dist/esm/splitview/options.d.ts +26 -0
- package/dist/esm/splitview/options.js +1 -0
- package/dist/esm/splitview/splitview.d.ts +127 -0
- package/dist/esm/splitview/splitview.js +689 -0
- package/dist/esm/splitview/splitviewComponent.d.ts +101 -0
- package/dist/esm/splitview/splitviewComponent.js +249 -0
- package/dist/esm/splitview/splitviewPanel.d.ts +45 -0
- package/dist/esm/splitview/splitviewPanel.js +108 -0
- package/dist/esm/splitview/viewItem.d.ts +25 -0
- package/dist/esm/splitview/viewItem.js +74 -0
- package/dist/esm/svg.d.ts +3 -0
- package/dist/esm/svg.js +31 -0
- package/dist/esm/types.d.ts +2 -0
- package/dist/esm/types.js +1 -0
- package/dist/styles/dockview.css +615 -0
- package/package.json +68 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Accreditation: This file is largly based upon the MIT licenced VSCode sourcecode found at:
|
|
4
|
+
* https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.LeafNode = void 0;
|
|
8
|
+
var splitview_1 = require("../splitview/splitview");
|
|
9
|
+
var events_1 = require("../events");
|
|
10
|
+
var LeafNode = /** @class */ (function () {
|
|
11
|
+
function LeafNode(view, orientation, orthogonalSize, size) {
|
|
12
|
+
if (size === void 0) { size = 0; }
|
|
13
|
+
var _this = this;
|
|
14
|
+
this.view = view;
|
|
15
|
+
this.orientation = orientation;
|
|
16
|
+
this._onDidChange = new events_1.Emitter();
|
|
17
|
+
this.onDidChange = this._onDidChange.event;
|
|
18
|
+
this._orthogonalSize = orthogonalSize;
|
|
19
|
+
this._size = size;
|
|
20
|
+
this._disposable = this.view.onDidChange(function (event) {
|
|
21
|
+
if (event) {
|
|
22
|
+
_this._onDidChange.fire({
|
|
23
|
+
size: _this.orientation === splitview_1.Orientation.VERTICAL
|
|
24
|
+
? event.width
|
|
25
|
+
: event.height,
|
|
26
|
+
orthogonalSize: _this.orientation === splitview_1.Orientation.VERTICAL
|
|
27
|
+
? event.height
|
|
28
|
+
: event.width,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
_this._onDidChange.fire({});
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
Object.defineProperty(LeafNode.prototype, "minimumWidth", {
|
|
37
|
+
get: function () {
|
|
38
|
+
return this.view.minimumWidth;
|
|
39
|
+
},
|
|
40
|
+
enumerable: false,
|
|
41
|
+
configurable: true
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(LeafNode.prototype, "maximumWidth", {
|
|
44
|
+
get: function () {
|
|
45
|
+
return this.view.maximumWidth;
|
|
46
|
+
},
|
|
47
|
+
enumerable: false,
|
|
48
|
+
configurable: true
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(LeafNode.prototype, "minimumHeight", {
|
|
51
|
+
get: function () {
|
|
52
|
+
return this.view.minimumHeight;
|
|
53
|
+
},
|
|
54
|
+
enumerable: false,
|
|
55
|
+
configurable: true
|
|
56
|
+
});
|
|
57
|
+
Object.defineProperty(LeafNode.prototype, "maximumHeight", {
|
|
58
|
+
get: function () {
|
|
59
|
+
return this.view.maximumHeight;
|
|
60
|
+
},
|
|
61
|
+
enumerable: false,
|
|
62
|
+
configurable: true
|
|
63
|
+
});
|
|
64
|
+
Object.defineProperty(LeafNode.prototype, "priority", {
|
|
65
|
+
get: function () {
|
|
66
|
+
return this.view.priority;
|
|
67
|
+
},
|
|
68
|
+
enumerable: false,
|
|
69
|
+
configurable: true
|
|
70
|
+
});
|
|
71
|
+
Object.defineProperty(LeafNode.prototype, "snap", {
|
|
72
|
+
get: function () {
|
|
73
|
+
return this.view.snap;
|
|
74
|
+
},
|
|
75
|
+
enumerable: false,
|
|
76
|
+
configurable: true
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(LeafNode.prototype, "minimumSize", {
|
|
79
|
+
get: function () {
|
|
80
|
+
return this.orientation === splitview_1.Orientation.HORIZONTAL
|
|
81
|
+
? this.minimumHeight
|
|
82
|
+
: this.minimumWidth;
|
|
83
|
+
},
|
|
84
|
+
enumerable: false,
|
|
85
|
+
configurable: true
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(LeafNode.prototype, "maximumSize", {
|
|
88
|
+
get: function () {
|
|
89
|
+
return this.orientation === splitview_1.Orientation.HORIZONTAL
|
|
90
|
+
? this.maximumHeight
|
|
91
|
+
: this.maximumWidth;
|
|
92
|
+
},
|
|
93
|
+
enumerable: false,
|
|
94
|
+
configurable: true
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(LeafNode.prototype, "minimumOrthogonalSize", {
|
|
97
|
+
get: function () {
|
|
98
|
+
return this.orientation === splitview_1.Orientation.HORIZONTAL
|
|
99
|
+
? this.minimumWidth
|
|
100
|
+
: this.minimumHeight;
|
|
101
|
+
},
|
|
102
|
+
enumerable: false,
|
|
103
|
+
configurable: true
|
|
104
|
+
});
|
|
105
|
+
Object.defineProperty(LeafNode.prototype, "maximumOrthogonalSize", {
|
|
106
|
+
get: function () {
|
|
107
|
+
return this.orientation === splitview_1.Orientation.HORIZONTAL
|
|
108
|
+
? this.maximumWidth
|
|
109
|
+
: this.maximumHeight;
|
|
110
|
+
},
|
|
111
|
+
enumerable: false,
|
|
112
|
+
configurable: true
|
|
113
|
+
});
|
|
114
|
+
Object.defineProperty(LeafNode.prototype, "orthogonalSize", {
|
|
115
|
+
get: function () {
|
|
116
|
+
return this._orthogonalSize;
|
|
117
|
+
},
|
|
118
|
+
enumerable: false,
|
|
119
|
+
configurable: true
|
|
120
|
+
});
|
|
121
|
+
Object.defineProperty(LeafNode.prototype, "size", {
|
|
122
|
+
get: function () {
|
|
123
|
+
return this._size;
|
|
124
|
+
},
|
|
125
|
+
enumerable: false,
|
|
126
|
+
configurable: true
|
|
127
|
+
});
|
|
128
|
+
Object.defineProperty(LeafNode.prototype, "element", {
|
|
129
|
+
get: function () {
|
|
130
|
+
return this.view.element;
|
|
131
|
+
},
|
|
132
|
+
enumerable: false,
|
|
133
|
+
configurable: true
|
|
134
|
+
});
|
|
135
|
+
Object.defineProperty(LeafNode.prototype, "width", {
|
|
136
|
+
get: function () {
|
|
137
|
+
return this.orientation === splitview_1.Orientation.HORIZONTAL
|
|
138
|
+
? this.orthogonalSize
|
|
139
|
+
: this.size;
|
|
140
|
+
},
|
|
141
|
+
enumerable: false,
|
|
142
|
+
configurable: true
|
|
143
|
+
});
|
|
144
|
+
Object.defineProperty(LeafNode.prototype, "height", {
|
|
145
|
+
get: function () {
|
|
146
|
+
return this.orientation === splitview_1.Orientation.HORIZONTAL
|
|
147
|
+
? this.size
|
|
148
|
+
: this.orthogonalSize;
|
|
149
|
+
},
|
|
150
|
+
enumerable: false,
|
|
151
|
+
configurable: true
|
|
152
|
+
});
|
|
153
|
+
LeafNode.prototype.setVisible = function (visible) {
|
|
154
|
+
if (this.view.setVisible) {
|
|
155
|
+
this.view.setVisible(visible);
|
|
156
|
+
this._onDidChange.fire({});
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
LeafNode.prototype.layout = function (size, orthogonalSize) {
|
|
160
|
+
this._size = size;
|
|
161
|
+
this._orthogonalSize = orthogonalSize;
|
|
162
|
+
this.view.layout(this.width, this.height);
|
|
163
|
+
};
|
|
164
|
+
LeafNode.prototype.dispose = function () {
|
|
165
|
+
this._onDidChange.dispose();
|
|
166
|
+
this._disposable.dispose();
|
|
167
|
+
};
|
|
168
|
+
return LeafNode;
|
|
169
|
+
}());
|
|
170
|
+
exports.LeafNode = LeafNode;
|
|
171
|
+
//# sourceMappingURL=leafNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leafNode.js","sourceRoot":"","sources":["../../../src/gridview/leafNode.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,oDAA4E;AAC5E,oCAA2C;AAI3C;IAmFI,kBACoB,IAAe,EACtB,WAAwB,EACjC,cAAsB,EACtB,IAAQ;QAAR,qBAAA,EAAA,QAAQ;QAJZ,iBAyBC;QAxBmB,SAAI,GAAJ,IAAI,CAAW;QACtB,gBAAW,GAAX,WAAW,CAAa;QApFpB,iBAAY,GAAG,IAAI,gBAAO,EAGvC,CAAC;QACI,gBAAW,GAChB,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;QAmFxB,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;QACtC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAElB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,UAAC,KAAK;YAC3C,IAAI,KAAK,EAA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,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YAC9B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;SAC9B;IACL,CAAC;IAEM,yBAAM,GAAb,UAAc,IAAY,EAAE,cAAsB;QAC9C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;QAEtC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;IAEM,0BAAO,GAAd;QACI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;QAC5B,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;IAC/B,CAAC;IACL,eAAC;AAAD,CAAC,AAhID,IAgIC;AAhIY,4BAAQ"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { GridviewPanel } from './gridviewPanel';
|
|
2
|
+
import { ISplitviewStyles, Orientation } from '../splitview/splitview';
|
|
3
|
+
import { FrameworkFactory } from '../panel/componentFactory';
|
|
4
|
+
export interface GridviewComponentOptions {
|
|
5
|
+
proportionalLayout: boolean;
|
|
6
|
+
orientation: Orientation;
|
|
7
|
+
components?: {
|
|
8
|
+
[componentName: string]: {
|
|
9
|
+
new (id: string, componentName: string): GridviewPanel;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
frameworkComponents?: {
|
|
13
|
+
[componentName: string]: any;
|
|
14
|
+
};
|
|
15
|
+
frameworkComponentFactory?: FrameworkFactory<GridviewPanel>;
|
|
16
|
+
tabHeight?: number;
|
|
17
|
+
styles?: ISplitviewStyles;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/gridview/options.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/gridview/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export * from './dnd/dataTransfer';
|
|
2
|
+
export { watchElementResize } from './dom';
|
|
3
|
+
/**
|
|
4
|
+
* Events, Emitters and Disposables are very common concepts that most codebases will contain.
|
|
5
|
+
* We export them with a 'Dockview' prefix here to prevent accidental use by others.
|
|
6
|
+
*/
|
|
7
|
+
export { Emitter as DockviewEmitter, Event as DockviewEvent } from './events';
|
|
8
|
+
export { IDisposable as IDockviewDisposable, MutableDisposable as DockviewMutableDisposable, CompositeDisposable as DockviewCompositeDisposable, } from './lifecycle';
|
|
9
|
+
export * from './panel/types';
|
|
10
|
+
export * from './panel/componentFactory';
|
|
11
|
+
export * from './splitview/splitview';
|
|
12
|
+
export * from './splitview/options';
|
|
13
|
+
export * from './paneview/paneview';
|
|
14
|
+
export * from './gridview/gridview';
|
|
15
|
+
export * from './dockview/dockviewGroupPanelModel';
|
|
16
|
+
export * from './gridview/baseComponentGridview';
|
|
17
|
+
export * from './paneview/draggablePaneviewPanel';
|
|
18
|
+
export * from './dockview/components/panel/content';
|
|
19
|
+
export * from './dockview/components/tab/tab';
|
|
20
|
+
export * from './dockview/types';
|
|
21
|
+
export * from './dockview/dockviewGroupPanel';
|
|
22
|
+
export * from './dockview/options';
|
|
23
|
+
export * from './dockview/dockviewPanel';
|
|
24
|
+
export * from './dockview/components/tab/defaultTab';
|
|
25
|
+
export * from './dockview/deserializer';
|
|
26
|
+
export * from './dockview/dockviewComponent';
|
|
27
|
+
export * from './gridview/gridviewComponent';
|
|
28
|
+
export * from './splitview/splitviewComponent';
|
|
29
|
+
export * from './paneview/paneviewComponent';
|
|
30
|
+
export { PaneviewComponentOptions } from './paneview/options';
|
|
31
|
+
export * from './gridview/gridviewPanel';
|
|
32
|
+
export * from './splitview/splitviewPanel';
|
|
33
|
+
export * from './paneview/paneviewPanel';
|
|
34
|
+
export * from './dockview/types';
|
|
35
|
+
export { Position, positionToDirection, directionToPosition, } from './dnd/droptarget';
|
|
36
|
+
export { FocusEvent, PanelDimensionChangeEvent, VisibilityEvent, ActiveEvent, PanelApi, } from './api/panelApi';
|
|
37
|
+
export { SizeEvent, GridviewPanelApi, GridConstraintChangeEvent, } from './api/gridviewPanelApi';
|
|
38
|
+
export { TitleEvent, DockviewPanelApi } from './api/dockviewPanelApi';
|
|
39
|
+
export { PanelSizeEvent, PanelConstraintChangeEvent, SplitviewPanelApi, } from './api/splitviewPanelApi';
|
|
40
|
+
export { ExpansionEvent, PaneviewPanelApi } from './api/paneviewPanelApi';
|
|
41
|
+
export { CommonApi, SplitviewApi, PaneviewApi, GridviewApi, DockviewApi, } from './api/component.api';
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.DockviewApi = exports.GridviewApi = exports.PaneviewApi = exports.SplitviewApi = exports.directionToPosition = exports.positionToDirection = exports.DockviewCompositeDisposable = exports.DockviewMutableDisposable = exports.DockviewEvent = exports.DockviewEmitter = exports.watchElementResize = void 0;
|
|
18
|
+
__exportStar(require("./dnd/dataTransfer"), exports);
|
|
19
|
+
var dom_1 = require("./dom");
|
|
20
|
+
Object.defineProperty(exports, "watchElementResize", { enumerable: true, get: function () { return dom_1.watchElementResize; } });
|
|
21
|
+
/**
|
|
22
|
+
* Events, Emitters and Disposables are very common concepts that most codebases will contain.
|
|
23
|
+
* We export them with a 'Dockview' prefix here to prevent accidental use by others.
|
|
24
|
+
*/
|
|
25
|
+
var events_1 = require("./events");
|
|
26
|
+
Object.defineProperty(exports, "DockviewEmitter", { enumerable: true, get: function () { return events_1.Emitter; } });
|
|
27
|
+
Object.defineProperty(exports, "DockviewEvent", { enumerable: true, get: function () { return events_1.Event; } });
|
|
28
|
+
var lifecycle_1 = require("./lifecycle");
|
|
29
|
+
Object.defineProperty(exports, "DockviewMutableDisposable", { enumerable: true, get: function () { return lifecycle_1.MutableDisposable; } });
|
|
30
|
+
Object.defineProperty(exports, "DockviewCompositeDisposable", { enumerable: true, get: function () { return lifecycle_1.CompositeDisposable; } });
|
|
31
|
+
__exportStar(require("./panel/types"), exports);
|
|
32
|
+
__exportStar(require("./panel/componentFactory"), exports);
|
|
33
|
+
__exportStar(require("./splitview/splitview"), exports);
|
|
34
|
+
__exportStar(require("./splitview/options"), exports);
|
|
35
|
+
__exportStar(require("./paneview/paneview"), exports);
|
|
36
|
+
__exportStar(require("./gridview/gridview"), exports);
|
|
37
|
+
__exportStar(require("./dockview/dockviewGroupPanelModel"), exports);
|
|
38
|
+
__exportStar(require("./gridview/baseComponentGridview"), exports);
|
|
39
|
+
__exportStar(require("./paneview/draggablePaneviewPanel"), exports);
|
|
40
|
+
__exportStar(require("./dockview/components/panel/content"), exports);
|
|
41
|
+
__exportStar(require("./dockview/components/tab/tab"), exports);
|
|
42
|
+
__exportStar(require("./dockview/types"), exports);
|
|
43
|
+
__exportStar(require("./dockview/dockviewGroupPanel"), exports);
|
|
44
|
+
__exportStar(require("./dockview/options"), exports);
|
|
45
|
+
__exportStar(require("./dockview/dockviewPanel"), exports);
|
|
46
|
+
__exportStar(require("./dockview/components/tab/defaultTab"), exports);
|
|
47
|
+
__exportStar(require("./dockview/deserializer"), exports);
|
|
48
|
+
__exportStar(require("./dockview/dockviewComponent"), exports);
|
|
49
|
+
__exportStar(require("./gridview/gridviewComponent"), exports);
|
|
50
|
+
__exportStar(require("./splitview/splitviewComponent"), exports);
|
|
51
|
+
__exportStar(require("./paneview/paneviewComponent"), exports);
|
|
52
|
+
__exportStar(require("./gridview/gridviewPanel"), exports);
|
|
53
|
+
__exportStar(require("./splitview/splitviewPanel"), exports);
|
|
54
|
+
__exportStar(require("./paneview/paneviewPanel"), exports);
|
|
55
|
+
__exportStar(require("./dockview/types"), exports);
|
|
56
|
+
var droptarget_1 = require("./dnd/droptarget");
|
|
57
|
+
Object.defineProperty(exports, "positionToDirection", { enumerable: true, get: function () { return droptarget_1.positionToDirection; } });
|
|
58
|
+
Object.defineProperty(exports, "directionToPosition", { enumerable: true, get: function () { return droptarget_1.directionToPosition; } });
|
|
59
|
+
var component_api_1 = require("./api/component.api");
|
|
60
|
+
Object.defineProperty(exports, "SplitviewApi", { enumerable: true, get: function () { return component_api_1.SplitviewApi; } });
|
|
61
|
+
Object.defineProperty(exports, "PaneviewApi", { enumerable: true, get: function () { return component_api_1.PaneviewApi; } });
|
|
62
|
+
Object.defineProperty(exports, "GridviewApi", { enumerable: true, get: function () { return component_api_1.GridviewApi; } });
|
|
63
|
+
Object.defineProperty(exports, "DockviewApi", { enumerable: true, get: function () { return component_api_1.DockviewApi; } });
|
|
64
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qDAAmC;AAEnC,6BAA2C;AAAlC,yGAAA,kBAAkB,OAAA;AAE3B;;;GAGG;AACH,mCAA8E;AAArE,yGAAA,OAAO,OAAmB;AAAE,uGAAA,KAAK,OAAiB;AAC3D,yCAIqB;AAFjB,sHAAA,iBAAiB,OAA6B;AAC9C,wHAAA,mBAAmB,OAA+B;AAGtD,gDAA8B;AAC9B,2DAAyC;AAEzC,wDAAsC;AACtC,sDAAoC;AAEpC,sDAAoC;AACpC,sDAAoC;AACpC,qEAAmD;AACnD,mEAAiD;AAEjD,oEAAkD;AAElD,sEAAoD;AACpD,gEAA8C;AAC9C,mDAAiC;AACjC,gEAA8C;AAE9C,qDAAmC;AACnC,2DAAyC;AACzC,uEAAqD;AACrD,0DAAwC;AAExC,+DAA6C;AAC7C,+DAA6C;AAC7C,iEAA+C;AAC/C,+DAA6C;AAG7C,2DAAyC;AACzC,6DAA2C;AAC3C,2DAAyC;AACzC,mDAAiC;AAEjC,+CAI0B;AAFtB,iHAAA,mBAAmB,OAAA;AACnB,iHAAA,mBAAmB,OAAA;AAqBvB,qDAM6B;AAJzB,6GAAA,YAAY,OAAA;AACZ,4GAAA,WAAW,OAAA;AACX,4GAAA,WAAW,OAAA;AACX,4GAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface IDisposable {
|
|
2
|
+
dispose: () => void;
|
|
3
|
+
}
|
|
4
|
+
export interface IValueDisposable<T> {
|
|
5
|
+
readonly value: T;
|
|
6
|
+
readonly disposable: IDisposable;
|
|
7
|
+
}
|
|
8
|
+
export declare namespace Disposable {
|
|
9
|
+
const NONE: IDisposable;
|
|
10
|
+
}
|
|
11
|
+
export declare class CompositeDisposable {
|
|
12
|
+
private readonly disposables;
|
|
13
|
+
static from(...args: IDisposable[]): CompositeDisposable;
|
|
14
|
+
constructor(...args: IDisposable[]);
|
|
15
|
+
addDisposables(...args: IDisposable[]): void;
|
|
16
|
+
dispose(): void;
|
|
17
|
+
}
|
|
18
|
+
export declare class MutableDisposable implements IDisposable {
|
|
19
|
+
private _disposable;
|
|
20
|
+
set value(disposable: IDisposable);
|
|
21
|
+
dispose(): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
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.MutableDisposable = exports.CompositeDisposable = exports.Disposable = void 0;
|
|
29
|
+
var Disposable;
|
|
30
|
+
(function (Disposable) {
|
|
31
|
+
Disposable.NONE = {
|
|
32
|
+
dispose: function () {
|
|
33
|
+
// noop
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
})(Disposable = exports.Disposable || (exports.Disposable = {}));
|
|
37
|
+
var CompositeDisposable = /** @class */ (function () {
|
|
38
|
+
function CompositeDisposable() {
|
|
39
|
+
var args = [];
|
|
40
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
41
|
+
args[_i] = arguments[_i];
|
|
42
|
+
}
|
|
43
|
+
this.disposables = args;
|
|
44
|
+
}
|
|
45
|
+
CompositeDisposable.from = function () {
|
|
46
|
+
var args = [];
|
|
47
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
48
|
+
args[_i] = arguments[_i];
|
|
49
|
+
}
|
|
50
|
+
return new (CompositeDisposable.bind.apply(CompositeDisposable, __spreadArray([void 0], __read(args), false)))();
|
|
51
|
+
};
|
|
52
|
+
CompositeDisposable.prototype.addDisposables = function () {
|
|
53
|
+
var _this = this;
|
|
54
|
+
var args = [];
|
|
55
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
56
|
+
args[_i] = arguments[_i];
|
|
57
|
+
}
|
|
58
|
+
args.forEach(function (arg) { return _this.disposables.push(arg); });
|
|
59
|
+
};
|
|
60
|
+
CompositeDisposable.prototype.dispose = function () {
|
|
61
|
+
this.disposables.forEach(function (arg) { return arg.dispose(); });
|
|
62
|
+
};
|
|
63
|
+
return CompositeDisposable;
|
|
64
|
+
}());
|
|
65
|
+
exports.CompositeDisposable = CompositeDisposable;
|
|
66
|
+
var MutableDisposable = /** @class */ (function () {
|
|
67
|
+
function MutableDisposable() {
|
|
68
|
+
this._disposable = Disposable.NONE;
|
|
69
|
+
}
|
|
70
|
+
Object.defineProperty(MutableDisposable.prototype, "value", {
|
|
71
|
+
set: function (disposable) {
|
|
72
|
+
if (this._disposable) {
|
|
73
|
+
this._disposable.dispose();
|
|
74
|
+
}
|
|
75
|
+
this._disposable = disposable;
|
|
76
|
+
},
|
|
77
|
+
enumerable: false,
|
|
78
|
+
configurable: true
|
|
79
|
+
});
|
|
80
|
+
MutableDisposable.prototype.dispose = function () {
|
|
81
|
+
if (this._disposable) {
|
|
82
|
+
this._disposable.dispose();
|
|
83
|
+
this._disposable = Disposable.NONE;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
return MutableDisposable;
|
|
87
|
+
}());
|
|
88
|
+
exports.MutableDisposable = MutableDisposable;
|
|
89
|
+
//# sourceMappingURL=lifecycle.js.map
|
|
@@ -0,0 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AE,CAAC;aAC9B;YACD,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAClC,CAAC;;;OAAA;IAEM,mCAAO,GAAd;QACI,IAAI,IAAI,CAAC,WAAW,EAAE;YAClB,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;YAC3B,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC;SACtC;IACL,CAAC;IACL,wBAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,8CAAiB"}
|
package/dist/cjs/math.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.range = exports.sequentialNumberGenerator = exports.clamp = void 0;
|
|
4
|
+
var clamp = function (value, min, max) {
|
|
5
|
+
if (min > max) {
|
|
6
|
+
throw new Error("".concat(min, " > ").concat(max, " is an invalid condition"));
|
|
7
|
+
}
|
|
8
|
+
return Math.min(max, Math.max(value, min));
|
|
9
|
+
};
|
|
10
|
+
exports.clamp = clamp;
|
|
11
|
+
var sequentialNumberGenerator = function () {
|
|
12
|
+
var value = 1;
|
|
13
|
+
return { next: function () { return (value++).toString(); } };
|
|
14
|
+
};
|
|
15
|
+
exports.sequentialNumberGenerator = sequentialNumberGenerator;
|
|
16
|
+
var range = function (from, to) {
|
|
17
|
+
var result = [];
|
|
18
|
+
if (typeof to !== 'number') {
|
|
19
|
+
to = from;
|
|
20
|
+
from = 0;
|
|
21
|
+
}
|
|
22
|
+
if (from <= to) {
|
|
23
|
+
for (var i = from; i < to; i++) {
|
|
24
|
+
result.push(i);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
for (var i = from; i > to; i--) {
|
|
29
|
+
result.push(i);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
exports.range = range;
|
|
35
|
+
//# sourceMappingURL=math.js.map
|
|
@@ -0,0 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@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface FrameworkFactory<T> {
|
|
2
|
+
createComponent: (id: string, componentId: string, component: any) => T;
|
|
3
|
+
}
|
|
4
|
+
export declare function createComponent<T>(id: string, componentName?: string, components?: {
|
|
5
|
+
[componentName: string]: {
|
|
6
|
+
new (id: string, component: string): T;
|
|
7
|
+
};
|
|
8
|
+
}, frameworkComponents?: {
|
|
9
|
+
[componentName: string]: any;
|
|
10
|
+
}, createFrameworkComponent?: FrameworkFactory<T>, fallback?: () => T): T;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createComponent = void 0;
|
|
4
|
+
function createComponent(id, componentName, components, frameworkComponents, createFrameworkComponent, fallback) {
|
|
5
|
+
if (components === void 0) { components = {}; }
|
|
6
|
+
if (frameworkComponents === void 0) { frameworkComponents = {}; }
|
|
7
|
+
var Component = typeof componentName === 'string'
|
|
8
|
+
? components[componentName]
|
|
9
|
+
: undefined;
|
|
10
|
+
var FrameworkComponent = typeof componentName === 'string'
|
|
11
|
+
? frameworkComponents[componentName]
|
|
12
|
+
: undefined;
|
|
13
|
+
if (Component && FrameworkComponent) {
|
|
14
|
+
throw new Error("Cannot create '".concat(id, "'. component '").concat(componentName, "' registered as both a component and frameworkComponent"));
|
|
15
|
+
}
|
|
16
|
+
if (FrameworkComponent) {
|
|
17
|
+
if (!createFrameworkComponent) {
|
|
18
|
+
throw new Error("Cannot create '".concat(id, "' for framework component '").concat(componentName, "'. you must register a frameworkPanelWrapper to use framework components"));
|
|
19
|
+
}
|
|
20
|
+
return createFrameworkComponent.createComponent(id, componentName, FrameworkComponent);
|
|
21
|
+
}
|
|
22
|
+
if (!Component) {
|
|
23
|
+
if (fallback) {
|
|
24
|
+
return fallback();
|
|
25
|
+
}
|
|
26
|
+
throw new Error("Cannot create '".concat(id, "', no component '").concat(componentName, "' provided"));
|
|
27
|
+
}
|
|
28
|
+
return new Component(id, componentName);
|
|
29
|
+
}
|
|
30
|
+
exports.createComponent = createComponent;
|
|
31
|
+
//# sourceMappingURL=componentFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentFactory.js","sourceRoot":"","sources":["../../../src/panel/componentFactory.ts"],"names":[],"mappings":";;;AAIA,SAAgB,eAAe,CAC3B,EAAU,EACV,aAAsB,EACtB,UAEM,EACN,mBAEM,EACN,wBAA8C,EAC9C,QAAkB;IAPlB,2BAAA,EAAA,eAEM;IACN,oCAAA,EAAA,wBAEM;IAIN,IAAM,SAAS,GACX,OAAO,aAAa,KAAK,QAAQ;QAC7B,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC;QAC3B,CAAC,CAAC,SAAS,CAAC;IACpB,IAAM,kBAAkB,GACpB,OAAO,aAAa,KAAK,QAAQ;QAC7B,CAAC,CAAC,mBAAmB,CAAC,aAAa,CAAC;QACpC,CAAC,CAAC,SAAS,CAAC;IAEpB,IAAI,SAAS,IAAI,kBAAkB,EAAE;QACjC,MAAM,IAAI,KAAK,CACX,yBAAkB,EAAE,2BAAiB,aAAa,4DAAyD,CAC9G,CAAC;KACL;IACD,IAAI,kBAAkB,EAAE;QACpB,IAAI,CAAC,wBAAwB,EAAE;YAC3B,MAAM,IAAI,KAAK,CACX,yBAAkB,EAAE,wCAA8B,aAAa,6EAA0E,CAC5I,CAAC;SACL;QACD,OAAO,wBAAwB,CAAC,eAAe,CAC3C,EAAE,EACF,aAAc,EACd,kBAAkB,CACrB,CAAC;KACL;IAED,IAAI,CAAC,SAAS,EAAE;QACZ,IAAI,QAAQ,EAAE;YACV,OAAO,QAAQ,EAAE,CAAC;SACrB;QACD,MAAM,IAAI,KAAK,CACX,yBAAkB,EAAE,8BAAoB,aAAa,eAAY,CACpE,CAAC;KACL;IAED,OAAO,IAAI,SAAS,CAAC,EAAE,EAAE,aAAc,CAAC,CAAC;AAC7C,CAAC;AAjDD,0CAiDC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { IDisposable } from '../lifecycle';
|
|
2
|
+
import { LayoutPriority } from '../splitview/splitview';
|
|
3
|
+
/**
|
|
4
|
+
* A key-value object of anything that is a valid JavaScript Object.
|
|
5
|
+
*/
|
|
6
|
+
export interface Parameters {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}
|
|
9
|
+
export interface PanelInitParameters {
|
|
10
|
+
params: Parameters;
|
|
11
|
+
}
|
|
12
|
+
export interface PanelUpdateEvent<T extends Parameters = Parameters> {
|
|
13
|
+
params: Partial<T>;
|
|
14
|
+
}
|
|
15
|
+
export interface IPanel extends IDisposable {
|
|
16
|
+
readonly id: string;
|
|
17
|
+
init(params: PanelInitParameters): void;
|
|
18
|
+
layout(width: number, height: number): void;
|
|
19
|
+
update(event: PanelUpdateEvent<Parameters>): void;
|
|
20
|
+
toJSON(): object;
|
|
21
|
+
focus?(): void;
|
|
22
|
+
}
|
|
23
|
+
export interface IFrameworkPart extends IDisposable {
|
|
24
|
+
update(params: Parameters): void;
|
|
25
|
+
}
|
|
26
|
+
export interface BaseComponentOptions {
|
|
27
|
+
id: string;
|
|
28
|
+
component: string;
|
|
29
|
+
params?: Parameters;
|
|
30
|
+
snap?: boolean;
|
|
31
|
+
priority?: LayoutPriority;
|
|
32
|
+
size?: number;
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/panel/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PaneviewPanelApiImpl } from '../api/paneviewPanelApi';
|
|
2
|
+
import { CompositeDisposable } from '../lifecycle';
|
|
3
|
+
import { PanelUpdateEvent } from '../panel/types';
|
|
4
|
+
import { IPaneHeaderPart, PanePanelInitParameter } from './paneviewPanel';
|
|
5
|
+
export declare class DefaultHeader extends CompositeDisposable implements IPaneHeaderPart {
|
|
6
|
+
private readonly _expandedIcon;
|
|
7
|
+
private readonly _collapsedIcon;
|
|
8
|
+
private readonly disposable;
|
|
9
|
+
private readonly _element;
|
|
10
|
+
private readonly _content;
|
|
11
|
+
private readonly _expander;
|
|
12
|
+
private apiRef;
|
|
13
|
+
get element(): HTMLElement;
|
|
14
|
+
constructor();
|
|
15
|
+
init(params: PanePanelInitParameter & {
|
|
16
|
+
api: PaneviewPanelApiImpl;
|
|
17
|
+
}): void;
|
|
18
|
+
private updateIcon;
|
|
19
|
+
update(_params: PanelUpdateEvent): void;
|
|
20
|
+
dispose(): void;
|
|
21
|
+
}
|