@jupyter-notebook/lab-extension 7.0.0-alpha.16 → 7.0.0-alpha.17

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.
Files changed (2) hide show
  1. package/lib/index.js +12 -12
  2. package/package.json +13 -13
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
- import { ILabShell } from '@jupyterlab/application';
3
+ import { ILabShell, } from '@jupyterlab/application';
4
4
  import { ICommandPalette, IToolbarWidgetRegistry } from '@jupyterlab/apputils';
5
5
  import { PageConfig } from '@jupyterlab/coreutils';
6
6
  import { INotebookTracker } from '@jupyterlab/notebook';
@@ -37,14 +37,14 @@ const interfaceSwitcher = {
37
37
  ICommandPalette,
38
38
  INotebookShell,
39
39
  ILabShell,
40
- IToolbarWidgetRegistry
40
+ IToolbarWidgetRegistry,
41
41
  ],
42
42
  activate: (app, translator, notebookTracker, palette, notebookShell, labShell, toolbarRegistry) => {
43
43
  const { commands, shell } = app;
44
44
  const baseUrl = PageConfig.getBaseUrl();
45
45
  const trans = translator.load('notebook');
46
46
  const overflowOptions = {
47
- overflowMenuOptions: { isVisible: false }
47
+ overflowMenuOptions: { isVisible: false },
48
48
  };
49
49
  const menubar = new MenuBar(overflowOptions);
50
50
  const switcher = new Menu({ commands });
@@ -58,7 +58,7 @@ const interfaceSwitcher = {
58
58
  const addInterface = (option) => {
59
59
  const { command, commandLabel, urlPrefix } = option;
60
60
  commands.addCommand(command, {
61
- label: args => (args.noLabel ? '' : commandLabel),
61
+ label: (args) => (args.noLabel ? '' : commandLabel),
62
62
  caption: commandLabel,
63
63
  execute: () => {
64
64
  const current = notebookTracker.currentWidget;
@@ -67,7 +67,7 @@ const interfaceSwitcher = {
67
67
  }
68
68
  window.open(`${urlPrefix}${current.context.path}`);
69
69
  },
70
- isEnabled
70
+ isEnabled,
71
71
  });
72
72
  if (palette) {
73
73
  palette.addItem({ command, category: 'Other' });
@@ -79,7 +79,7 @@ const interfaceSwitcher = {
79
79
  command: CommandIDs.openNotebook,
80
80
  commandLabel: trans.__('Open With %1', 'Jupyter Notebook'),
81
81
  buttonLabel: 'openNotebook',
82
- urlPrefix: `${baseUrl}tree/`
82
+ urlPrefix: `${baseUrl}tree/`,
83
83
  });
84
84
  }
85
85
  if (!labShell) {
@@ -87,18 +87,18 @@ const interfaceSwitcher = {
87
87
  command: CommandIDs.openLab,
88
88
  commandLabel: trans.__('Open With %1', 'JupyterLab'),
89
89
  buttonLabel: 'openLab',
90
- urlPrefix: `${baseUrl}doc/tree/`
90
+ urlPrefix: `${baseUrl}doc/tree/`,
91
91
  });
92
92
  }
93
93
  if (toolbarRegistry) {
94
- toolbarRegistry.addFactory('Notebook', 'interfaceSwitcher', panel => {
94
+ toolbarRegistry.addFactory('Notebook', 'interfaceSwitcher', (panel) => {
95
95
  const menubar = new MenuBar(overflowOptions);
96
96
  menubar.addMenu(switcher);
97
97
  menubar.addClass('jp-InterfaceSwitcher');
98
98
  return menubar;
99
99
  });
100
100
  }
101
- }
101
+ },
102
102
  };
103
103
  /**
104
104
  * A plugin to add a command to open the Jupyter Notebook Tree.
@@ -116,18 +116,18 @@ const launchNotebookTree = {
116
116
  label: trans.__('Launch Jupyter Notebook File Browser'),
117
117
  execute: () => {
118
118
  window.open(PageConfig.getBaseUrl() + 'tree');
119
- }
119
+ },
120
120
  });
121
121
  if (palette) {
122
122
  palette.addItem({ command: CommandIDs.launchNotebookTree, category });
123
123
  }
124
- }
124
+ },
125
125
  };
126
126
  /**
127
127
  * Export the plugins as default.
128
128
  */
129
129
  const plugins = [
130
130
  launchNotebookTree,
131
- interfaceSwitcher
131
+ interfaceSwitcher,
132
132
  ];
133
133
  export default plugins;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupyter-notebook/lab-extension",
3
- "version": "7.0.0-alpha.16",
3
+ "version": "7.0.0-alpha.17",
4
4
  "description": "Jupyter Notebook - Lab Extension",
5
5
  "homepage": "https://github.com/jupyter/notebook",
6
6
  "bugs": {
@@ -43,21 +43,21 @@
43
43
  "watch:src": "tsc -w"
44
44
  },
45
45
  "dependencies": {
46
- "@jupyter-notebook/application": "^7.0.0-alpha.16",
47
- "@jupyterlab/application": "^4.0.0-alpha.21",
48
- "@jupyterlab/apputils": "^4.0.0-alpha.21",
49
- "@jupyterlab/coreutils": "^6.0.0-alpha.21",
50
- "@jupyterlab/docregistry": "^4.0.0-alpha.21",
51
- "@jupyterlab/notebook": "^4.0.0-alpha.21",
52
- "@jupyterlab/translation": "^4.0.0-alpha.21",
53
- "@jupyterlab/ui-components": "^4.0.0-alpha.36",
54
- "@lumino/commands": "^2.0.0-rc.1",
55
- "@lumino/disposable": "^2.0.0-rc.1"
46
+ "@jupyter-notebook/application": "^7.0.0-alpha.17",
47
+ "@jupyterlab/application": "^4.0.0-alpha.22",
48
+ "@jupyterlab/apputils": "^4.0.0-alpha.22",
49
+ "@jupyterlab/coreutils": "^6.0.0-alpha.22",
50
+ "@jupyterlab/docregistry": "^4.0.0-alpha.22",
51
+ "@jupyterlab/notebook": "^4.0.0-alpha.22",
52
+ "@jupyterlab/translation": "^4.0.0-alpha.22",
53
+ "@jupyterlab/ui-components": "^4.0.0-alpha.37",
54
+ "@lumino/commands": "^2.0.0",
55
+ "@lumino/disposable": "^2.0.0"
56
56
  },
57
57
  "devDependencies": {
58
- "@jupyterlab/builder": "^4.0.0-alpha.21",
58
+ "@jupyterlab/builder": "^4.0.0-alpha.22",
59
59
  "rimraf": "^3.0.2",
60
- "typescript": "5.0.1-rc"
60
+ "typescript": "~5.0.2"
61
61
  },
62
62
  "publishConfig": {
63
63
  "access": "public"