UNPKG

27.7 kBJavaScriptView Raw
1"use strict";
2// *****************************************************************************
3// Copyright (C) 2018 TypeFox and others.
4//
5// This program and the accompanying materials are made available under the
6// terms of the Eclipse Public License v. 2.0 which is available at
7// http://www.eclipse.org/legal/epl-2.0.
8//
9// This Source Code may also be made available under the following Secondary
10// Licenses when the conditions for such availability set forth in the Eclipse
11// Public License v. 2.0 are satisfied: GNU General Public License, version 2
12// with the GNU Classpath Exception which is available at
13// https://www.gnu.org/software/classpath/license.html.
14//
15// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16// *****************************************************************************
17var SidePanelHandler_1;
18Object.defineProperty(exports, "__esModule", { value: true });
19exports.SidePanel = exports.SidePanelHandler = exports.SIDE_PANEL_TOOLBAR_CONTEXT_MENU = exports.SidePanelHandlerFactory = exports.LEFT_RIGHT_AREA_CLASS = void 0;
20const tslib_1 = require("tslib");
21const inversify_1 = require("inversify");
22const algorithm_1 = require("@phosphor/algorithm");
23const widgets_1 = require("@phosphor/widgets");
24const coreutils_1 = require("@phosphor/coreutils");
25const dragdrop_1 = require("@phosphor/dragdrop");
26const properties_1 = require("@phosphor/properties");
27const tab_bars_1 = require("./tab-bars");
28const sidebar_menu_widget_1 = require("./sidebar-menu-widget");
29const split_panels_1 = require("./split-panels");
30const browser_1 = require("../browser");
31const frontend_application_state_1 = require("../frontend-application-state");
32const theia_dock_panel_1 = require("./theia-dock-panel");
33const side_panel_toolbar_1 = require("./side-panel-toolbar");
34const tab_bar_toolbar_1 = require("./tab-bar-toolbar");
35const disposable_1 = require("../../common/disposable");
36const context_menu_renderer_1 = require("../context-menu-renderer");
37const widgets_2 = require("../widgets");
38const additional_views_menu_widget_1 = require("./additional-views-menu-widget");
39/** The class name added to the left and right area panels. */
40exports.LEFT_RIGHT_AREA_CLASS = 'theia-app-sides';
41/** The class name added to collapsed side panels. */
42const COLLAPSED_CLASS = 'theia-mod-collapsed';
43exports.SidePanelHandlerFactory = Symbol('SidePanelHandlerFactory');
44exports.SIDE_PANEL_TOOLBAR_CONTEXT_MENU = ['SIDE_PANEL_TOOLBAR_CONTEXT_MENU'];
45/**
46 * A class which manages a dock panel and a related side bar. This is used for the left and right
47 * panel of the application shell.
48 */
49let SidePanelHandler = SidePanelHandler_1 = class SidePanelHandler {
50 constructor() {
51 /**
52 * The current state of the side panel.
53 */
54 this.state = {
55 empty: true,
56 expansion: SidePanel.ExpansionState.collapsed,
57 pendingUpdate: Promise.resolve()
58 };
59 // should be a property to preserve fn identity
60 this.updateToolbarTitle = () => {
61 const currentTitle = this.tabBar && this.tabBar.currentTitle;
62 this.toolBar.toolbarTitle = currentTitle || undefined;
63 };
64 this.toDisposeOnCurrentTabChanged = new disposable_1.DisposableCollection();
65 }
66 /**
67 * Create the side bar and dock panel widgets.
68 */
69 create(side, options) {
70 this.side = side;
71 this.options = options;
72 this.topMenu = this.createSidebarTopMenu();
73 this.tabBar = this.createSideBar();
74 this.additionalViewsMenu = this.createAdditionalViewsWidget();
75 this.bottomMenu = this.createSidebarBottomMenu();
76 this.toolBar = this.createToolbar();
77 this.dockPanel = this.createSidePanel();
78 this.container = this.createContainer();
79 this.refresh();
80 }
81 createSideBar() {
82 const side = this.side;
83 const tabBarRenderer = this.tabBarRendererFactory();
84 const sideBar = new tab_bars_1.SideTabBar({
85 // Tab bar options
86 orientation: side === 'left' || side === 'right' ? 'vertical' : 'horizontal',
87 insertBehavior: 'none',
88 removeBehavior: 'select-previous-tab',
89 allowDeselect: false,
90 tabsMovable: true,
91 renderer: tabBarRenderer,
92 // Scroll bar options
93 handlers: ['drag-thumb', 'keyboard', 'wheel', 'touch'],
94 useBothWheelAxes: true,
95 scrollYMarginOffset: 8,
96 suppressScrollX: true
97 });
98 tabBarRenderer.tabBar = sideBar;
99 sideBar.disposed.connect(() => tabBarRenderer.dispose());
100 tabBarRenderer.contextMenuPath = tab_bars_1.SHELL_TABBAR_CONTEXT_MENU;
101 sideBar.addClass('theia-app-' + side);
102 sideBar.addClass(exports.LEFT_RIGHT_AREA_CLASS);
103 sideBar.tabAdded.connect((sender, { title }) => {
104 const widget = title.owner;
105 if (!(0, algorithm_1.some)(this.dockPanel.widgets(), w => w === widget)) {
106 this.dockPanel.addWidget(widget);
107 }
108 }, this);
109 sideBar.tabActivateRequested.connect((sender, { title }) => title.owner.activate());
110 sideBar.tabCloseRequested.connect((sender, { title }) => title.owner.close());
111 sideBar.collapseRequested.connect(() => this.collapse(), this);
112 sideBar.currentChanged.connect(this.onCurrentTabChanged, this);
113 sideBar.tabDetachRequested.connect(this.onTabDetachRequested, this);
114 sideBar.tabsOverflowChanged.connect(this.onTabsOverflowChanged, this);
115 return sideBar;
116 }
117 createSidePanel() {
118 const sidePanel = this.dockPanelFactory({
119 mode: 'single-document'
120 });
121 sidePanel.id = 'theia-' + this.side + '-side-panel';
122 sidePanel.addClass('theia-side-panel');
123 sidePanel.widgetActivated.connect((sender, widget) => {
124 this.tabBar.currentTitle = widget.title;
125 }, this);
126 sidePanel.widgetAdded.connect(this.onWidgetAdded, this);
127 sidePanel.widgetRemoved.connect(this.onWidgetRemoved, this);
128 return sidePanel;
129 }
130 createToolbar() {
131 const toolbar = new side_panel_toolbar_1.SidePanelToolbar(this.tabBarToolBarRegistry, this.tabBarToolBarFactory, this.side);
132 toolbar.onContextMenu(e => this.showContextMenu(e));
133 return toolbar;
134 }
135 createAdditionalViewsWidget() {
136 const widget = this.additionalViewsMenuFactory(this.side);
137 widget.addClass('theia-sidebar-menu');
138 return widget;
139 }
140 createSidebarTopMenu() {
141 return this.createSidebarMenu(this.sidebarTopWidgetFactory);
142 }
143 createSidebarBottomMenu() {
144 return this.createSidebarMenu(this.sidebarBottomWidgetFactory);
145 }
146 createSidebarMenu(factory) {
147 const menu = factory();
148 menu.addClass('theia-sidebar-menu');
149 return menu;
150 }
151 showContextMenu(e) {
152 const title = this.tabBar.currentTitle;
153 if (!title) {
154 return;
155 }
156 e.stopPropagation();
157 e.preventDefault();
158 this.contextMenuRenderer.render({
159 args: [title.owner],
160 menuPath: exports.SIDE_PANEL_TOOLBAR_CONTEXT_MENU,
161 anchor: e
162 });
163 }
164 createContainer() {
165 const contentBox = new widgets_1.BoxLayout({ direction: 'top-to-bottom', spacing: 0 });
166 widgets_1.BoxPanel.setStretch(this.toolBar, 0);
167 contentBox.addWidget(this.toolBar);
168 widgets_1.BoxPanel.setStretch(this.dockPanel, 1);
169 contentBox.addWidget(this.dockPanel);
170 const contentPanel = new widgets_1.BoxPanel({ layout: contentBox });
171 const side = this.side;
172 let direction;
173 switch (side) {
174 case 'left':
175 direction = 'left-to-right';
176 break;
177 case 'right':
178 direction = 'right-to-left';
179 break;
180 default:
181 throw new Error('Illegal argument: ' + side);
182 }
183 const containerLayout = new widgets_1.BoxLayout({ direction, spacing: 0 });
184 const sidebarContainerLayout = new widgets_1.PanelLayout();
185 const sidebarContainer = new widgets_1.Panel({ layout: sidebarContainerLayout });
186 sidebarContainer.addClass('theia-app-sidebar-container');
187 sidebarContainerLayout.addWidget(this.topMenu);
188 sidebarContainerLayout.addWidget(this.tabBar);
189 sidebarContainerLayout.addWidget(this.additionalViewsMenu);
190 sidebarContainerLayout.addWidget(this.bottomMenu);
191 widgets_1.BoxPanel.setStretch(sidebarContainer, 0);
192 widgets_1.BoxPanel.setStretch(contentPanel, 1);
193 containerLayout.addWidget(sidebarContainer);
194 containerLayout.addWidget(contentPanel);
195 const boxPanel = new widgets_1.BoxPanel({ layout: containerLayout });
196 boxPanel.id = 'theia-' + side + '-content-panel';
197 return boxPanel;
198 }
199 /**
200 * Create an object that describes the current side panel layout. This object may contain references
201 * to widgets; these need to be transformed before the layout can be serialized.
202 */
203 getLayoutData() {
204 const currentTitle = this.tabBar.currentTitle;
205 const items = (0, algorithm_1.toArray)((0, algorithm_1.map)(this.tabBar.titles, title => ({
206 widget: title.owner,
207 rank: SidePanelHandler_1.rankProperty.get(title.owner),
208 expanded: title === currentTitle,
209 pinned: title.className.includes(widgets_2.PINNED_CLASS)
210 })));
211 // eslint-disable-next-line no-null/no-null
212 const size = currentTitle !== null ? this.getPanelSize() : this.state.lastPanelSize;
213 return { type: 'sidepanel', items, size };
214 }
215 /**
216 * Apply a side panel layout that has been previously created with `getLayoutData`.
217 */
218 setLayoutData(layoutData) {
219 // eslint-disable-next-line no-null/no-null
220 this.tabBar.currentTitle = null;
221 let currentTitle;
222 if (layoutData.items) {
223 for (const { widget, rank, expanded, pinned } of layoutData.items) {
224 if (widget) {
225 if (rank) {
226 SidePanelHandler_1.rankProperty.set(widget, rank);
227 }
228 if (expanded) {
229 currentTitle = widget.title;
230 }
231 if (pinned) {
232 widget.title.className += ` ${widgets_2.PINNED_CLASS}`;
233 widget.title.closable = false;
234 }
235 // Add the widgets directly to the tab bar in the same order as they are stored
236 this.tabBar.addTab(widget.title);
237 }
238 }
239 }
240 if (layoutData.size) {
241 this.state.lastPanelSize = layoutData.size;
242 }
243 // If the layout data contains an expanded item, update the currentTitle property
244 // This implies a refresh through the `currentChanged` signal
245 if (currentTitle) {
246 this.tabBar.currentTitle = currentTitle;
247 }
248 else {
249 this.refresh();
250 }
251 }
252 /**
253 * Activate a widget residing in the side panel by ID.
254 *
255 * @returns the activated widget if it was found
256 */
257 activate(id) {
258 const widget = this.expand(id);
259 if (widget) {
260 widget.activate();
261 }
262 return widget;
263 }
264 /**
265 * Expand a widget residing in the side panel by ID. If no ID is given and the panel is
266 * currently collapsed, the last active tab of this side panel is expanded. If no tab
267 * was expanded previously, the first one is taken.
268 *
269 * @returns the expanded widget if it was found
270 */
271 expand(id) {
272 if (id) {
273 const widget = (0, algorithm_1.find)(this.dockPanel.widgets(), w => w.id === id);
274 if (widget) {
275 this.tabBar.currentTitle = widget.title;
276 }
277 return widget;
278 }
279 else if (this.tabBar.currentTitle) {
280 return this.tabBar.currentTitle.owner;
281 }
282 else if (this.tabBar.titles.length > 0) {
283 let index = this.state.lastActiveTabIndex;
284 if (!index) {
285 index = 0;
286 }
287 else if (index >= this.tabBar.titles.length) {
288 index = this.tabBar.titles.length - 1;
289 }
290 const title = this.tabBar.titles[index];
291 this.tabBar.currentTitle = title;
292 return title.owner;
293 }
294 else {
295 // Reveal the tab bar and dock panel even if there is no widget
296 // The next call to `refreshVisibility` will collapse them again
297 this.state.expansion = SidePanel.ExpansionState.expanding;
298 let relativeSizes;
299 const parent = this.container.parent;
300 if (parent instanceof widgets_1.SplitPanel) {
301 relativeSizes = parent.relativeSizes();
302 }
303 this.container.removeClass(COLLAPSED_CLASS);
304 this.container.show();
305 this.tabBar.show();
306 this.dockPanel.node.style.minWidth = '0';
307 this.dockPanel.show();
308 if (relativeSizes && parent instanceof widgets_1.SplitPanel) {
309 // Make sure that the expansion animation starts at zero size
310 parent.setRelativeSizes(relativeSizes);
311 }
312 this.setPanelSize(this.options.emptySize).then(() => {
313 if (this.state.expansion === SidePanel.ExpansionState.expanding) {
314 this.state.expansion = SidePanel.ExpansionState.expanded;
315 }
316 });
317 }
318 }
319 /**
320 * Collapse the sidebar so no items are expanded.
321 */
322 collapse() {
323 if (this.tabBar.currentTitle) {
324 // eslint-disable-next-line no-null/no-null
325 this.tabBar.currentTitle = null;
326 }
327 else {
328 this.refresh();
329 }
330 return (0, browser_1.animationFrame)();
331 }
332 /**
333 * Add a widget and its title to the dock panel and side bar.
334 *
335 * If the widget is already added, it will be moved.
336 */
337 addWidget(widget, options) {
338 if (options.rank) {
339 SidePanelHandler_1.rankProperty.set(widget, options.rank);
340 }
341 this.dockPanel.addWidget(widget);
342 }
343 /**
344 * Add a menu to the sidebar top.
345 *
346 * If the menu is already added, it will be ignored.
347 */
348 addTopMenu(menu) {
349 this.topMenu.addMenu(menu);
350 }
351 /**
352 * Remove a menu from the sidebar top.
353 *
354 * @param menuId id of the menu to remove
355 */
356 removeTopMenu(menuId) {
357 this.topMenu.removeMenu(menuId);
358 }
359 /**
360 * Add a menu to the sidebar bottom.
361 *
362 * If the menu is already added, it will be ignored.
363 */
364 addBottomMenu(menu) {
365 this.bottomMenu.addMenu(menu);
366 }
367 /**
368 * Remove a menu from the sidebar bottom.
369 *
370 * @param menuId id of the menu to remove
371 */
372 removeBottomMenu(menuId) {
373 this.bottomMenu.removeMenu(menuId);
374 }
375 /**
376 * Refresh the visibility of the side bar and dock panel.
377 */
378 refresh() {
379 const container = this.container;
380 const parent = container.parent;
381 const tabBar = this.tabBar;
382 const dockPanel = this.dockPanel;
383 const isEmpty = tabBar.titles.length === 0;
384 const currentTitle = tabBar.currentTitle;
385 // eslint-disable-next-line no-null/no-null
386 const hideDockPanel = currentTitle === null;
387 this.updateSashState(this.container, hideDockPanel);
388 let relativeSizes;
389 if (hideDockPanel) {
390 container.addClass(COLLAPSED_CLASS);
391 if (this.state.expansion === SidePanel.ExpansionState.expanded && !this.state.empty) {
392 // Update the lastPanelSize property
393 const size = this.getPanelSize();
394 if (size) {
395 this.state.lastPanelSize = size;
396 }
397 }
398 this.state.expansion = SidePanel.ExpansionState.collapsed;
399 }
400 else {
401 container.removeClass(COLLAPSED_CLASS);
402 let size;
403 if (this.state.expansion !== SidePanel.ExpansionState.expanded) {
404 if (this.state.lastPanelSize) {
405 size = this.state.lastPanelSize;
406 }
407 else {
408 size = this.getDefaultPanelSize();
409 }
410 }
411 if (size) {
412 // Restore the panel size to the last known size or the default size
413 this.state.expansion = SidePanel.ExpansionState.expanding;
414 if (parent instanceof widgets_1.SplitPanel) {
415 relativeSizes = parent.relativeSizes();
416 }
417 this.setPanelSize(size).then(() => {
418 if (this.state.expansion === SidePanel.ExpansionState.expanding) {
419 this.state.expansion = SidePanel.ExpansionState.expanded;
420 }
421 });
422 }
423 else {
424 this.state.expansion = SidePanel.ExpansionState.expanded;
425 }
426 }
427 container.setHidden(isEmpty && hideDockPanel);
428 tabBar.setHidden(isEmpty);
429 dockPanel.setHidden(hideDockPanel);
430 this.state.empty = isEmpty;
431 if (currentTitle) {
432 dockPanel.selectWidget(currentTitle.owner);
433 }
434 if (relativeSizes && parent instanceof widgets_1.SplitPanel) {
435 // Make sure that the expansion animation starts at the smallest possible size
436 parent.setRelativeSizes(relativeSizes);
437 }
438 }
439 /**
440 * Sets the size of the side panel.
441 *
442 * @param size the desired size (width) of the panel in pixels.
443 */
444 resize(size) {
445 if (this.dockPanel.isHidden) {
446 this.state.lastPanelSize = size;
447 }
448 else {
449 this.setPanelSize(size);
450 }
451 }
452 /**
453 * Compute the current width of the panel. This implementation assumes that the parent of
454 * the panel container is a `SplitPanel`.
455 */
456 getPanelSize() {
457 const parent = this.container.parent;
458 if (parent instanceof widgets_1.SplitPanel && parent.isVisible) {
459 const index = parent.widgets.indexOf(this.container);
460 if (this.side === 'left') {
461 const handle = parent.handles[index];
462 if (!handle.classList.contains('p-mod-hidden')) {
463 return handle.offsetLeft;
464 }
465 }
466 else if (this.side === 'right') {
467 const handle = parent.handles[index - 1];
468 if (!handle.classList.contains('p-mod-hidden')) {
469 const parentWidth = parent.node.clientWidth;
470 return parentWidth - handle.offsetLeft;
471 }
472 }
473 }
474 }
475 /**
476 * Determine the default size to apply when the panel is expanded for the first time.
477 */
478 getDefaultPanelSize() {
479 const parent = this.container.parent;
480 if (parent && parent.isVisible) {
481 return parent.node.clientWidth * this.options.initialSizeRatio;
482 }
483 }
484 /**
485 * Modify the width of the panel. This implementation assumes that the parent of the panel
486 * container is a `SplitPanel`.
487 */
488 setPanelSize(size) {
489 const enableAnimation = this.applicationStateService.state === 'ready';
490 const options = {
491 side: this.side,
492 duration: enableAnimation ? this.options.expandDuration : 0,
493 referenceWidget: this.dockPanel
494 };
495 const promise = this.splitPositionHandler.setSidePanelSize(this.container, size, options);
496 const result = new Promise(resolve => {
497 // Resolve the resulting promise in any case, regardless of whether resizing was successful
498 promise.then(() => resolve(), () => resolve());
499 });
500 this.state.pendingUpdate = this.state.pendingUpdate.then(() => result);
501 return result;
502 }
503 /**
504 * Handle a `currentChanged` signal from the sidebar. The side panel is refreshed so it displays
505 * the new selected widget.
506 */
507 onCurrentTabChanged(sender, { currentTitle, currentIndex }) {
508 this.toDisposeOnCurrentTabChanged.dispose();
509 if (currentTitle) {
510 this.updateToolbarTitle();
511 currentTitle.changed.connect(this.updateToolbarTitle);
512 this.toDisposeOnCurrentTabChanged.push(disposable_1.Disposable.create(() => currentTitle.changed.disconnect(this.updateToolbarTitle)));
513 }
514 if (currentIndex >= 0) {
515 this.state.lastActiveTabIndex = currentIndex;
516 sender.revealTab(currentIndex);
517 }
518 this.refresh();
519 }
520 /**
521 * Handle a `tabDetachRequested` signal from the sidebar. A drag is started so the widget can be
522 * moved to another application shell area.
523 */
524 onTabDetachRequested(sender, { title, tab, clientX, clientY }) {
525 // Release the tab bar's hold on the mouse
526 sender.releaseMouse();
527 // Clone the selected tab and use that as drag image
528 const clonedTab = tab.cloneNode(true);
529 clonedTab.style.width = '';
530 clonedTab.style.height = '';
531 const label = clonedTab.getElementsByClassName('p-TabBar-tabLabel')[0];
532 label.style.width = '';
533 label.style.height = '';
534 // Create and start a drag to move the selected tab to another panel
535 const mimeData = new coreutils_1.MimeData();
536 mimeData.setData('application/vnd.phosphor.widget-factory', () => title.owner);
537 const drag = new dragdrop_1.Drag({
538 mimeData,
539 dragImage: clonedTab,
540 proposedAction: 'move',
541 supportedActions: 'move',
542 });
543 tab.classList.add('p-mod-hidden');
544 drag.start(clientX, clientY).then(() => {
545 // The promise is resolved when the drag has ended
546 tab.classList.remove('p-mod-hidden');
547 });
548 }
549 onTabsOverflowChanged(sender, event) {
550 if (event.startIndex >= 0 && event.startIndex <= sender.currentIndex) {
551 sender.revealTab(sender.currentIndex);
552 }
553 else {
554 this.additionalViewsMenu.updateAdditionalViews(sender, event);
555 }
556 }
557 /*
558 * Handle the `widgetAdded` signal from the dock panel. The widget's title is inserted into the
559 * tab bar according to the `rankProperty` value that may be attached to the widget.
560 */
561 onWidgetAdded(sender, widget) {
562 const titles = this.tabBar.titles;
563 if (!(0, algorithm_1.find)(titles, t => t.owner === widget)) {
564 const rank = SidePanelHandler_1.rankProperty.get(widget);
565 let index = titles.length;
566 if (rank !== undefined) {
567 for (let i = index - 1; i >= 0; i--) {
568 const r = SidePanelHandler_1.rankProperty.get(titles[i].owner);
569 if (r !== undefined && r > rank) {
570 index = i;
571 }
572 }
573 }
574 this.tabBar.insertTab(index, widget.title);
575 this.refresh();
576 }
577 }
578 /*
579 * Handle the `widgetRemoved` signal from the dock panel. The widget's title is also removed
580 * from the tab bar.
581 */
582 onWidgetRemoved(sender, widget) {
583 this.tabBar.removeTab(widget.title);
584 this.refresh();
585 }
586 updateSashState(sidePanelElement, sidePanelCollapsed) {
587 if (sidePanelElement) {
588 // Hide the sash when the left/right side panel is collapsed
589 if (sidePanelElement.id === 'theia-left-content-panel' && sidePanelElement.node.nextElementSibling) {
590 sidePanelElement.node.nextElementSibling.classList.toggle('sash-hidden', sidePanelCollapsed);
591 }
592 else if (sidePanelElement.id === 'theia-right-content-panel' && sidePanelElement.node.previousElementSibling) {
593 sidePanelElement.node.previousElementSibling.classList.toggle('sash-hidden', sidePanelCollapsed);
594 }
595 }
596 }
597};
598/**
599 * A property that can be attached to widgets in order to determine the insertion index
600 * of their title in the tab bar.
601 */
602SidePanelHandler.rankProperty = new properties_1.AttachedProperty({
603 name: 'sidePanelRank',
604 create: () => undefined
605});
606(0, tslib_1.__decorate)([
607 (0, inversify_1.inject)(tab_bar_toolbar_1.TabBarToolbarRegistry),
608 (0, tslib_1.__metadata)("design:type", tab_bar_toolbar_1.TabBarToolbarRegistry)
609], SidePanelHandler.prototype, "tabBarToolBarRegistry", void 0);
610(0, tslib_1.__decorate)([
611 (0, inversify_1.inject)(tab_bar_toolbar_1.TabBarToolbarFactory),
612 (0, tslib_1.__metadata)("design:type", Function)
613], SidePanelHandler.prototype, "tabBarToolBarFactory", void 0);
614(0, tslib_1.__decorate)([
615 (0, inversify_1.inject)(tab_bars_1.TabBarRendererFactory),
616 (0, tslib_1.__metadata)("design:type", Function)
617], SidePanelHandler.prototype, "tabBarRendererFactory", void 0);
618(0, tslib_1.__decorate)([
619 (0, inversify_1.inject)(sidebar_menu_widget_1.SidebarTopMenuWidgetFactory),
620 (0, tslib_1.__metadata)("design:type", Function)
621], SidePanelHandler.prototype, "sidebarTopWidgetFactory", void 0);
622(0, tslib_1.__decorate)([
623 (0, inversify_1.inject)(sidebar_menu_widget_1.SidebarBottomMenuWidgetFactory),
624 (0, tslib_1.__metadata)("design:type", Function)
625], SidePanelHandler.prototype, "sidebarBottomWidgetFactory", void 0);
626(0, tslib_1.__decorate)([
627 (0, inversify_1.inject)(additional_views_menu_widget_1.AdditionalViewsMenuWidgetFactory),
628 (0, tslib_1.__metadata)("design:type", Function)
629], SidePanelHandler.prototype, "additionalViewsMenuFactory", void 0);
630(0, tslib_1.__decorate)([
631 (0, inversify_1.inject)(split_panels_1.SplitPositionHandler),
632 (0, tslib_1.__metadata)("design:type", split_panels_1.SplitPositionHandler)
633], SidePanelHandler.prototype, "splitPositionHandler", void 0);
634(0, tslib_1.__decorate)([
635 (0, inversify_1.inject)(frontend_application_state_1.FrontendApplicationStateService),
636 (0, tslib_1.__metadata)("design:type", frontend_application_state_1.FrontendApplicationStateService)
637], SidePanelHandler.prototype, "applicationStateService", void 0);
638(0, tslib_1.__decorate)([
639 (0, inversify_1.inject)(theia_dock_panel_1.TheiaDockPanel.Factory),
640 (0, tslib_1.__metadata)("design:type", Function)
641], SidePanelHandler.prototype, "dockPanelFactory", void 0);
642(0, tslib_1.__decorate)([
643 (0, inversify_1.inject)(context_menu_renderer_1.ContextMenuRenderer),
644 (0, tslib_1.__metadata)("design:type", context_menu_renderer_1.ContextMenuRenderer)
645], SidePanelHandler.prototype, "contextMenuRenderer", void 0);
646SidePanelHandler = SidePanelHandler_1 = (0, tslib_1.__decorate)([
647 (0, inversify_1.injectable)()
648], SidePanelHandler);
649exports.SidePanelHandler = SidePanelHandler;
650var SidePanel;
651(function (SidePanel) {
652 let ExpansionState;
653 (function (ExpansionState) {
654 ExpansionState["collapsed"] = "collapsed";
655 ExpansionState["expanding"] = "expanding";
656 ExpansionState["expanded"] = "expanded";
657 ExpansionState["collapsing"] = "collapsing";
658 })(ExpansionState = SidePanel.ExpansionState || (SidePanel.ExpansionState = {}));
659})(SidePanel = exports.SidePanel || (exports.SidePanel = {}));
660//# sourceMappingURL=side-panel-handler.js.map
\No newline at end of file