@jupytergis/base 0.6.2 → 0.8.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 (60) hide show
  1. package/lib/annotations/components/Annotation.d.ts +2 -3
  2. package/lib/annotations/components/Annotation.js +2 -9
  3. package/lib/commands/BaseCommandIDs.d.ts +1 -0
  4. package/lib/commands/BaseCommandIDs.js +1 -0
  5. package/lib/commands/index.js +15 -0
  6. package/lib/constants.js +1 -0
  7. package/lib/dialogs/symbology/components/color_ramp/ColorRamp.js +1 -1
  8. package/lib/dialogs/symbology/hooks/useGetProperties.js +53 -19
  9. package/lib/dialogs/symbology/vector_layer/VectorRendering.js +3 -3
  10. package/lib/dialogs/symbology/vector_layer/types/Graduated.js +4 -2
  11. package/lib/dialogs/symbology/vector_layer/types/Heatmap.js +2 -2
  12. package/lib/formbuilder/formselectors.js +3 -0
  13. package/lib/formbuilder/objectform/source/geojsonsource.d.ts +3 -1
  14. package/lib/formbuilder/objectform/source/geojsonsource.js +20 -4
  15. package/lib/index.d.ts +1 -1
  16. package/lib/index.js +1 -1
  17. package/lib/keybindings.json +2 -2
  18. package/lib/mainview/mainView.d.ts +8 -1
  19. package/lib/mainview/mainView.js +33 -4
  20. package/lib/mainview/mainviewwidget.d.ts +11 -4
  21. package/lib/mainview/mainviewwidget.js +3 -2
  22. package/lib/menus.js +4 -0
  23. package/lib/panelview/annotationPanel.d.ts +3 -17
  24. package/lib/panelview/annotationPanel.js +5 -22
  25. package/lib/panelview/components/filter-panel/Filter.d.ts +2 -19
  26. package/lib/panelview/components/filter-panel/Filter.js +26 -59
  27. package/lib/panelview/components/identify-panel/IdentifyPanel.d.ts +6 -14
  28. package/lib/panelview/components/identify-panel/IdentifyPanel.js +14 -52
  29. package/lib/panelview/components/layers.d.ts +10 -12
  30. package/lib/panelview/components/layers.js +109 -79
  31. package/lib/panelview/index.d.ts +0 -1
  32. package/lib/panelview/index.js +0 -1
  33. package/lib/panelview/leftpanel.d.ts +8 -47
  34. package/lib/panelview/leftpanel.js +32 -154
  35. package/lib/panelview/objectproperties.d.ts +20 -15
  36. package/lib/panelview/objectproperties.js +12 -34
  37. package/lib/panelview/rightpanel.d.ts +8 -22
  38. package/lib/panelview/rightpanel.js +32 -77
  39. package/lib/shared/components/Tabs.d.ts +7 -1
  40. package/lib/shared/components/Tabs.js +6 -1
  41. package/lib/stacBrowser/components/{StacPanelView.d.ts → StacPanel.d.ts} +2 -2
  42. package/lib/stacBrowser/components/{StacPanelView.js → StacPanel.js} +3 -3
  43. package/lib/stacBrowser/index.d.ts +1 -1
  44. package/lib/stacBrowser/index.js +1 -1
  45. package/lib/tools.js +26 -0
  46. package/lib/types.d.ts +1 -9
  47. package/lib/widget.d.ts +8 -3
  48. package/lib/widget.js +8 -4
  49. package/package.json +4 -2
  50. package/style/base.css +18 -2
  51. package/style/shared/tabs.css +16 -2
  52. package/style/stacBrowser.css +0 -6
  53. package/style/tabPanel.css +91 -0
  54. package/style/temporalSlider.css +1 -0
  55. package/lib/panelview/model.d.ts +0 -19
  56. package/lib/panelview/model.js +0 -30
  57. package/lib/stacBrowser/StacBrowser.d.ts +0 -7
  58. package/lib/stacBrowser/StacBrowser.js +0 -16
  59. package/lib/stacBrowser/StacPanel.d.ts +0 -14
  60. package/lib/stacBrowser/StacPanel.js +0 -16
package/lib/widget.js CHANGED
@@ -65,12 +65,13 @@ export class JupyterGISOutputWidget extends MainAreaWidget {
65
65
  }
66
66
  }
67
67
  export class JupyterGISPanel extends SplitPanel {
68
- constructor(options) {
68
+ constructor(_a) {
69
+ var { model, consoleTracker, state, commandRegistry, formSchemaRegistry, annotationModel } = _a, consoleOption = __rest(_a, ["model", "consoleTracker", "state", "commandRegistry", "formSchemaRegistry", "annotationModel"]);
69
70
  super({ orientation: 'vertical', spacing: 0 });
70
71
  this._consoleOpened = false;
71
- const { model, consoleTracker, commandRegistry } = options, consoleOption = __rest(options, ["model", "consoleTracker", "commandRegistry"]);
72
+ this._state = state;
72
73
  this._initModel({ model, commandRegistry });
73
- this._initView();
74
+ this._initView(formSchemaRegistry, annotationModel);
74
75
  this._consoleOption = Object.assign({ commandRegistry }, consoleOption);
75
76
  this._consoleTracker = consoleTracker;
76
77
  }
@@ -82,9 +83,12 @@ export class JupyterGISPanel extends SplitPanel {
82
83
  commands: options.commandRegistry,
83
84
  });
84
85
  }
85
- _initView() {
86
+ _initView(formSchemaRegistry, annotationModel) {
86
87
  this._jupyterGISMainViewPanel = new JupyterGISMainViewPanel({
87
88
  mainViewModel: this._mainViewModel,
89
+ state: this._state,
90
+ formSchemaRegistry: formSchemaRegistry,
91
+ annotationModel: annotationModel,
88
92
  });
89
93
  this.addWidget(this._jupyterGISMainViewPanel);
90
94
  SplitPanel.setStretch(this._jupyterGISMainViewPanel, 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupytergis/base",
3
- "version": "0.6.2",
3
+ "version": "0.8.0",
4
4
  "description": "A JupyterLab extension for 3D modelling.",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -44,7 +44,7 @@
44
44
  "@jupyter/collaboration": "^3.1.0",
45
45
  "@jupyter/react-components": "^0.16.6",
46
46
  "@jupyter/ydoc": "^2.0.0 || ^3.0.0",
47
- "@jupytergis/schema": "^0.6.2",
47
+ "@jupytergis/schema": "^0.8.0",
48
48
  "@jupyterlab/application": "^4.3.0",
49
49
  "@jupyterlab/apputils": "^4.3.0",
50
50
  "@jupyterlab/completer": "^4.3.0",
@@ -80,7 +80,9 @@
80
80
  "date-fns": "^4.1.0",
81
81
  "gdal3.js": "^2.8.1",
82
82
  "geojson-vt": "^4.0.2",
83
+ "geoparquet": "^0.3.0",
83
84
  "geotiff": "^2.1.3",
85
+ "hyparquet-compressors": "^1.1.1",
84
86
  "lucide-react": "^0.513.0",
85
87
  "ol": "^10.1.0",
86
88
  "ol-pmtiles": "^0.5.0",
package/style/base.css CHANGED
@@ -10,7 +10,7 @@
10
10
  @import url('./symbologyDialog.css');
11
11
  @import url('./statusBar.css');
12
12
  @import url('./temporalSlider.css');
13
- @import url('./stacBrowser.css');
13
+ @import url('./tabPanel.css');
14
14
  @import url('ol/ol.css');
15
15
  @import url('./shared/button.css');
16
16
  @import url('./shared/toggle.css');
@@ -34,7 +34,7 @@
34
34
  /* Overwrite forms CSS */
35
35
  .jGIS-property-panel .array-item-list {
36
36
  display: flex;
37
- gap: 1rem;
37
+ background-color: var(--jp-layout-color0);
38
38
  }
39
39
 
40
40
  .jGIS-property-panel .rjsf .array-item:not(:last-child) {
@@ -85,3 +85,19 @@ button.jp-mod-styled.jp-mod-reject {
85
85
  white-space: nowrap;
86
86
  border-width: 0;
87
87
  }
88
+
89
+ .jgis-right-panel-container {
90
+ width: 330px;
91
+ top: 30px;
92
+ right: 0px;
93
+ position: absolute;
94
+ margin: 5px;
95
+ }
96
+
97
+ .jgis-left-panel-container {
98
+ position: absolute;
99
+ width: 250px;
100
+ top: 30px;
101
+ left: 0px;
102
+ margin: 5px;
103
+ }
@@ -1,14 +1,26 @@
1
+ .jgis-panel-tabs {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 1rem;
5
+ justify-content: center;
6
+ align-items: center;
7
+ background-color: var(--jp-layout-color0);
8
+ box-shadow:
9
+ 0 4px 8px 0 rgba(0, 0, 0, 0.2),
10
+ 0 6px 20px 0 rgba(0, 0, 0, 0.19);
11
+ border-radius: 5px;
12
+ }
1
13
  .jgis-tabs-list {
2
14
  display: inline-flex;
3
15
  height: 2.5rem;
4
16
  align-items: center;
5
17
  justify-content: space-evenly;
6
- border-radius: 0.375rem;
7
18
  background-color: var(--jp-layout-color2);
8
- padding: 0.25rem;
9
19
  color: var(--jp-ui-font-color0);
10
20
  gap: 1rem;
11
21
  width: 100%;
22
+ font-size: 9px;
23
+ border-radius: 5px;
12
24
  }
13
25
 
14
26
  .jgis-tabs-trigger {
@@ -47,6 +59,8 @@
47
59
  .jgis-tabs-content {
48
60
  outline: none;
49
61
  width: 100%;
62
+ overflow-y: scroll;
63
+ max-height: 480px;
50
64
  }
51
65
 
52
66
  .jgis-tabs-content:focus-visible {
@@ -1,9 +1,3 @@
1
- .jgis-stac-browser-main {
2
- display: flex;
3
- flex-direction: column;
4
- gap: 1rem;
5
- }
6
-
7
1
  .jgis-stac-browser-collection {
8
2
  flex-wrap: wrap;
9
3
  margin-top: 0.5rem;
@@ -0,0 +1,91 @@
1
+ .jgis-panel-tab-content {
2
+ border-radius: 5px;
3
+ font-size: 10px;
4
+ padding-bottom: 50px;
5
+ }
6
+
7
+ .jgis-stac-browser-collection {
8
+ flex-wrap: wrap;
9
+ margin-top: 0.5rem;
10
+ }
11
+
12
+ .jgis-stac-browser-section-item {
13
+ border-radius: 1rem !important;
14
+ cursor: pointer;
15
+ }
16
+
17
+ .jgis-stac-browser-results-item {
18
+ border-radius: 1rem !important;
19
+ cursor: pointer;
20
+ white-space: normal !important;
21
+ height: auto !important;
22
+ }
23
+
24
+ .jgis-stac-browser-results-list {
25
+ display: flex;
26
+ flex-direction: column;
27
+ gap: 1rem;
28
+ word-break: break-word;
29
+ padding: 0.25rem;
30
+ margin-right: 0.5rem;
31
+ }
32
+
33
+ .jgis-stac-browser-date-picker {
34
+ display: flex;
35
+ justify-content: space-around;
36
+ flex-wrap: wrap;
37
+ gap: 0.5rem;
38
+ }
39
+
40
+ .jgis-stac-browser-filters-panel {
41
+ display: flex;
42
+ flex-direction: column;
43
+ gap: 0.5rem;
44
+ align-items: flex-start;
45
+ padding: 0 0.5rem;
46
+ }
47
+
48
+ .jgis-stac-filter-trigger {
49
+ max-width: fit-content;
50
+ border: 1px solid var(--jp-border-color0);
51
+ padding: 0.5rem;
52
+ cursor: pointer;
53
+ font-weight: bold;
54
+ display: flex;
55
+ align-items: center;
56
+ gap: 0.15rem;
57
+ }
58
+
59
+ .jgis-stac-filter-trigger:disabled {
60
+ cursor: not-allowed;
61
+ }
62
+
63
+ .jgis-stac-filter-section-container {
64
+ display: flex;
65
+ flex-direction: column;
66
+ gap: 0.25rem;
67
+ }
68
+
69
+ .jgis-stac-filter-section-badges {
70
+ display: flex;
71
+ flex-wrap: wrap;
72
+ gap: 0.25rem;
73
+ }
74
+
75
+ .jgis-stac-datepicker-icon {
76
+ width: 1rem;
77
+ height: 1rem;
78
+ }
79
+
80
+ .jgis-stac-badge {
81
+ gap: 0.25rem;
82
+ padding-right: 0.3rem !important;
83
+ }
84
+
85
+ .jgis-stac-badge-icon:hover {
86
+ background-color: color-mix(
87
+ in srgb,
88
+ var(--jp-error-color0),
89
+ transparent 20%
90
+ ) !important;
91
+ }
@@ -5,6 +5,7 @@
5
5
  padding: 0.5rem;
6
6
  background-color: var(--jp-layout-color1);
7
7
  border-bottom: 1px solid var(--jp-border-color1);
8
+ z-index: 99;
8
9
  }
9
10
 
10
11
  .jp-gis-temporal-slider-container span,
@@ -1,19 +0,0 @@
1
- import { IJupyterGISDoc, IJupyterGISModel, IJupyterGISTracker, IJupyterGISWidget } from '@jupytergis/schema';
2
- import { ISignal } from '@lumino/signaling';
3
- import { IControlPanelModel } from "../types";
4
- export declare class ControlPanelModel implements IControlPanelModel {
5
- constructor(options: ControlPanelModel.IOptions);
6
- get documentChanged(): ISignal<IJupyterGISTracker, IJupyterGISWidget | null>;
7
- get filePath(): string | undefined;
8
- get jGISModel(): IJupyterGISModel | undefined;
9
- get sharedModel(): IJupyterGISDoc | undefined;
10
- disconnect(f: any): void;
11
- private readonly _tracker;
12
- private _documentChanged;
13
- }
14
- declare namespace ControlPanelModel {
15
- interface IOptions {
16
- tracker: IJupyterGISTracker;
17
- }
18
- }
19
- export {};
@@ -1,30 +0,0 @@
1
- export class ControlPanelModel {
2
- constructor(options) {
3
- this._tracker = options.tracker;
4
- this._documentChanged = this._tracker.currentChanged;
5
- }
6
- get documentChanged() {
7
- return this._documentChanged;
8
- }
9
- get filePath() {
10
- var _a;
11
- return (_a = this._tracker.currentWidget) === null || _a === void 0 ? void 0 : _a.model.filePath;
12
- }
13
- get jGISModel() {
14
- var _a;
15
- return (_a = this._tracker.currentWidget) === null || _a === void 0 ? void 0 : _a.model;
16
- }
17
- get sharedModel() {
18
- var _a;
19
- return (_a = this._tracker.currentWidget) === null || _a === void 0 ? void 0 : _a.model.sharedModel;
20
- }
21
- disconnect(f) {
22
- this._tracker.forEach(w => {
23
- w.model.sharedLayersChanged.disconnect(f);
24
- w.model.sharedSourcesChanged.disconnect(f);
25
- w.model.sharedOptionsChanged.disconnect(f);
26
- });
27
- this._tracker.forEach(w => w.model.themeChanged.disconnect(f));
28
- this._tracker.forEach(w => w.model.clientStateChanged.disconnect(f));
29
- }
30
- }
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import { IControlPanelModel } from "../types";
3
- interface IStacBrowserDialogProps {
4
- controlPanelModel: IControlPanelModel;
5
- }
6
- declare const StacBrowser: ({ controlPanelModel }: IStacBrowserDialogProps) => React.JSX.Element;
7
- export default StacBrowser;
@@ -1,16 +0,0 @@
1
- import React, { useEffect, useState } from 'react';
2
- import StacPanelView from "./components/StacPanelView";
3
- const StacBrowser = ({ controlPanelModel }) => {
4
- const [jgisModel, setJgisModel] = useState(controlPanelModel === null || controlPanelModel === void 0 ? void 0 : controlPanelModel.jGISModel);
5
- useEffect(() => {
6
- const handleCurrentChanged = (_, widget) => {
7
- setJgisModel(widget === null || widget === void 0 ? void 0 : widget.model);
8
- };
9
- controlPanelModel.documentChanged.connect(handleCurrentChanged);
10
- return () => {
11
- controlPanelModel.documentChanged.disconnect(handleCurrentChanged);
12
- };
13
- }, [controlPanelModel]);
14
- return React.createElement(StacPanelView, { model: jgisModel });
15
- };
16
- export default StacBrowser;
@@ -1,14 +0,0 @@
1
- import { IJupyterGISTracker } from '@jupytergis/schema';
2
- import { Panel } from '@lumino/widgets';
3
- import { IControlPanelModel } from "../types";
4
- export declare class StacPanel extends Panel {
5
- constructor(options: StacPanel.IOptions);
6
- private _model;
7
- }
8
- export declare namespace StacPanel {
9
- interface IOptions {
10
- model: IControlPanelModel;
11
- tracker: IJupyterGISTracker;
12
- }
13
- }
14
- export default StacPanel;
@@ -1,16 +0,0 @@
1
- import { ReactWidget } from '@jupyterlab/ui-components';
2
- import { Panel } from '@lumino/widgets';
3
- import React from 'react';
4
- import StacBrowser from "./StacBrowser";
5
- export class StacPanel extends Panel {
6
- constructor(options) {
7
- super();
8
- this._model = options.model;
9
- this.id = 'jupytergis::stacPanel';
10
- this.title.caption = 'STAC';
11
- this.title.label = 'STAC';
12
- this.addClass('jgis-scrollable');
13
- this.addWidget(ReactWidget.create(React.createElement(StacBrowser, { controlPanelModel: this._model })));
14
- }
15
- }
16
- export default StacPanel;