@jupytergis/jupytergis-core 0.6.2 → 0.7.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/factory.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  import { ICollaborativeDrive } from '@jupyter/collaborative-drive';
2
2
  import { JupyterGISDocumentWidget } from '@jupytergis/base';
3
- import { JupyterGISModel, IJupyterGISTracker, IJGISExternalCommandRegistry } from '@jupytergis/schema';
3
+ import { JupyterGISModel, IJupyterGISTracker, IJGISExternalCommandRegistry, IJGISFormSchemaRegistry, IAnnotationModel } from '@jupytergis/schema';
4
4
  import { IEditorMimeTypeService } from '@jupyterlab/codeeditor';
5
5
  import { ConsolePanel, IConsoleTracker } from '@jupyterlab/console';
6
6
  import { ABCWidgetFactory, DocumentRegistry } from '@jupyterlab/docregistry';
7
7
  import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
8
8
  import { ServiceManager } from '@jupyterlab/services';
9
+ import { IStateDB } from '@jupyterlab/statedb';
9
10
  import { CommandRegistry } from '@lumino/commands';
10
11
  interface IOptions extends DocumentRegistry.IWidgetFactoryOptions {
11
12
  tracker: IJupyterGISTracker;
@@ -18,6 +19,9 @@ interface IOptions extends DocumentRegistry.IWidgetFactoryOptions {
18
19
  consoleTracker?: IConsoleTracker;
19
20
  backendCheck?: () => boolean;
20
21
  drive?: ICollaborativeDrive | null;
22
+ formSchemaRegistry: IJGISFormSchemaRegistry;
23
+ state: IStateDB;
24
+ annotationModel: IAnnotationModel;
21
25
  }
22
26
  export declare class JupyterGISDocumentWidgetFactory extends ABCWidgetFactory<JupyterGISDocumentWidget, JupyterGISModel> {
23
27
  private options;
package/lib/factory.js CHANGED
@@ -51,12 +51,19 @@ export class JupyterGISDocumentWidgetFactory extends ABCWidgetFactory {
51
51
  rendermime: this.options.rendermime,
52
52
  consoleTracker: this.options.consoleTracker,
53
53
  commandRegistry: this.options.commands,
54
+ state: this.options.state,
55
+ formSchemaRegistry: this.options.formSchemaRegistry,
56
+ annotationModel: this.options.annotationModel,
54
57
  });
55
58
  const toolbar = new ToolbarWidget({
56
59
  commands: this._commands,
57
60
  model,
58
61
  externalCommands: this._externalCommandRegistry.getCommands(),
59
62
  });
60
- return new JupyterGISDocumentWidget({ context, content, toolbar });
63
+ return new JupyterGISDocumentWidget({
64
+ context,
65
+ content,
66
+ toolbar,
67
+ });
61
68
  }
62
69
  }
@@ -1,6 +1,6 @@
1
1
  import { ICollaborativeDrive, } from '@jupyter/collaborative-drive';
2
2
  import { CommandIDs, logoIcon, logoMiniIcon } from '@jupytergis/base';
3
- import { IAnnotationToken, IJGISExternalCommandRegistryToken, IJupyterGISDocTracker, JupyterGISDoc, SCHEMA_VERSION, ProcessingMerge, } from '@jupytergis/schema';
3
+ import { IAnnotationToken, IJGISExternalCommandRegistryToken, IJupyterGISDocTracker, JupyterGISDoc, SCHEMA_VERSION, ProcessingMerge, IJGISFormSchemaRegistryToken, } from '@jupytergis/schema';
4
4
  import { ICommandPalette, IThemeManager, } from '@jupyterlab/apputils';
5
5
  import { IEditorServices } from '@jupyterlab/codeeditor';
6
6
  import { ConsolePanel, IConsoleTracker } from '@jupyterlab/console';
@@ -10,6 +10,7 @@ import { IFileBrowserFactory } from '@jupyterlab/filebrowser';
10
10
  import { ILauncher } from '@jupyterlab/launcher';
11
11
  import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
12
12
  import { ISettingRegistry } from '@jupyterlab/settingregistry';
13
+ import { IStateDB } from '@jupyterlab/statedb';
13
14
  import { JupyterGISDocumentWidgetFactory } from '../factory';
14
15
  import { JupyterGISModelFactory } from './modelfactory';
15
16
  const FACTORY = 'JupyterGIS .jgis Viewer';
@@ -17,7 +18,8 @@ const CONTENT_TYPE = 'jgis';
17
18
  const PALETTE_CATEGORY = 'JupyterGIS';
18
19
  const MODEL_NAME = 'jupytergis-jgismodel';
19
20
  const SETTINGS_ID = '@jupytergis/jupytergis-core:jupytergis-settings';
20
- const activate = async (app, tracker, themeManager, browserFactory, externalCommandRegistry, contentFactory, editorServices, rendermime, consoleTracker, annotationModel, settingRegistry, launcher, palette, drive) => {
21
+ const activate = async (app, tracker, themeManager, browserFactory, externalCommandRegistry, contentFactory, editorServices, rendermime, consoleTracker, annotationModel, settingRegistry, formSchemaRegistry, state, launcher, palette, drive) => {
22
+ formSchemaRegistry && state;
21
23
  if (PageConfig.getOption('jgis_expose_maps')) {
22
24
  window.jupytergisMaps = {};
23
25
  }
@@ -41,7 +43,10 @@ const activate = async (app, tracker, themeManager, browserFactory, externalComm
41
43
  contentFactory,
42
44
  rendermime,
43
45
  mimeTypeService: editorServices.mimeTypeService,
46
+ formSchemaRegistry: formSchemaRegistry,
44
47
  consoleTracker,
48
+ state: state,
49
+ annotationModel: annotationModel,
45
50
  });
46
51
  // Registering the widget factory
47
52
  app.docRegistry.addWidgetFactory(widgetFactory);
@@ -190,6 +195,8 @@ const jGISPlugin = {
190
195
  IConsoleTracker,
191
196
  IAnnotationToken,
192
197
  ISettingRegistry,
198
+ IJGISFormSchemaRegistryToken,
199
+ IStateDB,
193
200
  ],
194
201
  optional: [ILauncher, ICommandPalette, ICollaborativeDrive],
195
202
  autoStart: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupytergis/jupytergis-core",
3
- "version": "0.6.2",
3
+ "version": "0.7.0",
4
4
  "description": "JupyterGIS core extension",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -54,8 +54,8 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "@jupyter/collaborative-drive": "^3.0.0",
57
- "@jupytergis/base": "^0.6.2",
58
- "@jupytergis/schema": "^0.6.2",
57
+ "@jupytergis/base": "^0.7.0",
58
+ "@jupytergis/schema": "^0.7.0",
59
59
  "@jupyterlab/application": "^4.3.0",
60
60
  "@jupyterlab/apputils": "^4.3.0",
61
61
  "@jupyterlab/docregistry": "^4.3.0",