dockview-core 2.1.3 → 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/dockviewComponent.d.ts +0 -1
- package/dist/cjs/dockview/dockviewComponent.js +8 -13
- 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 +168 -172
- 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 +168 -172
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +168 -172
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +164 -172
- 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 +168 -172
- 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 +168 -172
- 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/dockviewComponent.d.ts +0 -1
- package/dist/esm/dockview/dockviewComponent.js +8 -13
- 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`
|
|
@@ -7633,10 +7682,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7633
7682
|
this._api = new DockviewApi(this);
|
|
7634
7683
|
this.updateWatermark();
|
|
7635
7684
|
}
|
|
7636
|
-
dispose() {
|
|
7637
|
-
this.clear(); // explicitly clear the layout before cleaning up
|
|
7638
|
-
super.dispose();
|
|
7639
|
-
}
|
|
7640
7685
|
setVisible(panel, visible) {
|
|
7641
7686
|
switch (panel.api.location.type) {
|
|
7642
7687
|
case 'grid':
|
|
@@ -7820,30 +7865,29 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7820
7865
|
}
|
|
7821
7866
|
}
|
|
7822
7867
|
else if (this.getPanel(group.id)) {
|
|
7823
|
-
|
|
7868
|
+
group.model.renderContainer =
|
|
7869
|
+
this.overlayRenderContainer;
|
|
7870
|
+
returnedGroup = group;
|
|
7824
7871
|
if (floatingBox) {
|
|
7825
|
-
this.addFloatingGroup(
|
|
7872
|
+
this.addFloatingGroup(group, {
|
|
7826
7873
|
height: floatingBox.height,
|
|
7827
7874
|
width: floatingBox.width,
|
|
7828
7875
|
position: floatingBox,
|
|
7829
7876
|
});
|
|
7830
7877
|
}
|
|
7831
7878
|
else {
|
|
7832
|
-
this.doRemoveGroup(
|
|
7879
|
+
this.doRemoveGroup(group, {
|
|
7833
7880
|
skipDispose: true,
|
|
7834
7881
|
skipActive: true,
|
|
7835
7882
|
skipPopoutReturn: true,
|
|
7836
7883
|
});
|
|
7837
|
-
|
|
7838
|
-
this.overlayRenderContainer;
|
|
7839
|
-
removedGroup.model.location = { type: 'grid' };
|
|
7840
|
-
returnedGroup = removedGroup;
|
|
7884
|
+
group.model.location = { type: 'grid' };
|
|
7841
7885
|
this.movingLock(() => {
|
|
7842
7886
|
// suppress group add events since the group already exists
|
|
7843
|
-
this.doAddGroup(
|
|
7887
|
+
this.doAddGroup(group, [0]);
|
|
7844
7888
|
});
|
|
7845
7889
|
}
|
|
7846
|
-
this.doSetGroupAndPanelActive(
|
|
7890
|
+
this.doSetGroupAndPanelActive(group);
|
|
7847
7891
|
}
|
|
7848
7892
|
}));
|
|
7849
7893
|
this._popoutGroups.push(value);
|
|
@@ -8984,31 +9028,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8984
9028
|
}
|
|
8985
9029
|
}
|
|
8986
9030
|
|
|
8987
|
-
function createComponent(id, componentName, components = {}, frameworkComponents = {}, createFrameworkComponent, fallback) {
|
|
8988
|
-
const Component = typeof componentName === 'string'
|
|
8989
|
-
? components[componentName]
|
|
8990
|
-
: undefined;
|
|
8991
|
-
const FrameworkComponent = typeof componentName === 'string'
|
|
8992
|
-
? frameworkComponents[componentName]
|
|
8993
|
-
: undefined;
|
|
8994
|
-
if (Component && FrameworkComponent) {
|
|
8995
|
-
throw new Error(`Cannot create '${id}'. component '${componentName}' registered as both a component and frameworkComponent`);
|
|
8996
|
-
}
|
|
8997
|
-
if (FrameworkComponent) {
|
|
8998
|
-
if (!createFrameworkComponent) {
|
|
8999
|
-
throw new Error(`Cannot create '${id}' for framework component '${componentName}'. you must register a frameworkPanelWrapper to use framework components`);
|
|
9000
|
-
}
|
|
9001
|
-
return createFrameworkComponent.createComponent(id, componentName, FrameworkComponent);
|
|
9002
|
-
}
|
|
9003
|
-
if (!Component) {
|
|
9004
|
-
if (fallback) {
|
|
9005
|
-
return fallback();
|
|
9006
|
-
}
|
|
9007
|
-
throw new Error(`Cannot create '${id}', no component '${componentName}' provided`);
|
|
9008
|
-
}
|
|
9009
|
-
return new Component(id, componentName);
|
|
9010
|
-
}
|
|
9011
|
-
|
|
9012
9031
|
class GridviewComponent extends BaseGrid {
|
|
9013
9032
|
get orientation() {
|
|
9014
9033
|
return this.gridview.orientation;
|
|
@@ -9026,10 +9045,13 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9026
9045
|
this._deserializer = value;
|
|
9027
9046
|
}
|
|
9028
9047
|
constructor(parentElement, options) {
|
|
9048
|
+
var _a;
|
|
9029
9049
|
super(parentElement, {
|
|
9030
|
-
proportionalLayout: options.proportionalLayout,
|
|
9050
|
+
proportionalLayout: (_a = options.proportionalLayout) !== null && _a !== void 0 ? _a : true,
|
|
9031
9051
|
orientation: options.orientation,
|
|
9032
|
-
styles: options.
|
|
9052
|
+
styles: options.hideBorders
|
|
9053
|
+
? { separatorBorder: 'transparent' }
|
|
9054
|
+
: undefined,
|
|
9033
9055
|
disableAutoResizing: options.disableAutoResizing,
|
|
9034
9056
|
className: options.className,
|
|
9035
9057
|
});
|
|
@@ -9049,12 +9071,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9049
9071
|
}), this.onDidActiveChange((event) => {
|
|
9050
9072
|
this._onDidActiveGroupChange.fire(event);
|
|
9051
9073
|
}));
|
|
9052
|
-
if (!this.options.components) {
|
|
9053
|
-
this.options.components = {};
|
|
9054
|
-
}
|
|
9055
|
-
if (!this.options.frameworkComponents) {
|
|
9056
|
-
this.options.frameworkComponents = {};
|
|
9057
|
-
}
|
|
9058
9074
|
}
|
|
9059
9075
|
updateOptions(options) {
|
|
9060
9076
|
super.updateOptions(options);
|
|
@@ -9104,14 +9120,11 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9104
9120
|
const height = this.height;
|
|
9105
9121
|
this.gridview.deserialize(grid, {
|
|
9106
9122
|
fromJSON: (node) => {
|
|
9107
|
-
var _a, _b;
|
|
9108
9123
|
const { data } = node;
|
|
9109
|
-
const view =
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
}
|
|
9114
|
-
: undefined);
|
|
9124
|
+
const view = this.options.createComponent({
|
|
9125
|
+
id: data.id,
|
|
9126
|
+
name: data.component,
|
|
9127
|
+
});
|
|
9115
9128
|
queue.push(() => view.init({
|
|
9116
9129
|
params: data.params,
|
|
9117
9130
|
minimumWidth: data.minimumWidth,
|
|
@@ -9189,7 +9202,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9189
9202
|
this.doAddGroup(removedPanel, relativeLocation, options.size);
|
|
9190
9203
|
}
|
|
9191
9204
|
addPanel(options) {
|
|
9192
|
-
var _a, _b, _c, _d
|
|
9205
|
+
var _a, _b, _c, _d;
|
|
9193
9206
|
let relativeLocation = (_a = options.location) !== null && _a !== void 0 ? _a : [0];
|
|
9194
9207
|
if ((_b = options.position) === null || _b === void 0 ? void 0 : _b.referencePanel) {
|
|
9195
9208
|
const referenceGroup = (_c = this._groups.get(options.position.referencePanel)) === null || _c === void 0 ? void 0 : _c.value;
|
|
@@ -9205,14 +9218,12 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9205
9218
|
relativeLocation = getRelativeLocation(this.gridview.orientation, location, target);
|
|
9206
9219
|
}
|
|
9207
9220
|
}
|
|
9208
|
-
const view =
|
|
9209
|
-
|
|
9210
|
-
|
|
9211
|
-
|
|
9212
|
-
}
|
|
9213
|
-
: undefined);
|
|
9221
|
+
const view = this.options.createComponent({
|
|
9222
|
+
id: options.id,
|
|
9223
|
+
name: options.component,
|
|
9224
|
+
});
|
|
9214
9225
|
view.init({
|
|
9215
|
-
params: (
|
|
9226
|
+
params: (_d = options.params) !== null && _d !== void 0 ? _d : {},
|
|
9216
9227
|
minimumWidth: options.minimumWidth,
|
|
9217
9228
|
maximumWidth: options.maximumWidth,
|
|
9218
9229
|
minimumHeight: options.minimumHeight,
|
|
@@ -9340,12 +9351,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9340
9351
|
this._classNames = new Classnames(this.element);
|
|
9341
9352
|
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
9342
9353
|
this._options = options;
|
|
9343
|
-
if (!options.components) {
|
|
9344
|
-
options.components = {};
|
|
9345
|
-
}
|
|
9346
|
-
if (!options.frameworkComponents) {
|
|
9347
|
-
options.frameworkComponents = {};
|
|
9348
|
-
}
|
|
9349
9354
|
this.splitview = new Splitview(this.element, options);
|
|
9350
9355
|
this.addDisposables(this._onDidAddView, this._onDidLayoutfromJSON, this._onDidRemoveView, this._onDidLayoutChange);
|
|
9351
9356
|
}
|
|
@@ -9408,18 +9413,17 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9408
9413
|
return this.panels.find((view) => view.id === id);
|
|
9409
9414
|
}
|
|
9410
9415
|
addPanel(options) {
|
|
9411
|
-
var _a
|
|
9416
|
+
var _a;
|
|
9412
9417
|
if (this._panels.has(options.id)) {
|
|
9413
9418
|
throw new Error(`panel ${options.id} already exists`);
|
|
9414
9419
|
}
|
|
9415
|
-
const view =
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
: undefined);
|
|
9420
|
+
const view = this.options.createComponent({
|
|
9421
|
+
id: options.id,
|
|
9422
|
+
name: options.component,
|
|
9423
|
+
});
|
|
9420
9424
|
view.orientation = this.splitview.orientation;
|
|
9421
9425
|
view.init({
|
|
9422
|
-
params: (
|
|
9426
|
+
params: (_a = options.params) !== null && _a !== void 0 ? _a : {},
|
|
9423
9427
|
minimumSize: options.minimumSize,
|
|
9424
9428
|
maximumSize: options.maximumSize,
|
|
9425
9429
|
snap: options.snap,
|
|
@@ -9481,17 +9485,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9481
9485
|
descriptor: {
|
|
9482
9486
|
size,
|
|
9483
9487
|
views: views.map((view) => {
|
|
9484
|
-
var _a, _b;
|
|
9485
9488
|
const data = view.data;
|
|
9486
9489
|
if (this._panels.has(data.id)) {
|
|
9487
9490
|
throw new Error(`panel ${data.id} already exists`);
|
|
9488
9491
|
}
|
|
9489
|
-
const panel =
|
|
9490
|
-
|
|
9491
|
-
|
|
9492
|
-
|
|
9493
|
-
}
|
|
9494
|
-
: undefined);
|
|
9492
|
+
const panel = this.options.createComponent({
|
|
9493
|
+
id: data.id,
|
|
9494
|
+
name: data.component,
|
|
9495
|
+
});
|
|
9495
9496
|
queue.push(() => {
|
|
9496
9497
|
var _a;
|
|
9497
9498
|
panel.init({
|
|
@@ -9674,16 +9675,12 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9674
9675
|
this.onDidAddView = this._onDidAddView.event;
|
|
9675
9676
|
this._onDidRemoveView = new Emitter();
|
|
9676
9677
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
9677
|
-
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);
|
|
9678
9681
|
this._classNames = new Classnames(this.element);
|
|
9679
9682
|
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
9680
9683
|
this._options = options;
|
|
9681
|
-
if (!options.components) {
|
|
9682
|
-
options.components = {};
|
|
9683
|
-
}
|
|
9684
|
-
if (!options.frameworkComponents) {
|
|
9685
|
-
options.frameworkComponents = {};
|
|
9686
|
-
}
|
|
9687
9684
|
this.paneview = new Paneview(this.element, {
|
|
9688
9685
|
// only allow paneview in the vertical orientation for now
|
|
9689
9686
|
orientation: exports.Orientation.VERTICAL,
|
|
@@ -9708,22 +9705,19 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9708
9705
|
this._options = Object.assign(Object.assign({}, this.options), options);
|
|
9709
9706
|
}
|
|
9710
9707
|
addPanel(options) {
|
|
9711
|
-
var _a
|
|
9712
|
-
const body =
|
|
9713
|
-
|
|
9714
|
-
|
|
9715
|
-
|
|
9716
|
-
: undefined);
|
|
9708
|
+
var _a;
|
|
9709
|
+
const body = this.options.createComponent({
|
|
9710
|
+
id: options.id,
|
|
9711
|
+
name: options.component,
|
|
9712
|
+
});
|
|
9717
9713
|
let header;
|
|
9718
|
-
if (options.headerComponent) {
|
|
9719
|
-
header =
|
|
9720
|
-
|
|
9721
|
-
|
|
9722
|
-
|
|
9723
|
-
}
|
|
9724
|
-
: undefined);
|
|
9714
|
+
if (options.headerComponent && this.options.createHeaderComponent) {
|
|
9715
|
+
header = this.options.createHeaderComponent({
|
|
9716
|
+
id: options.id,
|
|
9717
|
+
name: options.headerComponent,
|
|
9718
|
+
});
|
|
9725
9719
|
}
|
|
9726
|
-
|
|
9720
|
+
if (!header) {
|
|
9727
9721
|
header = new DefaultHeader();
|
|
9728
9722
|
}
|
|
9729
9723
|
const view = new PaneFramework({
|
|
@@ -9741,7 +9735,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9741
9735
|
const size = typeof options.size === 'number' ? options.size : exports.Sizing.Distribute;
|
|
9742
9736
|
const index = typeof options.index === 'number' ? options.index : undefined;
|
|
9743
9737
|
view.init({
|
|
9744
|
-
params: (
|
|
9738
|
+
params: (_a = options.params) !== null && _a !== void 0 ? _a : {},
|
|
9745
9739
|
minimumBodySize: options.minimumBodySize,
|
|
9746
9740
|
maximumBodySize: options.maximumBodySize,
|
|
9747
9741
|
isExpanded: options.isExpanded,
|
|
@@ -9806,24 +9800,20 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9806
9800
|
descriptor: {
|
|
9807
9801
|
size,
|
|
9808
9802
|
views: views.map((view) => {
|
|
9809
|
-
var _a, _b, _c, _d;
|
|
9810
9803
|
const data = view.data;
|
|
9811
|
-
const body =
|
|
9812
|
-
|
|
9813
|
-
|
|
9814
|
-
|
|
9815
|
-
}
|
|
9816
|
-
: undefined);
|
|
9804
|
+
const body = this.options.createComponent({
|
|
9805
|
+
id: data.id,
|
|
9806
|
+
name: data.component,
|
|
9807
|
+
});
|
|
9817
9808
|
let header;
|
|
9818
|
-
if (data.headerComponent
|
|
9819
|
-
|
|
9820
|
-
|
|
9821
|
-
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
: undefined);
|
|
9809
|
+
if (data.headerComponent &&
|
|
9810
|
+
this.options.createHeaderComponent) {
|
|
9811
|
+
header = this.options.createHeaderComponent({
|
|
9812
|
+
id: data.id,
|
|
9813
|
+
name: data.headerComponent,
|
|
9814
|
+
});
|
|
9825
9815
|
}
|
|
9826
|
-
|
|
9816
|
+
if (!header) {
|
|
9827
9817
|
header = new DefaultHeader();
|
|
9828
9818
|
}
|
|
9829
9819
|
const panel = new PaneFramework({
|
|
@@ -9871,9 +9861,11 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9871
9861
|
this.paneview.dispose();
|
|
9872
9862
|
}
|
|
9873
9863
|
doAddPanel(panel) {
|
|
9874
|
-
const disposable = panel.onDidDrop((event) => {
|
|
9864
|
+
const disposable = new CompositeDisposable(panel.onDidDrop((event) => {
|
|
9875
9865
|
this._onDidDrop.fire(event);
|
|
9876
|
-
})
|
|
9866
|
+
}), panel.onUnhandledDragOverEvent((event) => {
|
|
9867
|
+
this._onUnhandledDragOverEvent.fire(event);
|
|
9868
|
+
}));
|
|
9877
9869
|
this._viewDisposables.set(panel.id, disposable);
|
|
9878
9870
|
}
|
|
9879
9871
|
doRemovePanel(panel) {
|
|
@@ -10035,7 +10027,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
10035
10027
|
exports.GridviewApi = GridviewApi;
|
|
10036
10028
|
exports.GridviewComponent = GridviewComponent;
|
|
10037
10029
|
exports.GridviewPanel = GridviewPanel;
|
|
10038
|
-
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;
|
|
10039
10034
|
exports.PaneFramework = PaneFramework;
|
|
10040
10035
|
exports.PaneTransfer = PaneTransfer;
|
|
10041
10036
|
exports.PanelTransfer = PanelTransfer;
|
|
@@ -10043,6 +10038,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
10043
10038
|
exports.PaneviewApi = PaneviewApi;
|
|
10044
10039
|
exports.PaneviewComponent = PaneviewComponent;
|
|
10045
10040
|
exports.PaneviewPanel = PaneviewPanel;
|
|
10041
|
+
exports.PaneviewUnhandledDragOverEvent = PaneviewUnhandledDragOverEvent;
|
|
10046
10042
|
exports.Splitview = Splitview;
|
|
10047
10043
|
exports.SplitviewApi = SplitviewApi;
|
|
10048
10044
|
exports.SplitviewComponent = SplitviewComponent;
|