@jupyter-notebook/lab-extension 7.0.0-alpha.1 → 7.0.0-alpha.10

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 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, menu, notebookShell, labShell, toolbarRegistry) => {
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) {
@@ -96,7 +91,7 @@ const launchButtons = {
96
91
  });
97
92
  }
98
93
  if (toolbarRegistry) {
99
- toolbarRegistry.registerFactory('Notebook', 'interfaceSwitcher', panel => {
94
+ toolbarRegistry.addFactory('Notebook', 'interfaceSwitcher', panel => {
100
95
  const menubar = new MenuBar();
101
96
  menubar.addMenu(switcher);
102
97
  menubar.addClass('jp-InterfaceSwitcher');
@@ -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: [IMainMenu, ICommandPalette],
116
- activate: (app, translator, menu, palette) => {
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.1",
3
+ "version": "7.0.0-alpha.10",
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.1",
47
- "@jupyterlab/application": "^4.0.0-alpha.5",
48
- "@jupyterlab/apputils": "^4.0.0-alpha.5",
49
- "@jupyterlab/coreutils": "^6.0.0-alpha.5",
50
- "@jupyterlab/docregistry": "^4.0.0-alpha.5",
51
- "@jupyterlab/mainmenu": "^4.0.0-alpha.5",
52
- "@jupyterlab/notebook": "^4.0.0-alpha.5",
53
- "@jupyterlab/translation": "^4.0.0-alpha.4",
54
- "@lumino/commands": "^1.20.0",
55
- "@lumino/disposable": "^1.10.1"
46
+ "@jupyter-notebook/application": "^7.0.0-alpha.10",
47
+ "@jupyterlab/application": "^4.0.0-alpha.17",
48
+ "@jupyterlab/apputils": "^4.0.0-alpha.17",
49
+ "@jupyterlab/coreutils": "^6.0.0-alpha.17",
50
+ "@jupyterlab/docregistry": "^4.0.0-alpha.17",
51
+ "@jupyterlab/notebook": "^4.0.0-alpha.17",
52
+ "@jupyterlab/translation": "^4.0.0-alpha.17",
53
+ "@lumino/commands": "^2.0.0-alpha.7",
54
+ "@lumino/disposable": "^2.0.0-alpha.7"
56
55
  },
57
56
  "devDependencies": {
58
- "@jupyterlab/builder": "^4.0.0-alpha.5",
59
- "rimraf": "~3.0.0",
60
- "typescript": "~4.1.3"
57
+ "@jupyterlab/builder": "^4.0.0-alpha.17",
58
+ "rimraf": "^3.0.2",
59
+ "typescript": "~4.9.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
+ }