@jupyter-notebook/application-extension 7.4.4 → 7.4.6

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 +13 -6
  2. package/package.json +14 -14
package/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
3
  import { ILabStatus, IRouter, ITreePathUpdater, JupyterFrontEnd, JupyterLab, } from '@jupyterlab/application';
4
- import { DOMUtils, ICommandPalette, ISanitizer, ISplashScreen, IToolbarWidgetRegistry, } from '@jupyterlab/apputils';
4
+ import { DOMUtils, ICommandPalette, ISanitizer, ISplashScreen, IToolbarWidgetRegistry, showErrorMessage, } from '@jupyterlab/apputils';
5
5
  import { ConsolePanel } from '@jupyterlab/console';
6
6
  import { PageConfig, PathExt, URLExt } from '@jupyterlab/coreutils';
7
7
  import { IDocumentManager, renameDialog } from '@jupyterlab/docmanager';
@@ -522,12 +522,19 @@ const title = {
522
522
  if (!isEnabled()) {
523
523
  return;
524
524
  }
525
- const result = await renameDialog(docManager, current.context);
526
- // activate the current widget to bring the focus
527
- if (current) {
528
- current.activate();
525
+ try {
526
+ const result = await renameDialog(docManager, current.context);
527
+ // activate the current widget to bring the focus
528
+ if (current) {
529
+ current.activate();
530
+ }
531
+ if (result === null) {
532
+ return;
533
+ }
529
534
  }
530
- if (result === null) {
535
+ catch (error) {
536
+ showErrorMessage(trans.__('Rename Error'), error.message ||
537
+ trans.__('An error occurred while renaming the file.'));
531
538
  return;
532
539
  }
533
540
  const newPath = current.context.path;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupyter-notebook/application-extension",
3
- "version": "7.4.4",
3
+ "version": "7.4.6",
4
4
  "description": "Jupyter Notebook - Application Extension",
5
5
  "homepage": "https://github.com/jupyter/notebook",
6
6
  "bugs": {
@@ -38,19 +38,19 @@
38
38
  "watch": "tsc -b --watch"
39
39
  },
40
40
  "dependencies": {
41
- "@jupyter-notebook/application": "^7.4.4",
42
- "@jupyter-notebook/ui-components": "^7.4.4",
43
- "@jupyterlab/application": "~4.4.4",
44
- "@jupyterlab/apputils": "~4.5.4",
45
- "@jupyterlab/codeeditor": "~4.4.4",
46
- "@jupyterlab/console": "~4.4.4",
47
- "@jupyterlab/coreutils": "~6.4.4",
48
- "@jupyterlab/docmanager": "~4.4.4",
49
- "@jupyterlab/docregistry": "~4.4.4",
50
- "@jupyterlab/mainmenu": "~4.4.4",
51
- "@jupyterlab/rendermime": "~4.4.4",
52
- "@jupyterlab/settingregistry": "~4.4.4",
53
- "@jupyterlab/translation": "~4.4.4",
41
+ "@jupyter-notebook/application": "^7.4.6",
42
+ "@jupyter-notebook/ui-components": "^7.4.6",
43
+ "@jupyterlab/application": "~4.4.8",
44
+ "@jupyterlab/apputils": "~4.5.8",
45
+ "@jupyterlab/codeeditor": "~4.4.8",
46
+ "@jupyterlab/console": "~4.4.8",
47
+ "@jupyterlab/coreutils": "~6.4.8",
48
+ "@jupyterlab/docmanager": "~4.4.8",
49
+ "@jupyterlab/docregistry": "~4.4.8",
50
+ "@jupyterlab/mainmenu": "~4.4.8",
51
+ "@jupyterlab/rendermime": "~4.4.8",
52
+ "@jupyterlab/settingregistry": "~4.4.8",
53
+ "@jupyterlab/translation": "~4.4.8",
54
54
  "@lumino/coreutils": "^2.2.1",
55
55
  "@lumino/disposable": "^2.1.4",
56
56
  "@lumino/widgets": "^2.7.1"