@jupyter-notebook/application 7.6.0-alpha.4 → 7.6.0-alpha.5
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/lib/panelhandler.d.ts +3 -1
- package/lib/panelhandler.js +6 -2
- package/lib/shell.js +2 -2
- package/package.json +7 -7
package/lib/panelhandler.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { ICommandPalette } from '@jupyterlab/apputils';
|
|
|
2
2
|
import { IDisposable } from '@lumino/disposable';
|
|
3
3
|
import { ISignal } from '@lumino/signaling';
|
|
4
4
|
import { Panel, Widget } from '@lumino/widgets';
|
|
5
|
+
import { ITranslator } from '@jupyterlab/translation';
|
|
5
6
|
/**
|
|
6
7
|
* A class which manages a panel and sorts its widgets by rank.
|
|
7
8
|
*/
|
|
@@ -31,7 +32,7 @@ export declare class SidePanelHandler extends PanelHandler {
|
|
|
31
32
|
/**
|
|
32
33
|
* Construct a new side panel handler.
|
|
33
34
|
*/
|
|
34
|
-
constructor(area: SidePanel.Area);
|
|
35
|
+
constructor(area: SidePanel.Area, translator: ITranslator);
|
|
35
36
|
/**
|
|
36
37
|
* Get the current widget in the sidebar panel.
|
|
37
38
|
*/
|
|
@@ -125,6 +126,7 @@ export declare class SidePanelHandler extends PanelHandler {
|
|
|
125
126
|
private _closeButton;
|
|
126
127
|
private _widgetAdded;
|
|
127
128
|
private _widgetRemoved;
|
|
129
|
+
private _translator;
|
|
128
130
|
}
|
|
129
131
|
/**
|
|
130
132
|
* A name space for SideBarPanel functions.
|
package/lib/panelhandler.js
CHANGED
|
@@ -5,6 +5,7 @@ import { ArrayExt, find } from '@lumino/algorithm';
|
|
|
5
5
|
import { MessageLoop } from '@lumino/messaging';
|
|
6
6
|
import { Signal } from '@lumino/signaling';
|
|
7
7
|
import { Panel, StackedPanel, Widget } from '@lumino/widgets';
|
|
8
|
+
import { nullTranslator } from '@jupyterlab/translation';
|
|
8
9
|
/**
|
|
9
10
|
* A class which manages a panel and sorts its widgets by rank.
|
|
10
11
|
*/
|
|
@@ -56,13 +57,15 @@ export class SidePanelHandler extends PanelHandler {
|
|
|
56
57
|
/**
|
|
57
58
|
* Construct a new side panel handler.
|
|
58
59
|
*/
|
|
59
|
-
constructor(area) {
|
|
60
|
+
constructor(area, translator) {
|
|
60
61
|
super();
|
|
61
62
|
this._isHiddenByUser = false;
|
|
62
63
|
this._widgetAdded = new Signal(this);
|
|
63
64
|
this._widgetRemoved = new Signal(this);
|
|
65
|
+
this._translator = nullTranslator;
|
|
64
66
|
this._area = area;
|
|
65
67
|
this._panel.hide();
|
|
68
|
+
this._translator = translator;
|
|
66
69
|
this._currentWidget = null;
|
|
67
70
|
this._lastCurrentWidget = null;
|
|
68
71
|
this._widgetPanel = new StackedPanel();
|
|
@@ -77,8 +80,9 @@ export class SidePanelHandler extends PanelHandler {
|
|
|
77
80
|
this.collapse();
|
|
78
81
|
this.hide();
|
|
79
82
|
};
|
|
83
|
+
const trans = this._translator.load('notebook');
|
|
80
84
|
this._closeButton.className = 'jp-Button jp-SidePanel-collapse';
|
|
81
|
-
this._closeButton.title = 'Collapse side panel';
|
|
85
|
+
this._closeButton.title = trans.__('Collapse side panel');
|
|
82
86
|
const icon = new Widget({ node: this._closeButton });
|
|
83
87
|
this._panel.addWidget(icon);
|
|
84
88
|
this._panel.addWidget(this._widgetPanel);
|
package/lib/shell.js
CHANGED
|
@@ -28,8 +28,8 @@ export class NotebookShell extends Widget {
|
|
|
28
28
|
this._userLayout = {};
|
|
29
29
|
this._topHandler = new PanelHandler();
|
|
30
30
|
this._menuHandler = new PanelHandler();
|
|
31
|
-
this._leftHandler = new SidePanelHandler('left');
|
|
32
|
-
this._rightHandler = new SidePanelHandler('right');
|
|
31
|
+
this._leftHandler = new SidePanelHandler('left', this.translator);
|
|
32
|
+
this._rightHandler = new SidePanelHandler('right', this.translator);
|
|
33
33
|
this._main = new Panel();
|
|
34
34
|
const topWrapper = (this._topWrapper = new Panel());
|
|
35
35
|
const menuWrapper = (this._menuWrapper = new Panel());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyter-notebook/application",
|
|
3
|
-
"version": "7.6.0-alpha.
|
|
3
|
+
"version": "7.6.0-alpha.5",
|
|
4
4
|
"description": "Jupyter Notebook - Application",
|
|
5
5
|
"homepage": "https://github.com/jupyter/notebook",
|
|
6
6
|
"bugs": {
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
"watch": "tsc -b --watch"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@jupyterlab/application": "~4.6.0-alpha.
|
|
46
|
-
"@jupyterlab/coreutils": "~6.6.0-alpha.
|
|
47
|
-
"@jupyterlab/docregistry": "~4.6.0-alpha.
|
|
48
|
-
"@jupyterlab/rendermime-interfaces": "~3.14.0-alpha.
|
|
49
|
-
"@jupyterlab/ui-components": "~4.6.0-alpha.
|
|
45
|
+
"@jupyterlab/application": "~4.6.0-alpha.5",
|
|
46
|
+
"@jupyterlab/coreutils": "~6.6.0-alpha.5",
|
|
47
|
+
"@jupyterlab/docregistry": "~4.6.0-alpha.5",
|
|
48
|
+
"@jupyterlab/rendermime-interfaces": "~3.14.0-alpha.5",
|
|
49
|
+
"@jupyterlab/ui-components": "~4.6.0-alpha.5",
|
|
50
50
|
"@lumino/algorithm": "^2.0.4",
|
|
51
51
|
"@lumino/coreutils": "^2.2.2",
|
|
52
52
|
"@lumino/messaging": "^2.0.4",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@babel/core": "^7.11.6",
|
|
59
59
|
"@babel/preset-env": "^7.12.1",
|
|
60
|
-
"@jupyterlab/testutils": "~4.6.0-alpha.
|
|
60
|
+
"@jupyterlab/testutils": "~4.6.0-alpha.5",
|
|
61
61
|
"@types/jest": "^29.2.5",
|
|
62
62
|
"jest": "^29.3.1",
|
|
63
63
|
"rimraf": "^3.0.2",
|