@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
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { colorToRgba, DEFAULT_COLOR, } from "../../colorRampUtils";
|
|
3
|
-
import { DEFAULT_STROKE_WIDTH } from "../../colorRampUtils";
|
|
4
|
-
import RgbaColorPicker from "../../components/color_ramp/RgbaColorPicker";
|
|
5
|
-
import { useEffectiveSymbologyParams } from "../../hooks/useEffectiveSymbologyParams";
|
|
6
|
-
import { useOkSignal } from "../../hooks/useOkSignal";
|
|
7
|
-
import { saveSymbology, } from "../../symbologyUtils";
|
|
8
|
-
import { useLatest } from "../../../../shared/hooks/useLatest";
|
|
9
|
-
import { parseColor } from "../../../../tools";
|
|
10
|
-
const SimpleSymbol = ({ model, okSignalPromise, layerId, symbologyTab, isStorySegmentOverride, segmentId, }) => {
|
|
11
|
-
const [style, setStyle] = useState({
|
|
12
|
-
fillColor: '#3399CC',
|
|
13
|
-
joinStyle: 'round',
|
|
14
|
-
strokeColor: '#3399CC',
|
|
15
|
-
capStyle: 'round',
|
|
16
|
-
strokeWidth: String(DEFAULT_STROKE_WIDTH),
|
|
17
|
-
radius: 5,
|
|
18
|
-
});
|
|
19
|
-
const styleRef = useLatest(style);
|
|
20
|
-
const [fillRgba, setFillRgba] = useState(DEFAULT_COLOR);
|
|
21
|
-
const [strokeRgba, setStrokeRgba] = useState(DEFAULT_COLOR);
|
|
22
|
-
const fillRgbaRef = useLatest(fillRgba);
|
|
23
|
-
const strokeRgbaRef = useLatest(strokeRgba);
|
|
24
|
-
const layer = layerId !== undefined ? model.getLayer(layerId) : null;
|
|
25
|
-
const params = useEffectiveSymbologyParams({
|
|
26
|
-
model,
|
|
27
|
-
layerId: layerId,
|
|
28
|
-
layer,
|
|
29
|
-
isStorySegmentOverride,
|
|
30
|
-
segmentId,
|
|
31
|
-
});
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
var _a, _b, _c;
|
|
34
|
-
if (!params) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
if (((_a = params.symbologyState) === null || _a === void 0 ? void 0 : _a.renderType) === 'Single Symbol' && params.color) {
|
|
38
|
-
const parsed = parseColor(params.color);
|
|
39
|
-
if (parsed) {
|
|
40
|
-
setStyle(parsed);
|
|
41
|
-
}
|
|
42
|
-
const fillColor = (_b = params.color['circle-fill-color']) !== null && _b !== void 0 ? _b : params.color['fill-color'];
|
|
43
|
-
const strokeColor = (_c = params.color['circle-stroke-color']) !== null && _c !== void 0 ? _c : params.color['stroke-color'];
|
|
44
|
-
if (fillColor !== undefined) {
|
|
45
|
-
setFillRgba(colorToRgba(fillColor));
|
|
46
|
-
}
|
|
47
|
-
if (strokeColor !== undefined) {
|
|
48
|
-
setStrokeRgba(colorToRgba(strokeColor));
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}, [params]);
|
|
52
|
-
const handleOk = () => {
|
|
53
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
54
|
-
if (!layerId || !(layer === null || layer === void 0 ? void 0 : layer.parameters)) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
const styleExpr = {
|
|
58
|
-
'circle-radius': (_a = styleRef.current) === null || _a === void 0 ? void 0 : _a.radius,
|
|
59
|
-
'circle-fill-color': fillRgbaRef.current,
|
|
60
|
-
'circle-stroke-color': strokeRgbaRef.current,
|
|
61
|
-
'circle-stroke-width': Math.max(0, parseFloat((_c = (_b = styleRef.current) === null || _b === void 0 ? void 0 : _b.strokeWidth) !== null && _c !== void 0 ? _c : '0')),
|
|
62
|
-
'circle-stroke-line-join': (_d = styleRef.current) === null || _d === void 0 ? void 0 : _d.joinStyle,
|
|
63
|
-
'circle-stroke-line-cap': (_e = styleRef.current) === null || _e === void 0 ? void 0 : _e.capStyle,
|
|
64
|
-
'fill-color': fillRgbaRef.current,
|
|
65
|
-
'stroke-color': strokeRgbaRef.current,
|
|
66
|
-
'stroke-width': Math.max(0, parseFloat((_g = (_f = styleRef.current) === null || _f === void 0 ? void 0 : _f.strokeWidth) !== null && _g !== void 0 ? _g : '0')),
|
|
67
|
-
'stroke-line-join': (_h = styleRef.current) === null || _h === void 0 ? void 0 : _h.joinStyle,
|
|
68
|
-
'stroke-line-cap': (_j = styleRef.current) === null || _j === void 0 ? void 0 : _j.capStyle,
|
|
69
|
-
};
|
|
70
|
-
const symbologyState = {
|
|
71
|
-
renderType: 'Single Symbol',
|
|
72
|
-
};
|
|
73
|
-
saveSymbology({
|
|
74
|
-
model,
|
|
75
|
-
layerId,
|
|
76
|
-
isStorySegmentOverride,
|
|
77
|
-
segmentId,
|
|
78
|
-
payload: {
|
|
79
|
-
symbologyState,
|
|
80
|
-
color: styleExpr,
|
|
81
|
-
},
|
|
82
|
-
mutateLayerBeforeSave: targetLayer => {
|
|
83
|
-
if (targetLayer.type === 'HeatmapLayer') {
|
|
84
|
-
targetLayer.type = 'VectorLayer';
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
useOkSignal(okSignalPromise, handleOk);
|
|
90
|
-
const joinStyleOptions = ['bevel', 'round', 'miter'];
|
|
91
|
-
const capStyleOptions = ['butt', 'round', 'square'];
|
|
92
|
-
if (!layerId || !layer) {
|
|
93
|
-
return null;
|
|
94
|
-
}
|
|
95
|
-
const renderColorTab = () => (React.createElement(React.Fragment, null,
|
|
96
|
-
React.createElement("div", { className: "jp-gis-symbology-row" },
|
|
97
|
-
React.createElement("label", { htmlFor: 'vector-value-select' }, "Fill Color:"),
|
|
98
|
-
React.createElement(RgbaColorPicker, { color: fillRgba, onChange: setFillRgba })),
|
|
99
|
-
React.createElement("div", { className: "jp-gis-symbology-row" },
|
|
100
|
-
React.createElement("label", { htmlFor: 'vector-value-select' }, "Stroke Color:"),
|
|
101
|
-
React.createElement(RgbaColorPicker, { color: strokeRgba, onChange: setStrokeRgba })),
|
|
102
|
-
React.createElement("div", { className: "jp-gis-symbology-row" },
|
|
103
|
-
React.createElement("label", { htmlFor: 'vector-value-select' }, "Stroke Width:"),
|
|
104
|
-
React.createElement("input", { type: "text", value: style.strokeWidth, className: "jp-mod-styled", onChange: event => setStyle(prevState => (Object.assign(Object.assign({}, prevState), { strokeWidth: event.target.value }))) })),
|
|
105
|
-
React.createElement("div", { className: "jp-gis-symbology-row" },
|
|
106
|
-
React.createElement("label", { htmlFor: 'vector-join-select' }, "Join Style:"),
|
|
107
|
-
React.createElement("div", { className: "jp-select-wrapper" },
|
|
108
|
-
React.createElement("select", { name: 'vector-join-select', onChange: event => setStyle(prevState => (Object.assign(Object.assign({}, prevState), { joinStyle: event.target.value }))), className: "jp-mod-styled", value: style.joinStyle }, joinStyleOptions.map((method, index) => (React.createElement("option", { key: index, value: method, className: "jp-mod-styled" }, method)))))),
|
|
109
|
-
React.createElement("div", { className: "jp-gis-symbology-row" },
|
|
110
|
-
React.createElement("label", { htmlFor: 'vector-cap-select' }, "Cap Style:"),
|
|
111
|
-
React.createElement("div", { className: "jp-select-wrapper" },
|
|
112
|
-
React.createElement("select", { name: 'vector-cap-select', onChange: event => setStyle(prevState => (Object.assign(Object.assign({}, prevState), { capStyle: event.target.value }))), className: "jp-mod-styled", value: style.capStyle }, capStyleOptions.map((cap, index) => (React.createElement("option", { key: index, value: cap, className: "jp-mod-styled" }, cap))))))));
|
|
113
|
-
const renderRadiusTab = () => (React.createElement("div", { className: "jp-gis-symbology-row" },
|
|
114
|
-
React.createElement("label", null, "Radius:"),
|
|
115
|
-
React.createElement("input", { type: "number", value: style.radius, className: "jp-mod-styled", onChange: e => setStyle(prev => (Object.assign(Object.assign({}, prev), { radius: +e.target.value }))) })));
|
|
116
|
-
return (React.createElement("div", { className: "jp-gis-layer-symbology-container" },
|
|
117
|
-
React.createElement("p", null, "Color all features the same way."),
|
|
118
|
-
symbologyTab === 'color' ? renderColorTab() : renderRadiusTab()));
|
|
119
|
-
};
|
|
120
|
-
export default SimpleSymbol;
|
package/lib/formbuilder/index.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
2
|
-
import { deepCopy } from "../../../tools";
|
|
3
|
-
import { SchemaForm } from '../SchemaForm';
|
|
4
|
-
import { ArrayFieldTemplate } from '../components/SegmentFormSymbology';
|
|
5
|
-
import { SourcePropertiesField } from '../components/SourcePropertiesField';
|
|
6
|
-
import StorySegmentReset from '../components/StorySegmentReset';
|
|
7
|
-
import { processBaseSchema, removeFormEntry } from '../schemaUtils';
|
|
8
|
-
import { useSchemaFormState } from '../useSchemaFormState';
|
|
9
|
-
function getFirstSelectedStorySegmentLayerId(model) {
|
|
10
|
-
const selected = model.selected;
|
|
11
|
-
if (!selected) {
|
|
12
|
-
return undefined;
|
|
13
|
-
}
|
|
14
|
-
for (const key of Object.keys(selected)) {
|
|
15
|
-
const layer = model.getLayer(key);
|
|
16
|
-
if ((layer === null || layer === void 0 ? void 0 : layer.type) === 'StorySegmentLayer') {
|
|
17
|
-
return key;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return undefined;
|
|
21
|
-
}
|
|
22
|
-
const StorySegmentResetField = (props) => {
|
|
23
|
-
const ctx = props.formContext;
|
|
24
|
-
return React.createElement(StorySegmentReset, { model: ctx === null || ctx === void 0 ? void 0 : ctx.model, layerId: ctx === null || ctx === void 0 ? void 0 : ctx.layerId });
|
|
25
|
-
};
|
|
26
|
-
export function StorySegmentLayerPropertiesForm(props) {
|
|
27
|
-
const { schema: schemaProp, sourceData, syncData, model, filePath, formContext, sourceType, dialogOptions, formErrorSignal, formSchemaRegistry, } = props;
|
|
28
|
-
const { formData, schema, formContextValue: baseFormContext, hasSchema, handleChangeBase, handleSubmitBase, } = useSchemaFormState({
|
|
29
|
-
sourceData,
|
|
30
|
-
schemaProp,
|
|
31
|
-
model,
|
|
32
|
-
syncData,
|
|
33
|
-
cancel: props.cancel,
|
|
34
|
-
onAfterChange: dialogOptions
|
|
35
|
-
? (data) => {
|
|
36
|
-
dialogOptions.layerData = Object.assign({}, data);
|
|
37
|
-
}
|
|
38
|
-
: undefined,
|
|
39
|
-
});
|
|
40
|
-
const layerId = useMemo(() => getFirstSelectedStorySegmentLayerId(model), [model, model.selected]);
|
|
41
|
-
const formContextValue = useMemo(() => (Object.assign(Object.assign({}, baseFormContext), { layerId, formSchemaRegistry })), [baseFormContext, layerId]);
|
|
42
|
-
const uiSchema = useMemo(() => {
|
|
43
|
-
var _a, _b;
|
|
44
|
-
const builtUiSchema = {};
|
|
45
|
-
const dataCopy = deepCopy(formData);
|
|
46
|
-
processBaseSchema(dataCopy, schema, builtUiSchema, formContext, removeFormEntry);
|
|
47
|
-
if ((_a = schema.properties) === null || _a === void 0 ? void 0 : _a.source) {
|
|
48
|
-
const availableSources = model.getSourcesByType(sourceType);
|
|
49
|
-
schema.properties.source.enumNames =
|
|
50
|
-
Object.values(availableSources);
|
|
51
|
-
schema.properties.source.enum = Object.keys(availableSources);
|
|
52
|
-
}
|
|
53
|
-
removeFormEntry('zoom', dataCopy, schema, builtUiSchema);
|
|
54
|
-
const layerOverrideItems = (_b = schema.properties) === null || _b === void 0 ? void 0 : _b.layerOverride;
|
|
55
|
-
const itemsProps = layerOverrideItems === null || layerOverrideItems === void 0 ? void 0 : layerOverrideItems.items;
|
|
56
|
-
const itemsProperties = itemsProps === null || itemsProps === void 0 ? void 0 : itemsProps.properties;
|
|
57
|
-
if (itemsProperties) {
|
|
58
|
-
delete itemsProperties.color;
|
|
59
|
-
delete itemsProperties.symbologyState;
|
|
60
|
-
}
|
|
61
|
-
if (model.selected) {
|
|
62
|
-
builtUiSchema.extent = {
|
|
63
|
-
'ui:field': 'storySegmentReset',
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
builtUiSchema.content = Object.assign(Object.assign({}, builtUiSchema.content), { markdown: {
|
|
67
|
-
'ui:widget': 'textarea',
|
|
68
|
-
'ui:options': {
|
|
69
|
-
rows: 10,
|
|
70
|
-
},
|
|
71
|
-
} });
|
|
72
|
-
builtUiSchema.layerOverride = Object.assign(Object.assign({}, builtUiSchema.layerOverride), { items: {
|
|
73
|
-
'ui:title': '',
|
|
74
|
-
targetLayer: {
|
|
75
|
-
'ui:field': 'layerSelect',
|
|
76
|
-
},
|
|
77
|
-
opacity: {
|
|
78
|
-
'ui:field': 'opacity',
|
|
79
|
-
},
|
|
80
|
-
sourceProperties: {
|
|
81
|
-
'ui:field': SourcePropertiesField,
|
|
82
|
-
},
|
|
83
|
-
}, 'ui:options': {
|
|
84
|
-
orderable: false,
|
|
85
|
-
}, 'ui:ArrayFieldTemplate': ArrayFieldTemplate });
|
|
86
|
-
return builtUiSchema;
|
|
87
|
-
}, [schema, formData, formContext, model, sourceType]);
|
|
88
|
-
const additionalFields = useMemo(() => ({
|
|
89
|
-
storySegmentReset: StorySegmentResetField,
|
|
90
|
-
}), []);
|
|
91
|
-
if (!hasSchema) {
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
return (React.createElement(SchemaForm, { schema: schema, formData: formData, onChange: handleChangeBase, onSubmit: handleSubmitBase, formContext: formContextValue, filePath: filePath, uiSchema: uiSchema, additionalFields: additionalFields, formErrorSignal: formErrorSignal }));
|
|
95
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dissolveProcessForm';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dissolveProcessForm';
|
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { findExprNode } from "../../dialogs/symbology/colorRampUtils";
|
|
3
|
-
import { useGetSymbology } from "../../dialogs/symbology/hooks/useGetSymbology";
|
|
4
|
-
export const LegendItem = ({ layerId, model }) => {
|
|
5
|
-
const { symbology, isLoading, error } = useGetSymbology({ layerId, model });
|
|
6
|
-
const [content, setContent] = useState(null);
|
|
7
|
-
const parseColorStops = (expr) => {
|
|
8
|
-
const interpolate = findExprNode(expr, 'interpolate');
|
|
9
|
-
if (!interpolate) {
|
|
10
|
-
return [];
|
|
11
|
-
}
|
|
12
|
-
const stops = [];
|
|
13
|
-
for (let i = 3; i < interpolate.length; i += 2) {
|
|
14
|
-
const value = interpolate[i];
|
|
15
|
-
const rgba = interpolate[i + 1];
|
|
16
|
-
const color = Array.isArray(rgba)
|
|
17
|
-
? `rgba(${rgba[0]},${rgba[1]},${rgba[2]},${rgba[3]})`
|
|
18
|
-
: String(rgba);
|
|
19
|
-
stops.push({ value, color });
|
|
20
|
-
}
|
|
21
|
-
return stops;
|
|
22
|
-
};
|
|
23
|
-
const parseCaseCategories = (expr) => {
|
|
24
|
-
if (!Array.isArray(expr) || expr[0] !== 'case') {
|
|
25
|
-
return [];
|
|
26
|
-
}
|
|
27
|
-
const categories = [];
|
|
28
|
-
for (let i = 1; i < expr.length - 1; i += 2) {
|
|
29
|
-
const condition = expr[i];
|
|
30
|
-
const colorExpr = expr[i + 1];
|
|
31
|
-
let category = '';
|
|
32
|
-
if (Array.isArray(condition) && condition[0] === '==') {
|
|
33
|
-
category = condition[2];
|
|
34
|
-
}
|
|
35
|
-
let color = '';
|
|
36
|
-
if (Array.isArray(colorExpr)) {
|
|
37
|
-
color = `rgba(${colorExpr[0]},${colorExpr[1]},${colorExpr[2]},${colorExpr[3]})`;
|
|
38
|
-
}
|
|
39
|
-
else if (typeof colorExpr === 'string') {
|
|
40
|
-
color = colorExpr;
|
|
41
|
-
}
|
|
42
|
-
categories.push({ category, color });
|
|
43
|
-
}
|
|
44
|
-
return categories;
|
|
45
|
-
};
|
|
46
|
-
useEffect(() => {
|
|
47
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
48
|
-
if (isLoading) {
|
|
49
|
-
setContent(React.createElement("p", { style: { fontSize: '0.8em' } }, "Loading\u2026"));
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
if (error) {
|
|
53
|
-
setContent(React.createElement("p", { style: { color: 'red', fontSize: '0.8em' } }, error.message));
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
if (!symbology) {
|
|
57
|
-
setContent(React.createElement("p", { style: { fontSize: '0.8em' } }, "No symbology"));
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
const renderType = (_a = symbology.symbologyState) === null || _a === void 0 ? void 0 : _a.renderType;
|
|
61
|
-
const property = (_b = symbology.symbologyState) === null || _b === void 0 ? void 0 : _b.value;
|
|
62
|
-
const fill = (_d = (_c = symbology.color) === null || _c === void 0 ? void 0 : _c['fill-color']) !== null && _d !== void 0 ? _d : (_e = symbology.color) === null || _e === void 0 ? void 0 : _e['circle-fill-color'];
|
|
63
|
-
const stroke = (_g = (_f = symbology.color) === null || _f === void 0 ? void 0 : _f['stroke-color']) !== null && _g !== void 0 ? _g : (_h = symbology.color) === null || _h === void 0 ? void 0 : _h['circle-stroke-color'];
|
|
64
|
-
// Single Symbol
|
|
65
|
-
if (renderType === 'Single Symbol') {
|
|
66
|
-
setContent(React.createElement("div", { style: { display: 'flex', gap: 12, flexWrap: 'wrap', padding: 6 } },
|
|
67
|
-
fill && (React.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: 6 } },
|
|
68
|
-
React.createElement("span", { style: {
|
|
69
|
-
width: 16,
|
|
70
|
-
height: 16,
|
|
71
|
-
border: '1px solid #000',
|
|
72
|
-
background: fill,
|
|
73
|
-
} }),
|
|
74
|
-
React.createElement("span", { style: { fontSize: '0.8em' } }, "Fill"))),
|
|
75
|
-
stroke && (React.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: 6 } },
|
|
76
|
-
React.createElement("span", { style: {
|
|
77
|
-
width: 24,
|
|
78
|
-
height: 2,
|
|
79
|
-
background: stroke,
|
|
80
|
-
border: '1px solid #000',
|
|
81
|
-
} }),
|
|
82
|
-
React.createElement("span", { style: { fontSize: '0.8em' } }, "Stroke"))),
|
|
83
|
-
!fill && !stroke && (React.createElement("span", { style: { fontSize: '0.8em' } }, "No symbol colors"))));
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
// Graduated
|
|
87
|
-
if (renderType === 'Graduated') {
|
|
88
|
-
const stops = parseColorStops(fill || stroke);
|
|
89
|
-
if (!stops.length) {
|
|
90
|
-
setContent(React.createElement("p", { style: { fontSize: '0.8em' } }, "No graduated symbology"));
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
const segments = stops
|
|
94
|
-
.map((s, i) => {
|
|
95
|
-
const pct = (i / (stops.length - 1)) * 100;
|
|
96
|
-
return `${s.color} ${pct}%`;
|
|
97
|
-
})
|
|
98
|
-
.join(', ');
|
|
99
|
-
const gradient = `linear-gradient(to right, ${segments})`;
|
|
100
|
-
setContent(React.createElement("div", { style: { padding: 6, width: '90%' } },
|
|
101
|
-
property && (React.createElement("div", { style: { fontSize: '1em', marginBottom: 20 } },
|
|
102
|
-
React.createElement("strong", null, property))),
|
|
103
|
-
React.createElement("div", { style: {
|
|
104
|
-
position: 'relative',
|
|
105
|
-
height: 12,
|
|
106
|
-
background: gradient,
|
|
107
|
-
border: '1px solid #ccc',
|
|
108
|
-
borderRadius: 3,
|
|
109
|
-
marginBottom: 20,
|
|
110
|
-
marginTop: 10,
|
|
111
|
-
} }, stops.map((s, i) => {
|
|
112
|
-
const left = (i / (stops.length - 1)) * 100;
|
|
113
|
-
const up = i % 2 === 0;
|
|
114
|
-
return (React.createElement("div", { key: i, style: {
|
|
115
|
-
position: 'absolute',
|
|
116
|
-
left: `${left}%`,
|
|
117
|
-
transform: 'translateX(-50%)',
|
|
118
|
-
} },
|
|
119
|
-
React.createElement("div", { style: {
|
|
120
|
-
width: 1,
|
|
121
|
-
height: 8,
|
|
122
|
-
background: '#333',
|
|
123
|
-
margin: '0 auto',
|
|
124
|
-
} }),
|
|
125
|
-
React.createElement("div", { style: {
|
|
126
|
-
position: 'absolute',
|
|
127
|
-
top: up ? -18 : 12,
|
|
128
|
-
fontSize: '0.7em',
|
|
129
|
-
whiteSpace: 'nowrap',
|
|
130
|
-
marginTop: up ? 0 : 4,
|
|
131
|
-
} }, s.value.toFixed(2))));
|
|
132
|
-
}))));
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
// Canonical
|
|
136
|
-
if (renderType === 'Canonical') {
|
|
137
|
-
setContent(React.createElement("div", { style: { padding: 6 } },
|
|
138
|
-
property && (React.createElement("div", { style: { fontSize: '1em' } },
|
|
139
|
-
React.createElement("strong", null, property))),
|
|
140
|
-
React.createElement("div", { style: { fontSize: '0.8em', opacity: 0.7 } }, "hex color attribute")));
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
// Categorized
|
|
144
|
-
if (renderType === 'Categorized') {
|
|
145
|
-
const cats = parseCaseCategories(fill || stroke);
|
|
146
|
-
if (!cats.length) {
|
|
147
|
-
setContent(React.createElement("p", { style: { fontSize: '0.8em' } }, "No categorized symbology"));
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
setContent(React.createElement("div", { style: { padding: 6 } },
|
|
151
|
-
property && (React.createElement("div", { style: { fontSize: '1em', marginBottom: 6 } },
|
|
152
|
-
React.createElement("strong", null, property))),
|
|
153
|
-
React.createElement("div", { style: {
|
|
154
|
-
display: 'grid',
|
|
155
|
-
gap: 6,
|
|
156
|
-
maxHeight: 200,
|
|
157
|
-
overflowY: 'auto',
|
|
158
|
-
paddingRight: 4,
|
|
159
|
-
} }, cats.map((c, i) => (React.createElement("div", { key: i, style: { display: 'flex', alignItems: 'center', gap: 8 } },
|
|
160
|
-
React.createElement("span", { style: {
|
|
161
|
-
width: 16,
|
|
162
|
-
height: 16,
|
|
163
|
-
background: c.color || '#ccc',
|
|
164
|
-
border: '1px solid #000',
|
|
165
|
-
borderRadius: 2,
|
|
166
|
-
} }),
|
|
167
|
-
React.createElement("span", { style: { fontSize: '0.75em' } }, String(c.category))))))));
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
// Heatmap
|
|
171
|
-
if (renderType === 'Heatmap') {
|
|
172
|
-
const colors = Array.isArray(symbology.color) ? symbology.color : [];
|
|
173
|
-
if (!colors.length) {
|
|
174
|
-
setContent(React.createElement("p", { style: { fontSize: '0.8em' } }, "No heatmap colors"));
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
const gradient = `linear-gradient(to right, ${colors.join(', ')})`;
|
|
178
|
-
const reversed = (_j = symbology.symbologyState) === null || _j === void 0 ? void 0 : _j.reverse;
|
|
179
|
-
setContent(React.createElement("div", { style: { padding: 6, width: '90%' } },
|
|
180
|
-
React.createElement("div", { style: { fontSize: '1em', marginBottom: 10 } },
|
|
181
|
-
React.createElement("strong", null, "Heatmap")),
|
|
182
|
-
React.createElement("div", { style: {
|
|
183
|
-
height: 12,
|
|
184
|
-
background: gradient,
|
|
185
|
-
border: '1px solid #ccc',
|
|
186
|
-
borderRadius: 3,
|
|
187
|
-
marginBottom: 4,
|
|
188
|
-
} }),
|
|
189
|
-
React.createElement("div", { style: {
|
|
190
|
-
display: 'flex',
|
|
191
|
-
justifyContent: 'space-between',
|
|
192
|
-
fontSize: '0.75em',
|
|
193
|
-
marginBottom: 8,
|
|
194
|
-
} },
|
|
195
|
-
React.createElement("span", { style: { fontWeight: 'bold' } }, "Low"),
|
|
196
|
-
React.createElement("span", { style: { fontWeight: 'bold' } }, "High")),
|
|
197
|
-
React.createElement("div", { style: {
|
|
198
|
-
fontSize: '0.75em',
|
|
199
|
-
display: 'flex',
|
|
200
|
-
flexDirection: 'column',
|
|
201
|
-
gap: 2,
|
|
202
|
-
} }, reversed && (React.createElement("span", { style: { fontWeight: 'bold' } }, "Reversed ramp")))));
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
setContent(React.createElement("p", null,
|
|
206
|
-
"Unsupported symbology: ",
|
|
207
|
-
String(renderType)));
|
|
208
|
-
}, [symbology, isLoading, error]);
|
|
209
|
-
return React.createElement("div", null, content);
|
|
210
|
-
};
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { faMagnifyingGlass } from '@fortawesome/free-solid-svg-icons';
|
|
2
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
3
|
-
import { LabIcon, caretDownIcon } from '@jupyterlab/ui-components';
|
|
4
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
5
|
-
export const IdentifyPanelComponent = ({ model, }) => {
|
|
6
|
-
var _a;
|
|
7
|
-
const [features, setFeatures] = useState();
|
|
8
|
-
const [visibleFeatures, setVisibleFeatures] = useState({
|
|
9
|
-
0: true,
|
|
10
|
-
});
|
|
11
|
-
const [remoteUser, setRemoteUser] = useState(null);
|
|
12
|
-
const featuresRef = useRef(features);
|
|
13
|
-
// Reset state values when current widget changes
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
featuresRef.current = features;
|
|
16
|
-
}, [features]);
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
const handleClientStateChanged = (sender, clients) => {
|
|
19
|
-
var _a, _b, _c, _d, _e, _f;
|
|
20
|
-
const remoteUserId = (_a = model === null || model === void 0 ? void 0 : model.localState) === null || _a === void 0 ? void 0 : _a.remoteUser;
|
|
21
|
-
// If following a collaborator
|
|
22
|
-
if (remoteUserId) {
|
|
23
|
-
const remoteState = clients.get(remoteUserId);
|
|
24
|
-
if (remoteState) {
|
|
25
|
-
if (((_b = remoteState.user) === null || _b === void 0 ? void 0 : _b.username) !== (remoteUser === null || remoteUser === void 0 ? void 0 : remoteUser.username)) {
|
|
26
|
-
setRemoteUser(remoteState.user);
|
|
27
|
-
}
|
|
28
|
-
setFeatures((_d = (_c = remoteState.identifiedFeatures) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : {});
|
|
29
|
-
}
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
// If not following a collaborator
|
|
33
|
-
const identifiedFeatures = (_f = (_e = model === null || model === void 0 ? void 0 : model.localState) === null || _e === void 0 ? void 0 : _e.identifiedFeatures) === null || _f === void 0 ? void 0 : _f.value;
|
|
34
|
-
if (!identifiedFeatures) {
|
|
35
|
-
setFeatures({});
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
if (model.currentMode === 'identifying' &&
|
|
39
|
-
featuresRef.current !== identifiedFeatures) {
|
|
40
|
-
setFeatures(identifiedFeatures);
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
model === null || model === void 0 ? void 0 : model.clientStateChanged.connect(handleClientStateChanged);
|
|
44
|
-
return () => {
|
|
45
|
-
model === null || model === void 0 ? void 0 : model.clientStateChanged.disconnect(handleClientStateChanged);
|
|
46
|
-
};
|
|
47
|
-
}, [model]);
|
|
48
|
-
const highlightFeatureOnMap = (feature) => {
|
|
49
|
-
var _a, _b;
|
|
50
|
-
(_a = model === null || model === void 0 ? void 0 : model.highlightFeatureSignal) === null || _a === void 0 ? void 0 : _a.emit(feature);
|
|
51
|
-
const geometry = feature.geometry || feature._geometry;
|
|
52
|
-
(_b = model === null || model === void 0 ? void 0 : model.flyToGeometrySignal) === null || _b === void 0 ? void 0 : _b.emit(geometry);
|
|
53
|
-
};
|
|
54
|
-
const toggleFeatureVisibility = (index) => {
|
|
55
|
-
setVisibleFeatures(prev => (Object.assign(Object.assign({}, prev), { [index]: !prev[index] })));
|
|
56
|
-
};
|
|
57
|
-
const getFeatureNameOrId = (feature, featureIndex) => {
|
|
58
|
-
for (const key of Object.keys(feature)) {
|
|
59
|
-
const lowerCase = key.toLowerCase();
|
|
60
|
-
if ((lowerCase.includes('name') || lowerCase === 'id') && feature[key]) {
|
|
61
|
-
return feature[key];
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return `Feature ${featureIndex + 1}`;
|
|
65
|
-
};
|
|
66
|
-
return (React.createElement("div", { className: "jgis-identify-wrapper", style: {
|
|
67
|
-
border: ((_a = model === null || model === void 0 ? void 0 : model.localState) === null || _a === void 0 ? void 0 : _a.remoteUser)
|
|
68
|
-
? `solid 3px ${remoteUser === null || remoteUser === void 0 ? void 0 : remoteUser.color}`
|
|
69
|
-
: 'unset',
|
|
70
|
-
} },
|
|
71
|
-
!Object.keys(features !== null && features !== void 0 ? 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.")),
|
|
72
|
-
features &&
|
|
73
|
-
Object.values(features).map((feature, featureIndex) => (React.createElement("div", { key: featureIndex, className: "jgis-identify-grid-item" },
|
|
74
|
-
React.createElement("div", { className: "jgis-identify-grid-item-header" },
|
|
75
|
-
React.createElement("span", { onClick: () => toggleFeatureVisibility(featureIndex) },
|
|
76
|
-
React.createElement(LabIcon.resolveReact, { icon: caretDownIcon, className: `jp-gis-layerGroupCollapser${visibleFeatures[featureIndex] ? ' jp-mod-expanded' : ''}`, tag: 'span' }),
|
|
77
|
-
React.createElement("span", null, getFeatureNameOrId(feature, featureIndex))),
|
|
78
|
-
(() => {
|
|
79
|
-
const isRasterFeature = !feature.geometry &&
|
|
80
|
-
!feature._geometry &&
|
|
81
|
-
typeof (feature === null || feature === void 0 ? void 0 : feature.x) !== 'number' &&
|
|
82
|
-
typeof (feature === null || feature === void 0 ? void 0 : feature.y) !== 'number';
|
|
83
|
-
return (React.createElement("button", { className: "jgis-highlight-button", onClick: e => {
|
|
84
|
-
e.stopPropagation();
|
|
85
|
-
highlightFeatureOnMap(feature);
|
|
86
|
-
}, title: isRasterFeature
|
|
87
|
-
? 'Highlight not available for raster features'
|
|
88
|
-
: 'Highlight feature on map', disabled: isRasterFeature },
|
|
89
|
-
React.createElement(FontAwesomeIcon, { icon: faMagnifyingGlass })));
|
|
90
|
-
})()),
|
|
91
|
-
visibleFeatures[featureIndex] && (React.createElement(React.Fragment, null, Object.entries(feature)
|
|
92
|
-
.filter(([key, value]) => typeof value !== 'object' || value === null)
|
|
93
|
-
.sort(([keyA], [keyB]) => keyA.localeCompare(keyB))
|
|
94
|
-
.map(([key, value]) => (React.createElement("div", { key: key, className: "jgis-identify-grid-body" },
|
|
95
|
-
React.createElement("strong", null,
|
|
96
|
-
key,
|
|
97
|
-
":"),
|
|
98
|
-
typeof value === 'string' &&
|
|
99
|
-
/<\/?[a-z][\s\S]*>/i.test(value) ? (React.createElement("span", { dangerouslySetInnerHTML: {
|
|
100
|
-
__html: `${value}`,
|
|
101
|
-
} })) : (React.createElement("span", null, String(value)))))))))))));
|
|
102
|
-
};
|