@jupytergis/base 0.14.1 → 0.16.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commands/BaseCommandIDs.d.ts +6 -0
- package/lib/commands/BaseCommandIDs.js +6 -0
- package/lib/commands/index.js +245 -55
- package/lib/commands/operationCommands.js +2 -2
- package/lib/constants.js +6 -1
- package/lib/{panelview/annotationPanel.js → features/annotations/AnnotationsPanel.js} +1 -1
- package/lib/{annotations → features/annotations}/index.d.ts +1 -0
- package/lib/{annotations → features/annotations}/index.js +1 -0
- package/lib/{console → features/console}/consoleview.js +1 -1
- package/lib/{panelview/filter-panel → features/filter}/Filter.js +4 -4
- package/lib/{panelview/filter-panel → features/filter}/FilterRow.d.ts +3 -2
- package/lib/{panelview/filter-panel → features/filter}/FilterRow.js +2 -1
- package/lib/{panelview/identify-panel → features/identify}/IdentifyPanel.d.ts +2 -0
- package/lib/features/identify/IdentifyPanel.js +102 -0
- package/lib/features/identify/components/FeatureCard.d.ts +17 -0
- package/lib/features/identify/components/FeatureCard.js +26 -0
- package/lib/features/identify/components/FeatureCardHeader.d.ts +11 -0
- package/lib/features/identify/components/FeatureCardHeader.js +30 -0
- package/lib/features/identify/components/FeatureFloater.d.ts +7 -0
- package/lib/features/identify/components/FeatureFloater.js +19 -0
- package/lib/features/identify/components/FeaturePropertyList.d.ts +11 -0
- package/lib/features/identify/components/FeaturePropertyList.js +18 -0
- package/lib/features/identify/components/FeatureRow.d.ts +13 -0
- package/lib/features/identify/components/FeatureRow.js +25 -0
- package/lib/features/identify/components/PropertyEditors.d.ts +44 -0
- package/lib/features/identify/components/PropertyEditors.js +56 -0
- package/lib/features/identify/hooks/useIdentifyPropertyEditor.d.ts +11 -0
- package/lib/features/identify/hooks/useIdentifyPropertyEditor.js +132 -0
- package/lib/features/identify/types/editorTypes.d.ts +21 -0
- package/lib/features/identify/utils/getFeatureIdentifier.d.ts +5 -0
- package/lib/features/identify/utils/getFeatureIdentifier.js +14 -0
- package/lib/features/identify/utils/highlightLayer.d.ts +11 -0
- package/lib/features/identify/utils/highlightLayer.js +57 -0
- package/lib/features/identify/utils/highlightStyle.d.ts +7 -0
- package/lib/features/identify/utils/highlightStyle.js +40 -0
- package/lib/{dialogs/layerBrowserDialog.js → features/layer-browser/index.js} +2 -2
- package/lib/features/layers/forms/layer/geoTiffLayerForm.d.ts +3 -0
- package/lib/{formbuilder/objectform/layer/webGlLayerForm.js → features/layers/forms/layer/geoTiffLayerForm.js} +5 -5
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/heatmapLayerForm.js +4 -4
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/hillshadeLayerForm.js +4 -4
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/index.d.ts +1 -1
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/index.js +1 -1
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/layerform.d.ts +1 -1
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/layerform.js +4 -4
- package/lib/features/layers/forms/layer/storySegmentLayerForm.js +150 -0
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/vectorlayerform.js +4 -4
- package/lib/{formbuilder/objectform → features/layers/forms}/source/geojsonsource.js +5 -5
- package/lib/features/layers/forms/source/geopackagesource.d.ts +3 -0
- package/lib/features/layers/forms/source/geopackagesource.js +93 -0
- package/lib/{formbuilder/objectform → features/layers/forms}/source/geotiffsource.js +5 -5
- package/lib/{formbuilder/objectform → features/layers/forms}/source/index.d.ts +2 -0
- package/lib/{formbuilder/objectform → features/layers/forms}/source/index.js +2 -0
- package/lib/{formbuilder/objectform → features/layers/forms}/source/pathbasedsource.js +5 -5
- package/lib/{formbuilder/objectform → features/layers/forms}/source/sourceform.d.ts +1 -1
- package/lib/{formbuilder/objectform → features/layers/forms}/source/sourceform.js +4 -4
- package/lib/{formbuilder/objectform → features/layers/forms}/source/tilesourceform.js +4 -4
- package/lib/features/layers/forms/source/wmsTileSource.d.ts +4 -0
- package/lib/features/layers/forms/source/wmsTileSource.js +78 -0
- package/lib/{dialogs → features/layers}/layerCreationFormDialog.d.ts +1 -1
- package/lib/{dialogs → features/layers}/layerCreationFormDialog.js +1 -1
- package/lib/features/layers/symbology/Grammar.d.ts +11 -0
- package/lib/features/layers/symbology/Grammar.js +235 -0
- package/lib/{dialogs/symbology/vector_layer/types → features/layers/symbology}/Heatmap.d.ts +1 -1
- package/lib/{dialogs/symbology/vector_layer/types → features/layers/symbology}/Heatmap.js +30 -10
- package/lib/{dialogs → features/layers}/symbology/classificationModes.d.ts +6 -6
- package/lib/{dialogs → features/layers}/symbology/classificationModes.js +57 -57
- package/lib/features/layers/symbology/colorRampUtils.d.ts +65 -0
- package/lib/features/layers/symbology/colorRampUtils.js +242 -0
- package/lib/features/layers/symbology/components/MappingRow.d.ts +40 -0
- package/lib/features/layers/symbology/components/MappingRow.js +516 -0
- package/lib/features/layers/symbology/components/NumericInput.d.ts +20 -0
- package/lib/features/layers/symbology/components/NumericInput.js +44 -0
- package/lib/features/layers/symbology/components/ScaleEditor.d.ts +33 -0
- package/lib/features/layers/symbology/components/ScaleEditor.js +221 -0
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampControls.d.ts +1 -1
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampControls.js +3 -2
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelector.d.ts +2 -1
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelector.js +12 -15
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelectorEntry.d.ts +2 -2
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelectorEntry.js +3 -11
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ModeSelectRow.d.ts +1 -1
- package/lib/features/layers/symbology/components/color_ramp/RgbaColorPicker.d.ts +13 -0
- package/lib/features/layers/symbology/components/color_ramp/RgbaColorPicker.js +128 -0
- package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopContainer.js +3 -1
- package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopRow.d.ts +2 -2
- package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopRow.js +12 -7
- package/lib/features/layers/symbology/grammarToOLLayer.d.ts +27 -0
- package/lib/features/layers/symbology/grammarToOLLayer.js +145 -0
- package/lib/features/layers/symbology/grammarToOLStyle.d.ts +32 -0
- package/lib/features/layers/symbology/grammarToOLStyle.js +467 -0
- package/lib/{dialogs → features/layers}/symbology/hooks/useGetBandInfo.d.ts +1 -1
- package/lib/{dialogs → features/layers}/symbology/hooks/useGetBandInfo.js +1 -1
- package/lib/{dialogs → features/layers}/symbology/hooks/useGetProperties.js +1 -1
- package/lib/{dialogs → features/layers}/symbology/hooks/useGetSymbology.js +4 -2
- package/lib/features/layers/symbology/styleBuilder.d.ts +21 -0
- package/lib/features/layers/symbology/styleBuilder.js +145 -0
- package/lib/{dialogs → features/layers}/symbology/symbologyDialog.d.ts +3 -2
- package/lib/{dialogs → features/layers}/symbology/symbologyDialog.js +12 -12
- package/lib/features/layers/symbology/symbologyUtils.d.ts +41 -0
- package/lib/features/layers/symbology/symbologyUtils.js +114 -0
- package/lib/{panelview/objectproperties.d.ts → features/objectproperties/index.d.ts} +1 -1
- package/lib/{panelview/objectproperties.js → features/objectproperties/index.js} +5 -10
- package/lib/{dialogs → features/processing}/ProcessingFormDialog.d.ts +1 -1
- package/lib/{dialogs → features/processing}/ProcessingFormDialog.js +28 -14
- package/lib/features/processing/forms/MapExtentToggle.d.ts +13 -0
- package/lib/features/processing/forms/MapExtentToggle.js +20 -0
- package/lib/features/processing/forms/clipRasterByExtentForm.d.ts +10 -0
- package/lib/features/processing/forms/clipRasterByExtentForm.js +99 -0
- package/lib/{formbuilder/objectform/process → features/processing/forms}/dissolveProcessForm.js +5 -5
- package/lib/{formbuilder/objectform → features/processing/forms}/processingForm.d.ts +1 -1
- package/lib/{formbuilder/objectform → features/processing/forms}/processingForm.js +6 -6
- package/lib/features/processing/forms/rasterizeForm.d.ts +10 -0
- package/lib/features/processing/forms/rasterizeForm.js +75 -0
- package/lib/features/processing/forms/useMapExtent.d.ts +22 -0
- package/lib/features/processing/forms/useMapExtent.js +57 -0
- package/lib/{processing → features/processing}/index.d.ts +19 -2
- package/lib/features/processing/index.js +1246 -0
- package/lib/{processing → features/processing}/processingCommands.d.ts +1 -1
- package/lib/features/processing/processingCommands.js +168 -0
- package/lib/features/processing/serverProcessing.d.ts +51 -0
- package/lib/features/processing/serverProcessing.js +99 -0
- package/lib/{stacBrowser → features/stac-browser}/components/StacPanel.js +2 -2
- package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableComboBox.js +64 -21
- package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableRow.js +1 -1
- package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/StacFilterExtensionPanel.js +2 -2
- package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/StacQueryableFilters.js +1 -1
- package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacFilterSection.js +3 -3
- package/lib/{stacBrowser → features/stac-browser}/components/shared/StacPanelResults.js +3 -3
- package/lib/{stacBrowser → features/stac-browser}/components/shared/StacSpatialExtent.js +1 -1
- package/lib/{stacBrowser → features/stac-browser}/components/shared/StacTemporalExtent.js +1 -1
- package/lib/{stacBrowser → features/stac-browser}/context/StacResultsContext.js +2 -2
- package/lib/{stacBrowser → features/stac-browser}/hooks/useGeodesSearch.js +2 -2
- package/lib/{stacBrowser → features/stac-browser}/hooks/useStacFilterExtension.d.ts +1 -1
- package/lib/{stacBrowser → features/stac-browser}/hooks/useStacFilterExtension.js +198 -114
- package/lib/{stacBrowser → features/stac-browser}/hooks/useStacSearch.d.ts +1 -0
- package/lib/{stacBrowser → features/stac-browser}/hooks/useStacSearch.js +19 -11
- package/lib/features/stac-browser/types/types.js +1 -0
- package/lib/{panelview/story-maps → features/story}/SpectaPanel.d.ts +4 -1
- package/lib/{panelview/story-maps → features/story}/SpectaPanel.js +3 -4
- package/lib/{panelview/story-maps → features/story}/StoryEditorPanel.js +1 -1
- package/lib/{panelview/story-maps → features/story}/StoryViewerPanel.d.ts +12 -11
- package/lib/features/story/StoryViewerPanel.js +64 -0
- package/lib/features/story/__tests__/fixtures/listStoryTestItems.d.ts +9 -0
- package/lib/features/story/__tests__/fixtures/listStoryTestItems.js +21 -0
- package/lib/features/story/components/ListStoryMapOverlayPanel.d.ts +10 -0
- package/lib/features/story/components/ListStoryMapOverlayPanel.js +11 -0
- package/lib/features/story/components/ListStoryMarkdownMeasurePane.d.ts +11 -0
- package/lib/features/story/components/ListStoryMarkdownMeasurePane.js +55 -0
- package/lib/features/story/components/ListStoryOverlayMarkdown.d.ts +15 -0
- package/lib/features/story/components/ListStoryOverlayMarkdown.js +93 -0
- package/lib/features/story/components/ListStoryStageOverlay.d.ts +12 -0
- package/lib/features/story/components/ListStoryStageOverlay.js +132 -0
- package/lib/features/story/components/ListStoryVirtualScrollTrack.d.ts +6 -0
- package/lib/features/story/components/ListStoryVirtualScrollTrack.js +7 -0
- package/lib/{panelview/story-maps → features/story}/components/SpectaDesktopView.d.ts +4 -2
- package/lib/features/story/components/SpectaDesktopView.js +67 -0
- package/lib/{panelview/story-maps → features/story}/components/SpectaMobileView.d.ts +2 -4
- package/lib/{panelview/story-maps → features/story}/components/SpectaMobileView.js +3 -3
- package/lib/features/story/components/SpectaSingleModeContent.d.ts +18 -0
- package/lib/features/story/components/SpectaSingleModeContent.js +8 -0
- package/lib/features/story/context/ListStoryScrollTrackContext.d.ts +15 -0
- package/lib/features/story/context/ListStoryScrollTrackContext.js +142 -0
- package/lib/features/story/hooks/useCurrentSegmentIndex.d.ts +3 -0
- package/lib/features/story/hooks/useCurrentSegmentIndex.js +17 -0
- package/lib/features/story/hooks/useListStoryScroll.d.ts +15 -0
- package/lib/features/story/hooks/useListStoryScroll.js +107 -0
- package/lib/features/story/hooks/useQueuedMarkdownHeightMeasure.d.ts +19 -0
- package/lib/features/story/hooks/useQueuedMarkdownHeightMeasure.js +56 -0
- package/lib/features/story/hooks/useStoryImagePreload.d.ts +1 -0
- package/lib/features/story/hooks/useStoryImagePreload.js +24 -0
- package/lib/{panelview/story-maps → features/story}/hooks/useStoryMap.d.ts +2 -7
- package/lib/{panelview/story-maps → features/story}/hooks/useStoryMap.js +20 -44
- package/lib/features/story/hooks/useStoryScrollState.d.ts +21 -0
- package/lib/features/story/hooks/useStoryScrollState.js +39 -0
- package/lib/features/story/hooks/useStorySegmentSync.d.ts +8 -0
- package/lib/features/story/hooks/useStorySegmentSync.js +51 -0
- package/lib/features/story/types/types.d.ts +38 -0
- package/lib/features/story/types/types.js +1 -0
- package/lib/features/story/utils/computeListStoryScrollState.d.ts +12 -0
- package/lib/features/story/utils/computeListStoryScrollState.js +70 -0
- package/lib/features/story/utils/listStoryMeasureQueue.d.ts +11 -0
- package/lib/features/story/utils/listStoryMeasureQueue.js +14 -0
- package/lib/features/story/utils/listStoryScrollTrack.d.ts +17 -0
- package/lib/features/story/utils/listStoryScrollTrack.js +72 -0
- package/lib/features/story/utils/spectaPresentation.d.ts +9 -0
- package/lib/features/story/utils/spectaPresentation.js +37 -0
- package/lib/features/story/utils/storySegmentViewItems.d.ts +5 -0
- package/lib/features/story/utils/storySegmentViewItems.js +30 -0
- package/lib/index.d.ts +11 -9
- package/lib/index.js +11 -9
- package/lib/keybindings.json +5 -0
- package/lib/mainview/OpenEOTileLayer.d.ts +49 -0
- package/lib/mainview/OpenEOTileLayer.js +179 -0
- package/lib/mainview/TemporalSlider.js +11 -9
- package/lib/mainview/geoJsonFeaturePatch.d.ts +9 -0
- package/lib/mainview/geoJsonFeaturePatch.js +43 -0
- package/lib/mainview/mainView.d.ts +93 -8
- package/lib/mainview/mainView.js +1286 -529
- package/lib/mainview/mainviewwidget.d.ts +5 -1
- package/lib/mainview/mainviewwidget.js +4 -2
- package/lib/shared/components/Button.d.ts +1 -1
- package/lib/shared/components/DropdownMenu.d.ts +1 -0
- package/lib/shared/components/DropdownMenu.js +3 -2
- package/lib/shared/components/NativeSelect.d.ts +8 -0
- package/lib/shared/components/NativeSelect.js +29 -0
- package/lib/shared/components/Tabs.d.ts +3 -3
- package/lib/shared/components/Tabs.js +5 -5
- package/lib/{formbuilder → shared/formbuilder}/creationform.js +71 -4
- package/lib/{formbuilder → shared/formbuilder}/editform.js +1 -1
- package/lib/{formbuilder → shared/formbuilder}/formselectors.d.ts +2 -2
- package/lib/{formbuilder → shared/formbuilder}/formselectors.js +13 -4
- package/lib/shared/formbuilder/index.d.ts +4 -0
- package/lib/shared/formbuilder/index.js +4 -0
- package/lib/{formbuilder → shared/formbuilder}/objectform/SchemaForm.d.ts +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/StoryEditorForm.d.ts +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/StoryEditorForm.js +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/components/LayerSelect.js +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/components/SegmentFormSymbology.js +4 -4
- package/lib/{formbuilder → shared/formbuilder}/objectform/components/SourcePropertiesField.js +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/components/StorySegmentReset.js +1 -1
- package/lib/shared/formbuilder/objectform/components/WmsTileSourceUrlInput.d.ts +3 -0
- package/lib/shared/formbuilder/objectform/components/WmsTileSourceUrlInput.js +84 -0
- package/lib/{formbuilder → shared/formbuilder}/objectform/fileselectorwidget.js +8 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/schemaUtils.d.ts +3 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/schemaUtils.js +11 -0
- package/lib/{formbuilder → shared/formbuilder}/objectform/useSchemaFormState.d.ts +2 -2
- package/lib/{formbuilder → shared/formbuilder}/objectform/useSchemaFormState.js +1 -1
- package/lib/{icons.d.ts → shared/icons.d.ts} +2 -0
- package/lib/{icons.js → shared/icons.js} +28 -18
- package/lib/tools.d.ts +3 -1
- package/lib/tools.js +140 -6
- package/lib/types.d.ts +12 -1
- package/lib/types.js +6 -1
- package/lib/{menus.js → workspace/menus.js} +14 -2
- package/lib/workspace/panels/components/TabbedPanel.d.ts +17 -0
- package/lib/workspace/panels/components/TabbedPanel.js +19 -0
- package/lib/{panelview → workspace/panels}/components/layers.js +82 -20
- package/lib/workspace/panels/components/legendItem.js +680 -0
- package/lib/workspace/panels/hooks/useLayerTree.d.ts +19 -0
- package/lib/workspace/panels/hooks/useLayerTree.js +103 -0
- package/lib/workspace/panels/hooks/useRightPanelOptions.d.ts +27 -0
- package/lib/workspace/panels/hooks/useRightPanelOptions.js +72 -0
- package/lib/workspace/panels/hooks/useUIState.d.ts +2 -0
- package/lib/workspace/panels/hooks/useUIState.js +25 -0
- package/lib/{panelview → workspace/panels}/index.d.ts +1 -1
- package/lib/{panelview → workspace/panels}/index.js +1 -1
- package/lib/{panelview → workspace/panels}/leftpanel.d.ts +1 -1
- package/lib/workspace/panels/leftpanel.js +70 -0
- package/lib/{panelview/rightpanel.d.ts → workspace/panels/mergedpanel.d.ts} +6 -5
- package/lib/workspace/panels/mergedpanel.js +166 -0
- package/lib/workspace/panels/rightpanel.d.ts +25 -0
- package/lib/{panelview → workspace/panels}/rightpanel.js +53 -63
- package/lib/{statusbar → workspace/statusbar}/StatusBar.js +5 -4
- package/lib/{toolbar → workspace/toolbar}/widget.d.ts +2 -0
- package/lib/{toolbar → workspace/toolbar}/widget.js +33 -5
- package/lib/{widget.d.ts → workspace/widget.d.ts} +7 -5
- package/lib/{widget.js → workspace/widget.js} +16 -7
- package/package.json +19 -4
- package/style/base.css +109 -1
- package/style/icons/geopackage.svg +95 -0
- package/style/icons/pencil_solid.svg +7 -0
- package/style/identify.css +95 -0
- package/style/layerBrowser.css +28 -0
- package/style/leftPanel.css +25 -0
- package/style/shared/button.css +12 -0
- package/style/shared/dropdownMenu.css +9 -0
- package/style/shared/nativeSelect.css +75 -0
- package/style/shared/tabs.css +3 -3
- package/style/spectaProgressBar.css +0 -1
- package/style/storyPanel.css +142 -9
- package/style/storySpectaArticleOverlay.css +129 -0
- package/style/symbologyDialog.css +330 -28
- package/lib/dialogs/symbology/colorRampUtils.d.ts +0 -20
- package/lib/dialogs/symbology/colorRampUtils.js +0 -132
- package/lib/dialogs/symbology/symbologyUtils.d.ts +0 -33
- package/lib/dialogs/symbology/symbologyUtils.js +0 -180
- package/lib/dialogs/symbology/tiff_layer/TiffRendering.d.ts +0 -4
- package/lib/dialogs/symbology/tiff_layer/TiffRendering.js +0 -42
- package/lib/dialogs/symbology/tiff_layer/components/BandRow.d.ts +0 -23
- package/lib/dialogs/symbology/tiff_layer/components/BandRow.js +0 -59
- package/lib/dialogs/symbology/tiff_layer/types/MultibandColor.d.ts +0 -4
- package/lib/dialogs/symbology/tiff_layer/types/MultibandColor.js +0 -92
- package/lib/dialogs/symbology/tiff_layer/types/SingleBandPseudoColor.d.ts +0 -5
- package/lib/dialogs/symbology/tiff_layer/types/SingleBandPseudoColor.js +0 -301
- package/lib/dialogs/symbology/vector_layer/VectorRendering.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/VectorRendering.js +0 -112
- package/lib/dialogs/symbology/vector_layer/components/ValueSelect.d.ts +0 -8
- package/lib/dialogs/symbology/vector_layer/components/ValueSelect.js +0 -9
- package/lib/dialogs/symbology/vector_layer/types/Canonical.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/types/Canonical.js +0 -65
- package/lib/dialogs/symbology/vector_layer/types/Categorized.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/types/Categorized.js +0 -196
- package/lib/dialogs/symbology/vector_layer/types/Graduated.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/types/Graduated.js +0 -250
- package/lib/dialogs/symbology/vector_layer/types/SimpleSymbol.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/types/SimpleSymbol.js +0 -105
- package/lib/formbuilder/index.d.ts +0 -4
- package/lib/formbuilder/index.js +0 -4
- package/lib/formbuilder/objectform/layer/storySegmentLayerForm.js +0 -95
- package/lib/formbuilder/objectform/layer/webGlLayerForm.d.ts +0 -3
- package/lib/formbuilder/objectform/process/index.d.ts +0 -1
- package/lib/formbuilder/objectform/process/index.js +0 -1
- package/lib/panelview/components/legendItem.js +0 -200
- package/lib/panelview/identify-panel/IdentifyPanel.js +0 -102
- package/lib/panelview/leftpanel.js +0 -139
- package/lib/panelview/story-maps/StoryViewerPanel.js +0 -116
- package/lib/panelview/story-maps/components/SpectaDesktopView.js +0 -49
- package/lib/processing/index.js +0 -200
- package/lib/processing/processingCommands.js +0 -67
- /package/lib/{panelview/annotationPanel.d.ts → features/annotations/AnnotationsPanel.d.ts} +0 -0
- /package/lib/{annotations → features/annotations}/components/Annotation.d.ts +0 -0
- /package/lib/{annotations → features/annotations}/components/Annotation.js +0 -0
- /package/lib/{annotations → features/annotations}/components/AnnotationFloater.d.ts +0 -0
- /package/lib/{annotations → features/annotations}/components/AnnotationFloater.js +0 -0
- /package/lib/{annotations → features/annotations}/components/Message.d.ts +0 -0
- /package/lib/{annotations → features/annotations}/components/Message.js +0 -0
- /package/lib/{annotations → features/annotations}/model.d.ts +0 -0
- /package/lib/{annotations → features/annotations}/model.js +0 -0
- /package/lib/{console → features/console}/consoleview.d.ts +0 -0
- /package/lib/{console → features/console}/index.d.ts +0 -0
- /package/lib/{console → features/console}/index.js +0 -0
- /package/lib/{panelview/filter-panel → features/filter}/Filter.d.ts +0 -0
- /package/lib/{stacBrowser/types/types.js → features/identify/types/editorTypes.js} +0 -0
- /package/lib/{dialogs/layerBrowserDialog.d.ts → features/layer-browser/index.d.ts} +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/layer/heatmapLayerForm.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/layer/hillshadeLayerForm.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/layer/storySegmentLayerForm.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/layer/vectorlayerform.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/source/geojsonsource.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/source/geotiffsource.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/source/pathbasedsource.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/source/tilesourceform.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ModeSelectRow.js +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/cmocean.json +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopContainer.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useEffectiveSymbologyParams.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useEffectiveSymbologyParams.js +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useGetProperties.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useGetSymbology.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useOkSignal.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useOkSignal.js +0 -0
- /package/lib/{formbuilder/objectform/process → features/processing/forms}/dissolveProcessForm.d.ts +0 -0
- /package/lib/{processing → features/processing}/processingFormToParam.d.ts +0 -0
- /package/lib/{processing → features/processing}/processingFormToParam.js +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/StacPanel.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableComboBox.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableRow.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/StacFilterExtensionPanel.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/StacQueryableFilters.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacFilterSection.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacGeodesFilterPanel.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacGeodesFilterPanel.js +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/shared/StacPanelResults.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/shared/StacSpatialExtent.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/shared/StacTemporalExtent.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/constants.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/constants.js +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/context/StacResultsContext.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/hooks/useGeodesSearch.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/index.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/index.js +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/types/types.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/StoryEditorPanel.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/PreviewModeSwitch.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/PreviewModeSwitch.js +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryContentSection.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryContentSection.js +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryImageSection.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryImageSection.js +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryNavBar.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryNavBar.js +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StorySubtitleSection.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StorySubtitleSection.js +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryTitleSection.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryTitleSection.js +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/creationform.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/editform.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/SchemaForm.js +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/LayerSelect.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/OpacitySlider.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/OpacitySlider.js +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/SegmentFormSymbology.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/SourcePropertiesField.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/StorySegmentReset.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/fileselectorwidget.d.ts +0 -0
- /package/lib/{store.d.ts → shared/store.d.ts} +0 -0
- /package/lib/{store.js → shared/store.js} +0 -0
- /package/lib/{menus.d.ts → workspace/menus.d.ts} +0 -0
- /package/lib/{panelview → workspace/panels}/components/layers.d.ts +0 -0
- /package/lib/{panelview → workspace/panels}/components/legendItem.d.ts +0 -0
- /package/lib/{panelview → workspace/panels}/header.d.ts +0 -0
- /package/lib/{panelview → workspace/panels}/header.js +0 -0
- /package/lib/{statusbar → workspace/statusbar}/SpectaPresentationProgressBar.d.ts +0 -0
- /package/lib/{statusbar → workspace/statusbar}/SpectaPresentationProgressBar.js +0 -0
- /package/lib/{statusbar → workspace/statusbar}/StatusBar.d.ts +0 -0
- /package/lib/{toolbar → workspace/toolbar}/index.d.ts +0 -0
- /package/lib/{toolbar → workspace/toolbar}/index.js +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve a stable feature identifier across common property names.
|
|
3
|
+
*/
|
|
4
|
+
export function getFeatureIdentifier(feature) {
|
|
5
|
+
var _a, _b, _c;
|
|
6
|
+
const rawIdentifier = (_c = (_b = (_a = feature._id) !== null && _a !== void 0 ? _a : feature.id) !== null && _b !== void 0 ? _b : feature.fid) !== null && _c !== void 0 ? _c : feature.featureId;
|
|
7
|
+
if (typeof rawIdentifier === 'string') {
|
|
8
|
+
return rawIdentifier;
|
|
9
|
+
}
|
|
10
|
+
if (typeof rawIdentifier === 'number') {
|
|
11
|
+
return String(rawIdentifier);
|
|
12
|
+
}
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Map as OlMap } from 'ol';
|
|
2
|
+
import { VectorImage as VectorImageLayer } from 'ol/layer';
|
|
3
|
+
import { Vector as VectorSource } from 'ol/source';
|
|
4
|
+
/**
|
|
5
|
+
* Ensure the highlight layer exists and is attached to the map.
|
|
6
|
+
* Creates it on first call; re-adds it if the map removed it
|
|
7
|
+
* (e.g. during a layer sync that strips non-model layers).
|
|
8
|
+
*/
|
|
9
|
+
export declare function ensureHighlightLayer(map: OlMap, layerRef: {
|
|
10
|
+
current: VectorImageLayer<VectorSource> | null;
|
|
11
|
+
}): VectorImageLayer<VectorSource>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { VectorImage as VectorImageLayer } from 'ol/layer';
|
|
2
|
+
import { Vector as VectorSource } from 'ol/source';
|
|
3
|
+
import { Circle, Fill, Stroke, Style } from 'ol/style';
|
|
4
|
+
/**
|
|
5
|
+
* Style function used by the highlight overlay layer.
|
|
6
|
+
* Returns a fixed highlight style based on geometry type.
|
|
7
|
+
*/
|
|
8
|
+
function highlightStyleFunction(feature) {
|
|
9
|
+
var _a;
|
|
10
|
+
const geomType = (_a = feature.getGeometry()) === null || _a === void 0 ? void 0 : _a.getType();
|
|
11
|
+
switch (geomType) {
|
|
12
|
+
case 'Point':
|
|
13
|
+
case 'MultiPoint':
|
|
14
|
+
return new Style({
|
|
15
|
+
image: new Circle({
|
|
16
|
+
radius: 8,
|
|
17
|
+
fill: new Fill({ color: 'transparent' }),
|
|
18
|
+
stroke: new Stroke({ color: '#ff0', width: 3 }),
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
case 'LineString':
|
|
22
|
+
case 'MultiLineString':
|
|
23
|
+
return new Style({
|
|
24
|
+
stroke: new Stroke({ color: 'rgba(255, 255, 0, 0.8)', width: 3 }),
|
|
25
|
+
});
|
|
26
|
+
case 'Polygon':
|
|
27
|
+
case 'MultiPolygon':
|
|
28
|
+
return new Style({
|
|
29
|
+
stroke: new Stroke({ color: '#ff0', width: 2 }),
|
|
30
|
+
fill: new Fill({ color: 'rgba(255, 255, 0, 0.15)' }),
|
|
31
|
+
});
|
|
32
|
+
default:
|
|
33
|
+
return new Style({
|
|
34
|
+
stroke: new Stroke({ color: '#ff0', width: 2 }),
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Ensure the highlight layer exists and is attached to the map.
|
|
40
|
+
* Creates it on first call; re-adds it if the map removed it
|
|
41
|
+
* (e.g. during a layer sync that strips non-model layers).
|
|
42
|
+
*/
|
|
43
|
+
export function ensureHighlightLayer(map, layerRef) {
|
|
44
|
+
if (layerRef.current &&
|
|
45
|
+
map.getLayers().getArray().includes(layerRef.current)) {
|
|
46
|
+
return layerRef.current;
|
|
47
|
+
}
|
|
48
|
+
if (!layerRef.current) {
|
|
49
|
+
layerRef.current = new VectorImageLayer({
|
|
50
|
+
source: new VectorSource(),
|
|
51
|
+
style: highlightStyleFunction,
|
|
52
|
+
zIndex: 999,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
map.addLayer(layerRef.current);
|
|
56
|
+
return layerRef.current;
|
|
57
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Style } from 'ol/style';
|
|
2
|
+
/**
|
|
3
|
+
* Build a highlight style from an original resolved style.
|
|
4
|
+
* Preserves data-driven properties (circle radius, line width) and swaps in
|
|
5
|
+
* a constant yellow highlight color.
|
|
6
|
+
*/
|
|
7
|
+
export declare function buildHighlightStyle(original: Style, geomType?: string): Style;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Circle, Fill, Stroke, Style } from 'ol/style';
|
|
2
|
+
import CircleStyle from 'ol/style/Circle';
|
|
3
|
+
/**
|
|
4
|
+
* Build a highlight style from an original resolved style.
|
|
5
|
+
* Preserves data-driven properties (circle radius, line width) and swaps in
|
|
6
|
+
* a constant yellow highlight color.
|
|
7
|
+
*/
|
|
8
|
+
export function buildHighlightStyle(original, geomType) {
|
|
9
|
+
var _a;
|
|
10
|
+
// Only use the circle branch for point geometries. The OL default style
|
|
11
|
+
// includes a circle image alongside fill/stroke; without this guard the
|
|
12
|
+
// circle branch would fire for polygons and produce an invisible style.
|
|
13
|
+
const isPoint = geomType === 'Point' || geomType === 'MultiPoint';
|
|
14
|
+
if (isPoint) {
|
|
15
|
+
const image = original.getImage();
|
|
16
|
+
if (image instanceof CircleStyle) {
|
|
17
|
+
return new Style({
|
|
18
|
+
image: new Circle({
|
|
19
|
+
radius: image.getRadius() + 4,
|
|
20
|
+
fill: new Fill({ color: 'transparent' }),
|
|
21
|
+
stroke: new Stroke({ color: '#ff0', width: 3 }),
|
|
22
|
+
}),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const origStroke = original.getStroke();
|
|
27
|
+
const origFill = original.getFill();
|
|
28
|
+
if (origStroke || origFill) {
|
|
29
|
+
return new Style(Object.assign({ stroke: new Stroke({
|
|
30
|
+
color: 'rgba(255, 255, 0, 0.4)',
|
|
31
|
+
width: ((_a = origStroke === null || origStroke === void 0 ? void 0 : origStroke.getWidth()) !== null && _a !== void 0 ? _a : 1) + 4,
|
|
32
|
+
}) }, (origFill
|
|
33
|
+
? { fill: new Fill({ color: 'rgba(255, 255, 0, 0.15)' }) }
|
|
34
|
+
: {})));
|
|
35
|
+
}
|
|
36
|
+
// Fallback
|
|
37
|
+
return new Style({
|
|
38
|
+
stroke: new Stroke({ color: 'rgba(255, 255, 0, 0.4)', width: 4 }),
|
|
39
|
+
});
|
|
40
|
+
}
|
|
@@ -4,8 +4,8 @@ import { Dialog } from '@jupyterlab/apputils';
|
|
|
4
4
|
import { PromiseDelegate, UUID } from '@lumino/coreutils';
|
|
5
5
|
import { Signal } from '@lumino/signaling';
|
|
6
6
|
import React, { useEffect, useState } from 'react';
|
|
7
|
-
import { CreationFormWrapper } from
|
|
8
|
-
import CUSTOM_RASTER_IMAGE from '
|
|
7
|
+
import { CreationFormWrapper } from "../layers/layerCreationFormDialog";
|
|
8
|
+
import CUSTOM_RASTER_IMAGE from '../../../custom_raster.png';
|
|
9
9
|
export const LayerBrowserComponent = ({ model, registry, formSchemaRegistry, okSignalPromise, cancel, registerConfirmHandler, }) => {
|
|
10
10
|
const [searchTerm, setSearchTerm] = useState('');
|
|
11
11
|
const [activeLayers, setActiveLayers] = useState([]);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
export function
|
|
2
|
+
import { SchemaForm } from "../../../../shared/formbuilder/objectform/SchemaForm";
|
|
3
|
+
import { processBaseSchema, removeFormEntry, } from "../../../../shared/formbuilder/objectform/schemaUtils";
|
|
4
|
+
import { useSchemaFormState } from "../../../../shared/formbuilder/objectform/useSchemaFormState";
|
|
5
|
+
import { deepCopy } from "../../../../tools";
|
|
6
|
+
export function GeoTiffLayerPropertiesForm(props) {
|
|
7
7
|
const { schema: schemaProp, sourceData, syncData, model, filePath, formContext, sourceType, dialogOptions, formErrorSignal, } = props;
|
|
8
8
|
const { formData, schema, formContextValue, hasSchema, handleChangeBase, handleSubmitBase, } = useSchemaFormState({
|
|
9
9
|
sourceData,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { SchemaForm } from "../../../../shared/formbuilder/objectform/SchemaForm";
|
|
3
|
+
import { processBaseSchema, removeFormEntry, } from "../../../../shared/formbuilder/objectform/schemaUtils";
|
|
4
|
+
import { useSchemaFormState } from "../../../../shared/formbuilder/objectform/useSchemaFormState";
|
|
5
|
+
import { deepCopy, loadFile } from "../../../../tools";
|
|
6
6
|
async function fetchFeatureNames(model, layerData, sourceData) {
|
|
7
7
|
var _a, _b, _c, _d;
|
|
8
8
|
let resolvedSource = sourceData;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { SchemaForm } from "../../../../shared/formbuilder/objectform/SchemaForm";
|
|
3
|
+
import { processBaseSchema, removeFormEntry, } from "../../../../shared/formbuilder/objectform/schemaUtils";
|
|
4
|
+
import { useSchemaFormState } from "../../../../shared/formbuilder/objectform/useSchemaFormState";
|
|
5
|
+
import { deepCopy } from "../../../../tools";
|
|
6
6
|
export function HillshadeLayerPropertiesForm(props) {
|
|
7
7
|
const { schema: schemaProp, sourceData, syncData, model, filePath, formContext, sourceType, dialogOptions, formErrorSignal, } = props;
|
|
8
8
|
const { formData, schema, formContextValue, hasSchema, handleChangeBase, handleSubmitBase, } = useSchemaFormState({
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { IDict, SourceType } from '@jupytergis/schema';
|
|
6
6
|
import { Signal } from '@lumino/signaling';
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import type { IBaseFormProps } from "
|
|
8
|
+
import type { IBaseFormProps } from "../../../../types";
|
|
9
9
|
export interface ILayerProps extends IBaseFormProps {
|
|
10
10
|
/**
|
|
11
11
|
* The source type for the layer
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { SchemaForm } from "../../../../shared/formbuilder/objectform/SchemaForm";
|
|
3
|
+
import { processBaseSchema, removeFormEntry, } from "../../../../shared/formbuilder/objectform/schemaUtils";
|
|
4
|
+
import { useSchemaFormState } from "../../../../shared/formbuilder/objectform/useSchemaFormState";
|
|
5
|
+
import { deepCopy } from "../../../../tools";
|
|
6
6
|
export function LayerPropertiesForm(props) {
|
|
7
7
|
const { schema: schemaProp, sourceData, syncData, model, filePath, formContext, sourceType, dialogOptions, formErrorSignal, } = props;
|
|
8
8
|
const { formData, schema, formContextValue, hasSchema, handleChangeBase, handleSubmitBase, } = useSchemaFormState({
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import React, { useCallback, useMemo } from 'react';
|
|
2
|
+
import { SchemaForm } from "../../../../shared/formbuilder/objectform/SchemaForm";
|
|
3
|
+
import { ArrayFieldTemplate } from "../../../../shared/formbuilder/objectform/components/SegmentFormSymbology";
|
|
4
|
+
import { SourcePropertiesField } from "../../../../shared/formbuilder/objectform/components/SourcePropertiesField";
|
|
5
|
+
import StorySegmentReset from "../../../../shared/formbuilder/objectform/components/StorySegmentReset";
|
|
6
|
+
import { processBaseSchema, removeFormEntry, removeNestedFormEntry, } from "../../../../shared/formbuilder/objectform/schemaUtils";
|
|
7
|
+
import { useSchemaFormState } from "../../../../shared/formbuilder/objectform/useSchemaFormState";
|
|
8
|
+
import { deepCopy } from "../../../../tools";
|
|
9
|
+
function normalizeSegmentContent(content) {
|
|
10
|
+
var _a, _b, _c, _d;
|
|
11
|
+
const value = content !== null && content !== void 0 ? content : {};
|
|
12
|
+
if (value.contentMode === 'markdown') {
|
|
13
|
+
return {
|
|
14
|
+
contentMode: 'markdown',
|
|
15
|
+
markdown: (_a = value.markdown) !== null && _a !== void 0 ? _a : '',
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
contentMode: 'map',
|
|
20
|
+
title: (_b = value.title) !== null && _b !== void 0 ? _b : '',
|
|
21
|
+
image: (_c = value.image) !== null && _c !== void 0 ? _c : '',
|
|
22
|
+
markdown: (_d = value.markdown) !== null && _d !== void 0 ? _d : '',
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function normalizeStorySegmentFormData(data) {
|
|
26
|
+
const normalizedData = deepCopy(data);
|
|
27
|
+
normalizedData.content = normalizeSegmentContent(normalizedData.content);
|
|
28
|
+
return normalizedData;
|
|
29
|
+
}
|
|
30
|
+
function getFirstSelectedStorySegmentLayerId(model) {
|
|
31
|
+
const selected = model.selected;
|
|
32
|
+
if (!selected) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
for (const key of Object.keys(selected)) {
|
|
36
|
+
const layer = model.getLayer(key);
|
|
37
|
+
if ((layer === null || layer === void 0 ? void 0 : layer.type) === 'StorySegmentLayer') {
|
|
38
|
+
return key;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
const StorySegmentResetField = (props) => {
|
|
44
|
+
const ctx = props.formContext;
|
|
45
|
+
return React.createElement(StorySegmentReset, { model: ctx === null || ctx === void 0 ? void 0 : ctx.model, layerId: ctx === null || ctx === void 0 ? void 0 : ctx.layerId });
|
|
46
|
+
};
|
|
47
|
+
export function StorySegmentLayerPropertiesForm(props) {
|
|
48
|
+
const { schema: schemaProp, sourceData, syncData, model, filePath, formContext, sourceType, dialogOptions, formErrorSignal, formSchemaRegistry, } = props;
|
|
49
|
+
const { formData, schema, formContextValue: baseFormContext, hasSchema, handleChangeBase, handleSubmitBase, } = useSchemaFormState({
|
|
50
|
+
sourceData: sourceData
|
|
51
|
+
? normalizeStorySegmentFormData(sourceData)
|
|
52
|
+
: undefined,
|
|
53
|
+
schemaProp,
|
|
54
|
+
model,
|
|
55
|
+
syncData,
|
|
56
|
+
cancel: props.cancel,
|
|
57
|
+
onAfterChange: dialogOptions
|
|
58
|
+
? (data) => {
|
|
59
|
+
dialogOptions.layerData = Object.assign({}, normalizeStorySegmentFormData(data));
|
|
60
|
+
}
|
|
61
|
+
: undefined,
|
|
62
|
+
});
|
|
63
|
+
const handleChange = useCallback((data) => {
|
|
64
|
+
handleChangeBase(normalizeStorySegmentFormData(data));
|
|
65
|
+
}, [handleChangeBase]);
|
|
66
|
+
const handleSubmit = useCallback((data) => {
|
|
67
|
+
handleSubmitBase(normalizeStorySegmentFormData(data));
|
|
68
|
+
}, [handleSubmitBase]);
|
|
69
|
+
const displayFormData = useMemo(() => normalizeStorySegmentFormData(formData), [formData]);
|
|
70
|
+
const contentMode = displayFormData.content.contentMode === 'markdown' ? 'markdown' : 'map';
|
|
71
|
+
const layerId = useMemo(() => getFirstSelectedStorySegmentLayerId(model), [model, model.selected]);
|
|
72
|
+
const formContextValue = useMemo(() => (Object.assign(Object.assign({}, baseFormContext), { layerId, formSchemaRegistry })), [baseFormContext, layerId]);
|
|
73
|
+
const { displaySchema, uiSchema } = useMemo(() => {
|
|
74
|
+
var _a, _b;
|
|
75
|
+
const displaySchema = deepCopy(schema);
|
|
76
|
+
const builtUiSchema = {};
|
|
77
|
+
const dataCopy = deepCopy(displayFormData);
|
|
78
|
+
processBaseSchema(dataCopy, displaySchema, builtUiSchema, formContext, removeFormEntry);
|
|
79
|
+
if ((_a = displaySchema.properties) === null || _a === void 0 ? void 0 : _a.source) {
|
|
80
|
+
const availableSources = model.getSourcesByType(sourceType);
|
|
81
|
+
displaySchema.properties.source.enumNames =
|
|
82
|
+
Object.values(availableSources);
|
|
83
|
+
displaySchema.properties.source.enum =
|
|
84
|
+
Object.keys(availableSources);
|
|
85
|
+
}
|
|
86
|
+
removeFormEntry('zoom', dataCopy, displaySchema, builtUiSchema);
|
|
87
|
+
const layerOverrideItems = (_b = displaySchema.properties) === null || _b === void 0 ? void 0 : _b.layerOverride;
|
|
88
|
+
const itemsProps = layerOverrideItems === null || layerOverrideItems === void 0 ? void 0 : layerOverrideItems.items;
|
|
89
|
+
const itemsProperties = itemsProps === null || itemsProps === void 0 ? void 0 : itemsProps.properties;
|
|
90
|
+
if (itemsProperties) {
|
|
91
|
+
delete itemsProperties.color;
|
|
92
|
+
delete itemsProperties.symbologyState;
|
|
93
|
+
}
|
|
94
|
+
const contentFieldUi = Object.assign(Object.assign({}, builtUiSchema.content), { contentMode: {
|
|
95
|
+
'ui:widget': 'select',
|
|
96
|
+
}, markdown: {
|
|
97
|
+
'ui:widget': 'textarea',
|
|
98
|
+
'ui:options': {
|
|
99
|
+
rows: 10,
|
|
100
|
+
},
|
|
101
|
+
} });
|
|
102
|
+
if (contentMode === 'markdown') {
|
|
103
|
+
removeNestedFormEntry('content', 'title', dataCopy, displaySchema, builtUiSchema);
|
|
104
|
+
removeNestedFormEntry('content', 'image', dataCopy, displaySchema, builtUiSchema);
|
|
105
|
+
removeFormEntry('transition', dataCopy, displaySchema, builtUiSchema);
|
|
106
|
+
removeFormEntry('layerOverride', dataCopy, displaySchema, builtUiSchema);
|
|
107
|
+
removeFormEntry('extent', dataCopy, displaySchema, builtUiSchema);
|
|
108
|
+
builtUiSchema.content = Object.assign(Object.assign({}, contentFieldUi), { 'ui:order': ['contentMode', 'markdown'] });
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
// contentMode === 'map'
|
|
112
|
+
builtUiSchema.content = Object.assign(Object.assign({}, contentFieldUi), { 'ui:order': ['contentMode', 'title', 'image', 'markdown'] });
|
|
113
|
+
if (model.selected) {
|
|
114
|
+
builtUiSchema.extent = {
|
|
115
|
+
'ui:field': 'storySegmentReset',
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
builtUiSchema.layerOverride = Object.assign(Object.assign({}, builtUiSchema.layerOverride), { items: {
|
|
119
|
+
'ui:title': '',
|
|
120
|
+
targetLayer: {
|
|
121
|
+
'ui:field': 'layerSelect',
|
|
122
|
+
},
|
|
123
|
+
opacity: {
|
|
124
|
+
'ui:field': 'opacity',
|
|
125
|
+
},
|
|
126
|
+
sourceProperties: {
|
|
127
|
+
'ui:field': SourcePropertiesField,
|
|
128
|
+
},
|
|
129
|
+
}, 'ui:options': {
|
|
130
|
+
orderable: false,
|
|
131
|
+
}, 'ui:ArrayFieldTemplate': ArrayFieldTemplate });
|
|
132
|
+
}
|
|
133
|
+
return { displaySchema, uiSchema: builtUiSchema };
|
|
134
|
+
}, [
|
|
135
|
+
schema,
|
|
136
|
+
displayFormData,
|
|
137
|
+
formContext,
|
|
138
|
+
model,
|
|
139
|
+
sourceType,
|
|
140
|
+
contentMode,
|
|
141
|
+
model.selected,
|
|
142
|
+
]);
|
|
143
|
+
const additionalFields = useMemo(() => ({
|
|
144
|
+
storySegmentReset: StorySegmentResetField,
|
|
145
|
+
}), []);
|
|
146
|
+
if (!hasSchema) {
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
return (React.createElement(SchemaForm, { schema: displaySchema, formData: displayFormData, onChange: handleChange, onSubmit: handleSubmit, formContext: formContextValue, filePath: filePath, uiSchema: uiSchema, additionalFields: additionalFields, formErrorSignal: formErrorSignal }));
|
|
150
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { SchemaForm } from "../../../../shared/formbuilder/objectform/SchemaForm";
|
|
3
|
+
import { processBaseSchema, removeFormEntry, } from "../../../../shared/formbuilder/objectform/schemaUtils";
|
|
4
|
+
import { useSchemaFormState } from "../../../../shared/formbuilder/objectform/useSchemaFormState";
|
|
5
|
+
import { deepCopy } from "../../../../tools";
|
|
6
6
|
export function VectorLayerPropertiesForm(props) {
|
|
7
7
|
const { schema: schemaProp, sourceData, syncData, model, filePath, formContext, sourceType, dialogOptions, formErrorSignal, } = props;
|
|
8
8
|
const { formData, schema, formContextValue, hasSchema, handleChangeBase, handleSubmitBase, } = useSchemaFormState({
|
|
@@ -2,11 +2,11 @@ import * as geojson from '@jupytergis/schema/src/schema/geojson.json';
|
|
|
2
2
|
import { showErrorMessage } from '@jupyterlab/apputils';
|
|
3
3
|
import { Ajv } from 'ajv';
|
|
4
4
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { SchemaForm } from "../../../../shared/formbuilder/objectform/SchemaForm";
|
|
6
|
+
import { FileSelectorWidget } from "../../../../shared/formbuilder/objectform/fileselectorwidget";
|
|
7
|
+
import { processBaseSchema, removeFormEntry, } from "../../../../shared/formbuilder/objectform/schemaUtils";
|
|
8
|
+
import { useSchemaFormState } from "../../../../shared/formbuilder/objectform/useSchemaFormState";
|
|
9
|
+
import { deepCopy, loadFile } from "../../../../tools";
|
|
10
10
|
export function GeoJSONSourcePropertiesForm(props) {
|
|
11
11
|
const { schema: schemaProp, sourceData, syncData, model, filePath, formContext, dialogOptions, formErrorSignal, formSchemaRegistry, cancel, } = props;
|
|
12
12
|
const { formData, schema, formContextValue, hasSchema, handleChangeBase, handleSubmitBase, } = useSchemaFormState({
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { showErrorMessage } from '@jupyterlab/apputils';
|
|
2
|
+
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import { SchemaForm } from "../../../../shared/formbuilder/objectform/SchemaForm";
|
|
4
|
+
import { FileSelectorWidget } from "../../../../shared/formbuilder/objectform/fileselectorwidget";
|
|
5
|
+
import { processBaseSchema, removeFormEntry, } from "../../../../shared/formbuilder/objectform/schemaUtils";
|
|
6
|
+
import { useSchemaFormState } from "../../../../shared/formbuilder/objectform/useSchemaFormState";
|
|
7
|
+
import { deepCopy } from "../../../../tools";
|
|
8
|
+
export function GeoPackagePropertiesForm(props) {
|
|
9
|
+
const { schema: schemaProp, sourceData, syncData, model, filePath, formContext, sourceType, dialogOptions, formErrorSignal, formSchemaRegistry, cancel, } = props;
|
|
10
|
+
const { formData, formContextValue, hasSchema, handleChangeBase, handleSubmitBase, } = useSchemaFormState({
|
|
11
|
+
sourceData,
|
|
12
|
+
schemaProp,
|
|
13
|
+
model,
|
|
14
|
+
syncData,
|
|
15
|
+
cancel,
|
|
16
|
+
onAfterChange: dialogOptions
|
|
17
|
+
? (data) => {
|
|
18
|
+
dialogOptions.sourceData = Object.assign({}, data);
|
|
19
|
+
}
|
|
20
|
+
: undefined,
|
|
21
|
+
});
|
|
22
|
+
const [extraErrors, setExtraErrors] = useState({});
|
|
23
|
+
const validatePath = useCallback((path) => {
|
|
24
|
+
const nextErrors = {};
|
|
25
|
+
let valid = true;
|
|
26
|
+
let error = '';
|
|
27
|
+
if (!path) {
|
|
28
|
+
valid = false;
|
|
29
|
+
error = 'Path is required';
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
const isUrl = path.startsWith('http://') || path.startsWith('https://');
|
|
33
|
+
if (!isUrl && !path.toLowerCase().endsWith('.gpkg')) {
|
|
34
|
+
valid = false;
|
|
35
|
+
error = `"${path}" does not appear to be a GeoPackage file (.gpkg).`;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (!valid) {
|
|
39
|
+
nextErrors.path = { __errors: [error] };
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
nextErrors.path = { __errors: [] };
|
|
43
|
+
}
|
|
44
|
+
setExtraErrors(nextErrors);
|
|
45
|
+
formErrorSignal === null || formErrorSignal === void 0 ? void 0 : formErrorSignal.emit(!valid);
|
|
46
|
+
}, [formErrorSignal]);
|
|
47
|
+
const schema = useMemo(() => {
|
|
48
|
+
const schemaCopy = deepCopy(schemaProp !== null && schemaProp !== void 0 ? schemaProp : {});
|
|
49
|
+
if (schemaCopy.properties) {
|
|
50
|
+
delete schemaCopy.properties.valid;
|
|
51
|
+
}
|
|
52
|
+
return schemaCopy;
|
|
53
|
+
}, [schemaProp]);
|
|
54
|
+
const uiSchema = useMemo(() => {
|
|
55
|
+
var _a;
|
|
56
|
+
const builtUiSchema = {};
|
|
57
|
+
const dataCopy = deepCopy(formData);
|
|
58
|
+
processBaseSchema(dataCopy, schema, builtUiSchema, formContext, removeFormEntry);
|
|
59
|
+
const docManager = formSchemaRegistry === null || formSchemaRegistry === void 0 ? void 0 : formSchemaRegistry.getDocManager();
|
|
60
|
+
if (((_a = schema.properties) === null || _a === void 0 ? void 0 : _a.path) && docManager) {
|
|
61
|
+
builtUiSchema.path = {
|
|
62
|
+
'ui:widget': FileSelectorWidget,
|
|
63
|
+
'ui:options': {
|
|
64
|
+
docManager,
|
|
65
|
+
formOptions: Object.assign(Object.assign({}, props), { sourceType }),
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
return builtUiSchema;
|
|
70
|
+
}, [schema, formData, formContext, formSchemaRegistry, props, sourceType]);
|
|
71
|
+
const handleChange = useCallback((data) => {
|
|
72
|
+
handleChangeBase(data);
|
|
73
|
+
if (data.path !== undefined) {
|
|
74
|
+
validatePath(data.path);
|
|
75
|
+
}
|
|
76
|
+
}, [handleChangeBase, validatePath]);
|
|
77
|
+
const handleSubmit = useCallback((data) => {
|
|
78
|
+
var _a, _b;
|
|
79
|
+
if (((_b = (_a = extraErrors === null || extraErrors === void 0 ? void 0 : extraErrors.path) === null || _a === void 0 ? void 0 : _a.__errors) === null || _b === void 0 ? void 0 : _b.length) >= 1) {
|
|
80
|
+
showErrorMessage('Invalid file', extraErrors.path.__errors[0]);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
handleSubmitBase(data);
|
|
84
|
+
}, [extraErrors, handleSubmitBase]);
|
|
85
|
+
useEffect(() => {
|
|
86
|
+
var _a;
|
|
87
|
+
validatePath((_a = formData === null || formData === void 0 ? void 0 : formData.path) !== null && _a !== void 0 ? _a : '');
|
|
88
|
+
}, []);
|
|
89
|
+
if (!hasSchema) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
return (React.createElement(SchemaForm, { schema: schema, formData: formData, onChange: handleChange, onSubmit: handleSubmit, formContext: formContextValue, filePath: filePath, uiSchema: uiSchema, extraErrors: extraErrors, formErrorSignal: formErrorSignal }));
|
|
93
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { showErrorMessage } from '@jupyterlab/apputils';
|
|
2
2
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { SchemaForm } from "../../../../shared/formbuilder/objectform/SchemaForm";
|
|
4
|
+
import { FileSelectorWidget } from "../../../../shared/formbuilder/objectform/fileselectorwidget";
|
|
5
|
+
import { processBaseSchema, removeFormEntry, } from "../../../../shared/formbuilder/objectform/schemaUtils";
|
|
6
|
+
import { useSchemaFormState } from "../../../../shared/formbuilder/objectform/useSchemaFormState";
|
|
7
|
+
import { deepCopy, getMimeType } from "../../../../tools";
|
|
8
8
|
export function GeoTiffSourcePropertiesForm(props) {
|
|
9
9
|
const { schema: schemaProp, sourceData, syncData, model, filePath, formContext, sourceType, dialogOptions, formErrorSignal, formSchemaRegistry, cancel, } = props;
|
|
10
10
|
const { formData, formContextValue, hasSchema, handleChangeBase, handleSubmitBase, } = useSchemaFormState({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { showErrorMessage } from '@jupyterlab/apputils';
|
|
2
2
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { SchemaForm } from "../../../../shared/formbuilder/objectform/SchemaForm";
|
|
4
|
+
import { FileSelectorWidget } from "../../../../shared/formbuilder/objectform/fileselectorwidget";
|
|
5
|
+
import { processBaseSchema, removeFormEntry, } from "../../../../shared/formbuilder/objectform/schemaUtils";
|
|
6
|
+
import { useSchemaFormState } from "../../../../shared/formbuilder/objectform/useSchemaFormState";
|
|
7
|
+
import { deepCopy, loadFile } from "../../../../tools";
|
|
8
8
|
export function PathBasedSourcePropertiesForm(props) {
|
|
9
9
|
const { schema: schemaProp, sourceData, syncData, model, filePath, formContext, sourceType, dialogOptions, formErrorSignal, formSchemaRegistry, cancel, } = props;
|
|
10
10
|
const { formData, formContextValue, hasSchema, handleChangeBase, handleSubmitBase, } = useSchemaFormState({
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { IDict, SourceType } from '@jupytergis/schema';
|
|
6
6
|
import { Signal } from '@lumino/signaling';
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import type { IBaseFormProps } from "
|
|
8
|
+
import type { IBaseFormProps } from "../../../../types";
|
|
9
9
|
export interface ISourceFormProps extends IBaseFormProps {
|
|
10
10
|
/**
|
|
11
11
|
* The source type for this form.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { SchemaForm } from "../../../../shared/formbuilder/objectform/SchemaForm";
|
|
3
|
+
import { processBaseSchema, removeFormEntry, } from "../../../../shared/formbuilder/objectform/schemaUtils";
|
|
4
|
+
import { useSchemaFormState } from "../../../../shared/formbuilder/objectform/useSchemaFormState";
|
|
5
|
+
import { deepCopy } from "../../../../tools";
|
|
6
6
|
export function SourcePropertiesForm(props) {
|
|
7
7
|
const { schema: schemaProp, sourceData, syncData, model, filePath, formContext, dialogOptions, cancel, formErrorSignal, } = props;
|
|
8
8
|
const { formData, schema, formContextValue, hasSchema, handleChangeBase, handleSubmitBase, } = useSchemaFormState({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { SchemaForm } from "../../../../shared/formbuilder/objectform/SchemaForm";
|
|
3
|
+
import { processBaseSchema, removeFormEntry, } from "../../../../shared/formbuilder/objectform/schemaUtils";
|
|
4
|
+
import { useSchemaFormState } from "../../../../shared/formbuilder/objectform/useSchemaFormState";
|
|
5
|
+
import { deepCopy } from "../../../../tools";
|
|
6
6
|
function getUrlParameters(url) {
|
|
7
7
|
if (!url || typeof url !== 'string') {
|
|
8
8
|
return [];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import type { ISourceFormProps } from './sourceform';
|
|
3
|
+
export declare const WMS_AVAILABLE_LAYERS_CACHE = "jgis:wmsTileSource:availableLayers";
|
|
4
|
+
export declare function WmsTileSourceForm(props: ISourceFormProps): ReactElement | null;
|