@jupytergis/base 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/annotations/components/Annotation.js +1 -1
- package/lib/annotations/model.d.ts +6 -7
- package/lib/annotations/model.js +15 -15
- package/lib/commands.d.ts +2 -3
- package/lib/commands.js +117 -62
- package/lib/constants.d.ts +2 -0
- package/lib/constants.js +4 -1
- package/lib/dialogs/formdialog.js +2 -2
- package/lib/dialogs/layerBrowserDialog.d.ts +4 -5
- package/lib/dialogs/layerBrowserDialog.js +9 -9
- package/lib/dialogs/symbology/hooks/useGetBandInfo.d.ts +3 -8
- package/lib/dialogs/symbology/hooks/useGetBandInfo.js +16 -28
- package/lib/dialogs/symbology/hooks/useGetProperties.d.ts +1 -1
- package/lib/dialogs/symbology/hooks/useGetProperties.js +6 -8
- package/lib/dialogs/symbology/symbologyDialog.d.ts +2 -3
- package/lib/dialogs/symbology/symbologyDialog.js +10 -9
- package/lib/dialogs/symbology/tiff_layer/TiffRendering.d.ts +1 -1
- package/lib/dialogs/symbology/tiff_layer/TiffRendering.js +6 -6
- package/lib/dialogs/symbology/tiff_layer/components/BandRow.js +3 -1
- package/lib/dialogs/symbology/tiff_layer/types/MultibandColor.d.ts +1 -1
- package/lib/dialogs/symbology/tiff_layer/types/MultibandColor.js +5 -4
- package/lib/dialogs/symbology/tiff_layer/types/SingleBandPseudoColor.d.ts +1 -1
- package/lib/dialogs/symbology/tiff_layer/types/SingleBandPseudoColor.js +8 -7
- package/lib/dialogs/symbology/vector_layer/VectorRendering.d.ts +1 -1
- package/lib/dialogs/symbology/vector_layer/VectorRendering.js +18 -13
- package/lib/dialogs/symbology/vector_layer/types/Categorized.d.ts +1 -1
- package/lib/dialogs/symbology/vector_layer/types/Categorized.js +30 -19
- package/lib/dialogs/symbology/vector_layer/types/Graduated.d.ts +1 -1
- package/lib/dialogs/symbology/vector_layer/types/Graduated.js +16 -13
- package/lib/dialogs/symbology/vector_layer/types/Heatmap.d.ts +4 -0
- package/lib/dialogs/symbology/vector_layer/types/Heatmap.js +77 -0
- package/lib/dialogs/symbology/vector_layer/types/SimpleSymbol.d.ts +1 -1
- package/lib/dialogs/symbology/vector_layer/types/SimpleSymbol.js +4 -3
- package/lib/formbuilder/creationform.d.ts +1 -2
- package/lib/formbuilder/creationform.js +4 -4
- package/lib/formbuilder/editform.d.ts +1 -2
- package/lib/formbuilder/editform.js +7 -7
- package/lib/formbuilder/formselectors.js +5 -2
- package/lib/formbuilder/objectform/baseform.d.ts +3 -4
- package/lib/formbuilder/objectform/baseform.js +2 -2
- package/lib/formbuilder/objectform/fileselectorwidget.js +13 -6
- package/lib/formbuilder/objectform/geotiffsource.d.ts +5 -1
- package/lib/formbuilder/objectform/geotiffsource.js +51 -18
- package/lib/formbuilder/objectform/heatmapLayerForm.d.ts +11 -0
- package/lib/formbuilder/objectform/heatmapLayerForm.js +60 -0
- package/lib/formbuilder/objectform/vectorlayerform.d.ts +0 -2
- package/lib/formbuilder/objectform/vectorlayerform.js +0 -59
- package/lib/mainview/TemporalSlider.d.ts +8 -0
- package/lib/mainview/TemporalSlider.js +303 -0
- package/lib/mainview/mainView.d.ts +26 -5
- package/lib/mainview/mainView.js +221 -108
- package/lib/mainview/mainviewmodel.d.ts +4 -0
- package/lib/mainview/mainviewmodel.js +4 -0
- package/lib/mainview/mainviewwidget.d.ts +0 -2
- package/lib/mainview/mainviewwidget.js +0 -2
- package/lib/panelview/annotationPanel.js +5 -5
- package/lib/panelview/components/filter-panel/Filter.js +4 -25
- package/lib/panelview/components/identify-panel/IdentifyPanel.js +1 -1
- package/lib/panelview/components/layers.js +2 -2
- package/lib/panelview/components/sources.js +1 -1
- package/lib/panelview/leftpanel.d.ts +3 -0
- package/lib/panelview/leftpanel.js +5 -1
- package/lib/panelview/model.js +8 -8
- package/lib/panelview/objectproperties.js +10 -10
- package/lib/panelview/rightpanel.d.ts +1 -1
- package/lib/panelview/rightpanel.js +10 -10
- package/lib/toolbar/widget.d.ts +1 -1
- package/lib/toolbar/widget.js +44 -32
- package/lib/tools.d.ts +6 -16
- package/lib/tools.js +54 -56
- package/lib/types.d.ts +2 -0
- package/lib/widget.d.ts +30 -6
- package/lib/widget.js +43 -9
- package/package.json +4 -3
- package/style/base.css +10 -0
- package/style/symbologyDialog.css +7 -1
- package/style/temporalSlider.css +47 -0
|
@@ -13,7 +13,7 @@ const Annotation = ({ itemId, annotationModel, rightPanelModel, children }) => {
|
|
|
13
13
|
* Update the model when it changes.
|
|
14
14
|
*/
|
|
15
15
|
rightPanelModel === null || rightPanelModel === void 0 ? void 0 : rightPanelModel.documentChanged.connect((_, widget) => {
|
|
16
|
-
setJgisModel(widget === null || widget === void 0 ? void 0 : widget.
|
|
16
|
+
setJgisModel(widget === null || widget === void 0 ? void 0 : widget.model);
|
|
17
17
|
});
|
|
18
18
|
const handleSubmit = () => {
|
|
19
19
|
annotationModel.addContent(itemId, messageContent);
|
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
import { IAnnotation, IAnnotationModel, IJupyterGISModel } from '@jupytergis/schema';
|
|
2
|
-
import { DocumentRegistry } from '@jupyterlab/docregistry';
|
|
3
2
|
import { User } from '@jupyterlab/services';
|
|
4
3
|
import { ISignal } from '@lumino/signaling';
|
|
5
4
|
export declare class AnnotationModel implements IAnnotationModel {
|
|
6
5
|
constructor(options: AnnotationModel.IOptions);
|
|
7
6
|
get updateSignal(): ISignal<this, null>;
|
|
8
7
|
get user(): User.IIdentity | undefined;
|
|
9
|
-
set
|
|
10
|
-
get
|
|
11
|
-
get
|
|
8
|
+
set model(model: IJupyterGISModel | undefined);
|
|
9
|
+
get model(): IJupyterGISModel | undefined;
|
|
10
|
+
get modelChanged(): ISignal<this, void>;
|
|
12
11
|
update(): void;
|
|
13
12
|
getAnnotation(id: string): IAnnotation | undefined;
|
|
14
13
|
getAnnotationIds(): string[];
|
|
15
14
|
addAnnotation(key: string, value: IAnnotation): void;
|
|
16
15
|
removeAnnotation(key: string): void;
|
|
17
16
|
addContent(id: string, value: string): void;
|
|
18
|
-
private
|
|
19
|
-
private
|
|
17
|
+
private _model;
|
|
18
|
+
private _modelChanged;
|
|
20
19
|
private _updateSignal;
|
|
21
20
|
private _user?;
|
|
22
21
|
}
|
|
23
22
|
declare namespace AnnotationModel {
|
|
24
23
|
interface IOptions {
|
|
25
|
-
|
|
24
|
+
model: IJupyterGISModel | undefined;
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
27
|
export {};
|
package/lib/annotations/model.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Signal } from '@lumino/signaling';
|
|
2
2
|
export class AnnotationModel {
|
|
3
3
|
constructor(options) {
|
|
4
|
-
this.
|
|
4
|
+
this._modelChanged = new Signal(this);
|
|
5
5
|
this._updateSignal = new Signal(this);
|
|
6
|
-
this.
|
|
6
|
+
this.model = options.model;
|
|
7
7
|
}
|
|
8
8
|
get updateSignal() {
|
|
9
9
|
return this._updateSignal;
|
|
@@ -11,25 +11,25 @@ export class AnnotationModel {
|
|
|
11
11
|
get user() {
|
|
12
12
|
return this._user;
|
|
13
13
|
}
|
|
14
|
-
set
|
|
14
|
+
set model(model) {
|
|
15
15
|
var _a;
|
|
16
|
-
this.
|
|
17
|
-
const state = (_a = this.
|
|
16
|
+
this._model = model;
|
|
17
|
+
const state = (_a = this._model) === null || _a === void 0 ? void 0 : _a.sharedModel.awareness.getLocalState();
|
|
18
18
|
this._user = state === null || state === void 0 ? void 0 : state.user;
|
|
19
|
-
this.
|
|
19
|
+
this._modelChanged.emit(void 0);
|
|
20
20
|
}
|
|
21
|
-
get
|
|
22
|
-
return this.
|
|
21
|
+
get model() {
|
|
22
|
+
return this._model;
|
|
23
23
|
}
|
|
24
|
-
get
|
|
25
|
-
return this.
|
|
24
|
+
get modelChanged() {
|
|
25
|
+
return this._modelChanged;
|
|
26
26
|
}
|
|
27
27
|
update() {
|
|
28
28
|
this._updateSignal.emit(null);
|
|
29
29
|
}
|
|
30
30
|
getAnnotation(id) {
|
|
31
31
|
var _a;
|
|
32
|
-
const rawData = (_a = this.
|
|
32
|
+
const rawData = (_a = this._model) === null || _a === void 0 ? void 0 : _a.sharedModel.getMetadata(id);
|
|
33
33
|
if (rawData) {
|
|
34
34
|
return JSON.parse(rawData);
|
|
35
35
|
}
|
|
@@ -37,7 +37,7 @@ export class AnnotationModel {
|
|
|
37
37
|
getAnnotationIds() {
|
|
38
38
|
var _a;
|
|
39
39
|
const annotationIds = [];
|
|
40
|
-
for (const id in (_a = this.
|
|
40
|
+
for (const id in (_a = this._model) === null || _a === void 0 ? void 0 : _a.sharedModel.metadata) {
|
|
41
41
|
if (id.startsWith('annotation')) {
|
|
42
42
|
annotationIds.push(id);
|
|
43
43
|
}
|
|
@@ -46,11 +46,11 @@ export class AnnotationModel {
|
|
|
46
46
|
}
|
|
47
47
|
addAnnotation(key, value) {
|
|
48
48
|
var _a;
|
|
49
|
-
(_a = this.
|
|
49
|
+
(_a = this._model) === null || _a === void 0 ? void 0 : _a.sharedModel.setMetadata(`annotation_${key}`, JSON.stringify(value));
|
|
50
50
|
}
|
|
51
51
|
removeAnnotation(key) {
|
|
52
52
|
var _a;
|
|
53
|
-
(_a = this.
|
|
53
|
+
(_a = this._model) === null || _a === void 0 ? void 0 : _a.removeMetadata(key);
|
|
54
54
|
}
|
|
55
55
|
addContent(id, value) {
|
|
56
56
|
var _a;
|
|
@@ -61,7 +61,7 @@ export class AnnotationModel {
|
|
|
61
61
|
const currentAnnotation = this.getAnnotation(id);
|
|
62
62
|
if (currentAnnotation) {
|
|
63
63
|
const newAnnotation = Object.assign(Object.assign({}, currentAnnotation), { contents: [...currentAnnotation.contents, newContent] });
|
|
64
|
-
(_a = this.
|
|
64
|
+
(_a = this._model) === null || _a === void 0 ? void 0 : _a.sharedModel.setMetadata(id, JSON.stringify(newAnnotation));
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
}
|
package/lib/commands.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { IJGISFormSchemaRegistry, IJGISLayerBrowserRegistry } from '@jupytergis/schema';
|
|
2
2
|
import { JupyterFrontEnd } from '@jupyterlab/application';
|
|
3
|
-
import { WidgetTracker } from '@jupyterlab/apputils';
|
|
4
3
|
import { ICompletionProviderManager } from '@jupyterlab/completer';
|
|
5
4
|
import { IStateDB } from '@jupyterlab/statedb';
|
|
6
5
|
import { ITranslator } from '@jupyterlab/translation';
|
|
7
|
-
import {
|
|
6
|
+
import { JupyterGISTracker } from './types';
|
|
8
7
|
/**
|
|
9
8
|
* Add the commands to the application's command registry.
|
|
10
9
|
*/
|
|
11
|
-
export declare function addCommands(app: JupyterFrontEnd, tracker:
|
|
10
|
+
export declare function addCommands(app: JupyterFrontEnd, tracker: JupyterGISTracker, translator: ITranslator, formSchemaRegistry: IJGISFormSchemaRegistry, layerBrowserRegistry: IJGISLayerBrowserRegistry, state: IStateDB, completionProviderManager: ICompletionProviderManager | undefined): void;
|