@jupyterlab/application
Advanced tools
Comparing version 2.0.0-beta.1 to 2.0.0-beta.2
@@ -157,2 +157,4 @@ import { DocumentRegistry } from '@jupyterlab/docregistry'; | ||
activatePreviousTab(): void; | ||
activateNextTabBar(): void; | ||
activatePreviousTabBar(): void; | ||
add(widget: Widget, area?: ILabShell.Area, options?: DocumentRegistry.IOpenOptions): void; | ||
@@ -159,0 +161,0 @@ /** |
// Copyright (c) Jupyter Development Team. | ||
// Distributed under the terms of the Modified BSD License. | ||
import { DockPanelSvg, TabBarSvg } from '@jupyterlab/ui-components'; | ||
import { DockPanelSvg, JLIcon } from '@jupyterlab/ui-components'; | ||
import { ArrayExt, find, iter, toArray } from '@lumino/algorithm'; | ||
@@ -9,3 +9,3 @@ import { PromiseDelegate, Token } from '@lumino/coreutils'; | ||
import { Signal } from '@lumino/signaling'; | ||
import { BoxLayout, BoxPanel, FocusTracker, Panel, SplitPanel, StackedPanel, Widget } from '@lumino/widgets'; | ||
import { BoxLayout, BoxPanel, FocusTracker, Panel, SplitPanel, StackedPanel, TabBar, Widget } from '@lumino/widgets'; | ||
/** | ||
@@ -82,5 +82,3 @@ * The class name added to AppShell instances. | ||
let hboxPanel = new BoxPanel(); | ||
let dockPanel = (this._dockPanel = new DockPanelSvg({ | ||
kind: 'dockPanelBar' | ||
})); | ||
let dockPanel = (this._dockPanel = new DockPanelSvg()); | ||
MessageLoop.installMessageHook(dockPanel, this._dockChildHook); | ||
@@ -342,2 +340,24 @@ let hsplitPanel = new SplitPanel(); | ||
} | ||
/* | ||
* Activate the next TabBar. | ||
*/ | ||
activateNextTabBar() { | ||
let nextBar = this._adjacentBar('next'); | ||
if (nextBar) { | ||
if (nextBar.currentTitle) { | ||
nextBar.currentTitle.owner.activate(); | ||
} | ||
} | ||
} | ||
/* | ||
* Activate the next TabBar. | ||
*/ | ||
activatePreviousTabBar() { | ||
let nextBar = this._adjacentBar('previous'); | ||
if (nextBar) { | ||
if (nextBar.currentTitle) { | ||
nextBar.currentTitle.owner.activate(); | ||
} | ||
} | ||
} | ||
add(widget, area = 'main', options) { | ||
@@ -556,5 +576,14 @@ switch (area || 'main') { | ||
} | ||
const { title } = widget; | ||
// Add widget ID to tab so that we can get a handle on the tab's widget | ||
// (for context menu support) | ||
widget.title.dataset = Object.assign(Object.assign({}, widget.title.dataset), { id: widget.id }); | ||
title.dataset = Object.assign(Object.assign({}, title.dataset), { id: widget.id }); | ||
// set an appropriate style class for the iconRenderer | ||
if (title.iconRenderer instanceof JLIcon) { | ||
title.iconClass = title.iconRenderer.class({ | ||
className: title.iconClass, | ||
justify: 'center', | ||
kind: 'mainAreaTab' | ||
}); | ||
} | ||
dock.addWidget(widget, { mode, ref }); | ||
@@ -772,4 +801,3 @@ // The dock panel doesn't account for placement information while | ||
this._items = new Array(); | ||
this._sideBar = new TabBarSvg({ | ||
kind: 'sideBar', | ||
this._sideBar = new TabBar({ | ||
insertBehavior: 'none', | ||
@@ -852,2 +880,10 @@ removeBehavior: 'none', | ||
title.dataset = { id: widget.id }; | ||
// set an appropriate style class for the iconRenderer | ||
if (title.iconRenderer instanceof JLIcon) { | ||
title.iconClass = title.iconRenderer.class({ | ||
className: title.iconClass, | ||
justify: 'center', | ||
kind: 'sideBar' | ||
}); | ||
} | ||
this._refreshVisibility(); | ||
@@ -854,0 +890,0 @@ } |
{ | ||
"name": "@jupyterlab/application", | ||
"version": "2.0.0-beta.1", | ||
"version": "2.0.0-beta.2", | ||
"description": "JupyterLab - Application", | ||
@@ -38,20 +38,20 @@ "homepage": "https://github.com/jupyterlab/jupyterlab", | ||
"dependencies": { | ||
"@jupyterlab/apputils": "^2.0.0-beta.1", | ||
"@jupyterlab/coreutils": "^4.0.0-beta.1", | ||
"@jupyterlab/docregistry": "^2.0.0-beta.1", | ||
"@jupyterlab/rendermime": "^2.0.0-beta.1", | ||
"@jupyterlab/rendermime-interfaces": "^2.0.0-beta.1", | ||
"@jupyterlab/services": "^5.0.0-beta.1", | ||
"@jupyterlab/statedb": "^2.0.0-beta.1", | ||
"@jupyterlab/ui-components": "^2.0.0-beta.1", | ||
"@lumino/algorithm": "^1.2.1", | ||
"@lumino/application": "^1.7.4", | ||
"@lumino/commands": "^1.9.0", | ||
"@lumino/coreutils": "^1.4.0", | ||
"@lumino/disposable": "^1.3.2", | ||
"@lumino/messaging": "^1.3.1", | ||
"@lumino/polling": "^1.0.1", | ||
"@lumino/properties": "^1.1.4", | ||
"@lumino/signaling": "^1.3.2", | ||
"@lumino/widgets": "^1.9.4", | ||
"@jupyterlab/apputils": "^2.0.0-beta.2", | ||
"@jupyterlab/coreutils": "^4.0.0-beta.2", | ||
"@jupyterlab/docregistry": "^2.0.0-beta.2", | ||
"@jupyterlab/rendermime": "^2.0.0-beta.2", | ||
"@jupyterlab/rendermime-interfaces": "^2.0.0-beta.2", | ||
"@jupyterlab/services": "^5.0.0-beta.2", | ||
"@jupyterlab/statedb": "^2.0.0-beta.2", | ||
"@jupyterlab/ui-components": "^2.0.0-beta.2", | ||
"@lumino/algorithm": "^1.2.3", | ||
"@lumino/application": "^1.7.7", | ||
"@lumino/commands": "^1.9.1", | ||
"@lumino/coreutils": "^1.4.2", | ||
"@lumino/disposable": "^1.3.4", | ||
"@lumino/messaging": "^1.3.3", | ||
"@lumino/polling": "^1.0.3", | ||
"@lumino/properties": "^1.1.6", | ||
"@lumino/signaling": "^1.3.4", | ||
"@lumino/widgets": "^1.9.7", | ||
"font-awesome": "~4.7.0" | ||
@@ -75,3 +75,3 @@ }, | ||
}, | ||
"gitHead": "3bbcf37b4e349a3783d20e3ead1fdaa92098715c" | ||
"gitHead": "4e4a0662846a9a987a97808c61593aa997da5b73" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
192553
42
3993
Updated@lumino/algorithm@^1.2.3
Updated@lumino/application@^1.7.7
Updated@lumino/commands@^1.9.1
Updated@lumino/coreutils@^1.4.2
Updated@lumino/disposable@^1.3.4
Updated@lumino/messaging@^1.3.3
Updated@lumino/polling@^1.0.3
Updated@lumino/properties@^1.1.6
Updated@lumino/signaling@^1.3.4
Updated@lumino/widgets@^1.9.7