@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,116 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import StoryContentSection from './components/StoryContentSection';
|
|
3
|
-
import StoryImageSection from './components/StoryImageSection';
|
|
4
|
-
import StoryNavBar from './components/StoryNavBar';
|
|
5
|
-
import StorySubtitleSection from './components/StorySubtitleSection';
|
|
6
|
-
import StoryTitleSection from './components/StoryTitleSection';
|
|
7
|
-
/**
|
|
8
|
-
* Returns which section should render the nav bar, or null if nav should be hidden.
|
|
9
|
-
*/
|
|
10
|
-
function getStoryNavPlacement(isSpecta, hasImage, storyType, isMobile) {
|
|
11
|
-
if (isSpecta) {
|
|
12
|
-
return isMobile ? null : 'subtitle-specta';
|
|
13
|
-
}
|
|
14
|
-
if (storyType !== 'guided') {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
return hasImage ? 'over-image' : 'below-title';
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Story viewer (presentational). Receives story state and callbacks from parent.
|
|
21
|
-
* Desktop scroll/sentinel/imperative handle live in SpectaDesktopView.
|
|
22
|
-
*/
|
|
23
|
-
function StoryViewerPanel({ model, isSpecta, isMobile = false, segmentContainerRef, storyData, currentIndex, activeSlide, layerName, handlePrev, handleNext, hasPrev, hasNext, setIndex, }) {
|
|
24
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
25
|
-
const [imageLoaded, setImageLoaded] = useState(false);
|
|
26
|
-
// Prefetch image when slide changes
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
var _a;
|
|
29
|
-
const imageUrl = (_a = activeSlide === null || activeSlide === void 0 ? void 0 : activeSlide.content) === null || _a === void 0 ? void 0 : _a.image;
|
|
30
|
-
if (!imageUrl) {
|
|
31
|
-
setImageLoaded(false);
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
// Reset state
|
|
35
|
-
setImageLoaded(false);
|
|
36
|
-
// Preload the image
|
|
37
|
-
const img = new Image();
|
|
38
|
-
img.onload = () => {
|
|
39
|
-
setImageLoaded(true);
|
|
40
|
-
};
|
|
41
|
-
img.onerror = () => {
|
|
42
|
-
setImageLoaded(false);
|
|
43
|
-
};
|
|
44
|
-
img.src = imageUrl;
|
|
45
|
-
// Cleanup: abort loading if component unmounts or slide changes
|
|
46
|
-
return () => {
|
|
47
|
-
img.onload = null;
|
|
48
|
-
img.onerror = null;
|
|
49
|
-
};
|
|
50
|
-
}, [(_a = activeSlide === null || activeSlide === void 0 ? void 0 : activeSlide.content) === null || _a === void 0 ? void 0 : _a.image]);
|
|
51
|
-
// ! TODO come back for this
|
|
52
|
-
// Listen for layer selection changes in unguided mode
|
|
53
|
-
useEffect(() => {
|
|
54
|
-
// ! TODO this logic (getting a single selected layer) is also in the processing index.ts, move to tools
|
|
55
|
-
const handleSelectedStorySegmentChange = () => {
|
|
56
|
-
var _a, _b;
|
|
57
|
-
// This is just to update the displayed content
|
|
58
|
-
// So bail early if we don't need to do that
|
|
59
|
-
if (!storyData || storyData.storyType !== 'unguided') {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
const localState = model.sharedModel.awareness.getLocalState();
|
|
63
|
-
if (!localState || !((_a = localState['selected']) === null || _a === void 0 ? void 0 : _a.value)) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
const selectedLayers = Object.keys(localState['selected'].value);
|
|
67
|
-
// Ensure only one layer is selected
|
|
68
|
-
if (selectedLayers.length !== 1) {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
const selectedLayerId = selectedLayers[0];
|
|
72
|
-
const selectedLayer = model.getLayer(selectedLayerId);
|
|
73
|
-
if (!selectedLayer || selectedLayer.type !== 'StorySegmentLayer') {
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
const index = (_b = storyData.storySegments) === null || _b === void 0 ? void 0 : _b.indexOf(selectedLayerId);
|
|
77
|
-
if (index === undefined || index === -1) {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
setIndex(index);
|
|
81
|
-
};
|
|
82
|
-
// ! TODO really only want to connect this un unguided mode
|
|
83
|
-
model.sharedModel.awareness.on('change', handleSelectedStorySegmentChange);
|
|
84
|
-
return () => {
|
|
85
|
-
model.sharedModel.awareness.off('change', handleSelectedStorySegmentChange);
|
|
86
|
-
};
|
|
87
|
-
}, [model, storyData, setIndex]);
|
|
88
|
-
if (!storyData || ((_b = storyData === null || storyData === void 0 ? void 0 : storyData.storySegments) === null || _b === void 0 ? void 0 : _b.length) === 0) {
|
|
89
|
-
return (React.createElement("div", { style: { padding: '1rem' } },
|
|
90
|
-
React.createElement("p", null, "No Segments available. Add one using the Add Layer menu.")));
|
|
91
|
-
}
|
|
92
|
-
const storyNavBarProps = {
|
|
93
|
-
onPrev: handlePrev,
|
|
94
|
-
onNext: handleNext,
|
|
95
|
-
hasPrev,
|
|
96
|
-
hasNext,
|
|
97
|
-
};
|
|
98
|
-
const hasImage = !!(((_c = activeSlide === null || activeSlide === void 0 ? void 0 : activeSlide.content) === null || _c === void 0 ? void 0 : _c.image) && imageLoaded);
|
|
99
|
-
const storyType = (_d = storyData.storyType) !== null && _d !== void 0 ? _d : 'guided';
|
|
100
|
-
const navPlacement = getStoryNavPlacement(isSpecta, hasImage, storyType, isMobile);
|
|
101
|
-
const navSlot = navPlacement !== null ? (React.createElement(StoryNavBar, Object.assign({ placement: navPlacement }, storyNavBarProps))) : null;
|
|
102
|
-
// Get transition time from current segment, default to 0.3s
|
|
103
|
-
const transitionTime = (_f = (_e = activeSlide === null || activeSlide === void 0 ? void 0 : activeSlide.transition) === null || _e === void 0 ? void 0 : _e.time) !== null && _f !== void 0 ? _f : 0.3;
|
|
104
|
-
return (React.createElement("div", { className: "jgis-story-viewer-panel" },
|
|
105
|
-
React.createElement("div", { ref: segmentContainerRef, key: currentIndex, className: "jgis-story-segment-container", style: {
|
|
106
|
-
animationDuration: `${transitionTime}s`,
|
|
107
|
-
} },
|
|
108
|
-
React.createElement("div", { id: "jgis-story-segment-header" },
|
|
109
|
-
React.createElement("h1", { className: "jgis-story-viewer-title" }, layerName !== null && layerName !== void 0 ? layerName : `Slide ${currentIndex + 1}`),
|
|
110
|
-
((_g = activeSlide === null || activeSlide === void 0 ? void 0 : activeSlide.content) === null || _g === void 0 ? void 0 : _g.image) && imageLoaded ? (React.createElement(StoryImageSection, { imageUrl: activeSlide.content.image, imageLoaded: imageLoaded, layerName: layerName !== null && layerName !== void 0 ? layerName : '', slideNumber: currentIndex, navSlot: navPlacement === 'over-image' ? navSlot : null })) : (React.createElement(StoryTitleSection, { title: (_h = storyData.title) !== null && _h !== void 0 ? _h : '', navSlot: navPlacement === 'below-title' ? navSlot : null })),
|
|
111
|
-
React.createElement(StorySubtitleSection, { title: (_k = (_j = activeSlide === null || activeSlide === void 0 ? void 0 : activeSlide.content) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '', navSlot: navPlacement === 'subtitle-specta' ? navSlot : null })),
|
|
112
|
-
React.createElement("div", { id: "jgis-story-segment-content" },
|
|
113
|
-
React.createElement(StoryContentSection, { markdown: (_m = (_l = activeSlide === null || activeSlide === void 0 ? void 0 : activeSlide.content) === null || _l === void 0 ? void 0 : _l.markdown) !== null && _m !== void 0 ? _m : '' })))));
|
|
114
|
-
}
|
|
115
|
-
StoryViewerPanel.displayName = 'StoryViewerPanel';
|
|
116
|
-
export default StoryViewerPanel;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useImperativeHandle, useRef, } from 'react';
|
|
2
|
-
import StoryViewerPanel from "../StoryViewerPanel";
|
|
3
|
-
import SpectaPresentationProgressBar from "../../../statusbar/SpectaPresentationProgressBar";
|
|
4
|
-
export function SpectaDesktopView({ model, isSpecta, containerRef, storyViewerPanelRef, segmentContainerRef, storyData, currentIndex, activeSlide, layerName, handlePrev, handleNext, hasPrev, hasNext, showGradient, setIndex, }) {
|
|
5
|
-
const scrollContainerRef = useRef(null);
|
|
6
|
-
const topSentinelRef = useRef(null);
|
|
7
|
-
const bottomSentinelRef = useRef(null);
|
|
8
|
-
const atTopRef = useRef(false);
|
|
9
|
-
const atBottomRef = useRef(false);
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
const root = scrollContainerRef.current;
|
|
12
|
-
const topEl = topSentinelRef.current;
|
|
13
|
-
const bottomEl = bottomSentinelRef.current;
|
|
14
|
-
if (!root || !topEl || !bottomEl) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
const observer = new IntersectionObserver((entries) => {
|
|
18
|
-
for (const entry of entries) {
|
|
19
|
-
if (entry.target === topEl) {
|
|
20
|
-
atTopRef.current = entry.isIntersecting;
|
|
21
|
-
}
|
|
22
|
-
else if (entry.target === bottomEl) {
|
|
23
|
-
atBottomRef.current = entry.isIntersecting;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}, { root, threshold: 0, rootMargin: '0px' });
|
|
27
|
-
observer.observe(topEl);
|
|
28
|
-
observer.observe(bottomEl);
|
|
29
|
-
return () => observer.disconnect();
|
|
30
|
-
}, [currentIndex]);
|
|
31
|
-
useImperativeHandle(storyViewerPanelRef, () => ({
|
|
32
|
-
handlePrev,
|
|
33
|
-
handleNext,
|
|
34
|
-
spectaMode: isSpecta,
|
|
35
|
-
hasPrev,
|
|
36
|
-
hasNext,
|
|
37
|
-
getAtTop: () => atTopRef.current,
|
|
38
|
-
getAtBottom: () => atBottomRef.current,
|
|
39
|
-
getScrollContainer: () => scrollContainerRef.current,
|
|
40
|
-
}), [handlePrev, handleNext, isSpecta, hasPrev, hasNext]);
|
|
41
|
-
return (React.createElement(React.Fragment, null,
|
|
42
|
-
React.createElement("div", { className: "jgis-specta-right-panel-container-mod jgis-right-panel-container", style: showGradient ? undefined : { width: '25%', borderRadius: 0 } },
|
|
43
|
-
React.createElement("div", { ref: containerRef, className: "jgis-specta-story-panel-container" },
|
|
44
|
-
React.createElement("div", { ref: scrollContainerRef, className: "jgis-story-viewer-panel-specta-mod", id: "jgis-story-segment-panel", style: showGradient ? undefined : { width: 'unset' } },
|
|
45
|
-
React.createElement("div", { ref: topSentinelRef, "aria-hidden": true, "data-story-scroll-sentinel": "top", style: { height: 1, minHeight: 1, pointerEvents: 'none' } }),
|
|
46
|
-
React.createElement(StoryViewerPanel, { model: model, isSpecta: isSpecta, segmentContainerRef: segmentContainerRef, storyData: storyData, currentIndex: currentIndex, activeSlide: activeSlide, layerName: layerName, handlePrev: handlePrev, handleNext: handleNext, hasPrev: hasPrev, hasNext: hasNext, setIndex: setIndex }),
|
|
47
|
-
React.createElement("div", { ref: bottomSentinelRef, "aria-hidden": true, "data-story-scroll-sentinel": "bottom", style: { height: 1, minHeight: 1, pointerEvents: 'none' } })))),
|
|
48
|
-
React.createElement(SpectaPresentationProgressBar, { model: model })));
|
|
49
|
-
}
|
package/lib/processing/index.js
DELETED
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { processingList, } from '@jupytergis/schema';
|
|
2
|
-
import { UUID } from '@lumino/coreutils';
|
|
3
|
-
import { ProcessingFormDialog } from '../dialogs/ProcessingFormDialog';
|
|
4
|
-
import { getGdal } from '../gdal';
|
|
5
|
-
import { processingFormToParam } from './processingFormToParam';
|
|
6
|
-
import { getGeoJSONDataFromLayerSource } from '../tools';
|
|
7
|
-
/**
|
|
8
|
-
* Get the currently selected layer from the shared model. Returns null if there is no selection or multiple layer is selected.
|
|
9
|
-
*/
|
|
10
|
-
export function getSingleSelectedLayer(tracker) {
|
|
11
|
-
var _a, _b, _c;
|
|
12
|
-
const model = (_a = tracker.currentWidget) === null || _a === void 0 ? void 0 : _a.model;
|
|
13
|
-
if (!model) {
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
const localState = model.sharedModel.awareness.getLocalState();
|
|
17
|
-
if (!localState || !((_b = localState['selected']) === null || _b === void 0 ? void 0 : _b.value)) {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
const selectedLayers = Object.keys(localState['selected'].value);
|
|
21
|
-
// Ensure only one layer is selected
|
|
22
|
-
if (selectedLayers.length !== 1) {
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
const selectedLayerId = selectedLayers[0];
|
|
26
|
-
const layers = (_c = model.sharedModel.layers) !== null && _c !== void 0 ? _c : {};
|
|
27
|
-
const selectedLayer = layers[selectedLayerId];
|
|
28
|
-
return selectedLayer && selectedLayer.parameters ? selectedLayer : null;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Check if the selected layer is of one of the specified types
|
|
32
|
-
*/
|
|
33
|
-
export function selectedLayerIsOfType(allowedTypes, tracker) {
|
|
34
|
-
const selectedLayer = getSingleSelectedLayer(tracker);
|
|
35
|
-
return selectedLayer ? allowedTypes.includes(selectedLayer.type) : false;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Extract GeoJSON from selected layer's source
|
|
39
|
-
*/
|
|
40
|
-
export async function getLayerGeoJSON(layer, sources, model) {
|
|
41
|
-
if (!layer.parameters || !layer.parameters.source) {
|
|
42
|
-
console.error('Selected layer does not have a valid source.');
|
|
43
|
-
return null;
|
|
44
|
-
}
|
|
45
|
-
const source = sources[layer.parameters.source];
|
|
46
|
-
if (!source || !source.parameters) {
|
|
47
|
-
console.error(`Source with ID ${layer.parameters.source} not found or missing path.`);
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
return await getGeoJSONDataFromLayerSource(source, model);
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Generalized processing function for Buffer & Dissolve
|
|
54
|
-
*/
|
|
55
|
-
export async function processLayer(tracker, formSchemaRegistry, processingType, processingOptions, app, filePath, processingInputs) {
|
|
56
|
-
var _a, _b, _c, _d;
|
|
57
|
-
// Resolve widget
|
|
58
|
-
const widget = filePath
|
|
59
|
-
? tracker.find(w => w.model.filePath === filePath)
|
|
60
|
-
: tracker.currentWidget;
|
|
61
|
-
if (!widget) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
const model = widget.model;
|
|
65
|
-
const sources = (_a = model.sharedModel.sources) !== null && _a !== void 0 ? _a : {};
|
|
66
|
-
const layers = (_b = model.sharedModel.layers) !== null && _b !== void 0 ? _b : {};
|
|
67
|
-
// Resolve layer
|
|
68
|
-
let selected = null;
|
|
69
|
-
if (processingInputs === null || processingInputs === void 0 ? void 0 : processingInputs.inputLayer) {
|
|
70
|
-
selected = layers[processingInputs.inputLayer];
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
selected = getSingleSelectedLayer(tracker);
|
|
74
|
-
}
|
|
75
|
-
if (!selected) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
const geojsonString = await getLayerGeoJSON(selected, sources, model);
|
|
79
|
-
if (!geojsonString) {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
// Resolve params
|
|
83
|
-
let processParam;
|
|
84
|
-
let embedOutputLayer = true;
|
|
85
|
-
let outputLayerName = selected.name;
|
|
86
|
-
if (processingInputs) {
|
|
87
|
-
processParam = processingInputs;
|
|
88
|
-
outputLayerName = `${processingType} Layer`;
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
const schema = Object.assign({}, formSchemaRegistry.getSchemas().get(processingType));
|
|
92
|
-
const selectedLayerId = Object.keys(((_d = (_c = model.sharedModel.awareness.getLocalState()) === null || _c === void 0 ? void 0 : _c.selected) === null || _d === void 0 ? void 0 : _d.value) || {})[0];
|
|
93
|
-
// Open ProcessingFormDialog
|
|
94
|
-
const formValues = await new Promise(resolve => {
|
|
95
|
-
const dialog = new ProcessingFormDialog({
|
|
96
|
-
title: processingType.charAt(0).toUpperCase() + processingType.slice(1),
|
|
97
|
-
schema,
|
|
98
|
-
model,
|
|
99
|
-
sourceData: {
|
|
100
|
-
inputLayer: selectedLayerId,
|
|
101
|
-
outputLayerName: selected.name,
|
|
102
|
-
},
|
|
103
|
-
formContext: 'create',
|
|
104
|
-
processingType,
|
|
105
|
-
syncData: (props) => {
|
|
106
|
-
resolve(props);
|
|
107
|
-
dialog.dispose();
|
|
108
|
-
},
|
|
109
|
-
});
|
|
110
|
-
dialog.launch();
|
|
111
|
-
});
|
|
112
|
-
if (!formValues) {
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
if (!processingList.includes(processingType)) {
|
|
116
|
-
console.error(`Unsupported processing type: ${processingType}`);
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
processParam = processingFormToParam(formValues, processingType);
|
|
120
|
-
embedOutputLayer = formValues.embedOutputLayer;
|
|
121
|
-
outputLayerName = formValues.outputLayerName;
|
|
122
|
-
}
|
|
123
|
-
// GDAL pre-processing
|
|
124
|
-
const fileBlob = new Blob([geojsonString], {
|
|
125
|
-
type: 'application/geo+json',
|
|
126
|
-
});
|
|
127
|
-
const geoFile = new File([fileBlob], 'data.geojson', {
|
|
128
|
-
type: 'application/geo+json',
|
|
129
|
-
});
|
|
130
|
-
const Gdal = await getGdal();
|
|
131
|
-
const result = await Gdal.open(geoFile);
|
|
132
|
-
const dataset = result.datasets[0];
|
|
133
|
-
const layerName = dataset.info.layers[0].name;
|
|
134
|
-
const sqlQuery = processingOptions.sqlQueryFn(layerName, processParam);
|
|
135
|
-
const fullOptions = processingOptions.options(sqlQuery);
|
|
136
|
-
await executeSQLProcessing(model, geojsonString, processingOptions.gdalFunction, fullOptions, outputLayerName, processingType, embedOutputLayer, tracker, app);
|
|
137
|
-
}
|
|
138
|
-
export async function executeSQLProcessing(model, geojsonString, gdalFunction, options, layerNamePrefix, processingType, embedOutputLayer, tracker, app) {
|
|
139
|
-
var _a;
|
|
140
|
-
const geoFile = new File([new Blob([geojsonString], { type: 'application/geo+json' })], 'data.geojson', { type: 'application/geo+json' });
|
|
141
|
-
const Gdal = await getGdal();
|
|
142
|
-
const result = await Gdal.open(geoFile);
|
|
143
|
-
if (result.datasets.length === 0) {
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
const dataset = result.datasets[0];
|
|
147
|
-
const outputFilePath = await Gdal[gdalFunction](dataset, options);
|
|
148
|
-
const processedBytes = await Gdal.getFileBytes(outputFilePath);
|
|
149
|
-
const processedGeoJSONString = new TextDecoder().decode(processedBytes);
|
|
150
|
-
Gdal.close(dataset);
|
|
151
|
-
const layerName = `${layerNamePrefix} ${processingType.charAt(0).toUpperCase() + processingType.slice(1)}`;
|
|
152
|
-
if (!embedOutputLayer) {
|
|
153
|
-
// Save the output as a file
|
|
154
|
-
const jgisFilePath = (_a = tracker.currentWidget) === null || _a === void 0 ? void 0 : _a.model.filePath;
|
|
155
|
-
const jgisDir = jgisFilePath
|
|
156
|
-
? jgisFilePath.substring(0, jgisFilePath.lastIndexOf('/'))
|
|
157
|
-
: '';
|
|
158
|
-
const outputFileName = `${layerNamePrefix}_${processingType}.json`;
|
|
159
|
-
const savePath = jgisDir ? `${jgisDir}/${outputFileName}` : outputFileName;
|
|
160
|
-
await app.serviceManager.contents.save(savePath, {
|
|
161
|
-
type: 'file',
|
|
162
|
-
format: 'text',
|
|
163
|
-
content: processedGeoJSONString,
|
|
164
|
-
});
|
|
165
|
-
const newSourceId = UUID.uuid4();
|
|
166
|
-
const sourceModel = {
|
|
167
|
-
type: 'GeoJSONSource',
|
|
168
|
-
name: outputFileName,
|
|
169
|
-
parameters: {
|
|
170
|
-
path: outputFileName,
|
|
171
|
-
},
|
|
172
|
-
};
|
|
173
|
-
const layerModel = {
|
|
174
|
-
type: 'VectorLayer',
|
|
175
|
-
parameters: { source: newSourceId },
|
|
176
|
-
visible: true,
|
|
177
|
-
name: layerName,
|
|
178
|
-
};
|
|
179
|
-
model.sharedModel.addSource(newSourceId, sourceModel);
|
|
180
|
-
model.addLayer(UUID.uuid4(), layerModel);
|
|
181
|
-
}
|
|
182
|
-
else {
|
|
183
|
-
// Embed the output directly into the model
|
|
184
|
-
const processedGeoJSON = JSON.parse(processedGeoJSONString);
|
|
185
|
-
const newSourceId = UUID.uuid4();
|
|
186
|
-
const sourceModel = {
|
|
187
|
-
type: 'GeoJSONSource',
|
|
188
|
-
name: `${layerName} Source`,
|
|
189
|
-
parameters: { data: processedGeoJSON },
|
|
190
|
-
};
|
|
191
|
-
const layerModel = {
|
|
192
|
-
type: 'VectorLayer',
|
|
193
|
-
parameters: { source: newSourceId },
|
|
194
|
-
visible: true,
|
|
195
|
-
name: layerName,
|
|
196
|
-
};
|
|
197
|
-
model.sharedModel.addSource(newSourceId, sourceModel);
|
|
198
|
-
model.addLayer(UUID.uuid4(), layerModel);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { ProcessingMerge, ProcessingLogicType, } from '@jupytergis/schema';
|
|
2
|
-
import { selectedLayerIsOfType, processLayer } from './index';
|
|
3
|
-
export function replaceInSql(sql, keyToVal, layerName) {
|
|
4
|
-
const replaceTemplateString = (args) => args.template.replace(RegExp(`{${args.variableName}}`, 'g'), args.value);
|
|
5
|
-
let out = replaceTemplateString({
|
|
6
|
-
variableName: 'layerName',
|
|
7
|
-
template: sql,
|
|
8
|
-
value: layerName,
|
|
9
|
-
});
|
|
10
|
-
for (const [key, value] of Object.entries(keyToVal)) {
|
|
11
|
-
out = replaceTemplateString({
|
|
12
|
-
variableName: key,
|
|
13
|
-
template: out,
|
|
14
|
-
value: value,
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
return out;
|
|
18
|
-
}
|
|
19
|
-
export function addProcessingCommands(app, commands, tracker, trans, formSchemaRegistry, processingSchemas) {
|
|
20
|
-
for (const processingElement of ProcessingMerge) {
|
|
21
|
-
const schemaKey = Object.keys(processingSchemas).find(k => k.toLowerCase() === processingElement.name.toLowerCase());
|
|
22
|
-
if (!schemaKey) {
|
|
23
|
-
continue;
|
|
24
|
-
}
|
|
25
|
-
if (processingElement.type === ProcessingLogicType.vector) {
|
|
26
|
-
commands.addCommand(`jupytergis:${processingElement.name}`, {
|
|
27
|
-
label: trans.__(processingElement.label),
|
|
28
|
-
describedBy: {
|
|
29
|
-
args: {
|
|
30
|
-
type: 'object',
|
|
31
|
-
properties: {
|
|
32
|
-
filePath: {
|
|
33
|
-
type: 'string',
|
|
34
|
-
description: 'Path to the .jGIS file',
|
|
35
|
-
},
|
|
36
|
-
layerId: {
|
|
37
|
-
type: 'string',
|
|
38
|
-
description: 'Layer ID to process',
|
|
39
|
-
},
|
|
40
|
-
params: processingSchemas[schemaKey],
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
isEnabled: () => selectedLayerIsOfType(['VectorLayer'], tracker),
|
|
45
|
-
execute: async (args) => {
|
|
46
|
-
await processLayer(tracker, formSchemaRegistry, processingElement.description, {
|
|
47
|
-
sqlQueryFn: (layerName, keyToVal) => replaceInSql(processingElement.operations.sql, keyToVal, layerName),
|
|
48
|
-
gdalFunction: processingElement.operations.gdalFunction,
|
|
49
|
-
options: (sqlQuery) => [
|
|
50
|
-
'-f',
|
|
51
|
-
'GeoJSON',
|
|
52
|
-
'-dialect',
|
|
53
|
-
'SQLITE',
|
|
54
|
-
'-sql',
|
|
55
|
-
sqlQuery,
|
|
56
|
-
'output.geojson',
|
|
57
|
-
],
|
|
58
|
-
}, app, args === null || args === void 0 ? void 0 : args.filePath, args === null || args === void 0 ? void 0 : args.processingInputs);
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
console.error('Unsupported process type');
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/lib/{formbuilder/objectform → features/layers/forms}/layer/storySegmentLayerForm.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelectorEntry.d.ts
RENAMED
|
File without changes
|
/package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelectorEntry.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/lib/{dialogs → features/layers}/symbology/components/color_ramp/RgbaColorPicker.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopContainer.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/lib/{formbuilder/objectform/process → features/processing/forms}/dissolveProcessForm.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableRow.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacGeodesFilterPanel.d.ts
RENAMED
|
File without changes
|
/package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacGeodesFilterPanel.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/lib/{stacBrowser → features/stac-browser}/components/shared/StacTemporalExtent.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/lib/{formbuilder → shared/formbuilder}/objectform/components/SegmentFormSymbology.d.ts
RENAMED
|
File without changes
|
/package/lib/{formbuilder → shared/formbuilder}/objectform/components/SourcePropertiesField.d.ts
RENAMED
|
File without changes
|
/package/lib/{formbuilder → shared/formbuilder}/objectform/components/StorySegmentReset.d.ts
RENAMED
|
File without changes
|