@jupytergis/jupytergis-qgis 0.3.0 → 0.4.1
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/plugins.js +7 -7
- package/package.json +4 -4
package/lib/plugins.js
CHANGED
|
@@ -7,7 +7,7 @@ import { PathExt } from '@jupyterlab/coreutils';
|
|
|
7
7
|
import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
|
|
8
8
|
import { Widget } from '@lumino/widgets';
|
|
9
9
|
import { logoMiniIcon, logoMiniIconQGZ, requestAPI } from '@jupytergis/base';
|
|
10
|
-
import {
|
|
10
|
+
import { JupyterGISDocumentWidgetFactory } from '@jupytergis/jupytergis-core';
|
|
11
11
|
import { IJupyterGISDocTracker } from '@jupytergis/schema';
|
|
12
12
|
import { QGSModelFactory, QGZModelFactory } from './modelfactory';
|
|
13
13
|
/**
|
|
@@ -29,7 +29,7 @@ const activate = async (app, tracker, themeManager, drive, externalCommandRegist
|
|
|
29
29
|
}
|
|
30
30
|
return installed;
|
|
31
31
|
};
|
|
32
|
-
const QGSWidgetFactory = new
|
|
32
|
+
const QGSWidgetFactory = new JupyterGISDocumentWidgetFactory({
|
|
33
33
|
name: 'JupyterGIS QGS Factory',
|
|
34
34
|
modelName: 'jupytergis-qgsmodel',
|
|
35
35
|
fileTypes: ['QGS'],
|
|
@@ -44,7 +44,7 @@ const activate = async (app, tracker, themeManager, drive, externalCommandRegist
|
|
|
44
44
|
mimeTypeService: editorServices.mimeTypeService,
|
|
45
45
|
consoleTracker
|
|
46
46
|
});
|
|
47
|
-
const QGZWidgetFactory = new
|
|
47
|
+
const QGZWidgetFactory = new JupyterGISDocumentWidgetFactory({
|
|
48
48
|
name: 'JupyterGIS QGZ Factory',
|
|
49
49
|
modelName: 'jupytergis-qgzmodel',
|
|
50
50
|
fileTypes: ['QGZ'],
|
|
@@ -95,7 +95,7 @@ const activate = async (app, tracker, themeManager, drive, externalCommandRegist
|
|
|
95
95
|
widget.context.pathChanged.connect(() => {
|
|
96
96
|
tracker.save(widget);
|
|
97
97
|
});
|
|
98
|
-
themeManager.themeChanged.connect((_, changes) => widget.
|
|
98
|
+
themeManager.themeChanged.connect((_, changes) => widget.model.themeChanged.emit(changes));
|
|
99
99
|
tracker.add(widget);
|
|
100
100
|
app.shell.activateById('jupytergis::leftControlPanel');
|
|
101
101
|
app.shell.activateById('jupytergis::rightControlPanel');
|
|
@@ -112,17 +112,17 @@ const activate = async (app, tracker, themeManager, drive, externalCommandRegist
|
|
|
112
112
|
app.commands.addCommand(CommandIDs.exportQgis, {
|
|
113
113
|
label: 'Export To QGZ',
|
|
114
114
|
isEnabled: () => tracker.currentWidget
|
|
115
|
-
? tracker.currentWidget.
|
|
115
|
+
? tracker.currentWidget.model.sharedModel.editable
|
|
116
116
|
: false,
|
|
117
117
|
execute: async (args) => {
|
|
118
118
|
var _a, _b;
|
|
119
119
|
const sourceExtension = '.jGIS';
|
|
120
120
|
const extension = '.qgz';
|
|
121
|
-
const model = (_a = tracker.currentWidget) === null || _a === void 0 ? void 0 : _a.
|
|
121
|
+
const model = (_a = tracker.currentWidget) === null || _a === void 0 ? void 0 : _a.model.sharedModel;
|
|
122
122
|
if (!model) {
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
|
-
const sourcePath = tracker.currentWidget.
|
|
125
|
+
const sourcePath = tracker.currentWidget.model.filePath;
|
|
126
126
|
let filepath = (_b = args.filepath) !== null && _b !== void 0 ? _b : null;
|
|
127
127
|
if (!filepath) {
|
|
128
128
|
filepath = (await InputDialog.getText({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupytergis/jupytergis-qgis",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
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.
|
|
58
|
-
"@jupytergis/jupytergis-core": "^0.
|
|
59
|
-
"@jupytergis/schema": "^0.
|
|
57
|
+
"@jupytergis/base": "^0.4.1",
|
|
58
|
+
"@jupytergis/jupytergis-core": "^0.4.1",
|
|
59
|
+
"@jupytergis/schema": "^0.4.1",
|
|
60
60
|
"@jupyterlab/application": "^4.3.0",
|
|
61
61
|
"@jupyterlab/apputils": "^4.3.0",
|
|
62
62
|
"@jupyterlab/coreutils": "^6.3.0",
|