@theia/core
Version:
Theia is a cloud & desktop IDE framework implemented in TypeScript.
736 lines • 29.9 kB
JavaScript
// *****************************************************************************
// Copyright (C) 2018 TypeFox and others.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v. 2.0 which is available at
// http://www.eclipse.org/legal/epl-2.0.
//
// This Source Code may also be made available under the following Secondary
// Licenses when the conditions for such availability set forth in the Eclipse
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
// with the GNU Classpath Exception which is available at
// https://www.gnu.org/software/classpath/license.html.
//
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
// *****************************************************************************
var SidePanelHandler_1;
import { __decorate } from "tslib";
import { injectable, inject } from 'inversify';
import { find, map, toArray, some } from '@lumino/algorithm';
import { Panel, BoxPanel, BoxLayout, SplitPanel, PanelLayout } from '@lumino/widgets';
import { MimeData } from '@lumino/coreutils';
import { Drag } from '@lumino/dragdrop';
import { AttachedProperty } from '@lumino/properties';
import { TabBarRendererFactory, SHELL_TABBAR_CONTEXT_MENU, SideTabBar } from './tab-bars.js';
import { SidebarBottomMenuWidgetFactory, SidebarTopMenuWidgetFactory } from './sidebar-menu-widget.js';
import { SplitPositionHandler } from './split-panels.js';
import { animationFrame } from '../browser.js';
import { FrontendApplicationStateService } from '../frontend-application-state.js';
import { TheiaDockPanel } from './theia-dock-panel.js';
import { SidePanelToolbar } from './side-panel-toolbar.js';
import { TabBarToolbarRegistry, TabBarToolbarFactory } from './tab-bar-toolbar/index.js';
import { DisposableCollection, Disposable } from '../../common/disposable.js';
import { ContextMenuRenderer } from '../context-menu-renderer.js';
import { GroupImpl } from '../../common/menu/index.js';
import { PINNED_CLASS } from '../widgets/index.js';
import { AdditionalViewsMenuWidgetFactory } from './additional-views-menu-widget.js';
import { SidePanelItemVisibility } from './side-panel-item-visibility.js';
/** The class name added to the left and right area panels. */
export const LEFT_RIGHT_AREA_CLASS = 'theia-app-sides';
/** The class name added to collapsed side panels. */
const COLLAPSED_CLASS = 'theia-mod-collapsed';
export const SidePanelHandlerFactory = Symbol('SidePanelHandlerFactory');
export const SIDE_PANEL_TOOLBAR_CONTEXT_MENU = ['SIDE_PANEL_TOOLBAR_CONTEXT_MENU'];
/**
* A class which manages a dock panel and a related side bar. This is used for the left and right
* panel of the application shell.
*/
let SidePanelHandler = class SidePanelHandler {
constructor() {
/**
* The current state of the side panel.
*/
this.state = {
empty: true,
expansion: SidePanel.ExpansionState.collapsed,
pendingUpdate: Promise.resolve()
};
// should be a property to preserve fn identity
this.updateToolbarTitle = () => {
const currentTitle = this.tabBar && this.tabBar.currentTitle;
this.toolBar.toolbarTitle = currentTitle || undefined;
};
this.toDisposeOnCurrentTabChanged = new DisposableCollection();
}
static { SidePanelHandler_1 = this; }
/**
* A property that can be attached to widgets in order to determine the insertion index
* of their title in the tab bar.
*/
static { this.rankProperty = new AttachedProperty({
name: 'sidePanelRank',
create: () => undefined
}); }
/**
* Create the side bar and dock panel widgets.
*/
create(side, options) {
this.side = side;
this.options = options;
this.topMenu = this.createSidebarTopMenu();
this.tabBar = this.createSideBar();
this.additionalViewsMenu = this.createAdditionalViewsWidget();
this.bottomMenu = this.createSidebarBottomMenu();
this.toolBar = this.createToolbar();
this.dockPanel = this.createSidePanel();
this.container = this.createContainer();
this.refresh();
}
createSideBar() {
const side = this.side;
const tabBarRenderer = this.tabBarRendererFactory();
const sideBar = new SideTabBar({
// Tab bar options
orientation: side === 'left' || side === 'right' ? 'vertical' : 'horizontal',
insertBehavior: 'none',
removeBehavior: 'select-previous-tab',
allowDeselect: false,
tabsMovable: true,
renderer: tabBarRenderer,
// Scroll bar options
handlers: ['drag-thumb', 'keyboard', 'wheel', 'touch'],
useBothWheelAxes: true,
scrollYMarginOffset: 8,
suppressScrollX: true
});
tabBarRenderer.tabBar = sideBar;
sideBar.disposed.connect(() => tabBarRenderer.dispose());
tabBarRenderer.contextMenuPath = SHELL_TABBAR_CONTEXT_MENU;
sideBar.addClass('theia-app-' + side);
sideBar.addClass(LEFT_RIGHT_AREA_CLASS);
sideBar.tabAdded.connect((sender, { title }) => {
const widget = title.owner;
if (!some(this.dockPanel.widgets(), w => w === widget)) {
this.dockPanel.addWidget(widget);
}
}, this);
sideBar.tabActivateRequested.connect((sender, { title }) => title.owner.activate());
sideBar.tabCloseRequested.connect((sender, { title }) => title.owner.close());
sideBar.collapseRequested.connect(() => this.collapse(), this);
sideBar.currentChanged.connect(this.onCurrentTabChanged, this);
sideBar.tabDetachRequested.connect(this.onTabDetachRequested, this);
sideBar.tabsOverflowChanged.connect(this.onTabsOverflowChanged, this);
sideBar.shouldHideTitle = title => this.itemVisibility.isHidden(title.owner.id);
sideBar.node.addEventListener('contextmenu', e => this.showItemsContextMenu(e));
this.itemVisibility.onDidChange(widgetId => this.onItemVisibilityChanged(widgetId));
// A reset or the stored choices loading only change what renders: the current item stays current
// even when it turns out hidden, the same as opening a hidden item.
this.itemVisibility.onDidReset(() => sideBar.update());
this.itemVisibility.ready.then(() => sideBar.update());
sideBar.widgetDropped.connect(this.onWidgetDropped, this);
return sideBar;
}
createSidePanel() {
const sidePanel = this.dockPanelFactory({
mode: 'single-document'
});
sidePanel.id = 'theia-' + this.side + '-side-panel';
sidePanel.addClass('theia-side-panel');
sidePanel.widgetActivated.connect((sender, widget) => {
this.tabBar.currentTitle = widget.title;
}, this);
sidePanel.widgetAdded.connect(this.onWidgetAdded, this);
sidePanel.widgetRemoved.connect(this.onWidgetRemoved, this);
return sidePanel;
}
createToolbar() {
const toolbar = new SidePanelToolbar(this.tabBarToolBarRegistry, this.tabBarToolBarFactory, this.side);
toolbar.onContextMenu(e => this.showContextMenu(e));
return toolbar;
}
createAdditionalViewsWidget() {
const widget = this.additionalViewsMenuFactory(this.side);
widget.addClass('theia-sidebar-menu');
widget.addClass('theia-additional-views-menu');
return widget;
}
createSidebarTopMenu() {
return this.createSidebarMenu(this.sidebarTopWidgetFactory);
}
createSidebarBottomMenu() {
return this.createSidebarMenu(this.sidebarBottomWidgetFactory);
}
createSidebarMenu(factory) {
const menu = factory();
menu.addClass('theia-sidebar-menu');
return menu;
}
showContextMenu(e) {
const title = this.tabBar.currentTitle;
if (!title) {
return;
}
e.stopPropagation();
e.preventDefault();
this.contextMenuRenderer.render({
args: [title.owner],
menuPath: SIDE_PANEL_TOOLBAR_CONTEXT_MENU,
anchor: e,
context: e.currentTarget instanceof HTMLElement ? e.currentTarget : this.tabBar.node
});
}
onItemVisibilityChanged(widgetId) {
const current = this.tabBar.currentTitle;
if (current?.owner.id === widgetId && this.itemVisibility.isHidden(widgetId)) {
this.moveOffHiddenItem(current);
}
this.tabBar.update();
}
/**
* Makes the next item that is not hidden current, else the previous one, or collapses the panel
* if there is none.
*/
moveOffHiddenItem(title) {
const titles = this.tabBar.titles;
const index = titles.indexOf(title);
const isShown = (other) => !this.itemVisibility.isHidden(other.owner.id);
const next = titles.slice(index + 1).find(isShown) ?? titles.slice(0, index).reverse().find(isShown);
if (next) {
this.tabBar.currentTitle = next;
}
else {
this.collapse();
}
}
showItemsContextMenu(e) {
if (this.tabBar.titles.length === 0) {
return;
}
e.stopPropagation();
e.preventDefault();
const menu = new GroupImpl('sidePanelItems');
menu.addNode(...this.tabBar.titles.map((title, index) => this.createItemMenuNode(title, index)));
this.contextMenuRenderer.render({
menu,
menuPath: ['side-panel-items'],
anchor: e,
context: this.tabBar.node
});
}
createItemMenuNode(title, index) {
const widgetId = title.owner.id;
return {
id: widgetId,
label: title.label || title.caption,
sortString: index.toString().padStart(4, '0'),
isVisible: () => true,
isEnabled: () => this.itemVisibility.isHidden(widgetId) || this.tabBar.canHideTitle(title),
isToggled: () => !this.itemVisibility.isHidden(widgetId),
run: async () => this.toggleItem(title)
};
}
toggleItem(title) {
const id = title.owner.id;
if (this.itemVisibility.isHidden(id)) {
this.itemVisibility.setHidden(id, false);
this.activate(id);
}
else {
this.itemVisibility.setHidden(id, true);
}
}
createContainer() {
const contentBox = new BoxLayout({ direction: 'top-to-bottom', spacing: 0 });
BoxPanel.setStretch(this.toolBar, 0);
contentBox.addWidget(this.toolBar);
BoxPanel.setStretch(this.dockPanel, 1);
contentBox.addWidget(this.dockPanel);
const contentPanel = new BoxPanel({ layout: contentBox });
const side = this.side;
let direction;
switch (side) {
case 'left':
direction = 'left-to-right';
break;
case 'right':
direction = 'right-to-left';
break;
default:
throw new Error('Illegal argument: ' + side);
}
const containerLayout = new BoxLayout({ direction, spacing: 0 });
const sidebarContainerLayout = new PanelLayout();
const sidebarContainer = new Panel({ layout: sidebarContainerLayout });
sidebarContainer.addClass('theia-app-sidebar-container');
sidebarContainerLayout.addWidget(this.topMenu);
sidebarContainerLayout.addWidget(this.tabBar);
sidebarContainerLayout.addWidget(this.additionalViewsMenu);
sidebarContainerLayout.addWidget(this.bottomMenu);
BoxPanel.setStretch(sidebarContainer, 0);
BoxPanel.setStretch(contentPanel, 1);
containerLayout.addWidget(sidebarContainer);
containerLayout.addWidget(contentPanel);
const boxPanel = new BoxPanel({ layout: containerLayout });
boxPanel.id = 'theia-' + side + '-content-panel';
return boxPanel;
}
/**
* Create an object that describes the current side panel layout. This object may contain references
* to widgets; these need to be transformed before the layout can be serialized.
*/
getLayoutData() {
const currentTitle = this.tabBar.currentTitle;
const items = toArray(map(this.tabBar.titles, title => ({
widget: title.owner,
rank: SidePanelHandler_1.rankProperty.get(title.owner),
expanded: title === currentTitle,
pinned: title.className.includes(PINNED_CLASS)
})));
// eslint-disable-next-line no-null/no-null
const size = currentTitle !== null ? this.getPanelSize() : this.state.lastPanelSize;
return { type: 'sidepanel', items, size };
}
/**
* Apply a side panel layout that has been previously created with `getLayoutData`.
*/
setLayoutData(layoutData) {
// eslint-disable-next-line no-null/no-null
this.tabBar.currentTitle = null;
let currentTitle;
if (layoutData.items) {
for (const { widget, rank, expanded, pinned } of layoutData.items) {
if (widget) {
if (rank) {
SidePanelHandler_1.rankProperty.set(widget, rank);
}
if (expanded) {
currentTitle = widget.title;
}
if (pinned) {
widget.title.className += ` ${PINNED_CLASS}`;
widget.title.closable = false;
}
// Add the widgets directly to the tab bar in the same order as they are stored
this.tabBar.addTab(widget.title);
}
}
}
if (layoutData.size) {
this.state.lastPanelSize = layoutData.size;
}
// If the layout data contains an expanded item, update the currentTitle property
// This implies a refresh through the `currentChanged` signal
if (currentTitle) {
this.tabBar.currentTitle = currentTitle;
}
else {
this.refresh();
}
}
/**
* Activate a widget residing in the side panel by ID.
*
* @returns the activated widget if it was found
*/
activate(id) {
const widget = this.expand(id);
if (widget) {
widget.activate();
}
return widget;
}
/**
* Expand a widget residing in the side panel by ID. If no ID is given and the panel is
* currently collapsed, the last active tab of this side panel is expanded. If no tab
* was expanded previously, the first one is taken.
*
* @returns the expanded widget if it was found
*/
expand(id) {
if (id) {
const widget = find(this.dockPanel.widgets(), w => w.id === id);
if (widget) {
this.tabBar.currentTitle = widget.title;
}
return widget;
}
else if (this.tabBar.currentTitle) {
return this.tabBar.currentTitle.owner;
}
else if (this.tabBar.titles.length > 0) {
let index = this.state.lastActiveTabIndex;
if (!index) {
index = 0;
}
else if (index >= this.tabBar.titles.length) {
index = this.tabBar.titles.length - 1;
}
const title = this.tabBar.titles[index];
this.tabBar.currentTitle = title;
return title.owner;
}
else {
// Reveal the tab bar and dock panel even if there is no widget
// The next call to `refreshVisibility` will collapse them again
this.state.expansion = SidePanel.ExpansionState.expanding;
let relativeSizes;
const parent = this.container.parent;
if (parent instanceof SplitPanel) {
relativeSizes = parent.relativeSizes();
}
this.container.removeClass(COLLAPSED_CLASS);
this.container.show();
this.tabBar.show();
this.dockPanel.node.style.minWidth = '0';
this.dockPanel.show();
if (relativeSizes && parent instanceof SplitPanel) {
// Make sure that the expansion animation starts at zero size
parent.setRelativeSizes(relativeSizes);
}
this.setPanelSize(this.options.emptySize).then(() => {
if (this.state.expansion === SidePanel.ExpansionState.expanding) {
this.state.expansion = SidePanel.ExpansionState.expanded;
}
});
}
}
/**
* Collapse the sidebar so no items are expanded.
*/
collapse() {
if (this.tabBar.currentTitle) {
// eslint-disable-next-line no-null/no-null
this.tabBar.currentTitle = null;
}
else {
this.refresh();
}
return animationFrame();
}
/**
* Add a widget and its title to the dock panel and side bar.
*
* If the widget is already added, it will be moved.
*/
addWidget(widget, options) {
if (options.rank) {
SidePanelHandler_1.rankProperty.set(widget, options.rank);
}
this.dockPanel.addWidget(widget);
}
/**
* Add a menu to the sidebar top.
*
* If the menu is already added, it will be ignored.
*/
addTopMenu(menu) {
this.topMenu.addMenu(menu);
}
/**
* Remove a menu from the sidebar top.
*
* @param menuId id of the menu to remove
*/
removeTopMenu(menuId) {
this.topMenu.removeMenu(menuId);
}
/**
* Add a menu to the sidebar bottom.
*
* If the menu is already added, it will be ignored.
*/
addBottomMenu(menu) {
this.bottomMenu.addMenu(menu);
}
/**
* Remove a menu from the sidebar bottom.
*
* @param menuId id of the menu to remove
*/
removeBottomMenu(menuId) {
this.bottomMenu.removeMenu(menuId);
}
/**
* Refresh the visibility of the side bar and dock panel.
*/
refresh() {
const container = this.container;
const parent = container.parent;
const tabBar = this.tabBar;
const dockPanel = this.dockPanel;
const isEmpty = tabBar.titles.length === 0;
const currentTitle = tabBar.currentTitle;
// eslint-disable-next-line no-null/no-null
const hideDockPanel = currentTitle === null;
this.updateSashState(this.container, hideDockPanel);
let relativeSizes;
if (hideDockPanel) {
container.addClass(COLLAPSED_CLASS);
if (this.state.expansion === SidePanel.ExpansionState.expanded && !this.state.empty) {
// Update the lastPanelSize property
const size = this.getPanelSize();
if (size) {
this.state.lastPanelSize = size;
}
}
this.state.expansion = SidePanel.ExpansionState.collapsed;
}
else {
container.removeClass(COLLAPSED_CLASS);
let size;
if (this.state.expansion !== SidePanel.ExpansionState.expanded) {
if (this.state.lastPanelSize) {
size = this.state.lastPanelSize;
}
else {
size = this.getDefaultPanelSize();
}
}
if (size) {
// Restore the panel size to the last known size or the default size
this.state.expansion = SidePanel.ExpansionState.expanding;
if (parent instanceof SplitPanel) {
relativeSizes = parent.relativeSizes();
}
this.setPanelSize(size).then(() => {
if (this.state.expansion === SidePanel.ExpansionState.expanding) {
this.state.expansion = SidePanel.ExpansionState.expanded;
}
});
}
else {
this.state.expansion = SidePanel.ExpansionState.expanded;
}
}
container.setHidden(isEmpty && hideDockPanel);
tabBar.setHidden(isEmpty);
dockPanel.setHidden(hideDockPanel);
this.state.empty = isEmpty;
if (currentTitle) {
dockPanel.selectWidget(currentTitle.owner);
}
if (relativeSizes && parent instanceof SplitPanel) {
// Make sure that the expansion animation starts at the smallest possible size
parent.setRelativeSizes(relativeSizes);
}
}
/**
* Sets the size of the side panel.
*
* @param size the desired size (width) of the panel in pixels.
*/
resize(size) {
if (this.dockPanel.isHidden) {
this.state.lastPanelSize = size;
}
else {
this.setPanelSize(size);
}
}
/**
* Compute the current width of the panel. This implementation assumes that the parent of
* the panel container is a `SplitPanel`.
*/
getPanelSize() {
const parent = this.container.parent;
if (parent instanceof SplitPanel && parent.isVisible) {
const index = parent.widgets.indexOf(this.container);
if (this.side === 'left') {
const handle = parent.handles[index];
if (!handle.classList.contains('lm-mod-hidden')) {
return handle.offsetLeft;
}
}
else if (this.side === 'right') {
const handle = parent.handles[index - 1];
if (!handle.classList.contains('lm-mod-hidden')) {
const parentWidth = parent.node.clientWidth;
return parentWidth - handle.offsetLeft;
}
}
}
}
/**
* Determine the default size to apply when the panel is expanded for the first time.
*/
getDefaultPanelSize() {
const parent = this.container.parent;
if (parent && parent.isVisible) {
return parent.node.clientWidth * this.options.initialSizeRatio;
}
}
/**
* Modify the width of the panel. This implementation assumes that the parent of the panel
* container is a `SplitPanel`.
*/
setPanelSize(size) {
const enableAnimation = this.applicationStateService.state === 'ready';
const options = {
side: this.side,
duration: enableAnimation ? this.options.expandDuration : 0,
referenceWidget: this.dockPanel
};
const promise = this.splitPositionHandler.setSidePanelSize(this.container, size, options);
const result = new Promise(resolve => {
// Resolve the resulting promise in any case, regardless of whether resizing was successful
promise.then(() => resolve(), () => resolve());
});
this.state.pendingUpdate = this.state.pendingUpdate.then(() => result);
return result;
}
/**
* Handle a `currentChanged` signal from the sidebar. The side panel is refreshed so it displays
* the new selected widget.
*/
onCurrentTabChanged(sender, { currentTitle, currentIndex }) {
this.toDisposeOnCurrentTabChanged.dispose();
if (currentTitle) {
this.updateToolbarTitle();
currentTitle.changed.connect(this.updateToolbarTitle);
this.toDisposeOnCurrentTabChanged.push(Disposable.create(() => currentTitle.changed.disconnect(this.updateToolbarTitle)));
}
if (currentIndex >= 0) {
this.state.lastActiveTabIndex = currentIndex;
sender.revealTab(currentIndex);
}
this.refresh();
}
/**
* Handle a `tabDetachRequested` signal from the sidebar. A drag is started so the widget can be
* moved to another application shell area.
*/
onTabDetachRequested(sender, { title, tab, clientX, clientY }) {
// Release the tab bar's hold on the mouse
sender.releaseMouse();
// Clone the selected tab and use that as drag image
const clonedTab = tab.cloneNode(true);
clonedTab.style.width = '';
clonedTab.style.height = '';
const label = clonedTab.getElementsByClassName('lm-TabBar-tabLabel')[0];
label.style.width = '';
label.style.height = '';
// Create and start a drag to move the selected tab to another panel
const mimeData = new MimeData();
mimeData.setData('application/vnd.lumino.widget-factory', () => title.owner);
const drag = new Drag({
mimeData,
dragImage: clonedTab,
proposedAction: 'move',
supportedActions: 'move',
});
tab.classList.add('lm-mod-hidden');
drag.start(clientX, clientY).then(() => {
// The promise is resolved when the drag has ended
tab.classList.remove('lm-mod-hidden');
});
}
/**
* Handle a `widgetDropped` signal from the sidebar. The widget is moved to this side panel, if necessary,
* and its tab is moved to the position where it was dropped.
*/
onWidgetDropped(sender, { widget, index }) {
const previousIndex = this.tabBar.titles.indexOf(widget.title);
if (previousIndex === -1) {
// inserts the tab according to the widget's rank, see `onWidgetAdded`
this.dockPanel.addWidget(widget);
}
this.tabBar.insertTab(previousIndex !== -1 && index > previousIndex ? index - 1 : index, widget.title);
this.activate(widget.id);
}
onTabsOverflowChanged(sender, event) {
if (event.startIndex > 0 && event.startIndex <= sender.currentIndex) {
sender.revealTab(sender.currentIndex);
}
else {
this.additionalViewsMenu.updateAdditionalViews(sender, event);
}
}
/*
* Handle the `widgetAdded` signal from the dock panel. The widget's title is inserted into the
* tab bar according to the `rankProperty` value that may be attached to the widget.
*/
onWidgetAdded(sender, widget) {
const titles = this.tabBar.titles;
if (!find(titles, t => t.owner === widget)) {
const rank = SidePanelHandler_1.rankProperty.get(widget);
let index = titles.length;
if (rank !== undefined) {
for (let i = index - 1; i >= 0; i--) {
const r = SidePanelHandler_1.rankProperty.get(titles[i].owner);
if (r !== undefined && r > rank) {
index = i;
}
}
}
this.tabBar.insertTab(index, widget.title);
this.refresh();
}
}
/*
* Handle the `widgetRemoved` signal from the dock panel. The widget's title is also removed
* from the tab bar.
*/
onWidgetRemoved(sender, widget) {
this.tabBar.removeTab(widget.title);
this.refresh();
}
updateSashState(sidePanelElement, sidePanelCollapsed) {
if (sidePanelElement) {
// Hide the sash when the left/right side panel is collapsed
if (sidePanelElement.id === 'theia-left-content-panel' && sidePanelElement.node.nextElementSibling) {
sidePanelElement.node.nextElementSibling.classList.toggle('sash-hidden', sidePanelCollapsed);
}
else if (sidePanelElement.id === 'theia-right-content-panel' && sidePanelElement.node.previousElementSibling) {
sidePanelElement.node.previousElementSibling.classList.toggle('sash-hidden', sidePanelCollapsed);
}
}
}
};
__decorate([
inject(TabBarToolbarRegistry)
], SidePanelHandler.prototype, "tabBarToolBarRegistry", void 0);
__decorate([
inject(TabBarToolbarFactory)
], SidePanelHandler.prototype, "tabBarToolBarFactory", void 0);
__decorate([
inject(TabBarRendererFactory)
], SidePanelHandler.prototype, "tabBarRendererFactory", void 0);
__decorate([
inject(SidebarTopMenuWidgetFactory)
], SidePanelHandler.prototype, "sidebarTopWidgetFactory", void 0);
__decorate([
inject(SidebarBottomMenuWidgetFactory)
], SidePanelHandler.prototype, "sidebarBottomWidgetFactory", void 0);
__decorate([
inject(AdditionalViewsMenuWidgetFactory)
], SidePanelHandler.prototype, "additionalViewsMenuFactory", void 0);
__decorate([
inject(SplitPositionHandler)
], SidePanelHandler.prototype, "splitPositionHandler", void 0);
__decorate([
inject(FrontendApplicationStateService)
], SidePanelHandler.prototype, "applicationStateService", void 0);
__decorate([
inject(TheiaDockPanel.Factory)
], SidePanelHandler.prototype, "dockPanelFactory", void 0);
__decorate([
inject(ContextMenuRenderer)
], SidePanelHandler.prototype, "contextMenuRenderer", void 0);
__decorate([
inject(SidePanelItemVisibility)
], SidePanelHandler.prototype, "itemVisibility", void 0);
SidePanelHandler = SidePanelHandler_1 = __decorate([
injectable()
], SidePanelHandler);
export { SidePanelHandler };
export var SidePanel;
(function (SidePanel) {
let ExpansionState;
(function (ExpansionState) {
ExpansionState["collapsed"] = "collapsed";
ExpansionState["expanding"] = "expanding";
ExpansionState["expanded"] = "expanded";
ExpansionState["collapsing"] = "collapsing";
})(ExpansionState = SidePanel.ExpansionState || (SidePanel.ExpansionState = {}));
})(SidePanel || (SidePanel = {}));
//# sourceMappingURL=side-panel-handler.js.map