@jupytergis/jupytergis-lab 0.10.1 → 0.12.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 +5 -0
- package/lib/notebookrenderer.js +7 -3
- package/package.json +4 -4
package/lib/index.js
CHANGED
|
@@ -140,6 +140,11 @@ const plugin = {
|
|
|
140
140
|
rank: 3,
|
|
141
141
|
submenu: newLayerSubMenu,
|
|
142
142
|
});
|
|
143
|
+
app.contextMenu.addItem({
|
|
144
|
+
selector: '.jp-gis-layerPanel',
|
|
145
|
+
command: CommandIDs.addStorySegment,
|
|
146
|
+
rank: 4,
|
|
147
|
+
});
|
|
143
148
|
if (mainMenu) {
|
|
144
149
|
populateMenus(mainMenu, isEnabled);
|
|
145
150
|
}
|
package/lib/notebookrenderer.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ICollaborativeDrive } from '@jupyter/collaborative-drive';
|
|
2
1
|
import { JupyterGISOutputWidget, JupyterGISPanel, ToolbarWidget, } from '@jupytergis/base';
|
|
3
2
|
import { IJGISExternalCommandRegistryToken, IJupyterGISDocTracker, JupyterGISModel, IJGISFormSchemaRegistryToken, IAnnotationToken, } from '@jupytergis/schema';
|
|
4
3
|
import { showErrorMessage } from '@jupyterlab/apputils';
|
|
5
4
|
import { ConsolePanel } from '@jupyterlab/console';
|
|
6
5
|
import { PathExt } from '@jupyterlab/coreutils';
|
|
7
6
|
import { NotebookPanel } from '@jupyterlab/notebook';
|
|
7
|
+
import { IDefaultDrive } from '@jupyterlab/services';
|
|
8
8
|
import { ISettingRegistry } from '@jupyterlab/settingregistry';
|
|
9
9
|
import { IStateDB } from '@jupyterlab/statedb';
|
|
10
10
|
import { MessageLoop } from '@lumino/messaging';
|
|
@@ -76,7 +76,7 @@ export const notebookRendererPlugin = {
|
|
|
76
76
|
IJGISExternalCommandRegistryToken,
|
|
77
77
|
IJupyterGISDocTracker,
|
|
78
78
|
IJupyterYWidgetManager,
|
|
79
|
-
|
|
79
|
+
IDefaultDrive,
|
|
80
80
|
IStateDB,
|
|
81
81
|
IAnnotationToken,
|
|
82
82
|
ISettingRegistry,
|
|
@@ -119,7 +119,11 @@ export const notebookRendererPlugin = {
|
|
|
119
119
|
// If the user did not provide a path, do not create
|
|
120
120
|
localPath = PathExt.join(PathExt.dirname(currentWidgetPath), 'unsaved_project');
|
|
121
121
|
}
|
|
122
|
-
const
|
|
122
|
+
const sharedFactory = app.serviceManager.contents.getSharedModelFactory(localPath, { contentProviderId: 'rtc' });
|
|
123
|
+
if (!sharedFactory) {
|
|
124
|
+
throw new Error('Cannot initialize JupyterGIS notebook renderer without a sharedModelFactory');
|
|
125
|
+
}
|
|
126
|
+
const sharedModel = sharedFactory.createNew({
|
|
123
127
|
path: localPath,
|
|
124
128
|
format: fileFormat,
|
|
125
129
|
contentType,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupytergis/jupytergis-lab",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "JupyterGIS Lab extension.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jupyter",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"watch:labextension": "jupyter labextension watch ."
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@jupyter/collaborative-drive": "^
|
|
56
|
-
"@jupytergis/base": "^0.
|
|
57
|
-
"@jupytergis/schema": "^0.
|
|
55
|
+
"@jupyter/collaborative-drive": "^4.1.2",
|
|
56
|
+
"@jupytergis/base": "^0.12.0",
|
|
57
|
+
"@jupytergis/schema": "^0.12.0",
|
|
58
58
|
"@jupyterlab/application": "^4.3.0",
|
|
59
59
|
"@jupyterlab/apputils": "^4.3.0",
|
|
60
60
|
"@jupyterlab/completer": "^4.3.0",
|