dockview-angular 4.11.0 → 4.12.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/lib/dockview/dockview-angular.component.js +2 -1
- package/dist/cjs/lib/dockview-angular.module.js +2 -4
- package/dist/cjs/lib/gridview/gridview-angular.component.js +2 -1
- package/dist/cjs/lib/paneview/paneview-angular.component.js +2 -1
- package/dist/cjs/lib/splitview/splitview-angular.component.js +2 -1
- package/dist/cjs/lib/utils/angular-renderer.js +11 -3
- package/dist/cjs/lib/utils/component-factory.js +1 -0
- package/dist/dockview-angular.amd.js +141 -45
- package/dist/dockview-angular.amd.js.map +1 -1
- package/dist/dockview-angular.amd.min.js +2 -2
- package/dist/dockview-angular.amd.min.js.map +1 -1
- package/dist/dockview-angular.amd.min.noStyle.js +2 -2
- package/dist/dockview-angular.amd.min.noStyle.js.map +1 -1
- package/dist/dockview-angular.amd.noStyle.js +141 -45
- package/dist/dockview-angular.amd.noStyle.js.map +1 -1
- package/dist/dockview-angular.cjs.js +141 -45
- package/dist/dockview-angular.cjs.js.map +1 -1
- package/dist/dockview-angular.esm.js +141 -45
- package/dist/dockview-angular.esm.js.map +1 -1
- package/dist/dockview-angular.esm.min.js +2 -2
- package/dist/dockview-angular.esm.min.js.map +1 -1
- package/dist/dockview-angular.js +141 -45
- package/dist/dockview-angular.js.map +1 -1
- package/dist/dockview-angular.min.js +2 -2
- package/dist/dockview-angular.min.js.map +1 -1
- package/dist/dockview-angular.min.noStyle.js +2 -2
- package/dist/dockview-angular.min.noStyle.js.map +1 -1
- package/dist/dockview-angular.noStyle.js +141 -45
- package/dist/dockview-angular.noStyle.js.map +1 -1
- package/dist/esm/lib/dockview/dockview-angular.component.js +2 -1
- package/dist/esm/lib/dockview-angular.module.js +2 -4
- package/dist/esm/lib/gridview/gridview-angular.component.js +2 -1
- package/dist/esm/lib/paneview/paneview-angular.component.js +2 -1
- package/dist/esm/lib/splitview/splitview-angular.component.js +2 -1
- package/dist/esm/lib/utils/angular-renderer.js +11 -3
- package/dist/esm/lib/utils/component-factory.js +1 -0
- package/package.json +2 -2
|
@@ -237,6 +237,7 @@ __decorate([
|
|
|
237
237
|
exports.DockviewAngularComponent = DockviewAngularComponent = __decorate([
|
|
238
238
|
(0, core_1.Component)({
|
|
239
239
|
selector: 'dv-dockview',
|
|
240
|
+
standalone: true,
|
|
240
241
|
template: '<div #dockviewContainer class="dockview-container"></div>',
|
|
241
242
|
styles: [`
|
|
242
243
|
:host {
|
|
@@ -244,7 +245,7 @@ exports.DockviewAngularComponent = DockviewAngularComponent = __decorate([
|
|
|
244
245
|
width: 100%;
|
|
245
246
|
height: 100%;
|
|
246
247
|
}
|
|
247
|
-
|
|
248
|
+
|
|
248
249
|
.dockview-container {
|
|
249
250
|
width: 100%;
|
|
250
251
|
height: 100%;
|
|
@@ -18,15 +18,13 @@ let DockviewAngularModule = class DockviewAngularModule {
|
|
|
18
18
|
exports.DockviewAngularModule = DockviewAngularModule;
|
|
19
19
|
exports.DockviewAngularModule = DockviewAngularModule = __decorate([
|
|
20
20
|
(0, core_1.NgModule)({
|
|
21
|
-
|
|
21
|
+
imports: [
|
|
22
|
+
common_1.CommonModule,
|
|
22
23
|
dockview_angular_component_1.DockviewAngularComponent,
|
|
23
24
|
gridview_angular_component_1.GridviewAngularComponent,
|
|
24
25
|
paneview_angular_component_1.PaneviewAngularComponent,
|
|
25
26
|
splitview_angular_component_1.SplitviewAngularComponent
|
|
26
27
|
],
|
|
27
|
-
imports: [
|
|
28
|
-
common_1.CommonModule
|
|
29
|
-
],
|
|
30
28
|
exports: [
|
|
31
29
|
dockview_angular_component_1.DockviewAngularComponent,
|
|
32
30
|
gridview_angular_component_1.GridviewAngularComponent,
|
|
@@ -121,6 +121,7 @@ __decorate([
|
|
|
121
121
|
exports.GridviewAngularComponent = GridviewAngularComponent = __decorate([
|
|
122
122
|
(0, core_1.Component)({
|
|
123
123
|
selector: 'dv-gridview',
|
|
124
|
+
standalone: true,
|
|
124
125
|
template: '<div #gridviewContainer class="gridview-container"></div>',
|
|
125
126
|
styles: [`
|
|
126
127
|
:host {
|
|
@@ -128,7 +129,7 @@ exports.GridviewAngularComponent = GridviewAngularComponent = __decorate([
|
|
|
128
129
|
width: 100%;
|
|
129
130
|
height: 100%;
|
|
130
131
|
}
|
|
131
|
-
|
|
132
|
+
|
|
132
133
|
.gridview-container {
|
|
133
134
|
width: 100%;
|
|
134
135
|
height: 100%;
|
|
@@ -147,6 +147,7 @@ __decorate([
|
|
|
147
147
|
exports.PaneviewAngularComponent = PaneviewAngularComponent = __decorate([
|
|
148
148
|
(0, core_1.Component)({
|
|
149
149
|
selector: 'dv-paneview',
|
|
150
|
+
standalone: true,
|
|
150
151
|
template: '<div #paneviewContainer class="paneview-container"></div>',
|
|
151
152
|
styles: [`
|
|
152
153
|
:host {
|
|
@@ -154,7 +155,7 @@ exports.PaneviewAngularComponent = PaneviewAngularComponent = __decorate([
|
|
|
154
155
|
width: 100%;
|
|
155
156
|
height: 100%;
|
|
156
157
|
}
|
|
157
|
-
|
|
158
|
+
|
|
158
159
|
.paneview-container {
|
|
159
160
|
width: 100%;
|
|
160
161
|
height: 100%;
|
|
@@ -121,6 +121,7 @@ __decorate([
|
|
|
121
121
|
exports.SplitviewAngularComponent = SplitviewAngularComponent = __decorate([
|
|
122
122
|
(0, core_1.Component)({
|
|
123
123
|
selector: 'dv-splitview',
|
|
124
|
+
standalone: true,
|
|
124
125
|
template: '<div #splitviewContainer class="splitview-container"></div>',
|
|
125
126
|
styles: [`
|
|
126
127
|
:host {
|
|
@@ -128,7 +129,7 @@ exports.SplitviewAngularComponent = SplitviewAngularComponent = __decorate([
|
|
|
128
129
|
width: 100%;
|
|
129
130
|
height: 100%;
|
|
130
131
|
}
|
|
131
|
-
|
|
132
|
+
|
|
132
133
|
.splitview-container {
|
|
133
134
|
width: 100%;
|
|
134
135
|
height: 100%;
|
|
@@ -15,12 +15,19 @@ class AngularRenderer {
|
|
|
15
15
|
return this._element;
|
|
16
16
|
}
|
|
17
17
|
init(parameters) {
|
|
18
|
-
|
|
18
|
+
// If already initialized, just update the parameters
|
|
19
|
+
if (this.componentRef) {
|
|
20
|
+
this.update(parameters);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
this.render(parameters);
|
|
24
|
+
}
|
|
19
25
|
}
|
|
20
26
|
update(params) {
|
|
21
27
|
if (this.componentRef) {
|
|
22
28
|
Object.keys(params).forEach(key => {
|
|
23
|
-
|
|
29
|
+
// Use 'in' operator instead of hasOwnProperty to support getter/setter properties
|
|
30
|
+
if (key in this.componentRef.instance) {
|
|
24
31
|
this.componentRef.instance[key] = params[key];
|
|
25
32
|
}
|
|
26
33
|
});
|
|
@@ -36,7 +43,8 @@ class AngularRenderer {
|
|
|
36
43
|
});
|
|
37
44
|
// Set initial parameters
|
|
38
45
|
Object.keys(parameters).forEach(key => {
|
|
39
|
-
|
|
46
|
+
// Use 'in' operator instead of hasOwnProperty to support getter/setter properties
|
|
47
|
+
if (key in this.componentRef.instance) {
|
|
40
48
|
this.componentRef.instance[key] = parameters[key];
|
|
41
49
|
}
|
|
42
50
|
});
|
|
@@ -95,6 +95,7 @@ class AngularFrameworkComponentFactory {
|
|
|
95
95
|
injector: this.injector,
|
|
96
96
|
environmentInjector: this.environmentInjector
|
|
97
97
|
});
|
|
98
|
+
// Initialize with empty props - dockview-core will call init() again with actual IGroupHeaderProps
|
|
98
99
|
renderer.init({});
|
|
99
100
|
return renderer;
|
|
100
101
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-angular
|
|
3
|
-
* @version 4.
|
|
3
|
+
* @version 4.12.0
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -3781,8 +3781,8 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
3781
3781
|
/**
|
|
3782
3782
|
* Create a component from a serialized object.
|
|
3783
3783
|
*/
|
|
3784
|
-
fromJSON(data) {
|
|
3785
|
-
this.component.fromJSON(data);
|
|
3784
|
+
fromJSON(data, options) {
|
|
3785
|
+
this.component.fromJSON(data, options);
|
|
3786
3786
|
}
|
|
3787
3787
|
/**
|
|
3788
3788
|
* Create a serialized object of the current component.
|
|
@@ -5013,6 +5013,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
5013
5013
|
}
|
|
5014
5014
|
if (doRender) {
|
|
5015
5015
|
const focusTracker = trackFocus(container);
|
|
5016
|
+
this.focusTracker = focusTracker;
|
|
5016
5017
|
const disposable = new CompositeDisposable();
|
|
5017
5018
|
disposable.addDisposables(focusTracker, focusTracker.onDidFocus(() => this._onDidFocus.fire()), focusTracker.onDidBlur(() => this._onDidBlur.fire()));
|
|
5018
5019
|
this.disposable.value = disposable;
|
|
@@ -5040,6 +5041,16 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
5040
5041
|
this.disposable.dispose();
|
|
5041
5042
|
super.dispose();
|
|
5042
5043
|
}
|
|
5044
|
+
/**
|
|
5045
|
+
* Refresh the focus tracker state to handle cases where focus state
|
|
5046
|
+
* gets out of sync due to programmatic panel activation
|
|
5047
|
+
*/
|
|
5048
|
+
refreshFocusState() {
|
|
5049
|
+
var _a;
|
|
5050
|
+
if ((_a = this.focusTracker) === null || _a === void 0 ? void 0 : _a.refreshState) {
|
|
5051
|
+
this.focusTracker.refreshState();
|
|
5052
|
+
}
|
|
5053
|
+
}
|
|
5043
5054
|
}
|
|
5044
5055
|
|
|
5045
5056
|
function addGhostImage(dataTransfer, ghostElement, options) {
|
|
@@ -6366,8 +6377,11 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
6366
6377
|
this._activePanel = panel;
|
|
6367
6378
|
if (panel) {
|
|
6368
6379
|
this.tabsContainer.setActivePanel(panel);
|
|
6380
|
+
this.contentContainer.openPanel(panel);
|
|
6369
6381
|
panel.layout(this._width, this._height);
|
|
6370
6382
|
this.updateMru(panel);
|
|
6383
|
+
// Refresh focus state to handle programmatic activation without DOM focus change
|
|
6384
|
+
this.contentContainer.refreshFocusState();
|
|
6371
6385
|
this._onDidActivePanelChange.fire({
|
|
6372
6386
|
panel,
|
|
6373
6387
|
});
|
|
@@ -7197,6 +7211,18 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
7197
7211
|
params: this._params,
|
|
7198
7212
|
});
|
|
7199
7213
|
}
|
|
7214
|
+
updateFromStateModel(state) {
|
|
7215
|
+
var _a, _b, _c;
|
|
7216
|
+
this._maximumHeight = state.maximumHeight;
|
|
7217
|
+
this._minimumHeight = state.minimumHeight;
|
|
7218
|
+
this._maximumWidth = state.maximumWidth;
|
|
7219
|
+
this._minimumWidth = state.minimumWidth;
|
|
7220
|
+
this.update({ params: (_a = state.params) !== null && _a !== void 0 ? _a : {} });
|
|
7221
|
+
this.setTitle((_b = state.title) !== null && _b !== void 0 ? _b : this.id);
|
|
7222
|
+
this.setRenderer((_c = state.renderer) !== null && _c !== void 0 ? _c : this.accessor.renderer);
|
|
7223
|
+
// state.contentComponent;
|
|
7224
|
+
// state.tabComponent;
|
|
7225
|
+
}
|
|
7200
7226
|
updateParentGroup(group, options) {
|
|
7201
7227
|
this._group = group;
|
|
7202
7228
|
this.api.group = this._group;
|
|
@@ -8960,7 +8986,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
8960
8986
|
: (_e = (_d = this.options.floatingGroupBounds) === null || _d === void 0 ? void 0 : _d.minimumHeightWithinViewport) !== null && _e !== void 0 ? _e : DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE }));
|
|
8961
8987
|
const el = group.element.querySelector('.dv-void-container');
|
|
8962
8988
|
if (!el) {
|
|
8963
|
-
throw new Error('failed to find drag handle');
|
|
8989
|
+
throw new Error('dockview: failed to find drag handle');
|
|
8964
8990
|
}
|
|
8965
8991
|
overlay.setupDrag(el, {
|
|
8966
8992
|
inDragMode: typeof (options === null || options === void 0 ? void 0 : options.inDragMode) === 'boolean'
|
|
@@ -9032,7 +9058,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9032
9058
|
case 'right':
|
|
9033
9059
|
return this.createGroupAtLocation([this.gridview.length], undefined, options); // insert into last position
|
|
9034
9060
|
default:
|
|
9035
|
-
throw new Error(`unsupported position ${position}`);
|
|
9061
|
+
throw new Error(`dockview: unsupported position ${position}`);
|
|
9036
9062
|
}
|
|
9037
9063
|
}
|
|
9038
9064
|
updateOptions(options) {
|
|
@@ -9178,15 +9204,48 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9178
9204
|
}
|
|
9179
9205
|
return result;
|
|
9180
9206
|
}
|
|
9181
|
-
fromJSON(data) {
|
|
9207
|
+
fromJSON(data, options) {
|
|
9182
9208
|
var _a, _b;
|
|
9209
|
+
const existingPanels = new Map();
|
|
9210
|
+
let tempGroup;
|
|
9211
|
+
if (options === null || options === void 0 ? void 0 : options.reuseExistingPanels) {
|
|
9212
|
+
/**
|
|
9213
|
+
* What are we doing here?
|
|
9214
|
+
*
|
|
9215
|
+
* 1. Create a temporary group to hold any panels that currently exist and that also exist in the new layout
|
|
9216
|
+
* 2. Remove that temporary group from the group mapping so that it doesn't get cleared when we clear the layout
|
|
9217
|
+
*/
|
|
9218
|
+
tempGroup = this.createGroup();
|
|
9219
|
+
this._groups.delete(tempGroup.api.id);
|
|
9220
|
+
const newPanels = Object.keys(data.panels);
|
|
9221
|
+
for (const panel of this.panels) {
|
|
9222
|
+
if (newPanels.includes(panel.api.id)) {
|
|
9223
|
+
existingPanels.set(panel.api.id, panel);
|
|
9224
|
+
}
|
|
9225
|
+
}
|
|
9226
|
+
this.movingLock(() => {
|
|
9227
|
+
Array.from(existingPanels.values()).forEach((panel) => {
|
|
9228
|
+
this.moveGroupOrPanel({
|
|
9229
|
+
from: {
|
|
9230
|
+
groupId: panel.api.group.api.id,
|
|
9231
|
+
panelId: panel.api.id,
|
|
9232
|
+
},
|
|
9233
|
+
to: {
|
|
9234
|
+
group: tempGroup,
|
|
9235
|
+
position: 'center',
|
|
9236
|
+
},
|
|
9237
|
+
keepEmptyGroups: true,
|
|
9238
|
+
});
|
|
9239
|
+
});
|
|
9240
|
+
});
|
|
9241
|
+
}
|
|
9183
9242
|
this.clear();
|
|
9184
9243
|
if (typeof data !== 'object' || data === null) {
|
|
9185
|
-
throw new Error('serialized layout must be a non-null object');
|
|
9244
|
+
throw new Error('dockview: serialized layout must be a non-null object');
|
|
9186
9245
|
}
|
|
9187
9246
|
const { grid, panels, activeGroup } = data;
|
|
9188
9247
|
if (grid.root.type !== 'branch' || !Array.isArray(grid.root.data)) {
|
|
9189
|
-
throw new Error('root must be of type branch');
|
|
9248
|
+
throw new Error('dockview: root must be of type branch');
|
|
9190
9249
|
}
|
|
9191
9250
|
try {
|
|
9192
9251
|
// take note of the existing dimensions
|
|
@@ -9195,7 +9254,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9195
9254
|
const createGroupFromSerializedState = (data) => {
|
|
9196
9255
|
const { id, locked, hideHeader, views, activeView } = data;
|
|
9197
9256
|
if (typeof id !== 'string') {
|
|
9198
|
-
throw new Error('group id must be of type string');
|
|
9257
|
+
throw new Error('dockview: group id must be of type string');
|
|
9199
9258
|
}
|
|
9200
9259
|
const group = this.createGroup({
|
|
9201
9260
|
id,
|
|
@@ -9210,17 +9269,38 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9210
9269
|
* In running this section first we avoid firing lots of 'add' events in the event of a failure
|
|
9211
9270
|
* due to a corruption of input data.
|
|
9212
9271
|
*/
|
|
9213
|
-
const
|
|
9214
|
-
|
|
9272
|
+
const existingPanel = existingPanels.get(child);
|
|
9273
|
+
if (tempGroup && existingPanel) {
|
|
9274
|
+
this.movingLock(() => {
|
|
9275
|
+
tempGroup.model.removePanel(existingPanel);
|
|
9276
|
+
});
|
|
9277
|
+
createdPanels.push(existingPanel);
|
|
9278
|
+
existingPanel.updateFromStateModel(panels[child]);
|
|
9279
|
+
}
|
|
9280
|
+
else {
|
|
9281
|
+
const panel = this._deserializer.fromJSON(panels[child], group);
|
|
9282
|
+
createdPanels.push(panel);
|
|
9283
|
+
}
|
|
9215
9284
|
}
|
|
9216
9285
|
for (let i = 0; i < views.length; i++) {
|
|
9217
9286
|
const panel = createdPanels[i];
|
|
9218
9287
|
const isActive = typeof activeView === 'string' &&
|
|
9219
9288
|
activeView === panel.id;
|
|
9220
|
-
|
|
9221
|
-
|
|
9222
|
-
|
|
9223
|
-
|
|
9289
|
+
const hasExisting = existingPanels.has(panel.api.id);
|
|
9290
|
+
if (hasExisting) {
|
|
9291
|
+
this.movingLock(() => {
|
|
9292
|
+
group.model.openPanel(panel, {
|
|
9293
|
+
skipSetActive: !isActive,
|
|
9294
|
+
skipSetGroupActive: true,
|
|
9295
|
+
});
|
|
9296
|
+
});
|
|
9297
|
+
}
|
|
9298
|
+
else {
|
|
9299
|
+
group.model.openPanel(panel, {
|
|
9300
|
+
skipSetActive: !isActive,
|
|
9301
|
+
skipSetGroupActive: true,
|
|
9302
|
+
});
|
|
9303
|
+
}
|
|
9224
9304
|
}
|
|
9225
9305
|
if (!group.activePanel && group.panels.length > 0) {
|
|
9226
9306
|
group.model.openPanel(group.panels[group.panels.length - 1], {
|
|
@@ -9259,7 +9339,9 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9259
9339
|
setTimeout(() => {
|
|
9260
9340
|
this.addPopoutGroup(group, {
|
|
9261
9341
|
position: position !== null && position !== void 0 ? position : undefined,
|
|
9262
|
-
overridePopoutGroup: gridReferenceGroup
|
|
9342
|
+
overridePopoutGroup: gridReferenceGroup
|
|
9343
|
+
? group
|
|
9344
|
+
: undefined,
|
|
9263
9345
|
referenceGroup: gridReferenceGroup
|
|
9264
9346
|
? this.getPanel(gridReferenceGroup)
|
|
9265
9347
|
: undefined,
|
|
@@ -9345,11 +9427,11 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9345
9427
|
addPanel(options) {
|
|
9346
9428
|
var _a, _b;
|
|
9347
9429
|
if (this.panels.find((_) => _.id === options.id)) {
|
|
9348
|
-
throw new Error(`panel with id ${options.id} already exists`);
|
|
9430
|
+
throw new Error(`dockview: panel with id ${options.id} already exists`);
|
|
9349
9431
|
}
|
|
9350
9432
|
let referenceGroup;
|
|
9351
9433
|
if (options.position && options.floating) {
|
|
9352
|
-
throw new Error('you can only provide one of: position, floating as arguments to .addPanel(...)');
|
|
9434
|
+
throw new Error('dockview: you can only provide one of: position, floating as arguments to .addPanel(...)');
|
|
9353
9435
|
}
|
|
9354
9436
|
const initial = {
|
|
9355
9437
|
width: options.initialWidth,
|
|
@@ -9363,7 +9445,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9363
9445
|
: options.position.referencePanel;
|
|
9364
9446
|
index = options.position.index;
|
|
9365
9447
|
if (!referencePanel) {
|
|
9366
|
-
throw new Error(`referencePanel '${options.position.referencePanel}' does not exist`);
|
|
9448
|
+
throw new Error(`dockview: referencePanel '${options.position.referencePanel}' does not exist`);
|
|
9367
9449
|
}
|
|
9368
9450
|
referenceGroup = this.findGroup(referencePanel);
|
|
9369
9451
|
}
|
|
@@ -9374,7 +9456,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9374
9456
|
: options.position.referenceGroup;
|
|
9375
9457
|
index = options.position.index;
|
|
9376
9458
|
if (!referenceGroup) {
|
|
9377
|
-
throw new Error(`referenceGroup '${options.position.referenceGroup}' does not exist`);
|
|
9459
|
+
throw new Error(`dockview: referenceGroup '${options.position.referenceGroup}' does not exist`);
|
|
9378
9460
|
}
|
|
9379
9461
|
}
|
|
9380
9462
|
else {
|
|
@@ -9486,7 +9568,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9486
9568
|
}) {
|
|
9487
9569
|
const group = panel.group;
|
|
9488
9570
|
if (!group) {
|
|
9489
|
-
throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
|
|
9571
|
+
throw new Error(`dockview: cannot remove panel ${panel.id}. it's missing a group.`);
|
|
9490
9572
|
}
|
|
9491
9573
|
group.model.removePanel(panel, {
|
|
9492
9574
|
skipSetActiveGroup: options.skipSetActiveGroup,
|
|
@@ -9535,11 +9617,11 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9535
9617
|
? this.panels.find((panel) => panel.id === options.referencePanel)
|
|
9536
9618
|
: options.referencePanel;
|
|
9537
9619
|
if (!referencePanel) {
|
|
9538
|
-
throw new Error(`reference panel ${options.referencePanel} does not exist`);
|
|
9620
|
+
throw new Error(`dockview: reference panel ${options.referencePanel} does not exist`);
|
|
9539
9621
|
}
|
|
9540
9622
|
referenceGroup = this.findGroup(referencePanel);
|
|
9541
9623
|
if (!referenceGroup) {
|
|
9542
|
-
throw new Error(`reference group for reference panel ${options.referencePanel} does not exist`);
|
|
9624
|
+
throw new Error(`dockview: reference group for reference panel ${options.referencePanel} does not exist`);
|
|
9543
9625
|
}
|
|
9544
9626
|
}
|
|
9545
9627
|
else if (isGroupOptionsWithGroup(options)) {
|
|
@@ -9548,7 +9630,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9548
9630
|
? (_a = this._groups.get(options.referenceGroup)) === null || _a === void 0 ? void 0 : _a.value
|
|
9549
9631
|
: options.referenceGroup;
|
|
9550
9632
|
if (!referenceGroup) {
|
|
9551
|
-
throw new Error(`reference group ${options.referenceGroup} does not exist`);
|
|
9633
|
+
throw new Error(`dockview: reference group ${options.referenceGroup} does not exist`);
|
|
9552
9634
|
}
|
|
9553
9635
|
}
|
|
9554
9636
|
else {
|
|
@@ -9616,7 +9698,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9616
9698
|
}
|
|
9617
9699
|
return floatingGroup.group;
|
|
9618
9700
|
}
|
|
9619
|
-
throw new Error('failed to find floating group');
|
|
9701
|
+
throw new Error('dockview: failed to find floating group');
|
|
9620
9702
|
}
|
|
9621
9703
|
if (group.api.location.type === 'popout') {
|
|
9622
9704
|
const selectedGroup = this._popoutGroups.find((_) => _.popoutGroup === group);
|
|
@@ -9647,7 +9729,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9647
9729
|
this.updateWatermark();
|
|
9648
9730
|
return selectedGroup.popoutGroup;
|
|
9649
9731
|
}
|
|
9650
|
-
throw new Error('failed to find popout group');
|
|
9732
|
+
throw new Error('dockview: failed to find popout group');
|
|
9651
9733
|
}
|
|
9652
9734
|
const re = super.doRemoveGroup(group, options);
|
|
9653
9735
|
if (!(options === null || options === void 0 ? void 0 : options.skipActive)) {
|
|
@@ -9678,7 +9760,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9678
9760
|
? (_a = this._groups.get(sourceGroupId)) === null || _a === void 0 ? void 0 : _a.value
|
|
9679
9761
|
: undefined;
|
|
9680
9762
|
if (!sourceGroup) {
|
|
9681
|
-
throw new Error(`Failed to find group id ${sourceGroupId}`);
|
|
9763
|
+
throw new Error(`dockview: Failed to find group id ${sourceGroupId}`);
|
|
9682
9764
|
}
|
|
9683
9765
|
if (sourceItemId === undefined) {
|
|
9684
9766
|
/**
|
|
@@ -9703,9 +9785,9 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9703
9785
|
skipSetActiveGroup: true,
|
|
9704
9786
|
}));
|
|
9705
9787
|
if (!removedPanel) {
|
|
9706
|
-
throw new Error(`No panel with id ${sourceItemId}`);
|
|
9788
|
+
throw new Error(`dockview: No panel with id ${sourceItemId}`);
|
|
9707
9789
|
}
|
|
9708
|
-
if (sourceGroup.model.size === 0) {
|
|
9790
|
+
if (!options.keepEmptyGroups && sourceGroup.model.size === 0) {
|
|
9709
9791
|
// remove the group and do not set a new group as active
|
|
9710
9792
|
this.doRemoveGroup(sourceGroup, { skipActive: true });
|
|
9711
9793
|
}
|
|
@@ -9715,7 +9797,8 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9715
9797
|
var _a;
|
|
9716
9798
|
return destinationGroup.model.openPanel(removedPanel, {
|
|
9717
9799
|
index: destinationIndex,
|
|
9718
|
-
skipSetActive: ((_a = options.skipSetActive) !== null && _a !== void 0 ? _a : false) &&
|
|
9800
|
+
skipSetActive: ((_a = options.skipSetActive) !== null && _a !== void 0 ? _a : false) &&
|
|
9801
|
+
!isDestinationGroupEmpty,
|
|
9719
9802
|
skipSetGroupActive: true,
|
|
9720
9803
|
});
|
|
9721
9804
|
});
|
|
@@ -9770,7 +9853,9 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9770
9853
|
}));
|
|
9771
9854
|
this.doRemoveGroup(sourceGroup, { skipActive: true });
|
|
9772
9855
|
const newGroup = this.createGroupAtLocation(targetLocation);
|
|
9773
|
-
this.movingLock(() => newGroup.model.openPanel(removedPanel
|
|
9856
|
+
this.movingLock(() => newGroup.model.openPanel(removedPanel, {
|
|
9857
|
+
skipSetActive: true,
|
|
9858
|
+
}));
|
|
9774
9859
|
this.doSetGroupAndPanelActive(newGroup);
|
|
9775
9860
|
this._onDidMovePanel.fire({
|
|
9776
9861
|
panel: this.getGroupPanel(sourceItemId),
|
|
@@ -9803,7 +9888,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9803
9888
|
skipSetActiveGroup: true,
|
|
9804
9889
|
}));
|
|
9805
9890
|
if (!removedPanel) {
|
|
9806
|
-
throw new Error(`No panel with id ${sourceItemId}`);
|
|
9891
|
+
throw new Error(`dockview: No panel with id ${sourceItemId}`);
|
|
9807
9892
|
}
|
|
9808
9893
|
const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, destinationTarget);
|
|
9809
9894
|
const group = this.createGroupAtLocation(dropLocation);
|
|
@@ -9858,7 +9943,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9858
9943
|
case 'floating': {
|
|
9859
9944
|
const selectedFloatingGroup = this._floatingGroups.find((x) => x.group === from);
|
|
9860
9945
|
if (!selectedFloatingGroup) {
|
|
9861
|
-
throw new Error('failed to find floating group');
|
|
9946
|
+
throw new Error('dockview: failed to find floating group');
|
|
9862
9947
|
}
|
|
9863
9948
|
selectedFloatingGroup.dispose();
|
|
9864
9949
|
break;
|
|
@@ -9866,7 +9951,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9866
9951
|
case 'popout': {
|
|
9867
9952
|
const selectedPopoutGroup = this._popoutGroups.find((x) => x.popoutGroup === from);
|
|
9868
9953
|
if (!selectedPopoutGroup) {
|
|
9869
|
-
throw new Error('failed to find popout group');
|
|
9954
|
+
throw new Error('dockview: failed to find popout group');
|
|
9870
9955
|
}
|
|
9871
9956
|
// Remove from popout groups list to prevent automatic restoration
|
|
9872
9957
|
const index = this._popoutGroups.indexOf(selectedPopoutGroup);
|
|
@@ -11315,12 +11400,19 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
11315
11400
|
return this._element;
|
|
11316
11401
|
}
|
|
11317
11402
|
init(parameters) {
|
|
11318
|
-
|
|
11403
|
+
// If already initialized, just update the parameters
|
|
11404
|
+
if (this.componentRef) {
|
|
11405
|
+
this.update(parameters);
|
|
11406
|
+
}
|
|
11407
|
+
else {
|
|
11408
|
+
this.render(parameters);
|
|
11409
|
+
}
|
|
11319
11410
|
}
|
|
11320
11411
|
update(params) {
|
|
11321
11412
|
if (this.componentRef) {
|
|
11322
11413
|
Object.keys(params).forEach(key => {
|
|
11323
|
-
|
|
11414
|
+
// Use 'in' operator instead of hasOwnProperty to support getter/setter properties
|
|
11415
|
+
if (key in this.componentRef.instance) {
|
|
11324
11416
|
this.componentRef.instance[key] = params[key];
|
|
11325
11417
|
}
|
|
11326
11418
|
});
|
|
@@ -11336,7 +11428,8 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
11336
11428
|
});
|
|
11337
11429
|
// Set initial parameters
|
|
11338
11430
|
Object.keys(parameters).forEach(key => {
|
|
11339
|
-
|
|
11431
|
+
// Use 'in' operator instead of hasOwnProperty to support getter/setter properties
|
|
11432
|
+
if (key in this.componentRef.instance) {
|
|
11340
11433
|
this.componentRef.instance[key] = parameters[key];
|
|
11341
11434
|
}
|
|
11342
11435
|
});
|
|
@@ -11507,6 +11600,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
11507
11600
|
injector: this.injector,
|
|
11508
11601
|
environmentInjector: this.environmentInjector
|
|
11509
11602
|
});
|
|
11603
|
+
// Initialize with empty props - dockview-core will call init() again with actual IGroupHeaderProps
|
|
11510
11604
|
renderer.init({});
|
|
11511
11605
|
return renderer;
|
|
11512
11606
|
}
|
|
@@ -12564,6 +12658,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12564
12658
|
exports.DockviewAngularComponent = __decorate([
|
|
12565
12659
|
core.Component({
|
|
12566
12660
|
selector: 'dv-dockview',
|
|
12661
|
+
standalone: true,
|
|
12567
12662
|
template: '<div #dockviewContainer class="dockview-container"></div>',
|
|
12568
12663
|
styles: [`
|
|
12569
12664
|
:host {
|
|
@@ -12571,7 +12666,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12571
12666
|
width: 100%;
|
|
12572
12667
|
height: 100%;
|
|
12573
12668
|
}
|
|
12574
|
-
|
|
12669
|
+
|
|
12575
12670
|
.dockview-container {
|
|
12576
12671
|
width: 100%;
|
|
12577
12672
|
height: 100%;
|
|
@@ -12687,6 +12782,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12687
12782
|
exports.GridviewAngularComponent = __decorate([
|
|
12688
12783
|
core.Component({
|
|
12689
12784
|
selector: 'dv-gridview',
|
|
12785
|
+
standalone: true,
|
|
12690
12786
|
template: '<div #gridviewContainer class="gridview-container"></div>',
|
|
12691
12787
|
styles: [`
|
|
12692
12788
|
:host {
|
|
@@ -12694,7 +12790,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12694
12790
|
width: 100%;
|
|
12695
12791
|
height: 100%;
|
|
12696
12792
|
}
|
|
12697
|
-
|
|
12793
|
+
|
|
12698
12794
|
.gridview-container {
|
|
12699
12795
|
width: 100%;
|
|
12700
12796
|
height: 100%;
|
|
@@ -12835,6 +12931,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12835
12931
|
exports.PaneviewAngularComponent = __decorate([
|
|
12836
12932
|
core.Component({
|
|
12837
12933
|
selector: 'dv-paneview',
|
|
12934
|
+
standalone: true,
|
|
12838
12935
|
template: '<div #paneviewContainer class="paneview-container"></div>',
|
|
12839
12936
|
styles: [`
|
|
12840
12937
|
:host {
|
|
@@ -12842,7 +12939,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12842
12939
|
width: 100%;
|
|
12843
12940
|
height: 100%;
|
|
12844
12941
|
}
|
|
12845
|
-
|
|
12942
|
+
|
|
12846
12943
|
.paneview-container {
|
|
12847
12944
|
width: 100%;
|
|
12848
12945
|
height: 100%;
|
|
@@ -12958,6 +13055,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12958
13055
|
exports.SplitviewAngularComponent = __decorate([
|
|
12959
13056
|
core.Component({
|
|
12960
13057
|
selector: 'dv-splitview',
|
|
13058
|
+
standalone: true,
|
|
12961
13059
|
template: '<div #splitviewContainer class="splitview-container"></div>',
|
|
12962
13060
|
styles: [`
|
|
12963
13061
|
:host {
|
|
@@ -12965,7 +13063,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12965
13063
|
width: 100%;
|
|
12966
13064
|
height: 100%;
|
|
12967
13065
|
}
|
|
12968
|
-
|
|
13066
|
+
|
|
12969
13067
|
.splitview-container {
|
|
12970
13068
|
width: 100%;
|
|
12971
13069
|
height: 100%;
|
|
@@ -12979,15 +13077,13 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12979
13077
|
};
|
|
12980
13078
|
exports.DockviewAngularModule = __decorate([
|
|
12981
13079
|
core.NgModule({
|
|
12982
|
-
|
|
13080
|
+
imports: [
|
|
13081
|
+
common.CommonModule,
|
|
12983
13082
|
exports.DockviewAngularComponent,
|
|
12984
13083
|
exports.GridviewAngularComponent,
|
|
12985
13084
|
exports.PaneviewAngularComponent,
|
|
12986
13085
|
exports.SplitviewAngularComponent
|
|
12987
13086
|
],
|
|
12988
|
-
imports: [
|
|
12989
|
-
common.CommonModule
|
|
12990
|
-
],
|
|
12991
13087
|
exports: [
|
|
12992
13088
|
exports.DockviewAngularComponent,
|
|
12993
13089
|
exports.GridviewAngularComponent,
|