dockview-core 7.0.2 → 7.0.3
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/dockviewGroupPanelApi.js +1 -1
- package/dist/cjs/dnd/dropTargetAnchorContainer.js +1 -2
- package/dist/cjs/dnd/pointer/longPress.js +1 -1
- package/dist/cjs/dnd/pointer/pointerDragController.js +9 -7
- package/dist/cjs/dnd/pointer/pointerDragSource.js +4 -2
- package/dist/cjs/dockview/components/panel/content.js +6 -6
- package/dist/cjs/dockview/components/popupService.js +1 -1
- package/dist/cjs/dockview/components/tab/tab.js +2 -2
- package/dist/cjs/dockview/components/titlebar/floatingTitleBar.d.ts +1 -2
- package/dist/cjs/dockview/components/titlebar/groupDragSource.d.ts +1 -2
- package/dist/cjs/dockview/components/titlebar/groupDragSource.js +1 -1
- package/dist/cjs/dockview/components/titlebar/tabGroupIndicator.js +5 -6
- package/dist/cjs/dockview/components/titlebar/tabGroups.d.ts +27 -5
- package/dist/cjs/dockview/components/titlebar/tabGroups.js +104 -54
- package/dist/cjs/dockview/components/titlebar/tabs.js +16 -23
- package/dist/cjs/dockview/components/titlebar/voidContainer.js +1 -1
- package/dist/cjs/dockview/dndCapabilities.js +3 -3
- package/dist/cjs/dockview/dockviewComponent.d.ts +5 -5
- package/dist/cjs/dockview/dockviewComponent.js +140 -122
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts +1 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.js +19 -25
- package/dist/cjs/dockview/dockviewPanel.js +4 -5
- package/dist/cjs/dockview/dockviewShell.d.ts +29 -7
- package/dist/cjs/dockview/dockviewShell.js +94 -36
- package/dist/cjs/dockview/strictEventsSequencing.js +6 -6
- package/dist/cjs/dockview/tabGroup.js +3 -3
- package/dist/cjs/dockview/tabGroupAccent.js +1 -3
- package/dist/cjs/dom.js +1 -1
- package/dist/cjs/events.js +1 -1
- package/dist/cjs/gridview/baseComponentGridview.js +3 -8
- package/dist/cjs/gridview/branchNode.js +13 -17
- package/dist/cjs/gridview/gridview.js +8 -8
- package/dist/cjs/gridview/gridviewComponent.js +1 -6
- package/dist/cjs/overlay/overlay.js +25 -28
- package/dist/cjs/overlay/overlayRenderContainer.js +3 -4
- package/dist/cjs/paneview/draggablePaneviewPanel.js +1 -1
- package/dist/cjs/paneview/paneviewComponent.js +2 -6
- package/dist/cjs/popoutWindow.js +4 -4
- package/dist/cjs/scrollbar.d.ts +1 -1
- package/dist/cjs/scrollbar.js +7 -6
- package/dist/cjs/splitview/splitview.d.ts +1 -1
- package/dist/cjs/splitview/splitview.js +21 -20
- package/dist/cjs/splitview/viewItem.js +1 -1
- package/dist/dockview-core.js +413 -330
- 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 +412 -329
- package/dist/esm/api/dockviewGroupPanelApi.js +1 -1
- package/dist/esm/dnd/dropTargetAnchorContainer.js +1 -2
- package/dist/esm/dnd/pointer/longPress.js +1 -1
- package/dist/esm/dnd/pointer/pointerDragController.js +9 -7
- package/dist/esm/dnd/pointer/pointerDragSource.js +4 -2
- package/dist/esm/dockview/components/panel/content.js +6 -6
- package/dist/esm/dockview/components/popupService.js +1 -1
- package/dist/esm/dockview/components/tab/tab.js +2 -2
- package/dist/esm/dockview/components/titlebar/floatingTitleBar.d.ts +1 -2
- package/dist/esm/dockview/components/titlebar/groupDragSource.d.ts +1 -2
- package/dist/esm/dockview/components/titlebar/groupDragSource.js +1 -1
- package/dist/esm/dockview/components/titlebar/tabGroupIndicator.js +5 -6
- package/dist/esm/dockview/components/titlebar/tabGroups.d.ts +27 -5
- package/dist/esm/dockview/components/titlebar/tabGroups.js +91 -42
- package/dist/esm/dockview/components/titlebar/tabs.js +17 -24
- package/dist/esm/dockview/components/titlebar/voidContainer.js +1 -1
- package/dist/esm/dockview/dndCapabilities.js +3 -3
- package/dist/esm/dockview/dockviewComponent.d.ts +5 -5
- package/dist/esm/dockview/dockviewComponent.js +61 -51
- package/dist/esm/dockview/dockviewGroupPanel.d.ts +1 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.js +19 -25
- package/dist/esm/dockview/dockviewPanel.js +1 -2
- package/dist/esm/dockview/dockviewShell.d.ts +29 -7
- package/dist/esm/dockview/dockviewShell.js +89 -37
- package/dist/esm/dockview/strictEventsSequencing.js +6 -6
- package/dist/esm/dockview/tabGroup.js +3 -3
- package/dist/esm/dockview/tabGroupAccent.js +1 -3
- package/dist/esm/dom.js +1 -1
- package/dist/esm/events.js +1 -1
- package/dist/esm/gridview/baseComponentGridview.js +3 -8
- package/dist/esm/gridview/branchNode.js +13 -15
- package/dist/esm/gridview/gridview.js +8 -8
- package/dist/esm/gridview/gridviewComponent.js +1 -6
- package/dist/esm/overlay/overlay.js +25 -28
- package/dist/esm/overlay/overlayRenderContainer.js +3 -4
- package/dist/esm/paneview/draggablePaneviewPanel.js +1 -1
- package/dist/esm/paneview/paneviewComponent.js +2 -6
- package/dist/esm/popoutWindow.js +4 -4
- package/dist/esm/scrollbar.d.ts +1 -1
- package/dist/esm/scrollbar.js +7 -6
- package/dist/esm/splitview/splitview.d.ts +1 -1
- package/dist/esm/splitview/splitview.js +21 -20
- package/dist/esm/splitview/viewItem.js +1 -1
- package/dist/package/main.cjs.js +412 -329
- package/dist/package/main.cjs.min.js +2 -2
- package/dist/package/main.esm.min.mjs +2 -2
- package/dist/package/main.esm.mjs +412 -329
- package/dist/styles/dockview.css +8 -8
- package/package.json +1 -1
|
@@ -128,9 +128,9 @@ var _hasWarnedUsingCoreDirectly = false;
|
|
|
128
128
|
* `process` is undefined.
|
|
129
129
|
*/
|
|
130
130
|
function warnIfUsingCoreDirectly() {
|
|
131
|
+
var _a;
|
|
131
132
|
if (typeof process !== 'undefined' &&
|
|
132
|
-
process.env
|
|
133
|
-
process.env.NODE_ENV === 'production') {
|
|
133
|
+
((_a = process.env) === null || _a === void 0 ? void 0 : _a.NODE_ENV) === 'production') {
|
|
134
134
|
return;
|
|
135
135
|
}
|
|
136
136
|
if (_hasWarnedUsingCoreDirectly || (0, modules_1.isDockviewPackageLoaded)()) {
|
|
@@ -276,7 +276,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
276
276
|
// The shell always wraps the dockview element so edge groups can be
|
|
277
277
|
// added at any time via addEdgeGroup() without re-parenting the DOM.
|
|
278
278
|
_this.disableResizing = true;
|
|
279
|
-
|
|
279
|
+
_this.element.remove();
|
|
280
280
|
_this._shellManager = new dockviewShell_1.ShellManager(container, _this.element, function (w, h) { return _this._layoutFromShell(w, h); }, (_e = (_d = options.theme) === null || _d === void 0 ? void 0 : _d.gap) !== null && _e !== void 0 ? _e : 0, (_f = options.theme) === null || _f === void 0 ? void 0 : _f.edgeGroupCollapsedSize);
|
|
281
281
|
// The shell wraps the dockview element, so move the popup anchor
|
|
282
282
|
// into the shell so overflow dropdowns in edge groups position correctly
|
|
@@ -856,15 +856,13 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
856
856
|
.open()
|
|
857
857
|
.then(function (popoutContainer) {
|
|
858
858
|
var e_3, _a;
|
|
859
|
-
var _b, _c, _d;
|
|
859
|
+
var _b, _c, _d, _e;
|
|
860
860
|
if (_window.isDisposed) {
|
|
861
861
|
return false;
|
|
862
862
|
}
|
|
863
|
-
var referenceGroup = (options === null || options === void 0 ? void 0 : options.referenceGroup)
|
|
864
|
-
?
|
|
865
|
-
: itemToPopout
|
|
866
|
-
? itemToPopout.group
|
|
867
|
-
: itemToPopout;
|
|
863
|
+
var referenceGroup = (_b = options === null || options === void 0 ? void 0 : options.referenceGroup) !== null && _b !== void 0 ? _b : (itemToPopout instanceof dockviewPanel_1.DockviewPanel
|
|
864
|
+
? itemToPopout.group
|
|
865
|
+
: itemToPopout);
|
|
868
866
|
var referenceLocation = itemToPopout.api.location.type;
|
|
869
867
|
/**
|
|
870
868
|
* The group that is being added doesn't already exist within the DOM, the most likely occurrence
|
|
@@ -875,7 +873,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
875
873
|
if (options === null || options === void 0 ? void 0 : options.overridePopoutGridview) {
|
|
876
874
|
// Restoring a multi-group window: the anchor group is
|
|
877
875
|
// already built inside the supplied gridview.
|
|
878
|
-
group = (
|
|
876
|
+
group = (_c = options.overridePopoutGroup) !== null && _c !== void 0 ? _c : referenceGroup;
|
|
879
877
|
}
|
|
880
878
|
else if (!isGroupAddedToDom) {
|
|
881
879
|
group = referenceGroup;
|
|
@@ -906,7 +904,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
906
904
|
// a nested splitview layout. The window starts with the single
|
|
907
905
|
// anchor group; further groups arrive via drag-and-drop. On
|
|
908
906
|
// restore a pre-populated gridview is supplied instead.
|
|
909
|
-
var popoutGridview = (
|
|
907
|
+
var popoutGridview = (_d = options === null || options === void 0 ? void 0 : options.overridePopoutGridview) !== null && _d !== void 0 ? _d : _this.createNestedGridview();
|
|
910
908
|
if (!(options === null || options === void 0 ? void 0 : options.overridePopoutGridview)) {
|
|
911
909
|
popoutGridview.addView(group, splitview_1.Sizing.Distribute, [0]);
|
|
912
910
|
}
|
|
@@ -949,11 +947,11 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
949
947
|
break;
|
|
950
948
|
case 'floating':
|
|
951
949
|
case 'popout':
|
|
952
|
-
floatingBox = (
|
|
950
|
+
floatingBox = (_e = _this.floatingGroups
|
|
953
951
|
.find(function (value) {
|
|
954
952
|
return value.group.api.id ===
|
|
955
953
|
itemToPopout.api.id;
|
|
956
|
-
})) === null ||
|
|
954
|
+
})) === null || _e === void 0 ? void 0 : _e.overlay.toJSON();
|
|
957
955
|
_this.removeGroup(referenceGroup);
|
|
958
956
|
break;
|
|
959
957
|
}
|
|
@@ -1947,7 +1945,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
1947
1945
|
var e_16, _a;
|
|
1948
1946
|
var id = data.id, locked = data.locked, hideHeader = data.hideHeader, headerPosition = data.headerPosition, views = data.views, activeView = data.activeView;
|
|
1949
1947
|
if (typeof id !== 'string') {
|
|
1950
|
-
throw new
|
|
1948
|
+
throw new TypeError('dockview: group id must be of type string');
|
|
1951
1949
|
}
|
|
1952
1950
|
var group = _this.createGroup({
|
|
1953
1951
|
id: id,
|
|
@@ -2133,8 +2131,8 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2133
2131
|
return { gridview: gridview, members: members };
|
|
2134
2132
|
};
|
|
2135
2133
|
DockviewComponent.prototype.deserializeEdgeGroups = function (edgeGroups, panels) {
|
|
2136
|
-
var e_17, _a, e_18, _b, e_19, _c;
|
|
2137
|
-
var
|
|
2134
|
+
var e_17, _a, e_18, _b, e_19, _c, e_20, _d;
|
|
2135
|
+
var _e;
|
|
2138
2136
|
var edgeService = (0, modules_1.assertModule)(this._edgeGroupService, 'EdgeGroup', 'fromJSON edge restoration');
|
|
2139
2137
|
if (!edgeService) {
|
|
2140
2138
|
return;
|
|
@@ -2143,17 +2141,17 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2143
2141
|
// Auto-create edge groups for positions in the serialized state that
|
|
2144
2142
|
// don't already have a group registered (e.g. when fromJSON is called
|
|
2145
2143
|
// before the user has called addEdgeGroup).
|
|
2146
|
-
for (var
|
|
2144
|
+
for (var _f = __values([
|
|
2147
2145
|
'top',
|
|
2148
2146
|
'bottom',
|
|
2149
2147
|
'left',
|
|
2150
2148
|
'right',
|
|
2151
|
-
]),
|
|
2152
|
-
var _position =
|
|
2149
|
+
]), _g = _f.next(); !_g.done; _g = _f.next()) {
|
|
2150
|
+
var _position = _g.value;
|
|
2153
2151
|
var fixedData = edgeGroups[_position];
|
|
2154
2152
|
if (fixedData && !edgeService.has(_position)) {
|
|
2155
2153
|
var groupState = fixedData.group;
|
|
2156
|
-
var id = (
|
|
2154
|
+
var id = (_e = groupState === null || groupState === void 0 ? void 0 : groupState.id) !== null && _e !== void 0 ? _e : "".concat(_position, "-group");
|
|
2157
2155
|
this.addEdgeGroup(_position, { id: id });
|
|
2158
2156
|
}
|
|
2159
2157
|
}
|
|
@@ -2161,14 +2159,14 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2161
2159
|
catch (e_17_1) { e_17 = { error: e_17_1 }; }
|
|
2162
2160
|
finally {
|
|
2163
2161
|
try {
|
|
2164
|
-
if (
|
|
2162
|
+
if (_g && !_g.done && (_a = _f.return)) _a.call(_f);
|
|
2165
2163
|
}
|
|
2166
2164
|
finally { if (e_17) throw e_17.error; }
|
|
2167
2165
|
}
|
|
2168
2166
|
try {
|
|
2169
2167
|
// Restore panel contents of edge groups
|
|
2170
|
-
for (var
|
|
2171
|
-
var
|
|
2168
|
+
for (var _h = __values(edgeService.entries()), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
2169
|
+
var _k = __read(_j.value, 2), position = _k[0], edgeGroup = _k[1];
|
|
2172
2170
|
var edgeData = edgeGroups[position];
|
|
2173
2171
|
var groupState = edgeData === null || edgeData === void 0 ? void 0 : edgeData.group;
|
|
2174
2172
|
if (groupState) {
|
|
@@ -2190,13 +2188,22 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2190
2188
|
}
|
|
2191
2189
|
finally { if (e_19) throw e_19.error; }
|
|
2192
2190
|
}
|
|
2193
|
-
|
|
2194
|
-
var
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2191
|
+
try {
|
|
2192
|
+
for (var createdPanels_1 = (e_20 = void 0, __values(createdPanels)), createdPanels_1_1 = createdPanels_1.next(); !createdPanels_1_1.done; createdPanels_1_1 = createdPanels_1.next()) {
|
|
2193
|
+
var panel = createdPanels_1_1.value;
|
|
2194
|
+
var isActive = activeView === panel.id;
|
|
2195
|
+
edgeGroup.model.openPanel(panel, {
|
|
2196
|
+
skipSetActive: !isActive,
|
|
2197
|
+
skipSetGroupActive: true,
|
|
2198
|
+
});
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
catch (e_20_1) { e_20 = { error: e_20_1 }; }
|
|
2202
|
+
finally {
|
|
2203
|
+
try {
|
|
2204
|
+
if (createdPanels_1_1 && !createdPanels_1_1.done && (_d = createdPanels_1.return)) _d.call(createdPanels_1);
|
|
2205
|
+
}
|
|
2206
|
+
finally { if (e_20) throw e_20.error; }
|
|
2200
2207
|
}
|
|
2201
2208
|
// Restore tab groups before activating a fallback panel
|
|
2202
2209
|
if (groupState.tabGroups && groupState.tabGroups.length > 0) {
|
|
@@ -2211,14 +2218,14 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2211
2218
|
catch (e_18_1) { e_18 = { error: e_18_1 }; }
|
|
2212
2219
|
finally {
|
|
2213
2220
|
try {
|
|
2214
|
-
if (
|
|
2221
|
+
if (_j && !_j.done && (_b = _h.return)) _b.call(_h);
|
|
2215
2222
|
}
|
|
2216
2223
|
finally { if (e_18) throw e_18.error; }
|
|
2217
2224
|
}
|
|
2218
2225
|
this._shellManager.fromJSON(edgeGroups);
|
|
2219
2226
|
};
|
|
2220
2227
|
DockviewComponent.prototype.deserializeFloatingWindows = function (serialized, createGroup) {
|
|
2221
|
-
var
|
|
2228
|
+
var e_21, _a;
|
|
2222
2229
|
try {
|
|
2223
2230
|
for (var serialized_1 = __values(serialized), serialized_1_1 = serialized_1.next(); !serialized_1_1.done; serialized_1_1 = serialized_1.next()) {
|
|
2224
2231
|
var serializedFloatingGroup = serialized_1_1.value;
|
|
@@ -2244,12 +2251,12 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2244
2251
|
}
|
|
2245
2252
|
}
|
|
2246
2253
|
}
|
|
2247
|
-
catch (
|
|
2254
|
+
catch (e_21_1) { e_21 = { error: e_21_1 }; }
|
|
2248
2255
|
finally {
|
|
2249
2256
|
try {
|
|
2250
2257
|
if (serialized_1_1 && !serialized_1_1.done && (_a = serialized_1.return)) _a.call(serialized_1);
|
|
2251
2258
|
}
|
|
2252
|
-
finally { if (
|
|
2259
|
+
finally { if (e_21) throw e_21.error; }
|
|
2253
2260
|
}
|
|
2254
2261
|
};
|
|
2255
2262
|
DockviewComponent.prototype.deserializePopoutWindows = function (serialized, createGroup) {
|
|
@@ -2295,7 +2302,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2295
2302
|
popoutUrl: url,
|
|
2296
2303
|
});
|
|
2297
2304
|
}, function () {
|
|
2298
|
-
var
|
|
2305
|
+
var e_22, _a, e_23, _b;
|
|
2299
2306
|
try {
|
|
2300
2307
|
// The group was registered in _groups synchronously but the
|
|
2301
2308
|
// timer that would parent it into the popout window never
|
|
@@ -2309,19 +2316,19 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2309
2316
|
_this._groups.has(orphan.id) &&
|
|
2310
2317
|
orphan.element.parentElement === null) {
|
|
2311
2318
|
try {
|
|
2312
|
-
for (var _e = (
|
|
2319
|
+
for (var _e = (e_23 = void 0, __values(__spreadArray([], __read(orphan.panels), false))), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
2313
2320
|
var panel = _f.value;
|
|
2314
2321
|
_this.removePanel(panel, {
|
|
2315
2322
|
removeEmptyGroup: false,
|
|
2316
2323
|
});
|
|
2317
2324
|
}
|
|
2318
2325
|
}
|
|
2319
|
-
catch (
|
|
2326
|
+
catch (e_23_1) { e_23 = { error: e_23_1 }; }
|
|
2320
2327
|
finally {
|
|
2321
2328
|
try {
|
|
2322
2329
|
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
2323
2330
|
}
|
|
2324
|
-
finally { if (
|
|
2331
|
+
finally { if (e_23) throw e_23.error; }
|
|
2325
2332
|
}
|
|
2326
2333
|
orphan.dispose();
|
|
2327
2334
|
_this._groups.delete(orphan.id);
|
|
@@ -2329,12 +2336,12 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2329
2336
|
}
|
|
2330
2337
|
}
|
|
2331
2338
|
}
|
|
2332
|
-
catch (
|
|
2339
|
+
catch (e_22_1) { e_22 = { error: e_22_1 }; }
|
|
2333
2340
|
finally {
|
|
2334
2341
|
try {
|
|
2335
2342
|
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
2336
2343
|
}
|
|
2337
|
-
finally { if (
|
|
2344
|
+
finally { if (e_22) throw e_22.error; }
|
|
2338
2345
|
}
|
|
2339
2346
|
});
|
|
2340
2347
|
});
|
|
@@ -2344,7 +2351,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2344
2351
|
this.mutation('clear', function () { return _this._doClear(); });
|
|
2345
2352
|
};
|
|
2346
2353
|
DockviewComponent.prototype._doClear = function () {
|
|
2347
|
-
var
|
|
2354
|
+
var e_24, _a, e_25, _b;
|
|
2348
2355
|
var _c;
|
|
2349
2356
|
var groups = Array.from(this._groups.values()).map(function (_) { return _.value; });
|
|
2350
2357
|
var hasActiveGroup = !!this.activeGroup;
|
|
@@ -2355,17 +2362,17 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2355
2362
|
// Edge groups are structural - only clear their panels, not the group itself
|
|
2356
2363
|
var panels = __spreadArray([], __read(group.panels), false);
|
|
2357
2364
|
try {
|
|
2358
|
-
for (var panels_1 = (
|
|
2365
|
+
for (var panels_1 = (e_25 = void 0, __values(panels)), panels_1_1 = panels_1.next(); !panels_1_1.done; panels_1_1 = panels_1.next()) {
|
|
2359
2366
|
var panel = panels_1_1.value;
|
|
2360
2367
|
this.removePanel(panel, { removeEmptyGroup: false });
|
|
2361
2368
|
}
|
|
2362
2369
|
}
|
|
2363
|
-
catch (
|
|
2370
|
+
catch (e_25_1) { e_25 = { error: e_25_1 }; }
|
|
2364
2371
|
finally {
|
|
2365
2372
|
try {
|
|
2366
2373
|
if (panels_1_1 && !panels_1_1.done && (_b = panels_1.return)) _b.call(panels_1);
|
|
2367
2374
|
}
|
|
2368
|
-
finally { if (
|
|
2375
|
+
finally { if (e_25) throw e_25.error; }
|
|
2369
2376
|
}
|
|
2370
2377
|
continue;
|
|
2371
2378
|
}
|
|
@@ -2373,12 +2380,12 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2373
2380
|
this.removeGroup(group, { skipActive: true });
|
|
2374
2381
|
}
|
|
2375
2382
|
}
|
|
2376
|
-
catch (
|
|
2383
|
+
catch (e_24_1) { e_24 = { error: e_24_1 }; }
|
|
2377
2384
|
finally {
|
|
2378
2385
|
try {
|
|
2379
2386
|
if (groups_1_1 && !groups_1_1.done && (_a = groups_1.return)) _a.call(groups_1);
|
|
2380
2387
|
}
|
|
2381
|
-
finally { if (
|
|
2388
|
+
finally { if (e_24) throw e_24.error; }
|
|
2382
2389
|
}
|
|
2383
2390
|
if (hasActiveGroup) {
|
|
2384
2391
|
this.doSetGroupAndPanelActive(undefined);
|
|
@@ -2390,7 +2397,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2390
2397
|
// One transaction — the per-panel removals inside nest via the depth
|
|
2391
2398
|
// counter, so consumers (undo, announcements) see a single mutation.
|
|
2392
2399
|
this.mutation('remove', function () {
|
|
2393
|
-
var
|
|
2400
|
+
var e_26, _a;
|
|
2394
2401
|
try {
|
|
2395
2402
|
for (var _b = __values(_this._groups.entries()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
2396
2403
|
var entry = _c.value;
|
|
@@ -2398,12 +2405,12 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2398
2405
|
group.value.model.closeAllPanels();
|
|
2399
2406
|
}
|
|
2400
2407
|
}
|
|
2401
|
-
catch (
|
|
2408
|
+
catch (e_26_1) { e_26 = { error: e_26_1 }; }
|
|
2402
2409
|
finally {
|
|
2403
2410
|
try {
|
|
2404
2411
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
2405
2412
|
}
|
|
2406
|
-
finally { if (
|
|
2413
|
+
finally { if (e_26) throw e_26.error; }
|
|
2407
2414
|
}
|
|
2408
2415
|
});
|
|
2409
2416
|
};
|
|
@@ -2412,8 +2419,8 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2412
2419
|
return this.mutation('add', function () { return _this._doAddPanel(options); });
|
|
2413
2420
|
};
|
|
2414
2421
|
DockviewComponent.prototype._doAddPanel = function (options) {
|
|
2415
|
-
var _a, _b;
|
|
2416
|
-
if (this.panels.
|
|
2422
|
+
var _a, _b, _c, _d;
|
|
2423
|
+
if (this.panels.some(function (_) { return _.id === options.id; })) {
|
|
2417
2424
|
throw new Error("dockview: panel with id ".concat(options.id, " already exists"));
|
|
2418
2425
|
}
|
|
2419
2426
|
var referenceGroup;
|
|
@@ -2432,18 +2439,24 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2432
2439
|
: options.position.referencePanel;
|
|
2433
2440
|
index = options.position.index;
|
|
2434
2441
|
if (!referencePanel) {
|
|
2435
|
-
|
|
2442
|
+
var referenceId = typeof options.position.referencePanel === 'string'
|
|
2443
|
+
? options.position.referencePanel
|
|
2444
|
+
: (_a = options.position.referencePanel) === null || _a === void 0 ? void 0 : _a.id;
|
|
2445
|
+
throw new Error("dockview: referencePanel '".concat(referenceId, "' does not exist"));
|
|
2436
2446
|
}
|
|
2437
2447
|
referenceGroup = this.findGroup(referencePanel);
|
|
2438
2448
|
}
|
|
2439
2449
|
else if ((0, options_1.isPanelOptionsWithGroup)(options.position)) {
|
|
2440
2450
|
referenceGroup =
|
|
2441
2451
|
typeof options.position.referenceGroup === 'string'
|
|
2442
|
-
? (
|
|
2452
|
+
? (_b = this._groups.get(options.position.referenceGroup)) === null || _b === void 0 ? void 0 : _b.value
|
|
2443
2453
|
: options.position.referenceGroup;
|
|
2444
2454
|
index = options.position.index;
|
|
2445
2455
|
if (!referenceGroup) {
|
|
2446
|
-
|
|
2456
|
+
var referenceId = typeof options.position.referenceGroup === 'string'
|
|
2457
|
+
? options.position.referenceGroup
|
|
2458
|
+
: (_c = options.position.referenceGroup) === null || _c === void 0 ? void 0 : _c.id;
|
|
2459
|
+
throw new Error("dockview: referenceGroup '".concat(referenceId, "' does not exist"));
|
|
2447
2460
|
}
|
|
2448
2461
|
}
|
|
2449
2462
|
else {
|
|
@@ -2469,7 +2482,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2469
2482
|
}
|
|
2470
2483
|
var panel;
|
|
2471
2484
|
if (referenceGroup) {
|
|
2472
|
-
var target = (0, baseComponentGridview_1.toTarget)(((
|
|
2485
|
+
var target = (0, baseComponentGridview_1.toTarget)(((_d = options.position) === null || _d === void 0 ? void 0 : _d.direction) || 'within');
|
|
2473
2486
|
if (options.floating) {
|
|
2474
2487
|
var group = this.createGroup();
|
|
2475
2488
|
this._onDidAddGroup.fire(group);
|
|
@@ -2553,15 +2566,16 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2553
2566
|
};
|
|
2554
2567
|
DockviewComponent.prototype.removePanel = function (panel, options) {
|
|
2555
2568
|
var _this = this;
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2569
|
+
this.mutation('remove', function () {
|
|
2570
|
+
var _a;
|
|
2571
|
+
return _this._doRemovePanel(panel, {
|
|
2572
|
+
removeEmptyGroup: (_a = options === null || options === void 0 ? void 0 : options.removeEmptyGroup) !== null && _a !== void 0 ? _a : true,
|
|
2573
|
+
skipDispose: options === null || options === void 0 ? void 0 : options.skipDispose,
|
|
2574
|
+
skipSetActiveGroup: options === null || options === void 0 ? void 0 : options.skipSetActiveGroup,
|
|
2575
|
+
});
|
|
2576
|
+
});
|
|
2560
2577
|
};
|
|
2561
2578
|
DockviewComponent.prototype._doRemovePanel = function (panel, options) {
|
|
2562
|
-
if (options === void 0) { options = {
|
|
2563
|
-
removeEmptyGroup: true,
|
|
2564
|
-
}; }
|
|
2565
2579
|
var group = panel.group;
|
|
2566
2580
|
if (!group) {
|
|
2567
2581
|
throw new Error("dockview: cannot remove panel ".concat(panel.id, ". it's missing a group."));
|
|
@@ -2588,28 +2602,34 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2588
2602
|
return this.mutation('add', function () { return _this._doAddGroup(options); });
|
|
2589
2603
|
};
|
|
2590
2604
|
DockviewComponent.prototype._doAddGroup = function (options) {
|
|
2591
|
-
var _a;
|
|
2605
|
+
var _a, _b, _c;
|
|
2592
2606
|
if (options) {
|
|
2593
2607
|
var referenceGroup = void 0;
|
|
2594
2608
|
if ((0, options_1.isGroupOptionsWithPanel)(options)) {
|
|
2595
2609
|
var referencePanel = typeof options.referencePanel === 'string'
|
|
2596
2610
|
? this.panels.find(function (panel) { return panel.id === options.referencePanel; })
|
|
2597
2611
|
: options.referencePanel;
|
|
2612
|
+
var referencePanelId = typeof options.referencePanel === 'string'
|
|
2613
|
+
? options.referencePanel
|
|
2614
|
+
: (_a = options.referencePanel) === null || _a === void 0 ? void 0 : _a.id;
|
|
2598
2615
|
if (!referencePanel) {
|
|
2599
|
-
throw new Error("dockview: reference panel ".concat(
|
|
2616
|
+
throw new Error("dockview: reference panel ".concat(referencePanelId, " does not exist"));
|
|
2600
2617
|
}
|
|
2601
2618
|
referenceGroup = this.findGroup(referencePanel);
|
|
2602
2619
|
if (!referenceGroup) {
|
|
2603
|
-
throw new Error("dockview: reference group for reference panel ".concat(
|
|
2620
|
+
throw new Error("dockview: reference group for reference panel ".concat(referencePanelId, " does not exist"));
|
|
2604
2621
|
}
|
|
2605
2622
|
}
|
|
2606
2623
|
else if ((0, options_1.isGroupOptionsWithGroup)(options)) {
|
|
2607
2624
|
referenceGroup =
|
|
2608
2625
|
typeof options.referenceGroup === 'string'
|
|
2609
|
-
? (
|
|
2626
|
+
? (_b = this._groups.get(options.referenceGroup)) === null || _b === void 0 ? void 0 : _b.value
|
|
2610
2627
|
: options.referenceGroup;
|
|
2611
2628
|
if (!referenceGroup) {
|
|
2612
|
-
|
|
2629
|
+
var referenceId = typeof options.referenceGroup === 'string'
|
|
2630
|
+
? options.referenceGroup
|
|
2631
|
+
: (_c = options.referenceGroup) === null || _c === void 0 ? void 0 : _c.id;
|
|
2632
|
+
throw new Error("dockview: reference group ".concat(referenceId, " does not exist"));
|
|
2613
2633
|
}
|
|
2614
2634
|
}
|
|
2615
2635
|
else {
|
|
@@ -2710,7 +2730,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2710
2730
|
}
|
|
2711
2731
|
};
|
|
2712
2732
|
DockviewComponent.prototype.doRemoveGroup = function (group, options) {
|
|
2713
|
-
var
|
|
2733
|
+
var e_27, _a;
|
|
2714
2734
|
var _b, _c, _d, _e, _f;
|
|
2715
2735
|
// Edge groups are permanent structural elements - never remove them from the layout
|
|
2716
2736
|
if ((_b = this._edgeGroupService) === null || _b === void 0 ? void 0 : _b.includes(group)) {
|
|
@@ -2727,12 +2747,12 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2727
2747
|
});
|
|
2728
2748
|
}
|
|
2729
2749
|
}
|
|
2730
|
-
catch (
|
|
2750
|
+
catch (e_27_1) { e_27 = { error: e_27_1 }; }
|
|
2731
2751
|
finally {
|
|
2732
2752
|
try {
|
|
2733
2753
|
if (panels_2_1 && !panels_2_1.done && (_a = panels_2.return)) _a.call(panels_2);
|
|
2734
2754
|
}
|
|
2735
|
-
finally { if (
|
|
2755
|
+
finally { if (e_27) throw e_27.error; }
|
|
2736
2756
|
}
|
|
2737
2757
|
}
|
|
2738
2758
|
var activePanel = this.activePanel;
|
|
@@ -2744,14 +2764,14 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2744
2764
|
if (this.detachFromNestedWindow(group)) {
|
|
2745
2765
|
// The floating window hosts other groups and stays alive —
|
|
2746
2766
|
// finalize just this group.
|
|
2747
|
-
if (
|
|
2748
|
-
this.disposeGroupRecord(group);
|
|
2749
|
-
}
|
|
2750
|
-
else {
|
|
2767
|
+
if (options === null || options === void 0 ? void 0 : options.skipDispose) {
|
|
2751
2768
|
// Relocation: reset location so the destination root can
|
|
2752
2769
|
// re-tag it.
|
|
2753
2770
|
group.model.location = { type: 'grid' };
|
|
2754
2771
|
}
|
|
2772
|
+
else {
|
|
2773
|
+
this.disposeGroupRecord(group);
|
|
2774
|
+
}
|
|
2755
2775
|
this.activateFallbackGroupIfRemoved(group, options === null || options === void 0 ? void 0 : options.skipActive);
|
|
2756
2776
|
return group;
|
|
2757
2777
|
}
|
|
@@ -2772,14 +2792,14 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2772
2792
|
if (this.detachFromNestedWindow(group)) {
|
|
2773
2793
|
// The popout window hosts other groups and stays alive —
|
|
2774
2794
|
// finalize just this group.
|
|
2775
|
-
if (
|
|
2776
|
-
this.disposeGroupRecord(group);
|
|
2777
|
-
}
|
|
2778
|
-
else {
|
|
2795
|
+
if (options === null || options === void 0 ? void 0 : options.skipDispose) {
|
|
2779
2796
|
// Relocation: reset location so the destination root can
|
|
2780
2797
|
// re-tag it.
|
|
2781
2798
|
group.model.location = { type: 'grid' };
|
|
2782
2799
|
}
|
|
2800
|
+
else {
|
|
2801
|
+
this.disposeGroupRecord(group);
|
|
2802
|
+
}
|
|
2783
2803
|
this.activateFallbackGroupIfRemoved(group, options === null || options === void 0 ? void 0 : options.skipActive);
|
|
2784
2804
|
return group;
|
|
2785
2805
|
}
|
|
@@ -2789,7 +2809,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2789
2809
|
var refGroup = selectedGroup.referenceGroup
|
|
2790
2810
|
? this.getPanel(selectedGroup.referenceGroup)
|
|
2791
2811
|
: undefined;
|
|
2792
|
-
if (refGroup
|
|
2812
|
+
if ((refGroup === null || refGroup === void 0 ? void 0 : refGroup.panels.length) === 0) {
|
|
2793
2813
|
this.removeGroup(refGroup);
|
|
2794
2814
|
}
|
|
2795
2815
|
}
|
|
@@ -2834,7 +2854,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2834
2854
|
cancelAnimationFrame(this._updatePositionsFrameId);
|
|
2835
2855
|
}
|
|
2836
2856
|
this._updatePositionsFrameId = requestAnimationFrame(function () {
|
|
2837
|
-
var
|
|
2857
|
+
var e_28, _a;
|
|
2838
2858
|
var _b, _c;
|
|
2839
2859
|
_this._updatePositionsFrameId = undefined;
|
|
2840
2860
|
_this.overlayRenderContainer.updateAllPositions();
|
|
@@ -2847,12 +2867,12 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
2847
2867
|
entry.overlayRenderContainer.updateAllPositions();
|
|
2848
2868
|
}
|
|
2849
2869
|
}
|
|
2850
|
-
catch (
|
|
2870
|
+
catch (e_28_1) { e_28 = { error: e_28_1 }; }
|
|
2851
2871
|
finally {
|
|
2852
2872
|
try {
|
|
2853
2873
|
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
|
|
2854
2874
|
}
|
|
2855
|
-
finally { if (
|
|
2875
|
+
finally { if (e_28) throw e_28.error; }
|
|
2856
2876
|
}
|
|
2857
2877
|
});
|
|
2858
2878
|
};
|
|
@@ -3200,9 +3220,9 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
3200
3220
|
return;
|
|
3201
3221
|
}
|
|
3202
3222
|
var addPanelsToGroup = function (targetGroup) {
|
|
3203
|
-
var
|
|
3223
|
+
var e_29, _a, e_30, _b;
|
|
3204
3224
|
_this.movingLock(function () {
|
|
3205
|
-
var
|
|
3225
|
+
var e_31, _a;
|
|
3206
3226
|
try {
|
|
3207
3227
|
for (var removedPanels_3 = __values(removedPanels), removedPanels_3_1 = removedPanels_3.next(); !removedPanels_3_1.done; removedPanels_3_1 = removedPanels_3.next()) {
|
|
3208
3228
|
var panel = removedPanels_3_1.value;
|
|
@@ -3213,12 +3233,12 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
3213
3233
|
});
|
|
3214
3234
|
}
|
|
3215
3235
|
}
|
|
3216
|
-
catch (
|
|
3236
|
+
catch (e_31_1) { e_31 = { error: e_31_1 }; }
|
|
3217
3237
|
finally {
|
|
3218
3238
|
try {
|
|
3219
3239
|
if (removedPanels_3_1 && !removedPanels_3_1.done && (_a = removedPanels_3.return)) _a.call(removedPanels_3);
|
|
3220
3240
|
}
|
|
3221
|
-
finally { if (
|
|
3241
|
+
finally { if (e_31) throw e_31.error; }
|
|
3222
3242
|
}
|
|
3223
3243
|
});
|
|
3224
3244
|
// Recreate the tab group in the destination
|
|
@@ -3234,12 +3254,12 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
3234
3254
|
targetGroup.model.addPanelToTabGroup(newTabGroup.id, panel.id);
|
|
3235
3255
|
}
|
|
3236
3256
|
}
|
|
3237
|
-
catch (
|
|
3257
|
+
catch (e_29_1) { e_29 = { error: e_29_1 }; }
|
|
3238
3258
|
finally {
|
|
3239
3259
|
try {
|
|
3240
3260
|
if (removedPanels_1_1 && !removedPanels_1_1.done && (_a = removedPanels_1.return)) _a.call(removedPanels_1);
|
|
3241
3261
|
}
|
|
3242
|
-
finally { if (
|
|
3262
|
+
finally { if (e_29) throw e_29.error; }
|
|
3243
3263
|
}
|
|
3244
3264
|
if (!options.skipSetActive) {
|
|
3245
3265
|
_this.doSetGroupAndPanelActive(targetGroup);
|
|
@@ -3253,12 +3273,12 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
3253
3273
|
});
|
|
3254
3274
|
}
|
|
3255
3275
|
}
|
|
3256
|
-
catch (
|
|
3276
|
+
catch (e_30_1) { e_30 = { error: e_30_1 }; }
|
|
3257
3277
|
finally {
|
|
3258
3278
|
try {
|
|
3259
3279
|
if (removedPanels_2_1 && !removedPanels_2_1.done && (_b = removedPanels_2.return)) _b.call(removedPanels_2);
|
|
3260
3280
|
}
|
|
3261
|
-
finally { if (
|
|
3281
|
+
finally { if (e_30) throw e_30.error; }
|
|
3262
3282
|
}
|
|
3263
3283
|
};
|
|
3264
3284
|
var targetGroup;
|
|
@@ -3301,7 +3321,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
3301
3321
|
this.mutation('maximize', function () { return _super.prototype.exitMaximizedGroup.call(_this); });
|
|
3302
3322
|
};
|
|
3303
3323
|
DockviewComponent.prototype._doMoveGroup = function (options) {
|
|
3304
|
-
var
|
|
3324
|
+
var e_32, _a, e_33, _b, e_34, _c, e_35, _d;
|
|
3305
3325
|
var _this = this;
|
|
3306
3326
|
var _e, _f, _g;
|
|
3307
3327
|
var from = options.from.group;
|
|
@@ -3334,7 +3354,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
3334
3354
|
this.doRemoveGroup(from, { skipActive: true });
|
|
3335
3355
|
}
|
|
3336
3356
|
this.movingLock(function () {
|
|
3337
|
-
var
|
|
3357
|
+
var e_36, _a;
|
|
3338
3358
|
try {
|
|
3339
3359
|
for (var panels_4 = __values(panels_3), panels_4_1 = panels_4.next(); !panels_4_1.done; panels_4_1 = panels_4.next()) {
|
|
3340
3360
|
var panel = panels_4_1.value;
|
|
@@ -3344,12 +3364,12 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
3344
3364
|
});
|
|
3345
3365
|
}
|
|
3346
3366
|
}
|
|
3347
|
-
catch (
|
|
3367
|
+
catch (e_36_1) { e_36 = { error: e_36_1 }; }
|
|
3348
3368
|
finally {
|
|
3349
3369
|
try {
|
|
3350
3370
|
if (panels_4_1 && !panels_4_1.done && (_a = panels_4.return)) _a.call(panels_4);
|
|
3351
3371
|
}
|
|
3352
|
-
finally { if (
|
|
3372
|
+
finally { if (e_36) throw e_36.error; }
|
|
3353
3373
|
}
|
|
3354
3374
|
});
|
|
3355
3375
|
try {
|
|
@@ -3362,26 +3382,26 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
3362
3382
|
componentParams: snapshot.componentParams,
|
|
3363
3383
|
});
|
|
3364
3384
|
try {
|
|
3365
|
-
for (var _h = (
|
|
3385
|
+
for (var _h = (e_33 = void 0, __values(snapshot.panelIds)), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
3366
3386
|
var panelId = _j.value;
|
|
3367
3387
|
to.model.addPanelToTabGroup(newTabGroup.id, panelId);
|
|
3368
3388
|
}
|
|
3369
3389
|
}
|
|
3370
|
-
catch (
|
|
3390
|
+
catch (e_33_1) { e_33 = { error: e_33_1 }; }
|
|
3371
3391
|
finally {
|
|
3372
3392
|
try {
|
|
3373
3393
|
if (_j && !_j.done && (_b = _h.return)) _b.call(_h);
|
|
3374
3394
|
}
|
|
3375
|
-
finally { if (
|
|
3395
|
+
finally { if (e_33) throw e_33.error; }
|
|
3376
3396
|
}
|
|
3377
3397
|
}
|
|
3378
3398
|
}
|
|
3379
|
-
catch (
|
|
3399
|
+
catch (e_32_1) { e_32 = { error: e_32_1 }; }
|
|
3380
3400
|
finally {
|
|
3381
3401
|
try {
|
|
3382
3402
|
if (tabGroupSnapshots_1_1 && !tabGroupSnapshots_1_1.done && (_a = tabGroupSnapshots_1.return)) _a.call(tabGroupSnapshots_1);
|
|
3383
3403
|
}
|
|
3384
|
-
finally { if (
|
|
3404
|
+
finally { if (e_32) throw e_32.error; }
|
|
3385
3405
|
}
|
|
3386
3406
|
// Ensure group becomes active after move
|
|
3387
3407
|
if (options.skipSetActive !== true) {
|
|
@@ -3431,7 +3451,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
3431
3451
|
// and addEdgeGroup.
|
|
3432
3452
|
this._onDidAddGroup.fire(source);
|
|
3433
3453
|
this.movingLock(function () {
|
|
3434
|
-
var
|
|
3454
|
+
var e_37, _a;
|
|
3435
3455
|
try {
|
|
3436
3456
|
for (var movedPanels_2 = __values(movedPanels_1), movedPanels_2_1 = movedPanels_2.next(); !movedPanels_2_1.done; movedPanels_2_1 = movedPanels_2.next()) {
|
|
3437
3457
|
var panel = movedPanels_2_1.value;
|
|
@@ -3441,12 +3461,12 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
3441
3461
|
});
|
|
3442
3462
|
}
|
|
3443
3463
|
}
|
|
3444
|
-
catch (
|
|
3464
|
+
catch (e_37_1) { e_37 = { error: e_37_1 }; }
|
|
3445
3465
|
finally {
|
|
3446
3466
|
try {
|
|
3447
3467
|
if (movedPanels_2_1 && !movedPanels_2_1.done && (_a = movedPanels_2.return)) _a.call(movedPanels_2);
|
|
3448
3468
|
}
|
|
3449
|
-
finally { if (
|
|
3469
|
+
finally { if (e_37) throw e_37.error; }
|
|
3450
3470
|
}
|
|
3451
3471
|
});
|
|
3452
3472
|
try {
|
|
@@ -3459,26 +3479,26 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
3459
3479
|
componentParams: snapshot.componentParams,
|
|
3460
3480
|
});
|
|
3461
3481
|
try {
|
|
3462
|
-
for (var _k = (
|
|
3482
|
+
for (var _k = (e_35 = void 0, __values(snapshot.panelIds)), _l = _k.next(); !_l.done; _l = _k.next()) {
|
|
3463
3483
|
var panelId = _l.value;
|
|
3464
3484
|
source.model.addPanelToTabGroup(newTabGroup.id, panelId);
|
|
3465
3485
|
}
|
|
3466
3486
|
}
|
|
3467
|
-
catch (
|
|
3487
|
+
catch (e_35_1) { e_35 = { error: e_35_1 }; }
|
|
3468
3488
|
finally {
|
|
3469
3489
|
try {
|
|
3470
3490
|
if (_l && !_l.done && (_d = _k.return)) _d.call(_k);
|
|
3471
3491
|
}
|
|
3472
|
-
finally { if (
|
|
3492
|
+
finally { if (e_35) throw e_35.error; }
|
|
3473
3493
|
}
|
|
3474
3494
|
}
|
|
3475
3495
|
}
|
|
3476
|
-
catch (
|
|
3496
|
+
catch (e_34_1) { e_34 = { error: e_34_1 }; }
|
|
3477
3497
|
finally {
|
|
3478
3498
|
try {
|
|
3479
3499
|
if (tabGroupSnapshots_2_1 && !tabGroupSnapshots_2_1.done && (_c = tabGroupSnapshots_2.return)) _c.call(tabGroupSnapshots_2);
|
|
3480
3500
|
}
|
|
3481
|
-
finally { if (
|
|
3501
|
+
finally { if (e_34) throw e_34.error; }
|
|
3482
3502
|
}
|
|
3483
3503
|
}
|
|
3484
3504
|
else {
|
|
@@ -3610,9 +3630,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
3610
3630
|
};
|
|
3611
3631
|
DockviewComponent.prototype.createGroup = function (options) {
|
|
3612
3632
|
var _this = this;
|
|
3613
|
-
|
|
3614
|
-
options = {};
|
|
3615
|
-
}
|
|
3633
|
+
options !== null && options !== void 0 ? options : (options = {});
|
|
3616
3634
|
var id = options === null || options === void 0 ? void 0 : options.id;
|
|
3617
3635
|
if (id && this._groups.has(options.id)) {
|
|
3618
3636
|
console.warn("dockview: Duplicate group id ".concat(options === null || options === void 0 ? void 0 : options.id, ". reassigning group id to avoid errors"));
|
|
@@ -3795,7 +3813,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
3795
3813
|
: (0, gridview_1.orthogonal)(rootOrientation);
|
|
3796
3814
|
};
|
|
3797
3815
|
DockviewComponent.prototype.updateTheme = function () {
|
|
3798
|
-
var
|
|
3816
|
+
var e_38, _a, e_39, _b, e_40, _c;
|
|
3799
3817
|
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
3800
3818
|
var theme = (_d = this._options.theme) !== null && _d !== void 0 ? _d : theme_1.themeAbyss;
|
|
3801
3819
|
// Apply the theme class only to the shell so edge groups and the
|
|
@@ -3813,12 +3831,12 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
3813
3831
|
floating.gridview.margin = gap;
|
|
3814
3832
|
}
|
|
3815
3833
|
}
|
|
3816
|
-
catch (
|
|
3834
|
+
catch (e_38_1) { e_38 = { error: e_38_1 }; }
|
|
3817
3835
|
finally {
|
|
3818
3836
|
try {
|
|
3819
3837
|
if (_q && !_q.done && (_a = _p.return)) _a.call(_p);
|
|
3820
3838
|
}
|
|
3821
|
-
finally { if (
|
|
3839
|
+
finally { if (e_38) throw e_38.error; }
|
|
3822
3840
|
}
|
|
3823
3841
|
try {
|
|
3824
3842
|
for (var _r = __values((_h = (_g = this._popoutWindowService) === null || _g === void 0 ? void 0 : _g.entries) !== null && _h !== void 0 ? _h : []), _s = _r.next(); !_s.done; _s = _r.next()) {
|
|
@@ -3826,21 +3844,21 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
3826
3844
|
entry.gridview.margin = gap;
|
|
3827
3845
|
}
|
|
3828
3846
|
}
|
|
3829
|
-
catch (
|
|
3847
|
+
catch (e_39_1) { e_39 = { error: e_39_1 }; }
|
|
3830
3848
|
finally {
|
|
3831
3849
|
try {
|
|
3832
3850
|
if (_s && !_s.done && (_b = _r.return)) _b.call(_r);
|
|
3833
3851
|
}
|
|
3834
|
-
finally { if (
|
|
3852
|
+
finally { if (e_39) throw e_39.error; }
|
|
3835
3853
|
}
|
|
3836
3854
|
(_j = this._shellManager) === null || _j === void 0 ? void 0 : _j.updateTheme(gap, (_k = theme.edgeGroupCollapsedSize) !== null && _k !== void 0 ? _k : 35);
|
|
3837
|
-
if (theme.dndOverlayBorder
|
|
3838
|
-
this.element.style.
|
|
3839
|
-
(_l = this._shellManager) === null || _l === void 0 ? void 0 : _l.element.style.
|
|
3855
|
+
if (theme.dndOverlayBorder === undefined) {
|
|
3856
|
+
this.element.style.removeProperty('--dv-drag-over-border');
|
|
3857
|
+
(_l = this._shellManager) === null || _l === void 0 ? void 0 : _l.element.style.removeProperty('--dv-drag-over-border');
|
|
3840
3858
|
}
|
|
3841
3859
|
else {
|
|
3842
|
-
this.element.style.
|
|
3843
|
-
(_m = this._shellManager) === null || _m === void 0 ? void 0 : _m.element.style.
|
|
3860
|
+
this.element.style.setProperty('--dv-drag-over-border', theme.dndOverlayBorder);
|
|
3861
|
+
(_m = this._shellManager) === null || _m === void 0 ? void 0 : _m.element.style.setProperty('--dv-drag-over-border', theme.dndOverlayBorder);
|
|
3844
3862
|
}
|
|
3845
3863
|
switch (theme.dndOverlayMounting) {
|
|
3846
3864
|
case 'absolute':
|
|
@@ -3865,12 +3883,12 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
3865
3883
|
group.model.updateTabGroups();
|
|
3866
3884
|
}
|
|
3867
3885
|
}
|
|
3868
|
-
catch (
|
|
3886
|
+
catch (e_40_1) { e_40 = { error: e_40_1 }; }
|
|
3869
3887
|
finally {
|
|
3870
3888
|
try {
|
|
3871
3889
|
if (_u && !_u.done && (_c = _t.return)) _c.call(_t);
|
|
3872
3890
|
}
|
|
3873
|
-
finally { if (
|
|
3891
|
+
finally { if (e_40) throw e_40.error; }
|
|
3874
3892
|
}
|
|
3875
3893
|
};
|
|
3876
3894
|
return DockviewComponent;
|