@jupyter-notebook/lab-extension 7.0.0-alpha.2 → 7.0.0-alpha.3
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/index.js +3 -12
- package/package.json +10 -11
- package/schema/interface-switcher.json +17 -0
- package/schema/launch-tree.json +20 -0
package/lib/index.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { ILabShell } from '@jupyterlab/application';
|
|
4
4
|
import { ICommandPalette, IToolbarWidgetRegistry } from '@jupyterlab/apputils';
|
|
5
5
|
import { PageConfig } from '@jupyterlab/coreutils';
|
|
6
|
-
import { IMainMenu } from '@jupyterlab/mainmenu';
|
|
7
6
|
import { INotebookTracker } from '@jupyterlab/notebook';
|
|
8
7
|
import { ITranslator } from '@jupyterlab/translation';
|
|
9
8
|
import { Menu, MenuBar } from '@lumino/widgets';
|
|
@@ -36,12 +35,11 @@ const launchButtons = {
|
|
|
36
35
|
optional: [
|
|
37
36
|
INotebookTracker,
|
|
38
37
|
ICommandPalette,
|
|
39
|
-
IMainMenu,
|
|
40
38
|
INotebookShell,
|
|
41
39
|
ILabShell,
|
|
42
40
|
IToolbarWidgetRegistry
|
|
43
41
|
],
|
|
44
|
-
activate: (app, translator, notebookTracker, palette,
|
|
42
|
+
activate: (app, translator, notebookTracker, palette, notebookShell, labShell, toolbarRegistry) => {
|
|
45
43
|
if (!notebookTracker) {
|
|
46
44
|
// to prevent showing the toolbar button in non-notebook pages
|
|
47
45
|
return;
|
|
@@ -74,9 +72,6 @@ const launchButtons = {
|
|
|
74
72
|
if (palette) {
|
|
75
73
|
palette.addItem({ command, category: 'Other' });
|
|
76
74
|
}
|
|
77
|
-
if (menu) {
|
|
78
|
-
menu.viewMenu.addGroup([{ command }], 1);
|
|
79
|
-
}
|
|
80
75
|
switcher.addItem({ command });
|
|
81
76
|
};
|
|
82
77
|
if (!notebookShell) {
|
|
@@ -112,8 +107,8 @@ const launchNotebookTree = {
|
|
|
112
107
|
id: '@jupyter-notebook/lab-extension:launch-tree',
|
|
113
108
|
autoStart: true,
|
|
114
109
|
requires: [ITranslator],
|
|
115
|
-
optional: [
|
|
116
|
-
activate: (app, translator,
|
|
110
|
+
optional: [ICommandPalette],
|
|
111
|
+
activate: (app, translator, palette) => {
|
|
117
112
|
const { commands } = app;
|
|
118
113
|
const trans = translator.load('notebook');
|
|
119
114
|
const category = trans.__('Help');
|
|
@@ -123,10 +118,6 @@ const launchNotebookTree = {
|
|
|
123
118
|
window.open(PageConfig.getBaseUrl() + 'tree');
|
|
124
119
|
}
|
|
125
120
|
});
|
|
126
|
-
if (menu) {
|
|
127
|
-
const helpMenu = menu.helpMenu;
|
|
128
|
-
helpMenu.addGroup([{ command: CommandIDs.launchNotebookTree }], 1);
|
|
129
|
-
}
|
|
130
121
|
if (palette) {
|
|
131
122
|
palette.addItem({ command: CommandIDs.launchNotebookTree, category });
|
|
132
123
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyter-notebook/lab-extension",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.3",
|
|
4
4
|
"description": "Jupyter Notebook - Lab Extension",
|
|
5
5
|
"homepage": "https://github.com/jupyter/notebook",
|
|
6
6
|
"bugs": {
|
|
@@ -43,21 +43,20 @@
|
|
|
43
43
|
"watch:src": "tsc -w"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@jupyter-notebook/application": "^7.0.0-alpha.
|
|
47
|
-
"@jupyterlab/application": "^4.0.0-alpha.
|
|
48
|
-
"@jupyterlab/apputils": "^4.0.0-alpha.
|
|
49
|
-
"@jupyterlab/coreutils": "^6.0.0-alpha.
|
|
50
|
-
"@jupyterlab/docregistry": "^4.0.0-alpha.
|
|
51
|
-
"@jupyterlab/
|
|
52
|
-
"@jupyterlab/
|
|
53
|
-
"@jupyterlab/translation": "^4.0.0-alpha.7",
|
|
46
|
+
"@jupyter-notebook/application": "^7.0.0-alpha.3",
|
|
47
|
+
"@jupyterlab/application": "^4.0.0-alpha.9",
|
|
48
|
+
"@jupyterlab/apputils": "^4.0.0-alpha.9",
|
|
49
|
+
"@jupyterlab/coreutils": "^6.0.0-alpha.9",
|
|
50
|
+
"@jupyterlab/docregistry": "^4.0.0-alpha.9",
|
|
51
|
+
"@jupyterlab/notebook": "^4.0.0-alpha.9",
|
|
52
|
+
"@jupyterlab/translation": "^4.0.0-alpha.9",
|
|
54
53
|
"@lumino/commands": "^1.20.0",
|
|
55
54
|
"@lumino/disposable": "^1.10.1"
|
|
56
55
|
},
|
|
57
56
|
"devDependencies": {
|
|
58
|
-
"@jupyterlab/builder": "^4.0.0-alpha.
|
|
57
|
+
"@jupyterlab/builder": "^4.0.0-alpha.9",
|
|
59
58
|
"rimraf": "~3.0.0",
|
|
60
|
-
"typescript": "~4.
|
|
59
|
+
"typescript": "~4.6.3"
|
|
61
60
|
},
|
|
62
61
|
"publishConfig": {
|
|
63
62
|
"access": "public"
|
|
@@ -4,6 +4,23 @@
|
|
|
4
4
|
"jupyter.lab.toolbars": {
|
|
5
5
|
"Notebook": [{ "name": "interfaceSwitcher", "rank": 990 }]
|
|
6
6
|
},
|
|
7
|
+
"jupyter.lab.menus": {
|
|
8
|
+
"main": [
|
|
9
|
+
{
|
|
10
|
+
"id": "jp-mainmenu-view",
|
|
11
|
+
"items": [
|
|
12
|
+
{
|
|
13
|
+
"command": "jupyter-notebook:open-notebook",
|
|
14
|
+
"rank": 10
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"command": "jupyter-notebook:open-lab",
|
|
18
|
+
"rank": 10
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
7
24
|
"properties": {},
|
|
8
25
|
"additionalProperties": false,
|
|
9
26
|
"type": "object"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Launch Shortcuts",
|
|
3
|
+
"description": "Launch Shortcuts.",
|
|
4
|
+
"jupyter.lab.menus": {
|
|
5
|
+
"main": [
|
|
6
|
+
{
|
|
7
|
+
"id": "jp-mainmenu-help",
|
|
8
|
+
"items": [
|
|
9
|
+
{
|
|
10
|
+
"command": "jupyter-notebook:launch-tree",
|
|
11
|
+
"rank": 1
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"properties": {},
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"type": "object"
|
|
20
|
+
}
|