@jupyter-notebook/application-extension 7.0.0-alpha.1 → 7.0.0-alpha.2
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 +6 -21
- package/package.json +15 -15
package/lib/index.js
CHANGED
|
@@ -14,14 +14,6 @@ import { jupyterIcon } from '@jupyter-notebook/ui-components';
|
|
|
14
14
|
import { PromiseDelegate } from '@lumino/coreutils';
|
|
15
15
|
import { DisposableDelegate, DisposableSet } from '@lumino/disposable';
|
|
16
16
|
import { Widget } from '@lumino/widgets';
|
|
17
|
-
/**
|
|
18
|
-
* The default notebook factory.
|
|
19
|
-
*/
|
|
20
|
-
const NOTEBOOK_FACTORY = 'Notebook';
|
|
21
|
-
/**
|
|
22
|
-
* The editor factory.
|
|
23
|
-
*/
|
|
24
|
-
const EDITOR_FACTORY = 'Editor';
|
|
25
17
|
/**
|
|
26
18
|
* A regular expression to match path to notebooks and documents
|
|
27
19
|
*/
|
|
@@ -116,7 +108,7 @@ const opener = {
|
|
|
116
108
|
const command = 'router:tree';
|
|
117
109
|
commands.addCommand(command, {
|
|
118
110
|
execute: (args) => {
|
|
119
|
-
var _a;
|
|
111
|
+
var _a, _b;
|
|
120
112
|
const parsed = args;
|
|
121
113
|
const matches = (_a = parsed.path.match(TREE_PATTERN)) !== null && _a !== void 0 ? _a : [];
|
|
122
114
|
const [, , path] = matches;
|
|
@@ -124,19 +116,12 @@ const opener = {
|
|
|
124
116
|
return;
|
|
125
117
|
}
|
|
126
118
|
const file = decodeURIComponent(path);
|
|
127
|
-
const
|
|
119
|
+
const urlParams = new URLSearchParams(parsed.search);
|
|
120
|
+
const factory = (_b = urlParams.get('factory')) !== null && _b !== void 0 ? _b : 'default';
|
|
128
121
|
app.restored.then(async () => {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
ref: '_noref'
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
docManager.open(file, EDITOR_FACTORY, undefined, {
|
|
137
|
-
ref: '_noref'
|
|
138
|
-
});
|
|
139
|
-
}
|
|
122
|
+
docManager.open(file, factory, undefined, {
|
|
123
|
+
ref: '_noref'
|
|
124
|
+
});
|
|
140
125
|
});
|
|
141
126
|
}
|
|
142
127
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyter-notebook/application-extension",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.2",
|
|
4
4
|
"description": "Jupyter Notebook - Application Extension",
|
|
5
5
|
"homepage": "https://github.com/jupyter/notebook",
|
|
6
6
|
"bugs": {
|
|
@@ -39,20 +39,20 @@
|
|
|
39
39
|
"watch": "tsc -b --watch"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@jupyter-notebook/application": "^7.0.0-alpha.
|
|
43
|
-
"@jupyter-notebook/ui-components": "^7.0.0-alpha.
|
|
44
|
-
"@jupyterlab/application": "^4.0.0-alpha.
|
|
45
|
-
"@jupyterlab/apputils": "^4.0.0-alpha.
|
|
46
|
-
"@jupyterlab/celltags": "^4.0.0-alpha.
|
|
47
|
-
"@jupyterlab/codeeditor": "^4.0.0-alpha.
|
|
48
|
-
"@jupyterlab/codemirror": "^4.0.0-alpha.
|
|
49
|
-
"@jupyterlab/console": "^4.0.0-alpha.
|
|
50
|
-
"@jupyterlab/coreutils": "^6.0.0-alpha.
|
|
51
|
-
"@jupyterlab/docmanager": "^4.0.0-alpha.
|
|
52
|
-
"@jupyterlab/docregistry": "^4.0.0-alpha.
|
|
53
|
-
"@jupyterlab/mainmenu": "^4.0.0-alpha.
|
|
54
|
-
"@jupyterlab/settingregistry": "^4.0.0-alpha.
|
|
55
|
-
"@jupyterlab/translation": "^4.0.0-alpha.
|
|
42
|
+
"@jupyter-notebook/application": "^7.0.0-alpha.2",
|
|
43
|
+
"@jupyter-notebook/ui-components": "^7.0.0-alpha.2",
|
|
44
|
+
"@jupyterlab/application": "^4.0.0-alpha.7",
|
|
45
|
+
"@jupyterlab/apputils": "^4.0.0-alpha.7",
|
|
46
|
+
"@jupyterlab/celltags": "^4.0.0-alpha.7",
|
|
47
|
+
"@jupyterlab/codeeditor": "^4.0.0-alpha.7",
|
|
48
|
+
"@jupyterlab/codemirror": "^4.0.0-alpha.7",
|
|
49
|
+
"@jupyterlab/console": "^4.0.0-alpha.7",
|
|
50
|
+
"@jupyterlab/coreutils": "^6.0.0-alpha.7",
|
|
51
|
+
"@jupyterlab/docmanager": "^4.0.0-alpha.7",
|
|
52
|
+
"@jupyterlab/docregistry": "^4.0.0-alpha.7",
|
|
53
|
+
"@jupyterlab/mainmenu": "^4.0.0-alpha.7",
|
|
54
|
+
"@jupyterlab/settingregistry": "^4.0.0-alpha.7",
|
|
55
|
+
"@jupyterlab/translation": "^4.0.0-alpha.7",
|
|
56
56
|
"@lumino/coreutils": "^1.12.0",
|
|
57
57
|
"@lumino/disposable": "^1.10.1",
|
|
58
58
|
"@lumino/widgets": "^1.31.1"
|