dockview-angular 4.13.0 → 5.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/README.md +49 -17
- package/dist/README.md +88 -0
- package/dist/dockview-angular.d.ts.map +1 -0
- package/dist/dockview.css +63 -7
- package/dist/esm2022/dockview-angular.mjs +5 -0
- package/dist/esm2022/lib/dockview/dockview-angular.component.mjs +185 -0
- package/dist/esm2022/lib/dockview/types.mjs +3 -0
- package/dist/esm2022/lib/dockview-angular.module.mjs +38 -0
- package/dist/esm2022/lib/gridview/angular-gridview-panel.mjs +24 -0
- package/dist/esm2022/lib/gridview/gridview-angular.component.mjs +98 -0
- package/dist/esm2022/lib/gridview/types.mjs +3 -0
- package/dist/esm2022/lib/paneview/angular-pane-part.mjs +26 -0
- package/dist/esm2022/lib/paneview/paneview-angular.component.mjs +122 -0
- package/dist/esm2022/lib/paneview/types.mjs +3 -0
- package/dist/esm2022/lib/splitview/angular-splitview-panel.mjs +24 -0
- package/dist/esm2022/lib/splitview/splitview-angular.component.mjs +98 -0
- package/dist/esm2022/lib/splitview/types.mjs +3 -0
- package/dist/esm2022/lib/utils/angular-renderer.mjs +83 -0
- package/dist/esm2022/lib/utils/component-factory.mjs +100 -0
- package/dist/esm2022/lib/utils/lifecycle-utils.mjs +69 -0
- package/dist/esm2022/public-api.mjs +17 -0
- package/dist/fesm2022/dockview-angular.mjs +846 -0
- package/dist/fesm2022/dockview-angular.mjs.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/{cjs/lib → lib}/dockview/dockview-angular.component.d.ts +4 -0
- package/dist/lib/dockview/dockview-angular.component.d.ts.map +1 -0
- package/dist/{cjs/lib → lib}/dockview/types.d.ts +2 -1
- package/dist/lib/dockview/types.d.ts.map +1 -0
- package/dist/lib/dockview-angular.module.d.ts +12 -0
- package/dist/lib/dockview-angular.module.d.ts.map +1 -0
- package/dist/{cjs/lib → lib}/gridview/angular-gridview-panel.d.ts +1 -0
- package/dist/lib/gridview/angular-gridview-panel.d.ts.map +1 -0
- package/dist/{esm/lib → lib}/gridview/gridview-angular.component.d.ts +4 -0
- package/dist/lib/gridview/gridview-angular.component.d.ts.map +1 -0
- package/dist/{esm/lib → lib}/gridview/types.d.ts +1 -0
- package/dist/lib/gridview/types.d.ts.map +1 -0
- package/dist/{esm/lib → lib}/paneview/angular-pane-part.d.ts +1 -0
- package/dist/lib/paneview/angular-pane-part.d.ts.map +1 -0
- package/dist/{esm/lib → lib}/paneview/paneview-angular.component.d.ts +4 -0
- package/dist/lib/paneview/paneview-angular.component.d.ts.map +1 -0
- package/dist/{esm/lib → lib}/paneview/types.d.ts +1 -0
- package/dist/lib/paneview/types.d.ts.map +1 -0
- package/dist/{cjs/lib → lib}/splitview/angular-splitview-panel.d.ts +1 -0
- package/dist/lib/splitview/angular-splitview-panel.d.ts.map +1 -0
- package/dist/{cjs/lib → lib}/splitview/splitview-angular.component.d.ts +4 -0
- package/dist/lib/splitview/splitview-angular.component.d.ts.map +1 -0
- package/dist/{cjs/lib → lib}/splitview/types.d.ts +1 -0
- package/dist/lib/splitview/types.d.ts.map +1 -0
- package/dist/lib/utils/angular-renderer.d.ts +21 -0
- package/dist/lib/utils/angular-renderer.d.ts.map +1 -0
- package/dist/{cjs/lib → lib}/utils/component-factory.d.ts +1 -0
- package/dist/lib/utils/component-factory.d.ts.map +1 -0
- package/dist/{cjs/lib → lib}/utils/lifecycle-utils.d.ts +1 -0
- package/dist/lib/utils/lifecycle-utils.d.ts.map +1 -0
- package/dist/{cjs/public-api.d.ts → public-api.d.ts} +5 -4
- package/dist/public-api.d.ts.map +1 -0
- package/package.json +72 -66
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/index.js +0 -17
- package/dist/cjs/lib/dockview/dockview-angular.component.js +0 -256
- package/dist/cjs/lib/dockview/types.js +0 -8
- package/dist/cjs/lib/dockview-angular.module.d.ts +0 -2
- package/dist/cjs/lib/dockview-angular.module.js +0 -35
- package/dist/cjs/lib/gridview/angular-gridview-panel.js +0 -21
- package/dist/cjs/lib/gridview/gridview-angular.component.d.ts +0 -28
- package/dist/cjs/lib/gridview/gridview-angular.component.js +0 -140
- package/dist/cjs/lib/gridview/types.d.ts +0 -12
- package/dist/cjs/lib/gridview/types.js +0 -6
- package/dist/cjs/lib/paneview/angular-pane-part.d.ts +0 -13
- package/dist/cjs/lib/paneview/angular-pane-part.js +0 -29
- package/dist/cjs/lib/paneview/paneview-angular.component.d.ts +0 -31
- package/dist/cjs/lib/paneview/paneview-angular.component.js +0 -166
- package/dist/cjs/lib/paneview/types.d.ts +0 -14
- package/dist/cjs/lib/paneview/types.js +0 -6
- package/dist/cjs/lib/splitview/angular-splitview-panel.js +0 -21
- package/dist/cjs/lib/splitview/splitview-angular.component.js +0 -140
- package/dist/cjs/lib/splitview/types.js +0 -6
- package/dist/cjs/lib/utils/angular-renderer.d.ts +0 -18
- package/dist/cjs/lib/utils/angular-renderer.js +0 -70
- package/dist/cjs/lib/utils/component-factory.js +0 -103
- package/dist/cjs/lib/utils/lifecycle-utils.js +0 -74
- package/dist/cjs/public-api.js +0 -32
- package/dist/dockview-angular.amd.js +0 -13201
- package/dist/dockview-angular.amd.js.map +0 -1
- package/dist/dockview-angular.amd.min.js +0 -8
- package/dist/dockview-angular.amd.min.js.map +0 -1
- package/dist/dockview-angular.amd.min.noStyle.js +0 -8
- package/dist/dockview-angular.amd.min.noStyle.js.map +0 -1
- package/dist/dockview-angular.amd.noStyle.js +0 -13171
- package/dist/dockview-angular.amd.noStyle.js.map +0 -1
- package/dist/dockview-angular.cjs.js +0 -13203
- package/dist/dockview-angular.cjs.js.map +0 -1
- package/dist/dockview-angular.esm.js +0 -13131
- package/dist/dockview-angular.esm.js.map +0 -1
- package/dist/dockview-angular.esm.min.js +0 -8
- package/dist/dockview-angular.esm.min.js.map +0 -1
- package/dist/dockview-angular.js +0 -13205
- package/dist/dockview-angular.js.map +0 -1
- package/dist/dockview-angular.min.js +0 -8
- package/dist/dockview-angular.min.js.map +0 -1
- package/dist/dockview-angular.min.noStyle.js +0 -8
- package/dist/dockview-angular.min.noStyle.js.map +0 -1
- package/dist/dockview-angular.noStyle.js +0 -13175
- package/dist/dockview-angular.noStyle.js.map +0 -1
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/lib/dockview/dockview-angular.component.d.ts +0 -49
- package/dist/esm/lib/dockview/dockview-angular.component.js +0 -253
- package/dist/esm/lib/dockview/types.d.ts +0 -27
- package/dist/esm/lib/dockview/types.js +0 -2
- package/dist/esm/lib/dockview-angular.module.d.ts +0 -2
- package/dist/esm/lib/dockview-angular.module.js +0 -32
- package/dist/esm/lib/gridview/angular-gridview-panel.d.ts +0 -9
- package/dist/esm/lib/gridview/angular-gridview-panel.js +0 -17
- package/dist/esm/lib/gridview/gridview-angular.component.js +0 -137
- package/dist/esm/lib/gridview/types.js +0 -2
- package/dist/esm/lib/paneview/angular-pane-part.js +0 -25
- package/dist/esm/lib/paneview/paneview-angular.component.js +0 -163
- package/dist/esm/lib/paneview/types.js +0 -2
- package/dist/esm/lib/splitview/angular-splitview-panel.d.ts +0 -9
- package/dist/esm/lib/splitview/angular-splitview-panel.js +0 -17
- package/dist/esm/lib/splitview/splitview-angular.component.d.ts +0 -28
- package/dist/esm/lib/splitview/splitview-angular.component.js +0 -137
- package/dist/esm/lib/splitview/types.d.ts +0 -12
- package/dist/esm/lib/splitview/types.js +0 -2
- package/dist/esm/lib/utils/angular-renderer.d.ts +0 -18
- package/dist/esm/lib/utils/angular-renderer.js +0 -66
- package/dist/esm/lib/utils/component-factory.d.ts +0 -20
- package/dist/esm/lib/utils/component-factory.js +0 -99
- package/dist/esm/lib/utils/lifecycle-utils.d.ts +0 -18
- package/dist/esm/lib/utils/lifecycle-utils.js +0 -68
- package/dist/esm/public-api.d.ts +0 -13
- package/dist/esm/public-api.js +0 -16
package/dist/esm/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './public-api';
|
package/dist/esm/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './public-api';
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnDestroy, OnInit, Type, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { DockviewApi, DockviewOptions, DockviewReadyEvent, DockviewDidDropEvent, DockviewWillDropEvent } from 'dockview-core';
|
|
3
|
-
export interface DockviewAngularOptions extends DockviewOptions {
|
|
4
|
-
components: Record<string, Type<any>>;
|
|
5
|
-
tabComponents?: Record<string, Type<any>>;
|
|
6
|
-
watermarkComponent?: Type<any>;
|
|
7
|
-
defaultTabComponent?: Type<any>;
|
|
8
|
-
leftHeaderActionsComponent?: Type<any>;
|
|
9
|
-
rightHeaderActionsComponent?: Type<any>;
|
|
10
|
-
prefixHeaderActionsComponent?: Type<any>;
|
|
11
|
-
}
|
|
12
|
-
export declare class DockviewAngularComponent implements OnInit, OnDestroy, OnChanges {
|
|
13
|
-
private containerRef;
|
|
14
|
-
components: Record<string, Type<any>>;
|
|
15
|
-
tabComponents?: Record<string, Type<any>>;
|
|
16
|
-
watermarkComponent?: Type<any>;
|
|
17
|
-
defaultTabComponent?: Type<any>;
|
|
18
|
-
leftHeaderActionsComponent?: Type<any>;
|
|
19
|
-
rightHeaderActionsComponent?: Type<any>;
|
|
20
|
-
prefixHeaderActionsComponent?: Type<any>;
|
|
21
|
-
className?: string;
|
|
22
|
-
orientation?: 'horizontal' | 'vertical';
|
|
23
|
-
hideBorders?: boolean;
|
|
24
|
-
rootOverlayModel?: 'always' | 'never';
|
|
25
|
-
defaultTabComponent_?: string;
|
|
26
|
-
tabHeight?: number;
|
|
27
|
-
disableFloatingGroups?: boolean;
|
|
28
|
-
floatingGroupBounds?: 'boundedWithinViewport';
|
|
29
|
-
popoutUrl?: string;
|
|
30
|
-
debug?: boolean;
|
|
31
|
-
locked?: boolean;
|
|
32
|
-
disableAutoResizing?: boolean;
|
|
33
|
-
singleTabMode?: 'fullwidth' | 'default';
|
|
34
|
-
ready: EventEmitter<DockviewReadyEvent>;
|
|
35
|
-
didDrop: EventEmitter<DockviewDidDropEvent>;
|
|
36
|
-
willDrop: EventEmitter<DockviewWillDropEvent>;
|
|
37
|
-
private dockviewApi?;
|
|
38
|
-
private lifecycleManager;
|
|
39
|
-
private injector;
|
|
40
|
-
private environmentInjector;
|
|
41
|
-
ngOnInit(): void;
|
|
42
|
-
ngOnDestroy(): void;
|
|
43
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
44
|
-
getDockviewApi(): DockviewApi | undefined;
|
|
45
|
-
private initializeDockview;
|
|
46
|
-
private extractCoreOptions;
|
|
47
|
-
private createFrameworkOptions;
|
|
48
|
-
private setupEventListeners;
|
|
49
|
-
}
|
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { Component, ElementRef, EventEmitter, Injector, Input, Output, Type, ViewChild, ChangeDetectionStrategy, EnvironmentInjector, inject } from '@angular/core';
|
|
11
|
-
import { createDockview, PROPERTY_KEYS_DOCKVIEW } from 'dockview-core';
|
|
12
|
-
import { AngularFrameworkComponentFactory } from '../utils/component-factory';
|
|
13
|
-
import { AngularLifecycleManager } from '../utils/lifecycle-utils';
|
|
14
|
-
let DockviewAngularComponent = class DockviewAngularComponent {
|
|
15
|
-
constructor() {
|
|
16
|
-
this.ready = new EventEmitter();
|
|
17
|
-
this.didDrop = new EventEmitter();
|
|
18
|
-
this.willDrop = new EventEmitter();
|
|
19
|
-
this.lifecycleManager = new AngularLifecycleManager();
|
|
20
|
-
this.injector = inject(Injector);
|
|
21
|
-
this.environmentInjector = inject(EnvironmentInjector);
|
|
22
|
-
}
|
|
23
|
-
ngOnInit() {
|
|
24
|
-
this.initializeDockview();
|
|
25
|
-
}
|
|
26
|
-
ngOnDestroy() {
|
|
27
|
-
this.lifecycleManager.destroy();
|
|
28
|
-
if (this.dockviewApi) {
|
|
29
|
-
this.dockviewApi.dispose();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
ngOnChanges(changes) {
|
|
33
|
-
if (this.dockviewApi) {
|
|
34
|
-
const coreChanges = {};
|
|
35
|
-
let hasChanges = false;
|
|
36
|
-
// Check for changes in core dockview properties
|
|
37
|
-
PROPERTY_KEYS_DOCKVIEW.forEach(key => {
|
|
38
|
-
if (changes[key] && !changes[key].isFirstChange()) {
|
|
39
|
-
coreChanges[key] = changes[key].currentValue;
|
|
40
|
-
hasChanges = true;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
if (hasChanges) {
|
|
44
|
-
this.dockviewApi.updateOptions(coreChanges);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
getDockviewApi() {
|
|
49
|
-
return this.dockviewApi;
|
|
50
|
-
}
|
|
51
|
-
initializeDockview() {
|
|
52
|
-
if (!this.components) {
|
|
53
|
-
throw new Error('DockviewAngularComponent: components input is required');
|
|
54
|
-
}
|
|
55
|
-
const coreOptions = this.extractCoreOptions();
|
|
56
|
-
const frameworkOptions = this.createFrameworkOptions();
|
|
57
|
-
this.dockviewApi = createDockview(this.containerRef.nativeElement, {
|
|
58
|
-
...coreOptions,
|
|
59
|
-
...frameworkOptions
|
|
60
|
-
});
|
|
61
|
-
// Set up event listeners
|
|
62
|
-
this.setupEventListeners();
|
|
63
|
-
// Emit ready event
|
|
64
|
-
this.ready.emit({ api: this.dockviewApi });
|
|
65
|
-
}
|
|
66
|
-
extractCoreOptions() {
|
|
67
|
-
const coreOptions = {};
|
|
68
|
-
PROPERTY_KEYS_DOCKVIEW.forEach(key => {
|
|
69
|
-
const value = this[key];
|
|
70
|
-
if (value !== undefined) {
|
|
71
|
-
coreOptions[key] = value;
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
return coreOptions;
|
|
75
|
-
}
|
|
76
|
-
createFrameworkOptions() {
|
|
77
|
-
const headerActionsComponents = {};
|
|
78
|
-
if (this.leftHeaderActionsComponent) {
|
|
79
|
-
headerActionsComponents['left'] = this.leftHeaderActionsComponent;
|
|
80
|
-
}
|
|
81
|
-
if (this.rightHeaderActionsComponent) {
|
|
82
|
-
headerActionsComponents['right'] = this.rightHeaderActionsComponent;
|
|
83
|
-
}
|
|
84
|
-
if (this.prefixHeaderActionsComponent) {
|
|
85
|
-
headerActionsComponents['prefix'] = this.prefixHeaderActionsComponent;
|
|
86
|
-
}
|
|
87
|
-
const componentFactory = new AngularFrameworkComponentFactory(this.components, this.injector, this.environmentInjector, this.tabComponents, this.watermarkComponent, headerActionsComponents, this.defaultTabComponent);
|
|
88
|
-
return {
|
|
89
|
-
createComponent: (options) => {
|
|
90
|
-
return componentFactory.createDockviewComponent(options);
|
|
91
|
-
},
|
|
92
|
-
createTabComponent: (options) => {
|
|
93
|
-
return componentFactory.createTabComponent(options);
|
|
94
|
-
},
|
|
95
|
-
createWatermarkComponent: this.watermarkComponent
|
|
96
|
-
? () => {
|
|
97
|
-
return componentFactory.createWatermarkComponent();
|
|
98
|
-
}
|
|
99
|
-
: undefined,
|
|
100
|
-
createLeftHeaderActionComponent: this.leftHeaderActionsComponent
|
|
101
|
-
? (group) => {
|
|
102
|
-
return componentFactory.createHeaderActionsComponent('left');
|
|
103
|
-
}
|
|
104
|
-
: undefined,
|
|
105
|
-
createRightHeaderActionComponent: this.rightHeaderActionsComponent
|
|
106
|
-
? (group) => {
|
|
107
|
-
return componentFactory.createHeaderActionsComponent('right');
|
|
108
|
-
}
|
|
109
|
-
: undefined,
|
|
110
|
-
createPrefixHeaderActionComponent: this.prefixHeaderActionsComponent
|
|
111
|
-
? (group) => {
|
|
112
|
-
return componentFactory.createHeaderActionsComponent('prefix');
|
|
113
|
-
}
|
|
114
|
-
: undefined
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
setupEventListeners() {
|
|
118
|
-
if (!this.dockviewApi) {
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
// Set up event subscriptions using lifecycle manager
|
|
122
|
-
const api = this.dockviewApi;
|
|
123
|
-
if (this.didDrop.observers.length > 0) {
|
|
124
|
-
const disposable = api.onDidDrop(event => {
|
|
125
|
-
this.didDrop.emit(event);
|
|
126
|
-
});
|
|
127
|
-
this.lifecycleManager.addDisposable(disposable);
|
|
128
|
-
}
|
|
129
|
-
if (this.willDrop.observers.length > 0) {
|
|
130
|
-
const disposable = api.onWillDrop(event => {
|
|
131
|
-
this.willDrop.emit(event);
|
|
132
|
-
});
|
|
133
|
-
this.lifecycleManager.addDisposable(disposable);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
__decorate([
|
|
138
|
-
ViewChild('dockviewContainer', { static: true }),
|
|
139
|
-
__metadata("design:type", ElementRef)
|
|
140
|
-
], DockviewAngularComponent.prototype, "containerRef", void 0);
|
|
141
|
-
__decorate([
|
|
142
|
-
Input(),
|
|
143
|
-
__metadata("design:type", Object)
|
|
144
|
-
], DockviewAngularComponent.prototype, "components", void 0);
|
|
145
|
-
__decorate([
|
|
146
|
-
Input(),
|
|
147
|
-
__metadata("design:type", Object)
|
|
148
|
-
], DockviewAngularComponent.prototype, "tabComponents", void 0);
|
|
149
|
-
__decorate([
|
|
150
|
-
Input(),
|
|
151
|
-
__metadata("design:type", Type)
|
|
152
|
-
], DockviewAngularComponent.prototype, "watermarkComponent", void 0);
|
|
153
|
-
__decorate([
|
|
154
|
-
Input(),
|
|
155
|
-
__metadata("design:type", Type)
|
|
156
|
-
], DockviewAngularComponent.prototype, "defaultTabComponent", void 0);
|
|
157
|
-
__decorate([
|
|
158
|
-
Input(),
|
|
159
|
-
__metadata("design:type", Type)
|
|
160
|
-
], DockviewAngularComponent.prototype, "leftHeaderActionsComponent", void 0);
|
|
161
|
-
__decorate([
|
|
162
|
-
Input(),
|
|
163
|
-
__metadata("design:type", Type)
|
|
164
|
-
], DockviewAngularComponent.prototype, "rightHeaderActionsComponent", void 0);
|
|
165
|
-
__decorate([
|
|
166
|
-
Input(),
|
|
167
|
-
__metadata("design:type", Type)
|
|
168
|
-
], DockviewAngularComponent.prototype, "prefixHeaderActionsComponent", void 0);
|
|
169
|
-
__decorate([
|
|
170
|
-
Input(),
|
|
171
|
-
__metadata("design:type", String)
|
|
172
|
-
], DockviewAngularComponent.prototype, "className", void 0);
|
|
173
|
-
__decorate([
|
|
174
|
-
Input(),
|
|
175
|
-
__metadata("design:type", String)
|
|
176
|
-
], DockviewAngularComponent.prototype, "orientation", void 0);
|
|
177
|
-
__decorate([
|
|
178
|
-
Input(),
|
|
179
|
-
__metadata("design:type", Boolean)
|
|
180
|
-
], DockviewAngularComponent.prototype, "hideBorders", void 0);
|
|
181
|
-
__decorate([
|
|
182
|
-
Input(),
|
|
183
|
-
__metadata("design:type", String)
|
|
184
|
-
], DockviewAngularComponent.prototype, "rootOverlayModel", void 0);
|
|
185
|
-
__decorate([
|
|
186
|
-
Input(),
|
|
187
|
-
__metadata("design:type", String)
|
|
188
|
-
], DockviewAngularComponent.prototype, "defaultTabComponent_", void 0);
|
|
189
|
-
__decorate([
|
|
190
|
-
Input(),
|
|
191
|
-
__metadata("design:type", Number)
|
|
192
|
-
], DockviewAngularComponent.prototype, "tabHeight", void 0);
|
|
193
|
-
__decorate([
|
|
194
|
-
Input(),
|
|
195
|
-
__metadata("design:type", Boolean)
|
|
196
|
-
], DockviewAngularComponent.prototype, "disableFloatingGroups", void 0);
|
|
197
|
-
__decorate([
|
|
198
|
-
Input(),
|
|
199
|
-
__metadata("design:type", String)
|
|
200
|
-
], DockviewAngularComponent.prototype, "floatingGroupBounds", void 0);
|
|
201
|
-
__decorate([
|
|
202
|
-
Input(),
|
|
203
|
-
__metadata("design:type", String)
|
|
204
|
-
], DockviewAngularComponent.prototype, "popoutUrl", void 0);
|
|
205
|
-
__decorate([
|
|
206
|
-
Input(),
|
|
207
|
-
__metadata("design:type", Boolean)
|
|
208
|
-
], DockviewAngularComponent.prototype, "debug", void 0);
|
|
209
|
-
__decorate([
|
|
210
|
-
Input(),
|
|
211
|
-
__metadata("design:type", Boolean)
|
|
212
|
-
], DockviewAngularComponent.prototype, "locked", void 0);
|
|
213
|
-
__decorate([
|
|
214
|
-
Input(),
|
|
215
|
-
__metadata("design:type", Boolean)
|
|
216
|
-
], DockviewAngularComponent.prototype, "disableAutoResizing", void 0);
|
|
217
|
-
__decorate([
|
|
218
|
-
Input(),
|
|
219
|
-
__metadata("design:type", String)
|
|
220
|
-
], DockviewAngularComponent.prototype, "singleTabMode", void 0);
|
|
221
|
-
__decorate([
|
|
222
|
-
Output(),
|
|
223
|
-
__metadata("design:type", Object)
|
|
224
|
-
], DockviewAngularComponent.prototype, "ready", void 0);
|
|
225
|
-
__decorate([
|
|
226
|
-
Output(),
|
|
227
|
-
__metadata("design:type", Object)
|
|
228
|
-
], DockviewAngularComponent.prototype, "didDrop", void 0);
|
|
229
|
-
__decorate([
|
|
230
|
-
Output(),
|
|
231
|
-
__metadata("design:type", Object)
|
|
232
|
-
], DockviewAngularComponent.prototype, "willDrop", void 0);
|
|
233
|
-
DockviewAngularComponent = __decorate([
|
|
234
|
-
Component({
|
|
235
|
-
selector: 'dv-dockview',
|
|
236
|
-
standalone: true,
|
|
237
|
-
template: '<div #dockviewContainer class="dockview-container"></div>',
|
|
238
|
-
styles: [`
|
|
239
|
-
:host {
|
|
240
|
-
display: block;
|
|
241
|
-
width: 100%;
|
|
242
|
-
height: 100%;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.dockview-container {
|
|
246
|
-
width: 100%;
|
|
247
|
-
height: 100%;
|
|
248
|
-
}
|
|
249
|
-
`],
|
|
250
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
251
|
-
})
|
|
252
|
-
], DockviewAngularComponent);
|
|
253
|
-
export { DockviewAngularComponent };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Type } from '@angular/core';
|
|
2
|
-
import { DockviewOptions, DockviewReadyEvent, DockviewDidDropEvent, DockviewWillDropEvent, IDockviewPanelProps, IDockviewPanelHeaderProps, IWatermarkPanelProps, IDockviewHeaderActionsProps } from 'dockview-core';
|
|
3
|
-
export interface IDockviewAngularPanelProps extends IDockviewPanelProps {
|
|
4
|
-
}
|
|
5
|
-
export interface IDockviewAngularPanelHeaderProps extends IDockviewPanelHeaderProps {
|
|
6
|
-
}
|
|
7
|
-
export interface IDockviewAngularWatermarkProps extends IWatermarkPanelProps {
|
|
8
|
-
}
|
|
9
|
-
export interface IDockviewAngularHeaderActionsProps extends IDockviewHeaderActionsProps {
|
|
10
|
-
}
|
|
11
|
-
export interface DockviewAngularOptions extends DockviewOptions {
|
|
12
|
-
components: Record<string, Type<any>>;
|
|
13
|
-
tabComponents?: Record<string, Type<any>>;
|
|
14
|
-
watermarkComponent?: Type<any>;
|
|
15
|
-
defaultTabComponent?: Type<any>;
|
|
16
|
-
leftHeaderActionsComponent?: Type<any>;
|
|
17
|
-
rightHeaderActionsComponent?: Type<any>;
|
|
18
|
-
prefixHeaderActionsComponent?: Type<any>;
|
|
19
|
-
}
|
|
20
|
-
export interface DockviewAngularComponentOptions extends DockviewAngularOptions {
|
|
21
|
-
}
|
|
22
|
-
export interface DockviewAngularEvents {
|
|
23
|
-
ready: DockviewReadyEvent;
|
|
24
|
-
didDrop: DockviewDidDropEvent;
|
|
25
|
-
willDrop: DockviewWillDropEvent;
|
|
26
|
-
}
|
|
27
|
-
export { DockviewApi, DockviewReadyEvent, DockviewDidDropEvent, DockviewWillDropEvent, DockviewOptions } from 'dockview-core';
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { NgModule } from '@angular/core';
|
|
8
|
-
import { CommonModule } from '@angular/common';
|
|
9
|
-
import { DockviewAngularComponent } from './dockview/dockview-angular.component';
|
|
10
|
-
import { GridviewAngularComponent } from './gridview/gridview-angular.component';
|
|
11
|
-
import { PaneviewAngularComponent } from './paneview/paneview-angular.component';
|
|
12
|
-
import { SplitviewAngularComponent } from './splitview/splitview-angular.component';
|
|
13
|
-
let DockviewAngularModule = class DockviewAngularModule {
|
|
14
|
-
};
|
|
15
|
-
DockviewAngularModule = __decorate([
|
|
16
|
-
NgModule({
|
|
17
|
-
imports: [
|
|
18
|
-
CommonModule,
|
|
19
|
-
DockviewAngularComponent,
|
|
20
|
-
GridviewAngularComponent,
|
|
21
|
-
PaneviewAngularComponent,
|
|
22
|
-
SplitviewAngularComponent
|
|
23
|
-
],
|
|
24
|
-
exports: [
|
|
25
|
-
DockviewAngularComponent,
|
|
26
|
-
GridviewAngularComponent,
|
|
27
|
-
PaneviewAngularComponent,
|
|
28
|
-
SplitviewAngularComponent
|
|
29
|
-
]
|
|
30
|
-
})
|
|
31
|
-
], DockviewAngularModule);
|
|
32
|
-
export { DockviewAngularModule };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Type, Injector, EnvironmentInjector } from '@angular/core';
|
|
2
|
-
import { GridviewPanel, IFrameworkPart } from 'dockview-core';
|
|
3
|
-
export declare class AngularGridviewPanel extends GridviewPanel {
|
|
4
|
-
private readonly angularComponent;
|
|
5
|
-
private readonly injector;
|
|
6
|
-
private readonly environmentInjector?;
|
|
7
|
-
constructor(id: string, component: string, angularComponent: Type<any>, injector: Injector, environmentInjector?: EnvironmentInjector | undefined);
|
|
8
|
-
getComponent(): IFrameworkPart;
|
|
9
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { GridviewPanel, } from 'dockview-core';
|
|
2
|
-
import { AngularRenderer } from '../utils/angular-renderer';
|
|
3
|
-
export class AngularGridviewPanel extends GridviewPanel {
|
|
4
|
-
constructor(id, component, angularComponent, injector, environmentInjector) {
|
|
5
|
-
super(id, component);
|
|
6
|
-
this.angularComponent = angularComponent;
|
|
7
|
-
this.injector = injector;
|
|
8
|
-
this.environmentInjector = environmentInjector;
|
|
9
|
-
}
|
|
10
|
-
getComponent() {
|
|
11
|
-
return new AngularRenderer({
|
|
12
|
-
component: this.angularComponent,
|
|
13
|
-
injector: this.injector,
|
|
14
|
-
environmentInjector: this.environmentInjector
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { Component, ElementRef, EventEmitter, Injector, Input, Output, ViewChild, ChangeDetectionStrategy, EnvironmentInjector, inject } from '@angular/core';
|
|
11
|
-
import { createGridview, PROPERTY_KEYS_GRIDVIEW } from 'dockview-core';
|
|
12
|
-
import { AngularFrameworkComponentFactory } from '../utils/component-factory';
|
|
13
|
-
import { AngularLifecycleManager } from '../utils/lifecycle-utils';
|
|
14
|
-
let GridviewAngularComponent = class GridviewAngularComponent {
|
|
15
|
-
constructor() {
|
|
16
|
-
this.ready = new EventEmitter();
|
|
17
|
-
this.lifecycleManager = new AngularLifecycleManager();
|
|
18
|
-
this.injector = inject(Injector);
|
|
19
|
-
this.environmentInjector = inject(EnvironmentInjector);
|
|
20
|
-
}
|
|
21
|
-
ngOnInit() {
|
|
22
|
-
this.initializeGridview();
|
|
23
|
-
}
|
|
24
|
-
ngOnDestroy() {
|
|
25
|
-
this.lifecycleManager.destroy();
|
|
26
|
-
if (this.gridviewApi) {
|
|
27
|
-
this.gridviewApi.dispose();
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
ngOnChanges(changes) {
|
|
31
|
-
if (this.gridviewApi) {
|
|
32
|
-
const coreChanges = {};
|
|
33
|
-
let hasChanges = false;
|
|
34
|
-
// Check for changes in core gridview properties
|
|
35
|
-
PROPERTY_KEYS_GRIDVIEW.forEach(key => {
|
|
36
|
-
if (changes[key] && !changes[key].isFirstChange()) {
|
|
37
|
-
coreChanges[key] = changes[key].currentValue;
|
|
38
|
-
hasChanges = true;
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
if (hasChanges) {
|
|
42
|
-
this.gridviewApi.updateOptions(coreChanges);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
getGridviewApi() {
|
|
47
|
-
return this.gridviewApi;
|
|
48
|
-
}
|
|
49
|
-
initializeGridview() {
|
|
50
|
-
if (!this.components) {
|
|
51
|
-
throw new Error('GridviewAngularComponent: components input is required');
|
|
52
|
-
}
|
|
53
|
-
const coreOptions = this.extractCoreOptions();
|
|
54
|
-
const frameworkOptions = this.createFrameworkOptions();
|
|
55
|
-
this.gridviewApi = createGridview(this.containerRef.nativeElement, {
|
|
56
|
-
...coreOptions,
|
|
57
|
-
...frameworkOptions
|
|
58
|
-
});
|
|
59
|
-
// Emit ready event
|
|
60
|
-
this.ready.emit({ api: this.gridviewApi });
|
|
61
|
-
}
|
|
62
|
-
extractCoreOptions() {
|
|
63
|
-
const coreOptions = {};
|
|
64
|
-
PROPERTY_KEYS_GRIDVIEW.forEach(key => {
|
|
65
|
-
const value = this[key];
|
|
66
|
-
if (value !== undefined) {
|
|
67
|
-
coreOptions[key] = value;
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
return coreOptions;
|
|
71
|
-
}
|
|
72
|
-
createFrameworkOptions() {
|
|
73
|
-
const componentFactory = new AngularFrameworkComponentFactory(this.components, this.injector, this.environmentInjector);
|
|
74
|
-
return {
|
|
75
|
-
createComponent: (options) => {
|
|
76
|
-
return componentFactory.createGridviewComponent(options);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
__decorate([
|
|
82
|
-
ViewChild('gridviewContainer', { static: true }),
|
|
83
|
-
__metadata("design:type", ElementRef)
|
|
84
|
-
], GridviewAngularComponent.prototype, "containerRef", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
Input(),
|
|
87
|
-
__metadata("design:type", Object)
|
|
88
|
-
], GridviewAngularComponent.prototype, "components", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
Input(),
|
|
91
|
-
__metadata("design:type", String)
|
|
92
|
-
], GridviewAngularComponent.prototype, "className", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
Input(),
|
|
95
|
-
__metadata("design:type", String)
|
|
96
|
-
], GridviewAngularComponent.prototype, "orientation", void 0);
|
|
97
|
-
__decorate([
|
|
98
|
-
Input(),
|
|
99
|
-
__metadata("design:type", Boolean)
|
|
100
|
-
], GridviewAngularComponent.prototype, "proportionalLayout", void 0);
|
|
101
|
-
__decorate([
|
|
102
|
-
Input(),
|
|
103
|
-
__metadata("design:type", Boolean)
|
|
104
|
-
], GridviewAngularComponent.prototype, "hideBorders", void 0);
|
|
105
|
-
__decorate([
|
|
106
|
-
Input(),
|
|
107
|
-
__metadata("design:type", Boolean)
|
|
108
|
-
], GridviewAngularComponent.prototype, "debug", void 0);
|
|
109
|
-
__decorate([
|
|
110
|
-
Input(),
|
|
111
|
-
__metadata("design:type", Boolean)
|
|
112
|
-
], GridviewAngularComponent.prototype, "disableAutoResizing", void 0);
|
|
113
|
-
__decorate([
|
|
114
|
-
Output(),
|
|
115
|
-
__metadata("design:type", Object)
|
|
116
|
-
], GridviewAngularComponent.prototype, "ready", void 0);
|
|
117
|
-
GridviewAngularComponent = __decorate([
|
|
118
|
-
Component({
|
|
119
|
-
selector: 'dv-gridview',
|
|
120
|
-
standalone: true,
|
|
121
|
-
template: '<div #gridviewContainer class="gridview-container"></div>',
|
|
122
|
-
styles: [`
|
|
123
|
-
:host {
|
|
124
|
-
display: block;
|
|
125
|
-
width: 100%;
|
|
126
|
-
height: 100%;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.gridview-container {
|
|
130
|
-
width: 100%;
|
|
131
|
-
height: 100%;
|
|
132
|
-
}
|
|
133
|
-
`],
|
|
134
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
135
|
-
})
|
|
136
|
-
], GridviewAngularComponent);
|
|
137
|
-
export { GridviewAngularComponent };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { AngularRenderer } from '../utils/angular-renderer';
|
|
2
|
-
export class AngularPanePart {
|
|
3
|
-
constructor(angularComponent, injector, environmentInjector) {
|
|
4
|
-
this.angularComponent = angularComponent;
|
|
5
|
-
this.injector = injector;
|
|
6
|
-
this.environmentInjector = environmentInjector;
|
|
7
|
-
this.renderer = new AngularRenderer({
|
|
8
|
-
component: this.angularComponent,
|
|
9
|
-
injector: this.injector,
|
|
10
|
-
environmentInjector: this.environmentInjector
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
get element() {
|
|
14
|
-
return this.renderer.element;
|
|
15
|
-
}
|
|
16
|
-
init(parameters) {
|
|
17
|
-
this.renderer.init(parameters);
|
|
18
|
-
}
|
|
19
|
-
update(params) {
|
|
20
|
-
this.renderer.update(params);
|
|
21
|
-
}
|
|
22
|
-
dispose() {
|
|
23
|
-
this.renderer.dispose();
|
|
24
|
-
}
|
|
25
|
-
}
|