1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | var SidePanelHandler_1;
|
18 | Object.defineProperty(exports, "__esModule", { value: true });
|
19 | exports.SidePanel = exports.SidePanelHandler = exports.SIDE_PANEL_TOOLBAR_CONTEXT_MENU = exports.SidePanelHandlerFactory = exports.LEFT_RIGHT_AREA_CLASS = void 0;
|
20 | const tslib_1 = require("tslib");
|
21 | const inversify_1 = require("inversify");
|
22 | const algorithm_1 = require("@phosphor/algorithm");
|
23 | const widgets_1 = require("@phosphor/widgets");
|
24 | const coreutils_1 = require("@phosphor/coreutils");
|
25 | const dragdrop_1 = require("@phosphor/dragdrop");
|
26 | const properties_1 = require("@phosphor/properties");
|
27 | const tab_bars_1 = require("./tab-bars");
|
28 | const sidebar_menu_widget_1 = require("./sidebar-menu-widget");
|
29 | const split_panels_1 = require("./split-panels");
|
30 | const browser_1 = require("../browser");
|
31 | const frontend_application_state_1 = require("../frontend-application-state");
|
32 | const theia_dock_panel_1 = require("./theia-dock-panel");
|
33 | const side_panel_toolbar_1 = require("./side-panel-toolbar");
|
34 | const tab_bar_toolbar_1 = require("./tab-bar-toolbar");
|
35 | const disposable_1 = require("../../common/disposable");
|
36 | const context_menu_renderer_1 = require("../context-menu-renderer");
|
37 | const widgets_2 = require("../widgets");
|
38 | const additional_views_menu_widget_1 = require("./additional-views-menu-widget");
|
39 |
|
40 | exports.LEFT_RIGHT_AREA_CLASS = 'theia-app-sides';
|
41 |
|
42 | const COLLAPSED_CLASS = 'theia-mod-collapsed';
|
43 | exports.SidePanelHandlerFactory = Symbol('SidePanelHandlerFactory');
|
44 | exports.SIDE_PANEL_TOOLBAR_CONTEXT_MENU = ['SIDE_PANEL_TOOLBAR_CONTEXT_MENU'];
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | let SidePanelHandler = SidePanelHandler_1 = class SidePanelHandler {
|
50 | constructor() {
|
51 | |
52 |
|
53 |
|
54 | this.state = {
|
55 | empty: true,
|
56 | expansion: SidePanel.ExpansionState.collapsed,
|
57 | pendingUpdate: Promise.resolve()
|
58 | };
|
59 |
|
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 |
|
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 |
|
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 |
|
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 |
|
201 |
|
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 |
|
212 | const size = currentTitle !== null ? this.getPanelSize() : this.state.lastPanelSize;
|
213 | return { type: 'sidepanel', items, size };
|
214 | }
|
215 | |
216 |
|
217 |
|
218 | setLayoutData(layoutData) {
|
219 |
|
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 |
|
236 | this.tabBar.addTab(widget.title);
|
237 | }
|
238 | }
|
239 | }
|
240 | if (layoutData.size) {
|
241 | this.state.lastPanelSize = layoutData.size;
|
242 | }
|
243 |
|
244 |
|
245 | if (currentTitle) {
|
246 | this.tabBar.currentTitle = currentTitle;
|
247 | }
|
248 | else {
|
249 | this.refresh();
|
250 | }
|
251 | }
|
252 | |
253 |
|
254 |
|
255 |
|
256 |
|
257 | activate(id) {
|
258 | const widget = this.expand(id);
|
259 | if (widget) {
|
260 | widget.activate();
|
261 | }
|
262 | return widget;
|
263 | }
|
264 | |
265 |
|
266 |
|
267 |
|
268 |
|
269 |
|
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 |
|
296 |
|
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 |
|
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 |
|
321 |
|
322 | collapse() {
|
323 | if (this.tabBar.currentTitle) {
|
324 |
|
325 | this.tabBar.currentTitle = null;
|
326 | }
|
327 | else {
|
328 | this.refresh();
|
329 | }
|
330 | return (0, browser_1.animationFrame)();
|
331 | }
|
332 | |
333 |
|
334 |
|
335 |
|
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 |
|
345 |
|
346 |
|
347 |
|
348 | addTopMenu(menu) {
|
349 | this.topMenu.addMenu(menu);
|
350 | }
|
351 | |
352 |
|
353 |
|
354 |
|
355 |
|
356 | removeTopMenu(menuId) {
|
357 | this.topMenu.removeMenu(menuId);
|
358 | }
|
359 | |
360 |
|
361 |
|
362 |
|
363 |
|
364 | addBottomMenu(menu) {
|
365 | this.bottomMenu.addMenu(menu);
|
366 | }
|
367 | |
368 |
|
369 |
|
370 |
|
371 |
|
372 | removeBottomMenu(menuId) {
|
373 | this.bottomMenu.removeMenu(menuId);
|
374 | }
|
375 | |
376 |
|
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 |
|
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 |
|
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 |
|
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 |
|
436 | parent.setRelativeSizes(relativeSizes);
|
437 | }
|
438 | }
|
439 | |
440 |
|
441 |
|
442 |
|
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 |
|
454 |
|
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 |
|
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 |
|
486 |
|
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 |
|
498 | promise.then(() => resolve(), () => resolve());
|
499 | });
|
500 | this.state.pendingUpdate = this.state.pendingUpdate.then(() => result);
|
501 | return result;
|
502 | }
|
503 | |
504 |
|
505 |
|
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 |
|
522 |
|
523 |
|
524 | onTabDetachRequested(sender, { title, tab, clientX, clientY }) {
|
525 |
|
526 | sender.releaseMouse();
|
527 |
|
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 |
|
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 |
|
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 |
|
559 |
|
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 |
|
580 |
|
581 |
|
582 | onWidgetRemoved(sender, widget) {
|
583 | this.tabBar.removeTab(widget.title);
|
584 | this.refresh();
|
585 | }
|
586 | updateSashState(sidePanelElement, sidePanelCollapsed) {
|
587 | if (sidePanelElement) {
|
588 |
|
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 |
|
600 |
|
601 |
|
602 | SidePanelHandler.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);
|
646 | SidePanelHandler = SidePanelHandler_1 = (0, tslib_1.__decorate)([
|
647 | (0, inversify_1.injectable)()
|
648 | ], SidePanelHandler);
|
649 | exports.SidePanelHandler = SidePanelHandler;
|
650 | var 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 |
|
\ | No newline at end of file |