dockview-core 2.1.4 → 3.0.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/dist/cjs/api/component.api.d.ts +4 -3
- package/dist/cjs/api/component.api.js +8 -22
- package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts +2 -1
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js +30 -33
- package/dist/cjs/dockview/options.d.ts +4 -8
- package/dist/cjs/dockview/options.js +28 -20
- package/dist/cjs/events.d.ts +9 -0
- package/dist/cjs/events.js +18 -1
- package/dist/cjs/gridview/gridviewComponent.js +15 -24
- package/dist/cjs/gridview/options.d.ts +10 -12
- package/dist/cjs/gridview/options.js +15 -0
- package/dist/cjs/index.d.ts +4 -4
- package/dist/cjs/index.js +8 -1
- package/dist/cjs/paneview/defaultPaneviewHeader.d.ts +2 -2
- package/dist/cjs/paneview/draggablePaneviewPanel.d.ts +6 -2
- package/dist/cjs/paneview/draggablePaneviewPanel.js +8 -9
- package/dist/cjs/paneview/options.d.ts +25 -21
- package/dist/cjs/paneview/options.js +42 -0
- package/dist/cjs/paneview/paneviewComponent.d.ts +12 -15
- package/dist/cjs/paneview/paneviewComponent.js +30 -40
- package/dist/cjs/paneview/paneviewPanel.d.ts +3 -8
- package/dist/cjs/splitview/options.d.ts +7 -9
- package/dist/cjs/splitview/options.js +17 -0
- package/dist/cjs/splitview/splitview.d.ts +5 -5
- package/dist/cjs/splitview/splitviewComponent.js +10 -21
- package/dist/dockview-core.amd.js +160 -159
- package/dist/dockview-core.amd.js.map +1 -1
- package/dist/dockview-core.amd.min.js +2 -2
- package/dist/dockview-core.amd.min.js.map +1 -1
- package/dist/dockview-core.amd.min.noStyle.js +2 -2
- package/dist/dockview-core.amd.min.noStyle.js.map +1 -1
- package/dist/dockview-core.amd.noStyle.js +160 -159
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +160 -159
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +156 -159
- package/dist/dockview-core.esm.js.map +1 -1
- package/dist/dockview-core.esm.min.js +2 -2
- package/dist/dockview-core.esm.min.js.map +1 -1
- package/dist/dockview-core.js +160 -159
- package/dist/dockview-core.js.map +1 -1
- package/dist/dockview-core.min.js +2 -2
- package/dist/dockview-core.min.js.map +1 -1
- package/dist/dockview-core.min.noStyle.js +2 -2
- package/dist/dockview-core.min.noStyle.js.map +1 -1
- package/dist/dockview-core.noStyle.js +160 -159
- package/dist/dockview-core.noStyle.js.map +1 -1
- package/dist/esm/api/component.api.d.ts +4 -3
- package/dist/esm/api/component.api.js +4 -10
- package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts +2 -1
- package/dist/esm/dockview/components/titlebar/tabsContainer.js +20 -23
- package/dist/esm/dockview/options.d.ts +4 -8
- package/dist/esm/dockview/options.js +4 -9
- package/dist/esm/events.d.ts +9 -0
- package/dist/esm/events.js +11 -0
- package/dist/esm/gridview/gridviewComponent.js +15 -24
- package/dist/esm/gridview/options.d.ts +10 -12
- package/dist/esm/gridview/options.js +14 -1
- package/dist/esm/index.d.ts +4 -4
- package/dist/esm/index.js +3 -0
- package/dist/esm/paneview/defaultPaneviewHeader.d.ts +2 -2
- package/dist/esm/paneview/draggablePaneviewPanel.d.ts +6 -2
- package/dist/esm/paneview/draggablePaneviewPanel.js +8 -9
- package/dist/esm/paneview/options.d.ts +25 -21
- package/dist/esm/paneview/options.js +22 -1
- package/dist/esm/paneview/paneviewComponent.d.ts +12 -15
- package/dist/esm/paneview/paneviewComponent.js +30 -40
- package/dist/esm/paneview/paneviewPanel.d.ts +3 -8
- package/dist/esm/splitview/options.d.ts +7 -9
- package/dist/esm/splitview/options.js +16 -1
- package/dist/esm/splitview/splitview.d.ts +5 -5
- package/dist/esm/splitview/splitviewComponent.js +10 -21
- package/package.json +1 -1
- package/dist/cjs/panel/componentFactory.d.ts +0 -11
- package/dist/cjs/panel/componentFactory.js +0 -30
- package/dist/esm/panel/componentFactory.d.ts +0 -11
- package/dist/esm/panel/componentFactory.js +0 -24
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version
|
|
3
|
+
* @version 3.0.0
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -99,6 +99,17 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
99
99
|
this._defaultPrevented = true;
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
+
class AcceptableEvent {
|
|
103
|
+
constructor() {
|
|
104
|
+
this._isAccepted = false;
|
|
105
|
+
}
|
|
106
|
+
get isAccepted() {
|
|
107
|
+
return this._isAccepted;
|
|
108
|
+
}
|
|
109
|
+
accept() {
|
|
110
|
+
this._isAccepted = true;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
102
113
|
class LeakageMonitor {
|
|
103
114
|
constructor() {
|
|
104
115
|
this.events = new Map();
|
|
@@ -1490,6 +1501,23 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
1490
1501
|
}
|
|
1491
1502
|
}
|
|
1492
1503
|
|
|
1504
|
+
const PROPERTY_KEYS_SPLITVIEW = (() => {
|
|
1505
|
+
/**
|
|
1506
|
+
* by readong the keys from an empty value object TypeScript will error
|
|
1507
|
+
* when we add or remove new properties to `DockviewOptions`
|
|
1508
|
+
*/
|
|
1509
|
+
const properties = {
|
|
1510
|
+
orientation: undefined,
|
|
1511
|
+
descriptor: undefined,
|
|
1512
|
+
proportionalLayout: undefined,
|
|
1513
|
+
styles: undefined,
|
|
1514
|
+
margin: undefined,
|
|
1515
|
+
disableAutoResizing: undefined,
|
|
1516
|
+
className: undefined,
|
|
1517
|
+
};
|
|
1518
|
+
return Object.keys(properties);
|
|
1519
|
+
})();
|
|
1520
|
+
|
|
1493
1521
|
class Paneview extends CompositeDisposable {
|
|
1494
1522
|
get onDidAddView() {
|
|
1495
1523
|
return this.splitview.onDidAddView;
|
|
@@ -2619,6 +2647,21 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2619
2647
|
}
|
|
2620
2648
|
}
|
|
2621
2649
|
|
|
2650
|
+
const PROPERTY_KEYS_GRIDVIEW = (() => {
|
|
2651
|
+
/**
|
|
2652
|
+
* by readong the keys from an empty value object TypeScript will error
|
|
2653
|
+
* when we add or remove new properties to `DockviewOptions`
|
|
2654
|
+
*/
|
|
2655
|
+
const properties = {
|
|
2656
|
+
disableAutoResizing: undefined,
|
|
2657
|
+
proportionalLayout: undefined,
|
|
2658
|
+
orientation: undefined,
|
|
2659
|
+
hideBorders: undefined,
|
|
2660
|
+
className: undefined,
|
|
2661
|
+
};
|
|
2662
|
+
return Object.keys(properties);
|
|
2663
|
+
})();
|
|
2664
|
+
|
|
2622
2665
|
class Resizable extends CompositeDisposable {
|
|
2623
2666
|
get element() {
|
|
2624
2667
|
return this._element;
|
|
@@ -3096,15 +3139,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3096
3139
|
* Invoked when a Drag'n'Drop event occurs that the component was unable to handle. Exposed for custom Drag'n'Drop functionality.
|
|
3097
3140
|
*/
|
|
3098
3141
|
get onDidDrop() {
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
emitter.dispose = () => {
|
|
3104
|
-
disposable.dispose();
|
|
3105
|
-
emitter.dispose();
|
|
3106
|
-
};
|
|
3107
|
-
return emitter.event;
|
|
3142
|
+
return this.component.onDidDrop;
|
|
3143
|
+
}
|
|
3144
|
+
get onUnhandledDragOverEvent() {
|
|
3145
|
+
return this.component.onUnhandledDragOverEvent;
|
|
3108
3146
|
}
|
|
3109
3147
|
constructor(component) {
|
|
3110
3148
|
this.component = component;
|
|
@@ -4031,6 +4069,28 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4031
4069
|
return 'center';
|
|
4032
4070
|
}
|
|
4033
4071
|
|
|
4072
|
+
const PROPERTY_KEYS_PANEVIEW = (() => {
|
|
4073
|
+
/**
|
|
4074
|
+
* by readong the keys from an empty value object TypeScript will error
|
|
4075
|
+
* when we add or remove new properties to `DockviewOptions`
|
|
4076
|
+
*/
|
|
4077
|
+
const properties = {
|
|
4078
|
+
disableAutoResizing: undefined,
|
|
4079
|
+
disableDnd: undefined,
|
|
4080
|
+
className: undefined,
|
|
4081
|
+
};
|
|
4082
|
+
return Object.keys(properties);
|
|
4083
|
+
})();
|
|
4084
|
+
class PaneviewUnhandledDragOverEvent extends AcceptableEvent {
|
|
4085
|
+
constructor(nativeEvent, position, getData, panel) {
|
|
4086
|
+
super();
|
|
4087
|
+
this.nativeEvent = nativeEvent;
|
|
4088
|
+
this.position = position;
|
|
4089
|
+
this.getData = getData;
|
|
4090
|
+
this.panel = panel;
|
|
4091
|
+
}
|
|
4092
|
+
}
|
|
4093
|
+
|
|
4034
4094
|
class WillFocusEvent extends DockviewEvent {
|
|
4035
4095
|
constructor() {
|
|
4036
4096
|
super();
|
|
@@ -4454,6 +4514,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4454
4514
|
this.accessor = accessor;
|
|
4455
4515
|
this._onDidDrop = new Emitter();
|
|
4456
4516
|
this.onDidDrop = this._onDidDrop.event;
|
|
4517
|
+
this._onUnhandledDragOverEvent = new Emitter();
|
|
4518
|
+
this.onUnhandledDragOverEvent = this._onUnhandledDragOverEvent.event;
|
|
4519
|
+
this.addDisposables(this._onDidDrop, this._onUnhandledDragOverEvent);
|
|
4457
4520
|
if (!disableDnd) {
|
|
4458
4521
|
this.initDragFeatures();
|
|
4459
4522
|
}
|
|
@@ -4480,7 +4543,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4480
4543
|
overlayModel: {
|
|
4481
4544
|
activationSize: { type: 'percentage', value: 50 },
|
|
4482
4545
|
},
|
|
4483
|
-
canDisplayOverlay: (event) => {
|
|
4546
|
+
canDisplayOverlay: (event, position) => {
|
|
4484
4547
|
const data = getPaneData();
|
|
4485
4548
|
if (data) {
|
|
4486
4549
|
if (data.paneId !== this.id &&
|
|
@@ -4488,14 +4551,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4488
4551
|
return true;
|
|
4489
4552
|
}
|
|
4490
4553
|
}
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
getData: getPaneData,
|
|
4495
|
-
panel: this,
|
|
4496
|
-
});
|
|
4497
|
-
}
|
|
4498
|
-
return false;
|
|
4554
|
+
const firedEvent = new PaneviewUnhandledDragOverEvent(event, position, getPaneData, this);
|
|
4555
|
+
this._onUnhandledDragOverEvent.fire(firedEvent);
|
|
4556
|
+
return firedEvent.isAccepted;
|
|
4499
4557
|
},
|
|
4500
4558
|
});
|
|
4501
4559
|
this.addDisposables(this._onDidDrop, this.handler, this.target, this.target.onDrop((event) => {
|
|
@@ -4950,15 +5008,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4950
5008
|
this._element.appendChild(this.leftActionsContainer);
|
|
4951
5009
|
this._element.appendChild(this.voidContainer.element);
|
|
4952
5010
|
this._element.appendChild(this.rightActionsContainer);
|
|
4953
|
-
this.addDisposables(this.
|
|
4954
|
-
if (e.api.group === this.group) {
|
|
4955
|
-
toggleClass(this._element, 'dv-single-tab', this.size === 1);
|
|
4956
|
-
}
|
|
4957
|
-
}), this.accessor.onDidRemovePanel((e) => {
|
|
4958
|
-
if (e.api.group === this.group) {
|
|
4959
|
-
toggleClass(this._element, 'dv-single-tab', this.size === 1);
|
|
4960
|
-
}
|
|
4961
|
-
}), this._onWillShowOverlay, this._onDrop, this._onTabDragStart, this._onGroupDragStart, this.voidContainer, this.voidContainer.onDragStart((event) => {
|
|
5011
|
+
this.addDisposables(this._onWillShowOverlay, this._onDrop, this._onTabDragStart, this._onGroupDragStart, this.voidContainer, this.voidContainer.onDragStart((event) => {
|
|
4962
5012
|
this._onGroupDragStart.fire({
|
|
4963
5013
|
nativeEvent: event,
|
|
4964
5014
|
group: this.group,
|
|
@@ -5003,20 +5053,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5003
5053
|
setActive(_isGroupActive) {
|
|
5004
5054
|
// noop
|
|
5005
5055
|
}
|
|
5006
|
-
addTab(tab, index = this.tabs.length) {
|
|
5007
|
-
if (index < 0 || index > this.tabs.length) {
|
|
5008
|
-
throw new Error('invalid location');
|
|
5009
|
-
}
|
|
5010
|
-
this.tabContainer.insertBefore(tab.value.element, this.tabContainer.children[index]);
|
|
5011
|
-
this.tabs = [
|
|
5012
|
-
...this.tabs.slice(0, index),
|
|
5013
|
-
tab,
|
|
5014
|
-
...this.tabs.slice(index),
|
|
5015
|
-
];
|
|
5016
|
-
if (this.selectedIndex < 0) {
|
|
5017
|
-
this.selectedIndex = index;
|
|
5018
|
-
}
|
|
5019
|
-
}
|
|
5020
5056
|
delete(id) {
|
|
5021
5057
|
const index = this.tabs.findIndex((tab) => tab.value.panel.id === id);
|
|
5022
5058
|
const tabToRemove = this.tabs.splice(index, 1)[0];
|
|
@@ -5024,6 +5060,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5024
5060
|
disposable.dispose();
|
|
5025
5061
|
value.dispose();
|
|
5026
5062
|
value.element.remove();
|
|
5063
|
+
this.updateClassnames();
|
|
5027
5064
|
}
|
|
5028
5065
|
setActivePanel(panel) {
|
|
5029
5066
|
this.tabs.forEach((tab) => {
|
|
@@ -5092,25 +5129,37 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5092
5129
|
}
|
|
5093
5130
|
this.tabs = [];
|
|
5094
5131
|
}
|
|
5132
|
+
addTab(tab, index = this.tabs.length) {
|
|
5133
|
+
if (index < 0 || index > this.tabs.length) {
|
|
5134
|
+
throw new Error('invalid location');
|
|
5135
|
+
}
|
|
5136
|
+
this.tabContainer.insertBefore(tab.value.element, this.tabContainer.children[index]);
|
|
5137
|
+
this.tabs = [
|
|
5138
|
+
...this.tabs.slice(0, index),
|
|
5139
|
+
tab,
|
|
5140
|
+
...this.tabs.slice(index),
|
|
5141
|
+
];
|
|
5142
|
+
if (this.selectedIndex < 0) {
|
|
5143
|
+
this.selectedIndex = index;
|
|
5144
|
+
}
|
|
5145
|
+
this.updateClassnames();
|
|
5146
|
+
}
|
|
5147
|
+
updateClassnames() {
|
|
5148
|
+
toggleClass(this._element, 'dv-single-tab', this.size === 1);
|
|
5149
|
+
}
|
|
5095
5150
|
}
|
|
5096
5151
|
|
|
5097
|
-
class DockviewUnhandledDragOverEvent {
|
|
5098
|
-
get isAccepted() {
|
|
5099
|
-
return this._isAccepted;
|
|
5100
|
-
}
|
|
5152
|
+
class DockviewUnhandledDragOverEvent extends AcceptableEvent {
|
|
5101
5153
|
constructor(nativeEvent, target, position, getData, group) {
|
|
5154
|
+
super();
|
|
5102
5155
|
this.nativeEvent = nativeEvent;
|
|
5103
5156
|
this.target = target;
|
|
5104
5157
|
this.position = position;
|
|
5105
5158
|
this.getData = getData;
|
|
5106
5159
|
this.group = group;
|
|
5107
|
-
this._isAccepted = false;
|
|
5108
|
-
}
|
|
5109
|
-
accept() {
|
|
5110
|
-
this._isAccepted = true;
|
|
5111
5160
|
}
|
|
5112
5161
|
}
|
|
5113
|
-
const
|
|
5162
|
+
const PROPERTY_KEYS_DOCKVIEW = (() => {
|
|
5114
5163
|
/**
|
|
5115
5164
|
* by readong the keys from an empty value object TypeScript will error
|
|
5116
5165
|
* when we add or remove new properties to `DockviewOptions`
|
|
@@ -8979,31 +9028,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8979
9028
|
}
|
|
8980
9029
|
}
|
|
8981
9030
|
|
|
8982
|
-
function createComponent(id, componentName, components = {}, frameworkComponents = {}, createFrameworkComponent, fallback) {
|
|
8983
|
-
const Component = typeof componentName === 'string'
|
|
8984
|
-
? components[componentName]
|
|
8985
|
-
: undefined;
|
|
8986
|
-
const FrameworkComponent = typeof componentName === 'string'
|
|
8987
|
-
? frameworkComponents[componentName]
|
|
8988
|
-
: undefined;
|
|
8989
|
-
if (Component && FrameworkComponent) {
|
|
8990
|
-
throw new Error(`Cannot create '${id}'. component '${componentName}' registered as both a component and frameworkComponent`);
|
|
8991
|
-
}
|
|
8992
|
-
if (FrameworkComponent) {
|
|
8993
|
-
if (!createFrameworkComponent) {
|
|
8994
|
-
throw new Error(`Cannot create '${id}' for framework component '${componentName}'. you must register a frameworkPanelWrapper to use framework components`);
|
|
8995
|
-
}
|
|
8996
|
-
return createFrameworkComponent.createComponent(id, componentName, FrameworkComponent);
|
|
8997
|
-
}
|
|
8998
|
-
if (!Component) {
|
|
8999
|
-
if (fallback) {
|
|
9000
|
-
return fallback();
|
|
9001
|
-
}
|
|
9002
|
-
throw new Error(`Cannot create '${id}', no component '${componentName}' provided`);
|
|
9003
|
-
}
|
|
9004
|
-
return new Component(id, componentName);
|
|
9005
|
-
}
|
|
9006
|
-
|
|
9007
9031
|
class GridviewComponent extends BaseGrid {
|
|
9008
9032
|
get orientation() {
|
|
9009
9033
|
return this.gridview.orientation;
|
|
@@ -9021,10 +9045,13 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9021
9045
|
this._deserializer = value;
|
|
9022
9046
|
}
|
|
9023
9047
|
constructor(parentElement, options) {
|
|
9048
|
+
var _a;
|
|
9024
9049
|
super(parentElement, {
|
|
9025
|
-
proportionalLayout: options.proportionalLayout,
|
|
9050
|
+
proportionalLayout: (_a = options.proportionalLayout) !== null && _a !== void 0 ? _a : true,
|
|
9026
9051
|
orientation: options.orientation,
|
|
9027
|
-
styles: options.
|
|
9052
|
+
styles: options.hideBorders
|
|
9053
|
+
? { separatorBorder: 'transparent' }
|
|
9054
|
+
: undefined,
|
|
9028
9055
|
disableAutoResizing: options.disableAutoResizing,
|
|
9029
9056
|
className: options.className,
|
|
9030
9057
|
});
|
|
@@ -9044,12 +9071,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9044
9071
|
}), this.onDidActiveChange((event) => {
|
|
9045
9072
|
this._onDidActiveGroupChange.fire(event);
|
|
9046
9073
|
}));
|
|
9047
|
-
if (!this.options.components) {
|
|
9048
|
-
this.options.components = {};
|
|
9049
|
-
}
|
|
9050
|
-
if (!this.options.frameworkComponents) {
|
|
9051
|
-
this.options.frameworkComponents = {};
|
|
9052
|
-
}
|
|
9053
9074
|
}
|
|
9054
9075
|
updateOptions(options) {
|
|
9055
9076
|
super.updateOptions(options);
|
|
@@ -9099,14 +9120,11 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9099
9120
|
const height = this.height;
|
|
9100
9121
|
this.gridview.deserialize(grid, {
|
|
9101
9122
|
fromJSON: (node) => {
|
|
9102
|
-
var _a, _b;
|
|
9103
9123
|
const { data } = node;
|
|
9104
|
-
const view =
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
}
|
|
9109
|
-
: undefined);
|
|
9124
|
+
const view = this.options.createComponent({
|
|
9125
|
+
id: data.id,
|
|
9126
|
+
name: data.component,
|
|
9127
|
+
});
|
|
9110
9128
|
queue.push(() => view.init({
|
|
9111
9129
|
params: data.params,
|
|
9112
9130
|
minimumWidth: data.minimumWidth,
|
|
@@ -9184,7 +9202,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9184
9202
|
this.doAddGroup(removedPanel, relativeLocation, options.size);
|
|
9185
9203
|
}
|
|
9186
9204
|
addPanel(options) {
|
|
9187
|
-
var _a, _b, _c, _d
|
|
9205
|
+
var _a, _b, _c, _d;
|
|
9188
9206
|
let relativeLocation = (_a = options.location) !== null && _a !== void 0 ? _a : [0];
|
|
9189
9207
|
if ((_b = options.position) === null || _b === void 0 ? void 0 : _b.referencePanel) {
|
|
9190
9208
|
const referenceGroup = (_c = this._groups.get(options.position.referencePanel)) === null || _c === void 0 ? void 0 : _c.value;
|
|
@@ -9200,14 +9218,12 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9200
9218
|
relativeLocation = getRelativeLocation(this.gridview.orientation, location, target);
|
|
9201
9219
|
}
|
|
9202
9220
|
}
|
|
9203
|
-
const view =
|
|
9204
|
-
|
|
9205
|
-
|
|
9206
|
-
|
|
9207
|
-
}
|
|
9208
|
-
: undefined);
|
|
9221
|
+
const view = this.options.createComponent({
|
|
9222
|
+
id: options.id,
|
|
9223
|
+
name: options.component,
|
|
9224
|
+
});
|
|
9209
9225
|
view.init({
|
|
9210
|
-
params: (
|
|
9226
|
+
params: (_d = options.params) !== null && _d !== void 0 ? _d : {},
|
|
9211
9227
|
minimumWidth: options.minimumWidth,
|
|
9212
9228
|
maximumWidth: options.maximumWidth,
|
|
9213
9229
|
minimumHeight: options.minimumHeight,
|
|
@@ -9335,12 +9351,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9335
9351
|
this._classNames = new Classnames(this.element);
|
|
9336
9352
|
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
9337
9353
|
this._options = options;
|
|
9338
|
-
if (!options.components) {
|
|
9339
|
-
options.components = {};
|
|
9340
|
-
}
|
|
9341
|
-
if (!options.frameworkComponents) {
|
|
9342
|
-
options.frameworkComponents = {};
|
|
9343
|
-
}
|
|
9344
9354
|
this.splitview = new Splitview(this.element, options);
|
|
9345
9355
|
this.addDisposables(this._onDidAddView, this._onDidLayoutfromJSON, this._onDidRemoveView, this._onDidLayoutChange);
|
|
9346
9356
|
}
|
|
@@ -9403,18 +9413,17 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9403
9413
|
return this.panels.find((view) => view.id === id);
|
|
9404
9414
|
}
|
|
9405
9415
|
addPanel(options) {
|
|
9406
|
-
var _a
|
|
9416
|
+
var _a;
|
|
9407
9417
|
if (this._panels.has(options.id)) {
|
|
9408
9418
|
throw new Error(`panel ${options.id} already exists`);
|
|
9409
9419
|
}
|
|
9410
|
-
const view =
|
|
9411
|
-
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
: undefined);
|
|
9420
|
+
const view = this.options.createComponent({
|
|
9421
|
+
id: options.id,
|
|
9422
|
+
name: options.component,
|
|
9423
|
+
});
|
|
9415
9424
|
view.orientation = this.splitview.orientation;
|
|
9416
9425
|
view.init({
|
|
9417
|
-
params: (
|
|
9426
|
+
params: (_a = options.params) !== null && _a !== void 0 ? _a : {},
|
|
9418
9427
|
minimumSize: options.minimumSize,
|
|
9419
9428
|
maximumSize: options.maximumSize,
|
|
9420
9429
|
snap: options.snap,
|
|
@@ -9476,17 +9485,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9476
9485
|
descriptor: {
|
|
9477
9486
|
size,
|
|
9478
9487
|
views: views.map((view) => {
|
|
9479
|
-
var _a, _b;
|
|
9480
9488
|
const data = view.data;
|
|
9481
9489
|
if (this._panels.has(data.id)) {
|
|
9482
9490
|
throw new Error(`panel ${data.id} already exists`);
|
|
9483
9491
|
}
|
|
9484
|
-
const panel =
|
|
9485
|
-
|
|
9486
|
-
|
|
9487
|
-
|
|
9488
|
-
}
|
|
9489
|
-
: undefined);
|
|
9492
|
+
const panel = this.options.createComponent({
|
|
9493
|
+
id: data.id,
|
|
9494
|
+
name: data.component,
|
|
9495
|
+
});
|
|
9490
9496
|
queue.push(() => {
|
|
9491
9497
|
var _a;
|
|
9492
9498
|
panel.init({
|
|
@@ -9669,16 +9675,12 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9669
9675
|
this.onDidAddView = this._onDidAddView.event;
|
|
9670
9676
|
this._onDidRemoveView = new Emitter();
|
|
9671
9677
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
9672
|
-
this.
|
|
9678
|
+
this._onUnhandledDragOverEvent = new Emitter();
|
|
9679
|
+
this.onUnhandledDragOverEvent = this._onUnhandledDragOverEvent.event;
|
|
9680
|
+
this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView, this._onUnhandledDragOverEvent);
|
|
9673
9681
|
this._classNames = new Classnames(this.element);
|
|
9674
9682
|
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
9675
9683
|
this._options = options;
|
|
9676
|
-
if (!options.components) {
|
|
9677
|
-
options.components = {};
|
|
9678
|
-
}
|
|
9679
|
-
if (!options.frameworkComponents) {
|
|
9680
|
-
options.frameworkComponents = {};
|
|
9681
|
-
}
|
|
9682
9684
|
this.paneview = new Paneview(this.element, {
|
|
9683
9685
|
// only allow paneview in the vertical orientation for now
|
|
9684
9686
|
orientation: exports.Orientation.VERTICAL,
|
|
@@ -9703,22 +9705,19 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9703
9705
|
this._options = Object.assign(Object.assign({}, this.options), options);
|
|
9704
9706
|
}
|
|
9705
9707
|
addPanel(options) {
|
|
9706
|
-
var _a
|
|
9707
|
-
const body =
|
|
9708
|
-
|
|
9709
|
-
|
|
9710
|
-
|
|
9711
|
-
: undefined);
|
|
9708
|
+
var _a;
|
|
9709
|
+
const body = this.options.createComponent({
|
|
9710
|
+
id: options.id,
|
|
9711
|
+
name: options.component,
|
|
9712
|
+
});
|
|
9712
9713
|
let header;
|
|
9713
|
-
if (options.headerComponent) {
|
|
9714
|
-
header =
|
|
9715
|
-
|
|
9716
|
-
|
|
9717
|
-
|
|
9718
|
-
}
|
|
9719
|
-
: undefined);
|
|
9714
|
+
if (options.headerComponent && this.options.createHeaderComponent) {
|
|
9715
|
+
header = this.options.createHeaderComponent({
|
|
9716
|
+
id: options.id,
|
|
9717
|
+
name: options.headerComponent,
|
|
9718
|
+
});
|
|
9720
9719
|
}
|
|
9721
|
-
|
|
9720
|
+
if (!header) {
|
|
9722
9721
|
header = new DefaultHeader();
|
|
9723
9722
|
}
|
|
9724
9723
|
const view = new PaneFramework({
|
|
@@ -9736,7 +9735,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9736
9735
|
const size = typeof options.size === 'number' ? options.size : exports.Sizing.Distribute;
|
|
9737
9736
|
const index = typeof options.index === 'number' ? options.index : undefined;
|
|
9738
9737
|
view.init({
|
|
9739
|
-
params: (
|
|
9738
|
+
params: (_a = options.params) !== null && _a !== void 0 ? _a : {},
|
|
9740
9739
|
minimumBodySize: options.minimumBodySize,
|
|
9741
9740
|
maximumBodySize: options.maximumBodySize,
|
|
9742
9741
|
isExpanded: options.isExpanded,
|
|
@@ -9801,24 +9800,20 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9801
9800
|
descriptor: {
|
|
9802
9801
|
size,
|
|
9803
9802
|
views: views.map((view) => {
|
|
9804
|
-
var _a, _b, _c, _d;
|
|
9805
9803
|
const data = view.data;
|
|
9806
|
-
const body =
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
}
|
|
9811
|
-
: undefined);
|
|
9804
|
+
const body = this.options.createComponent({
|
|
9805
|
+
id: data.id,
|
|
9806
|
+
name: data.component,
|
|
9807
|
+
});
|
|
9812
9808
|
let header;
|
|
9813
|
-
if (data.headerComponent
|
|
9814
|
-
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
|
|
9818
|
-
|
|
9819
|
-
: undefined);
|
|
9809
|
+
if (data.headerComponent &&
|
|
9810
|
+
this.options.createHeaderComponent) {
|
|
9811
|
+
header = this.options.createHeaderComponent({
|
|
9812
|
+
id: data.id,
|
|
9813
|
+
name: data.headerComponent,
|
|
9814
|
+
});
|
|
9820
9815
|
}
|
|
9821
|
-
|
|
9816
|
+
if (!header) {
|
|
9822
9817
|
header = new DefaultHeader();
|
|
9823
9818
|
}
|
|
9824
9819
|
const panel = new PaneFramework({
|
|
@@ -9866,9 +9861,11 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9866
9861
|
this.paneview.dispose();
|
|
9867
9862
|
}
|
|
9868
9863
|
doAddPanel(panel) {
|
|
9869
|
-
const disposable = panel.onDidDrop((event) => {
|
|
9864
|
+
const disposable = new CompositeDisposable(panel.onDidDrop((event) => {
|
|
9870
9865
|
this._onDidDrop.fire(event);
|
|
9871
|
-
})
|
|
9866
|
+
}), panel.onUnhandledDragOverEvent((event) => {
|
|
9867
|
+
this._onUnhandledDragOverEvent.fire(event);
|
|
9868
|
+
}));
|
|
9872
9869
|
this._viewDisposables.set(panel.id, disposable);
|
|
9873
9870
|
}
|
|
9874
9871
|
doRemovePanel(panel) {
|
|
@@ -10030,7 +10027,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
10030
10027
|
exports.GridviewApi = GridviewApi;
|
|
10031
10028
|
exports.GridviewComponent = GridviewComponent;
|
|
10032
10029
|
exports.GridviewPanel = GridviewPanel;
|
|
10033
|
-
exports.
|
|
10030
|
+
exports.PROPERTY_KEYS_DOCKVIEW = PROPERTY_KEYS_DOCKVIEW;
|
|
10031
|
+
exports.PROPERTY_KEYS_GRIDVIEW = PROPERTY_KEYS_GRIDVIEW;
|
|
10032
|
+
exports.PROPERTY_KEYS_PANEVIEW = PROPERTY_KEYS_PANEVIEW;
|
|
10033
|
+
exports.PROPERTY_KEYS_SPLITVIEW = PROPERTY_KEYS_SPLITVIEW;
|
|
10034
10034
|
exports.PaneFramework = PaneFramework;
|
|
10035
10035
|
exports.PaneTransfer = PaneTransfer;
|
|
10036
10036
|
exports.PanelTransfer = PanelTransfer;
|
|
@@ -10038,6 +10038,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
10038
10038
|
exports.PaneviewApi = PaneviewApi;
|
|
10039
10039
|
exports.PaneviewComponent = PaneviewComponent;
|
|
10040
10040
|
exports.PaneviewPanel = PaneviewPanel;
|
|
10041
|
+
exports.PaneviewUnhandledDragOverEvent = PaneviewUnhandledDragOverEvent;
|
|
10041
10042
|
exports.Splitview = Splitview;
|
|
10042
10043
|
exports.SplitviewApi = SplitviewApi;
|
|
10043
10044
|
exports.SplitviewComponent = SplitviewComponent;
|