@jupytergis/jupytergis-qgis 0.4.4 → 0.5.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.
@@ -1,6 +1,7 @@
1
1
  import { IJupyterGISDoc, JupyterGISModel, IAnnotationModel } from '@jupytergis/schema';
2
2
  import { DocumentRegistry } from '@jupyterlab/docregistry';
3
3
  import { Contents } from '@jupyterlab/services';
4
+ import { ISettingRegistry } from '@jupyterlab/settingregistry';
4
5
  /**
5
6
  * A Model factory to create new instances of JupyterGISModel.
6
7
  */
@@ -52,11 +53,13 @@ export declare class JupyterGISModelFactoryBase implements DocumentRegistry.IMod
52
53
  */
53
54
  createNew(options: DocumentRegistry.IModelOptions<IJupyterGISDoc>): JupyterGISModel;
54
55
  private _annotationModel;
56
+ private _settingRegistry;
55
57
  private _disposed;
56
58
  }
57
59
  export declare namespace JupyterGISModelFactoryBase {
58
60
  interface IOptions {
59
61
  annotationModel: IAnnotationModel;
62
+ settingRegistry: ISettingRegistry;
60
63
  }
61
64
  }
62
65
  export declare class QGZModelFactory extends JupyterGISModelFactoryBase {
@@ -67,7 +67,8 @@ export class JupyterGISModelFactoryBase {
67
67
  const model = new JupyterGISModel({
68
68
  sharedModel: options.sharedModel,
69
69
  languagePreference: options.languagePreference,
70
- annotationModel: this._annotationModel
70
+ annotationModel: this._annotationModel,
71
+ settingRegistry: this._settingRegistry
71
72
  });
72
73
  return model;
73
74
  }
package/lib/plugins.js CHANGED
@@ -6,6 +6,7 @@ import { ConsolePanel, IConsoleTracker } from '@jupyterlab/console';
6
6
  import { PathExt } from '@jupyterlab/coreutils';
7
7
  import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
8
8
  import { Widget } from '@lumino/widgets';
9
+ import { ISettingRegistry } from '@jupyterlab/settingregistry';
9
10
  import { logoMiniIcon, logoMiniIconQGZ, requestAPI } from '@jupytergis/base';
10
11
  import { JupyterGISDocumentWidgetFactory } from '@jupytergis/jupytergis-core';
11
12
  import { QGSModelFactory, QGZModelFactory } from './modelfactory';
@@ -16,7 +17,7 @@ var CommandIDs;
16
17
  (function (CommandIDs) {
17
18
  CommandIDs.exportQgis = 'jupytergis:export';
18
19
  })(CommandIDs || (CommandIDs = {}));
19
- const activate = async (app, tracker, themeManager, drive, externalCommandRegistry, contentFactory, editorServices, rendermime, consoleTracker, annotationModel, commandPalette) => {
20
+ const activate = async (app, tracker, themeManager, drive, externalCommandRegistry, contentFactory, editorServices, rendermime, consoleTracker, annotationModel, settingRegistry, commandPalette) => {
20
21
  const fcCheck = await requestAPI('jupytergis_qgis/backend-check', {
21
22
  method: 'POST',
22
23
  body: JSON.stringify({})
@@ -62,8 +63,8 @@ const activate = async (app, tracker, themeManager, drive, externalCommandRegist
62
63
  app.docRegistry.addWidgetFactory(QGSWidgetFactory);
63
64
  app.docRegistry.addWidgetFactory(QGZWidgetFactory);
64
65
  // Creating and registering the model factory for our custom DocumentModel
65
- app.docRegistry.addModelFactory(new QGSModelFactory({ annotationModel }));
66
- app.docRegistry.addModelFactory(new QGZModelFactory({ annotationModel }));
66
+ app.docRegistry.addModelFactory(new QGSModelFactory({ annotationModel, settingRegistry }));
67
+ app.docRegistry.addModelFactory(new QGZModelFactory({ annotationModel, settingRegistry }));
67
68
  // register the filetype
68
69
  app.docRegistry.addFileType({
69
70
  name: 'QGS',
@@ -211,7 +212,8 @@ export const qgisplugin = {
211
212
  IEditorServices,
212
213
  IRenderMimeRegistry,
213
214
  IConsoleTracker,
214
- IAnnotationToken
215
+ IAnnotationToken,
216
+ ISettingRegistry
215
217
  ],
216
218
  optional: [ICommandPalette],
217
219
  autoStart: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupytergis/jupytergis-qgis",
3
- "version": "0.4.4",
3
+ "version": "0.5.0",
4
4
  "description": "JupyterGIS QGIS extension.",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -54,9 +54,9 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "@jupyter/collaborative-drive": "^3.0.0",
57
- "@jupytergis/base": "^0.4.4",
58
- "@jupytergis/jupytergis-core": "^0.4.4",
59
- "@jupytergis/schema": "^0.4.4",
57
+ "@jupytergis/base": "^0.5.0",
58
+ "@jupytergis/jupytergis-core": "^0.5.0",
59
+ "@jupytergis/schema": "^0.5.0",
60
60
  "@jupyterlab/application": "^4.3.0",
61
61
  "@jupyterlab/apputils": "^4.3.0",
62
62
  "@jupyterlab/coreutils": "^6.3.0",