@jupytergis/jupytergis-qgis 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.
Files changed (2) hide show
  1. package/lib/plugins.js +9 -6
  2. package/package.json +5 -5
package/lib/plugins.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ICollaborativeDrive, } from '@jupyter/collaborative-drive';
1
+ import { ICollaborativeContentProvider } from '@jupyter/collaborative-drive';
2
2
  import { logoMiniIcon, logoMiniIconQGZ, requestAPI, } from '@jupytergis/base';
3
3
  import { JupyterGISDocumentWidgetFactory } from '@jupytergis/jupytergis-core';
4
4
  import { IJGISExternalCommandRegistryToken, JupyterGISDoc, IJupyterGISDocTracker, IAnnotationToken, IJGISFormSchemaRegistryToken, } from '@jupytergis/schema';
@@ -7,6 +7,7 @@ import { IEditorServices } from '@jupyterlab/codeeditor';
7
7
  import { ConsolePanel, IConsoleTracker } from '@jupyterlab/console';
8
8
  import { PathExt } from '@jupyterlab/coreutils';
9
9
  import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
10
+ import { IDefaultDrive, } from '@jupyterlab/services';
10
11
  import { ISettingRegistry } from '@jupyterlab/settingregistry';
11
12
  import { IStateDB } from '@jupyterlab/statedb';
12
13
  import { Widget } from '@lumino/widgets';
@@ -18,7 +19,7 @@ var CommandIDs;
18
19
  (function (CommandIDs) {
19
20
  CommandIDs.exportQgis = 'jupytergis:export';
20
21
  })(CommandIDs || (CommandIDs = {}));
21
- const activate = async (app, tracker, themeManager, drive, externalCommandRegistry, contentFactory, editorServices, rendermime, consoleTracker, annotationModel, settingRegistry, formSchemaRegistry, state, commandPalette) => {
22
+ const activate = async (app, tracker, themeManager, drive, externalCommandRegistry, contentFactory, editorServices, rendermime, consoleTracker, annotationModel, settingRegistry, formSchemaRegistry, state, commandPalette, collaborativeContentProvider) => {
22
23
  const fcCheck = await requestAPI('jupytergis_qgis/backend-check', {
23
24
  method: 'POST',
24
25
  body: JSON.stringify({}),
@@ -94,8 +95,10 @@ const activate = async (app, tracker, themeManager, drive, externalCommandRegist
94
95
  const QGISSharedModelFactory = () => {
95
96
  return new JupyterGISDoc();
96
97
  };
97
- drive.sharedModelFactory.registerDocumentFactory('QGS', QGISSharedModelFactory);
98
- drive.sharedModelFactory.registerDocumentFactory('QGZ', QGISSharedModelFactory);
98
+ if (collaborativeContentProvider) {
99
+ collaborativeContentProvider.sharedModelFactory.registerDocumentFactory('QGS', QGISSharedModelFactory);
100
+ collaborativeContentProvider.sharedModelFactory.registerDocumentFactory('QGZ', QGISSharedModelFactory);
101
+ }
99
102
  const widgetCreatedCallback = (sender, widget) => {
100
103
  widget.title.icon = logoMiniIconQGZ;
101
104
  // Notify the instance tracker if restore data needs to update.
@@ -215,7 +218,7 @@ export const qgisplugin = {
215
218
  requires: [
216
219
  IJupyterGISDocTracker,
217
220
  IThemeManager,
218
- ICollaborativeDrive,
221
+ IDefaultDrive,
219
222
  IJGISExternalCommandRegistryToken,
220
223
  ConsolePanel.IContentFactory,
221
224
  IEditorServices,
@@ -226,7 +229,7 @@ export const qgisplugin = {
226
229
  IJGISFormSchemaRegistryToken,
227
230
  IStateDB,
228
231
  ],
229
- optional: [ICommandPalette],
232
+ optional: [ICommandPalette, ICollaborativeContentProvider],
230
233
  autoStart: true,
231
234
  activate,
232
235
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupytergis/jupytergis-qgis",
3
- "version": "0.10.1",
3
+ "version": "0.12.0",
4
4
  "description": "JupyterGIS QGIS extension.",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -53,10 +53,10 @@
53
53
  "watch:labextension": "jupyter labextension watch ."
54
54
  },
55
55
  "dependencies": {
56
- "@jupyter/collaborative-drive": "^3.0.0",
57
- "@jupytergis/base": "^0.10.1",
58
- "@jupytergis/jupytergis-core": "^0.10.1",
59
- "@jupytergis/schema": "^0.10.1",
56
+ "@jupyter/collaborative-drive": "^4.1.2",
57
+ "@jupytergis/base": "^0.12.0",
58
+ "@jupytergis/jupytergis-core": "^0.12.0",
59
+ "@jupytergis/schema": "^0.12.0",
60
60
  "@jupyterlab/application": "^4.3.0",
61
61
  "@jupyterlab/apputils": "^4.3.0",
62
62
  "@jupyterlab/coreutils": "^6.3.0",