@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
package/lib/tools.js
CHANGED
|
@@ -2,11 +2,14 @@ import { showErrorMessage } from '@jupyterlab/apputils';
|
|
|
2
2
|
import { PathExt, URLExt } from '@jupyterlab/coreutils';
|
|
3
3
|
import { ServerConnection } from '@jupyterlab/services';
|
|
4
4
|
import { VectorTile } from '@mapbox/vector-tile';
|
|
5
|
+
import { GeoPackageAPI, GeoPackageTileRetriever } from '@ngageoint/geopackage';
|
|
5
6
|
import { compressors } from 'hyparquet-compressors';
|
|
7
|
+
import loadGpkg from 'ol-load-geopackage';
|
|
6
8
|
import Protobuf from 'pbf';
|
|
7
9
|
import shp from 'shpjs';
|
|
8
|
-
import LAYER_GALLERY from "../layer_gallery.json";
|
|
9
|
-
import { DEFAULT_STROKE_WIDTH } from "./
|
|
10
|
+
import LAYER_GALLERY from "../_generated/layer_gallery.json";
|
|
11
|
+
import { DEFAULT_STROKE_WIDTH } from "./features/layers/symbology/colorRampUtils";
|
|
12
|
+
import { getGdal } from './gdal';
|
|
10
13
|
export const debounce = (func, timeout = 100) => {
|
|
11
14
|
let timeoutId;
|
|
12
15
|
return (...args) => {
|
|
@@ -123,7 +126,7 @@ export function createDefaultLayerRegistry(layerBrowserRegistry) {
|
|
|
123
126
|
LAYER_THUMBNAILS[imageName] = r(key);
|
|
124
127
|
});
|
|
125
128
|
};
|
|
126
|
-
const context = require.context('../
|
|
129
|
+
const context = require.context('../layer_gallery_thumbnails', false, /\.(png|jpe?g|gif|svg)$/);
|
|
127
130
|
importAll(context);
|
|
128
131
|
for (const entry of Object.keys(LAYER_GALLERY)) {
|
|
129
132
|
const layerProvider = LAYER_GALLERY[entry];
|
|
@@ -294,7 +297,7 @@ export const fetchWithProxies = async (url, model, parseResponse, options, strat
|
|
|
294
297
|
const proxyUrl = settings && settings.proxyUrl ? settings.proxyUrl : 'https://corsproxy.io';
|
|
295
298
|
const strategies = {
|
|
296
299
|
direct: url => url,
|
|
297
|
-
internal: url =>
|
|
300
|
+
internal: url => `${INTERNAL_PROXY_BASE}?url=${encodeURIComponent(url)}`,
|
|
298
301
|
external: url => `${proxyUrl}/?url=${encodeURIComponent(url)}`,
|
|
299
302
|
};
|
|
300
303
|
const defaultOrder = ['direct', 'internal', 'external'];
|
|
@@ -354,6 +357,106 @@ export const loadGeoTiff = async (sourceInfo, model, file) => {
|
|
|
354
357
|
sourceUrl: url,
|
|
355
358
|
};
|
|
356
359
|
};
|
|
360
|
+
const geoPackageCache = new Map();
|
|
361
|
+
/**
|
|
362
|
+
* Convert curved geometries to linear geometries for a given GeoPackage vector file, and reproject the data
|
|
363
|
+
*
|
|
364
|
+
* @param fileBlob GeoPackage file as a blob
|
|
365
|
+
* @returns Blob URL created from converted file
|
|
366
|
+
*/
|
|
367
|
+
async function linearizeReprojectGpkg(fileBlob, projection) {
|
|
368
|
+
const gdal = await getGdal();
|
|
369
|
+
const file = new File([fileBlob], 'input.gpkg', {
|
|
370
|
+
type: 'application/geopackage+sqlite3',
|
|
371
|
+
});
|
|
372
|
+
const ds = await gdal.open(file);
|
|
373
|
+
await gdal.ogr2ogr(ds.datasets[0], ['-f', 'GPKG', '-nlt', 'CONVERT_TO_LINEAR', '-t_srs', projection], 'output');
|
|
374
|
+
const bytes = await gdal.getFileBytes('/output/output.gpkg');
|
|
375
|
+
const blob = new Blob([new Uint8Array(bytes)], {
|
|
376
|
+
type: 'application/geopackage+sqlite3',
|
|
377
|
+
});
|
|
378
|
+
const url = URL.createObjectURL(blob);
|
|
379
|
+
return url;
|
|
380
|
+
}
|
|
381
|
+
function loadGeoPackageVectorFile(fileBlob, projection, cacheFilename) {
|
|
382
|
+
if (geoPackageCache.has(cacheFilename)) {
|
|
383
|
+
return geoPackageCache.get(cacheFilename);
|
|
384
|
+
}
|
|
385
|
+
const loader = (async () => {
|
|
386
|
+
try {
|
|
387
|
+
const url = await linearizeReprojectGpkg(fileBlob, projection);
|
|
388
|
+
const [tables, slds] = await loadGpkg(url, projection);
|
|
389
|
+
const tableMap = {};
|
|
390
|
+
for (const name of Object.keys(tables)) {
|
|
391
|
+
tableMap[name] = {
|
|
392
|
+
source: tables[name],
|
|
393
|
+
sld: slds[name],
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
return tableMap;
|
|
397
|
+
}
|
|
398
|
+
catch (e) {
|
|
399
|
+
showErrorMessage('Failed to load GeoPackage file', e);
|
|
400
|
+
throw e;
|
|
401
|
+
}
|
|
402
|
+
})();
|
|
403
|
+
geoPackageCache.set(cacheFilename, loader);
|
|
404
|
+
return loader;
|
|
405
|
+
}
|
|
406
|
+
async function loadGeoPackageRasterFile(filepath, cacheFilename, model, file_content) {
|
|
407
|
+
if (geoPackageCache.has(cacheFilename)) {
|
|
408
|
+
return geoPackageCache.get(cacheFilename);
|
|
409
|
+
}
|
|
410
|
+
const loader = (async () => {
|
|
411
|
+
try {
|
|
412
|
+
let bytes;
|
|
413
|
+
if (filepath.startsWith('http://') || filepath.startsWith('https://')) {
|
|
414
|
+
bytes = await loadGkpgFromUrl(filepath, model);
|
|
415
|
+
}
|
|
416
|
+
else {
|
|
417
|
+
const arrayBuffer = await stringToArrayBuffer(file_content);
|
|
418
|
+
bytes = new Uint8Array(arrayBuffer);
|
|
419
|
+
}
|
|
420
|
+
const geoPackage = await GeoPackageAPI.open(bytes);
|
|
421
|
+
const tileTables = await geoPackage.getTileTables();
|
|
422
|
+
const tableMap = {};
|
|
423
|
+
tileTables.forEach(tableName => {
|
|
424
|
+
const tileDao = geoPackage.getTileDao(tableName);
|
|
425
|
+
const tileWidth = tileDao.tileMatrices[0].tile_width;
|
|
426
|
+
const tileHeight = tileDao.tileMatrices[0].tile_height;
|
|
427
|
+
tableMap[tableName] = {
|
|
428
|
+
gpr: new GeoPackageTileRetriever(tileDao, tileWidth, tileHeight),
|
|
429
|
+
tileDao,
|
|
430
|
+
};
|
|
431
|
+
});
|
|
432
|
+
return tableMap;
|
|
433
|
+
}
|
|
434
|
+
catch (error) {
|
|
435
|
+
showErrorMessage(`Failed to load GeoPackage file: ${cacheFilename}`, error);
|
|
436
|
+
throw error;
|
|
437
|
+
}
|
|
438
|
+
})();
|
|
439
|
+
geoPackageCache.set(cacheFilename, loader);
|
|
440
|
+
return loader;
|
|
441
|
+
}
|
|
442
|
+
async function loadGkpgFromUrl(filepath, model) {
|
|
443
|
+
const response = await fetchWithProxies(filepath, model, async (response) => {
|
|
444
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
445
|
+
return new Uint8Array(arrayBuffer);
|
|
446
|
+
});
|
|
447
|
+
if (!response) {
|
|
448
|
+
throw new Error(`Failed to fetch GeoPackage from URL: ${filepath}`);
|
|
449
|
+
}
|
|
450
|
+
return response;
|
|
451
|
+
}
|
|
452
|
+
export async function getGeoPackageTableNames(filepath, type) {
|
|
453
|
+
const cacheKey = filepath + (type === 'GeoPackageRasterSource' ? 'Raster' : 'Vector');
|
|
454
|
+
const tableMap = await geoPackageCache.get(cacheKey);
|
|
455
|
+
if (!tableMap) {
|
|
456
|
+
return [];
|
|
457
|
+
}
|
|
458
|
+
return Object.keys(tableMap);
|
|
459
|
+
}
|
|
357
460
|
/**
|
|
358
461
|
* Generalized file reader for different source types.
|
|
359
462
|
*
|
|
@@ -362,6 +465,9 @@ export const loadGeoTiff = async (sourceInfo, model, file) => {
|
|
|
362
465
|
*/
|
|
363
466
|
export const loadFile = async (fileInfo) => {
|
|
364
467
|
const { filepath, type, model } = fileInfo;
|
|
468
|
+
if (!filepath) {
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
365
471
|
if (filepath.startsWith('http://') || filepath.startsWith('https://')) {
|
|
366
472
|
switch (type) {
|
|
367
473
|
case 'ImageSource': {
|
|
@@ -412,6 +518,21 @@ export const loadFile = async (fileInfo) => {
|
|
|
412
518
|
showErrorMessage('Network error', `Failed to fetch ${filepath}`);
|
|
413
519
|
throw new Error(`Failed to fetch ${filepath}`);
|
|
414
520
|
}
|
|
521
|
+
case 'GeoPackageVectorSource': {
|
|
522
|
+
const projection = model.sharedModel.options.projection;
|
|
523
|
+
if (!projection) {
|
|
524
|
+
throw new Error(`Projection is not specified for ${filepath}`);
|
|
525
|
+
}
|
|
526
|
+
const fileBlob = await fetchWithProxies(filepath, model, async (response) => response.blob());
|
|
527
|
+
if (!fileBlob) {
|
|
528
|
+
showErrorMessage('Network error', `Failed to fetch ${filepath}`);
|
|
529
|
+
throw new Error(`Failed to fetch ${filepath}`);
|
|
530
|
+
}
|
|
531
|
+
return loadGeoPackageVectorFile(fileBlob, projection, filepath + 'Vector');
|
|
532
|
+
}
|
|
533
|
+
case 'GeoPackageRasterSource': {
|
|
534
|
+
return loadGeoPackageRasterFile(filepath, filepath + 'Raster', model);
|
|
535
|
+
}
|
|
415
536
|
case 'GeoParquetSource': {
|
|
416
537
|
const cached = await getFromIndexedDB(filepath);
|
|
417
538
|
if (cached) {
|
|
@@ -506,6 +627,17 @@ export const loadFile = async (fileInfo) => {
|
|
|
506
627
|
throw new Error('Invalid file format for tiff content.');
|
|
507
628
|
}
|
|
508
629
|
}
|
|
630
|
+
case 'GeoPackageVectorSource': {
|
|
631
|
+
const projection = model.sharedModel.options.projection;
|
|
632
|
+
if (!projection) {
|
|
633
|
+
throw new Error(`Projection is not specified for ${filepath}`);
|
|
634
|
+
}
|
|
635
|
+
const blob = await base64ToBlob(file.content, getMimeType(filepath));
|
|
636
|
+
return loadGeoPackageVectorFile(blob, projection, filepath + 'Vector');
|
|
637
|
+
}
|
|
638
|
+
case 'GeoPackageRasterSource': {
|
|
639
|
+
return loadGeoPackageRasterFile(filepath, filepath + 'Raster', undefined, file.content);
|
|
640
|
+
}
|
|
509
641
|
case 'GeoParquetSource': {
|
|
510
642
|
let buffer;
|
|
511
643
|
switch (file.format) {
|
|
@@ -563,6 +695,7 @@ export const base64ToBlob = async (base64, mimeType) => {
|
|
|
563
695
|
/**
|
|
564
696
|
* A mapping of file extensions to their corresponding MIME types.
|
|
565
697
|
*/
|
|
698
|
+
export const INTERNAL_PROXY_BASE = '/jupytergis_core/proxy';
|
|
566
699
|
export const MIME_TYPES = {
|
|
567
700
|
// from https://github.com/python/cpython/blob/3.9/Lib/mimetypes.py
|
|
568
701
|
'.a': 'application/octet-stream',
|
|
@@ -591,6 +724,7 @@ export const MIME_TYPES = {
|
|
|
591
724
|
'.etx': 'text/x-setext',
|
|
592
725
|
'.exe': 'application/octet-stream',
|
|
593
726
|
'.gif': 'image/gif',
|
|
727
|
+
'.gpkg': 'application/geopackage+vnd.sqlite3',
|
|
594
728
|
'.gtar': 'application/x-gtar',
|
|
595
729
|
'.h': 'text/plain',
|
|
596
730
|
'.hdf': 'application/x-hdf',
|
package/lib/types.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ type InternalRgbArray = number[];
|
|
|
13
13
|
export type ColorValue = RgbColorValue | HexColorValue;
|
|
14
14
|
export type SizeValue = number;
|
|
15
15
|
export type SymbologyValue = SizeValue | ColorValue | InternalRgbArray;
|
|
16
|
-
export type VectorRenderType = '
|
|
16
|
+
export type VectorRenderType = 'Heatmap' | 'Grammar';
|
|
17
17
|
/**
|
|
18
18
|
* Add jupytergisMaps object to the global variables.
|
|
19
19
|
*/
|
|
@@ -30,6 +30,11 @@ declare global {
|
|
|
30
30
|
declare const classificationModes: readonly ["quantile", "equal interval", "jenks", "pretty", "logarithmic", "continuous"];
|
|
31
31
|
export type ClassificationMode = (typeof classificationModes)[number];
|
|
32
32
|
export declare const SYMBOLOGY_VALID_LAYER_TYPES: string[];
|
|
33
|
+
export declare const STORY_TYPE: {
|
|
34
|
+
readonly guided: "guided";
|
|
35
|
+
readonly unguided: "unguided";
|
|
36
|
+
readonly verticalScroll: "Vertical Scroll";
|
|
37
|
+
};
|
|
33
38
|
export interface IWmsLayerInfo {
|
|
34
39
|
name: string;
|
|
35
40
|
title: string;
|
package/lib/types.js
CHANGED
|
@@ -9,6 +9,10 @@ const classificationModes = [
|
|
|
9
9
|
export const SYMBOLOGY_VALID_LAYER_TYPES = [
|
|
10
10
|
'VectorLayer',
|
|
11
11
|
'VectorTileLayer',
|
|
12
|
-
'
|
|
13
|
-
'HeatmapLayer',
|
|
12
|
+
'GeoTiffLayer',
|
|
14
13
|
];
|
|
14
|
+
export const STORY_TYPE = {
|
|
15
|
+
guided: 'guided',
|
|
16
|
+
unguided: 'unguided',
|
|
17
|
+
verticalScroll: 'Vertical Scroll',
|
|
18
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Menu } from '@lumino/widgets';
|
|
2
|
-
import { CommandIDs } from '
|
|
3
|
-
import { rasterIcon } from '
|
|
2
|
+
import { CommandIDs } from '../constants';
|
|
3
|
+
import { rasterIcon } from '../shared/icons';
|
|
4
4
|
export const vectorSubMenu = (commands) => {
|
|
5
5
|
const subMenu = new Menu({ commands });
|
|
6
6
|
subMenu.title.label = 'Add Vector Layer';
|
|
@@ -22,6 +22,10 @@ export const vectorSubMenu = (commands) => {
|
|
|
22
22
|
type: 'command',
|
|
23
23
|
command: CommandIDs.openNewGeoParquetDialog,
|
|
24
24
|
});
|
|
25
|
+
subMenu.addItem({
|
|
26
|
+
type: 'command',
|
|
27
|
+
command: CommandIDs.newGeoPackageVectorEntry,
|
|
28
|
+
});
|
|
25
29
|
return subMenu;
|
|
26
30
|
};
|
|
27
31
|
export const rasterSubMenu = (commands) => {
|
|
@@ -49,5 +53,9 @@ export const rasterSubMenu = (commands) => {
|
|
|
49
53
|
type: 'command',
|
|
50
54
|
command: CommandIDs.openNewGeoTiffDialog,
|
|
51
55
|
});
|
|
56
|
+
subMenu.addItem({
|
|
57
|
+
type: 'command',
|
|
58
|
+
command: CommandIDs.newGeoPackageRasterEntry,
|
|
59
|
+
});
|
|
52
60
|
return subMenu;
|
|
53
61
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ITabConfig {
|
|
3
|
+
name: string;
|
|
4
|
+
title: string;
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
contentClassName?: string;
|
|
7
|
+
content: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
interface ITabbedPanelProps {
|
|
10
|
+
tabs: ITabConfig[];
|
|
11
|
+
curTab: string;
|
|
12
|
+
onTabClick: (name: string) => void;
|
|
13
|
+
onTabListMouseDown?: React.MouseEventHandler<HTMLDivElement>;
|
|
14
|
+
onTabListTouchStart?: React.TouchEventHandler<HTMLDivElement>;
|
|
15
|
+
}
|
|
16
|
+
export declare const TabbedPanel: React.FC<ITabbedPanelProps>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TabsRoot, TabsContent, TabsList, TabsTrigger, } from '../../../shared/components/Tabs';
|
|
3
|
+
import { cn } from '../../../shared/components/utils';
|
|
4
|
+
export const TabbedPanel = ({ tabs, curTab, onTabClick, onTabListMouseDown, onTabListTouchStart, }) => {
|
|
5
|
+
const enabledTabs = tabs.filter(tab => tab.enabled);
|
|
6
|
+
const tabsListRef = React.useRef(null);
|
|
7
|
+
React.useEffect(() => {
|
|
8
|
+
const list = tabsListRef.current;
|
|
9
|
+
const active = list === null || list === void 0 ? void 0 : list.querySelector('[data-state="active"]');
|
|
10
|
+
if (list && active) {
|
|
11
|
+
const listCenter = list.offsetWidth / 2;
|
|
12
|
+
const triggerCenter = active.offsetLeft + active.offsetWidth / 2;
|
|
13
|
+
list.scrollLeft = triggerCenter - listCenter;
|
|
14
|
+
}
|
|
15
|
+
}, [curTab]);
|
|
16
|
+
return (React.createElement(TabsRoot, { className: "jgis-panel-tabs", curTab: curTab },
|
|
17
|
+
React.createElement(TabsList, { ref: tabsListRef, onMouseDown: onTabListMouseDown, onTouchStart: onTabListTouchStart }, enabledTabs.map(tab => (React.createElement(TabsTrigger, { className: "jGIS-layer-browser-category", key: tab.name, value: tab.name, onClick: () => onTabClick(tab.name) }, tab.title)))),
|
|
18
|
+
enabledTabs.map(tab => (React.createElement(TabsContent, { key: tab.name, value: tab.name, className: cn('jgis-panel-tab-content', tab.contentClassName) }, tab.content)))));
|
|
19
|
+
};
|
|
@@ -9,12 +9,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
+
import { faEllipsisVertical } from '@fortawesome/free-solid-svg-icons';
|
|
13
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
12
14
|
import { DOMUtils } from '@jupyterlab/apputils';
|
|
13
15
|
import { Button, LabIcon, caretDownIcon, caretRightIcon, } from '@jupyterlab/ui-components';
|
|
14
16
|
import React, { useEffect, useState, } from 'react';
|
|
15
|
-
import { CommandIDs, icons } from "
|
|
16
|
-
import { useGetSymbology } from "
|
|
17
|
-
import { nonVisibilityIcon, targetWithCenterIcon, visibilityIcon, } from "
|
|
17
|
+
import { CommandIDs, icons } from "../../../constants";
|
|
18
|
+
import { useGetSymbology } from "../../../features/layers/symbology/hooks/useGetSymbology";
|
|
19
|
+
import { nonVisibilityIcon, targetWithCenterIcon, visibilityIcon, } from "../../../shared/icons";
|
|
18
20
|
import { LegendItem } from './legendItem';
|
|
19
21
|
const LAYER_GROUP_CLASS = 'jp-gis-layerGroup';
|
|
20
22
|
const LAYER_GROUP_HEADER_CLASS = 'jp-gis-layerGroupHeader';
|
|
@@ -32,6 +34,7 @@ export const LayersBodyComponent = props => {
|
|
|
32
34
|
// Notify commands that need updating
|
|
33
35
|
props.commands.notifyCommandChanged(CommandIDs.identify);
|
|
34
36
|
props.commands.notifyCommandChanged(CommandIDs.temporalController);
|
|
37
|
+
props.commands.notifyCommandChanged(CommandIDs.toggleDrawFeatures);
|
|
35
38
|
};
|
|
36
39
|
const _onDragOver = (e) => {
|
|
37
40
|
e.stopPropagation();
|
|
@@ -174,13 +177,14 @@ const LayerGroupComponent = props => {
|
|
|
174
177
|
* Listen to the changes on the current layer.
|
|
175
178
|
*/
|
|
176
179
|
useEffect(() => {
|
|
177
|
-
const
|
|
180
|
+
const handleSelectedChanged = () => {
|
|
178
181
|
// TODO Support follow mode and remoteUser state
|
|
179
182
|
setSelected(isSelected(group.name, gisModel));
|
|
180
183
|
};
|
|
181
|
-
gisModel === null || gisModel === void 0 ? void 0 : gisModel.
|
|
184
|
+
gisModel === null || gisModel === void 0 ? void 0 : gisModel.selectedChanged.connect(handleSelectedChanged);
|
|
185
|
+
handleSelectedChanged();
|
|
182
186
|
return () => {
|
|
183
|
-
gisModel === null || gisModel === void 0 ? void 0 : gisModel.
|
|
187
|
+
gisModel === null || gisModel === void 0 ? void 0 : gisModel.selectedChanged.disconnect(handleSelectedChanged);
|
|
184
188
|
};
|
|
185
189
|
}, [gisModel, group.name]);
|
|
186
190
|
/**
|
|
@@ -210,6 +214,21 @@ const LayerGroupComponent = props => {
|
|
|
210
214
|
const handleRightClick = (event) => {
|
|
211
215
|
onClick({ type: 'group', item: name, event });
|
|
212
216
|
};
|
|
217
|
+
const handleGroupMoreClick = (e) => {
|
|
218
|
+
e.stopPropagation();
|
|
219
|
+
onClick({
|
|
220
|
+
type: 'group',
|
|
221
|
+
item: name,
|
|
222
|
+
event: e,
|
|
223
|
+
});
|
|
224
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
225
|
+
e.currentTarget.dispatchEvent(new MouseEvent('contextmenu', {
|
|
226
|
+
bubbles: true,
|
|
227
|
+
cancelable: true,
|
|
228
|
+
clientX: rect.left,
|
|
229
|
+
clientY: rect.bottom,
|
|
230
|
+
}));
|
|
231
|
+
};
|
|
213
232
|
const handleExpand = async () => {
|
|
214
233
|
state.save(`jupytergis:${group.name}`, { expanded: !open });
|
|
215
234
|
setOpen(!open);
|
|
@@ -245,7 +264,9 @@ const LayerGroupComponent = props => {
|
|
|
245
264
|
padding: '2px 4px',
|
|
246
265
|
fontSize: 'inherit',
|
|
247
266
|
fontFamily: 'inherit',
|
|
248
|
-
}, autoFocus: true })) : (React.createElement("span", { id: id, className: LAYER_TEXT_CLASS, tabIndex: -2 }, name))
|
|
267
|
+
}, autoFocus: true })) : (React.createElement("span", { id: id, className: LAYER_TEXT_CLASS, tabIndex: -2 }, name)),
|
|
268
|
+
React.createElement(Button, { className: "jp-gis-layer-more-btn", minimal: true, onClick: handleGroupMoreClick, title: "More options" },
|
|
269
|
+
React.createElement(FontAwesomeIcon, { icon: faEllipsisVertical }))),
|
|
249
270
|
open && (React.createElement("div", null, layers
|
|
250
271
|
.slice()
|
|
251
272
|
.reverse()
|
|
@@ -270,7 +291,7 @@ const LayerComponent = props => {
|
|
|
270
291
|
const [selected, setSelected] = useState(
|
|
271
292
|
// TODO Support multi-selection as `model?.jGISModel?.localState?.selected.value` does
|
|
272
293
|
isSelected(layerId, gisModel));
|
|
273
|
-
const [expanded, setExpanded] = useState(
|
|
294
|
+
const [expanded, setExpanded] = useState(true);
|
|
274
295
|
const [isEditing, setIsEditing] = useState(false);
|
|
275
296
|
const [editValue, setEditValue] = useState('');
|
|
276
297
|
const { symbology } = useGetSymbology({
|
|
@@ -287,13 +308,14 @@ const LayerComponent = props => {
|
|
|
287
308
|
* Listen to the changes on the current layer.
|
|
288
309
|
*/
|
|
289
310
|
useEffect(() => {
|
|
290
|
-
const
|
|
311
|
+
const handleSelectedChanged = () => {
|
|
291
312
|
// TODO Support follow mode and remoteUser state
|
|
292
313
|
setSelected(isSelected(layerId, gisModel));
|
|
293
314
|
};
|
|
294
|
-
gisModel === null || gisModel === void 0 ? void 0 : gisModel.
|
|
315
|
+
gisModel === null || gisModel === void 0 ? void 0 : gisModel.selectedChanged.connect(handleSelectedChanged);
|
|
316
|
+
handleSelectedChanged();
|
|
295
317
|
return () => {
|
|
296
|
-
gisModel === null || gisModel === void 0 ? void 0 : gisModel.
|
|
318
|
+
gisModel === null || gisModel === void 0 ? void 0 : gisModel.selectedChanged.disconnect(handleSelectedChanged);
|
|
297
319
|
};
|
|
298
320
|
}, [gisModel, layerId]);
|
|
299
321
|
/**
|
|
@@ -335,6 +357,21 @@ const LayerComponent = props => {
|
|
|
335
357
|
event,
|
|
336
358
|
});
|
|
337
359
|
};
|
|
360
|
+
const handleLayerMoreClick = (e) => {
|
|
361
|
+
e.stopPropagation();
|
|
362
|
+
onClick({
|
|
363
|
+
type: 'layer',
|
|
364
|
+
item: layerId,
|
|
365
|
+
event: e,
|
|
366
|
+
});
|
|
367
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
368
|
+
e.currentTarget.dispatchEvent(new MouseEvent('contextmenu', {
|
|
369
|
+
bubbles: true,
|
|
370
|
+
cancelable: true,
|
|
371
|
+
clientX: rect.left,
|
|
372
|
+
clientY: rect.bottom,
|
|
373
|
+
}));
|
|
374
|
+
};
|
|
338
375
|
const handleRenameSave = () => {
|
|
339
376
|
const newName = editValue.trim();
|
|
340
377
|
if (newName && newName !== name && gisModel) {
|
|
@@ -383,11 +420,17 @@ const LayerComponent = props => {
|
|
|
383
420
|
${isStorySegmentLayer ? 'jp-gis-storySegmentLayer' : ''}
|
|
384
421
|
${selected ? ' jp-mod-selected' : ''}`, draggable: true, onDragStart: Private.onDragStart, onDragOver: Private.onDragOver, onDragEnd: Private.onDragEnd, "data-id": layerId, style: { display: 'flex', flexDirection: 'column' } },
|
|
385
422
|
React.createElement("div", { className: LAYER_TITLE_CLASS, onClick: setSelection, onContextMenu: setSelection, style: { display: 'flex' } },
|
|
386
|
-
|
|
387
|
-
e
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
423
|
+
React.createElement(Button, { minimal: true, onClick: hasSupportedSymbology
|
|
424
|
+
? e => {
|
|
425
|
+
e.stopPropagation();
|
|
426
|
+
setExpanded(v => !v);
|
|
427
|
+
}
|
|
428
|
+
: undefined, title: hasSupportedSymbology
|
|
429
|
+
? expanded
|
|
430
|
+
? 'Hide legend'
|
|
431
|
+
: 'Show legend'
|
|
432
|
+
: undefined, style: { visibility: hasSupportedSymbology ? 'visible' : 'hidden' } },
|
|
433
|
+
React.createElement(LabIcon.resolveReact, { icon: expanded ? caretDownIcon : caretRightIcon, tag: "span" })),
|
|
391
434
|
isStorySegmentLayer ? (React.createElement("span", { className: LAYER_SLIDE_NUMBER_CLASS, title: "Slide number" }, getSlideNumber())) : (React.createElement(Button, { title: layer.visible ? 'Hide layer' : 'Show layer', onClick: toggleVisibility, minimal: true },
|
|
392
435
|
React.createElement(LabIcon.resolveReact, { icon: layer.visible ? visibilityIcon : nonVisibilityIcon, className: `${LAYER_ICON_CLASS}${layer.visible ? '' : ' jp-gis-mod-hidden'}`, tag: "span" }))),
|
|
393
436
|
icons.has(layer.type) && (React.createElement(LabIcon.resolveReact, Object.assign({}, icons.get(layer.type), { className: LAYER_ICON_CLASS }))),
|
|
@@ -400,8 +443,10 @@ const LayerComponent = props => {
|
|
|
400
443
|
fontFamily: 'inherit',
|
|
401
444
|
}, autoFocus: true })) : (React.createElement("span", { id: id, className: LAYER_TEXT_CLASS, tabIndex: -2, onDoubleClick: handleDoubleClick, title: "Double-click to zoom to layer" }, name)),
|
|
402
445
|
React.createElement(Button, { title: 'Move map to the extent of the layer', onClick: moveToExtent, minimal: true },
|
|
403
|
-
React.createElement(LabIcon.resolveReact, { icon: targetWithCenterIcon, className: LAYER_ICON_CLASS, tag: "span" }))
|
|
404
|
-
|
|
446
|
+
React.createElement(LabIcon.resolveReact, { icon: targetWithCenterIcon, className: LAYER_ICON_CLASS, tag: "span" })),
|
|
447
|
+
React.createElement(Button, { className: "jp-gis-layer-more-btn", minimal: true, onClick: handleLayerMoreClick, title: "More options" },
|
|
448
|
+
React.createElement(FontAwesomeIcon, { icon: faEllipsisVertical }))),
|
|
449
|
+
expanded && gisModel && hasSupportedSymbology && (React.createElement("div", { style: { marginTop: 6, width: '100%' }, onClick: setSelection },
|
|
405
450
|
React.createElement(LegendItem, { layerId: layerId, model: gisModel })))));
|
|
406
451
|
};
|
|
407
452
|
var Private;
|