@jupytergis/base 0.14.1 → 0.16.0-alpha.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/commands/BaseCommandIDs.d.ts +6 -0
- package/lib/commands/BaseCommandIDs.js +6 -0
- package/lib/commands/index.js +245 -55
- package/lib/commands/operationCommands.js +2 -2
- package/lib/constants.js +6 -1
- package/lib/{panelview/annotationPanel.js → features/annotations/AnnotationsPanel.js} +1 -1
- package/lib/{annotations → features/annotations}/index.d.ts +1 -0
- package/lib/{annotations → features/annotations}/index.js +1 -0
- package/lib/{console → features/console}/consoleview.js +1 -1
- package/lib/{panelview/filter-panel → features/filter}/Filter.js +4 -4
- package/lib/{panelview/filter-panel → features/filter}/FilterRow.d.ts +3 -2
- package/lib/{panelview/filter-panel → features/filter}/FilterRow.js +2 -1
- package/lib/{panelview/identify-panel → features/identify}/IdentifyPanel.d.ts +2 -0
- package/lib/features/identify/IdentifyPanel.js +102 -0
- package/lib/features/identify/components/FeatureCard.d.ts +17 -0
- package/lib/features/identify/components/FeatureCard.js +26 -0
- package/lib/features/identify/components/FeatureCardHeader.d.ts +11 -0
- package/lib/features/identify/components/FeatureCardHeader.js +30 -0
- package/lib/features/identify/components/FeatureFloater.d.ts +7 -0
- package/lib/features/identify/components/FeatureFloater.js +19 -0
- package/lib/features/identify/components/FeaturePropertyList.d.ts +11 -0
- package/lib/features/identify/components/FeaturePropertyList.js +18 -0
- package/lib/features/identify/components/FeatureRow.d.ts +13 -0
- package/lib/features/identify/components/FeatureRow.js +25 -0
- package/lib/features/identify/components/PropertyEditors.d.ts +44 -0
- package/lib/features/identify/components/PropertyEditors.js +56 -0
- package/lib/features/identify/hooks/useIdentifyPropertyEditor.d.ts +11 -0
- package/lib/features/identify/hooks/useIdentifyPropertyEditor.js +132 -0
- package/lib/features/identify/types/editorTypes.d.ts +21 -0
- package/lib/features/identify/utils/getFeatureIdentifier.d.ts +5 -0
- package/lib/features/identify/utils/getFeatureIdentifier.js +14 -0
- package/lib/features/identify/utils/highlightLayer.d.ts +11 -0
- package/lib/features/identify/utils/highlightLayer.js +57 -0
- package/lib/features/identify/utils/highlightStyle.d.ts +7 -0
- package/lib/features/identify/utils/highlightStyle.js +40 -0
- package/lib/{dialogs/layerBrowserDialog.js → features/layer-browser/index.js} +2 -2
- package/lib/features/layers/forms/layer/geoTiffLayerForm.d.ts +3 -0
- package/lib/{formbuilder/objectform/layer/webGlLayerForm.js → features/layers/forms/layer/geoTiffLayerForm.js} +5 -5
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/heatmapLayerForm.js +4 -4
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/hillshadeLayerForm.js +4 -4
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/index.d.ts +1 -1
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/index.js +1 -1
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/layerform.d.ts +1 -1
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/layerform.js +4 -4
- package/lib/features/layers/forms/layer/storySegmentLayerForm.js +150 -0
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/vectorlayerform.js +4 -4
- package/lib/{formbuilder/objectform → features/layers/forms}/source/geojsonsource.js +5 -5
- package/lib/features/layers/forms/source/geopackagesource.d.ts +3 -0
- package/lib/features/layers/forms/source/geopackagesource.js +93 -0
- package/lib/{formbuilder/objectform → features/layers/forms}/source/geotiffsource.js +5 -5
- package/lib/{formbuilder/objectform → features/layers/forms}/source/index.d.ts +2 -0
- package/lib/{formbuilder/objectform → features/layers/forms}/source/index.js +2 -0
- package/lib/{formbuilder/objectform → features/layers/forms}/source/pathbasedsource.js +5 -5
- package/lib/{formbuilder/objectform → features/layers/forms}/source/sourceform.d.ts +1 -1
- package/lib/{formbuilder/objectform → features/layers/forms}/source/sourceform.js +4 -4
- package/lib/{formbuilder/objectform → features/layers/forms}/source/tilesourceform.js +4 -4
- package/lib/features/layers/forms/source/wmsTileSource.d.ts +4 -0
- package/lib/features/layers/forms/source/wmsTileSource.js +78 -0
- package/lib/{dialogs → features/layers}/layerCreationFormDialog.d.ts +1 -1
- package/lib/{dialogs → features/layers}/layerCreationFormDialog.js +1 -1
- package/lib/features/layers/symbology/Grammar.d.ts +11 -0
- package/lib/features/layers/symbology/Grammar.js +235 -0
- package/lib/{dialogs/symbology/vector_layer/types → features/layers/symbology}/Heatmap.d.ts +1 -1
- package/lib/{dialogs/symbology/vector_layer/types → features/layers/symbology}/Heatmap.js +30 -10
- package/lib/{dialogs → features/layers}/symbology/classificationModes.d.ts +6 -6
- package/lib/{dialogs → features/layers}/symbology/classificationModes.js +57 -57
- package/lib/features/layers/symbology/colorRampUtils.d.ts +65 -0
- package/lib/features/layers/symbology/colorRampUtils.js +242 -0
- package/lib/features/layers/symbology/components/MappingRow.d.ts +40 -0
- package/lib/features/layers/symbology/components/MappingRow.js +516 -0
- package/lib/features/layers/symbology/components/NumericInput.d.ts +20 -0
- package/lib/features/layers/symbology/components/NumericInput.js +44 -0
- package/lib/features/layers/symbology/components/ScaleEditor.d.ts +33 -0
- package/lib/features/layers/symbology/components/ScaleEditor.js +221 -0
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampControls.d.ts +1 -1
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampControls.js +3 -2
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelector.d.ts +2 -1
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelector.js +12 -15
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelectorEntry.d.ts +2 -2
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelectorEntry.js +3 -11
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ModeSelectRow.d.ts +1 -1
- package/lib/features/layers/symbology/components/color_ramp/RgbaColorPicker.d.ts +13 -0
- package/lib/features/layers/symbology/components/color_ramp/RgbaColorPicker.js +128 -0
- package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopContainer.js +3 -1
- package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopRow.d.ts +2 -2
- package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopRow.js +12 -7
- package/lib/features/layers/symbology/grammarToOLLayer.d.ts +27 -0
- package/lib/features/layers/symbology/grammarToOLLayer.js +145 -0
- package/lib/features/layers/symbology/grammarToOLStyle.d.ts +32 -0
- package/lib/features/layers/symbology/grammarToOLStyle.js +467 -0
- package/lib/{dialogs → features/layers}/symbology/hooks/useGetBandInfo.d.ts +1 -1
- package/lib/{dialogs → features/layers}/symbology/hooks/useGetBandInfo.js +1 -1
- package/lib/{dialogs → features/layers}/symbology/hooks/useGetProperties.js +1 -1
- package/lib/{dialogs → features/layers}/symbology/hooks/useGetSymbology.js +4 -2
- package/lib/features/layers/symbology/styleBuilder.d.ts +21 -0
- package/lib/features/layers/symbology/styleBuilder.js +145 -0
- package/lib/{dialogs → features/layers}/symbology/symbologyDialog.d.ts +3 -2
- package/lib/{dialogs → features/layers}/symbology/symbologyDialog.js +12 -12
- package/lib/features/layers/symbology/symbologyUtils.d.ts +41 -0
- package/lib/features/layers/symbology/symbologyUtils.js +114 -0
- package/lib/{panelview/objectproperties.d.ts → features/objectproperties/index.d.ts} +1 -1
- package/lib/{panelview/objectproperties.js → features/objectproperties/index.js} +5 -10
- package/lib/{dialogs → features/processing}/ProcessingFormDialog.d.ts +1 -1
- package/lib/{dialogs → features/processing}/ProcessingFormDialog.js +28 -14
- package/lib/features/processing/forms/MapExtentToggle.d.ts +13 -0
- package/lib/features/processing/forms/MapExtentToggle.js +20 -0
- package/lib/features/processing/forms/clipRasterByExtentForm.d.ts +10 -0
- package/lib/features/processing/forms/clipRasterByExtentForm.js +99 -0
- package/lib/{formbuilder/objectform/process → features/processing/forms}/dissolveProcessForm.js +5 -5
- package/lib/{formbuilder/objectform → features/processing/forms}/processingForm.d.ts +1 -1
- package/lib/{formbuilder/objectform → features/processing/forms}/processingForm.js +6 -6
- package/lib/features/processing/forms/rasterizeForm.d.ts +10 -0
- package/lib/features/processing/forms/rasterizeForm.js +75 -0
- package/lib/features/processing/forms/useMapExtent.d.ts +22 -0
- package/lib/features/processing/forms/useMapExtent.js +57 -0
- package/lib/{processing → features/processing}/index.d.ts +19 -2
- package/lib/features/processing/index.js +1246 -0
- package/lib/{processing → features/processing}/processingCommands.d.ts +1 -1
- package/lib/features/processing/processingCommands.js +168 -0
- package/lib/features/processing/serverProcessing.d.ts +51 -0
- package/lib/features/processing/serverProcessing.js +99 -0
- package/lib/{stacBrowser → features/stac-browser}/components/StacPanel.js +2 -2
- package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableComboBox.js +64 -21
- package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableRow.js +1 -1
- package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/StacFilterExtensionPanel.js +2 -2
- package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/StacQueryableFilters.js +1 -1
- package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacFilterSection.js +3 -3
- package/lib/{stacBrowser → features/stac-browser}/components/shared/StacPanelResults.js +3 -3
- package/lib/{stacBrowser → features/stac-browser}/components/shared/StacSpatialExtent.js +1 -1
- package/lib/{stacBrowser → features/stac-browser}/components/shared/StacTemporalExtent.js +1 -1
- package/lib/{stacBrowser → features/stac-browser}/context/StacResultsContext.js +2 -2
- package/lib/{stacBrowser → features/stac-browser}/hooks/useGeodesSearch.js +2 -2
- package/lib/{stacBrowser → features/stac-browser}/hooks/useStacFilterExtension.d.ts +1 -1
- package/lib/{stacBrowser → features/stac-browser}/hooks/useStacFilterExtension.js +198 -114
- package/lib/{stacBrowser → features/stac-browser}/hooks/useStacSearch.d.ts +1 -0
- package/lib/{stacBrowser → features/stac-browser}/hooks/useStacSearch.js +19 -11
- package/lib/features/stac-browser/types/types.js +1 -0
- package/lib/{panelview/story-maps → features/story}/SpectaPanel.d.ts +4 -1
- package/lib/{panelview/story-maps → features/story}/SpectaPanel.js +3 -4
- package/lib/{panelview/story-maps → features/story}/StoryEditorPanel.js +1 -1
- package/lib/{panelview/story-maps → features/story}/StoryViewerPanel.d.ts +12 -11
- package/lib/features/story/StoryViewerPanel.js +64 -0
- package/lib/features/story/__tests__/fixtures/listStoryTestItems.d.ts +9 -0
- package/lib/features/story/__tests__/fixtures/listStoryTestItems.js +21 -0
- package/lib/features/story/components/ListStoryMapOverlayPanel.d.ts +10 -0
- package/lib/features/story/components/ListStoryMapOverlayPanel.js +11 -0
- package/lib/features/story/components/ListStoryMarkdownMeasurePane.d.ts +11 -0
- package/lib/features/story/components/ListStoryMarkdownMeasurePane.js +55 -0
- package/lib/features/story/components/ListStoryOverlayMarkdown.d.ts +15 -0
- package/lib/features/story/components/ListStoryOverlayMarkdown.js +93 -0
- package/lib/features/story/components/ListStoryStageOverlay.d.ts +12 -0
- package/lib/features/story/components/ListStoryStageOverlay.js +132 -0
- package/lib/features/story/components/ListStoryVirtualScrollTrack.d.ts +6 -0
- package/lib/features/story/components/ListStoryVirtualScrollTrack.js +7 -0
- package/lib/{panelview/story-maps → features/story}/components/SpectaDesktopView.d.ts +4 -2
- package/lib/features/story/components/SpectaDesktopView.js +67 -0
- package/lib/{panelview/story-maps → features/story}/components/SpectaMobileView.d.ts +2 -4
- package/lib/{panelview/story-maps → features/story}/components/SpectaMobileView.js +3 -3
- package/lib/features/story/components/SpectaSingleModeContent.d.ts +18 -0
- package/lib/features/story/components/SpectaSingleModeContent.js +8 -0
- package/lib/features/story/context/ListStoryScrollTrackContext.d.ts +15 -0
- package/lib/features/story/context/ListStoryScrollTrackContext.js +142 -0
- package/lib/features/story/hooks/useCurrentSegmentIndex.d.ts +3 -0
- package/lib/features/story/hooks/useCurrentSegmentIndex.js +17 -0
- package/lib/features/story/hooks/useListStoryScroll.d.ts +15 -0
- package/lib/features/story/hooks/useListStoryScroll.js +107 -0
- package/lib/features/story/hooks/useQueuedMarkdownHeightMeasure.d.ts +19 -0
- package/lib/features/story/hooks/useQueuedMarkdownHeightMeasure.js +56 -0
- package/lib/features/story/hooks/useStoryImagePreload.d.ts +1 -0
- package/lib/features/story/hooks/useStoryImagePreload.js +24 -0
- package/lib/{panelview/story-maps → features/story}/hooks/useStoryMap.d.ts +2 -7
- package/lib/{panelview/story-maps → features/story}/hooks/useStoryMap.js +20 -44
- package/lib/features/story/hooks/useStoryScrollState.d.ts +21 -0
- package/lib/features/story/hooks/useStoryScrollState.js +39 -0
- package/lib/features/story/hooks/useStorySegmentSync.d.ts +8 -0
- package/lib/features/story/hooks/useStorySegmentSync.js +51 -0
- package/lib/features/story/types/types.d.ts +38 -0
- package/lib/features/story/types/types.js +1 -0
- package/lib/features/story/utils/computeListStoryScrollState.d.ts +12 -0
- package/lib/features/story/utils/computeListStoryScrollState.js +70 -0
- package/lib/features/story/utils/listStoryMeasureQueue.d.ts +11 -0
- package/lib/features/story/utils/listStoryMeasureQueue.js +14 -0
- package/lib/features/story/utils/listStoryScrollTrack.d.ts +17 -0
- package/lib/features/story/utils/listStoryScrollTrack.js +72 -0
- package/lib/features/story/utils/spectaPresentation.d.ts +9 -0
- package/lib/features/story/utils/spectaPresentation.js +37 -0
- package/lib/features/story/utils/storySegmentViewItems.d.ts +5 -0
- package/lib/features/story/utils/storySegmentViewItems.js +30 -0
- package/lib/index.d.ts +11 -9
- package/lib/index.js +11 -9
- package/lib/keybindings.json +5 -0
- package/lib/mainview/OpenEOTileLayer.d.ts +49 -0
- package/lib/mainview/OpenEOTileLayer.js +179 -0
- package/lib/mainview/TemporalSlider.js +11 -9
- package/lib/mainview/geoJsonFeaturePatch.d.ts +9 -0
- package/lib/mainview/geoJsonFeaturePatch.js +43 -0
- package/lib/mainview/mainView.d.ts +93 -8
- package/lib/mainview/mainView.js +1286 -529
- package/lib/mainview/mainviewwidget.d.ts +5 -1
- package/lib/mainview/mainviewwidget.js +4 -2
- package/lib/shared/components/Button.d.ts +1 -1
- package/lib/shared/components/DropdownMenu.d.ts +1 -0
- package/lib/shared/components/DropdownMenu.js +3 -2
- package/lib/shared/components/NativeSelect.d.ts +8 -0
- package/lib/shared/components/NativeSelect.js +29 -0
- package/lib/shared/components/Tabs.d.ts +3 -3
- package/lib/shared/components/Tabs.js +5 -5
- package/lib/{formbuilder → shared/formbuilder}/creationform.js +71 -4
- package/lib/{formbuilder → shared/formbuilder}/editform.js +1 -1
- package/lib/{formbuilder → shared/formbuilder}/formselectors.d.ts +2 -2
- package/lib/{formbuilder → shared/formbuilder}/formselectors.js +13 -4
- package/lib/shared/formbuilder/index.d.ts +4 -0
- package/lib/shared/formbuilder/index.js +4 -0
- package/lib/{formbuilder → shared/formbuilder}/objectform/SchemaForm.d.ts +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/StoryEditorForm.d.ts +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/StoryEditorForm.js +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/components/LayerSelect.js +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/components/SegmentFormSymbology.js +4 -4
- package/lib/{formbuilder → shared/formbuilder}/objectform/components/SourcePropertiesField.js +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/components/StorySegmentReset.js +1 -1
- package/lib/shared/formbuilder/objectform/components/WmsTileSourceUrlInput.d.ts +3 -0
- package/lib/shared/formbuilder/objectform/components/WmsTileSourceUrlInput.js +84 -0
- package/lib/{formbuilder → shared/formbuilder}/objectform/fileselectorwidget.js +8 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/schemaUtils.d.ts +3 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/schemaUtils.js +11 -0
- package/lib/{formbuilder → shared/formbuilder}/objectform/useSchemaFormState.d.ts +2 -2
- package/lib/{formbuilder → shared/formbuilder}/objectform/useSchemaFormState.js +1 -1
- package/lib/{icons.d.ts → shared/icons.d.ts} +2 -0
- package/lib/{icons.js → shared/icons.js} +28 -18
- package/lib/tools.d.ts +3 -1
- package/lib/tools.js +140 -6
- package/lib/types.d.ts +12 -1
- package/lib/types.js +6 -1
- package/lib/{menus.js → workspace/menus.js} +14 -2
- package/lib/workspace/panels/components/TabbedPanel.d.ts +17 -0
- package/lib/workspace/panels/components/TabbedPanel.js +19 -0
- package/lib/{panelview → workspace/panels}/components/layers.js +82 -20
- package/lib/workspace/panels/components/legendItem.js +680 -0
- package/lib/workspace/panels/hooks/useLayerTree.d.ts +19 -0
- package/lib/workspace/panels/hooks/useLayerTree.js +103 -0
- package/lib/workspace/panels/hooks/useRightPanelOptions.d.ts +27 -0
- package/lib/workspace/panels/hooks/useRightPanelOptions.js +72 -0
- package/lib/workspace/panels/hooks/useUIState.d.ts +2 -0
- package/lib/workspace/panels/hooks/useUIState.js +25 -0
- package/lib/{panelview → workspace/panels}/index.d.ts +1 -1
- package/lib/{panelview → workspace/panels}/index.js +1 -1
- package/lib/{panelview → workspace/panels}/leftpanel.d.ts +1 -1
- package/lib/workspace/panels/leftpanel.js +70 -0
- package/lib/{panelview/rightpanel.d.ts → workspace/panels/mergedpanel.d.ts} +6 -5
- package/lib/workspace/panels/mergedpanel.js +166 -0
- package/lib/workspace/panels/rightpanel.d.ts +25 -0
- package/lib/{panelview → workspace/panels}/rightpanel.js +53 -63
- package/lib/{statusbar → workspace/statusbar}/StatusBar.js +5 -4
- package/lib/{toolbar → workspace/toolbar}/widget.d.ts +2 -0
- package/lib/{toolbar → workspace/toolbar}/widget.js +33 -5
- package/lib/{widget.d.ts → workspace/widget.d.ts} +7 -5
- package/lib/{widget.js → workspace/widget.js} +16 -7
- package/package.json +19 -4
- package/style/base.css +109 -1
- package/style/icons/geopackage.svg +95 -0
- package/style/icons/pencil_solid.svg +7 -0
- package/style/identify.css +95 -0
- package/style/layerBrowser.css +28 -0
- package/style/leftPanel.css +25 -0
- package/style/shared/button.css +12 -0
- package/style/shared/dropdownMenu.css +9 -0
- package/style/shared/nativeSelect.css +75 -0
- package/style/shared/tabs.css +3 -3
- package/style/spectaProgressBar.css +0 -1
- package/style/storyPanel.css +142 -9
- package/style/storySpectaArticleOverlay.css +129 -0
- package/style/symbologyDialog.css +330 -28
- package/lib/dialogs/symbology/colorRampUtils.d.ts +0 -20
- package/lib/dialogs/symbology/colorRampUtils.js +0 -132
- package/lib/dialogs/symbology/symbologyUtils.d.ts +0 -33
- package/lib/dialogs/symbology/symbologyUtils.js +0 -180
- package/lib/dialogs/symbology/tiff_layer/TiffRendering.d.ts +0 -4
- package/lib/dialogs/symbology/tiff_layer/TiffRendering.js +0 -42
- package/lib/dialogs/symbology/tiff_layer/components/BandRow.d.ts +0 -23
- package/lib/dialogs/symbology/tiff_layer/components/BandRow.js +0 -59
- package/lib/dialogs/symbology/tiff_layer/types/MultibandColor.d.ts +0 -4
- package/lib/dialogs/symbology/tiff_layer/types/MultibandColor.js +0 -92
- package/lib/dialogs/symbology/tiff_layer/types/SingleBandPseudoColor.d.ts +0 -5
- package/lib/dialogs/symbology/tiff_layer/types/SingleBandPseudoColor.js +0 -301
- package/lib/dialogs/symbology/vector_layer/VectorRendering.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/VectorRendering.js +0 -112
- package/lib/dialogs/symbology/vector_layer/components/ValueSelect.d.ts +0 -8
- package/lib/dialogs/symbology/vector_layer/components/ValueSelect.js +0 -9
- package/lib/dialogs/symbology/vector_layer/types/Canonical.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/types/Canonical.js +0 -65
- package/lib/dialogs/symbology/vector_layer/types/Categorized.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/types/Categorized.js +0 -196
- package/lib/dialogs/symbology/vector_layer/types/Graduated.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/types/Graduated.js +0 -250
- package/lib/dialogs/symbology/vector_layer/types/SimpleSymbol.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/types/SimpleSymbol.js +0 -105
- package/lib/formbuilder/index.d.ts +0 -4
- package/lib/formbuilder/index.js +0 -4
- package/lib/formbuilder/objectform/layer/storySegmentLayerForm.js +0 -95
- package/lib/formbuilder/objectform/layer/webGlLayerForm.d.ts +0 -3
- package/lib/formbuilder/objectform/process/index.d.ts +0 -1
- package/lib/formbuilder/objectform/process/index.js +0 -1
- package/lib/panelview/components/legendItem.js +0 -200
- package/lib/panelview/identify-panel/IdentifyPanel.js +0 -102
- package/lib/panelview/leftpanel.js +0 -139
- package/lib/panelview/story-maps/StoryViewerPanel.js +0 -116
- package/lib/panelview/story-maps/components/SpectaDesktopView.js +0 -49
- package/lib/processing/index.js +0 -200
- package/lib/processing/processingCommands.js +0 -67
- /package/lib/{panelview/annotationPanel.d.ts → features/annotations/AnnotationsPanel.d.ts} +0 -0
- /package/lib/{annotations → features/annotations}/components/Annotation.d.ts +0 -0
- /package/lib/{annotations → features/annotations}/components/Annotation.js +0 -0
- /package/lib/{annotations → features/annotations}/components/AnnotationFloater.d.ts +0 -0
- /package/lib/{annotations → features/annotations}/components/AnnotationFloater.js +0 -0
- /package/lib/{annotations → features/annotations}/components/Message.d.ts +0 -0
- /package/lib/{annotations → features/annotations}/components/Message.js +0 -0
- /package/lib/{annotations → features/annotations}/model.d.ts +0 -0
- /package/lib/{annotations → features/annotations}/model.js +0 -0
- /package/lib/{console → features/console}/consoleview.d.ts +0 -0
- /package/lib/{console → features/console}/index.d.ts +0 -0
- /package/lib/{console → features/console}/index.js +0 -0
- /package/lib/{panelview/filter-panel → features/filter}/Filter.d.ts +0 -0
- /package/lib/{stacBrowser/types/types.js → features/identify/types/editorTypes.js} +0 -0
- /package/lib/{dialogs/layerBrowserDialog.d.ts → features/layer-browser/index.d.ts} +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/layer/heatmapLayerForm.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/layer/hillshadeLayerForm.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/layer/storySegmentLayerForm.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/layer/vectorlayerform.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/source/geojsonsource.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/source/geotiffsource.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/source/pathbasedsource.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/source/tilesourceform.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ModeSelectRow.js +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/cmocean.json +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopContainer.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useEffectiveSymbologyParams.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useEffectiveSymbologyParams.js +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useGetProperties.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useGetSymbology.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useOkSignal.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useOkSignal.js +0 -0
- /package/lib/{formbuilder/objectform/process → features/processing/forms}/dissolveProcessForm.d.ts +0 -0
- /package/lib/{processing → features/processing}/processingFormToParam.d.ts +0 -0
- /package/lib/{processing → features/processing}/processingFormToParam.js +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/StacPanel.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableComboBox.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableRow.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/StacFilterExtensionPanel.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/StacQueryableFilters.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacFilterSection.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacGeodesFilterPanel.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacGeodesFilterPanel.js +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/shared/StacPanelResults.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/shared/StacSpatialExtent.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/shared/StacTemporalExtent.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/constants.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/constants.js +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/context/StacResultsContext.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/hooks/useGeodesSearch.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/index.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/index.js +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/types/types.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/StoryEditorPanel.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/PreviewModeSwitch.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/PreviewModeSwitch.js +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryContentSection.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryContentSection.js +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryImageSection.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryImageSection.js +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryNavBar.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryNavBar.js +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StorySubtitleSection.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StorySubtitleSection.js +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryTitleSection.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryTitleSection.js +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/creationform.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/editform.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/SchemaForm.js +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/LayerSelect.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/OpacitySlider.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/OpacitySlider.js +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/SegmentFormSymbology.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/SourcePropertiesField.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/StorySegmentReset.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/fileselectorwidget.d.ts +0 -0
- /package/lib/{store.d.ts → shared/store.d.ts} +0 -0
- /package/lib/{store.js → shared/store.js} +0 -0
- /package/lib/{menus.d.ts → workspace/menus.d.ts} +0 -0
- /package/lib/{panelview → workspace/panels}/components/layers.d.ts +0 -0
- /package/lib/{panelview → workspace/panels}/components/legendItem.d.ts +0 -0
- /package/lib/{panelview → workspace/panels}/header.d.ts +0 -0
- /package/lib/{panelview → workspace/panels}/header.js +0 -0
- /package/lib/{statusbar → workspace/statusbar}/SpectaPresentationProgressBar.d.ts +0 -0
- /package/lib/{statusbar → workspace/statusbar}/SpectaPresentationProgressBar.js +0 -0
- /package/lib/{statusbar → workspace/statusbar}/StatusBar.d.ts +0 -0
- /package/lib/{toolbar → workspace/toolbar}/index.d.ts +0 -0
- /package/lib/{toolbar → workspace/toolbar}/index.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IDict, IJGISFormSchemaRegistry } from '@jupytergis/schema';
|
|
2
2
|
import { JupyterFrontEnd } from '@jupyterlab/application';
|
|
3
3
|
import { CommandRegistry } from '@lumino/commands';
|
|
4
|
-
import { JupyterGISTracker } from '
|
|
4
|
+
import { JupyterGISTracker } from '../../types';
|
|
5
5
|
export declare function replaceInSql(sql: string, keyToVal: IDict<string>, layerName: string): string;
|
|
6
6
|
export declare function addProcessingCommands(app: JupyterFrontEnd, commands: CommandRegistry, tracker: JupyterGISTracker, trans: any, formSchemaRegistry: IJGISFormSchemaRegistry, processingSchemas: Record<string, any>): void;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { ProcessingMerge, ProcessingLogicType, } from '@jupytergis/schema';
|
|
2
|
+
import { selectedLayerIsOfType, processLayer, rasterizeLayer, clipRasterByExtent, clipRasterByVector, clipVectorByMaskLayer, } from './index';
|
|
3
|
+
export function replaceInSql(sql, keyToVal, layerName) {
|
|
4
|
+
const replaceTemplateString = (args) => args.template.replace(RegExp(`{${args.variableName}}`, 'g'), args.value);
|
|
5
|
+
let out = replaceTemplateString({
|
|
6
|
+
variableName: 'layerName',
|
|
7
|
+
template: sql,
|
|
8
|
+
value: layerName,
|
|
9
|
+
});
|
|
10
|
+
for (const [key, value] of Object.entries(keyToVal)) {
|
|
11
|
+
out = replaceTemplateString({
|
|
12
|
+
variableName: key,
|
|
13
|
+
template: out,
|
|
14
|
+
value: value,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return out;
|
|
18
|
+
}
|
|
19
|
+
export function addProcessingCommands(app, commands, tracker, trans, formSchemaRegistry, processingSchemas) {
|
|
20
|
+
for (const processingElement of ProcessingMerge) {
|
|
21
|
+
const schemaKey = Object.keys(processingSchemas).find(k => k.toLowerCase() === processingElement.description.toLowerCase() ||
|
|
22
|
+
k.toLowerCase() === processingElement.name.toLowerCase());
|
|
23
|
+
if (!schemaKey) {
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
if (processingElement.type === ProcessingLogicType.vector) {
|
|
27
|
+
commands.addCommand(`jupytergis:${processingElement.name}`, {
|
|
28
|
+
label: trans.__(processingElement.label),
|
|
29
|
+
describedBy: {
|
|
30
|
+
args: {
|
|
31
|
+
type: 'object',
|
|
32
|
+
properties: {
|
|
33
|
+
filePath: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
description: 'Path to the .jGIS file',
|
|
36
|
+
},
|
|
37
|
+
layerId: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
description: 'Layer ID to process',
|
|
40
|
+
},
|
|
41
|
+
params: processingSchemas[schemaKey],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
isEnabled: () => selectedLayerIsOfType(['VectorLayer'], tracker),
|
|
46
|
+
execute: async (args) => {
|
|
47
|
+
await processLayer(tracker, formSchemaRegistry, processingElement.description, {
|
|
48
|
+
sqlQueryFn: (layerName, keyToVal) => replaceInSql(processingElement.operations.sql, keyToVal, layerName),
|
|
49
|
+
gdalFunction: processingElement.operations.gdalFunction,
|
|
50
|
+
options: (sqlQuery) => [
|
|
51
|
+
'-f',
|
|
52
|
+
'GeoJSON',
|
|
53
|
+
'-dialect',
|
|
54
|
+
'SQLITE',
|
|
55
|
+
'-sql',
|
|
56
|
+
sqlQuery,
|
|
57
|
+
'{outputName}',
|
|
58
|
+
],
|
|
59
|
+
}, app, args === null || args === void 0 ? void 0 : args.filePath, args === null || args === void 0 ? void 0 : args.processingInputs);
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
else if (processingElement.type === ProcessingLogicType.raster) {
|
|
64
|
+
commands.addCommand(`jupytergis:${processingElement.name}`, {
|
|
65
|
+
label: trans.__(processingElement.label),
|
|
66
|
+
describedBy: {
|
|
67
|
+
args: {
|
|
68
|
+
type: 'object',
|
|
69
|
+
properties: {
|
|
70
|
+
filePath: {
|
|
71
|
+
type: 'string',
|
|
72
|
+
description: 'Path to the .jGIS file',
|
|
73
|
+
},
|
|
74
|
+
layerId: {
|
|
75
|
+
type: 'string',
|
|
76
|
+
description: 'Layer ID to process',
|
|
77
|
+
},
|
|
78
|
+
params: processingSchemas[schemaKey],
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
isEnabled: () => selectedLayerIsOfType(['VectorLayer'], tracker),
|
|
83
|
+
execute: async (args) => {
|
|
84
|
+
await rasterizeLayer(tracker, formSchemaRegistry, processingElement.description, processingElement.operations.gdalFunction, app, args === null || args === void 0 ? void 0 : args.filePath, args === null || args === void 0 ? void 0 : args.processingInputs);
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
else if (processingElement.type === ProcessingLogicType.rasterClip) {
|
|
89
|
+
commands.addCommand(`jupytergis:${processingElement.name}`, {
|
|
90
|
+
label: trans.__(processingElement.label),
|
|
91
|
+
describedBy: {
|
|
92
|
+
args: {
|
|
93
|
+
type: 'object',
|
|
94
|
+
properties: {
|
|
95
|
+
filePath: {
|
|
96
|
+
type: 'string',
|
|
97
|
+
description: 'Path to the .jGIS file',
|
|
98
|
+
},
|
|
99
|
+
layerId: {
|
|
100
|
+
type: 'string',
|
|
101
|
+
description: 'Layer ID to process',
|
|
102
|
+
},
|
|
103
|
+
params: processingSchemas[schemaKey],
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
isEnabled: () => selectedLayerIsOfType(['GeoTiffLayer'], tracker),
|
|
108
|
+
execute: async (args) => {
|
|
109
|
+
await clipRasterByExtent(tracker, formSchemaRegistry, app, args === null || args === void 0 ? void 0 : args.filePath, args === null || args === void 0 ? void 0 : args.processingInputs);
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
else if (processingElement.type === ProcessingLogicType.rasterClipVector) {
|
|
114
|
+
commands.addCommand(`jupytergis:${processingElement.name}`, {
|
|
115
|
+
label: trans.__(processingElement.label),
|
|
116
|
+
describedBy: {
|
|
117
|
+
args: {
|
|
118
|
+
type: 'object',
|
|
119
|
+
properties: {
|
|
120
|
+
filePath: {
|
|
121
|
+
type: 'string',
|
|
122
|
+
description: 'Path to the .jGIS file',
|
|
123
|
+
},
|
|
124
|
+
layerId: {
|
|
125
|
+
type: 'string',
|
|
126
|
+
description: 'Layer ID to process',
|
|
127
|
+
},
|
|
128
|
+
params: processingSchemas[schemaKey],
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
isEnabled: () => selectedLayerIsOfType(['GeoTiffLayer'], tracker),
|
|
133
|
+
execute: async (args) => {
|
|
134
|
+
await clipRasterByVector(tracker, formSchemaRegistry, app, args === null || args === void 0 ? void 0 : args.filePath, args === null || args === void 0 ? void 0 : args.processingInputs);
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
else if (processingElement.type === ProcessingLogicType.clip) {
|
|
139
|
+
commands.addCommand(`jupytergis:${processingElement.name}`, {
|
|
140
|
+
label: trans.__(processingElement.label),
|
|
141
|
+
describedBy: {
|
|
142
|
+
args: {
|
|
143
|
+
type: 'object',
|
|
144
|
+
properties: {
|
|
145
|
+
filePath: {
|
|
146
|
+
type: 'string',
|
|
147
|
+
description: 'Path to the .jGIS file',
|
|
148
|
+
},
|
|
149
|
+
layerId: {
|
|
150
|
+
type: 'string',
|
|
151
|
+
description: 'Layer ID to process',
|
|
152
|
+
},
|
|
153
|
+
params: processingSchemas[schemaKey],
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
isEnabled: () => selectedLayerIsOfType(['VectorLayer'], tracker),
|
|
158
|
+
execute: async (args) => {
|
|
159
|
+
await clipVectorByMaskLayer(tracker, formSchemaRegistry, app, args === null || args === void 0 ? void 0 : args.filePath, args === null || args === void 0 ? void 0 : args.processingInputs);
|
|
160
|
+
},
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
console.error('Unsupported process type');
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export declare function isServerProcessingEnabled(): boolean;
|
|
2
|
+
export declare function getServerProcessingToggle(): boolean;
|
|
3
|
+
export declare function setServerProcessingEnabled(enabled: boolean): void;
|
|
4
|
+
/**
|
|
5
|
+
* Check if the server-side GDAL endpoint is available.
|
|
6
|
+
* Caches the result after the first successful check.
|
|
7
|
+
*/
|
|
8
|
+
export declare function checkServerAvailability(): Promise<boolean>;
|
|
9
|
+
/**
|
|
10
|
+
* Reset the cached availability (e.g. after environment change).
|
|
11
|
+
*/
|
|
12
|
+
export declare function resetServerAvailabilityCache(): void;
|
|
13
|
+
export interface IServerProcessingRequest {
|
|
14
|
+
operation: string;
|
|
15
|
+
options: string[];
|
|
16
|
+
geojson: string;
|
|
17
|
+
outputName: string;
|
|
18
|
+
}
|
|
19
|
+
export interface IServerProcessingUrlRequest {
|
|
20
|
+
operation: string;
|
|
21
|
+
options: string[];
|
|
22
|
+
url: string;
|
|
23
|
+
outputName: string;
|
|
24
|
+
}
|
|
25
|
+
export interface IServerProcessingUrlWithCutlineRequest {
|
|
26
|
+
operation: string;
|
|
27
|
+
options: string[];
|
|
28
|
+
url: string;
|
|
29
|
+
cutlineGeojson: string;
|
|
30
|
+
outputName: string;
|
|
31
|
+
}
|
|
32
|
+
export interface IServerProcessingResponse {
|
|
33
|
+
result: string;
|
|
34
|
+
format: 'text' | 'base64';
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Send a processing request to the server-side GDAL handler.
|
|
38
|
+
*/
|
|
39
|
+
export declare function runServerProcessing(request: IServerProcessingRequest): Promise<IServerProcessingResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* Send a URL-based processing request — the server uses /vsicurl/ so GDAL
|
|
42
|
+
* issues HTTP range requests instead of downloading the full file.
|
|
43
|
+
* Ideal for Cloud-Optimized GeoTIFFs (COGs).
|
|
44
|
+
*/
|
|
45
|
+
export declare function runServerProcessingUrl(request: IServerProcessingUrlRequest): Promise<IServerProcessingResponse>;
|
|
46
|
+
/**
|
|
47
|
+
* Run a GDAL operation that needs both a remote raster URL and a vector
|
|
48
|
+
* cutline (e.g. `gdalwarp -cutline`). The server writes the cutline GeoJSON
|
|
49
|
+
* to a temp file and substitutes `{cutlinePath}` in the options list.
|
|
50
|
+
*/
|
|
51
|
+
export declare function runServerProcessingUrlWithCutline(request: IServerProcessingUrlWithCutlineRequest): Promise<IServerProcessingResponse>;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { ServerConnection } from '@jupyterlab/services';
|
|
2
|
+
const PROCESSING_ENDPOINT = '/jupytergis_core/processing';
|
|
3
|
+
/**
|
|
4
|
+
* Module-level state for server-side processing toggle.
|
|
5
|
+
*/
|
|
6
|
+
let _serverProcessingEnabled = false;
|
|
7
|
+
let _serverAvailable = null;
|
|
8
|
+
export function isServerProcessingEnabled() {
|
|
9
|
+
return _serverProcessingEnabled && _serverAvailable === true;
|
|
10
|
+
}
|
|
11
|
+
export function getServerProcessingToggle() {
|
|
12
|
+
return _serverProcessingEnabled;
|
|
13
|
+
}
|
|
14
|
+
export function setServerProcessingEnabled(enabled) {
|
|
15
|
+
_serverProcessingEnabled = enabled;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Check if the server-side GDAL endpoint is available.
|
|
19
|
+
* Caches the result after the first successful check.
|
|
20
|
+
*/
|
|
21
|
+
export async function checkServerAvailability() {
|
|
22
|
+
if (_serverAvailable !== null) {
|
|
23
|
+
return _serverAvailable;
|
|
24
|
+
}
|
|
25
|
+
try {
|
|
26
|
+
const settings = ServerConnection.makeSettings();
|
|
27
|
+
const url = `${settings.baseUrl}${PROCESSING_ENDPOINT.slice(1)}`;
|
|
28
|
+
const response = await ServerConnection.makeRequest(url, {}, settings);
|
|
29
|
+
if (response.ok) {
|
|
30
|
+
const data = await response.json();
|
|
31
|
+
_serverAvailable = data.available === true;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
_serverAvailable = false;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
catch (_a) {
|
|
38
|
+
_serverAvailable = false;
|
|
39
|
+
}
|
|
40
|
+
return _serverAvailable;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Reset the cached availability (e.g. after environment change).
|
|
44
|
+
*/
|
|
45
|
+
export function resetServerAvailabilityCache() {
|
|
46
|
+
_serverAvailable = null;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Send a processing request to the server-side GDAL handler.
|
|
50
|
+
*/
|
|
51
|
+
export async function runServerProcessing(request) {
|
|
52
|
+
const settings = ServerConnection.makeSettings();
|
|
53
|
+
const url = `${settings.baseUrl}${PROCESSING_ENDPOINT.slice(1)}`;
|
|
54
|
+
const response = await ServerConnection.makeRequest(url, {
|
|
55
|
+
method: 'POST',
|
|
56
|
+
body: JSON.stringify(request),
|
|
57
|
+
}, settings);
|
|
58
|
+
if (!response.ok) {
|
|
59
|
+
const error = await response.json();
|
|
60
|
+
throw new Error(error.error || `Server processing failed: ${response.status}`);
|
|
61
|
+
}
|
|
62
|
+
return await response.json();
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Send a URL-based processing request — the server uses /vsicurl/ so GDAL
|
|
66
|
+
* issues HTTP range requests instead of downloading the full file.
|
|
67
|
+
* Ideal for Cloud-Optimized GeoTIFFs (COGs).
|
|
68
|
+
*/
|
|
69
|
+
export async function runServerProcessingUrl(request) {
|
|
70
|
+
const settings = ServerConnection.makeSettings();
|
|
71
|
+
const endpoint = `${settings.baseUrl}${PROCESSING_ENDPOINT.slice(1)}`;
|
|
72
|
+
const response = await ServerConnection.makeRequest(endpoint, {
|
|
73
|
+
method: 'POST',
|
|
74
|
+
body: JSON.stringify(request),
|
|
75
|
+
}, settings);
|
|
76
|
+
if (!response.ok) {
|
|
77
|
+
const error = await response.json();
|
|
78
|
+
throw new Error(error.error || `Server processing failed: ${response.status}`);
|
|
79
|
+
}
|
|
80
|
+
return await response.json();
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Run a GDAL operation that needs both a remote raster URL and a vector
|
|
84
|
+
* cutline (e.g. `gdalwarp -cutline`). The server writes the cutline GeoJSON
|
|
85
|
+
* to a temp file and substitutes `{cutlinePath}` in the options list.
|
|
86
|
+
*/
|
|
87
|
+
export async function runServerProcessingUrlWithCutline(request) {
|
|
88
|
+
const settings = ServerConnection.makeSettings();
|
|
89
|
+
const endpoint = `${settings.baseUrl}${PROCESSING_ENDPOINT.slice(1)}`;
|
|
90
|
+
const response = await ServerConnection.makeRequest(endpoint, {
|
|
91
|
+
method: 'POST',
|
|
92
|
+
body: JSON.stringify(request),
|
|
93
|
+
}, settings);
|
|
94
|
+
if (!response.ok) {
|
|
95
|
+
const error = await response.json();
|
|
96
|
+
throw new Error(error.error || `Server processing failed: ${response.status}`);
|
|
97
|
+
}
|
|
98
|
+
return await response.json();
|
|
99
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Select } from "../../shared/components/Select";
|
|
3
|
-
import { Tabs, TabsContent, TabsList, TabsTrigger, } from "../../shared/components/Tabs";
|
|
4
2
|
import StacFilterExtensionPanel from "./filter-extension/StacFilterExtensionPanel";
|
|
5
3
|
import StacGeodesFilterPanel from "./geodes/StacGeodesFilterPanel";
|
|
6
4
|
import StacPanelResults from "./shared/StacPanelResults";
|
|
7
5
|
import { StacResultsProvider, useStacResultsContext, } from "../context/StacResultsContext";
|
|
6
|
+
import { Select } from "../../../shared/components/Select";
|
|
7
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger, } from "../../../shared/components/Tabs";
|
|
8
8
|
const GEODES_URL = 'https://geodes-portal.cnes.fr/api/stac/';
|
|
9
9
|
const COPERNICUS_URL = 'https://stac.dataspace.copernicus.eu/v1/';
|
|
10
10
|
const WORLDPOP_URL = 'https://api.stac.worldpop.org/';
|
package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableComboBox.js
RENAMED
|
@@ -1,10 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState, } from 'react';
|
|
5
13
|
import QueryableRow from "./QueryableRow";
|
|
6
|
-
import
|
|
14
|
+
import { Combobox } from "../../../../shared/components/Combobox";
|
|
15
|
+
import { Input } from "../../../../shared/components/Input";
|
|
16
|
+
import { Select } from "../../../../shared/components/Select";
|
|
17
|
+
import { debounce } from "../../../../tools";
|
|
18
|
+
import SingleDatePicker from '../../../../shared/components/SingleDatePicker';
|
|
7
19
|
export function QueryableComboBox({ queryables, selectedQueryables, updateSelectedQueryables, }) {
|
|
20
|
+
const [draftValues, setDraftValues] = useState({});
|
|
21
|
+
const selectedQueryablesRef = useRef(selectedQueryables);
|
|
22
|
+
const debouncedCommitByKeyRef = useRef({});
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
selectedQueryablesRef.current = selectedQueryables;
|
|
25
|
+
}, [selectedQueryables]);
|
|
26
|
+
const normalizeInputValue = useCallback((schema, value) => {
|
|
27
|
+
let valueToStore = value;
|
|
28
|
+
if (schema.type === 'string' &&
|
|
29
|
+
schema.format === 'date-time' &&
|
|
30
|
+
typeof value === 'string') {
|
|
31
|
+
try {
|
|
32
|
+
const localDate = new Date(value);
|
|
33
|
+
valueToStore = localDate.toISOString();
|
|
34
|
+
}
|
|
35
|
+
catch (_a) {
|
|
36
|
+
valueToStore = value;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return valueToStore;
|
|
40
|
+
}, []);
|
|
41
|
+
const scheduleQueryableCommit = useCallback((key, value) => {
|
|
42
|
+
if (!debouncedCommitByKeyRef.current[key]) {
|
|
43
|
+
debouncedCommitByKeyRef.current[key] = debounce((nextValue) => {
|
|
44
|
+
const latestFilter = selectedQueryablesRef.current[key];
|
|
45
|
+
if (!latestFilter) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
updateSelectedQueryables(key, Object.assign(Object.assign({}, latestFilter), { inputValue: nextValue }));
|
|
49
|
+
}, 500);
|
|
50
|
+
}
|
|
51
|
+
debouncedCommitByKeyRef.current[key](value);
|
|
52
|
+
}, [updateSelectedQueryables]);
|
|
8
53
|
// Derive selected items from selectedQueryables
|
|
9
54
|
const selectedItems = useMemo(() => {
|
|
10
55
|
return queryables.filter(([key]) => key in selectedQueryables);
|
|
@@ -14,6 +59,11 @@ export function QueryableComboBox({ queryables, selectedQueryables, updateSelect
|
|
|
14
59
|
const isCurrentlySelected = key in selectedQueryables;
|
|
15
60
|
if (isCurrentlySelected) {
|
|
16
61
|
// Remove if already selected - pass null to explicitly remove
|
|
62
|
+
delete debouncedCommitByKeyRef.current[key];
|
|
63
|
+
setDraftValues(prev => {
|
|
64
|
+
const _a = prev, _b = key, _ = _a[_b], rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
|
|
65
|
+
return rest;
|
|
66
|
+
});
|
|
17
67
|
updateSelectedQueryables(key, null);
|
|
18
68
|
}
|
|
19
69
|
else {
|
|
@@ -152,26 +202,19 @@ export function QueryableComboBox({ queryables, selectedQueryables, updateSelect
|
|
|
152
202
|
operator: ((_b = operators[0]) === null || _b === void 0 ? void 0 : _b.value) || '=',
|
|
153
203
|
inputValue: undefined,
|
|
154
204
|
};
|
|
205
|
+
const inputValue = draftValues[key] !== undefined
|
|
206
|
+
? draftValues[key]
|
|
207
|
+
: currentFilter.inputValue;
|
|
155
208
|
const handleInputChange = (value) => {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
try {
|
|
162
|
-
// Parse local time and convert to UTC ISO string
|
|
163
|
-
const localDate = new Date(value);
|
|
164
|
-
valueToStore = localDate.toISOString();
|
|
165
|
-
}
|
|
166
|
-
catch (_a) {
|
|
167
|
-
valueToStore = value;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
updateSelectedQueryables(key, Object.assign(Object.assign({}, currentFilter), { inputValue: valueToStore }));
|
|
209
|
+
const normalizedValue = normalizeInputValue(val, value);
|
|
210
|
+
setDraftValues(prev => (Object.assign(Object.assign({}, prev), { [key]: normalizedValue })));
|
|
211
|
+
// Uses a stable per-field debounced function
|
|
212
|
+
// inline debounce would recreate each render and reset its timer
|
|
213
|
+
scheduleQueryableCommit(key, normalizedValue);
|
|
171
214
|
};
|
|
172
215
|
const handleOperatorChange = (operator) => {
|
|
173
216
|
updateSelectedQueryables(key, Object.assign(Object.assign({}, currentFilter), { operator }));
|
|
174
217
|
};
|
|
175
|
-
return (React.createElement(QueryableRow, { key: key, qKey: key, qVal: val, operators: operators, currentFilter: currentFilter, inputComponent: getInputBasedOnType(val,
|
|
218
|
+
return (React.createElement(QueryableRow, { key: key, qKey: key, qVal: val, operators: operators, currentFilter: currentFilter, inputComponent: getInputBasedOnType(val, inputValue, handleInputChange), onOperatorChange: handleOperatorChange }));
|
|
176
219
|
}))));
|
|
177
220
|
}
|
package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableRow.js
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Select } from "
|
|
2
|
+
import { Select } from "../../../../shared/components/Select";
|
|
3
3
|
function QueryableRow({ qKey, qVal, operators, currentFilter, inputComponent, onOperatorChange, }) {
|
|
4
4
|
const currentOperator = operators.find(op => op.value === currentFilter.operator);
|
|
5
5
|
const buttonText = (currentOperator === null || currentOperator === void 0 ? void 0 : currentOperator.label) || 'Select operator...';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { Input } from "../../../shared/components/Input";
|
|
3
|
-
import { Select } from "../../../shared/components/Select";
|
|
4
2
|
import StacQueryableFilters from "./StacQueryableFilters";
|
|
5
3
|
import StacSpatialExtent from "../shared/StacSpatialExtent";
|
|
6
4
|
import StacTemporalExtent from "../shared/StacTemporalExtent";
|
|
7
5
|
import { useStacResultsContext } from "../../context/StacResultsContext";
|
|
8
6
|
import { useStacFilterExtension } from "../../hooks/useStacFilterExtension";
|
|
7
|
+
import { Input } from "../../../../shared/components/Input";
|
|
8
|
+
import { Select } from "../../../../shared/components/Select";
|
|
9
9
|
function StacFilterExtensionPanel({ model }) {
|
|
10
10
|
var _a;
|
|
11
11
|
const { selectedUrl } = useStacResultsContext();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RadioGroup, RadioGroupItem } from "../../../shared/components/RadioGroup";
|
|
3
2
|
import { QueryableComboBox } from "./QueryableComboBox";
|
|
3
|
+
import { RadioGroup, RadioGroupItem } from "../../../../shared/components/RadioGroup";
|
|
4
4
|
const StacQueryableFilters = ({ queryableFields, selectedQueryables, updateSelectedQueryables, filterOperator, setFilterOperator, }) => {
|
|
5
5
|
return (React.createElement("div", { className: "jgis-stac-queryable-filters" },
|
|
6
6
|
React.createElement(RadioGroup, { className: "jgis-stac-queryable-filters-radio-group", value: filterOperator, onValueChange: (value) => {
|
|
@@ -2,9 +2,9 @@ import { faXmark } from '@fortawesome/free-solid-svg-icons';
|
|
|
2
2
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
3
3
|
import { ChevronRight } from 'lucide-react';
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
|
-
import Badge from "
|
|
6
|
-
import { Button } from "
|
|
7
|
-
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from "
|
|
5
|
+
import Badge from "../../../../shared/components/Badge";
|
|
6
|
+
import { Button } from "../../../../shared/components/Button";
|
|
7
|
+
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from "../../../../shared/components/DropdownMenu";
|
|
8
8
|
const StacFilterSection = ({ section, data, selectedCollections, selectedData, handleCheckedChange, }) => {
|
|
9
9
|
const items = useMemo(() => {
|
|
10
10
|
if (section === 'Collection') {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Button } from "../../../shared/components/Button";
|
|
3
|
-
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, } from "../../../shared/components/Pagination";
|
|
4
|
-
import { LoadingIcon } from "../../../shared/components/loading";
|
|
5
2
|
import { useStacResultsContext } from "../../context/StacResultsContext";
|
|
3
|
+
import { Button } from "../../../../shared/components/Button";
|
|
4
|
+
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, } from "../../../../shared/components/Pagination";
|
|
5
|
+
import { LoadingIcon } from "../../../../shared/components/loading";
|
|
6
6
|
function getPageItems(currentPage, totalPages) {
|
|
7
7
|
if (totalPages <= 5) {
|
|
8
8
|
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Checkbox from "
|
|
2
|
+
import Checkbox from "../../../../shared/components/Checkbox";
|
|
3
3
|
const StacSpatialExtent = ({ checked, onCheckedChange, label, }) => {
|
|
4
4
|
return (React.createElement(React.Fragment, null,
|
|
5
5
|
React.createElement("label", { className: "jgis-stac-filter-extension-label" }, "Spatial Extent"),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import SingleDatePicker from '
|
|
2
|
+
import SingleDatePicker from '../../../../shared/components/SingleDatePicker';
|
|
3
3
|
function StacTemporalExtent({ startTime, endTime, setStartTime, setEndTime, }) {
|
|
4
4
|
return (React.createElement("div", { className: "jgis-stac-filter-extension-section" },
|
|
5
5
|
React.createElement("label", { className: "jgis-stac-filter-extension-label" }, "Temporal Extent"),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UUID } from '@lumino/coreutils';
|
|
2
2
|
import React, { createContext, useContext, useState, useCallback, useRef, useEffect, } from 'react';
|
|
3
|
-
import { GlobalStateDbManager } from "
|
|
4
|
-
import { fetchWithProxies } from "
|
|
3
|
+
import { GlobalStateDbManager } from "../../../shared/store";
|
|
4
|
+
import { fetchWithProxies } from "../../../tools";
|
|
5
5
|
const StacResultsContext = createContext(undefined);
|
|
6
6
|
const STAC_SELECTED_URL_STATE_KEY = 'jupytergis:stac-selected-url';
|
|
7
7
|
export function StacResultsProvider({ children, model, }) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { startOfYesterday } from 'date-fns';
|
|
2
2
|
import { useCallback, useEffect, useState } from 'react';
|
|
3
|
-
import useIsFirstRender from "../../shared/hooks/useIsFirstRender";
|
|
4
3
|
import { products } from "../constants";
|
|
5
4
|
import { useStacResultsContext } from "../context/StacResultsContext";
|
|
6
5
|
import { useStacSearch } from "./useStacSearch";
|
|
7
|
-
import
|
|
6
|
+
import useIsFirstRender from "../../../shared/hooks/useIsFirstRender";
|
|
7
|
+
import { GlobalStateDbManager } from "../../../shared/store";
|
|
8
8
|
const GEODES_STAC_FILTERS_KEY = 'jupytergis:geodes-stac-filters';
|
|
9
9
|
/**
|
|
10
10
|
* Custom hook for managing GEODES-specific STAC search functionality
|
|
@@ -14,7 +14,7 @@ export declare function useStacFilterExtension({ model, baseUrl, limit, }: IUseS
|
|
|
14
14
|
queryableFields: IStacQueryables | undefined;
|
|
15
15
|
collections: FilteredCollection[];
|
|
16
16
|
selectedCollection: string;
|
|
17
|
-
setSelectedCollection:
|
|
17
|
+
setSelectedCollection: (nextSelectedCollection: string) => void;
|
|
18
18
|
handleSubmit: () => Promise<void>;
|
|
19
19
|
startTime: Date | undefined;
|
|
20
20
|
endTime: Date | undefined;
|