dockview-core 2.1.4 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/baseComponentGridview.js +1 -2
- 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 +161 -161
- 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 +161 -161
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +161 -161
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +157 -161
- 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 +161 -161
- 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 +161 -161
- 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/baseComponentGridview.js +1 -2
- 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.1
|
|
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;
|
|
@@ -2728,7 +2771,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2728
2771
|
}
|
|
2729
2772
|
constructor(parentElement, options) {
|
|
2730
2773
|
var _a;
|
|
2731
|
-
super(
|
|
2774
|
+
super(parentElement, options.disableAutoResizing);
|
|
2732
2775
|
this._id = nextLayoutId$1.next();
|
|
2733
2776
|
this._groups = new Map();
|
|
2734
2777
|
this._onDidRemove = new Emitter();
|
|
@@ -2747,7 +2790,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2747
2790
|
this.element.style.width = '100%';
|
|
2748
2791
|
this._classNames = new Classnames(this.element);
|
|
2749
2792
|
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
2750
|
-
parentElement.appendChild(this.element);
|
|
2751
2793
|
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation, options.locked, options.margin);
|
|
2752
2794
|
this.gridview.locked = !!options.locked;
|
|
2753
2795
|
this.element.appendChild(this.gridview.element);
|
|
@@ -3096,15 +3138,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3096
3138
|
* Invoked when a Drag'n'Drop event occurs that the component was unable to handle. Exposed for custom Drag'n'Drop functionality.
|
|
3097
3139
|
*/
|
|
3098
3140
|
get onDidDrop() {
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
emitter.dispose = () => {
|
|
3104
|
-
disposable.dispose();
|
|
3105
|
-
emitter.dispose();
|
|
3106
|
-
};
|
|
3107
|
-
return emitter.event;
|
|
3141
|
+
return this.component.onDidDrop;
|
|
3142
|
+
}
|
|
3143
|
+
get onUnhandledDragOverEvent() {
|
|
3144
|
+
return this.component.onUnhandledDragOverEvent;
|
|
3108
3145
|
}
|
|
3109
3146
|
constructor(component) {
|
|
3110
3147
|
this.component = component;
|
|
@@ -4031,6 +4068,28 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4031
4068
|
return 'center';
|
|
4032
4069
|
}
|
|
4033
4070
|
|
|
4071
|
+
const PROPERTY_KEYS_PANEVIEW = (() => {
|
|
4072
|
+
/**
|
|
4073
|
+
* by readong the keys from an empty value object TypeScript will error
|
|
4074
|
+
* when we add or remove new properties to `DockviewOptions`
|
|
4075
|
+
*/
|
|
4076
|
+
const properties = {
|
|
4077
|
+
disableAutoResizing: undefined,
|
|
4078
|
+
disableDnd: undefined,
|
|
4079
|
+
className: undefined,
|
|
4080
|
+
};
|
|
4081
|
+
return Object.keys(properties);
|
|
4082
|
+
})();
|
|
4083
|
+
class PaneviewUnhandledDragOverEvent extends AcceptableEvent {
|
|
4084
|
+
constructor(nativeEvent, position, getData, panel) {
|
|
4085
|
+
super();
|
|
4086
|
+
this.nativeEvent = nativeEvent;
|
|
4087
|
+
this.position = position;
|
|
4088
|
+
this.getData = getData;
|
|
4089
|
+
this.panel = panel;
|
|
4090
|
+
}
|
|
4091
|
+
}
|
|
4092
|
+
|
|
4034
4093
|
class WillFocusEvent extends DockviewEvent {
|
|
4035
4094
|
constructor() {
|
|
4036
4095
|
super();
|
|
@@ -4454,6 +4513,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4454
4513
|
this.accessor = accessor;
|
|
4455
4514
|
this._onDidDrop = new Emitter();
|
|
4456
4515
|
this.onDidDrop = this._onDidDrop.event;
|
|
4516
|
+
this._onUnhandledDragOverEvent = new Emitter();
|
|
4517
|
+
this.onUnhandledDragOverEvent = this._onUnhandledDragOverEvent.event;
|
|
4518
|
+
this.addDisposables(this._onDidDrop, this._onUnhandledDragOverEvent);
|
|
4457
4519
|
if (!disableDnd) {
|
|
4458
4520
|
this.initDragFeatures();
|
|
4459
4521
|
}
|
|
@@ -4480,7 +4542,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4480
4542
|
overlayModel: {
|
|
4481
4543
|
activationSize: { type: 'percentage', value: 50 },
|
|
4482
4544
|
},
|
|
4483
|
-
canDisplayOverlay: (event) => {
|
|
4545
|
+
canDisplayOverlay: (event, position) => {
|
|
4484
4546
|
const data = getPaneData();
|
|
4485
4547
|
if (data) {
|
|
4486
4548
|
if (data.paneId !== this.id &&
|
|
@@ -4488,14 +4550,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4488
4550
|
return true;
|
|
4489
4551
|
}
|
|
4490
4552
|
}
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
getData: getPaneData,
|
|
4495
|
-
panel: this,
|
|
4496
|
-
});
|
|
4497
|
-
}
|
|
4498
|
-
return false;
|
|
4553
|
+
const firedEvent = new PaneviewUnhandledDragOverEvent(event, position, getPaneData, this);
|
|
4554
|
+
this._onUnhandledDragOverEvent.fire(firedEvent);
|
|
4555
|
+
return firedEvent.isAccepted;
|
|
4499
4556
|
},
|
|
4500
4557
|
});
|
|
4501
4558
|
this.addDisposables(this._onDidDrop, this.handler, this.target, this.target.onDrop((event) => {
|
|
@@ -4950,15 +5007,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4950
5007
|
this._element.appendChild(this.leftActionsContainer);
|
|
4951
5008
|
this._element.appendChild(this.voidContainer.element);
|
|
4952
5009
|
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) => {
|
|
5010
|
+
this.addDisposables(this._onWillShowOverlay, this._onDrop, this._onTabDragStart, this._onGroupDragStart, this.voidContainer, this.voidContainer.onDragStart((event) => {
|
|
4962
5011
|
this._onGroupDragStart.fire({
|
|
4963
5012
|
nativeEvent: event,
|
|
4964
5013
|
group: this.group,
|
|
@@ -5003,20 +5052,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5003
5052
|
setActive(_isGroupActive) {
|
|
5004
5053
|
// noop
|
|
5005
5054
|
}
|
|
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
5055
|
delete(id) {
|
|
5021
5056
|
const index = this.tabs.findIndex((tab) => tab.value.panel.id === id);
|
|
5022
5057
|
const tabToRemove = this.tabs.splice(index, 1)[0];
|
|
@@ -5024,6 +5059,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5024
5059
|
disposable.dispose();
|
|
5025
5060
|
value.dispose();
|
|
5026
5061
|
value.element.remove();
|
|
5062
|
+
this.updateClassnames();
|
|
5027
5063
|
}
|
|
5028
5064
|
setActivePanel(panel) {
|
|
5029
5065
|
this.tabs.forEach((tab) => {
|
|
@@ -5092,25 +5128,37 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5092
5128
|
}
|
|
5093
5129
|
this.tabs = [];
|
|
5094
5130
|
}
|
|
5131
|
+
addTab(tab, index = this.tabs.length) {
|
|
5132
|
+
if (index < 0 || index > this.tabs.length) {
|
|
5133
|
+
throw new Error('invalid location');
|
|
5134
|
+
}
|
|
5135
|
+
this.tabContainer.insertBefore(tab.value.element, this.tabContainer.children[index]);
|
|
5136
|
+
this.tabs = [
|
|
5137
|
+
...this.tabs.slice(0, index),
|
|
5138
|
+
tab,
|
|
5139
|
+
...this.tabs.slice(index),
|
|
5140
|
+
];
|
|
5141
|
+
if (this.selectedIndex < 0) {
|
|
5142
|
+
this.selectedIndex = index;
|
|
5143
|
+
}
|
|
5144
|
+
this.updateClassnames();
|
|
5145
|
+
}
|
|
5146
|
+
updateClassnames() {
|
|
5147
|
+
toggleClass(this._element, 'dv-single-tab', this.size === 1);
|
|
5148
|
+
}
|
|
5095
5149
|
}
|
|
5096
5150
|
|
|
5097
|
-
class DockviewUnhandledDragOverEvent {
|
|
5098
|
-
get isAccepted() {
|
|
5099
|
-
return this._isAccepted;
|
|
5100
|
-
}
|
|
5151
|
+
class DockviewUnhandledDragOverEvent extends AcceptableEvent {
|
|
5101
5152
|
constructor(nativeEvent, target, position, getData, group) {
|
|
5153
|
+
super();
|
|
5102
5154
|
this.nativeEvent = nativeEvent;
|
|
5103
5155
|
this.target = target;
|
|
5104
5156
|
this.position = position;
|
|
5105
5157
|
this.getData = getData;
|
|
5106
5158
|
this.group = group;
|
|
5107
|
-
this._isAccepted = false;
|
|
5108
|
-
}
|
|
5109
|
-
accept() {
|
|
5110
|
-
this._isAccepted = true;
|
|
5111
5159
|
}
|
|
5112
5160
|
}
|
|
5113
|
-
const
|
|
5161
|
+
const PROPERTY_KEYS_DOCKVIEW = (() => {
|
|
5114
5162
|
/**
|
|
5115
5163
|
* by readong the keys from an empty value object TypeScript will error
|
|
5116
5164
|
* when we add or remove new properties to `DockviewOptions`
|
|
@@ -8979,31 +9027,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8979
9027
|
}
|
|
8980
9028
|
}
|
|
8981
9029
|
|
|
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
9030
|
class GridviewComponent extends BaseGrid {
|
|
9008
9031
|
get orientation() {
|
|
9009
9032
|
return this.gridview.orientation;
|
|
@@ -9021,10 +9044,13 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9021
9044
|
this._deserializer = value;
|
|
9022
9045
|
}
|
|
9023
9046
|
constructor(parentElement, options) {
|
|
9047
|
+
var _a;
|
|
9024
9048
|
super(parentElement, {
|
|
9025
|
-
proportionalLayout: options.proportionalLayout,
|
|
9049
|
+
proportionalLayout: (_a = options.proportionalLayout) !== null && _a !== void 0 ? _a : true,
|
|
9026
9050
|
orientation: options.orientation,
|
|
9027
|
-
styles: options.
|
|
9051
|
+
styles: options.hideBorders
|
|
9052
|
+
? { separatorBorder: 'transparent' }
|
|
9053
|
+
: undefined,
|
|
9028
9054
|
disableAutoResizing: options.disableAutoResizing,
|
|
9029
9055
|
className: options.className,
|
|
9030
9056
|
});
|
|
@@ -9044,12 +9070,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9044
9070
|
}), this.onDidActiveChange((event) => {
|
|
9045
9071
|
this._onDidActiveGroupChange.fire(event);
|
|
9046
9072
|
}));
|
|
9047
|
-
if (!this.options.components) {
|
|
9048
|
-
this.options.components = {};
|
|
9049
|
-
}
|
|
9050
|
-
if (!this.options.frameworkComponents) {
|
|
9051
|
-
this.options.frameworkComponents = {};
|
|
9052
|
-
}
|
|
9053
9073
|
}
|
|
9054
9074
|
updateOptions(options) {
|
|
9055
9075
|
super.updateOptions(options);
|
|
@@ -9099,14 +9119,11 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9099
9119
|
const height = this.height;
|
|
9100
9120
|
this.gridview.deserialize(grid, {
|
|
9101
9121
|
fromJSON: (node) => {
|
|
9102
|
-
var _a, _b;
|
|
9103
9122
|
const { data } = node;
|
|
9104
|
-
const view =
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
}
|
|
9109
|
-
: undefined);
|
|
9123
|
+
const view = this.options.createComponent({
|
|
9124
|
+
id: data.id,
|
|
9125
|
+
name: data.component,
|
|
9126
|
+
});
|
|
9110
9127
|
queue.push(() => view.init({
|
|
9111
9128
|
params: data.params,
|
|
9112
9129
|
minimumWidth: data.minimumWidth,
|
|
@@ -9184,7 +9201,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9184
9201
|
this.doAddGroup(removedPanel, relativeLocation, options.size);
|
|
9185
9202
|
}
|
|
9186
9203
|
addPanel(options) {
|
|
9187
|
-
var _a, _b, _c, _d
|
|
9204
|
+
var _a, _b, _c, _d;
|
|
9188
9205
|
let relativeLocation = (_a = options.location) !== null && _a !== void 0 ? _a : [0];
|
|
9189
9206
|
if ((_b = options.position) === null || _b === void 0 ? void 0 : _b.referencePanel) {
|
|
9190
9207
|
const referenceGroup = (_c = this._groups.get(options.position.referencePanel)) === null || _c === void 0 ? void 0 : _c.value;
|
|
@@ -9200,14 +9217,12 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9200
9217
|
relativeLocation = getRelativeLocation(this.gridview.orientation, location, target);
|
|
9201
9218
|
}
|
|
9202
9219
|
}
|
|
9203
|
-
const view =
|
|
9204
|
-
|
|
9205
|
-
|
|
9206
|
-
|
|
9207
|
-
}
|
|
9208
|
-
: undefined);
|
|
9220
|
+
const view = this.options.createComponent({
|
|
9221
|
+
id: options.id,
|
|
9222
|
+
name: options.component,
|
|
9223
|
+
});
|
|
9209
9224
|
view.init({
|
|
9210
|
-
params: (
|
|
9225
|
+
params: (_d = options.params) !== null && _d !== void 0 ? _d : {},
|
|
9211
9226
|
minimumWidth: options.minimumWidth,
|
|
9212
9227
|
maximumWidth: options.maximumWidth,
|
|
9213
9228
|
minimumHeight: options.minimumHeight,
|
|
@@ -9335,12 +9350,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9335
9350
|
this._classNames = new Classnames(this.element);
|
|
9336
9351
|
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
9337
9352
|
this._options = options;
|
|
9338
|
-
if (!options.components) {
|
|
9339
|
-
options.components = {};
|
|
9340
|
-
}
|
|
9341
|
-
if (!options.frameworkComponents) {
|
|
9342
|
-
options.frameworkComponents = {};
|
|
9343
|
-
}
|
|
9344
9353
|
this.splitview = new Splitview(this.element, options);
|
|
9345
9354
|
this.addDisposables(this._onDidAddView, this._onDidLayoutfromJSON, this._onDidRemoveView, this._onDidLayoutChange);
|
|
9346
9355
|
}
|
|
@@ -9403,18 +9412,17 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9403
9412
|
return this.panels.find((view) => view.id === id);
|
|
9404
9413
|
}
|
|
9405
9414
|
addPanel(options) {
|
|
9406
|
-
var _a
|
|
9415
|
+
var _a;
|
|
9407
9416
|
if (this._panels.has(options.id)) {
|
|
9408
9417
|
throw new Error(`panel ${options.id} already exists`);
|
|
9409
9418
|
}
|
|
9410
|
-
const view =
|
|
9411
|
-
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
: undefined);
|
|
9419
|
+
const view = this.options.createComponent({
|
|
9420
|
+
id: options.id,
|
|
9421
|
+
name: options.component,
|
|
9422
|
+
});
|
|
9415
9423
|
view.orientation = this.splitview.orientation;
|
|
9416
9424
|
view.init({
|
|
9417
|
-
params: (
|
|
9425
|
+
params: (_a = options.params) !== null && _a !== void 0 ? _a : {},
|
|
9418
9426
|
minimumSize: options.minimumSize,
|
|
9419
9427
|
maximumSize: options.maximumSize,
|
|
9420
9428
|
snap: options.snap,
|
|
@@ -9476,17 +9484,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9476
9484
|
descriptor: {
|
|
9477
9485
|
size,
|
|
9478
9486
|
views: views.map((view) => {
|
|
9479
|
-
var _a, _b;
|
|
9480
9487
|
const data = view.data;
|
|
9481
9488
|
if (this._panels.has(data.id)) {
|
|
9482
9489
|
throw new Error(`panel ${data.id} already exists`);
|
|
9483
9490
|
}
|
|
9484
|
-
const panel =
|
|
9485
|
-
|
|
9486
|
-
|
|
9487
|
-
|
|
9488
|
-
}
|
|
9489
|
-
: undefined);
|
|
9491
|
+
const panel = this.options.createComponent({
|
|
9492
|
+
id: data.id,
|
|
9493
|
+
name: data.component,
|
|
9494
|
+
});
|
|
9490
9495
|
queue.push(() => {
|
|
9491
9496
|
var _a;
|
|
9492
9497
|
panel.init({
|
|
@@ -9669,16 +9674,12 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9669
9674
|
this.onDidAddView = this._onDidAddView.event;
|
|
9670
9675
|
this._onDidRemoveView = new Emitter();
|
|
9671
9676
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
9672
|
-
this.
|
|
9677
|
+
this._onUnhandledDragOverEvent = new Emitter();
|
|
9678
|
+
this.onUnhandledDragOverEvent = this._onUnhandledDragOverEvent.event;
|
|
9679
|
+
this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView, this._onUnhandledDragOverEvent);
|
|
9673
9680
|
this._classNames = new Classnames(this.element);
|
|
9674
9681
|
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
9675
9682
|
this._options = options;
|
|
9676
|
-
if (!options.components) {
|
|
9677
|
-
options.components = {};
|
|
9678
|
-
}
|
|
9679
|
-
if (!options.frameworkComponents) {
|
|
9680
|
-
options.frameworkComponents = {};
|
|
9681
|
-
}
|
|
9682
9683
|
this.paneview = new Paneview(this.element, {
|
|
9683
9684
|
// only allow paneview in the vertical orientation for now
|
|
9684
9685
|
orientation: exports.Orientation.VERTICAL,
|
|
@@ -9703,22 +9704,19 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9703
9704
|
this._options = Object.assign(Object.assign({}, this.options), options);
|
|
9704
9705
|
}
|
|
9705
9706
|
addPanel(options) {
|
|
9706
|
-
var _a
|
|
9707
|
-
const body =
|
|
9708
|
-
|
|
9709
|
-
|
|
9710
|
-
|
|
9711
|
-
: undefined);
|
|
9707
|
+
var _a;
|
|
9708
|
+
const body = this.options.createComponent({
|
|
9709
|
+
id: options.id,
|
|
9710
|
+
name: options.component,
|
|
9711
|
+
});
|
|
9712
9712
|
let header;
|
|
9713
|
-
if (options.headerComponent) {
|
|
9714
|
-
header =
|
|
9715
|
-
|
|
9716
|
-
|
|
9717
|
-
|
|
9718
|
-
}
|
|
9719
|
-
: undefined);
|
|
9713
|
+
if (options.headerComponent && this.options.createHeaderComponent) {
|
|
9714
|
+
header = this.options.createHeaderComponent({
|
|
9715
|
+
id: options.id,
|
|
9716
|
+
name: options.headerComponent,
|
|
9717
|
+
});
|
|
9720
9718
|
}
|
|
9721
|
-
|
|
9719
|
+
if (!header) {
|
|
9722
9720
|
header = new DefaultHeader();
|
|
9723
9721
|
}
|
|
9724
9722
|
const view = new PaneFramework({
|
|
@@ -9736,7 +9734,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9736
9734
|
const size = typeof options.size === 'number' ? options.size : exports.Sizing.Distribute;
|
|
9737
9735
|
const index = typeof options.index === 'number' ? options.index : undefined;
|
|
9738
9736
|
view.init({
|
|
9739
|
-
params: (
|
|
9737
|
+
params: (_a = options.params) !== null && _a !== void 0 ? _a : {},
|
|
9740
9738
|
minimumBodySize: options.minimumBodySize,
|
|
9741
9739
|
maximumBodySize: options.maximumBodySize,
|
|
9742
9740
|
isExpanded: options.isExpanded,
|
|
@@ -9801,24 +9799,20 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9801
9799
|
descriptor: {
|
|
9802
9800
|
size,
|
|
9803
9801
|
views: views.map((view) => {
|
|
9804
|
-
var _a, _b, _c, _d;
|
|
9805
9802
|
const data = view.data;
|
|
9806
|
-
const body =
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
}
|
|
9811
|
-
: undefined);
|
|
9803
|
+
const body = this.options.createComponent({
|
|
9804
|
+
id: data.id,
|
|
9805
|
+
name: data.component,
|
|
9806
|
+
});
|
|
9812
9807
|
let header;
|
|
9813
|
-
if (data.headerComponent
|
|
9814
|
-
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
|
|
9818
|
-
|
|
9819
|
-
: undefined);
|
|
9808
|
+
if (data.headerComponent &&
|
|
9809
|
+
this.options.createHeaderComponent) {
|
|
9810
|
+
header = this.options.createHeaderComponent({
|
|
9811
|
+
id: data.id,
|
|
9812
|
+
name: data.headerComponent,
|
|
9813
|
+
});
|
|
9820
9814
|
}
|
|
9821
|
-
|
|
9815
|
+
if (!header) {
|
|
9822
9816
|
header = new DefaultHeader();
|
|
9823
9817
|
}
|
|
9824
9818
|
const panel = new PaneFramework({
|
|
@@ -9866,9 +9860,11 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9866
9860
|
this.paneview.dispose();
|
|
9867
9861
|
}
|
|
9868
9862
|
doAddPanel(panel) {
|
|
9869
|
-
const disposable = panel.onDidDrop((event) => {
|
|
9863
|
+
const disposable = new CompositeDisposable(panel.onDidDrop((event) => {
|
|
9870
9864
|
this._onDidDrop.fire(event);
|
|
9871
|
-
})
|
|
9865
|
+
}), panel.onUnhandledDragOverEvent((event) => {
|
|
9866
|
+
this._onUnhandledDragOverEvent.fire(event);
|
|
9867
|
+
}));
|
|
9872
9868
|
this._viewDisposables.set(panel.id, disposable);
|
|
9873
9869
|
}
|
|
9874
9870
|
doRemovePanel(panel) {
|
|
@@ -10030,7 +10026,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
10030
10026
|
exports.GridviewApi = GridviewApi;
|
|
10031
10027
|
exports.GridviewComponent = GridviewComponent;
|
|
10032
10028
|
exports.GridviewPanel = GridviewPanel;
|
|
10033
|
-
exports.
|
|
10029
|
+
exports.PROPERTY_KEYS_DOCKVIEW = PROPERTY_KEYS_DOCKVIEW;
|
|
10030
|
+
exports.PROPERTY_KEYS_GRIDVIEW = PROPERTY_KEYS_GRIDVIEW;
|
|
10031
|
+
exports.PROPERTY_KEYS_PANEVIEW = PROPERTY_KEYS_PANEVIEW;
|
|
10032
|
+
exports.PROPERTY_KEYS_SPLITVIEW = PROPERTY_KEYS_SPLITVIEW;
|
|
10034
10033
|
exports.PaneFramework = PaneFramework;
|
|
10035
10034
|
exports.PaneTransfer = PaneTransfer;
|
|
10036
10035
|
exports.PanelTransfer = PanelTransfer;
|
|
@@ -10038,6 +10037,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
10038
10037
|
exports.PaneviewApi = PaneviewApi;
|
|
10039
10038
|
exports.PaneviewComponent = PaneviewComponent;
|
|
10040
10039
|
exports.PaneviewPanel = PaneviewPanel;
|
|
10040
|
+
exports.PaneviewUnhandledDragOverEvent = PaneviewUnhandledDragOverEvent;
|
|
10041
10041
|
exports.Splitview = Splitview;
|
|
10042
10042
|
exports.SplitviewApi = SplitviewApi;
|
|
10043
10043
|
exports.SplitviewComponent = SplitviewComponent;
|