@jupytergis/base 0.15.0 → 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 +5 -0
- package/lib/commands/BaseCommandIDs.js +5 -0
- package/lib/commands/index.js +218 -47
- package/lib/commands/operationCommands.js +2 -2
- package/lib/constants.js +5 -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 +1 -0
- package/lib/{formbuilder/objectform → features/layers/forms}/source/index.js +1 -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/{formbuilder/objectform → features/layers/forms}/source/wmsTileSource.d.ts +1 -1
- package/lib/{formbuilder/objectform → features/layers/forms}/source/wmsTileSource.js +6 -6
- 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 +48 -44
- package/lib/{dialogs → features/layers}/symbology/colorRampUtils.d.ts +1 -0
- package/lib/{dialogs → features/layers}/symbology/colorRampUtils.js +12 -1
- 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 +6 -1
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ModeSelectRow.d.ts +1 -1
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/RgbaColorPicker.js +39 -9
- package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopRow.d.ts +1 -1
- package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopRow.js +1 -1
- 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 +1 -1
- package/lib/{dialogs → features/layers}/symbology/symbologyDialog.js +12 -12
- package/lib/{dialogs → features/layers}/symbology/symbologyUtils.d.ts +18 -10
- package/lib/{dialogs → features/layers}/symbology/symbologyUtils.js +0 -84
- 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 +5 -5
- 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.js +3 -3
- package/lib/{stacBrowser → features/stac-browser}/hooks/useStacSearch.js +1 -1
- 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 +90 -7
- package/lib/mainview/mainView.js +1196 -586
- 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 +10 -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/{formbuilder → shared/formbuilder}/objectform/components/WmsTileSourceUrlInput.js +4 -4
- 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 +1 -1
- 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 +2 -0
- package/lib/tools.js +138 -4
- package/lib/types.d.ts +6 -1
- package/lib/types.js +6 -1
- package/lib/{menus.js → workspace/menus.js} +10 -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 +63 -18
- 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 +16 -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 +1 -1
- package/style/spectaProgressBar.css +0 -1
- package/style/storyPanel.css +140 -9
- package/style/storySpectaArticleOverlay.css +129 -0
- package/style/symbologyDialog.css +285 -27
- 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 -313
- 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 -130
- package/lib/dialogs/symbology/vector_layer/types/Categorized.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/types/Categorized.js +0 -243
- package/lib/dialogs/symbology/vector_layer/types/Graduated.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/types/Graduated.js +0 -362
- package/lib/dialogs/symbology/vector_layer/types/SimpleSymbol.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/types/SimpleSymbol.js +0 -120
- 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 -210
- 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/ColorRampSelectorEntry.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelectorEntry.js +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ModeSelectRow.js +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/RgbaColorPicker.d.ts +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/components/color_stops/StopContainer.js +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}/hooks/useStacFilterExtension.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/hooks/useStacSearch.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/components/WmsTileSourceUrlInput.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
|
@@ -3,7 +3,7 @@ import { Dialog } from '@jupyterlab/apputils';
|
|
|
3
3
|
import { IStateDB } from '@jupyterlab/statedb';
|
|
4
4
|
import { PromiseDelegate } from '@lumino/coreutils';
|
|
5
5
|
import { Signal } from '@lumino/signaling';
|
|
6
|
-
import { SymbologyTab, SymbologyValue } from "
|
|
6
|
+
import { SymbologyTab, SymbologyValue } from "../../../types";
|
|
7
7
|
export interface ISymbologyDialogProps {
|
|
8
8
|
model: IJupyterGISModel;
|
|
9
9
|
okSignalPromise: PromiseDelegate<Signal<SymbologyWidget, null>>;
|
|
@@ -2,14 +2,14 @@ import { Dialog } from '@jupyterlab/apputils';
|
|
|
2
2
|
import { PromiseDelegate } from '@lumino/coreutils';
|
|
3
3
|
import { Signal } from '@lumino/signaling';
|
|
4
4
|
import React, { useEffect, useState } from 'react';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import Grammar from './Grammar';
|
|
6
|
+
import Heatmap from './Heatmap';
|
|
7
7
|
const SymbologyDialog = ({ model, okSignalPromise, isStorySegmentOverride, segmentId, }) => {
|
|
8
8
|
const [selectedLayer, setSelectedLayer] = useState(null);
|
|
9
9
|
const [componentToRender, setComponentToRender] = useState(null);
|
|
10
10
|
let LayerSymbology;
|
|
11
11
|
useEffect(() => {
|
|
12
|
-
const
|
|
12
|
+
const handleSelectedChanged = () => {
|
|
13
13
|
var _a, _b;
|
|
14
14
|
if (!((_b = (_a = model.localState) === null || _a === void 0 ? void 0 : _a.selected) === null || _b === void 0 ? void 0 : _b.value)) {
|
|
15
15
|
return;
|
|
@@ -18,10 +18,10 @@ const SymbologyDialog = ({ model, okSignalPromise, isStorySegmentOverride, segme
|
|
|
18
18
|
setSelectedLayer(currentLayer);
|
|
19
19
|
};
|
|
20
20
|
// Initial state
|
|
21
|
-
|
|
22
|
-
model.
|
|
21
|
+
handleSelectedChanged();
|
|
22
|
+
model.selectedChanged.connect(handleSelectedChanged);
|
|
23
23
|
return () => {
|
|
24
|
-
model.
|
|
24
|
+
model.selectedChanged.disconnect(handleSelectedChanged);
|
|
25
25
|
};
|
|
26
26
|
}, []);
|
|
27
27
|
useEffect(() => {
|
|
@@ -32,15 +32,15 @@ const SymbologyDialog = ({ model, okSignalPromise, isStorySegmentOverride, segme
|
|
|
32
32
|
if (!layer) {
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
// TODO
|
|
35
|
+
// TODO GeoTiffLayers can also be used for other layers, need a better way to determine source + layer combo
|
|
36
36
|
switch (layer.type) {
|
|
37
|
-
case 'VectorLayer':
|
|
38
|
-
case 'VectorTileLayer':
|
|
39
37
|
case 'HeatmapLayer':
|
|
40
|
-
LayerSymbology = (React.createElement(
|
|
38
|
+
LayerSymbology = (React.createElement(Heatmap, { model: model, okSignalPromise: okSignalPromise, layerId: selectedLayer, isStorySegmentOverride: isStorySegmentOverride, segmentId: segmentId }));
|
|
41
39
|
break;
|
|
42
|
-
case '
|
|
43
|
-
|
|
40
|
+
case 'VectorLayer':
|
|
41
|
+
case 'VectorTileLayer':
|
|
42
|
+
case 'GeoTiffLayer':
|
|
43
|
+
LayerSymbology = (React.createElement(Grammar, { model: model, okSignalPromise: okSignalPromise, layerId: selectedLayer, isStorySegmentOverride: isStorySegmentOverride, segmentId: segmentId }));
|
|
44
44
|
break;
|
|
45
45
|
default:
|
|
46
46
|
LayerSymbology = React.createElement("div", null, "Layer Type Not Supported");
|
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
import { IJGISLayer, IJupyterGISModel, IVectorLayer,
|
|
1
|
+
import { IJGISLayer, IJupyterGISModel, IVectorLayer, IGeoTiffLayer } from '@jupytergis/schema';
|
|
2
2
|
import { IColorMap } from './colorRampUtils';
|
|
3
3
|
import { IStopRow } from './symbologyDialog';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Payload when saving symbology. As of #698, only `symbologyState` is persisted
|
|
6
|
+
* for vector layers — the OpenLayers FlatStyle is derived at render time from
|
|
7
|
+
* `symbologyState` via `styleBuilder.buildVectorFlatStyle`. GeoTiff layers still
|
|
8
|
+
* accept an optional `color` because their `color` field is used for band-math
|
|
9
|
+
* expressions, not symbology duplication.
|
|
10
|
+
*/
|
|
5
11
|
export interface ISymbologyPayload {
|
|
6
|
-
symbologyState: IVectorLayer['symbologyState'] |
|
|
7
|
-
|
|
12
|
+
symbologyState: IVectorLayer['symbologyState'] | IGeoTiffLayer['symbologyState'];
|
|
13
|
+
/**
|
|
14
|
+
* Only used by GeoTiff band-math (`IGeoTiffLayer['color']`); never set for
|
|
15
|
+
* vector layers. Typed as `unknown` because the GeoTiff schema's color type
|
|
16
|
+
* is a nested numeric-array expression that doesn't round-trip cleanly
|
|
17
|
+
* through the JSON-schema generator.
|
|
18
|
+
*/
|
|
19
|
+
color?: unknown;
|
|
8
20
|
}
|
|
9
21
|
export interface ISaveSymbologyOptions {
|
|
10
22
|
model: IJupyterGISModel;
|
|
@@ -15,19 +27,15 @@ export interface ISaveSymbologyOptions {
|
|
|
15
27
|
mutateLayerBeforeSave?: (layer: any) => void;
|
|
16
28
|
}
|
|
17
29
|
export type VectorSymbologyParams = Pick<IVectorLayer, 'symbologyState' | 'color'>;
|
|
18
|
-
export type
|
|
30
|
+
export type GeoTiffSymbologyParams = Pick<IGeoTiffLayer, 'symbologyState' | 'color'>;
|
|
19
31
|
/** Params-shaped object used for reading symbology (layer.parameters or segment override). */
|
|
20
|
-
export type IEffectiveSymbologyParams = VectorSymbologyParams |
|
|
32
|
+
export type IEffectiveSymbologyParams = VectorSymbologyParams | GeoTiffSymbologyParams;
|
|
21
33
|
/**
|
|
22
34
|
* Resolve the effective symbology params for this dialog: either the layer's
|
|
23
35
|
* parameters or the matching segment override when editing a story-segment override.
|
|
24
36
|
*/
|
|
25
37
|
export declare function getEffectiveSymbologyParams(model: IJupyterGISModel, layerId: string, layer: IJGISLayer | null | undefined, isStorySegmentOverride?: boolean, segmentId?: string): IEffectiveSymbologyParams | null;
|
|
26
38
|
export declare function saveSymbology(options: ISaveSymbologyOptions): void;
|
|
27
|
-
export declare namespace VectorUtils {
|
|
28
|
-
const buildColorInfo: (layerParamers: VectorSymbologyParams) => IStopRow[];
|
|
29
|
-
const buildRadiusInfo: (layer: IJGISLayer) => IStopRow[];
|
|
30
|
-
}
|
|
31
39
|
export declare namespace Utils {
|
|
32
40
|
const getValueColorPairs: (stops: number[], colorRamp: IColorMap, nClasses: number, reverse?: boolean) => IStopRow[];
|
|
33
41
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { UUID } from '@lumino/coreutils';
|
|
2
2
|
import colormap from 'colormap';
|
|
3
|
-
import { findExprNode } from './colorRampUtils';
|
|
4
|
-
const COLOR_EXPR_STOPS_START = 3;
|
|
5
3
|
/**
|
|
6
4
|
* Resolve the effective symbology params for this dialog: either the layer's
|
|
7
5
|
* parameters or the matching segment override when editing a story-segment override.
|
|
@@ -73,88 +71,6 @@ export function saveSymbology(options) {
|
|
|
73
71
|
}
|
|
74
72
|
model.sharedModel.updateLayer(segmentId, segment);
|
|
75
73
|
}
|
|
76
|
-
export var VectorUtils;
|
|
77
|
-
(function (VectorUtils) {
|
|
78
|
-
VectorUtils.buildColorInfo = (layerParamers) => {
|
|
79
|
-
// This it to parse a color object on the layer
|
|
80
|
-
if (!(layerParamers === null || layerParamers === void 0 ? void 0 : layerParamers.color)) {
|
|
81
|
-
return [];
|
|
82
|
-
}
|
|
83
|
-
const color = layerParamers.color;
|
|
84
|
-
// If color is a string we don't need to parse
|
|
85
|
-
if (typeof color === 'string') {
|
|
86
|
-
return [];
|
|
87
|
-
}
|
|
88
|
-
const keys = ['fill-color', 'circle-fill-color'];
|
|
89
|
-
const valueColorPairs = [];
|
|
90
|
-
const seenPairs = new Set();
|
|
91
|
-
for (const key of keys) {
|
|
92
|
-
if (!color[key]) {
|
|
93
|
-
continue;
|
|
94
|
-
}
|
|
95
|
-
const interpolate = findExprNode(color[key], 'interpolate');
|
|
96
|
-
if (interpolate) {
|
|
97
|
-
// Graduated: value:color pairs starting at index 3
|
|
98
|
-
for (let i = COLOR_EXPR_STOPS_START; i < interpolate.length; i += 2) {
|
|
99
|
-
const pairKey = `${interpolate[i]}-${interpolate[i + 1]}`;
|
|
100
|
-
if (!seenPairs.has(pairKey)) {
|
|
101
|
-
valueColorPairs.push({
|
|
102
|
-
id: UUID.uuid4(),
|
|
103
|
-
stop: interpolate[i],
|
|
104
|
-
output: interpolate[i + 1],
|
|
105
|
-
});
|
|
106
|
-
seenPairs.add(pairKey);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
const caseExpr = findExprNode(color[key], 'case');
|
|
112
|
-
if (caseExpr) {
|
|
113
|
-
// Categorized: alternating [condition, color] pairs, last element is fallback
|
|
114
|
-
for (let i = 1; i < caseExpr.length - 1; i += 2) {
|
|
115
|
-
const condition = caseExpr[i];
|
|
116
|
-
const pairKey = `${condition[2]}-${caseExpr[i + 1]}`;
|
|
117
|
-
if (!seenPairs.has(pairKey)) {
|
|
118
|
-
valueColorPairs.push({
|
|
119
|
-
id: UUID.uuid4(),
|
|
120
|
-
stop: condition[2],
|
|
121
|
-
output: caseExpr[i + 1],
|
|
122
|
-
});
|
|
123
|
-
seenPairs.add(pairKey);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
return valueColorPairs;
|
|
130
|
-
};
|
|
131
|
-
VectorUtils.buildRadiusInfo = (layer) => {
|
|
132
|
-
var _a;
|
|
133
|
-
if (!((_a = layer.parameters) === null || _a === void 0 ? void 0 : _a.color)) {
|
|
134
|
-
return [];
|
|
135
|
-
}
|
|
136
|
-
const color = layer.parameters.color;
|
|
137
|
-
// If color is a string we don't need to parse
|
|
138
|
-
if (typeof color === 'string') {
|
|
139
|
-
return [];
|
|
140
|
-
}
|
|
141
|
-
const stopOutputPairs = [];
|
|
142
|
-
const circleRadius = color['circle-radius'];
|
|
143
|
-
if (!Array.isArray(circleRadius) ||
|
|
144
|
-
circleRadius.length <= COLOR_EXPR_STOPS_START) {
|
|
145
|
-
return [];
|
|
146
|
-
}
|
|
147
|
-
for (let i = COLOR_EXPR_STOPS_START; i < circleRadius.length; i += 2) {
|
|
148
|
-
const obj = {
|
|
149
|
-
id: UUID.uuid4(),
|
|
150
|
-
stop: circleRadius[i],
|
|
151
|
-
output: circleRadius[i + 1],
|
|
152
|
-
};
|
|
153
|
-
stopOutputPairs.push(obj);
|
|
154
|
-
}
|
|
155
|
-
return stopOutputPairs;
|
|
156
|
-
};
|
|
157
|
-
})(VectorUtils || (VectorUtils = {}));
|
|
158
74
|
export var Utils;
|
|
159
75
|
(function (Utils) {
|
|
160
76
|
Utils.getValueColorPairs = (stops, colorRamp, nClasses, reverse = false) => {
|
|
@@ -16,7 +16,7 @@ interface IProps {
|
|
|
16
16
|
export declare class ObjectPropertiesReact extends React.Component<IProps, IStates> {
|
|
17
17
|
constructor(props: IProps);
|
|
18
18
|
private _sharedJGISModelChanged;
|
|
19
|
-
private
|
|
19
|
+
private _onSelectedChanged;
|
|
20
20
|
render(): React.ReactNode;
|
|
21
21
|
}
|
|
22
22
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UUID } from '@lumino/coreutils';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { EditForm } from "
|
|
3
|
+
import { EditForm } from "../../shared/formbuilder/editform";
|
|
4
4
|
export class ObjectPropertiesReact extends React.Component {
|
|
5
5
|
constructor(props) {
|
|
6
6
|
var _a, _b;
|
|
@@ -8,19 +8,14 @@ export class ObjectPropertiesReact extends React.Component {
|
|
|
8
8
|
this._sharedJGISModelChanged = () => {
|
|
9
9
|
this.forceUpdate();
|
|
10
10
|
};
|
|
11
|
-
this.
|
|
11
|
+
this._onSelectedChanged = () => {
|
|
12
12
|
var _a, _b;
|
|
13
|
-
|
|
14
|
-
const clientId = this.state.clientId;
|
|
15
|
-
const localState = clientId ? clients.get(clientId) : null;
|
|
13
|
+
const localState = this.props.model.localState;
|
|
16
14
|
if (localState &&
|
|
17
15
|
((_a = localState.selected) === null || _a === void 0 ? void 0 : _a.emitter) &&
|
|
18
16
|
localState.selected.emitter !== this.state.id &&
|
|
19
17
|
((_b = localState.selected) === null || _b === void 0 ? void 0 : _b.value)) {
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
if (newState) {
|
|
23
|
-
const selection = newState.selected.value;
|
|
18
|
+
const selection = localState.selected.value;
|
|
24
19
|
const selectedObjectIds = Object.keys(selection || {});
|
|
25
20
|
// Only show object properties if ONE object is selected
|
|
26
21
|
if (selection === undefined || selectedObjectIds.length !== 1) {
|
|
@@ -42,7 +37,7 @@ export class ObjectPropertiesReact extends React.Component {
|
|
|
42
37
|
selectedObject: props.selectedObject,
|
|
43
38
|
setSelectedObject: props.setSelectedObject,
|
|
44
39
|
};
|
|
45
|
-
this.props.model.
|
|
40
|
+
this.props.model.selectedChanged.connect(this._onSelectedChanged);
|
|
46
41
|
(_a = this.props.model) === null || _a === void 0 ? void 0 : _a.sharedLayersChanged.connect(this._sharedJGISModelChanged);
|
|
47
42
|
(_b = this.props.model) === null || _b === void 0 ? void 0 : _b.sharedSourcesChanged.connect(this._sharedJGISModelChanged);
|
|
48
43
|
}
|
|
@@ -2,7 +2,7 @@ import { ProcessingType, IDict, IJupyterGISModel } from '@jupytergis/schema';
|
|
|
2
2
|
import { Dialog } from '@jupyterlab/apputils';
|
|
3
3
|
import { PromiseDelegate } from '@lumino/coreutils';
|
|
4
4
|
import { Signal } from '@lumino/signaling';
|
|
5
|
-
import type { IBaseFormProps } from "
|
|
5
|
+
import type { IBaseFormProps } from "../../types";
|
|
6
6
|
export interface IProcessingFormDialogOptions extends IBaseFormProps {
|
|
7
7
|
formContext: 'update' | 'create';
|
|
8
8
|
schema: IDict;
|
|
@@ -2,8 +2,10 @@ import { Dialog } from '@jupyterlab/apputils';
|
|
|
2
2
|
import { PromiseDelegate } from '@lumino/coreutils';
|
|
3
3
|
import { Signal } from '@lumino/signaling';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { ClipRasterByExtentForm } from './forms/clipRasterByExtentForm';
|
|
6
|
+
import { DissolveForm } from './forms/dissolveProcessForm';
|
|
7
|
+
import { DefaultProcessingForm } from './forms/processingForm';
|
|
8
|
+
import { RasterizeForm } from './forms/rasterizeForm';
|
|
7
9
|
const ProcessingFormWrapper = props => {
|
|
8
10
|
var _a;
|
|
9
11
|
const [ready, setReady] = React.useState(false);
|
|
@@ -22,6 +24,12 @@ const ProcessingFormWrapper = props => {
|
|
|
22
24
|
case 'Dissolve':
|
|
23
25
|
FormComponent = DissolveForm;
|
|
24
26
|
break;
|
|
27
|
+
case 'Rasterize':
|
|
28
|
+
FormComponent = RasterizeForm;
|
|
29
|
+
break;
|
|
30
|
+
case 'ClipRasterByExtent':
|
|
31
|
+
FormComponent = ClipRasterByExtentForm;
|
|
32
|
+
break;
|
|
25
33
|
default:
|
|
26
34
|
FormComponent = DefaultProcessingForm;
|
|
27
35
|
}
|
|
@@ -32,25 +40,37 @@ const ProcessingFormWrapper = props => {
|
|
|
32
40
|
*/
|
|
33
41
|
export class ProcessingFormDialog extends Dialog {
|
|
34
42
|
constructor(options) {
|
|
35
|
-
var _a, _b, _c;
|
|
43
|
+
var _a, _b, _c, _d, _e, _f;
|
|
36
44
|
// Extract layers from the shared model
|
|
37
45
|
const layers = (_a = options.model.sharedModel.layers) !== null && _a !== void 0 ? _a : {};
|
|
38
46
|
const layerOptions = Object.keys(layers).map(layerId => ({
|
|
39
47
|
value: layerId,
|
|
40
48
|
label: layers[layerId].name,
|
|
41
49
|
}));
|
|
50
|
+
const vectorLayerOptions = Object.keys(layers)
|
|
51
|
+
.filter(layerId => layers[layerId].type === 'VectorLayer')
|
|
52
|
+
.map(layerId => ({ value: layerId, label: layers[layerId].name }));
|
|
42
53
|
// Modify schema to include layer options and layer name field
|
|
43
54
|
if (options.schema) {
|
|
44
55
|
if ((_b = options.schema.properties) === null || _b === void 0 ? void 0 : _b.inputLayer) {
|
|
45
56
|
options.schema.properties.inputLayer.enum = layerOptions.map(option => option.value);
|
|
46
57
|
options.schema.properties.inputLayer.enumNames = layerOptions.map(option => option.label);
|
|
47
58
|
}
|
|
48
|
-
|
|
49
|
-
|
|
59
|
+
if ((_c = options.schema.properties) === null || _c === void 0 ? void 0 : _c.clipLayer) {
|
|
60
|
+
const selectedInputLayer = (_d = options.sourceData) === null || _d === void 0 ? void 0 : _d.inputLayer;
|
|
61
|
+
const clipLayerOptions = selectedInputLayer
|
|
62
|
+
? vectorLayerOptions.filter(o => o.value !== selectedInputLayer)
|
|
63
|
+
: vectorLayerOptions;
|
|
64
|
+
options.schema.properties.clipLayer.enum = clipLayerOptions.map(option => option.value);
|
|
65
|
+
options.schema.properties.clipLayer.enumNames = clipLayerOptions.map(option => option.label);
|
|
66
|
+
}
|
|
67
|
+
// Ensure outputLayerName field exists in schema. Skip if the schema
|
|
68
|
+
// already produces a file output (e.g. raster outputs use outputFileName).
|
|
69
|
+
if (!((_e = options.schema.properties) === null || _e === void 0 ? void 0 : _e.outputLayerName) &&
|
|
70
|
+
!((_f = options.schema.properties) === null || _f === void 0 ? void 0 : _f.outputFileName)) {
|
|
50
71
|
options.schema.properties.outputLayerName = {
|
|
51
72
|
type: 'string',
|
|
52
|
-
title: '
|
|
53
|
-
// default: ''
|
|
73
|
+
title: 'Output Layer Name',
|
|
54
74
|
};
|
|
55
75
|
}
|
|
56
76
|
}
|
|
@@ -58,16 +78,10 @@ export class ProcessingFormDialog extends Dialog {
|
|
|
58
78
|
const jgisModel = options.model;
|
|
59
79
|
const okSignalPromise = new PromiseDelegate();
|
|
60
80
|
const formErrorSignalPromise = new PromiseDelegate();
|
|
61
|
-
// Custom syncData function to update layer name in the model
|
|
62
81
|
const syncData = (props) => {
|
|
63
|
-
if (props.outputLayerName &&
|
|
64
|
-
props.inputLayer &&
|
|
65
|
-
layers[props.inputLayer]) {
|
|
66
|
-
layers[props.inputLayer].name = props.outputLayerName;
|
|
67
|
-
}
|
|
68
82
|
options.syncData(props);
|
|
69
83
|
};
|
|
70
|
-
const body = (React.createElement("div", { style: {
|
|
84
|
+
const body = (React.createElement("div", { style: { overflowX: 'hidden', overflowY: 'auto' } },
|
|
71
85
|
React.createElement(ProcessingFormWrapper, Object.assign({}, options, { filePath: filePath, model: jgisModel, okSignalPromise: okSignalPromise, formErrorSignalPromise: formErrorSignalPromise, syncData: syncData }))));
|
|
72
86
|
super({
|
|
73
87
|
title: options.title,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface IMapExtentToggleProps {
|
|
3
|
+
isActive: boolean;
|
|
4
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Checkbox that locks the extent fields to the current map viewport.
|
|
9
|
+
* When active, the children (extent fields) are visually dimmed and
|
|
10
|
+
* pointer-events are disabled so the user cannot edit them.
|
|
11
|
+
*/
|
|
12
|
+
export declare function MapExtentToggle({ isActive, onChange, children, }: IMapExtentToggleProps): React.ReactElement;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Checkbox that locks the extent fields to the current map viewport.
|
|
4
|
+
* When active, the children (extent fields) are visually dimmed and
|
|
5
|
+
* pointer-events are disabled so the user cannot edit them.
|
|
6
|
+
*/
|
|
7
|
+
export function MapExtentToggle({ isActive, onChange, children, }) {
|
|
8
|
+
return (React.createElement(React.Fragment, null,
|
|
9
|
+
React.createElement("label", { style: {
|
|
10
|
+
display: 'flex',
|
|
11
|
+
alignItems: 'center',
|
|
12
|
+
gap: '6px',
|
|
13
|
+
margin: '4px 0 8px',
|
|
14
|
+
cursor: 'pointer',
|
|
15
|
+
fontSize: 'var(--jp-ui-font-size1)',
|
|
16
|
+
} },
|
|
17
|
+
React.createElement("input", { type: "checkbox", checked: isActive, onChange: onChange }),
|
|
18
|
+
"Use current map extent"),
|
|
19
|
+
React.createElement("div", { style: isActive ? { pointerEvents: 'none', opacity: 0.4 } : undefined }, children)));
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IJupyterGISModel } from '@jupytergis/schema';
|
|
2
|
+
import { Dialog } from '@jupyterlab/apputils';
|
|
3
|
+
import { Signal } from '@lumino/signaling';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import type { IBaseFormProps } from "../../../types";
|
|
6
|
+
export interface IClipRasterByExtentFormProps extends IBaseFormProps {
|
|
7
|
+
ok?: Signal<Dialog<any>, number>;
|
|
8
|
+
model: IJupyterGISModel;
|
|
9
|
+
}
|
|
10
|
+
export declare function ClipRasterByExtentForm(props: IClipRasterByExtentFormProps): React.ReactElement | null;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
2
|
+
import { SchemaForm } from "../../../shared/formbuilder/objectform/SchemaForm";
|
|
3
|
+
import { useSchemaFormState } from "../../../shared/formbuilder/objectform/useSchemaFormState";
|
|
4
|
+
import { MapExtentToggle } from './MapExtentToggle';
|
|
5
|
+
import { useMapExtent } from './useMapExtent';
|
|
6
|
+
export function ClipRasterByExtentForm(props) {
|
|
7
|
+
const { schema: schemaProp, sourceData, syncData, model, filePath, ok, } = props;
|
|
8
|
+
const { formData, setFormData, schema, hasSchema } = useSchemaFormState({
|
|
9
|
+
sourceData,
|
|
10
|
+
schemaProp,
|
|
11
|
+
model,
|
|
12
|
+
});
|
|
13
|
+
const submitButtonRef = useRef(null);
|
|
14
|
+
const { isActive: mapExtentActive, extentRef, toggle } = useMapExtent(model);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (!ok) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const handler = () => { var _a; return (_a = submitButtonRef.current) === null || _a === void 0 ? void 0 : _a.click(); };
|
|
20
|
+
ok.connect(handler);
|
|
21
|
+
return () => {
|
|
22
|
+
ok.disconnect(handler);
|
|
23
|
+
};
|
|
24
|
+
}, [ok]);
|
|
25
|
+
const formContextValue = useMemo(() => ({ model, formData }), [model, formData]);
|
|
26
|
+
// Schema for the top section: inputLayer only
|
|
27
|
+
const schemaTop = useMemo(() => {
|
|
28
|
+
var _a;
|
|
29
|
+
return ((_a = schema === null || schema === void 0 ? void 0 : schema.properties) === null || _a === void 0 ? void 0 : _a.inputLayer)
|
|
30
|
+
? {
|
|
31
|
+
type: 'object',
|
|
32
|
+
properties: { inputLayer: schema.properties.inputLayer },
|
|
33
|
+
required: [],
|
|
34
|
+
additionalProperties: false,
|
|
35
|
+
}
|
|
36
|
+
: null;
|
|
37
|
+
}, [schema]);
|
|
38
|
+
// Schema for the extent section: xMin/yMin/xMax/yMax
|
|
39
|
+
// Required only when the user is entering them manually
|
|
40
|
+
const schemaExtent = useMemo(() => (schema === null || schema === void 0 ? void 0 : schema.properties)
|
|
41
|
+
? {
|
|
42
|
+
type: 'object',
|
|
43
|
+
properties: {
|
|
44
|
+
xMin: schema.properties.xMin,
|
|
45
|
+
yMin: schema.properties.yMin,
|
|
46
|
+
xMax: schema.properties.xMax,
|
|
47
|
+
yMax: schema.properties.yMax,
|
|
48
|
+
},
|
|
49
|
+
required: mapExtentActive
|
|
50
|
+
? []
|
|
51
|
+
: ['xMin', 'yMin', 'xMax', 'yMax'],
|
|
52
|
+
additionalProperties: false,
|
|
53
|
+
}
|
|
54
|
+
: null, [schema, mapExtentActive]);
|
|
55
|
+
// Schema for the bottom section: output options
|
|
56
|
+
const schemaBottom = useMemo(() => (schema === null || schema === void 0 ? void 0 : schema.properties)
|
|
57
|
+
? {
|
|
58
|
+
type: 'object',
|
|
59
|
+
properties: {
|
|
60
|
+
outputFileName: schema.properties.outputFileName,
|
|
61
|
+
embedOutputLayer: schema.properties.embedOutputLayer,
|
|
62
|
+
},
|
|
63
|
+
required: [],
|
|
64
|
+
additionalProperties: false,
|
|
65
|
+
}
|
|
66
|
+
: null, [schema]);
|
|
67
|
+
const handleTopChange = useCallback((data) => setFormData(prev => (Object.assign(Object.assign({}, prev), data))), [setFormData]);
|
|
68
|
+
const handleExtentChange = useCallback((data) => {
|
|
69
|
+
// When using map extent, rjsf may strip disabled-looking fields on some
|
|
70
|
+
// browsers; always restore the cached extent values to be safe.
|
|
71
|
+
setFormData(prev => (Object.assign(Object.assign(Object.assign({}, prev), data), (mapExtentActive ? extentRef.current : {}))));
|
|
72
|
+
}, [setFormData, mapExtentActive, extentRef]);
|
|
73
|
+
const handleBottomChange = useCallback((data) => setFormData(prev => (Object.assign(Object.assign({}, prev), data))), [setFormData]);
|
|
74
|
+
const handleSubmit = useCallback((data) => {
|
|
75
|
+
syncData === null || syncData === void 0 ? void 0 : syncData(Object.assign(Object.assign({}, formData), data));
|
|
76
|
+
}, [syncData, formData]);
|
|
77
|
+
const handleCheckboxChange = useCallback((e) => {
|
|
78
|
+
const extent = toggle(e.target.checked);
|
|
79
|
+
if (extent) {
|
|
80
|
+
setFormData(prev => (Object.assign(Object.assign({}, prev), extent)));
|
|
81
|
+
}
|
|
82
|
+
}, [toggle, setFormData]);
|
|
83
|
+
if (!hasSchema || !schemaTop || !schemaExtent || !schemaBottom) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
return (React.createElement("div", null,
|
|
87
|
+
React.createElement(SchemaForm, { schema: schemaTop, formData: { inputLayer: formData.inputLayer }, onChange: handleTopChange, onSubmit: () => undefined, formContext: formContextValue, filePath: filePath, liveValidate: false }),
|
|
88
|
+
React.createElement(MapExtentToggle, { isActive: mapExtentActive, onChange: handleCheckboxChange },
|
|
89
|
+
React.createElement(SchemaForm, { schema: schemaExtent, formData: {
|
|
90
|
+
xMin: formData.xMin,
|
|
91
|
+
yMin: formData.yMin,
|
|
92
|
+
xMax: formData.xMax,
|
|
93
|
+
yMax: formData.yMax,
|
|
94
|
+
}, onChange: handleExtentChange, onSubmit: () => undefined, formContext: formContextValue, filePath: filePath })),
|
|
95
|
+
React.createElement(SchemaForm, { schema: schemaBottom, formData: {
|
|
96
|
+
outputFileName: formData.outputFileName,
|
|
97
|
+
embedOutputLayer: formData.embedOutputLayer,
|
|
98
|
+
}, onChange: handleBottomChange, onSubmit: handleSubmit, formContext: formContextValue, filePath: filePath, submitButtonRef: submitButtonRef, liveValidate: false })));
|
|
99
|
+
}
|
package/lib/{formbuilder/objectform/process → features/processing/forms}/dissolveProcessForm.js
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
+
import { SchemaForm } from "../../../shared/formbuilder/objectform/SchemaForm";
|
|
3
|
+
import { processBaseSchema, removeFormEntry, } from "../../../shared/formbuilder/objectform/schemaUtils";
|
|
4
|
+
import { useSchemaFormState } from "../../../shared/formbuilder/objectform/useSchemaFormState";
|
|
2
5
|
import { deepCopy, loadFile } from "../../../tools";
|
|
3
|
-
import { SchemaForm } from '../SchemaForm';
|
|
4
|
-
import { processBaseSchema, removeFormEntry } from '../schemaUtils';
|
|
5
|
-
import { useSchemaFormState } from '../useSchemaFormState';
|
|
6
6
|
async function fetchFieldNames(model, layerId) {
|
|
7
7
|
var _a, _b, _c;
|
|
8
8
|
if (!layerId) {
|
|
@@ -32,7 +32,7 @@ async function fetchFieldNames(model, layerId) {
|
|
|
32
32
|
}
|
|
33
33
|
export function DissolveForm(props) {
|
|
34
34
|
const { schema: schemaProp, sourceData, syncData, model, filePath, formContext, ok, } = props;
|
|
35
|
-
const { formData, formContextValue, hasSchema,
|
|
35
|
+
const { formData, setFormData, formContextValue, hasSchema, handleSubmitBase, } = useSchemaFormState({ sourceData, schemaProp, model, syncData });
|
|
36
36
|
const [features, setFeatures] = useState([]);
|
|
37
37
|
const submitButtonRef = useRef(null);
|
|
38
38
|
useEffect(() => {
|
|
@@ -70,5 +70,5 @@ export function DissolveForm(props) {
|
|
|
70
70
|
if (!hasSchema) {
|
|
71
71
|
return null;
|
|
72
72
|
}
|
|
73
|
-
return (React.createElement(SchemaForm, { schema: schema, formData: formData, onChange:
|
|
73
|
+
return (React.createElement(SchemaForm, { schema: schema, formData: formData, onChange: setFormData, onSubmit: handleSubmitBase, formContext: formContextValue, filePath: filePath, uiSchema: uiSchema, submitButtonRef: submitButtonRef }));
|
|
74
74
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { Dialog } from '@jupyterlab/apputils';
|
|
5
5
|
import { Signal } from '@lumino/signaling';
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import type { IBaseFormProps } from "
|
|
7
|
+
import type { IBaseFormProps } from "../../../types";
|
|
8
8
|
export interface IProcessingFormWrapperProps extends IBaseFormProps {
|
|
9
9
|
/** Signal emitted by the dialog when OK is clicked; form submits when this fires. */
|
|
10
10
|
ok?: Signal<Dialog<any>, number>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useRef } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { SchemaForm } from "../../../shared/formbuilder/objectform/SchemaForm";
|
|
3
|
+
import { processBaseSchema, removeFormEntry, } from "../../../shared/formbuilder/objectform/schemaUtils";
|
|
4
|
+
import { useSchemaFormState } from "../../../shared/formbuilder/objectform/useSchemaFormState";
|
|
5
|
+
import { deepCopy } from "../../../tools";
|
|
6
6
|
export function DefaultProcessingForm(props) {
|
|
7
7
|
const { schema: schemaProp, sourceData, syncData, model, filePath, formContext, ok, } = props;
|
|
8
|
-
const { formData, schema, formContextValue, hasSchema,
|
|
8
|
+
const { formData, setFormData, schema, formContextValue, hasSchema, handleSubmitBase, } = useSchemaFormState({ sourceData, schemaProp, model, syncData });
|
|
9
9
|
const submitButtonRef = useRef(null);
|
|
10
10
|
useEffect(() => {
|
|
11
11
|
if (!ok) {
|
|
@@ -29,5 +29,5 @@ export function DefaultProcessingForm(props) {
|
|
|
29
29
|
if (!hasSchema) {
|
|
30
30
|
return null;
|
|
31
31
|
}
|
|
32
|
-
return (React.createElement(SchemaForm, { schema: schema, formData: formData, onChange:
|
|
32
|
+
return (React.createElement(SchemaForm, { schema: schema, formData: formData, onChange: setFormData, onSubmit: handleSubmitBase, formContext: formContextValue, filePath: filePath, uiSchema: uiSchema, submitButtonRef: submitButtonRef }));
|
|
33
33
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IJupyterGISModel } from '@jupytergis/schema';
|
|
2
|
+
import { Dialog } from '@jupyterlab/apputils';
|
|
3
|
+
import { Signal } from '@lumino/signaling';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import type { IBaseFormProps } from "../../../types";
|
|
6
|
+
export interface IRasterizeFormProps extends IBaseFormProps {
|
|
7
|
+
ok?: Signal<Dialog<any>, number>;
|
|
8
|
+
model: IJupyterGISModel;
|
|
9
|
+
}
|
|
10
|
+
export declare function RasterizeForm(props: IRasterizeFormProps): React.ReactElement | null;
|