@jupyter-notebook/application-extension 7.2.0-rc.1 → 7.3.0-alpha.0
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 +16 -0
- package/package.json +14 -14
- package/schema/menus.json +4 -0
package/lib/index.js
CHANGED
|
@@ -32,6 +32,10 @@ const JUPYTERLAB_DOCMANAGER_PLUGIN_ID = '@jupyterlab/docmanager-extension:plugin
|
|
|
32
32
|
*/
|
|
33
33
|
var CommandIDs;
|
|
34
34
|
(function (CommandIDs) {
|
|
35
|
+
/**
|
|
36
|
+
* Duplicate the current document and open the new document
|
|
37
|
+
*/
|
|
38
|
+
CommandIDs.duplicate = 'application:duplicate';
|
|
35
39
|
/**
|
|
36
40
|
* Handle local links
|
|
37
41
|
*/
|
|
@@ -484,6 +488,18 @@ const title = {
|
|
|
484
488
|
const { currentWidget } = shell;
|
|
485
489
|
return !!(currentWidget && docManager.contextForWidget(currentWidget));
|
|
486
490
|
};
|
|
491
|
+
commands.addCommand(CommandIDs.duplicate, {
|
|
492
|
+
label: () => trans.__('Duplicate'),
|
|
493
|
+
isEnabled,
|
|
494
|
+
execute: async () => {
|
|
495
|
+
if (!isEnabled()) {
|
|
496
|
+
return;
|
|
497
|
+
}
|
|
498
|
+
// Duplicate the file, and open the new file.
|
|
499
|
+
const result = await docManager.duplicate(current.context.path);
|
|
500
|
+
await commands.execute('docmanager:open', { path: result.path });
|
|
501
|
+
},
|
|
502
|
+
});
|
|
487
503
|
commands.addCommand(CommandIDs.rename, {
|
|
488
504
|
label: () => trans.__('Rename…'),
|
|
489
505
|
isEnabled,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyter-notebook/application-extension",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0-alpha.0",
|
|
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.
|
|
42
|
-
"@jupyter-notebook/ui-components": "^7.
|
|
43
|
-
"@jupyterlab/application": "~4.
|
|
44
|
-
"@jupyterlab/apputils": "~4.
|
|
45
|
-
"@jupyterlab/codeeditor": "~4.
|
|
46
|
-
"@jupyterlab/console": "~4.
|
|
47
|
-
"@jupyterlab/coreutils": "~6.
|
|
48
|
-
"@jupyterlab/docmanager": "~4.
|
|
49
|
-
"@jupyterlab/docregistry": "~4.
|
|
50
|
-
"@jupyterlab/mainmenu": "~4.
|
|
51
|
-
"@jupyterlab/rendermime": "~4.
|
|
52
|
-
"@jupyterlab/settingregistry": "~4.
|
|
53
|
-
"@jupyterlab/translation": "~4.
|
|
41
|
+
"@jupyter-notebook/application": "^7.3.0-alpha.0",
|
|
42
|
+
"@jupyter-notebook/ui-components": "^7.3.0-alpha.0",
|
|
43
|
+
"@jupyterlab/application": "~4.3.0-alpha.0",
|
|
44
|
+
"@jupyterlab/apputils": "~4.4.0-alpha.0",
|
|
45
|
+
"@jupyterlab/codeeditor": "~4.3.0-alpha.0",
|
|
46
|
+
"@jupyterlab/console": "~4.3.0-alpha.0",
|
|
47
|
+
"@jupyterlab/coreutils": "~6.3.0-alpha.0",
|
|
48
|
+
"@jupyterlab/docmanager": "~4.3.0-alpha.0",
|
|
49
|
+
"@jupyterlab/docregistry": "~4.3.0-alpha.0",
|
|
50
|
+
"@jupyterlab/mainmenu": "~4.3.0-alpha.0",
|
|
51
|
+
"@jupyterlab/rendermime": "~4.3.0-alpha.0",
|
|
52
|
+
"@jupyterlab/settingregistry": "~4.3.0-alpha.0",
|
|
53
|
+
"@jupyterlab/translation": "~4.3.0-alpha.0",
|
|
54
54
|
"@lumino/coreutils": "^2.1.2",
|
|
55
55
|
"@lumino/disposable": "^2.1.2",
|
|
56
56
|
"@lumino/widgets": "^2.3.2"
|