@jupytergis/base 0.15.0 → 0.16.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commands/BaseCommandIDs.d.ts +5 -0
- package/lib/commands/BaseCommandIDs.js +5 -0
- package/lib/commands/index.js +218 -47
- package/lib/commands/operationCommands.js +2 -2
- package/lib/constants.js +5 -1
- package/lib/{panelview/annotationPanel.js → features/annotations/AnnotationsPanel.js} +1 -1
- package/lib/{annotations → features/annotations}/index.d.ts +1 -0
- package/lib/{annotations → features/annotations}/index.js +1 -0
- package/lib/{console → features/console}/consoleview.js +1 -1
- package/lib/{panelview/filter-panel → features/filter}/Filter.js +4 -4
- package/lib/{panelview/filter-panel → features/filter}/FilterRow.d.ts +3 -2
- package/lib/{panelview/filter-panel → features/filter}/FilterRow.js +2 -1
- package/lib/{panelview/identify-panel → features/identify}/IdentifyPanel.d.ts +2 -0
- package/lib/features/identify/IdentifyPanel.js +102 -0
- package/lib/features/identify/components/FeatureCard.d.ts +17 -0
- package/lib/features/identify/components/FeatureCard.js +26 -0
- package/lib/features/identify/components/FeatureCardHeader.d.ts +11 -0
- package/lib/features/identify/components/FeatureCardHeader.js +30 -0
- package/lib/features/identify/components/FeatureFloater.d.ts +7 -0
- package/lib/features/identify/components/FeatureFloater.js +19 -0
- package/lib/features/identify/components/FeaturePropertyList.d.ts +11 -0
- package/lib/features/identify/components/FeaturePropertyList.js +18 -0
- package/lib/features/identify/components/FeatureRow.d.ts +13 -0
- package/lib/features/identify/components/FeatureRow.js +25 -0
- package/lib/features/identify/components/PropertyEditors.d.ts +44 -0
- package/lib/features/identify/components/PropertyEditors.js +56 -0
- package/lib/features/identify/hooks/useIdentifyPropertyEditor.d.ts +11 -0
- package/lib/features/identify/hooks/useIdentifyPropertyEditor.js +132 -0
- package/lib/features/identify/types/editorTypes.d.ts +21 -0
- package/lib/features/identify/utils/getFeatureIdentifier.d.ts +5 -0
- package/lib/features/identify/utils/getFeatureIdentifier.js +14 -0
- package/lib/features/identify/utils/highlightLayer.d.ts +11 -0
- package/lib/features/identify/utils/highlightLayer.js +57 -0
- package/lib/features/identify/utils/highlightStyle.d.ts +7 -0
- package/lib/features/identify/utils/highlightStyle.js +40 -0
- package/lib/{dialogs/layerBrowserDialog.js → features/layer-browser/index.js} +2 -2
- package/lib/features/layers/forms/layer/geoTiffLayerForm.d.ts +3 -0
- package/lib/{formbuilder/objectform/layer/webGlLayerForm.js → features/layers/forms/layer/geoTiffLayerForm.js} +5 -5
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/heatmapLayerForm.js +4 -4
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/hillshadeLayerForm.js +4 -4
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/index.d.ts +1 -1
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/index.js +1 -1
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/layerform.d.ts +1 -1
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/layerform.js +4 -4
- package/lib/features/layers/forms/layer/storySegmentLayerForm.js +150 -0
- package/lib/{formbuilder/objectform → features/layers/forms}/layer/vectorlayerform.js +4 -4
- package/lib/{formbuilder/objectform → features/layers/forms}/source/geojsonsource.js +5 -5
- package/lib/features/layers/forms/source/geopackagesource.d.ts +3 -0
- package/lib/features/layers/forms/source/geopackagesource.js +93 -0
- package/lib/{formbuilder/objectform → features/layers/forms}/source/geotiffsource.js +5 -5
- package/lib/{formbuilder/objectform → features/layers/forms}/source/index.d.ts +1 -0
- package/lib/{formbuilder/objectform → features/layers/forms}/source/index.js +1 -0
- package/lib/{formbuilder/objectform → features/layers/forms}/source/pathbasedsource.js +5 -5
- package/lib/{formbuilder/objectform → features/layers/forms}/source/sourceform.d.ts +1 -1
- package/lib/{formbuilder/objectform → features/layers/forms}/source/sourceform.js +4 -4
- package/lib/{formbuilder/objectform → features/layers/forms}/source/tilesourceform.js +4 -4
- package/lib/{formbuilder/objectform → features/layers/forms}/source/wmsTileSource.d.ts +1 -1
- package/lib/{formbuilder/objectform → features/layers/forms}/source/wmsTileSource.js +6 -6
- package/lib/{dialogs → features/layers}/layerCreationFormDialog.d.ts +1 -1
- package/lib/{dialogs → features/layers}/layerCreationFormDialog.js +1 -1
- package/lib/features/layers/symbology/Grammar.d.ts +11 -0
- package/lib/features/layers/symbology/Grammar.js +235 -0
- package/lib/{dialogs/symbology/vector_layer/types → features/layers/symbology}/Heatmap.d.ts +1 -1
- package/lib/{dialogs/symbology/vector_layer/types → features/layers/symbology}/Heatmap.js +30 -10
- package/lib/{dialogs → features/layers}/symbology/classificationModes.d.ts +6 -6
- package/lib/{dialogs → features/layers}/symbology/classificationModes.js +48 -44
- package/lib/{dialogs → features/layers}/symbology/colorRampUtils.d.ts +1 -0
- package/lib/{dialogs → features/layers}/symbology/colorRampUtils.js +12 -1
- package/lib/features/layers/symbology/components/MappingRow.d.ts +40 -0
- package/lib/features/layers/symbology/components/MappingRow.js +516 -0
- package/lib/features/layers/symbology/components/NumericInput.d.ts +20 -0
- package/lib/features/layers/symbology/components/NumericInput.js +44 -0
- package/lib/features/layers/symbology/components/ScaleEditor.d.ts +33 -0
- package/lib/features/layers/symbology/components/ScaleEditor.js +221 -0
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampControls.d.ts +1 -1
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampControls.js +3 -2
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelector.d.ts +2 -1
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelector.js +6 -1
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ModeSelectRow.d.ts +1 -1
- package/lib/{dialogs → features/layers}/symbology/components/color_ramp/RgbaColorPicker.js +39 -9
- package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopRow.d.ts +1 -1
- package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopRow.js +1 -1
- package/lib/features/layers/symbology/grammarToOLLayer.d.ts +27 -0
- package/lib/features/layers/symbology/grammarToOLLayer.js +145 -0
- package/lib/features/layers/symbology/grammarToOLStyle.d.ts +32 -0
- package/lib/features/layers/symbology/grammarToOLStyle.js +467 -0
- package/lib/{dialogs → features/layers}/symbology/hooks/useGetBandInfo.d.ts +1 -1
- package/lib/{dialogs → features/layers}/symbology/hooks/useGetBandInfo.js +1 -1
- package/lib/{dialogs → features/layers}/symbology/hooks/useGetProperties.js +1 -1
- package/lib/{dialogs → features/layers}/symbology/hooks/useGetSymbology.js +4 -2
- package/lib/features/layers/symbology/styleBuilder.d.ts +21 -0
- package/lib/features/layers/symbology/styleBuilder.js +145 -0
- package/lib/{dialogs → features/layers}/symbology/symbologyDialog.d.ts +1 -1
- package/lib/{dialogs → features/layers}/symbology/symbologyDialog.js +12 -12
- package/lib/{dialogs → features/layers}/symbology/symbologyUtils.d.ts +18 -10
- package/lib/{dialogs → features/layers}/symbology/symbologyUtils.js +0 -84
- package/lib/{panelview/objectproperties.d.ts → features/objectproperties/index.d.ts} +1 -1
- package/lib/{panelview/objectproperties.js → features/objectproperties/index.js} +5 -10
- package/lib/{dialogs → features/processing}/ProcessingFormDialog.d.ts +1 -1
- package/lib/{dialogs → features/processing}/ProcessingFormDialog.js +28 -14
- package/lib/features/processing/forms/MapExtentToggle.d.ts +13 -0
- package/lib/features/processing/forms/MapExtentToggle.js +20 -0
- package/lib/features/processing/forms/clipRasterByExtentForm.d.ts +10 -0
- package/lib/features/processing/forms/clipRasterByExtentForm.js +99 -0
- package/lib/{formbuilder/objectform/process → features/processing/forms}/dissolveProcessForm.js +5 -5
- package/lib/{formbuilder/objectform → features/processing/forms}/processingForm.d.ts +1 -1
- package/lib/{formbuilder/objectform → features/processing/forms}/processingForm.js +6 -6
- package/lib/features/processing/forms/rasterizeForm.d.ts +10 -0
- package/lib/features/processing/forms/rasterizeForm.js +75 -0
- package/lib/features/processing/forms/useMapExtent.d.ts +22 -0
- package/lib/features/processing/forms/useMapExtent.js +57 -0
- package/lib/{processing → features/processing}/index.d.ts +19 -2
- package/lib/features/processing/index.js +1246 -0
- package/lib/{processing → features/processing}/processingCommands.d.ts +1 -1
- package/lib/features/processing/processingCommands.js +168 -0
- package/lib/features/processing/serverProcessing.d.ts +51 -0
- package/lib/features/processing/serverProcessing.js +99 -0
- package/lib/{stacBrowser → features/stac-browser}/components/StacPanel.js +2 -2
- package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableComboBox.js +5 -5
- package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableRow.js +1 -1
- package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/StacFilterExtensionPanel.js +2 -2
- package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/StacQueryableFilters.js +1 -1
- package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacFilterSection.js +3 -3
- package/lib/{stacBrowser → features/stac-browser}/components/shared/StacPanelResults.js +3 -3
- package/lib/{stacBrowser → features/stac-browser}/components/shared/StacSpatialExtent.js +1 -1
- package/lib/{stacBrowser → features/stac-browser}/components/shared/StacTemporalExtent.js +1 -1
- package/lib/{stacBrowser → features/stac-browser}/context/StacResultsContext.js +2 -2
- package/lib/{stacBrowser → features/stac-browser}/hooks/useGeodesSearch.js +2 -2
- package/lib/{stacBrowser → features/stac-browser}/hooks/useStacFilterExtension.js +3 -3
- package/lib/{stacBrowser → features/stac-browser}/hooks/useStacSearch.js +1 -1
- package/lib/features/stac-browser/types/types.js +1 -0
- package/lib/{panelview/story-maps → features/story}/SpectaPanel.d.ts +4 -1
- package/lib/{panelview/story-maps → features/story}/SpectaPanel.js +3 -4
- package/lib/{panelview/story-maps → features/story}/StoryEditorPanel.js +1 -1
- package/lib/{panelview/story-maps → features/story}/StoryViewerPanel.d.ts +12 -11
- package/lib/features/story/StoryViewerPanel.js +64 -0
- package/lib/features/story/__tests__/fixtures/listStoryTestItems.d.ts +9 -0
- package/lib/features/story/__tests__/fixtures/listStoryTestItems.js +21 -0
- package/lib/features/story/components/ListStoryMapOverlayPanel.d.ts +10 -0
- package/lib/features/story/components/ListStoryMapOverlayPanel.js +11 -0
- package/lib/features/story/components/ListStoryMarkdownMeasurePane.d.ts +11 -0
- package/lib/features/story/components/ListStoryMarkdownMeasurePane.js +55 -0
- package/lib/features/story/components/ListStoryOverlayMarkdown.d.ts +15 -0
- package/lib/features/story/components/ListStoryOverlayMarkdown.js +93 -0
- package/lib/features/story/components/ListStoryStageOverlay.d.ts +12 -0
- package/lib/features/story/components/ListStoryStageOverlay.js +132 -0
- package/lib/features/story/components/ListStoryVirtualScrollTrack.d.ts +6 -0
- package/lib/features/story/components/ListStoryVirtualScrollTrack.js +7 -0
- package/lib/{panelview/story-maps → features/story}/components/SpectaDesktopView.d.ts +4 -2
- package/lib/features/story/components/SpectaDesktopView.js +67 -0
- package/lib/{panelview/story-maps → features/story}/components/SpectaMobileView.d.ts +2 -4
- package/lib/{panelview/story-maps → features/story}/components/SpectaMobileView.js +3 -3
- package/lib/features/story/components/SpectaSingleModeContent.d.ts +18 -0
- package/lib/features/story/components/SpectaSingleModeContent.js +8 -0
- package/lib/features/story/context/ListStoryScrollTrackContext.d.ts +15 -0
- package/lib/features/story/context/ListStoryScrollTrackContext.js +142 -0
- package/lib/features/story/hooks/useCurrentSegmentIndex.d.ts +3 -0
- package/lib/features/story/hooks/useCurrentSegmentIndex.js +17 -0
- package/lib/features/story/hooks/useListStoryScroll.d.ts +15 -0
- package/lib/features/story/hooks/useListStoryScroll.js +107 -0
- package/lib/features/story/hooks/useQueuedMarkdownHeightMeasure.d.ts +19 -0
- package/lib/features/story/hooks/useQueuedMarkdownHeightMeasure.js +56 -0
- package/lib/features/story/hooks/useStoryImagePreload.d.ts +1 -0
- package/lib/features/story/hooks/useStoryImagePreload.js +24 -0
- package/lib/{panelview/story-maps → features/story}/hooks/useStoryMap.d.ts +2 -7
- package/lib/{panelview/story-maps → features/story}/hooks/useStoryMap.js +20 -44
- package/lib/features/story/hooks/useStoryScrollState.d.ts +21 -0
- package/lib/features/story/hooks/useStoryScrollState.js +39 -0
- package/lib/features/story/hooks/useStorySegmentSync.d.ts +8 -0
- package/lib/features/story/hooks/useStorySegmentSync.js +51 -0
- package/lib/features/story/types/types.d.ts +38 -0
- package/lib/features/story/types/types.js +1 -0
- package/lib/features/story/utils/computeListStoryScrollState.d.ts +12 -0
- package/lib/features/story/utils/computeListStoryScrollState.js +70 -0
- package/lib/features/story/utils/listStoryMeasureQueue.d.ts +11 -0
- package/lib/features/story/utils/listStoryMeasureQueue.js +14 -0
- package/lib/features/story/utils/listStoryScrollTrack.d.ts +17 -0
- package/lib/features/story/utils/listStoryScrollTrack.js +72 -0
- package/lib/features/story/utils/spectaPresentation.d.ts +9 -0
- package/lib/features/story/utils/spectaPresentation.js +37 -0
- package/lib/features/story/utils/storySegmentViewItems.d.ts +5 -0
- package/lib/features/story/utils/storySegmentViewItems.js +30 -0
- package/lib/index.d.ts +11 -9
- package/lib/index.js +11 -9
- package/lib/keybindings.json +5 -0
- package/lib/mainview/OpenEOTileLayer.d.ts +49 -0
- package/lib/mainview/OpenEOTileLayer.js +179 -0
- package/lib/mainview/TemporalSlider.js +11 -9
- package/lib/mainview/geoJsonFeaturePatch.d.ts +9 -0
- package/lib/mainview/geoJsonFeaturePatch.js +43 -0
- package/lib/mainview/mainView.d.ts +90 -7
- package/lib/mainview/mainView.js +1196 -586
- package/lib/mainview/mainviewwidget.d.ts +5 -1
- package/lib/mainview/mainviewwidget.js +4 -2
- package/lib/shared/components/Button.d.ts +1 -1
- package/lib/shared/components/DropdownMenu.d.ts +1 -0
- package/lib/shared/components/DropdownMenu.js +3 -2
- package/lib/shared/components/NativeSelect.d.ts +8 -0
- package/lib/shared/components/NativeSelect.js +29 -0
- package/lib/shared/components/Tabs.d.ts +3 -3
- package/lib/shared/components/Tabs.js +5 -5
- package/lib/{formbuilder → shared/formbuilder}/creationform.js +71 -4
- package/lib/{formbuilder → shared/formbuilder}/editform.js +1 -1
- package/lib/{formbuilder → shared/formbuilder}/formselectors.d.ts +2 -2
- package/lib/{formbuilder → shared/formbuilder}/formselectors.js +10 -4
- package/lib/shared/formbuilder/index.d.ts +4 -0
- package/lib/shared/formbuilder/index.js +4 -0
- package/lib/{formbuilder → shared/formbuilder}/objectform/SchemaForm.d.ts +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/StoryEditorForm.d.ts +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/StoryEditorForm.js +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/components/LayerSelect.js +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/components/SegmentFormSymbology.js +4 -4
- package/lib/{formbuilder → shared/formbuilder}/objectform/components/SourcePropertiesField.js +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/components/StorySegmentReset.js +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/components/WmsTileSourceUrlInput.js +4 -4
- package/lib/{formbuilder → shared/formbuilder}/objectform/fileselectorwidget.js +8 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/schemaUtils.d.ts +3 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/schemaUtils.js +11 -0
- package/lib/{formbuilder → shared/formbuilder}/objectform/useSchemaFormState.d.ts +1 -1
- package/lib/{formbuilder → shared/formbuilder}/objectform/useSchemaFormState.js +1 -1
- package/lib/{icons.d.ts → shared/icons.d.ts} +2 -0
- package/lib/{icons.js → shared/icons.js} +28 -18
- package/lib/tools.d.ts +2 -0
- package/lib/tools.js +138 -4
- package/lib/types.d.ts +6 -1
- package/lib/types.js +6 -1
- package/lib/{menus.js → workspace/menus.js} +10 -2
- package/lib/workspace/panels/components/TabbedPanel.d.ts +17 -0
- package/lib/workspace/panels/components/TabbedPanel.js +19 -0
- package/lib/{panelview → workspace/panels}/components/layers.js +63 -18
- package/lib/workspace/panels/components/legendItem.js +680 -0
- package/lib/workspace/panels/hooks/useLayerTree.d.ts +19 -0
- package/lib/workspace/panels/hooks/useLayerTree.js +103 -0
- package/lib/workspace/panels/hooks/useRightPanelOptions.d.ts +27 -0
- package/lib/workspace/panels/hooks/useRightPanelOptions.js +72 -0
- package/lib/workspace/panels/hooks/useUIState.d.ts +2 -0
- package/lib/workspace/panels/hooks/useUIState.js +25 -0
- package/lib/{panelview → workspace/panels}/index.d.ts +1 -1
- package/lib/{panelview → workspace/panels}/index.js +1 -1
- package/lib/{panelview → workspace/panels}/leftpanel.d.ts +1 -1
- package/lib/workspace/panels/leftpanel.js +70 -0
- package/lib/{panelview/rightpanel.d.ts → workspace/panels/mergedpanel.d.ts} +6 -5
- package/lib/workspace/panels/mergedpanel.js +166 -0
- package/lib/workspace/panels/rightpanel.d.ts +25 -0
- package/lib/{panelview → workspace/panels}/rightpanel.js +53 -63
- package/lib/{statusbar → workspace/statusbar}/StatusBar.js +5 -4
- package/lib/{toolbar → workspace/toolbar}/widget.d.ts +2 -0
- package/lib/{toolbar → workspace/toolbar}/widget.js +33 -5
- package/lib/{widget.d.ts → workspace/widget.d.ts} +7 -5
- package/lib/{widget.js → workspace/widget.js} +16 -7
- package/package.json +16 -4
- package/style/base.css +109 -1
- package/style/icons/geopackage.svg +95 -0
- package/style/icons/pencil_solid.svg +7 -0
- package/style/identify.css +95 -0
- package/style/layerBrowser.css +28 -0
- package/style/leftPanel.css +25 -0
- package/style/shared/button.css +12 -0
- package/style/shared/dropdownMenu.css +9 -0
- package/style/shared/nativeSelect.css +75 -0
- package/style/shared/tabs.css +1 -1
- package/style/spectaProgressBar.css +0 -1
- package/style/storyPanel.css +140 -9
- package/style/storySpectaArticleOverlay.css +129 -0
- package/style/symbologyDialog.css +285 -27
- package/lib/dialogs/symbology/tiff_layer/TiffRendering.d.ts +0 -4
- package/lib/dialogs/symbology/tiff_layer/TiffRendering.js +0 -42
- package/lib/dialogs/symbology/tiff_layer/components/BandRow.d.ts +0 -23
- package/lib/dialogs/symbology/tiff_layer/components/BandRow.js +0 -59
- package/lib/dialogs/symbology/tiff_layer/types/MultibandColor.d.ts +0 -4
- package/lib/dialogs/symbology/tiff_layer/types/MultibandColor.js +0 -92
- package/lib/dialogs/symbology/tiff_layer/types/SingleBandPseudoColor.d.ts +0 -5
- package/lib/dialogs/symbology/tiff_layer/types/SingleBandPseudoColor.js +0 -313
- package/lib/dialogs/symbology/vector_layer/VectorRendering.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/VectorRendering.js +0 -112
- package/lib/dialogs/symbology/vector_layer/components/ValueSelect.d.ts +0 -8
- package/lib/dialogs/symbology/vector_layer/components/ValueSelect.js +0 -9
- package/lib/dialogs/symbology/vector_layer/types/Canonical.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/types/Canonical.js +0 -130
- package/lib/dialogs/symbology/vector_layer/types/Categorized.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/types/Categorized.js +0 -243
- package/lib/dialogs/symbology/vector_layer/types/Graduated.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/types/Graduated.js +0 -362
- package/lib/dialogs/symbology/vector_layer/types/SimpleSymbol.d.ts +0 -4
- package/lib/dialogs/symbology/vector_layer/types/SimpleSymbol.js +0 -120
- package/lib/formbuilder/index.d.ts +0 -4
- package/lib/formbuilder/index.js +0 -4
- package/lib/formbuilder/objectform/layer/storySegmentLayerForm.js +0 -95
- package/lib/formbuilder/objectform/layer/webGlLayerForm.d.ts +0 -3
- package/lib/formbuilder/objectform/process/index.d.ts +0 -1
- package/lib/formbuilder/objectform/process/index.js +0 -1
- package/lib/panelview/components/legendItem.js +0 -210
- package/lib/panelview/identify-panel/IdentifyPanel.js +0 -102
- package/lib/panelview/leftpanel.js +0 -139
- package/lib/panelview/story-maps/StoryViewerPanel.js +0 -116
- package/lib/panelview/story-maps/components/SpectaDesktopView.js +0 -49
- package/lib/processing/index.js +0 -200
- package/lib/processing/processingCommands.js +0 -67
- /package/lib/{panelview/annotationPanel.d.ts → features/annotations/AnnotationsPanel.d.ts} +0 -0
- /package/lib/{annotations → features/annotations}/components/Annotation.d.ts +0 -0
- /package/lib/{annotations → features/annotations}/components/Annotation.js +0 -0
- /package/lib/{annotations → features/annotations}/components/AnnotationFloater.d.ts +0 -0
- /package/lib/{annotations → features/annotations}/components/AnnotationFloater.js +0 -0
- /package/lib/{annotations → features/annotations}/components/Message.d.ts +0 -0
- /package/lib/{annotations → features/annotations}/components/Message.js +0 -0
- /package/lib/{annotations → features/annotations}/model.d.ts +0 -0
- /package/lib/{annotations → features/annotations}/model.js +0 -0
- /package/lib/{console → features/console}/consoleview.d.ts +0 -0
- /package/lib/{console → features/console}/index.d.ts +0 -0
- /package/lib/{console → features/console}/index.js +0 -0
- /package/lib/{panelview/filter-panel → features/filter}/Filter.d.ts +0 -0
- /package/lib/{stacBrowser/types/types.js → features/identify/types/editorTypes.js} +0 -0
- /package/lib/{dialogs/layerBrowserDialog.d.ts → features/layer-browser/index.d.ts} +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/layer/heatmapLayerForm.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/layer/hillshadeLayerForm.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/layer/storySegmentLayerForm.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/layer/vectorlayerform.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/source/geojsonsource.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/source/geotiffsource.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/source/pathbasedsource.d.ts +0 -0
- /package/lib/{formbuilder/objectform → features/layers/forms}/source/tilesourceform.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelectorEntry.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ColorRampSelectorEntry.js +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/ModeSelectRow.js +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/RgbaColorPicker.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_ramp/cmocean.json +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopContainer.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/components/color_stops/StopContainer.js +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useEffectiveSymbologyParams.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useEffectiveSymbologyParams.js +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useGetProperties.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useGetSymbology.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useOkSignal.d.ts +0 -0
- /package/lib/{dialogs → features/layers}/symbology/hooks/useOkSignal.js +0 -0
- /package/lib/{formbuilder/objectform/process → features/processing/forms}/dissolveProcessForm.d.ts +0 -0
- /package/lib/{processing → features/processing}/processingFormToParam.d.ts +0 -0
- /package/lib/{processing → features/processing}/processingFormToParam.js +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/StacPanel.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableComboBox.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/QueryableRow.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/StacFilterExtensionPanel.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/filter-extension/StacQueryableFilters.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacFilterSection.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacGeodesFilterPanel.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/geodes/StacGeodesFilterPanel.js +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/shared/StacPanelResults.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/shared/StacSpatialExtent.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/components/shared/StacTemporalExtent.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/constants.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/constants.js +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/context/StacResultsContext.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/hooks/useGeodesSearch.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/hooks/useStacFilterExtension.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/hooks/useStacSearch.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/index.d.ts +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/index.js +0 -0
- /package/lib/{stacBrowser → features/stac-browser}/types/types.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/StoryEditorPanel.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/PreviewModeSwitch.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/PreviewModeSwitch.js +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryContentSection.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryContentSection.js +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryImageSection.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryImageSection.js +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryNavBar.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryNavBar.js +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StorySubtitleSection.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StorySubtitleSection.js +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryTitleSection.d.ts +0 -0
- /package/lib/{panelview/story-maps → features/story}/components/StoryTitleSection.js +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/creationform.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/editform.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/SchemaForm.js +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/LayerSelect.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/OpacitySlider.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/OpacitySlider.js +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/SegmentFormSymbology.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/SourcePropertiesField.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/StorySegmentReset.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/components/WmsTileSourceUrlInput.d.ts +0 -0
- /package/lib/{formbuilder → shared/formbuilder}/objectform/fileselectorwidget.d.ts +0 -0
- /package/lib/{store.d.ts → shared/store.d.ts} +0 -0
- /package/lib/{store.js → shared/store.js} +0 -0
- /package/lib/{menus.d.ts → workspace/menus.d.ts} +0 -0
- /package/lib/{panelview → workspace/panels}/components/layers.d.ts +0 -0
- /package/lib/{panelview → workspace/panels}/components/legendItem.d.ts +0 -0
- /package/lib/{panelview → workspace/panels}/header.d.ts +0 -0
- /package/lib/{panelview → workspace/panels}/header.js +0 -0
- /package/lib/{statusbar → workspace/statusbar}/SpectaPresentationProgressBar.d.ts +0 -0
- /package/lib/{statusbar → workspace/statusbar}/SpectaPresentationProgressBar.js +0 -0
- /package/lib/{statusbar → workspace/statusbar}/StatusBar.d.ts +0 -0
- /package/lib/{toolbar → workspace/toolbar}/index.d.ts +0 -0
- /package/lib/{toolbar → workspace/toolbar}/index.js +0 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { FeatureCard } from './components/FeatureCard';
|
|
3
|
+
import { useIdentifyPropertyEditor } from './hooks/useIdentifyPropertyEditor';
|
|
4
|
+
import { getFeatureIdentifier } from './utils/getFeatureIdentifier';
|
|
5
|
+
export const IdentifyPanelComponent = ({ model, patchGeoJSONFeatureProperties, }) => {
|
|
6
|
+
var _a;
|
|
7
|
+
const [features, setFeatures] = useState([]);
|
|
8
|
+
const [visibleRows, setVisibleRows] = useState({
|
|
9
|
+
0: true,
|
|
10
|
+
});
|
|
11
|
+
const [remoteUser, setRemoteUser] = useState(null);
|
|
12
|
+
const featuresRef = useRef(features);
|
|
13
|
+
const { editorState, editorActions } = useIdentifyPropertyEditor({
|
|
14
|
+
model,
|
|
15
|
+
patchGeoJSONFeatureProperties,
|
|
16
|
+
setFeatures,
|
|
17
|
+
});
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
featuresRef.current = features;
|
|
20
|
+
}, [features]);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
const handleIdentifyFeaturesChanged = () => {
|
|
23
|
+
var _a, _b, _c, _d, _e;
|
|
24
|
+
const clients = model.sharedModel.awareness.getStates();
|
|
25
|
+
const remoteUserId = (_a = model === null || model === void 0 ? void 0 : model.localState) === null || _a === void 0 ? void 0 : _a.remoteUser;
|
|
26
|
+
// If following a collaborator
|
|
27
|
+
if (remoteUserId) {
|
|
28
|
+
const remoteState = clients.get(remoteUserId);
|
|
29
|
+
if (remoteState) {
|
|
30
|
+
setRemoteUser(previousUser => {
|
|
31
|
+
var _a;
|
|
32
|
+
return (previousUser === null || previousUser === void 0 ? void 0 : previousUser.username) === ((_a = remoteState.user) === null || _a === void 0 ? void 0 : _a.username)
|
|
33
|
+
? previousUser
|
|
34
|
+
: remoteState.user;
|
|
35
|
+
});
|
|
36
|
+
setFeatures((_c = (_b = remoteState.identifiedFeatures) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : []);
|
|
37
|
+
}
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
setRemoteUser(previousUser => (previousUser ? null : previousUser));
|
|
41
|
+
// If not following a collaborator
|
|
42
|
+
const identifiedFeatures = (_e = (_d = model === null || model === void 0 ? void 0 : model.localState) === null || _d === void 0 ? void 0 : _d.identifiedFeatures) === null || _e === void 0 ? void 0 : _e.value;
|
|
43
|
+
if (!identifiedFeatures) {
|
|
44
|
+
setFeatures([]);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (model.currentMode === 'identifying' &&
|
|
48
|
+
featuresRef.current !== identifiedFeatures) {
|
|
49
|
+
setFeatures(identifiedFeatures);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const signals = [
|
|
53
|
+
model === null || model === void 0 ? void 0 : model.identifiedFeaturesChanged,
|
|
54
|
+
model === null || model === void 0 ? void 0 : model.remoteUserChanged,
|
|
55
|
+
];
|
|
56
|
+
signals.forEach(signal => signal.connect(handleIdentifyFeaturesChanged));
|
|
57
|
+
handleIdentifyFeaturesChanged();
|
|
58
|
+
return () => {
|
|
59
|
+
signals.forEach(signal => signal.disconnect(handleIdentifyFeaturesChanged));
|
|
60
|
+
};
|
|
61
|
+
}, [model]);
|
|
62
|
+
const highlightFeatureOnMap = (feature) => {
|
|
63
|
+
var _a, _b;
|
|
64
|
+
(_a = model === null || model === void 0 ? void 0 : model.highlightFeatureSignal) === null || _a === void 0 ? void 0 : _a.emit(feature);
|
|
65
|
+
const geometry = feature.geometry || feature._geometry;
|
|
66
|
+
(_b = model === null || model === void 0 ? void 0 : model.flyToGeometrySignal) === null || _b === void 0 ? void 0 : _b.emit(geometry);
|
|
67
|
+
};
|
|
68
|
+
const toggleFeatureVisibility = (rowIndex, isOpen) => {
|
|
69
|
+
setVisibleRows(prev => (Object.assign(Object.assign({}, prev), { [rowIndex]: isOpen })));
|
|
70
|
+
};
|
|
71
|
+
const toggleFeatureFloater = (feature) => {
|
|
72
|
+
const featureId = getFeatureIdentifier(feature);
|
|
73
|
+
if (!featureId) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
setFeatures(previous => {
|
|
77
|
+
const nextFeatures = previous.map(item => getFeatureIdentifier(item.feature) === featureId
|
|
78
|
+
? Object.assign(Object.assign({}, item), { floaterOpen: !item.floaterOpen }) : item);
|
|
79
|
+
model.syncIdentifiedFeatures(nextFeatures, model.getClientId().toString());
|
|
80
|
+
return nextFeatures;
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
const getFeatureNameOrId = (feature, featureIndex) => {
|
|
84
|
+
for (const key of Object.keys(feature)) {
|
|
85
|
+
const lowerCase = key.toLowerCase();
|
|
86
|
+
if ((lowerCase.includes('label') ||
|
|
87
|
+
lowerCase.includes('name') ||
|
|
88
|
+
lowerCase === 'id') &&
|
|
89
|
+
feature[key]) {
|
|
90
|
+
return String(feature[key]);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return `Feature ${featureIndex + 1}`;
|
|
94
|
+
};
|
|
95
|
+
return (React.createElement("div", { className: "jgis-identify-wrapper", style: {
|
|
96
|
+
border: ((_a = model === null || model === void 0 ? void 0 : model.localState) === null || _a === void 0 ? void 0 : _a.remoteUser)
|
|
97
|
+
? `solid 3px ${remoteUser === null || remoteUser === void 0 ? void 0 : remoteUser.color}`
|
|
98
|
+
: 'unset',
|
|
99
|
+
} },
|
|
100
|
+
!features.length && (React.createElement("div", { style: { textAlign: 'center' } }, "Please select a layer from the layer list, then \"i\" from the toolbar to start identifying features.")),
|
|
101
|
+
features.map((item, rowIndex) => (React.createElement(FeatureCard, { key: rowIndex, feature: item.feature, rowIndex: rowIndex, isVisible: !!visibleRows[rowIndex], featureTitle: getFeatureNameOrId(item.feature, rowIndex), isFloaterOpen: !!item.floaterOpen, editorState: editorState, editorActions: editorActions, onToggleVisibility: toggleFeatureVisibility, onToggleFloater: () => toggleFeatureFloater(item.feature), onHighlightFeature: highlightFeatureOnMap })))));
|
|
102
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IIdentifiedFeature } from '@jupytergis/schema';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { IPropertyEditorActions, IPropertyEditorState } from '../types/editorTypes';
|
|
4
|
+
interface IFeatureCardProps {
|
|
5
|
+
feature: IIdentifiedFeature;
|
|
6
|
+
rowIndex: number;
|
|
7
|
+
featureTitle: string;
|
|
8
|
+
isVisible: boolean;
|
|
9
|
+
isFloaterOpen: boolean;
|
|
10
|
+
editorState: IPropertyEditorState;
|
|
11
|
+
editorActions: IPropertyEditorActions;
|
|
12
|
+
onToggleVisibility: (rowIndex: number, isOpen: boolean) => void;
|
|
13
|
+
onToggleFloater: () => void;
|
|
14
|
+
onHighlightFeature: (feature: any) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const FeatureCard: React.FC<IFeatureCardProps>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from "../../../shared/components/Collapsible";
|
|
3
|
+
import { FeatureCardHeader } from './FeatureCardHeader';
|
|
4
|
+
import { FeaturePropertyList } from './FeaturePropertyList';
|
|
5
|
+
import { AddPropertyEditor } from './PropertyEditors';
|
|
6
|
+
export const FeatureCard = ({ feature, rowIndex, featureTitle, isVisible, isFloaterOpen, editorState, editorActions, onToggleVisibility, onToggleFloater, onHighlightFeature, }) => {
|
|
7
|
+
const cardEditorState = editorState.editingFeatureIndex === rowIndex
|
|
8
|
+
? editorState
|
|
9
|
+
: {
|
|
10
|
+
editingFeatureIndex: null,
|
|
11
|
+
editorMode: null,
|
|
12
|
+
editingPropertyKey: null,
|
|
13
|
+
newPropertyKey: '',
|
|
14
|
+
newPropertyValue: '',
|
|
15
|
+
isSavingProperty: false,
|
|
16
|
+
};
|
|
17
|
+
return (React.createElement("div", { className: "jgis-identify-card" },
|
|
18
|
+
React.createElement(Collapsible, { open: isVisible, onOpenChange: nextOpen => onToggleVisibility(rowIndex, nextOpen) },
|
|
19
|
+
React.createElement(CollapsibleTrigger, { asChild: true },
|
|
20
|
+
React.createElement("div", { className: "jgis-symbology-override-collapsible-trigger" },
|
|
21
|
+
React.createElement(FeatureCardHeader, { feature: feature, isFloaterOpen: isFloaterOpen, featureTitle: featureTitle, onToggleFloater: onToggleFloater, onHighlightFeature: onHighlightFeature }))),
|
|
22
|
+
React.createElement(CollapsibleContent, null,
|
|
23
|
+
React.createElement("div", { className: "jgis-identify-content" },
|
|
24
|
+
React.createElement(FeaturePropertyList, { feature: feature, rowIndex: rowIndex, editorState: cardEditorState, editorActions: editorActions }),
|
|
25
|
+
feature._fromDrawTool === true && (React.createElement(AddPropertyEditor, { feature: feature, rowIndex: rowIndex, editorState: cardEditorState, editorActions: editorActions })))))));
|
|
26
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IIdentifiedFeature } from '@jupytergis/schema';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface IFeatureCardHeaderProps {
|
|
4
|
+
feature: IIdentifiedFeature;
|
|
5
|
+
featureTitle: string;
|
|
6
|
+
isFloaterOpen: boolean;
|
|
7
|
+
onToggleFloater: () => void;
|
|
8
|
+
onHighlightFeature: (feature: IIdentifiedFeature) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const FeatureCardHeader: React.FC<IFeatureCardHeaderProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ChevronRightIcon, Eye, EyeOff, Search } from 'lucide-react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Button } from "../../../shared/components/Button";
|
|
4
|
+
import { getFeatureIdentifier } from '../utils/getFeatureIdentifier';
|
|
5
|
+
export const FeatureCardHeader = ({ feature, featureTitle, isFloaterOpen, onToggleFloater, onHighlightFeature, }) => {
|
|
6
|
+
const featureIdentifier = getFeatureIdentifier(feature);
|
|
7
|
+
const isRasterFeature = !feature.geometry &&
|
|
8
|
+
!feature._geometry &&
|
|
9
|
+
typeof (feature === null || feature === void 0 ? void 0 : feature.x) !== 'number' &&
|
|
10
|
+
typeof (feature === null || feature === void 0 ? void 0 : feature.y) !== 'number';
|
|
11
|
+
return (React.createElement("div", { className: "jgis-identify-card-header" },
|
|
12
|
+
React.createElement("div", { className: "jgis-identify-card-header-actions" },
|
|
13
|
+
React.createElement(Button, { size: "icon-sm", variant: "icon", className: "jgis-rotate-90 jgis-bg-transparent" },
|
|
14
|
+
React.createElement(ChevronRightIcon, null)),
|
|
15
|
+
React.createElement("span", null, featureTitle)),
|
|
16
|
+
React.createElement("div", { className: "jgis-identify-card-header-actions" },
|
|
17
|
+
featureIdentifier && (React.createElement(Button, { size: "icon-md", variant: "icon", className: "jgis-inline-icon", onClick: e => {
|
|
18
|
+
e.preventDefault();
|
|
19
|
+
e.stopPropagation();
|
|
20
|
+
onToggleFloater();
|
|
21
|
+
}, title: isFloaterOpen ? 'Hide map floater' : 'Show map floater' }, isFloaterOpen ? React.createElement(EyeOff, null) : React.createElement(Eye, null))),
|
|
22
|
+
React.createElement(Button, { size: "icon-md", variant: "icon", className: "jgis-inline-icon", onClick: e => {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
e.stopPropagation();
|
|
25
|
+
onHighlightFeature(feature);
|
|
26
|
+
}, title: isRasterFeature
|
|
27
|
+
? 'Highlight not available for raster features'
|
|
28
|
+
: 'Highlight feature on map', disabled: isRasterFeature },
|
|
29
|
+
React.createElement(Search, null)))));
|
|
30
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
const FeatureFloater = ({ feature }) => {
|
|
3
|
+
var _a;
|
|
4
|
+
const title = (_a = feature.label) !== null && _a !== void 0 ? _a : 'Feature';
|
|
5
|
+
const entries = Object.entries(feature)
|
|
6
|
+
.filter(([key, value]) => {
|
|
7
|
+
if (key === 'geometry' || key === '_geometry' || key.startsWith('_')) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
return typeof value !== 'object' || value === null;
|
|
11
|
+
})
|
|
12
|
+
.sort(([keyA], [keyB]) => keyA.localeCompare(keyB));
|
|
13
|
+
return (React.createElement("div", { className: "jGIS-FeatureFloater" },
|
|
14
|
+
React.createElement("div", { className: "jGIS-FeatureFloater-title" }, String(title)),
|
|
15
|
+
entries.map(([key, value]) => (React.createElement("div", { className: "jGIS-FeatureFloater-row", key: key },
|
|
16
|
+
React.createElement("strong", { className: "jGIS-FeatureFloater-key" }, key),
|
|
17
|
+
React.createElement("span", { className: "jGIS-FeatureFloater-value" }, String(value)))))));
|
|
18
|
+
};
|
|
19
|
+
export default FeatureFloater;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IIdentifiedFeature } from '@jupytergis/schema';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { IPropertyEditorActions, IPropertyEditorState } from '../types/editorTypes';
|
|
4
|
+
interface IFeaturePropertyListProps {
|
|
5
|
+
feature: IIdentifiedFeature;
|
|
6
|
+
rowIndex: number;
|
|
7
|
+
editorState: IPropertyEditorState;
|
|
8
|
+
editorActions: IPropertyEditorActions;
|
|
9
|
+
}
|
|
10
|
+
export declare const FeaturePropertyList: React.FC<IFeaturePropertyListProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FeatureRow } from './FeatureRow';
|
|
3
|
+
import { PropertyRowEditor } from './PropertyEditors';
|
|
4
|
+
export const FeaturePropertyList = ({ feature, rowIndex, editorState, editorActions, }) => {
|
|
5
|
+
const isFeatureEditable = (feature === null || feature === void 0 ? void 0 : feature._fromDrawTool) === true;
|
|
6
|
+
return (React.createElement("div", { className: "jgis-identify-property-rows" }, Object.entries(feature)
|
|
7
|
+
.filter(([_, value]) => typeof value !== 'object' || value === null)
|
|
8
|
+
.sort(([keyA], [keyB]) => keyA.localeCompare(keyB))
|
|
9
|
+
.map(([key, value]) => {
|
|
10
|
+
const isEditingThisRow = editorState.editingFeatureIndex === rowIndex &&
|
|
11
|
+
editorState.editorMode === 'edit' &&
|
|
12
|
+
editorState.editingPropertyKey === key;
|
|
13
|
+
if (isEditingThisRow) {
|
|
14
|
+
return (React.createElement(PropertyRowEditor, { key: key, feature: feature, rowIndex: rowIndex, editorState: editorState, editorActions: editorActions }));
|
|
15
|
+
}
|
|
16
|
+
return (React.createElement(FeatureRow, { key: key, feature: feature, rowIndex: rowIndex, propertyKey: key, value: value, showActions: isFeatureEditable && !key.startsWith('_'), onEditProperty: (propertyKey, propertyValue) => editorActions.onEditProperty(rowIndex, propertyKey, propertyValue), onDeleteProperty: (targetFeature, targetRowIndex, targetPropertyKey) => editorActions.onDeleteProperty(targetFeature, targetRowIndex, targetPropertyKey) }));
|
|
17
|
+
})));
|
|
18
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IIdentifiedFeature } from '@jupytergis/schema';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface IFeatureRowProps {
|
|
4
|
+
feature: IIdentifiedFeature;
|
|
5
|
+
rowIndex: number;
|
|
6
|
+
propertyKey: string;
|
|
7
|
+
value: unknown;
|
|
8
|
+
showActions: boolean;
|
|
9
|
+
onEditProperty: (propertyKey: string, value: unknown) => void;
|
|
10
|
+
onDeleteProperty: (feature: IIdentifiedFeature, rowIndex: number, propertyKey: string) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const FeatureRow: React.FC<IFeatureRowProps>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Pencil, Trash2 } from 'lucide-react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { PropertyActionsMenu } from './PropertyEditors';
|
|
4
|
+
export const FeatureRow = ({ feature, rowIndex, propertyKey, value, showActions, onEditProperty, onDeleteProperty, }) => {
|
|
5
|
+
return (React.createElement("div", { className: "jgis-identify-row" },
|
|
6
|
+
React.createElement("strong", { className: "jgis-identify-col-key" }, propertyKey),
|
|
7
|
+
React.createElement("span", { className: "jgis-identify-col-value" }, String(value)),
|
|
8
|
+
showActions && (React.createElement(PropertyActionsMenu, { onContentClick: event => event.stopPropagation(), items: [
|
|
9
|
+
{
|
|
10
|
+
label: 'Edit',
|
|
11
|
+
icon: (React.createElement(Pencil, { "data-icon": "inline-start", className: "jgis-inline-icon" })),
|
|
12
|
+
onSelect: () => {
|
|
13
|
+
onEditProperty(propertyKey, value);
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
label: 'Delete',
|
|
18
|
+
icon: (React.createElement(Trash2, { "data-icon": "inline-start", className: "jgis-inline-icon" })),
|
|
19
|
+
variant: 'destructive',
|
|
20
|
+
onSelect: () => {
|
|
21
|
+
onDeleteProperty(feature, rowIndex, propertyKey);
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
] }))));
|
|
25
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { IIdentifiedFeature } from '@jupytergis/schema';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { IPropertyEditorActions, IPropertyEditorState } from '../types/editorTypes';
|
|
4
|
+
interface IPropertyFieldsProps {
|
|
5
|
+
editorState: IPropertyEditorState;
|
|
6
|
+
editorActions: IPropertyEditorActions;
|
|
7
|
+
}
|
|
8
|
+
export declare const PropertyFields: React.FC<IPropertyFieldsProps>;
|
|
9
|
+
interface IPropertyActionMenuProps {
|
|
10
|
+
feature: IIdentifiedFeature;
|
|
11
|
+
rowIndex: number;
|
|
12
|
+
editorState: IPropertyEditorState;
|
|
13
|
+
editorActions: IPropertyEditorActions;
|
|
14
|
+
}
|
|
15
|
+
interface IPropertyActionsMenuItem {
|
|
16
|
+
label: string;
|
|
17
|
+
icon: React.ReactNode;
|
|
18
|
+
onSelect: () => void;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
variant?: 'default' | 'destructive';
|
|
21
|
+
}
|
|
22
|
+
interface IPropertyActionsMenuProps {
|
|
23
|
+
title?: string;
|
|
24
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
25
|
+
onContentClick?: (event: React.MouseEvent) => void;
|
|
26
|
+
items: IPropertyActionsMenuItem[];
|
|
27
|
+
}
|
|
28
|
+
export declare const PropertyActionsMenu: React.FC<IPropertyActionsMenuProps>;
|
|
29
|
+
export declare const PropertyActionMenu: React.FC<IPropertyActionMenuProps>;
|
|
30
|
+
interface IPropertyRowEditorProps {
|
|
31
|
+
feature: IIdentifiedFeature;
|
|
32
|
+
rowIndex: number;
|
|
33
|
+
editorState: IPropertyEditorState;
|
|
34
|
+
editorActions: IPropertyEditorActions;
|
|
35
|
+
}
|
|
36
|
+
export declare const PropertyRowEditor: React.FC<IPropertyRowEditorProps>;
|
|
37
|
+
interface IAddPropertyEditorProps {
|
|
38
|
+
feature: IIdentifiedFeature;
|
|
39
|
+
rowIndex: number;
|
|
40
|
+
editorState: IPropertyEditorState;
|
|
41
|
+
editorActions: IPropertyEditorActions;
|
|
42
|
+
}
|
|
43
|
+
export declare const AddPropertyEditor: React.FC<IAddPropertyEditorProps>;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Ban, CirclePlus, Ellipsis, Save } from 'lucide-react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Button } from "../../../shared/components/Button";
|
|
4
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "../../../shared/components/DropdownMenu";
|
|
5
|
+
import { Input } from "../../../shared/components/Input";
|
|
6
|
+
export const PropertyFields = ({ editorState, editorActions, }) => {
|
|
7
|
+
return (React.createElement(React.Fragment, null,
|
|
8
|
+
React.createElement(Input, { className: "jgis-identify-col-key", type: "text", placeholder: "key", value: editorState.newPropertyKey, onChange: event => editorActions.onNewPropertyKeyChange(event.target.value) }),
|
|
9
|
+
React.createElement(Input, { className: "jgis-identify-col-value", type: "text", placeholder: "value", value: editorState.newPropertyValue, onChange: event => editorActions.onNewPropertyValueChange(event.target.value) })));
|
|
10
|
+
};
|
|
11
|
+
export const PropertyActionsMenu = ({ title = 'Property actions', side = 'left', onContentClick, items, }) => {
|
|
12
|
+
return (React.createElement(DropdownMenu, { modal: false },
|
|
13
|
+
React.createElement(DropdownMenuTrigger, { asChild: true },
|
|
14
|
+
React.createElement(Button, { type: "button", className: "jgis-identify-col-actions", title: title, variant: "icon", size: "icon-md" },
|
|
15
|
+
React.createElement(Ellipsis, null))),
|
|
16
|
+
React.createElement(DropdownMenuContent, { side: side, onClick: onContentClick }, items.map(item => {
|
|
17
|
+
var _a;
|
|
18
|
+
return (React.createElement(DropdownMenuItem, { key: item.label, disabled: item.disabled, variant: (_a = item.variant) !== null && _a !== void 0 ? _a : 'default', onSelect: item.onSelect },
|
|
19
|
+
item.icon,
|
|
20
|
+
item.label));
|
|
21
|
+
}))));
|
|
22
|
+
};
|
|
23
|
+
export const PropertyActionMenu = ({ feature, rowIndex, editorState, editorActions, }) => {
|
|
24
|
+
return (React.createElement(PropertyActionsMenu, { items: [
|
|
25
|
+
{
|
|
26
|
+
label: 'Save',
|
|
27
|
+
icon: React.createElement(Save, { "data-icon": "inline-start", className: "jgis-inline-icon" }),
|
|
28
|
+
disabled: !editorState.newPropertyKey.trim() || editorState.isSavingProperty,
|
|
29
|
+
onSelect: () => {
|
|
30
|
+
editorActions.onSaveProperty(feature, rowIndex);
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
label: 'Cancel',
|
|
35
|
+
icon: React.createElement(Ban, { "data-icon": "inline-start", className: "jgis-inline-icon" }),
|
|
36
|
+
variant: 'destructive',
|
|
37
|
+
onSelect: () => {
|
|
38
|
+
editorActions.onCancelProperty();
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
] }));
|
|
42
|
+
};
|
|
43
|
+
export const PropertyRowEditor = ({ feature, rowIndex, editorState, editorActions, }) => {
|
|
44
|
+
return (React.createElement("div", { className: "jgis-identify-row jgis-identify-row-editor" },
|
|
45
|
+
React.createElement(PropertyFields, { editorState: editorState, editorActions: editorActions }),
|
|
46
|
+
React.createElement(PropertyActionMenu, { feature: feature, rowIndex: rowIndex, editorState: editorState, editorActions: editorActions })));
|
|
47
|
+
};
|
|
48
|
+
export const AddPropertyEditor = ({ feature, rowIndex, editorState, editorActions, }) => {
|
|
49
|
+
if (editorState.editorMode === 'add') {
|
|
50
|
+
return (React.createElement(PropertyRowEditor, { feature: feature, rowIndex: rowIndex, editorState: editorState, editorActions: editorActions }));
|
|
51
|
+
}
|
|
52
|
+
return (React.createElement("div", { className: "jgis-identify-row jgis-identify-row-add" },
|
|
53
|
+
React.createElement(Button, { className: "jgis-identify-add-button", onClick: () => editorActions.onStartAddProperty(rowIndex), variant: "outline", size: "sm" },
|
|
54
|
+
React.createElement(CirclePlus, { "data-icon": "inline-start", className: "jgis-inline-icon" }),
|
|
55
|
+
"Add Property")));
|
|
56
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IIdentifiedFeatureEntry, IJupyterGISModel } from '@jupytergis/schema';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { IPropertyEditorActions, IPropertyEditorState, PatchGeoJSONFeatureProperties } from '../types/editorTypes';
|
|
4
|
+
export declare function useIdentifyPropertyEditor(props: {
|
|
5
|
+
model: IJupyterGISModel;
|
|
6
|
+
patchGeoJSONFeatureProperties?: PatchGeoJSONFeatureProperties;
|
|
7
|
+
setFeatures: React.Dispatch<React.SetStateAction<IIdentifiedFeatureEntry[]>>;
|
|
8
|
+
}): {
|
|
9
|
+
editorState: IPropertyEditorState;
|
|
10
|
+
editorActions: IPropertyEditorActions;
|
|
11
|
+
};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
export function useIdentifyPropertyEditor(props) {
|
|
3
|
+
const { model, patchGeoJSONFeatureProperties, setFeatures } = props;
|
|
4
|
+
const [editingFeatureIndex, setEditingFeatureIndex] = useState(null);
|
|
5
|
+
const [editorMode, setEditorMode] = useState(null);
|
|
6
|
+
const [editingPropertyKey, setEditingPropertyKey] = useState(null);
|
|
7
|
+
const [newPropertyKey, setNewPropertyKey] = useState('');
|
|
8
|
+
const [newPropertyValue, setNewPropertyValue] = useState('');
|
|
9
|
+
const [isSavingProperty, setIsSavingProperty] = useState(false);
|
|
10
|
+
const resetAddPropertyEditor = () => {
|
|
11
|
+
setEditingFeatureIndex(null);
|
|
12
|
+
setEditorMode(null);
|
|
13
|
+
setEditingPropertyKey(null);
|
|
14
|
+
setNewPropertyKey('');
|
|
15
|
+
setNewPropertyValue('');
|
|
16
|
+
setIsSavingProperty(false);
|
|
17
|
+
};
|
|
18
|
+
const startAddProperty = (featureIndex) => {
|
|
19
|
+
setEditingFeatureIndex(featureIndex);
|
|
20
|
+
setEditorMode('add');
|
|
21
|
+
setEditingPropertyKey(null);
|
|
22
|
+
setNewPropertyKey('');
|
|
23
|
+
setNewPropertyValue('');
|
|
24
|
+
};
|
|
25
|
+
const getSelectedSourceId = () => {
|
|
26
|
+
var _a, _b, _c;
|
|
27
|
+
const selectedLayers = (_b = (_a = model.localState) === null || _a === void 0 ? void 0 : _a.selected) === null || _b === void 0 ? void 0 : _b.value;
|
|
28
|
+
if (!selectedLayers) {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
const selectedLayerId = Object.keys(selectedLayers)[0];
|
|
32
|
+
const selectedLayer = model.getLayer(selectedLayerId);
|
|
33
|
+
return (_c = selectedLayer === null || selectedLayer === void 0 ? void 0 : selectedLayer.parameters) === null || _c === void 0 ? void 0 : _c.source;
|
|
34
|
+
};
|
|
35
|
+
const handleAddProperty = async (feature, featureIndex) => {
|
|
36
|
+
const featureId = feature._id;
|
|
37
|
+
if (!featureId) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const sourceId = getSelectedSourceId();
|
|
41
|
+
const key = newPropertyKey.trim();
|
|
42
|
+
const previousKey = editorMode === 'edit' ? editingPropertyKey === null || editingPropertyKey === void 0 ? void 0 : editingPropertyKey.trim() : undefined;
|
|
43
|
+
if (!sourceId ||
|
|
44
|
+
!patchGeoJSONFeatureProperties ||
|
|
45
|
+
!key ||
|
|
46
|
+
isSavingProperty) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
setIsSavingProperty(true);
|
|
50
|
+
const propertyUpdates = { [key]: newPropertyValue };
|
|
51
|
+
if (previousKey && previousKey !== key) {
|
|
52
|
+
propertyUpdates[previousKey] = undefined;
|
|
53
|
+
}
|
|
54
|
+
const success = await patchGeoJSONFeatureProperties(sourceId, { featureId }, propertyUpdates);
|
|
55
|
+
if (success) {
|
|
56
|
+
setFeatures(previous => {
|
|
57
|
+
const updatedFeatures = [...previous];
|
|
58
|
+
const targetFeatureEntry = updatedFeatures[featureIndex];
|
|
59
|
+
if (targetFeatureEntry === null || targetFeatureEntry === void 0 ? void 0 : targetFeatureEntry.feature) {
|
|
60
|
+
const updatedTargetFeature = Object.assign({}, targetFeatureEntry.feature);
|
|
61
|
+
if (previousKey && previousKey !== key) {
|
|
62
|
+
delete updatedTargetFeature[previousKey];
|
|
63
|
+
}
|
|
64
|
+
updatedTargetFeature[key] = newPropertyValue;
|
|
65
|
+
updatedFeatures[featureIndex] = Object.assign(Object.assign({}, targetFeatureEntry), { feature: updatedTargetFeature });
|
|
66
|
+
}
|
|
67
|
+
model.syncIdentifiedFeatures(updatedFeatures, model.getClientId().toString());
|
|
68
|
+
return updatedFeatures;
|
|
69
|
+
});
|
|
70
|
+
resetAddPropertyEditor();
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
setIsSavingProperty(false);
|
|
74
|
+
};
|
|
75
|
+
const handleDeleteProperty = async (feature, featureIndex, propertyKey) => {
|
|
76
|
+
const featureId = feature._id;
|
|
77
|
+
if (!featureId) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (!patchGeoJSONFeatureProperties ||
|
|
81
|
+
!propertyKey.trim() ||
|
|
82
|
+
isSavingProperty) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const sourceId = getSelectedSourceId();
|
|
86
|
+
if (!sourceId) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
setIsSavingProperty(true);
|
|
90
|
+
const success = await patchGeoJSONFeatureProperties(sourceId, { featureId }, { [propertyKey]: undefined });
|
|
91
|
+
if (success) {
|
|
92
|
+
setFeatures(previous => {
|
|
93
|
+
const updatedFeatures = [...previous];
|
|
94
|
+
const targetFeatureEntry = updatedFeatures[featureIndex];
|
|
95
|
+
if (targetFeatureEntry === null || targetFeatureEntry === void 0 ? void 0 : targetFeatureEntry.feature) {
|
|
96
|
+
const updatedTargetFeature = Object.assign({}, targetFeatureEntry.feature);
|
|
97
|
+
delete updatedTargetFeature[propertyKey];
|
|
98
|
+
updatedFeatures[featureIndex] = Object.assign(Object.assign({}, targetFeatureEntry), { feature: updatedTargetFeature });
|
|
99
|
+
}
|
|
100
|
+
model.syncIdentifiedFeatures(updatedFeatures, model.getClientId().toString());
|
|
101
|
+
return updatedFeatures;
|
|
102
|
+
});
|
|
103
|
+
resetAddPropertyEditor();
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
setIsSavingProperty(false);
|
|
107
|
+
};
|
|
108
|
+
const editorState = {
|
|
109
|
+
editingFeatureIndex,
|
|
110
|
+
editorMode,
|
|
111
|
+
editingPropertyKey,
|
|
112
|
+
newPropertyKey,
|
|
113
|
+
newPropertyValue,
|
|
114
|
+
isSavingProperty,
|
|
115
|
+
};
|
|
116
|
+
const editorActions = {
|
|
117
|
+
onEditProperty: (index, propertyKey, value) => {
|
|
118
|
+
setEditingFeatureIndex(index);
|
|
119
|
+
setEditorMode('edit');
|
|
120
|
+
setEditingPropertyKey(propertyKey);
|
|
121
|
+
setNewPropertyKey(propertyKey);
|
|
122
|
+
setNewPropertyValue(String(value !== null && value !== void 0 ? value : ''));
|
|
123
|
+
},
|
|
124
|
+
onDeleteProperty: handleDeleteProperty,
|
|
125
|
+
onStartAddProperty: startAddProperty,
|
|
126
|
+
onSaveProperty: handleAddProperty,
|
|
127
|
+
onCancelProperty: resetAddPropertyEditor,
|
|
128
|
+
onNewPropertyKeyChange: setNewPropertyKey,
|
|
129
|
+
onNewPropertyValueChange: setNewPropertyValue,
|
|
130
|
+
};
|
|
131
|
+
return { editorState, editorActions };
|
|
132
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IDict, IIdentifiedFeature } from '@jupytergis/schema';
|
|
2
|
+
export type PatchGeoJSONFeatureProperties = (sourceId: string, target: {
|
|
3
|
+
featureId: string;
|
|
4
|
+
}, propertyUpdates: IDict<any>) => Promise<boolean>;
|
|
5
|
+
export interface IPropertyEditorState {
|
|
6
|
+
editingFeatureIndex: number | null;
|
|
7
|
+
editorMode: 'add' | 'edit' | null;
|
|
8
|
+
editingPropertyKey: string | null;
|
|
9
|
+
newPropertyKey: string;
|
|
10
|
+
newPropertyValue: string;
|
|
11
|
+
isSavingProperty: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface IPropertyEditorActions {
|
|
14
|
+
onEditProperty: (rowIndex: number, propertyKey: string, value: unknown) => void;
|
|
15
|
+
onDeleteProperty: (feature: IIdentifiedFeature, rowIndex: number, propertyKey: string) => Promise<void>;
|
|
16
|
+
onStartAddProperty: (rowIndex: number) => void;
|
|
17
|
+
onSaveProperty: (feature: IIdentifiedFeature, rowIndex: number) => void;
|
|
18
|
+
onCancelProperty: () => void;
|
|
19
|
+
onNewPropertyKeyChange: (value: string) => void;
|
|
20
|
+
onNewPropertyValueChange: (value: string) => void;
|
|
21
|
+
}
|
|
@@ -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>;
|