@jupytergis/base 0.15.0 → 0.16.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commands/BaseCommandIDs.d.ts +5 -0
- package/lib/commands/BaseCommandIDs.js +5 -0
- package/lib/commands/index.js +218 -48
- package/lib/commands/operationCommands.js +2 -2
- package/lib/constants.js +9 -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/{formbuilder/objectform/layer/heatmapLayerForm.d.ts → features/layers/forms/layer/geoTiffLayerForm.d.ts} +1 -1
- package/lib/{formbuilder/objectform/layer/webGlLayerForm.js → features/layers/forms/layer/geoTiffLayerForm.js} +5 -5
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/hillshadeLayerForm.js +4 -4
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/index.d.ts +1 -2
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/index.js +1 -2
- 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 +316 -0
- 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 +520 -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 +4 -3
- 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/StopContainer.js +1 -1
- 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 +14 -2
- 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 +487 -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 +24 -0
- package/lib/features/layers/symbology/styleBuilder.js +158 -0
- package/lib/{dialogs → features/layers}/symbology/symbologyDialog.d.ts +1 -1
- package/lib/{dialogs → features/layers}/symbology/symbologyDialog.js +11 -13
- 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 +11 -0
- package/lib/features/story/components/ListStoryStageOverlay.js +150 -0
- package/lib/features/story/components/ListStoryTitleBar.d.ts +7 -0
- package/lib/features/story/components/ListStoryTitleBar.js +20 -0
- package/lib/features/story/components/ListStoryTitleBarDesktop.d.ts +2 -0
- package/lib/features/story/components/ListStoryTitleBarDesktop.js +55 -0
- package/lib/features/story/components/ListStoryTitleBarMobile.d.ts +2 -0
- package/lib/features/story/components/ListStoryTitleBarMobile.js +41 -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/features/story/components/SpectaMobileListModeContent.d.ts +13 -0
- package/lib/features/story/components/SpectaMobileListModeContent.js +36 -0
- package/lib/features/story/components/SpectaMobileSingleModeContent.d.ts +14 -0
- package/lib/{panelview/story-maps/components/SpectaMobileView.js → features/story/components/SpectaMobileSingleModeContent.js} +4 -6
- package/lib/{panelview/story-maps → features/story}/components/SpectaMobileView.d.ts +5 -3
- package/lib/features/story/components/SpectaMobileView.js +12 -0
- 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 +19 -0
- package/lib/features/story/context/ListStoryScrollTrackContext.js +186 -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 +21 -60
- 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 +43 -0
- package/lib/features/story/types/types.js +1 -0
- package/lib/features/story/utils/computeListStoryScrollState.d.ts +14 -0
- package/lib/features/story/utils/computeListStoryScrollState.js +79 -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/components/MainViewMapSurface.d.ts +15 -0
- package/lib/mainview/components/MainViewMapSurface.js +13 -0
- package/lib/mainview/components/MainViewOverlayLayer.d.ts +9 -0
- package/lib/mainview/components/MainViewOverlayLayer.js +11 -0
- package/lib/mainview/components/MainViewSidePanels.d.ts +17 -0
- package/lib/mainview/components/MainViewSidePanels.js +10 -0
- package/lib/mainview/components/MainViewSpectaPanel.d.ts +17 -0
- package/lib/mainview/components/MainViewSpectaPanel.js +8 -0
- package/lib/mainview/components/MainViewStoryStage.d.ts +13 -0
- package/lib/mainview/components/MainViewStoryStage.js +17 -0
- package/lib/mainview/components/PositionedFloater.d.ts +10 -0
- package/lib/mainview/components/PositionedFloater.js +7 -0
- package/lib/mainview/geoJsonFeaturePatch.d.ts +9 -0
- package/lib/mainview/geoJsonFeaturePatch.js +43 -0
- package/lib/mainview/mainView.d.ts +93 -14
- package/lib/mainview/mainView.js +1216 -686
- 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 -7
- 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 -2
- 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 +124 -2
- 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 +29 -1
- 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 +330 -9
- package/style/storySpectaArticleOverlay.css +129 -0
- package/style/symbologyDialog.css +522 -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/Heatmap.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/types/Heatmap.js +0 -89
- 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/heatmapLayerForm.js +0 -96
- 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/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/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
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import useGetBandInfo from "../../hooks/useGetBandInfo";
|
|
3
|
-
import { useOkSignal } from "../../hooks/useOkSignal";
|
|
4
|
-
import { saveSymbology, } from "../../symbologyUtils";
|
|
5
|
-
import BandRow from "../components/BandRow";
|
|
6
|
-
import { LoadingOverlay } from "../../../../shared/components/loading";
|
|
7
|
-
import { useLatest } from "../../../../shared/hooks/useLatest";
|
|
8
|
-
import { useEffectiveSymbologyParams } from '../../hooks/useEffectiveSymbologyParams';
|
|
9
|
-
const MultibandColor = ({ model, okSignalPromise, layerId, isStorySegmentOverride, segmentId, }) => {
|
|
10
|
-
if (!layerId) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
const layer = model.getLayer(layerId);
|
|
14
|
-
const params = useEffectiveSymbologyParams({
|
|
15
|
-
model,
|
|
16
|
-
layerId: layerId,
|
|
17
|
-
layer,
|
|
18
|
-
isStorySegmentOverride,
|
|
19
|
-
segmentId,
|
|
20
|
-
});
|
|
21
|
-
if (!params || !layer) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
const { bandRows, setBandRows, loading } = useGetBandInfo(model, layer);
|
|
25
|
-
const [selectedBands, setSelectedBands] = useState({
|
|
26
|
-
red: 1,
|
|
27
|
-
green: 2,
|
|
28
|
-
blue: 3,
|
|
29
|
-
alpha: 4,
|
|
30
|
-
});
|
|
31
|
-
const numOfBandsRef = useLatest(bandRows.length);
|
|
32
|
-
const selectedBandsRef = useLatest(selectedBands);
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
populateOptions();
|
|
35
|
-
}, []);
|
|
36
|
-
const populateOptions = async () => {
|
|
37
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
38
|
-
const layerParams = params;
|
|
39
|
-
const red = (_b = (_a = layerParams.symbologyState) === null || _a === void 0 ? void 0 : _a.redBand) !== null && _b !== void 0 ? _b : 1;
|
|
40
|
-
const green = (_d = (_c = layerParams.symbologyState) === null || _c === void 0 ? void 0 : _c.greenBand) !== null && _d !== void 0 ? _d : 2;
|
|
41
|
-
const blue = (_f = (_e = layerParams.symbologyState) === null || _e === void 0 ? void 0 : _e.blueBand) !== null && _f !== void 0 ? _f : 3;
|
|
42
|
-
const alpha = (_h = (_g = layerParams.symbologyState) === null || _g === void 0 ? void 0 : _g.alphaBand) !== null && _h !== void 0 ? _h : 4;
|
|
43
|
-
setSelectedBands({ red, green, blue, alpha });
|
|
44
|
-
};
|
|
45
|
-
const updateBand = (color, value) => {
|
|
46
|
-
setSelectedBands(prevBands => (Object.assign(Object.assign({}, prevBands), { [color]: value })));
|
|
47
|
-
};
|
|
48
|
-
const handleOk = () => {
|
|
49
|
-
const colorExpr = ['array'];
|
|
50
|
-
const colors = ['red', 'green', 'blue'];
|
|
51
|
-
colors.forEach(color => {
|
|
52
|
-
const bandValue = selectedBandsRef.current[color];
|
|
53
|
-
colorExpr.push(bandValue !== 0 ? ['band', bandValue] : 0);
|
|
54
|
-
});
|
|
55
|
-
// Push alpha if selected, else default to 0
|
|
56
|
-
if (selectedBandsRef.current.alpha) {
|
|
57
|
-
colorExpr.push(['band', selectedBandsRef.current.alpha]);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
colorExpr.push(['band', numOfBandsRef.current + 1]);
|
|
61
|
-
}
|
|
62
|
-
const symbologyState = {
|
|
63
|
-
renderType: 'Multiband Color',
|
|
64
|
-
redBand: selectedBandsRef.current.red,
|
|
65
|
-
greenBand: selectedBandsRef.current.green,
|
|
66
|
-
blueBand: selectedBandsRef.current.blue,
|
|
67
|
-
alphaBand: selectedBandsRef.current.alpha,
|
|
68
|
-
};
|
|
69
|
-
saveSymbology({
|
|
70
|
-
model,
|
|
71
|
-
layerId,
|
|
72
|
-
isStorySegmentOverride,
|
|
73
|
-
segmentId,
|
|
74
|
-
payload: {
|
|
75
|
-
symbologyState,
|
|
76
|
-
color: colorExpr,
|
|
77
|
-
},
|
|
78
|
-
mutateLayerBeforeSave: targetLayer => {
|
|
79
|
-
targetLayer.type = 'WebGlLayer';
|
|
80
|
-
},
|
|
81
|
-
});
|
|
82
|
-
};
|
|
83
|
-
useOkSignal(okSignalPromise, handleOk);
|
|
84
|
-
return (React.createElement("div", { className: "jp-gis-layer-symbology-container" },
|
|
85
|
-
React.createElement("div", { className: "jp-gis-band-container" },
|
|
86
|
-
React.createElement(LoadingOverlay, { loading: loading }),
|
|
87
|
-
React.createElement(BandRow, { label: "Red Band", index: selectedBands.red - 1, bandRow: bandRows[selectedBands.red - 1], bandRows: bandRows, setSelectedBand: val => updateBand('red', val >= 0 ? val : 0), setBandRows: setBandRows, isMultibandColor: true }),
|
|
88
|
-
React.createElement(BandRow, { label: "Green Band", index: selectedBands.green - 1, bandRow: bandRows[selectedBands.green - 1], bandRows: bandRows, setSelectedBand: val => updateBand('green', val >= 0 ? val : 0), setBandRows: setBandRows, isMultibandColor: true }),
|
|
89
|
-
React.createElement(BandRow, { label: "Blue Band", index: selectedBands.blue - 1, bandRow: bandRows[selectedBands.blue - 1], bandRows: bandRows, setSelectedBand: val => updateBand('blue', val >= 0 ? val : 0), setBandRows: setBandRows, isMultibandColor: true }),
|
|
90
|
-
React.createElement(BandRow, { label: "Alpha Band", index: selectedBands.alpha - 1, bandRow: bandRows[selectedBands.alpha - 1], bandRows: bandRows, setSelectedBand: val => updateBand('alpha', val >= 0 ? val : 0), setBandRows: setBandRows, isMultibandColor: true }))));
|
|
91
|
-
};
|
|
92
|
-
export default MultibandColor;
|
|
@@ -1,313 +0,0 @@
|
|
|
1
|
-
import { Button } from '@jupyterlab/ui-components';
|
|
2
|
-
import { UUID } from '@lumino/coreutils';
|
|
3
|
-
import React, { useEffect, useState } from 'react';
|
|
4
|
-
import { GeoTiffClassifications } from "../../classificationModes";
|
|
5
|
-
import ColorRampControls from "../../components/color_ramp/ColorRampControls";
|
|
6
|
-
import StopRow from "../../components/color_stops/StopRow";
|
|
7
|
-
import useGetBandInfo from "../../hooks/useGetBandInfo";
|
|
8
|
-
import { useOkSignal } from "../../hooks/useOkSignal";
|
|
9
|
-
import { saveSymbology, Utils, } from "../../symbologyUtils";
|
|
10
|
-
import BandRow from "../components/BandRow";
|
|
11
|
-
import { LoadingOverlay } from "../../../../shared/components/loading";
|
|
12
|
-
import { useLatest } from "../../../../shared/hooks/useLatest";
|
|
13
|
-
import { GlobalStateDbManager } from "../../../../store";
|
|
14
|
-
import { getColorMapList } from '../../colorRampUtils';
|
|
15
|
-
import { useEffectiveSymbologyParams } from '../../hooks/useEffectiveSymbologyParams';
|
|
16
|
-
const SingleBandPseudoColor = ({ model, okSignalPromise, layerId, isStorySegmentOverride, segmentId, }) => {
|
|
17
|
-
if (!layerId) {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
const layer = model.getLayer(layerId);
|
|
21
|
-
const params = useEffectiveSymbologyParams({
|
|
22
|
-
model,
|
|
23
|
-
layerId: layerId,
|
|
24
|
-
layer,
|
|
25
|
-
isStorySegmentOverride,
|
|
26
|
-
segmentId,
|
|
27
|
-
});
|
|
28
|
-
if (!params || !layer) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
const functions = ['discrete', 'linear', 'exact'];
|
|
32
|
-
const modeOptions = [
|
|
33
|
-
'continuous',
|
|
34
|
-
'equal interval',
|
|
35
|
-
'quantile',
|
|
36
|
-
];
|
|
37
|
-
const stateDb = GlobalStateDbManager.getInstance().getStateDb();
|
|
38
|
-
const { bandRows, setBandRows, loading } = useGetBandInfo(model, layer);
|
|
39
|
-
const [layerState, setLayerState] = useState();
|
|
40
|
-
const [selectedBand, setSelectedBand] = useState(1);
|
|
41
|
-
const [stopRows, setStopRows] = useState([]);
|
|
42
|
-
const [selectedFunction, setSelectedFunction] = useState('linear');
|
|
43
|
-
const [colorRampOptions, setColorRampOptions] = useState();
|
|
44
|
-
const stopRowsRef = useLatest(stopRows);
|
|
45
|
-
const bandRowsRef = useLatest(bandRows);
|
|
46
|
-
const selectedFunctionRef = useLatest(selectedFunction);
|
|
47
|
-
const colorRampOptionsRef = useLatest(colorRampOptions);
|
|
48
|
-
const selectedBandRef = useLatest(selectedBand);
|
|
49
|
-
useEffect(() => {
|
|
50
|
-
populateOptions();
|
|
51
|
-
}, []);
|
|
52
|
-
useEffect(() => {
|
|
53
|
-
buildColorInfo();
|
|
54
|
-
}, [bandRows]);
|
|
55
|
-
const populateOptions = async () => {
|
|
56
|
-
var _a, _b, _c, _d;
|
|
57
|
-
const layerState = (await (stateDb === null || stateDb === void 0 ? void 0 : stateDb.fetch(`jupytergis:${layerId}`)));
|
|
58
|
-
setLayerState(layerState);
|
|
59
|
-
const band = (_b = (_a = params.symbologyState) === null || _a === void 0 ? void 0 : _a.band) !== null && _b !== void 0 ? _b : 1;
|
|
60
|
-
const interpolation = (_d = (_c = params.symbologyState) === null || _c === void 0 ? void 0 : _c.interpolation) !== null && _d !== void 0 ? _d : 'linear';
|
|
61
|
-
setSelectedBand(band);
|
|
62
|
-
setSelectedFunction(interpolation);
|
|
63
|
-
};
|
|
64
|
-
const buildColorInfo = () => {
|
|
65
|
-
// This it to parse a color object on the layer
|
|
66
|
-
if (!params.color || !layerState) {
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
const color = params.color;
|
|
70
|
-
// If color is a string we don't need to parse
|
|
71
|
-
// Otherwise color expression should be an array (e.g. ['interpolate', ...] or ['case', ...])
|
|
72
|
-
if (!Array.isArray(color)) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
// ! wtf ? dont use statedb just read from the file??
|
|
76
|
-
const isQuantile = layerState.selectedMode === 'quantile';
|
|
77
|
-
const valueColorPairs = [];
|
|
78
|
-
// Color[0] is the operator used for the color expression
|
|
79
|
-
switch (color[0]) {
|
|
80
|
-
case 'interpolate': {
|
|
81
|
-
// First element is interpolate for linear selection
|
|
82
|
-
// Second element is type of interpolation (ie linear)
|
|
83
|
-
// Third is input value that stop values are compared with
|
|
84
|
-
// Fourth and Fifth are the transparent value for NoData values
|
|
85
|
-
// Sixth and on is value:color pairs
|
|
86
|
-
for (let i = 5; i < color.length; i += 2) {
|
|
87
|
-
const obj = {
|
|
88
|
-
id: UUID.uuid4(),
|
|
89
|
-
stop: scaleValue(Number(color[i]), isQuantile),
|
|
90
|
-
output: color[i + 1],
|
|
91
|
-
};
|
|
92
|
-
valueColorPairs.push(obj);
|
|
93
|
-
}
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
case 'case': {
|
|
97
|
-
// First element is case for discrete and exact selections
|
|
98
|
-
// Second element is the condition for NoData values
|
|
99
|
-
// Third element is transparent
|
|
100
|
-
// Fourth is the condition for actual values
|
|
101
|
-
// Within that, first is logical operator, second is band, third is value
|
|
102
|
-
// Fifth is color
|
|
103
|
-
// Last element is fallback value
|
|
104
|
-
for (let i = 3; i < color.length - 1; i += 2) {
|
|
105
|
-
const stopVal = Number(Array.isArray(color[i])
|
|
106
|
-
? color[i][2]
|
|
107
|
-
: color[i]);
|
|
108
|
-
const obj = {
|
|
109
|
-
id: UUID.uuid4(),
|
|
110
|
-
stop: scaleValue(stopVal, isQuantile),
|
|
111
|
-
output: color[i + 1],
|
|
112
|
-
};
|
|
113
|
-
valueColorPairs.push(obj);
|
|
114
|
-
}
|
|
115
|
-
break;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
setStopRows(valueColorPairs);
|
|
119
|
-
};
|
|
120
|
-
const handleOk = () => {
|
|
121
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
122
|
-
const bandRow = bandRowsRef.current[selectedBand - 1];
|
|
123
|
-
if (!bandRow) {
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
const isQuantile = ((_a = colorRampOptionsRef.current) === null || _a === void 0 ? void 0 : _a.selectedMode) === 'quantile';
|
|
127
|
-
// TODO: Different viewers will have different types
|
|
128
|
-
let colorExpr = [];
|
|
129
|
-
switch (selectedFunctionRef.current) {
|
|
130
|
-
case 'linear': {
|
|
131
|
-
colorExpr = ['interpolate', ['linear']];
|
|
132
|
-
colorExpr.push(['band', selectedBand]);
|
|
133
|
-
// Set NoData values to transparent
|
|
134
|
-
colorExpr.push(0.0, [0.0, 0.0, 0.0, 0.0]);
|
|
135
|
-
(_b = stopRowsRef.current) === null || _b === void 0 ? void 0 : _b.map(stop => {
|
|
136
|
-
colorExpr.push(unscaleValue(stop.stop, isQuantile));
|
|
137
|
-
colorExpr.push(stop.output);
|
|
138
|
-
});
|
|
139
|
-
break;
|
|
140
|
-
}
|
|
141
|
-
case 'discrete': {
|
|
142
|
-
colorExpr = ['case'];
|
|
143
|
-
// Set NoData values to transparent
|
|
144
|
-
colorExpr.push(['==', ['band', selectedBand], 0]);
|
|
145
|
-
colorExpr.push([0.0, 0.0, 0.0, 0.0]);
|
|
146
|
-
(_c = stopRowsRef.current) === null || _c === void 0 ? void 0 : _c.map(stop => {
|
|
147
|
-
colorExpr.push([
|
|
148
|
-
'<=',
|
|
149
|
-
['band', selectedBand],
|
|
150
|
-
unscaleValue(stop.stop, isQuantile),
|
|
151
|
-
]);
|
|
152
|
-
colorExpr.push(stop.output);
|
|
153
|
-
});
|
|
154
|
-
// fallback value
|
|
155
|
-
colorExpr.push([0, 0, 0, 0.0]);
|
|
156
|
-
break;
|
|
157
|
-
}
|
|
158
|
-
case 'exact': {
|
|
159
|
-
colorExpr = ['case'];
|
|
160
|
-
// Set NoData values to transparent
|
|
161
|
-
colorExpr.push(['==', ['band', selectedBand], 0]);
|
|
162
|
-
colorExpr.push([0.0, 0.0, 0.0, 0.0]);
|
|
163
|
-
(_d = stopRowsRef.current) === null || _d === void 0 ? void 0 : _d.map(stop => {
|
|
164
|
-
colorExpr.push([
|
|
165
|
-
'==',
|
|
166
|
-
['band', selectedBand],
|
|
167
|
-
unscaleValue(stop.stop, isQuantile),
|
|
168
|
-
]);
|
|
169
|
-
colorExpr.push(stop.output);
|
|
170
|
-
});
|
|
171
|
-
// fallback value
|
|
172
|
-
colorExpr.push([0, 0, 0, 0.0]);
|
|
173
|
-
break;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
const symbologyState = {
|
|
177
|
-
renderType: 'Singleband Pseudocolor',
|
|
178
|
-
band: selectedBandRef.current,
|
|
179
|
-
interpolation: selectedFunctionRef.current,
|
|
180
|
-
colorRamp: (_e = colorRampOptionsRef.current) === null || _e === void 0 ? void 0 : _e.selectedRamp,
|
|
181
|
-
nClasses: ((_f = colorRampOptionsRef.current) === null || _f === void 0 ? void 0 : _f.numberOfShades) !== undefined
|
|
182
|
-
? String(colorRampOptionsRef.current.numberOfShades)
|
|
183
|
-
: undefined,
|
|
184
|
-
mode: (_g = colorRampOptionsRef.current) === null || _g === void 0 ? void 0 : _g.selectedMode,
|
|
185
|
-
reverseRamp: (_h = colorRampOptionsRef.current) === null || _h === void 0 ? void 0 : _h.reverseRamp,
|
|
186
|
-
};
|
|
187
|
-
if (!isStorySegmentOverride) {
|
|
188
|
-
// Update source
|
|
189
|
-
const sourceId = (_j = layer === null || layer === void 0 ? void 0 : layer.parameters) === null || _j === void 0 ? void 0 : _j.source;
|
|
190
|
-
const source = model.getSource(sourceId);
|
|
191
|
-
if (!source || !source.parameters) {
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
const sourceInfo = source.parameters.urls[0];
|
|
195
|
-
sourceInfo.min = bandRow.stats.minimum;
|
|
196
|
-
sourceInfo.max = bandRow.stats.maximum;
|
|
197
|
-
source.parameters.urls[0] = sourceInfo;
|
|
198
|
-
model.sharedModel.updateSource(sourceId, source);
|
|
199
|
-
}
|
|
200
|
-
saveSymbology({
|
|
201
|
-
model,
|
|
202
|
-
layerId,
|
|
203
|
-
isStorySegmentOverride,
|
|
204
|
-
segmentId,
|
|
205
|
-
payload: {
|
|
206
|
-
symbologyState,
|
|
207
|
-
color: colorExpr,
|
|
208
|
-
},
|
|
209
|
-
mutateLayerBeforeSave: targetLayer => {
|
|
210
|
-
targetLayer.type = 'WebGlLayer';
|
|
211
|
-
},
|
|
212
|
-
});
|
|
213
|
-
};
|
|
214
|
-
useOkSignal(okSignalPromise, handleOk);
|
|
215
|
-
const addStopRow = () => {
|
|
216
|
-
setStopRows([
|
|
217
|
-
{
|
|
218
|
-
id: UUID.uuid4(),
|
|
219
|
-
stop: 0,
|
|
220
|
-
output: [0, 0, 0, 1],
|
|
221
|
-
},
|
|
222
|
-
...stopRows,
|
|
223
|
-
]);
|
|
224
|
-
};
|
|
225
|
-
const deleteStopRow = (index) => {
|
|
226
|
-
const newFilters = [...stopRows];
|
|
227
|
-
newFilters.splice(index, 1);
|
|
228
|
-
setStopRows(newFilters);
|
|
229
|
-
};
|
|
230
|
-
const buildColorInfoFromClassification = async (selectedMode, numberOfShades, selectedRamp, reverseRamp, setIsLoading) => {
|
|
231
|
-
var _a, _b;
|
|
232
|
-
// Update layer state with selected options
|
|
233
|
-
setColorRampOptions({
|
|
234
|
-
selectedRamp,
|
|
235
|
-
numberOfShades,
|
|
236
|
-
selectedMode,
|
|
237
|
-
reverseRamp,
|
|
238
|
-
});
|
|
239
|
-
let stops = [];
|
|
240
|
-
const currentBand = bandRows[selectedBand - 1];
|
|
241
|
-
const source = model.getSource((_a = layer === null || layer === void 0 ? void 0 : layer.parameters) === null || _a === void 0 ? void 0 : _a.source);
|
|
242
|
-
const sourceInfo = (_b = source === null || source === void 0 ? void 0 : source.parameters) === null || _b === void 0 ? void 0 : _b.urls[0];
|
|
243
|
-
const nClasses = selectedMode === 'continuous' ? 52 : numberOfShades;
|
|
244
|
-
setIsLoading(true);
|
|
245
|
-
switch (selectedMode) {
|
|
246
|
-
case 'quantile':
|
|
247
|
-
stops = await GeoTiffClassifications.classifyQuantileBreaks(nClasses, selectedBand, sourceInfo.url, selectedFunction);
|
|
248
|
-
break;
|
|
249
|
-
case 'continuous':
|
|
250
|
-
stops = GeoTiffClassifications.classifyContinuousBreaks(nClasses, currentBand.stats.minimum, currentBand.stats.maximum, selectedFunction);
|
|
251
|
-
break;
|
|
252
|
-
case 'equal interval':
|
|
253
|
-
stops = GeoTiffClassifications.classifyEqualIntervalBreaks(nClasses, currentBand.stats.minimum, currentBand.stats.maximum, selectedFunction);
|
|
254
|
-
break;
|
|
255
|
-
default:
|
|
256
|
-
console.warn('No mode selected');
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
setIsLoading(false);
|
|
260
|
-
const colorRamp = getColorMapList().find(c => c.name === selectedRamp);
|
|
261
|
-
if (!colorRamp) {
|
|
262
|
-
return;
|
|
263
|
-
}
|
|
264
|
-
const valueColorPairs = Utils.getValueColorPairs(stops, colorRamp, nClasses, reverseRamp);
|
|
265
|
-
setStopRows(valueColorPairs);
|
|
266
|
-
};
|
|
267
|
-
const scaleValue = (bandValue, isQuantile) => {
|
|
268
|
-
const currentBand = bandRows[selectedBand - 1];
|
|
269
|
-
if (!currentBand) {
|
|
270
|
-
return bandValue;
|
|
271
|
-
}
|
|
272
|
-
const min = isQuantile ? 1 : currentBand.stats.minimum;
|
|
273
|
-
const max = isQuantile ? 65535 : currentBand.stats.maximum;
|
|
274
|
-
return (bandValue * (max - min)) / (1 - 0) + min;
|
|
275
|
-
};
|
|
276
|
-
const unscaleValue = (value, isQuantile) => {
|
|
277
|
-
if (typeof value !== 'number') {
|
|
278
|
-
throw new Error('unscaleValue expects a number');
|
|
279
|
-
}
|
|
280
|
-
const currentBand = bandRowsRef.current[selectedBand - 1];
|
|
281
|
-
const min = isQuantile ? 1 : currentBand.stats.minimum;
|
|
282
|
-
const max = isQuantile ? 65535 : currentBand.stats.maximum;
|
|
283
|
-
return (value * (1 - 0) - min * (1 - 0)) / (max - min);
|
|
284
|
-
};
|
|
285
|
-
return (React.createElement("div", { className: "jp-gis-layer-symbology-container" },
|
|
286
|
-
React.createElement("div", { className: "jp-gis-band-container" },
|
|
287
|
-
React.createElement(LoadingOverlay, { loading: loading }),
|
|
288
|
-
React.createElement(BandRow, { label: "Band",
|
|
289
|
-
// Band numbers are 1 indexed
|
|
290
|
-
index: selectedBand - 1, bandRow: bandRows[selectedBand - 1], bandRows: bandRows, setSelectedBand: setSelectedBand, setBandRows: setBandRows })),
|
|
291
|
-
React.createElement("div", { className: "jp-gis-symbology-row" },
|
|
292
|
-
React.createElement("label", { htmlFor: "function-select" }, "Interpolation:"),
|
|
293
|
-
React.createElement("div", { className: "jp-select-wrapper" },
|
|
294
|
-
React.createElement("select", { name: "function-select", id: "function-select", className: "jp-mod-styled", value: selectedFunction, style: { textTransform: 'capitalize' }, onChange: event => {
|
|
295
|
-
setSelectedFunction(event.target.value);
|
|
296
|
-
} }, functions.map((func, funcIndex) => (React.createElement("option", { key: func, value: func, style: { textTransform: 'capitalize' } }, func)))))),
|
|
297
|
-
bandRows.length > 0 && (React.createElement(ColorRampControls, { layerParams: params, modeOptions: modeOptions, classifyFunc: buildColorInfoFromClassification, showModeRow: true, showRampSelector: true })),
|
|
298
|
-
React.createElement("div", { className: "jp-gis-stop-container" },
|
|
299
|
-
React.createElement("div", { className: "jp-gis-stop-labels", style: { display: 'flex', gap: 6 } },
|
|
300
|
-
React.createElement("span", { style: { flex: '0 0 18%' } },
|
|
301
|
-
"Value",
|
|
302
|
-
' ',
|
|
303
|
-
selectedFunction === 'discrete'
|
|
304
|
-
? '<='
|
|
305
|
-
: selectedFunction === 'exact'
|
|
306
|
-
? '='
|
|
307
|
-
: ''),
|
|
308
|
-
React.createElement("span", null, "Output Value")),
|
|
309
|
-
stopRows.map((stop, index) => (React.createElement(StopRow, { key: stop.id, index: index, dataValue: stop.stop, symbologyValue: stop.output, stopRows: stopRows, setStopRows: setStopRows, deleteRow: () => deleteStopRow(index) })))),
|
|
310
|
-
React.createElement("div", { className: "jp-gis-symbology-button-container" },
|
|
311
|
-
React.createElement(Button, { className: "jp-Dialog-button jp-mod-accept jp-mod-styled", onClick: addStopRow }, "Add Stop"))));
|
|
312
|
-
};
|
|
313
|
-
export default SingleBandPseudoColor;
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { useGetProperties } from "../hooks/useGetProperties";
|
|
3
|
-
import FilterComponent from "../../../panelview/filter-panel/Filter";
|
|
4
|
-
import { getColorCodeFeatureAttributes, getFeatureAttributes, getNumericFeatureAttributes, objectEntries, } from "../../../tools";
|
|
5
|
-
import Canonical from './types/Canonical';
|
|
6
|
-
import Categorized from './types/Categorized';
|
|
7
|
-
import Graduated from './types/Graduated';
|
|
8
|
-
import Heatmap from './types/Heatmap';
|
|
9
|
-
import SimpleSymbol from './types/SimpleSymbol';
|
|
10
|
-
const RENDER_TYPE_OPTIONS = {
|
|
11
|
-
'Single Symbol': {
|
|
12
|
-
component: SimpleSymbol,
|
|
13
|
-
supportedLayerTypes: ['VectorLayer', 'VectorTileLayer', 'HeatmapLayer'],
|
|
14
|
-
isTabbed: true,
|
|
15
|
-
},
|
|
16
|
-
Canonical: {
|
|
17
|
-
component: Canonical,
|
|
18
|
-
attributeChecker: getColorCodeFeatureAttributes,
|
|
19
|
-
supportedLayerTypes: ['VectorLayer', 'VectorTileLayer', 'HeatmapLayer'],
|
|
20
|
-
isTabbed: false,
|
|
21
|
-
},
|
|
22
|
-
Graduated: {
|
|
23
|
-
component: Graduated,
|
|
24
|
-
attributeChecker: getNumericFeatureAttributes,
|
|
25
|
-
supportedLayerTypes: ['VectorLayer', 'VectorTileLayer', 'HeatmapLayer'],
|
|
26
|
-
isTabbed: true,
|
|
27
|
-
},
|
|
28
|
-
Categorized: {
|
|
29
|
-
component: Categorized,
|
|
30
|
-
attributeChecker: getFeatureAttributes,
|
|
31
|
-
supportedLayerTypes: ['VectorLayer', 'VectorTileLayer', 'HeatmapLayer'],
|
|
32
|
-
isTabbed: true,
|
|
33
|
-
},
|
|
34
|
-
Heatmap: {
|
|
35
|
-
component: Heatmap,
|
|
36
|
-
supportedLayerTypes: ['VectorLayer', 'HeatmapLayer'],
|
|
37
|
-
isTabbed: false,
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
const getSelectableRenderTypes = (featureProperties, layerType) => {
|
|
41
|
-
const entries = objectEntries(RENDER_TYPE_OPTIONS).map(([renderType, renderTypeProps]) => [
|
|
42
|
-
renderType,
|
|
43
|
-
Object.assign(Object.assign(Object.assign({}, renderTypeProps), (renderTypeProps.attributeChecker
|
|
44
|
-
? {
|
|
45
|
-
selectableAttributesAndValues: renderTypeProps.attributeChecker(featureProperties),
|
|
46
|
-
}
|
|
47
|
-
: {})), { layerTypeSupported: renderTypeProps.supportedLayerTypes.includes(layerType) }),
|
|
48
|
-
]);
|
|
49
|
-
return Object.fromEntries(entries);
|
|
50
|
-
};
|
|
51
|
-
const VectorRendering = ({ model, okSignalPromise, layerId, isStorySegmentOverride = false, segmentId, }) => {
|
|
52
|
-
const [symbologyTab, setSymbologyTab] = useState('color');
|
|
53
|
-
const [selectedRenderType, setSelectedRenderType] = useState();
|
|
54
|
-
const layer = layerId !== undefined ? model.getLayer(layerId) : null;
|
|
55
|
-
useEffect(() => {
|
|
56
|
-
var _a, _b, _c, _d, _e;
|
|
57
|
-
if (!layer) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
let renderType;
|
|
61
|
-
if (isStorySegmentOverride) {
|
|
62
|
-
const segment = segmentId ? model.getLayer(segmentId) : undefined;
|
|
63
|
-
if (!segment) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
const override = (_b = (_a = segment.parameters) === null || _a === void 0 ? void 0 : _a.layerOverride) === null || _b === void 0 ? void 0 : _b.find((override) => override.targetLayer === layerId);
|
|
67
|
-
if (!override) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
renderType = (_c = override.symbologyState) === null || _c === void 0 ? void 0 : _c.renderType;
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
renderType = (_e = (_d = layer.parameters) === null || _d === void 0 ? void 0 : _d.symbologyState) === null || _e === void 0 ? void 0 : _e.renderType;
|
|
74
|
-
}
|
|
75
|
-
if (!renderType) {
|
|
76
|
-
renderType = layer.type === 'HeatmapLayer' ? 'Heatmap' : 'Single Symbol';
|
|
77
|
-
}
|
|
78
|
-
setSelectedRenderType(renderType);
|
|
79
|
-
}, []);
|
|
80
|
-
const { featureProperties, isLoading: featuresLoading } = useGetProperties({
|
|
81
|
-
layerId,
|
|
82
|
-
model: model,
|
|
83
|
-
});
|
|
84
|
-
if (!layerId || !(layer === null || layer === void 0 ? void 0 : layer.parameters)) {
|
|
85
|
-
return null;
|
|
86
|
-
}
|
|
87
|
-
if (featuresLoading) {
|
|
88
|
-
return React.createElement("p", null, "Loading...");
|
|
89
|
-
}
|
|
90
|
-
if (selectedRenderType === undefined) {
|
|
91
|
-
return null;
|
|
92
|
-
}
|
|
93
|
-
const selectableRenderTypes = getSelectableRenderTypes(featureProperties, layer.type);
|
|
94
|
-
const selectedRenderTypeProps = selectableRenderTypes[selectedRenderType];
|
|
95
|
-
return (React.createElement(React.Fragment, null,
|
|
96
|
-
selectedRenderTypeProps.isTabbed && (React.createElement("div", { className: "jp-gis-symbology-tabs" }, ['color', 'radius', 'filters'].map(tab => (React.createElement("button", { key: tab, className: `jp-gis-tab ${symbologyTab === tab ? 'active' : ''}`, onClick: () => setSymbologyTab(tab) }, tab.charAt(0).toUpperCase() + tab.slice(1)))))),
|
|
97
|
-
symbologyTab !== 'filters' && (React.createElement("div", { className: "jp-gis-symbology-row" },
|
|
98
|
-
React.createElement("label", { htmlFor: "render-type-select" }, "Render Type:"),
|
|
99
|
-
React.createElement("div", { className: "jp-select-wrapper" },
|
|
100
|
-
React.createElement("select", { name: "render-type-select", id: "render-type-select", className: "jp-mod-styled", value: selectedRenderType, onChange: event => {
|
|
101
|
-
setSelectedRenderType(event.target.value);
|
|
102
|
-
} }, objectEntries(selectableRenderTypes)
|
|
103
|
-
.filter(([renderType, renderTypeProps]) => renderTypeProps.layerTypeSupported &&
|
|
104
|
-
!(renderType === 'Heatmap' && symbologyTab === 'radius'))
|
|
105
|
-
.map(([renderType, _]) => (React.createElement("option", { key: renderType, value: renderType }, renderType))))))),
|
|
106
|
-
symbologyTab === 'filters' ? (React.createElement(FilterComponent, { model: model, okSignalPromise: okSignalPromise })) : (React.createElement(selectedRenderTypeProps.component, Object.assign({ model: model, okSignalPromise: okSignalPromise, layerId: layerId, isStorySegmentOverride: isStorySegmentOverride, segmentId: segmentId }, (selectedRenderTypeProps.isTabbed ? { symbologyTab } : {}), (selectedRenderTypeProps.selectableAttributesAndValues
|
|
107
|
-
? {
|
|
108
|
-
selectableAttributesAndValues: selectedRenderTypeProps.selectableAttributesAndValues,
|
|
109
|
-
}
|
|
110
|
-
: {}))))));
|
|
111
|
-
};
|
|
112
|
-
export default VectorRendering;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
const ValueSelect = ({ featureProperties, selectedValue, setSelectedValue, }) => {
|
|
3
|
-
return (React.createElement("div", { className: "jp-gis-symbology-row" },
|
|
4
|
-
React.createElement("label", { htmlFor: 'vector-value-select' }, "Value:"),
|
|
5
|
-
React.createElement("select", { name: 'vector-value-select', onChange: event => setSelectedValue(event.target.value), className: "jp-mod-styled" }, Object.keys(featureProperties)
|
|
6
|
-
.sort((a, b) => a.localeCompare(b))
|
|
7
|
-
.map((feature, index) => (React.createElement("option", { key: index, value: feature, selected: feature === selectedValue, className: "jp-mod-styled" }, feature))))));
|
|
8
|
-
};
|
|
9
|
-
export default ValueSelect;
|