dockview-core 6.6.1 → 7.0.2
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 +8 -1
- package/dist/cjs/api/component.api.d.ts +42 -21
- package/dist/cjs/api/component.api.js +111 -20
- package/dist/cjs/api/dockviewGroupPanelApi.d.ts +23 -8
- package/dist/cjs/api/dockviewGroupPanelApi.js +23 -0
- package/dist/cjs/api/dockviewPanelApi.d.ts +4 -3
- package/dist/cjs/api/dockviewPanelApi.js +8 -0
- package/dist/cjs/dnd/droptarget.d.ts +8 -0
- package/dist/cjs/dnd/droptarget.js +28 -0
- package/dist/cjs/dockview/accessibilityMessages.d.ts +32 -0
- package/dist/cjs/dockview/accessibilityMessages.js +51 -0
- package/dist/cjs/dockview/allModules.d.ts +8 -0
- package/dist/cjs/dockview/allModules.js +25 -0
- package/dist/cjs/dockview/components/panel/content.d.ts +2 -0
- package/dist/cjs/dockview/components/panel/content.js +35 -4
- package/dist/cjs/dockview/components/tab/tab.js +33 -5
- package/dist/cjs/dockview/components/titlebar/floatingTitleBar.d.ts +35 -0
- package/dist/cjs/dockview/components/titlebar/floatingTitleBar.js +95 -0
- package/dist/cjs/dockview/components/titlebar/groupDragSource.d.ts +52 -0
- package/dist/cjs/dockview/components/titlebar/groupDragSource.js +218 -0
- package/dist/cjs/dockview/components/titlebar/tabGroupIndicator.d.ts +2 -1
- package/dist/cjs/dockview/components/titlebar/tabGroupIndicator.js +31 -24
- package/dist/cjs/dockview/components/titlebar/tabGroups.js +1 -0
- package/dist/cjs/dockview/components/titlebar/tabs.d.ts +12 -0
- package/dist/cjs/dockview/components/titlebar/tabs.js +105 -2
- package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts +4 -0
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js +13 -3
- package/dist/cjs/dockview/components/titlebar/voidContainer.d.ts +1 -4
- package/dist/cjs/dockview/components/titlebar/voidContainer.js +31 -155
- package/dist/cjs/dockview/dockviewComponent.d.ts +299 -44
- package/dist/cjs/dockview/dockviewComponent.js +1787 -1041
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.d.ts +33 -2
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.js +39 -3
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts +0 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +36 -14
- package/dist/cjs/dockview/dockviewGroupPanelModel.js +133 -101
- package/dist/cjs/dockview/dockviewPanel.d.ts +2 -2
- package/dist/cjs/dockview/edgeGroupService.d.ts +38 -0
- package/dist/cjs/dockview/edgeGroupService.js +128 -0
- package/dist/cjs/dockview/floatingGroupService.d.ts +37 -0
- package/dist/cjs/dockview/floatingGroupService.js +231 -0
- package/dist/cjs/dockview/headerActionsService.d.ts +32 -0
- package/dist/cjs/dockview/headerActionsService.js +149 -0
- package/dist/cjs/dockview/liveRegionService.d.ts +53 -0
- package/dist/cjs/dockview/liveRegionService.js +185 -0
- package/dist/cjs/dockview/moduleContracts.d.ts +119 -0
- package/dist/cjs/dockview/moduleContracts.js +2 -0
- package/dist/cjs/dockview/modules.d.ts +110 -0
- package/dist/cjs/dockview/modules.js +304 -0
- package/dist/cjs/dockview/options.d.ts +159 -6
- package/dist/cjs/dockview/options.js +8 -1
- package/dist/cjs/dockview/popoutWindowService.d.ts +95 -0
- package/dist/cjs/dockview/popoutWindowService.js +261 -0
- package/dist/cjs/dockview/rootDropTargetService.d.ts +35 -0
- package/dist/cjs/dockview/rootDropTargetService.js +87 -0
- package/dist/cjs/dockview/watermarkService.d.ts +30 -0
- package/dist/cjs/dockview/watermarkService.js +61 -0
- package/dist/cjs/gridview/baseComponentGridview.d.ts +1 -1
- package/dist/cjs/gridview/baseComponentGridview.js +3 -2
- package/dist/cjs/gridview/gridviewComponent.d.ts +3 -3
- package/dist/cjs/gridview/gridviewPanel.d.ts +1 -1
- package/dist/cjs/index.d.ts +11 -4
- package/dist/cjs/index.js +14 -1
- package/dist/cjs/overlay/overlay.d.ts +43 -1
- package/dist/cjs/overlay/overlay.js +57 -8
- package/dist/cjs/paneview/draggablePaneviewPanel.d.ts +2 -2
- package/dist/cjs/paneview/draggablePaneviewPanel.js +4 -4
- package/dist/cjs/paneview/paneviewComponent.d.ts +3 -3
- package/dist/cjs/paneview/paneviewComponent.js +5 -5
- package/dist/dockview-core.js +3201 -1280
- 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 +3200 -1279
- package/dist/esm/api/component.api.d.ts +42 -21
- package/dist/esm/api/component.api.js +63 -18
- package/dist/esm/api/dockviewGroupPanelApi.d.ts +23 -8
- package/dist/esm/api/dockviewGroupPanelApi.js +19 -0
- package/dist/esm/api/dockviewPanelApi.d.ts +4 -3
- package/dist/esm/api/dockviewPanelApi.js +7 -0
- package/dist/esm/dnd/droptarget.d.ts +8 -0
- package/dist/esm/dnd/droptarget.js +28 -0
- package/dist/esm/dockview/accessibilityMessages.d.ts +32 -0
- package/dist/esm/dockview/accessibilityMessages.js +30 -0
- package/dist/esm/dockview/allModules.d.ts +8 -0
- package/dist/esm/dockview/allModules.js +22 -0
- package/dist/esm/dockview/components/panel/content.d.ts +2 -0
- package/dist/esm/dockview/components/panel/content.js +36 -5
- package/dist/esm/dockview/components/tab/tab.js +33 -5
- package/dist/esm/dockview/components/titlebar/floatingTitleBar.d.ts +35 -0
- package/dist/esm/dockview/components/titlebar/floatingTitleBar.js +65 -0
- package/dist/esm/dockview/components/titlebar/groupDragSource.d.ts +52 -0
- package/dist/esm/dockview/components/titlebar/groupDragSource.js +178 -0
- package/dist/esm/dockview/components/titlebar/tabGroupIndicator.d.ts +2 -1
- package/dist/esm/dockview/components/titlebar/tabGroupIndicator.js +31 -24
- package/dist/esm/dockview/components/titlebar/tabGroups.js +1 -0
- package/dist/esm/dockview/components/titlebar/tabs.d.ts +12 -0
- package/dist/esm/dockview/components/titlebar/tabs.js +102 -2
- package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts +4 -0
- package/dist/esm/dockview/components/titlebar/tabsContainer.js +8 -2
- package/dist/esm/dockview/components/titlebar/voidContainer.d.ts +1 -4
- package/dist/esm/dockview/components/titlebar/voidContainer.js +33 -145
- package/dist/esm/dockview/dockviewComponent.d.ts +299 -44
- package/dist/esm/dockview/dockviewComponent.js +1420 -743
- package/dist/esm/dockview/dockviewFloatingGroupPanel.d.ts +33 -2
- package/dist/esm/dockview/dockviewFloatingGroupPanel.js +35 -3
- package/dist/esm/dockview/dockviewGroupPanel.d.ts +0 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +36 -14
- package/dist/esm/dockview/dockviewGroupPanelModel.js +109 -93
- package/dist/esm/dockview/dockviewPanel.d.ts +2 -2
- package/dist/esm/dockview/edgeGroupService.d.ts +38 -0
- package/dist/esm/dockview/edgeGroupService.js +63 -0
- package/dist/esm/dockview/floatingGroupService.d.ts +37 -0
- package/dist/esm/dockview/floatingGroupService.js +150 -0
- package/dist/esm/dockview/headerActionsService.d.ts +32 -0
- package/dist/esm/dockview/headerActionsService.js +86 -0
- package/dist/esm/dockview/liveRegionService.d.ts +53 -0
- package/dist/esm/dockview/liveRegionService.js +159 -0
- package/dist/esm/dockview/moduleContracts.d.ts +119 -0
- package/dist/esm/dockview/moduleContracts.js +1 -0
- package/dist/esm/dockview/modules.d.ts +110 -0
- package/dist/esm/dockview/modules.js +170 -0
- package/dist/esm/dockview/options.d.ts +159 -6
- package/dist/esm/dockview/options.js +8 -1
- package/dist/esm/dockview/popoutWindowService.d.ts +95 -0
- package/dist/esm/dockview/popoutWindowService.js +175 -0
- package/dist/esm/dockview/rootDropTargetService.d.ts +35 -0
- package/dist/esm/dockview/rootDropTargetService.js +82 -0
- package/dist/esm/dockview/watermarkService.d.ts +30 -0
- package/dist/esm/dockview/watermarkService.js +56 -0
- package/dist/esm/gridview/baseComponentGridview.d.ts +1 -1
- package/dist/esm/gridview/baseComponentGridview.js +2 -2
- package/dist/esm/gridview/gridviewComponent.d.ts +3 -3
- package/dist/esm/gridview/gridviewPanel.d.ts +1 -1
- package/dist/esm/index.d.ts +11 -4
- package/dist/esm/index.js +4 -0
- package/dist/esm/overlay/overlay.d.ts +43 -1
- package/dist/esm/overlay/overlay.js +53 -8
- package/dist/esm/paneview/draggablePaneviewPanel.d.ts +2 -2
- package/dist/esm/paneview/draggablePaneviewPanel.js +4 -4
- package/dist/esm/paneview/paneviewComponent.d.ts +3 -3
- package/dist/esm/paneview/paneviewComponent.js +5 -5
- package/dist/package/main.cjs.js +3236 -1315
- package/dist/package/main.cjs.min.js +2 -2
- package/dist/package/main.esm.min.mjs +2 -2
- package/dist/package/main.esm.mjs +3191 -1281
- package/dist/styles/dockview.css +275 -13
- package/package.json +10 -1
- package/dist/cjs/dockview/contextMenu.d.ts +0 -10
- package/dist/cjs/dockview/contextMenu.js +0 -313
- package/dist/esm/dockview/contextMenu.d.ts +0 -10
- package/dist/esm/dockview/contextMenu.js +0 -228
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DockviewActivePanelChangeEvent, DockviewLayoutMutationEvent, DockviewMaximizedGroupChangeEvent, DockviewPopoutGroupOptions, FloatingGroupOptions, GroupNavigationDirection, IDockviewComponent, MovePanelEvent, PopoutGroup, PopoutGroupChangePositionEvent, PopoutGroupChangeSizeEvent, SerializedDockview } from '../dockview/dockviewComponent';
|
|
2
2
|
import { AddGroupOptions, AddPanelOptions, DockviewComponentOptions, DockviewDndOverlayEvent, MovementOptions } from '../dockview/options';
|
|
3
3
|
import { Parameters } from '../panel/types';
|
|
4
4
|
import { Direction } from '../gridview/baseComponentGridview';
|
|
5
|
-
import {
|
|
5
|
+
import { AddGridviewComponentOptions, IGridviewComponent, SerializedGridviewComponent } from '../gridview/gridviewComponent';
|
|
6
6
|
import { IGridviewPanel } from '../gridview/gridviewPanel';
|
|
7
7
|
import { AddPaneviewComponentOptions, SerializedPaneview, IPaneviewComponent } from '../paneview/paneviewComponent';
|
|
8
8
|
import { IPaneviewPanel } from '../paneview/paneviewPanel';
|
|
@@ -14,7 +14,6 @@ import { Event } from '../events';
|
|
|
14
14
|
import { IDockviewPanel } from '../dockview/dockviewPanel';
|
|
15
15
|
import { PaneviewDidDropEvent } from '../paneview/draggablePaneviewPanel';
|
|
16
16
|
import { GroupDragEvent, TabDragEvent } from '../dockview/components/titlebar/tabsContainer';
|
|
17
|
-
import { Box } from '../types';
|
|
18
17
|
import { DockviewDidDropEvent, DockviewWillDropEvent } from '../dockview/dockviewGroupPanelModel';
|
|
19
18
|
import { DockviewWillShowOverlayLocationEvent, DockviewTabGroupChangeEvent, DockviewTabGroupCollapsedChangeEvent, DockviewTabGroupPanelChangeEvent } from '../dockview/events';
|
|
20
19
|
import { ITabGroup } from '../dockview/tabGroup';
|
|
@@ -170,7 +169,7 @@ export declare class PaneviewApi implements CommonApi<SerializedPaneview> {
|
|
|
170
169
|
* Invoked when a Drag'n'Drop event occurs that the component was unable to handle. Exposed for custom Drag'n'Drop functionality.
|
|
171
170
|
*/
|
|
172
171
|
get onDidDrop(): Event<PaneviewDidDropEvent>;
|
|
173
|
-
get
|
|
172
|
+
get onUnhandledDragOver(): Event<PaneviewDndOverlayEvent>;
|
|
174
173
|
constructor(component: IPaneviewComponent);
|
|
175
174
|
/**
|
|
176
175
|
* Remove a panel given the panel object.
|
|
@@ -284,7 +283,7 @@ export declare class GridviewApi implements CommonApi<SerializedGridviewComponen
|
|
|
284
283
|
/**
|
|
285
284
|
* Add a panel and return the created object.
|
|
286
285
|
*/
|
|
287
|
-
addPanel<T extends object = Parameters>(options:
|
|
286
|
+
addPanel<T extends object = Parameters>(options: AddGridviewComponentOptions<T>): IGridviewPanel;
|
|
288
287
|
/**
|
|
289
288
|
* Remove a panel given the panel object.
|
|
290
289
|
*/
|
|
@@ -380,9 +379,11 @@ export declare class DockviewApi implements CommonApi<SerializedDockview> {
|
|
|
380
379
|
*/
|
|
381
380
|
get onDidRemoveGroup(): Event<DockviewGroupPanel>;
|
|
382
381
|
/**
|
|
383
|
-
* Invoked when the active panel changes.
|
|
382
|
+
* Invoked when the active panel changes. The event carries the active
|
|
383
|
+
* `panel` (may be undefined if no panel is active) and the
|
|
384
|
+
* {@link DockviewOrigin} (`'user'` vs `'api'`) of the change.
|
|
384
385
|
*/
|
|
385
|
-
get onDidActivePanelChange(): Event<
|
|
386
|
+
get onDidActivePanelChange(): Event<DockviewActivePanelChangeEvent>;
|
|
386
387
|
/**
|
|
387
388
|
* Invoked when a panel is added. May be called multiple times when moving panels.
|
|
388
389
|
*/
|
|
@@ -411,6 +412,15 @@ export declare class DockviewApi implements CommonApi<SerializedDockview> {
|
|
|
411
412
|
* Preventing certain events may causes unexpected behaviours, use carefully.
|
|
412
413
|
*/
|
|
413
414
|
get onWillDrop(): Event<DockviewWillDropEvent>;
|
|
415
|
+
/**
|
|
416
|
+
* Fires before each top-level structural layout mutation (add / remove /
|
|
417
|
+
* move / float / popout / maximize / load / clear). Compound operations
|
|
418
|
+
* (e.g. a drag) fire once. Pair with `onDidMutateLayout` to bracket a
|
|
419
|
+
* change — useful for undo/redo, autosave and dirty-tracking.
|
|
420
|
+
*/
|
|
421
|
+
get onWillMutateLayout(): Event<DockviewLayoutMutationEvent>;
|
|
422
|
+
/** Fires after each top-level structural layout mutation. See `onWillMutateLayout`. */
|
|
423
|
+
get onDidMutateLayout(): Event<DockviewLayoutMutationEvent>;
|
|
414
424
|
/**
|
|
415
425
|
* Invoked before an overlay is shown indicating a drop target.
|
|
416
426
|
*
|
|
@@ -431,10 +441,24 @@ export declare class DockviewApi implements CommonApi<SerializedDockview> {
|
|
|
431
441
|
* Calling `event.nativeEvent.preventDefault()` will prevent the panel drag starting.
|
|
432
442
|
*/
|
|
433
443
|
get onWillDragPanel(): Event<TabDragEvent>;
|
|
434
|
-
get
|
|
444
|
+
get onUnhandledDragOver(): Event<DockviewDndOverlayEvent>;
|
|
435
445
|
get onDidPopoutGroupSizeChange(): Event<PopoutGroupChangeSizeEvent>;
|
|
436
446
|
get onDidPopoutGroupPositionChange(): Event<PopoutGroupChangePositionEvent>;
|
|
447
|
+
/**
|
|
448
|
+
* Fires when a popout group successfully opens in its own window, carrying
|
|
449
|
+
* the live `Window` handle. Use it to route focus or attach per-document
|
|
450
|
+
* listeners. Enumerate the current popouts at any time with `getPopouts()`.
|
|
451
|
+
*/
|
|
452
|
+
get onDidAddPopoutGroup(): Event<PopoutGroup>;
|
|
453
|
+
/**
|
|
454
|
+
* Fires when a popout group is removed — whether the user closed its window
|
|
455
|
+
* or it was docked back programmatically. Symmetric with
|
|
456
|
+
* {@link onDidAddPopoutGroup}; not fired during component disposal.
|
|
457
|
+
*/
|
|
458
|
+
get onDidRemovePopoutGroup(): Event<PopoutGroup>;
|
|
437
459
|
get onDidOpenPopoutWindowFail(): Event<void>;
|
|
460
|
+
/** Enumerate the popout groups currently open in their own windows. */
|
|
461
|
+
getPopouts(): PopoutGroup[];
|
|
438
462
|
/**
|
|
439
463
|
* Invoked when a tab group is created in any group.
|
|
440
464
|
*/
|
|
@@ -467,6 +491,14 @@ export declare class DockviewApi implements CommonApi<SerializedDockview> {
|
|
|
467
491
|
* All group objects.
|
|
468
492
|
*/
|
|
469
493
|
get groups(): DockviewGroupPanel[];
|
|
494
|
+
/**
|
|
495
|
+
* The nearest grid group in a spatial direction from `group`, comparing
|
|
496
|
+
* group centre points — e.g. the group visually to the left. Floating and
|
|
497
|
+
* popout groups are ignored. Returns `undefined` when there is no group in
|
|
498
|
+
* that direction. Pair with `group.api.boundingBox` to build your own
|
|
499
|
+
* spatial navigation.
|
|
500
|
+
*/
|
|
501
|
+
adjacentGroupInDirection(group: IDockviewGroupPanel, direction: GroupNavigationDirection): IDockviewGroupPanel | undefined;
|
|
470
502
|
/**
|
|
471
503
|
* Active panel object.
|
|
472
504
|
*/
|
|
@@ -541,22 +573,11 @@ export declare class DockviewApi implements CommonApi<SerializedDockview> {
|
|
|
541
573
|
maximizeGroup(panel: IDockviewPanel): void;
|
|
542
574
|
hasMaximizedGroup(): boolean;
|
|
543
575
|
exitMaximizedGroup(): void;
|
|
544
|
-
get onDidMaximizedGroupChange(): Event<
|
|
576
|
+
get onDidMaximizedGroupChange(): Event<DockviewMaximizedGroupChangeEvent>;
|
|
545
577
|
/**
|
|
546
578
|
* Add a popout group in a new Window
|
|
547
579
|
*/
|
|
548
|
-
addPopoutGroup(item: IDockviewPanel | DockviewGroupPanel, options?:
|
|
549
|
-
position?: Box;
|
|
550
|
-
popoutUrl?: string;
|
|
551
|
-
onDidOpen?: (event: {
|
|
552
|
-
id: string;
|
|
553
|
-
window: Window;
|
|
554
|
-
}) => void;
|
|
555
|
-
onWillClose?: (event: {
|
|
556
|
-
id: string;
|
|
557
|
-
window: Window;
|
|
558
|
-
}) => void;
|
|
559
|
-
}): Promise<boolean>;
|
|
580
|
+
addPopoutGroup(item: IDockviewPanel | DockviewGroupPanel, options?: DockviewPopoutGroupOptions): Promise<boolean>;
|
|
560
581
|
/**
|
|
561
582
|
* Add an edge group at the given position. Returns the group panel API
|
|
562
583
|
* for the newly created group. Throws if a group already exists there.
|
|
@@ -196,8 +196,8 @@ export class PaneviewApi {
|
|
|
196
196
|
get onDidDrop() {
|
|
197
197
|
return this.component.onDidDrop;
|
|
198
198
|
}
|
|
199
|
-
get
|
|
200
|
-
return this.component.
|
|
199
|
+
get onUnhandledDragOver() {
|
|
200
|
+
return this.component.onUnhandledDragOver;
|
|
201
201
|
}
|
|
202
202
|
constructor(component) {
|
|
203
203
|
this.component = component;
|
|
@@ -501,7 +501,9 @@ export class DockviewApi {
|
|
|
501
501
|
return this.component.onDidRemoveGroup;
|
|
502
502
|
}
|
|
503
503
|
/**
|
|
504
|
-
* Invoked when the active panel changes.
|
|
504
|
+
* Invoked when the active panel changes. The event carries the active
|
|
505
|
+
* `panel` (may be undefined if no panel is active) and the
|
|
506
|
+
* {@link DockviewOrigin} (`'user'` vs `'api'`) of the change.
|
|
505
507
|
*/
|
|
506
508
|
get onDidActivePanelChange() {
|
|
507
509
|
return this.component.onDidActivePanelChange;
|
|
@@ -548,6 +550,19 @@ export class DockviewApi {
|
|
|
548
550
|
get onWillDrop() {
|
|
549
551
|
return this.component.onWillDrop;
|
|
550
552
|
}
|
|
553
|
+
/**
|
|
554
|
+
* Fires before each top-level structural layout mutation (add / remove /
|
|
555
|
+
* move / float / popout / maximize / load / clear). Compound operations
|
|
556
|
+
* (e.g. a drag) fire once. Pair with `onDidMutateLayout` to bracket a
|
|
557
|
+
* change — useful for undo/redo, autosave and dirty-tracking.
|
|
558
|
+
*/
|
|
559
|
+
get onWillMutateLayout() {
|
|
560
|
+
return this.component.onWillMutateLayout;
|
|
561
|
+
}
|
|
562
|
+
/** Fires after each top-level structural layout mutation. See `onWillMutateLayout`. */
|
|
563
|
+
get onDidMutateLayout() {
|
|
564
|
+
return this.component.onDidMutateLayout;
|
|
565
|
+
}
|
|
551
566
|
/**
|
|
552
567
|
* Invoked before an overlay is shown indicating a drop target.
|
|
553
568
|
*
|
|
@@ -574,8 +589,8 @@ export class DockviewApi {
|
|
|
574
589
|
get onWillDragPanel() {
|
|
575
590
|
return this.component.onWillDragPanel;
|
|
576
591
|
}
|
|
577
|
-
get
|
|
578
|
-
return this.component.
|
|
592
|
+
get onUnhandledDragOver() {
|
|
593
|
+
return this.component.onUnhandledDragOver;
|
|
579
594
|
}
|
|
580
595
|
get onDidPopoutGroupSizeChange() {
|
|
581
596
|
return this.component.onDidPopoutGroupSizeChange;
|
|
@@ -583,9 +598,29 @@ export class DockviewApi {
|
|
|
583
598
|
get onDidPopoutGroupPositionChange() {
|
|
584
599
|
return this.component.onDidPopoutGroupPositionChange;
|
|
585
600
|
}
|
|
601
|
+
/**
|
|
602
|
+
* Fires when a popout group successfully opens in its own window, carrying
|
|
603
|
+
* the live `Window` handle. Use it to route focus or attach per-document
|
|
604
|
+
* listeners. Enumerate the current popouts at any time with `getPopouts()`.
|
|
605
|
+
*/
|
|
606
|
+
get onDidAddPopoutGroup() {
|
|
607
|
+
return this.component.onDidAddPopoutGroup;
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Fires when a popout group is removed — whether the user closed its window
|
|
611
|
+
* or it was docked back programmatically. Symmetric with
|
|
612
|
+
* {@link onDidAddPopoutGroup}; not fired during component disposal.
|
|
613
|
+
*/
|
|
614
|
+
get onDidRemovePopoutGroup() {
|
|
615
|
+
return this.component.onDidRemovePopoutGroup;
|
|
616
|
+
}
|
|
586
617
|
get onDidOpenPopoutWindowFail() {
|
|
587
618
|
return this.component.onDidOpenPopoutWindowFail;
|
|
588
619
|
}
|
|
620
|
+
/** Enumerate the popout groups currently open in their own windows. */
|
|
621
|
+
getPopouts() {
|
|
622
|
+
return this.component.getPopouts();
|
|
623
|
+
}
|
|
589
624
|
/**
|
|
590
625
|
* Invoked when a tab group is created in any group.
|
|
591
626
|
*/
|
|
@@ -634,6 +669,16 @@ export class DockviewApi {
|
|
|
634
669
|
get groups() {
|
|
635
670
|
return this.component.groups;
|
|
636
671
|
}
|
|
672
|
+
/**
|
|
673
|
+
* The nearest grid group in a spatial direction from `group`, comparing
|
|
674
|
+
* group centre points — e.g. the group visually to the left. Floating and
|
|
675
|
+
* popout groups are ignored. Returns `undefined` when there is no group in
|
|
676
|
+
* that direction. Pair with `group.api.boundingBox` to build your own
|
|
677
|
+
* spatial navigation.
|
|
678
|
+
*/
|
|
679
|
+
adjacentGroupInDirection(group, direction) {
|
|
680
|
+
return this.component.adjacentGroupInDirection(group, direction);
|
|
681
|
+
}
|
|
637
682
|
/**
|
|
638
683
|
* Active panel object.
|
|
639
684
|
*/
|
|
@@ -671,13 +716,13 @@ export class DockviewApi {
|
|
|
671
716
|
* Add a panel and return the created object.
|
|
672
717
|
*/
|
|
673
718
|
addPanel(options) {
|
|
674
|
-
return this.component.addPanel(options);
|
|
719
|
+
return this.component.withOrigin('api', () => this.component.addPanel(options));
|
|
675
720
|
}
|
|
676
721
|
/**
|
|
677
722
|
* Remove a panel given the panel object.
|
|
678
723
|
*/
|
|
679
724
|
removePanel(panel) {
|
|
680
|
-
this.component.removePanel(panel);
|
|
725
|
+
this.component.withOrigin('api', () => this.component.removePanel(panel));
|
|
681
726
|
}
|
|
682
727
|
/**
|
|
683
728
|
* Add a group and return the created object.
|
|
@@ -689,13 +734,13 @@ export class DockviewApi {
|
|
|
689
734
|
* Close all groups and panels.
|
|
690
735
|
*/
|
|
691
736
|
closeAllGroups() {
|
|
692
|
-
return this.component.closeAllGroups();
|
|
737
|
+
return this.component.withOrigin('api', () => this.component.closeAllGroups());
|
|
693
738
|
}
|
|
694
739
|
/**
|
|
695
740
|
* Remove a group and any panels within the group.
|
|
696
741
|
*/
|
|
697
742
|
removeGroup(group) {
|
|
698
|
-
this.component.removeGroup(group);
|
|
743
|
+
this.component.withOrigin('api', () => this.component.removeGroup(group));
|
|
699
744
|
}
|
|
700
745
|
/**
|
|
701
746
|
* Get a group object given a `string` id. May return undefined.
|
|
@@ -707,13 +752,13 @@ export class DockviewApi {
|
|
|
707
752
|
* Add a floating group
|
|
708
753
|
*/
|
|
709
754
|
addFloatingGroup(item, options) {
|
|
710
|
-
return this.component.addFloatingGroup(item, options);
|
|
755
|
+
return this.component.withOrigin('api', () => this.component.addFloatingGroup(item, options));
|
|
711
756
|
}
|
|
712
757
|
/**
|
|
713
758
|
* Create a component from a serialized object.
|
|
714
759
|
*/
|
|
715
760
|
fromJSON(data, options) {
|
|
716
|
-
this.component.fromJSON(data, options);
|
|
761
|
+
this.component.withOrigin('api', () => this.component.fromJSON(data, options));
|
|
717
762
|
}
|
|
718
763
|
/**
|
|
719
764
|
* Create a serialized object of the current component.
|
|
@@ -725,7 +770,7 @@ export class DockviewApi {
|
|
|
725
770
|
* Reset the component back to an empty and default state.
|
|
726
771
|
*/
|
|
727
772
|
clear() {
|
|
728
|
-
this.component.clear();
|
|
773
|
+
this.component.withOrigin('api', () => this.component.clear());
|
|
729
774
|
}
|
|
730
775
|
/**
|
|
731
776
|
* Move the focus progmatically to the next panel or group.
|
|
@@ -755,7 +800,7 @@ export class DockviewApi {
|
|
|
755
800
|
* Add a popout group in a new Window
|
|
756
801
|
*/
|
|
757
802
|
addPopoutGroup(item, options) {
|
|
758
|
-
return this.component.addPopoutGroup(item, options);
|
|
803
|
+
return this.component.withOrigin('api', () => this.component.addPopoutGroup(item, options));
|
|
759
804
|
}
|
|
760
805
|
/**
|
|
761
806
|
* Add an edge group at the given position. Returns the group panel API
|
|
@@ -803,23 +848,23 @@ export class DockviewApi {
|
|
|
803
848
|
}
|
|
804
849
|
createTabGroup(options) {
|
|
805
850
|
const model = this._getGroupModel(options.groupId);
|
|
806
|
-
return model.createTabGroup({
|
|
851
|
+
return this.component.withOrigin('api', () => model.createTabGroup({
|
|
807
852
|
label: options.label,
|
|
808
853
|
color: options.color,
|
|
809
854
|
componentParams: options.componentParams,
|
|
810
|
-
});
|
|
855
|
+
}));
|
|
811
856
|
}
|
|
812
857
|
dissolveTabGroup(options) {
|
|
813
858
|
const model = this._getGroupModel(options.groupId);
|
|
814
|
-
model.dissolveTabGroup(options.tabGroupId);
|
|
859
|
+
this.component.withOrigin('api', () => model.dissolveTabGroup(options.tabGroupId));
|
|
815
860
|
}
|
|
816
861
|
addPanelToTabGroup(options) {
|
|
817
862
|
const model = this._getGroupModel(options.groupId);
|
|
818
|
-
model.addPanelToTabGroup(options.tabGroupId, options.panelId, options.index);
|
|
863
|
+
this.component.withOrigin('api', () => model.addPanelToTabGroup(options.tabGroupId, options.panelId, options.index));
|
|
819
864
|
}
|
|
820
865
|
removePanelFromTabGroup(options) {
|
|
821
866
|
const model = this._getGroupModel(options.groupId);
|
|
822
|
-
model.removePanelFromTabGroup(options.panelId);
|
|
867
|
+
this.component.withOrigin('api', () => model.removePanelFromTabGroup(options.panelId));
|
|
823
868
|
}
|
|
824
869
|
getTabGroups(options) {
|
|
825
870
|
const model = this._getGroupModel(options.groupId);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Position } from '../dnd/droptarget';
|
|
2
2
|
import { DockviewComponent } from '../dockview/dockviewComponent';
|
|
3
|
+
import { Box } from '../types';
|
|
3
4
|
import { DockviewGroupPanel } from '../dockview/dockviewGroupPanel';
|
|
4
|
-
import {
|
|
5
|
+
import { DockviewGroupActivePanelChangeEvent, DockviewGroupLocation, DockviewGroupPanelLocked } from '../dockview/dockviewGroupPanelModel';
|
|
5
6
|
import { DockviewHeaderPosition } from '../dockview/options';
|
|
6
7
|
import { Emitter, Event } from '../events';
|
|
7
8
|
import { GridviewPanelApi, GridviewPanelApiImpl, SizeEvent } from './gridviewPanelApi';
|
|
@@ -21,8 +22,15 @@ export interface DockviewGroupPanelCollapsedChangeEvent {
|
|
|
21
22
|
readonly isCollapsed: boolean;
|
|
22
23
|
}
|
|
23
24
|
export interface DockviewGroupPanelApi extends GridviewPanelApi {
|
|
24
|
-
readonly onDidLocationChange: Event<
|
|
25
|
-
|
|
25
|
+
readonly onDidLocationChange: Event<DockviewGroupPanelLocationChangeEvent>;
|
|
26
|
+
/**
|
|
27
|
+
* Fires when the active panel *within this group* changes. Scoped to the
|
|
28
|
+
* group, in contrast to the component-level
|
|
29
|
+
* `DockviewApi.onDidActivePanelChange` (which tracks the active panel across
|
|
30
|
+
* the whole dockview). Both carry an {@link DockviewOrigin} reporting
|
|
31
|
+
* whether the change came from a user gesture or an API call.
|
|
32
|
+
*/
|
|
33
|
+
readonly onDidActivePanelChange: Event<DockviewGroupActivePanelChangeEvent>;
|
|
26
34
|
/**
|
|
27
35
|
* Fired when an edge group's collapsed state changes.
|
|
28
36
|
* Never fires for non-edge groups.
|
|
@@ -61,20 +69,27 @@ export interface DockviewGroupPanelApi extends GridviewPanelApi {
|
|
|
61
69
|
*/
|
|
62
70
|
isCollapsed(): boolean;
|
|
63
71
|
}
|
|
64
|
-
export interface
|
|
72
|
+
export interface DockviewGroupPanelLocationChangeEvent {
|
|
65
73
|
readonly location: DockviewGroupLocation;
|
|
66
74
|
}
|
|
67
75
|
export declare class DockviewGroupPanelApiImpl extends GridviewPanelApiImpl {
|
|
68
76
|
private readonly accessor;
|
|
69
77
|
private _group;
|
|
70
78
|
private _pendingSize;
|
|
71
|
-
readonly _onDidLocationChange: Emitter<
|
|
72
|
-
readonly onDidLocationChange: Event<
|
|
73
|
-
readonly _onDidActivePanelChange: Emitter<
|
|
74
|
-
readonly onDidActivePanelChange: Event<
|
|
79
|
+
readonly _onDidLocationChange: Emitter<DockviewGroupPanelLocationChangeEvent>;
|
|
80
|
+
readonly onDidLocationChange: Event<DockviewGroupPanelLocationChangeEvent>;
|
|
81
|
+
readonly _onDidActivePanelChange: Emitter<DockviewGroupActivePanelChangeEvent>;
|
|
82
|
+
readonly onDidActivePanelChange: Event<DockviewGroupActivePanelChangeEvent>;
|
|
75
83
|
readonly _onDidCollapsedChange: Emitter<DockviewGroupPanelCollapsedChangeEvent>;
|
|
76
84
|
readonly onDidCollapsedChange: Event<DockviewGroupPanelCollapsedChangeEvent>;
|
|
77
85
|
get location(): DockviewGroupLocation;
|
|
86
|
+
/**
|
|
87
|
+
* The group's bounding box relative to the top-left of the dockview root,
|
|
88
|
+
* in pixels. Covers grid and floating groups; returns `undefined` for a
|
|
89
|
+
* popout group (it lives in a separate window). Reflects the live rendered
|
|
90
|
+
* geometry, so it is only meaningful once the layout has been sized.
|
|
91
|
+
*/
|
|
92
|
+
get boundingBox(): Box | undefined;
|
|
78
93
|
get locked(): DockviewGroupPanelLocked;
|
|
79
94
|
set locked(value: DockviewGroupPanelLocked);
|
|
80
95
|
constructor(id: string, accessor: DockviewComponent);
|
|
@@ -9,6 +9,25 @@ export class DockviewGroupPanelApiImpl extends GridviewPanelApiImpl {
|
|
|
9
9
|
}
|
|
10
10
|
return this._group.model.location;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* The group's bounding box relative to the top-left of the dockview root,
|
|
14
|
+
* in pixels. Covers grid and floating groups; returns `undefined` for a
|
|
15
|
+
* popout group (it lives in a separate window). Reflects the live rendered
|
|
16
|
+
* geometry, so it is only meaningful once the layout has been sized.
|
|
17
|
+
*/
|
|
18
|
+
get boundingBox() {
|
|
19
|
+
if (!this._group || this._group.model.location.type === 'popout') {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
const root = this.accessor.element.getBoundingClientRect();
|
|
23
|
+
const rect = this._group.element.getBoundingClientRect();
|
|
24
|
+
return {
|
|
25
|
+
left: rect.left - root.left,
|
|
26
|
+
top: rect.top - root.top,
|
|
27
|
+
width: rect.width,
|
|
28
|
+
height: rect.height,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
12
31
|
get locked() {
|
|
13
32
|
if (!this._group) {
|
|
14
33
|
throw new Error(NOT_INITIALIZED_MESSAGE);
|
|
@@ -4,7 +4,7 @@ import { DockviewGroupPanel } from '../dockview/dockviewGroupPanel';
|
|
|
4
4
|
import { DockviewPanel } from '../dockview/dockviewPanel';
|
|
5
5
|
import { DockviewComponent } from '../dockview/dockviewComponent';
|
|
6
6
|
import { DockviewPanelRenderer } from '../overlay/overlayRenderContainer';
|
|
7
|
-
import { DockviewGroupMoveParams,
|
|
7
|
+
import { DockviewGroupMoveParams, DockviewGroupPanelLocationChangeEvent } from './dockviewGroupPanelApi';
|
|
8
8
|
import { DockviewGroupLocation } from '../dockview/dockviewGroupPanelModel';
|
|
9
9
|
export interface TitleEvent {
|
|
10
10
|
readonly title: string;
|
|
@@ -34,7 +34,7 @@ export interface DockviewPanelApi extends Omit<GridviewPanelApi, 'setVisible' |
|
|
|
34
34
|
readonly onDidTitleChange: Event<TitleEvent>;
|
|
35
35
|
readonly onDidRendererChange: Event<RendererChangedEvent>;
|
|
36
36
|
readonly location: DockviewGroupLocation;
|
|
37
|
-
readonly onDidLocationChange: Event<
|
|
37
|
+
readonly onDidLocationChange: Event<DockviewGroupPanelLocationChangeEvent>;
|
|
38
38
|
close(): void;
|
|
39
39
|
setTitle(title: string): void;
|
|
40
40
|
setRenderer(renderer: DockviewPanelRenderer): void;
|
|
@@ -61,7 +61,7 @@ export declare class DockviewPanelApiImpl extends GridviewPanelApiImpl implement
|
|
|
61
61
|
readonly _onDidRendererChange: Emitter<RendererChangedEvent>;
|
|
62
62
|
readonly onDidRendererChange: Event<RendererChangedEvent>;
|
|
63
63
|
private readonly _onDidLocationChange;
|
|
64
|
-
readonly onDidLocationChange: Event<
|
|
64
|
+
readonly onDidLocationChange: Event<DockviewGroupPanelLocationChangeEvent>;
|
|
65
65
|
private readonly groupEventsDisposable;
|
|
66
66
|
get location(): DockviewGroupLocation;
|
|
67
67
|
get title(): string | undefined;
|
|
@@ -72,6 +72,7 @@ export declare class DockviewPanelApiImpl extends GridviewPanelApiImpl implement
|
|
|
72
72
|
get tabComponent(): string | undefined;
|
|
73
73
|
constructor(panel: DockviewPanel, group: DockviewGroupPanel, accessor: DockviewComponent, component: string, tabComponent?: string);
|
|
74
74
|
getWindow(): Window;
|
|
75
|
+
setActive(): void;
|
|
75
76
|
moveTo(options: DockviewPanelMoveParams): void;
|
|
76
77
|
setTitle(title: string): void;
|
|
77
78
|
setRenderer(renderer: DockviewPanelRenderer): void;
|
|
@@ -55,6 +55,13 @@ export class DockviewPanelApiImpl extends GridviewPanelApiImpl {
|
|
|
55
55
|
getWindow() {
|
|
56
56
|
return this.group.api.getWindow();
|
|
57
57
|
}
|
|
58
|
+
setActive() {
|
|
59
|
+
// A bare `panel.api.setActive()` from application code is a
|
|
60
|
+
// programmatic activation. Tag it `'api'` so `onDidActivePanelChange`
|
|
61
|
+
// reports the correct origin; user-gesture call sites that route
|
|
62
|
+
// through here wrap the call in `withOrigin('user')` first, which wins.
|
|
63
|
+
this.accessor.withOrigin('api', () => super.setActive());
|
|
64
|
+
}
|
|
58
65
|
moveTo(options) {
|
|
59
66
|
var _a, _b;
|
|
60
67
|
this.accessor.moveGroupOrPanel({
|
|
@@ -103,6 +103,14 @@ export declare class Droptarget extends CompositeDisposable implements IDropTarg
|
|
|
103
103
|
private toggleClasses;
|
|
104
104
|
private calculateQuadrant;
|
|
105
105
|
private removeDropTarget;
|
|
106
|
+
/**
|
|
107
|
+
* Render the drop overlay at `position` without a live drag, so keyboard
|
|
108
|
+
* docking shows the exact same preview as a mouse drag. Mirrors the
|
|
109
|
+
* `onDragOver` render path (in-place or anchored). Pair with `clearOverlay`.
|
|
110
|
+
*/
|
|
111
|
+
showOverlay(position: Position): void;
|
|
112
|
+
/** Clear an overlay shown via {@link showOverlay} (in-place or anchored). */
|
|
113
|
+
clearOverlay(): void;
|
|
106
114
|
}
|
|
107
115
|
export declare function calculateQuadrantAsPercentage(overlayType: Set<Position>, x: number, y: number, width: number, height: number, threshold: number): Position | null;
|
|
108
116
|
export declare function calculateQuadrantAsPixels(overlayType: Set<Position>, x: number, y: number, width: number, height: number, threshold: number): Position | null;
|
|
@@ -246,6 +246,34 @@ export class Droptarget extends CompositeDisposable {
|
|
|
246
246
|
this.overlayElement = undefined;
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
+
/**
|
|
250
|
+
* Render the drop overlay at `position` without a live drag, so keyboard
|
|
251
|
+
* docking shows the exact same preview as a mouse drag. Mirrors the
|
|
252
|
+
* `onDragOver` render path (in-place or anchored). Pair with `clearOverlay`.
|
|
253
|
+
*/
|
|
254
|
+
showOverlay(position) {
|
|
255
|
+
var _a, _b, _c, _d, _e;
|
|
256
|
+
const overrideTarget = (_b = (_a = this.options).getOverrideTarget) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
257
|
+
const target = (_e = (_d = (_c = this.options).getOverlayOutline) === null || _d === void 0 ? void 0 : _d.call(_c)) !== null && _e !== void 0 ? _e : this.element;
|
|
258
|
+
const width = target.offsetWidth;
|
|
259
|
+
const height = target.offsetHeight;
|
|
260
|
+
if (!overrideTarget && !this.targetElement) {
|
|
261
|
+
const els = createOverlayElements();
|
|
262
|
+
this.targetElement = els.dropzone;
|
|
263
|
+
this.overlayElement = els.selection;
|
|
264
|
+
target.classList.add('dv-drop-target');
|
|
265
|
+
target.append(this.targetElement);
|
|
266
|
+
}
|
|
267
|
+
this.toggleClasses(position, width, height);
|
|
268
|
+
this._state = position;
|
|
269
|
+
}
|
|
270
|
+
/** Clear an overlay shown via {@link showOverlay} (in-place or anchored). */
|
|
271
|
+
clearOverlay() {
|
|
272
|
+
var _a, _b, _c;
|
|
273
|
+
this.removeDropTarget();
|
|
274
|
+
(_c = (_b = (_a = this.options).getOverrideTarget) === null || _b === void 0 ? void 0 : _b.call(_a)) === null || _c === void 0 ? void 0 : _c.clear();
|
|
275
|
+
this._state = undefined;
|
|
276
|
+
}
|
|
249
277
|
}
|
|
250
278
|
Droptarget.USED_EVENT_ID = '__dockview_droptarget_event_is_used__';
|
|
251
279
|
export function calculateQuadrantAsPercentage(overlayType, x, y, width, height, threshold) {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Position } from '../dnd/droptarget';
|
|
2
|
+
/**
|
|
3
|
+
* The full set of localisable strings dockview speaks to assistive technology:
|
|
4
|
+
* the LiveRegion announcements and the keyboard-docking narration. Each entry
|
|
5
|
+
* returns the complete sentence so a translator owns wording *and* word order.
|
|
6
|
+
*
|
|
7
|
+
* Override any subset via the `messages` option; unset entries keep the
|
|
8
|
+
* English defaults below. For fine-grained, per-event announcement overrides
|
|
9
|
+
* (with access to the panel) use `getAnnouncement`, which takes precedence.
|
|
10
|
+
*/
|
|
11
|
+
export interface DockviewMessages {
|
|
12
|
+
panelOpened(title: string): string;
|
|
13
|
+
panelClosed(title: string): string;
|
|
14
|
+
groupMaximized(title: string): string;
|
|
15
|
+
groupRestored(title: string): string;
|
|
16
|
+
groupFloated(title: string): string;
|
|
17
|
+
groupDocked(title: string): string;
|
|
18
|
+
groupPoppedOut(title: string): string;
|
|
19
|
+
/** Target phase: which group is highlighted, and how to proceed. */
|
|
20
|
+
movePickTarget(source: string, target: string, current: number, total: number): string;
|
|
21
|
+
/** Edge phase: which drop position is selected, and how to proceed. */
|
|
22
|
+
movePickEdge(position: Position, target: string): string;
|
|
23
|
+
/** A move committed. */
|
|
24
|
+
moveCommitted(source: string, target: string, position: Position): string;
|
|
25
|
+
/** A move cancelled with Escape. */
|
|
26
|
+
moveCancelled(): string;
|
|
27
|
+
/** A move the layout rejected. */
|
|
28
|
+
moveNotAllowed(): string;
|
|
29
|
+
}
|
|
30
|
+
export declare const DEFAULT_MESSAGES: DockviewMessages;
|
|
31
|
+
/** Merge an app's partial overrides over the English defaults. */
|
|
32
|
+
export declare function resolveMessages(overrides?: Partial<DockviewMessages>): DockviewMessages;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Where a drop position lands, phrased for the *edge prompt*. */
|
|
2
|
+
function edgeWhere(position, target) {
|
|
3
|
+
return position === 'center'
|
|
4
|
+
? `Tab into ${target}`
|
|
5
|
+
: `Split ${position} of ${target}`;
|
|
6
|
+
}
|
|
7
|
+
/** Where a drop position landed, phrased for the *commit* sentence. */
|
|
8
|
+
function committedWhere(position, target) {
|
|
9
|
+
return position === 'center'
|
|
10
|
+
? `docked into ${target}`
|
|
11
|
+
: `split ${position} of ${target}`;
|
|
12
|
+
}
|
|
13
|
+
export const DEFAULT_MESSAGES = {
|
|
14
|
+
panelOpened: (title) => `${title} opened`,
|
|
15
|
+
panelClosed: (title) => `${title} closed`,
|
|
16
|
+
groupMaximized: (title) => `${title} maximized`,
|
|
17
|
+
groupRestored: (title) => `${title} restored`,
|
|
18
|
+
groupFloated: (title) => `${title} floated`,
|
|
19
|
+
groupDocked: (title) => `${title} docked`,
|
|
20
|
+
groupPoppedOut: (title) => `${title} opened in a new window`,
|
|
21
|
+
movePickTarget: (source, target, current, total) => `Moving ${source}. Target ${target}, ${current} of ${total}. Enter to choose where, Escape to cancel.`,
|
|
22
|
+
movePickEdge: (position, target) => `${edgeWhere(position, target)}. Arrows to change, Enter to confirm, Escape to go back.`,
|
|
23
|
+
moveCommitted: (source, target, position) => `${source} ${committedWhere(position, target)}.`,
|
|
24
|
+
moveCancelled: () => `Move cancelled.`,
|
|
25
|
+
moveNotAllowed: () => `That move is not allowed.`,
|
|
26
|
+
};
|
|
27
|
+
/** Merge an app's partial overrides over the English defaults. */
|
|
28
|
+
export function resolveMessages(overrides) {
|
|
29
|
+
return overrides ? Object.assign(Object.assign({}, DEFAULT_MESSAGES), overrides) : DEFAULT_MESSAGES;
|
|
30
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DockviewModule } from './modules';
|
|
2
|
+
/**
|
|
3
|
+
* Internal list of the built-in modules that ship with the core. Registered
|
|
4
|
+
* automatically by DockviewComponent at construction time; not exported from
|
|
5
|
+
* the package. Additional modules contributed by sibling packages (via
|
|
6
|
+
* `registerModules(...)`) are appended at construction.
|
|
7
|
+
*/
|
|
8
|
+
export declare const AllModules: DockviewModule<any>[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FloatingGroupModule } from './floatingGroupService';
|
|
2
|
+
import { PopoutWindowModule } from './popoutWindowService';
|
|
3
|
+
import { WatermarkModule } from './watermarkService';
|
|
4
|
+
import { EdgeGroupModule } from './edgeGroupService';
|
|
5
|
+
import { RootDropTargetModule } from './rootDropTargetService';
|
|
6
|
+
import { HeaderActionsModule } from './headerActionsService';
|
|
7
|
+
import { LiveRegionModule } from './liveRegionService';
|
|
8
|
+
/**
|
|
9
|
+
* Internal list of the built-in modules that ship with the core. Registered
|
|
10
|
+
* automatically by DockviewComponent at construction time; not exported from
|
|
11
|
+
* the package. Additional modules contributed by sibling packages (via
|
|
12
|
+
* `registerModules(...)`) are appended at construction.
|
|
13
|
+
*/
|
|
14
|
+
export const AllModules = [
|
|
15
|
+
FloatingGroupModule,
|
|
16
|
+
PopoutWindowModule,
|
|
17
|
+
WatermarkModule,
|
|
18
|
+
EdgeGroupModule,
|
|
19
|
+
RootDropTargetModule,
|
|
20
|
+
HeaderActionsModule,
|
|
21
|
+
LiveRegionModule,
|
|
22
|
+
];
|
|
@@ -19,6 +19,7 @@ export interface IContentContainer extends IDisposable {
|
|
|
19
19
|
asActive: boolean;
|
|
20
20
|
}): void;
|
|
21
21
|
refreshFocusState(): void;
|
|
22
|
+
setLabelledBy(tabElementId: string | undefined): void;
|
|
22
23
|
}
|
|
23
24
|
export declare class ContentContainer extends CompositeDisposable implements IContentContainer {
|
|
24
25
|
private readonly accessor;
|
|
@@ -37,6 +38,7 @@ export declare class ContentContainer extends CompositeDisposable implements ICo
|
|
|
37
38
|
constructor(accessor: DockviewComponent, group: DockviewGroupPanelModel);
|
|
38
39
|
show(): void;
|
|
39
40
|
hide(): void;
|
|
41
|
+
setLabelledBy(tabElementId: string | undefined): void;
|
|
40
42
|
renderPanel(panel: IDockviewPanel, options?: {
|
|
41
43
|
asActive: boolean;
|
|
42
44
|
}): void;
|