qwc2 2025.3.31
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/LICENSE +28 -0
- package/README.md +68 -0
- package/actions/display.js +7 -0
- package/actions/editing.js +7 -0
- package/actions/layerinfo.js +7 -0
- package/actions/layers.js +8 -0
- package/actions/localConfig.js +7 -0
- package/actions/locale.js +10 -0
- package/actions/locate.js +8 -0
- package/actions/logging.js +7 -0
- package/actions/map.js +15 -0
- package/actions/measurement.js +8 -0
- package/actions/processNotifications.js +7 -0
- package/actions/redlining.js +7 -0
- package/actions/redliningPick.js +7 -0
- package/actions/serviceinfo.js +7 -0
- package/actions/task.js +9 -0
- package/actions/theme.js +24 -0
- package/actions/windows.js +10 -0
- package/components/AppMenu.js +8 -0
- package/components/AttributeForm.js +34 -0
- package/components/AutoEditForm.js +8 -0
- package/components/CoordinateDisplayer.js +7 -0
- package/components/EditComboField.js +10 -0
- package/components/EditUploadField.js +8 -0
- package/components/FullscreenSwitcher.js +8 -0
- package/components/Icon.js +7 -0
- package/components/IdentifyViewer.js +16 -0
- package/components/ImportLayer.js +25 -0
- package/components/LayerInfoWindow.js +7 -0
- package/components/LinkFeatureForm.js +10 -0
- package/components/MapSelection.js +13 -0
- package/components/NumericInputWindow.js +7 -0
- package/components/PickFeature.js +7 -0
- package/components/PluginsContainer.js +8 -0
- package/components/PrintSelection.js +54 -0
- package/components/QtDesignerForm.js +30 -0
- package/components/ResizeableWindow.js +12 -0
- package/components/SearchBox.js +26 -0
- package/components/ServiceInfoWindow.js +7 -0
- package/components/SideBar.js +9 -0
- package/components/StandardApp.js +35 -0
- package/components/Swipeable.js +1 -0
- package/components/TaskBar.js +7 -0
- package/components/ThemeLayersListWindow.js +9 -0
- package/components/ThemeList.js +12 -0
- package/components/Toolbar.js +7 -0
- package/components/WindowManager.js +7 -0
- package/components/map/OlLayer.js +12 -0
- package/components/map/OlLocate.css +56 -0
- package/components/map/OlLocate.js +17 -0
- package/components/map/OlMap.js +11 -0
- package/components/map/layers/BingLayer.js +8 -0
- package/components/map/layers/GoogleLayer.js +27 -0
- package/components/map/layers/GraticuleLayer.js +8 -0
- package/components/map/layers/ImageLayer.js +8 -0
- package/components/map/layers/MVTLayer.js +7 -0
- package/components/map/layers/OSMLayer.js +8 -0
- package/components/map/layers/OverlayLayer.js +10 -0
- package/components/map/layers/VectorLayer.js +14 -0
- package/components/map/layers/WFSLayer.js +11 -0
- package/components/map/layers/WMSLayer.js +11 -0
- package/components/map/layers/WMTSLayer.js +9 -0
- package/components/map/layers/XYZLayer.js +7 -0
- package/components/map/layers/index.js +8 -0
- package/components/map3d/BottomBar3D.js +7 -0
- package/components/map3d/Compare3D.js +12 -0
- package/components/map3d/Draw3D.js +10 -0
- package/components/map3d/ExportObjects3D.js +17 -0
- package/components/map3d/HeightProfile3D.js +8 -0
- package/components/map3d/HideObjects3D.js +12 -0
- package/components/map3d/Identify3D.js +13 -0
- package/components/map3d/LayerTree3D.js +8 -0
- package/components/map3d/Map3D.js +29 -0
- package/components/map3d/Map3DLight.js +10 -0
- package/components/map3d/MapControls3D.js +20 -0
- package/components/map3d/MapExport3D.js +11 -0
- package/components/map3d/Measure3D.js +23 -0
- package/components/map3d/OverviewMap3D.js +9 -0
- package/components/map3d/SearchField3D.js +16 -0
- package/components/map3d/TopBar3D.js +7 -0
- package/components/map3d/View3DSwitcher.js +7 -0
- package/components/map3d/drawtool/CreateTool3D.js +9 -0
- package/components/map3d/drawtool/EditTool3D.js +9 -0
- package/components/map3d/drawtool/NumericInput3D.js +7 -0
- package/components/map3d/img/viewcone.svg +124 -0
- package/components/map3d/layers/VectorLayer3D.js +7 -0
- package/components/map3d/layers/WFSLayer3D.js +8 -0
- package/components/map3d/layers/WMSLayer3D.js +7 -0
- package/components/map3d/layers/WMTSLayer3D.js +9 -0
- package/components/map3d/layers/index.js +8 -0
- package/components/map3d/models/arrow.glb +0 -0
- package/components/map3d/models/pin.glb +0 -0
- package/components/map3d/slices/map3d.js +1 -0
- package/components/map3d/style/BottomBar3D.css +67 -0
- package/components/map3d/style/Compare3D.css +57 -0
- package/components/map3d/style/Draw3D.css +7 -0
- package/components/map3d/style/HideObjects3D.css +29 -0
- package/components/map3d/style/LayerTree3D.css +126 -0
- package/components/map3d/style/Map3D.css +42 -0
- package/components/map3d/style/Map3DLight.css +72 -0
- package/components/map3d/style/MapControls3D.css +56 -0
- package/components/map3d/style/MapExport3D.css +25 -0
- package/components/map3d/style/OverviewMap3D.css +37 -0
- package/components/map3d/style/SearchField3D.css +7 -0
- package/components/map3d/style/View3DSwitcher.css +27 -0
- package/components/map3d/utils/Tiles3DStyle.js +1 -0
- package/components/share/ShareLink.js +7 -0
- package/components/share/ShareQRCode.js +8 -0
- package/components/share/ShareSocials.js +9 -0
- package/components/share/style/ShareLink.css +13 -0
- package/components/share/style/ShareSocials.css +9 -0
- package/components/style/App.css +229 -0
- package/components/style/AppMenu.css +162 -0
- package/components/style/AttributeForm.css +57 -0
- package/components/style/AutoEditForm.css +64 -0
- package/components/style/DefaultColorScheme.css +60 -0
- package/components/style/EditUploadField.css +103 -0
- package/components/style/FullscreenSwitcher.css +25 -0
- package/components/style/Icon.css +26 -0
- package/components/style/IdentifyViewer.css +249 -0
- package/components/style/ImportLayer.css +28 -0
- package/components/style/LayerInfoWindow.css +46 -0
- package/components/style/LinkFeatureForm.css +48 -0
- package/components/style/NumericInputWindow.css +11 -0
- package/components/style/PickFeature.css +25 -0
- package/components/style/PluginsContainer.css +4 -0
- package/components/style/QtDesignerForm.css +225 -0
- package/components/style/ResizeableWindow.css +178 -0
- package/components/style/SearchBox.css +159 -0
- package/components/style/ServiceInfoWindow.css +34 -0
- package/components/style/SideBar.css +100 -0
- package/components/style/TaskBar.css +35 -0
- package/components/style/ThemeLayersListWindow.css +47 -0
- package/components/style/ThemeList.css +200 -0
- package/components/style/Toolbar.css +20 -0
- package/components/style/WindowManager.css +50 -0
- package/components/timeline/FixedTimeline.js +10 -0
- package/components/timeline/InfiniteTimeline.js +13 -0
- package/components/timeline/TimelineFeaturesSlider.js +10 -0
- package/components/timeline/style/FixedTimeline.css +76 -0
- package/components/timeline/style/InfiniteTimeline.css +94 -0
- package/components/timeline/style/TimelineFeaturesSlider.css +131 -0
- package/components/widgets/AccordeonWidget.js +7 -0
- package/components/widgets/ButtonBar.js +7 -0
- package/components/widgets/ColorButton.js +8 -0
- package/components/widgets/ComboBox.js +7 -0
- package/components/widgets/CopyButton.js +7 -0
- package/components/widgets/DateTimeInput.js +8 -0
- package/components/widgets/EditableSelect.js +8 -0
- package/components/widgets/FileSelector.js +9 -0
- package/components/widgets/Input.js +7 -0
- package/components/widgets/InputContainer.js +7 -0
- package/components/widgets/LayerCatalogWidget.js +3 -0
- package/components/widgets/MenuButton.js +1 -0
- package/components/widgets/ModalDialog.js +7 -0
- package/components/widgets/NavBar.js +7 -0
- package/components/widgets/NumberInput.js +9 -0
- package/components/widgets/PopupMenu.js +1 -0
- package/components/widgets/Primitives.js +7 -0
- package/components/widgets/ReCaptchaWidget.js +1 -0
- package/components/widgets/SearchWidget.js +7 -0
- package/components/widgets/Spinner.js +6 -0
- package/components/widgets/SuggestionInput.js +7 -0
- package/components/widgets/TextInput.js +7 -0
- package/components/widgets/ToggleSwitch.js +7 -0
- package/components/widgets/VectorLayerPicker.js +8 -0
- package/components/widgets/style/AccordeonWidget.css +22 -0
- package/components/widgets/style/ButtonBar.css +88 -0
- package/components/widgets/style/ColorButton.css +88 -0
- package/components/widgets/style/ComboBox.css +83 -0
- package/components/widgets/style/CopyButton.css +21 -0
- package/components/widgets/style/EditableSelect.css +47 -0
- package/components/widgets/style/FileSelector.css +14 -0
- package/components/widgets/style/InputContainer.css +34 -0
- package/components/widgets/style/LayerCatalogWidget.css +59 -0
- package/components/widgets/style/MenuButton.css +122 -0
- package/components/widgets/style/ModalDialog.css +50 -0
- package/components/widgets/style/NavBar.css +12 -0
- package/components/widgets/style/NumberInput.css +76 -0
- package/components/widgets/style/SearchWidget.css +43 -0
- package/components/widgets/style/Spinner.css +32 -0
- package/components/widgets/style/SuggestionInput.css +8 -0
- package/components/widgets/style/TextInput.css +94 -0
- package/components/widgets/style/ToggleSwitch.css +61 -0
- package/components/widgets/style/VectorLayerPicker.css +3 -0
- package/icons/2d.svg +70 -0
- package/icons/3d.svg +70 -0
- package/icons/3d2d.svg +92 -0
- package/icons/after.svg +76 -0
- package/icons/arrow-down.svg +60 -0
- package/icons/arrow-up.svg +60 -0
- package/icons/before.svg +76 -0
- package/icons/bglayer.svg +71 -0
- package/icons/bookmark.svg +170 -0
- package/icons/box.svg +63 -0
- package/icons/buffer.svg +67 -0
- package/icons/camera.svg +118 -0
- package/icons/catalog.svg +62 -0
- package/icons/checked.svg +80 -0
- package/icons/chevron-down.svg +60 -0
- package/icons/chevron-left.svg +59 -0
- package/icons/chevron-right.svg +60 -0
- package/icons/chevron-up.svg +60 -0
- package/icons/circle.svg +70 -0
- package/icons/clear.svg +62 -0
- package/icons/clock.svg +71 -0
- package/icons/cog.svg +60 -0
- package/icons/collapse.svg +73 -0
- package/icons/compare.svg +72 -0
- package/icons/cone.svg +58 -0
- package/icons/confirm.svg +62 -0
- package/icons/copy.svg +60 -0
- package/icons/cuboid.svg +58 -0
- package/icons/cyclomedia.svg +47 -0
- package/icons/cylinder.svg +58 -0
- package/icons/dataimport.svg +116 -0
- package/icons/detach.svg +79 -0
- package/icons/dock.svg +82 -0
- package/icons/dock_bottom.svg +82 -0
- package/icons/dock_left.svg +84 -0
- package/icons/dock_right.svg +84 -0
- package/icons/dock_top.svg +84 -0
- package/icons/draw.svg +78 -0
- package/icons/editdraw.svg +84 -0
- package/icons/edited.svg +78 -0
- package/icons/editing.svg +118 -0
- package/icons/ellipse.svg +72 -0
- package/icons/embed.svg +88 -0
- package/icons/expand.svg +73 -0
- package/icons/export.svg +126 -0
- package/icons/eye.svg +127 -0
- package/icons/featureform.svg +115 -0
- package/icons/fill.svg +62 -0
- package/icons/filter.svg +69 -0
- package/icons/folder-open.svg +60 -0
- package/icons/freehand.svg +82 -0
- package/icons/group.svg +76 -0
- package/icons/home.svg +60 -0
- package/icons/identify_radius.svg +71 -0
- package/icons/identify_region.svg +71 -0
- package/icons/import.svg +62 -0
- package/icons/info-sign.svg +60 -0
- package/icons/info.svg +80 -0
- package/icons/layers.svg +71 -0
- package/icons/light.svg +77 -0
- package/icons/line.svg +61 -0
- package/icons/line_buffer.svg +65 -0
- package/icons/link.svg +75 -0
- package/icons/list-alt.svg +111 -0
- package/icons/lock.svg +54 -0
- package/icons/login.svg +56 -0
- package/icons/logout.svg +56 -0
- package/icons/map3d.svg +51 -0
- package/icons/maximize.svg +84 -0
- package/icons/measure.svg +82 -0
- package/icons/measure_line.svg +87 -0
- package/icons/measure_polygon.svg +88 -0
- package/icons/menu-hamburger.svg +60 -0
- package/icons/minimize.svg +76 -0
- package/icons/minus-sign.svg +60 -0
- package/icons/minus.svg +61 -0
- package/icons/nav-end.svg +74 -0
- package/icons/nav-left.svg +74 -0
- package/icons/nav-right.svg +74 -0
- package/icons/nav-start.svg +73 -0
- package/icons/new.svg +84 -0
- package/icons/nodetool.svg +68 -0
- package/icons/numericinput.svg +86 -0
- package/icons/ok.svg +60 -0
- package/icons/open.svg +79 -0
- package/icons/open_link.svg +74 -0
- package/icons/paint.svg +75 -0
- package/icons/pen.svg +41 -0
- package/icons/person.svg +44 -0
- package/icons/pick.svg +67 -0
- package/icons/pick_point.svg +74 -0
- package/icons/pick_region.svg +71 -0
- package/icons/plus.svg +60 -0
- package/icons/point.svg +67 -0
- package/icons/point_buffer.svg +74 -0
- package/icons/polygon.svg +61 -0
- package/icons/print.svg +60 -0
- package/icons/pyramid.svg +58 -0
- package/icons/radio_checked.svg +78 -0
- package/icons/radio_tristate.svg +75 -0
- package/icons/radio_unchecked.svg +72 -0
- package/icons/rasterexport.svg +124 -0
- package/icons/rect.svg +63 -0
- package/icons/refresh.svg +44 -0
- package/icons/remove.svg +60 -0
- package/icons/report.svg +84 -0
- package/icons/routing-bicycle.svg +40 -0
- package/icons/routing-bus.svg +40 -0
- package/icons/routing-cablecar.svg +40 -0
- package/icons/routing-car.svg +40 -0
- package/icons/routing-ship.svg +40 -0
- package/icons/routing-train.svg +40 -0
- package/icons/routing-tram.svg +40 -0
- package/icons/routing-truck.svg +40 -0
- package/icons/routing-walking.svg +40 -0
- package/icons/routing.svg +68 -0
- package/icons/save.svg +190 -0
- package/icons/scale.svg +62 -0
- package/icons/screenshot.svg +60 -0
- package/icons/search.svg +60 -0
- package/icons/selectbox.svg +79 -0
- package/icons/share.svg +64 -0
- package/icons/snap_edge.svg +79 -0
- package/icons/snap_vertex.svg +79 -0
- package/icons/sphere.svg +58 -0
- package/icons/square.svg +68 -0
- package/icons/sync.svg +72 -0
- package/icons/text.svg +68 -0
- package/icons/themes.svg +81 -0
- package/icons/tilt-down.svg +67 -0
- package/icons/tilt-left.svg +48 -0
- package/icons/tilt-right.svg +48 -0
- package/icons/tilt-up.svg +67 -0
- package/icons/today.svg +45 -0
- package/icons/tools.svg +77 -0
- package/icons/transformtool.svg +74 -0
- package/icons/transparency.svg +132 -0
- package/icons/trash.svg +60 -0
- package/icons/tree_minus.svg +81 -0
- package/icons/tree_plus.svg +81 -0
- package/icons/triangle-down.svg +59 -0
- package/icons/triangle-left.svg +60 -0
- package/icons/triangle-right.svg +60 -0
- package/icons/triangle-up.svg +59 -0
- package/icons/tristate.svg +79 -0
- package/icons/unchecked.svg +74 -0
- package/icons/undock.svg +82 -0
- package/icons/undock_bottom.svg +82 -0
- package/icons/undock_left.svg +82 -0
- package/icons/undock_right.svg +84 -0
- package/icons/undock_top.svg +84 -0
- package/icons/unmaximize.svg +84 -0
- package/icons/unminimize.svg +76 -0
- package/icons/up-down-arrow.svg +66 -0
- package/icons/warning.svg +72 -0
- package/icons/wedge.svg +58 -0
- package/icons/zoom.svg +60 -0
- package/icons/zoomin.svg +71 -0
- package/icons/zoomout.svg +80 -0
- package/libs/openlayers.js +11 -0
- package/package.json +135 -0
- package/plugins/API.js +114 -0
- package/plugins/AttributeTable.js +25 -0
- package/plugins/Authentication.js +13 -0
- package/plugins/BackgroundSwitcher.js +10 -0
- package/plugins/Bookmark.js +13 -0
- package/plugins/BottomBar.js +10 -0
- package/plugins/CookiePopup.js +9 -0
- package/plugins/Cyclomedia.js +11 -0
- package/plugins/Editing.js +21 -0
- package/plugins/FeatureForm.js +21 -0
- package/plugins/FeatureSearch.js +11 -0
- package/plugins/GeometryDigitizer.js +43 -0
- package/plugins/HeightProfile.js +26 -0
- package/plugins/Help.js +11 -0
- package/plugins/HomeButton.js +9 -0
- package/plugins/Identify.js +18 -0
- package/plugins/LayerCatalog.js +45 -0
- package/plugins/LayerTree.js +15 -0
- package/plugins/LocateButton.js +10 -0
- package/plugins/Map.js +22 -0
- package/plugins/MapCompare.js +11 -0
- package/plugins/MapCopyright.js +11 -0
- package/plugins/MapExport.js +23 -0
- package/plugins/MapFilter.js +20 -0
- package/plugins/MapInfoTooltip.js +32 -0
- package/plugins/MapLegend.js +14 -0
- package/plugins/MapTip.js +15 -0
- package/plugins/Measure.js +10 -0
- package/plugins/NewsPopup.js +12 -0
- package/plugins/Panoramax.js +10 -0
- package/plugins/Portal.js +10 -0
- package/plugins/Print.js +22 -0
- package/plugins/ProcessNotifications.js +11 -0
- package/plugins/Redlining.js +12 -0
- package/plugins/Reports.js +15 -0
- package/plugins/Routing.js +23 -0
- package/plugins/ScratchDrawing.js +15 -0
- package/plugins/Settings.js +12 -0
- package/plugins/Share.js +11 -0
- package/plugins/StartupMarker.js +12 -0
- package/plugins/TaskButton.js +9 -0
- package/plugins/ThemeSwitcher.js +10 -0
- package/plugins/TimeManager.js +21 -0
- package/plugins/TopBar.js +13 -0
- package/plugins/ValueTool.js +11 -0
- package/plugins/View3D.js +34 -0
- package/plugins/ZoomButtons.js +11 -0
- package/plugins/map/EditingSupport.js +13 -0
- package/plugins/map/LocateSupport.js +14 -0
- package/plugins/map/MeasurementSupport.js +15 -0
- package/plugins/map/OverviewSupport.js +14 -0
- package/plugins/map/RedliningPickSupport.js +12 -0
- package/plugins/map/RedliningSupport.js +28 -0
- package/plugins/map/ScaleBarSupport.js +10 -0
- package/plugins/map/SnapInteraction.js +1 -0
- package/plugins/map/SnapSupport.js +7 -0
- package/plugins/map/SnappingSupport.js +23 -0
- package/plugins/map/style/OverviewSupport.css +42 -0
- package/plugins/map/style/ScaleBarSupport.css +18 -0
- package/plugins/map/style/SnappingSupport.css +33 -0
- package/plugins/redlining/RedliningBufferSupport.js +8 -0
- package/plugins/style/AttributeTable.css +220 -0
- package/plugins/style/Authentication.css +16 -0
- package/plugins/style/BackgroundSwitcher.css +99 -0
- package/plugins/style/Bookmark.css +62 -0
- package/plugins/style/BottomBar.css +53 -0
- package/plugins/style/Buttons.css +68 -0
- package/plugins/style/CookiePopup.css +24 -0
- package/plugins/style/Cyclomedia.css +66 -0
- package/plugins/style/Editing.css +40 -0
- package/plugins/style/FeatureForm.css +21 -0
- package/plugins/style/FeatureSearch.css +71 -0
- package/plugins/style/GeometryDigitizer.css +28 -0
- package/plugins/style/HeightProfile.css +26 -0
- package/plugins/style/Identify.css +4 -0
- package/plugins/style/LayerCatalog.css +8 -0
- package/plugins/style/LayerTree.css +316 -0
- package/plugins/style/Map.css +43 -0
- package/plugins/style/MapCompare.css +27 -0
- package/plugins/style/MapCopyright.css +17 -0
- package/plugins/style/MapExport.css +55 -0
- package/plugins/style/MapFilter.css +101 -0
- package/plugins/style/MapInfoTooltip.css +78 -0
- package/plugins/style/MapLegend.css +36 -0
- package/plugins/style/MapTip.css +22 -0
- package/plugins/style/Measure.css +23 -0
- package/plugins/style/NewsPopup.css +87 -0
- package/plugins/style/Panoramax.css +15 -0
- package/plugins/style/Portal.css +115 -0
- package/plugins/style/Print.css +116 -0
- package/plugins/style/ProcessNotifications.css +55 -0
- package/plugins/style/Redlining.css +101 -0
- package/plugins/style/Reports.css +11 -0
- package/plugins/style/Routing.css +243 -0
- package/plugins/style/ScratchDrawing.css +8 -0
- package/plugins/style/Settings.css +11 -0
- package/plugins/style/Share.css +59 -0
- package/plugins/style/ThemeSwitcher.css +7 -0
- package/plugins/style/TimeManager.css +91 -0
- package/plugins/style/TopBar.css +50 -0
- package/plugins/style/ValueTool.css +60 -0
- package/reducers/display.js +7 -0
- package/reducers/editing.js +8 -0
- package/reducers/index.js +7 -0
- package/reducers/layerinfo.js +7 -0
- package/reducers/layers.js +14 -0
- package/reducers/localConfig.js +8 -0
- package/reducers/locale.js +8 -0
- package/reducers/locate.js +8 -0
- package/reducers/map.js +11 -0
- package/reducers/measurement.js +8 -0
- package/reducers/processNotifications.js +7 -0
- package/reducers/redlining.js +7 -0
- package/reducers/redliningPick.js +7 -0
- package/reducers/serviceinfo.js +7 -0
- package/reducers/task.js +7 -0
- package/reducers/theme.js +7 -0
- package/reducers/windows.js +7 -0
- package/scripts/dist.sh +16 -0
- package/scripts/gen-plugin-docs.js +9 -0
- package/scripts/makeIconkit.js +7 -0
- package/scripts/package-commands.bat +8 -0
- package/scripts/package-commands.sh +22 -0
- package/scripts/themesConfig.js +48 -0
- package/scripts/themesConfig.py +659 -0
- package/scripts/translateui.sh +51 -0
- package/scripts/updateTranslations.js +17 -0
- package/scripts/wmts_config_generator.py +169 -0
- package/selectors/searchproviders.js +12 -0
- package/static/translations/bg-BG.json +709 -0
- package/static/translations/ca-ES.json +709 -0
- package/static/translations/cs-CZ.json +709 -0
- package/static/translations/de-CH.json +709 -0
- package/static/translations/de-DE.json +709 -0
- package/static/translations/en-US.json +709 -0
- package/static/translations/es-ES.json +709 -0
- package/static/translations/fi-FI.json +709 -0
- package/static/translations/fr-FR.json +709 -0
- package/static/translations/hu-HU.json +709 -0
- package/static/translations/it-IT.json +709 -0
- package/static/translations/ja-JP.json +709 -0
- package/static/translations/nl-NL.json +709 -0
- package/static/translations/no-NO.json +709 -0
- package/static/translations/pl-PL.json +709 -0
- package/static/translations/pt-BR.json +709 -0
- package/static/translations/pt-PT.json +709 -0
- package/static/translations/ro-RO.json +709 -0
- package/static/translations/ru-RU.json +709 -0
- package/static/translations/sv-SE.json +709 -0
- package/static/translations/tr-TR.json +709 -0
- package/static/translations/tsconfig.json +606 -0
- package/stores/StandardStore.js +8 -0
- package/utils/ConfigUtils.js +9 -0
- package/utils/CoordinatesUtils.js +29 -0
- package/utils/DxfUtils.js +10 -0
- package/utils/EditingInterface.js +67 -0
- package/utils/EditingUtils.js +11 -0
- package/utils/FeatureStyles.js +10 -0
- package/utils/IdentifyUtils.js +12 -0
- package/utils/ImageEditor.js +15 -0
- package/utils/LayerUtils.js +57 -0
- package/utils/LocaleUtils.js +9 -0
- package/utils/MapUtils.js +66 -0
- package/utils/MeasureUtils.js +9 -0
- package/utils/MiscUtils.js +15 -0
- package/utils/PermaLinkUtils.js +11 -0
- package/utils/ResourceRegistry.js +7 -0
- package/utils/RoutingInterface.js +12 -0
- package/utils/SearchProviders.js +19 -0
- package/utils/ServiceLayerUtils.js +20 -0
- package/utils/Signal.js +2 -0
- package/utils/ThemeUtils.js +12 -0
- package/utils/VectorLayerUtils.js +20 -0
- package/utils/expr_grammar/README.md +3 -0
- package/utils/expr_grammar/grammar.js +3 -0
- package/utils/expr_grammar/grammar.ne +118 -0
- package/utils/expr_grammar/test.js +13 -0
- package/utils/img/README.markers +1 -0
- package/utils/img/arrowhead.svg +4 -0
- package/utils/img/marker-icon.png +0 -0
- package/utils/img/measurehead.svg +4 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
div.ThemeList ul {
|
|
2
|
+
padding: 0;
|
|
3
|
+
list-style-type: none;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
div.ThemeList li.theme-group-header > span {
|
|
7
|
+
font-weight: bold;
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
border-bottom: 1px solid var(--border-color);
|
|
11
|
+
padding: 0.25em;
|
|
12
|
+
margin: 0 0.5em 0.5em 0.5em;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
div.ThemeList li.theme-group-header > span > span.icon {
|
|
16
|
+
margin-right: 0.25em;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
div.ThemeList ul.theme-group-body {
|
|
20
|
+
padding: 0.25em;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
div.ThemeList li.theme-group-header ul.theme-group-body {
|
|
24
|
+
margin-left: 0.25em;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
div.ThemeList li.theme-item {
|
|
28
|
+
background-color: var(--list-bg-color);
|
|
29
|
+
font-weight: bold;
|
|
30
|
+
font-size: small;
|
|
31
|
+
border: 1px solid var(--border-color);
|
|
32
|
+
margin: 0.5em;
|
|
33
|
+
text-align: center;
|
|
34
|
+
display: inline-block;
|
|
35
|
+
width: calc(15em + 2px);
|
|
36
|
+
position: relative;
|
|
37
|
+
}
|
|
38
|
+
div.ThemeList div.theme-item-title {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
div.ThemeList div.theme-item-title > span:first-child {
|
|
44
|
+
flex: 1 1 auto;
|
|
45
|
+
padding: 0.125em;
|
|
46
|
+
overflow: hidden;
|
|
47
|
+
text-overflow: ellipsis;
|
|
48
|
+
white-space: nowrap;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
div.ThemeList div.theme-item-title > span.icon {
|
|
52
|
+
flex: 0 0 auto;
|
|
53
|
+
padding: 0.125em;
|
|
54
|
+
font-size: large;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
div.ThemeList div.theme-item-body {
|
|
58
|
+
background-color: white;
|
|
59
|
+
height: 7.5em;
|
|
60
|
+
width: 15em;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
div.ThemeList li.theme-item-active div.theme-item-title > span:first-child {
|
|
64
|
+
color: var(--color-active);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
div.ThemeList img.theme-item-thumbnail {
|
|
68
|
+
width: 100%;
|
|
69
|
+
height: auto;
|
|
70
|
+
max-width: 15em;
|
|
71
|
+
max-height: 7.5em;
|
|
72
|
+
vertical-align: top;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
div.ThemeList div.theme-item-icons {
|
|
76
|
+
position: absolute;
|
|
77
|
+
bottom: 0;
|
|
78
|
+
right: 0;
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
max-height: 7.5em;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
div.ThemeList div.theme-item-icons > span.icon {
|
|
85
|
+
flex: 0 1 1.5em;
|
|
86
|
+
padding: 0 0.25em;
|
|
87
|
+
font-size: large;
|
|
88
|
+
background-color: var(--button-bg-color);
|
|
89
|
+
color: var(--text-color);
|
|
90
|
+
z-index: 2;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
div.ThemeList div.theme-item-icons > span.icon:hover {
|
|
94
|
+
color: var(--color-active);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
div.ThemeList li.theme-item:hover {
|
|
98
|
+
border: 1px solid var(--color-active);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
div.ThemeList div.theme-item-icons > span.icon-active {
|
|
102
|
+
color: var(--color-active);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
div.ThemeList div.theme-item-keywords {
|
|
106
|
+
position: relative;
|
|
107
|
+
display: inline-block;
|
|
108
|
+
color: gray;
|
|
109
|
+
font-size: x-small;
|
|
110
|
+
font-weight: normal;
|
|
111
|
+
max-width: 80%;
|
|
112
|
+
overflow-x: hidden;
|
|
113
|
+
white-space: nowrap;
|
|
114
|
+
text-overflow: ellipsis;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
div.ThemeList li.theme-item-active {
|
|
118
|
+
border: 1px solid var(--color-active);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
div.ThemeList div.theme-item-info-menu {
|
|
122
|
+
text-align: left;
|
|
123
|
+
display: flex;
|
|
124
|
+
align-items: center;
|
|
125
|
+
position: relative;
|
|
126
|
+
color: var(--color-active);
|
|
127
|
+
padding: 0.25em;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
div.ThemeList div.theme-item-info-menu-active {
|
|
131
|
+
background-color: var(--color-active);
|
|
132
|
+
color: white;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
div.ThemeList div.theme-item-info-menu > span.icon-info {
|
|
136
|
+
margin-right: 0.25em;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
div.ThemeList div.theme-item-info-menu > span.icon-triangle-down {
|
|
140
|
+
margin-left: 0.25em;
|
|
141
|
+
font-size: 80%;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
div.ThemeList div.theme-item-info-links {
|
|
145
|
+
position: absolute;
|
|
146
|
+
top: 100%;
|
|
147
|
+
max-width: calc(15em + 2px);
|
|
148
|
+
left: -1px;
|
|
149
|
+
right: -1px;
|
|
150
|
+
background-color: rgba(255, 255, 255, 0.85);
|
|
151
|
+
border: 1px solid var(--color-active);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
div.ThemeList div.theme-item-info-links > a {
|
|
155
|
+
display: block;
|
|
156
|
+
text-align: left;
|
|
157
|
+
padding: 0.25em;
|
|
158
|
+
overflow: hidden;
|
|
159
|
+
text-overflow: ellipsis;
|
|
160
|
+
white-space: nowrap;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
div.ThemeList div.theme-item-filterinfo-overlay {
|
|
164
|
+
position: absolute;
|
|
165
|
+
bottom: 0;
|
|
166
|
+
left: 0;
|
|
167
|
+
right: 2.29em;
|
|
168
|
+
font-size: 90%;
|
|
169
|
+
background-color: rgba(255, 255, 255, 0.85);
|
|
170
|
+
color: black;
|
|
171
|
+
font-weight: normal;
|
|
172
|
+
text-align: left;
|
|
173
|
+
padding: 0.25em;
|
|
174
|
+
border-top: 1px solid var(--border-color);
|
|
175
|
+
border-right: 1px solid var(--border-color);
|
|
176
|
+
z-index: 1;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
div.ThemeList div.theme-item-filterinfo-overlay > div {
|
|
180
|
+
overflow: hidden;
|
|
181
|
+
white-space: nowrap;
|
|
182
|
+
text-overflow: ellipsis;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
div.ThemeList div.theme-item-filterinfo-overlay > div:not(:last-child) {
|
|
186
|
+
padding-bottom: 0.25em;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
div.ThemeList div.theme-item-restricted-overlay {
|
|
190
|
+
position: absolute;
|
|
191
|
+
left: 0;
|
|
192
|
+
right: 0;
|
|
193
|
+
top: 0;
|
|
194
|
+
bottom: 0;
|
|
195
|
+
background-color: rgba(127, 127, 127, 0.5);
|
|
196
|
+
display: flex;
|
|
197
|
+
align-items: center;
|
|
198
|
+
justify-content: center;
|
|
199
|
+
font-size: 400%;
|
|
200
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
div.Toolbar {
|
|
2
|
+
margin: 0.25em;
|
|
3
|
+
flex: 0 0 auto;
|
|
4
|
+
display: flex;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
div.Toolbar > .icon {
|
|
8
|
+
width: 2.5em;
|
|
9
|
+
height: 2.5em;
|
|
10
|
+
margin-right: 0.25em;
|
|
11
|
+
padding: 0.25em;
|
|
12
|
+
border: 1px solid transparent;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
div.Toolbar > .icon:hover,
|
|
16
|
+
div.Toolbar > .toolbar-item-active {
|
|
17
|
+
border: 1px solid var(--border-color);
|
|
18
|
+
background-color: var(--button-bg-color-hover);
|
|
19
|
+
color: var(--button-text-color-hover);
|
|
20
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
iframe.windows-iframe-dialog-body {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
border: 0;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
div.dock-window iframe.windows-iframe-dialog-body {
|
|
8
|
+
height: calc(100vh - var(--topbar-height) - var(--bottombar-height));
|
|
9
|
+
height: calc(var(--vh, 1vh) * 100 - var(--topbar-height) - var(--bottombar-height));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
div.windows-notification-container {
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: var(--topbar-height);
|
|
15
|
+
left: 50%;
|
|
16
|
+
transform: translateX(-50%);
|
|
17
|
+
display: inline-block;
|
|
18
|
+
max-width: calc(100% - 0.5em);
|
|
19
|
+
background-color: var(--container-bg-color);
|
|
20
|
+
box-shadow: 0px 2px 4px rgba(136, 136, 136, 0.5);
|
|
21
|
+
border-top: 1px solid rgba(136, 136, 136, 0.5);
|
|
22
|
+
z-index: 3;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
div.windows-notification-container > div {
|
|
26
|
+
padding: 0 1.25em 0 0.25em;
|
|
27
|
+
position: relative;
|
|
28
|
+
border-bottom: 1px solid var(--border-color);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
div.windows-notification-container > div > div {
|
|
32
|
+
padding: 0.25em 0.5em 0.25em 0.25em;
|
|
33
|
+
display: inline-block;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
div.windows-notification-container > div > span {
|
|
37
|
+
position: absolute;
|
|
38
|
+
right: 0;
|
|
39
|
+
top: 0;
|
|
40
|
+
bottom: 0;
|
|
41
|
+
padding: 0.125em 0.125em 0 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
div.windows-notification-warn {
|
|
45
|
+
background-color: orange;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
div.windows-notification-error {
|
|
49
|
+
background-color: red;
|
|
50
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e))}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t})()}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_setPrototypeOf(t,e)}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}/**
|
|
2
|
+
* Copyright 2024 Sourcepole AG
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the BSD-style license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/import React from"react";import dayjs from"dayjs";import PropTypes from"prop-types";import LocaleUtils from"../../utils/LocaleUtils";import Icon from"../Icon";import ButtonBar from"../widgets/ButtonBar";import Input from"../widgets/Input";import"./style/FixedTimeline.css";var FixedTimeline=/*#__PURE__*/function(_React$Component){function FixedTimeline(){var _this;_classCallCheck(this,FixedTimeline);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}_this=_callSuper(this,FixedTimeline,[].concat(args));_defineProperty(_this,"state",{ticksContainerEl:null,timelineWidth:0});_defineProperty(_this,"navButtonClicked",function(key){if(key==="home"){_this.props.setStartTime(null);_this.props.setEndTime(null)}else if(key==="zoomin"){var mid=0.5*(_this.props.startTime+_this.props.endTime);_this.props.setStartTime(mid-0.25*_this.props.timeSpan);_this.props.setEndTime(mid+0.25*_this.props.timeSpan)}else if(key==="zoomout"){var _mid=0.5*(_this.props.startTime+_this.props.endTime);var newStartTime=Math.max(_this.props.dataStartTime,_mid-_this.props.timeSpan);_this.props.setStartTime(newStartTime);_this.props.setEndTime(Math.min(_this.props.dataEndTime,newStartTime+2*_this.props.timeSpan))}});_defineProperty(_this,"pan",function(dir){var delta=0.1*_this.props.timeSpan;if(dir>0){if(_this.props.dataEndTime-_this.props.endTime>0){var newEndTime=Math.min(_this.props.dataEndTime,_this.props.endTime+delta);_this.props.setStartTime(newEndTime-_this.props.timeSpan);_this.props.setEndTime(newEndTime)}}else{if(_this.props.startTime-_this.props.dataStartTime>0){var newStartTime=Math.max(_this.props.dataStartTime,_this.props.startTime-delta);_this.props.setStartTime(newStartTime);_this.props.setEndTime(newStartTime+_this.props.timeSpan)}}});_defineProperty(_this,"startPan",function(dir){_this.pan(dir);var panInterval=null;var panTimeout=setTimeout(function(){_this.pan(dir);panInterval=setInterval(function(){_this.pan(dir)},50)},250);document.addEventListener("mouseup",function(){clearInterval(panInterval);clearTimeout(panTimeout)},{once:true,capture:true})});_defineProperty(_this,"setTicksContainerRef",function(instance){if(_this.state.ticksContainerEl!==instance){_this.setState({ticksContainerEl:instance})}});_defineProperty(_this,"renderTicks",function(){// Render approx 1 tick every 100 px
|
|
8
|
+
var nTicks=Math.round(_this.state.timelineWidth/100);var tickInterval=_this.state.timelineWidth/nTicks;var ticks=[];for(var x=0;x<_this.state.timelineWidth-0.5*tickInterval;x+=tickInterval){ticks.push({pixel:x,time:FixedTimeline.computeTimeFromPixel(_this,x)})}ticks.push({pixel:_this.state.timelineWidth,time:_this.props.endTime});// Render ticks
|
|
9
|
+
return ticks.map(function(tick){var style={left:tick.pixel-1+"px"};return/*#__PURE__*/React.createElement("span",{className:tick.time?"fixtimeline-ltick":"fixtimeline-tick",key:"tick"+tick.pixel,style:style},tick.time?/*#__PURE__*/React.createElement("span",null,dayjs(tick.time).format(_this.props.dateFormat)):null)})});return _this}_inherits(FixedTimeline,_React$Component);return _createClass(FixedTimeline,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps,prevState){if(this.state.ticksContainerEl&&(this.props.dialogWidth!==prevProps.dialogWidth||!prevState.ticksContainerEl)){this.setState(function(state){return{timelineWidth:state.ticksContainerEl.getBoundingClientRect().width}})}// Automatically pan if nearing the start/end of timeline
|
|
10
|
+
if(this.props.currentTimestamp>this.props.endTime-0.1*this.props.timeSpan){if(this.props.endTime-this.props.currentTimestamp>0){this.pan(+1)}}else if(this.props.currentTimestamp<this.props.startTime+0.1*this.props.timeSpan){if(this.props.currentTimestamp-this.props.startTime>0){this.pan(-1)}}}},{key:"render",value:function render(){var _this2=this;var navButtons=[{key:"home",tooltip:LocaleUtils.tr("timemanager.home"),icon:"home"},{key:"zoomout",tooltip:LocaleUtils.tr("timemanager.zoomout"),icon:"zoomout"},{key:"zoomin",tooltip:LocaleUtils.tr("timemanager.zoomin"),icon:"zoomin"}];return/*#__PURE__*/React.createElement("div",{className:"fixtimeline"},/*#__PURE__*/React.createElement("div",{className:"fixtimeline-toolbar"},/*#__PURE__*/React.createElement("div",null,/*#__PURE__*/React.createElement(Input,{onChange:this.props.setStartTime,type:"date",value:this.props.startTime.format("YYYY-MM-DD")})),/*#__PURE__*/React.createElement("div",{className:"fixtimeline-toolbar-spacer"}),/*#__PURE__*/React.createElement(ButtonBar,{buttons:navButtons,onClick:this.navButtonClicked}),/*#__PURE__*/React.createElement("div",{className:"fixtimeline-toolbar-spacer"}),/*#__PURE__*/React.createElement("div",null,/*#__PURE__*/React.createElement(Input,{onChange:this.props.setEndTime,type:"date",value:this.props.endTime.format("YYYY-MM-DD")}))),/*#__PURE__*/React.createElement("div",{className:"fixtimeline-slider"},/*#__PURE__*/React.createElement("button",{className:"button fixtimeline-pan-left",disabled:this.props.startTime.isSame(this.props.dataStartTime),onMouseDown:function onMouseDown(){return _this2.startPan(-1)}},/*#__PURE__*/React.createElement(Icon,{icon:"chevron-left"})),/*#__PURE__*/React.createElement("div",{className:"fixtimeline-ticks",ref:this.setTicksContainerRef},this.renderTicks()),/*#__PURE__*/React.createElement("button",{className:"button fixtimeline-pan-right",disabled:this.props.endTime.isSame(this.props.dataEndTime),onMouseDown:function onMouseDown(){return _this2.startPan(1)}},/*#__PURE__*/React.createElement(Icon,{icon:"chevron-right"}))),this.props.children(function(time){return FixedTimeline.computePixelFromTime(_this2,time)},function(pixel){return FixedTimeline.computeTimeFromPixel(_this2,pixel)}))}}],[{key:"computeTimeFromPixel",value:function computeTimeFromPixel(self,pixel){return self.props.startTime+pixel/self.state.timelineWidth*self.props.timeSpan}},{key:"computePixelFromTime",value:function computePixelFromTime(self,time){return(time-self.props.startTime)/self.props.timeSpan*self.state.timelineWidth}}])}(React.Component);_defineProperty(FixedTimeline,"propTypes",{children:PropTypes.func,currentTimestamp:PropTypes.number,dataEndTime:PropTypes.object,dataStartTime:PropTypes.object,dateFormat:PropTypes.string,dialogWidth:PropTypes.number,endTime:PropTypes.object,setEndTime:PropTypes.func,setStartTime:PropTypes.func,startTime:PropTypes.object,timeSpan:PropTypes.number});export{FixedTimeline as default};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e))}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t})()}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_setPrototypeOf(t,e)}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}/**
|
|
2
|
+
* Copyright 2024 Sourcepole AG
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the BSD-style license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/import React from"react";import dayjs from"dayjs";import PropTypes from"prop-types";import LocaleUtils from"../../utils/LocaleUtils";import Icon from"../Icon";import ButtonBar from"../widgets/ButtonBar";import NumberInput from"../widgets/NumberInput";import"./style/InfiniteTimeline.css";var InfiniteTimeline=/*#__PURE__*/function(_React$Component){function InfiniteTimeline(){var _this;_classCallCheck(this,InfiniteTimeline);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}_this=_callSuper(this,InfiniteTimeline,[].concat(args));_defineProperty(_this,"state",{timelineContainerEl:null,timelineWidth:0,timeScalePast:1,timeScaleFuture:1,panOffset:0,zoomFactor:1// 1 = [startTime, endTime] fits dialog width in linear scale,
|
|
8
|
+
});_defineProperty(_this,"setTimelineContainerRef",function(instance){if(_this.state.timelineContainerEl!==instance){_this.setState({timelineContainerEl:instance})}});_defineProperty(_this,"renderTicks",function(){var width=_this.state.timelineWidth;var now=dayjs(_this.props.currentTimestamp);var xnow=0.5*width-_this.state.panOffset;// Render one tick every 100px
|
|
9
|
+
var ticks=[{pixel:xnow,time:now}];// Compute ticks before current time
|
|
10
|
+
var x=xnow;x-=100;while(x>=0){if(x<width){ticks.push({pixel:x,time:InfiniteTimeline.computeTimeFromPixel(_this,x)})}x-=100}// Compute ticks after current time
|
|
11
|
+
x=xnow;x+=100;while(x<=width){if(x>0){ticks.push({pixel:x,time:InfiniteTimeline.computeTimeFromPixel(_this,x)})}x+=100}// Intermediate ticks (lines only)
|
|
12
|
+
var tickPos=[20,40,60,80].map(function(p){return Math.pow(p/100,1/_this.state.timeScalePast)*100});var i=0;for(x=xnow;x-tickPos[i]>=0;){if(x-tickPos[i]<width){ticks.push({pixel:x-tickPos[i]})}i+=1;if(i>=tickPos.length){x-=100;i=0}}i=0;tickPos=[20,40,60,80].map(function(p){return Math.pow(p/100,1/_this.state.timeScaleFuture)*100});for(x=xnow;x+tickPos[i]<=width;){if(x+tickPos[i]>0){ticks.push({pixel:x+tickPos[i]})}i+=1;if(i>=tickPos.length){x+=100;i=0}}// Render ticks
|
|
13
|
+
return ticks.map(function(tick){var style={left:tick.pixel-1+"px"};return/*#__PURE__*/React.createElement("span",{className:tick.time?"inftimeline-ltick":"inftimeline-tick",key:"tick"+tick.pixel,style:style},tick.time?/*#__PURE__*/React.createElement("span",null,dayjs(tick.time).format(_this.props.dateFormat)):null)})});_defineProperty(_this,"onSliderWheel",function(ev){if(ev.shiftKey){if(ev.deltaY<0){_this.setState(function(state){return{zoomFactor:state.zoomFactor*0.5}})}else if(ev.deltaY>0){_this.setState(function(state){return{zoomFactor:state.zoomFactor*2}})}}else{if(ev.deltaX<0){_this.setState(function(state){return{panOffset:state.panOffset-20}})}else if(ev.deltaX>0){_this.setState(function(state){return{panOffset:state.panOffset+20}})}}ev.preventDefault();ev.stopPropagation()});_defineProperty(_this,"navButtonClicked",function(key){if(key==="home"){_this.setState({panOffset:0,zoomFactor:1})}else if(key==="zoomin"){_this.setState(function(state){return{zoomFactor:state.zoomFactor*0.5}})}else if(key==="zoomout"){_this.setState(function(state){return{zoomFactor:state.zoomFactor*2}})}});_defineProperty(_this,"setTimeScalePast",function(value){_this.props.setMarkersCanBeEnabled(value===1&&_this.state.timeScaleFuture===1);_this.setState({timeScalePast:value})});_defineProperty(_this,"setTimeScaleFuture",function(value){_this.props.setMarkersCanBeEnabled(_this.state.timeScalePast===1&&value===1);_this.setState({timeScaleFuture:value})});_defineProperty(_this,"pan",function(offset){_this.setState(function(state){return{panOffset:state.panOffset+offset}});var panInterval=null;var panTimeout=setTimeout(function(){_this.setState(function(state){return{panOffset:state.panOffset+offset}});panInterval=setInterval(function(){_this.setState(function(state){return{panOffset:state.panOffset+offset}})},50)},250);document.addEventListener("mouseup",function(){clearInterval(panInterval);clearTimeout(panTimeout)},{once:true,capture:true})});return _this}_inherits(InfiniteTimeline,_React$Component);return _createClass(InfiniteTimeline,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps,prevState){if(this.state.timelineContainerEl&&(this.props.dialogWidth!==prevProps.dialogWidth||!prevState.timelineContainerEl)){this.setState(function(state){return{timelineWidth:state.timelineContainerEl.getBoundingClientRect().width}})}if(this.props.currentTimestamp!==prevProps.currentTimestamp){var pixel=InfiniteTimeline.computePixelFromTime(this,this.props.currentTimestamp);if(pixel<0||pixel>=this.state.timelineWidth){this.setState({panOffset:0})}}}},{key:"render",value:function render(){var _this2=this;var navButtons=[{key:"home",tooltip:LocaleUtils.tr("timemanager.home"),icon:"home"},{key:"zoomout",tooltip:LocaleUtils.tr("timemanager.zoomout"),icon:"zoomout"},{key:"zoomin",tooltip:LocaleUtils.tr("timemanager.zoomin"),icon:"zoomin"}];return/*#__PURE__*/React.createElement("div",{className:"inftimeline",onWheel:this.onSliderWheel,ref:this.setTimelineContainerRef},/*#__PURE__*/React.createElement("div",{className:"inftimeline-toolbar"},/*#__PURE__*/React.createElement(ButtonBar,{buttons:navButtons,onClick:this.navButtonClicked}),/*#__PURE__*/React.createElement("div",{className:"inftimeline-toolbar-block"},/*#__PURE__*/React.createElement("span",null,LocaleUtils.tr("timemanager.timelinescale"),": \xA0"),/*#__PURE__*/React.createElement(NumberInput,{decimals:2,max:10,min:0.01,mobile:true,onChange:this.setTimeScalePast,value:this.state.timeScalePast}),/*#__PURE__*/React.createElement(Icon,{icon:"before",title:LocaleUtils.tr("timemanager.past")}),/*#__PURE__*/React.createElement(Icon,{icon:"after",title:LocaleUtils.tr("timemanager.future")}),/*#__PURE__*/React.createElement(NumberInput,{decimals:2,max:10,min:0.01,mobile:true,onChange:this.setTimeScaleFuture,value:this.state.timeScaleFuture})),/*#__PURE__*/React.createElement("div",{className:"inftimeline-toolbar-spacer"})),/*#__PURE__*/React.createElement("div",{className:"inftimeline-clip"},/*#__PURE__*/React.createElement("button",{className:"button inftimeline-pan-left",onMouseDown:function onMouseDown(){return _this2.pan(-20)}},/*#__PURE__*/React.createElement(Icon,{icon:"chevron-left"})),/*#__PURE__*/React.createElement("div",{className:"inftimeline-ticks"},this.renderTicks()),/*#__PURE__*/React.createElement("button",{className:"button inftimeline-pan-right",onMouseDown:function onMouseDown(){return _this2.pan(20)}},/*#__PURE__*/React.createElement(Icon,{icon:"chevron-right"}))),this.props.children(function(time){return InfiniteTimeline.computePixelFromTime(_this2,time)},function(pixel){return InfiniteTimeline.computeTimeFromPixel(_this2,pixel)}))}}],[{key:"computeTimeFromPixel",value:function computeTimeFromPixel(self,pixel){var dpx=self.state.panOffset+pixel-0.5*self.state.timelineWidth;var exp=pixel-0.5*self.state.timelineWidth<0?self.state.timeScalePast:self.state.timeScaleFuture;return self.props.currentTimestamp+Math.sign(dpx)*Math.pow(Math.abs(dpx)/(0.5*self.state.timelineWidth),exp)*0.5*self.props.timeSpan*self.state.zoomFactor}},{key:"computePixelFromTime",value:function computePixelFromTime(self,time){var dt=time-self.props.currentTimestamp;var iexp=dt<0?1/self.state.timeScalePast:1/self.state.timeScaleFuture;return 0.5*self.state.timelineWidth*(1+Math.sign(dt)*Math.pow(Math.abs(dt)/(0.5*self.props.timeSpan*self.state.zoomFactor),iexp))-self.state.panOffset}}])}(React.Component);_defineProperty(InfiniteTimeline,"propTypes",{children:PropTypes.func,currentTimestamp:PropTypes.number,dateFormat:PropTypes.string,dialogWidth:PropTypes.number,endTime:PropTypes.object,setMarkersCanBeEnabled:PropTypes.func,startTime:PropTypes.object,timeSpan:PropTypes.number});export{InfiniteTimeline as default};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r)}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e))}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t})()}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_setPrototypeOf(t,e)}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}/**
|
|
2
|
+
* Copyright 2024 Sourcepole AG
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the BSD-style license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/import React from"react";import{connect}from"react-redux";import dayjs from"dayjs";import PropTypes from"prop-types";import randomcolor from"randomcolor";import{addLayerFeatures,removeLayer,LayerRole}from"../../actions/layers";import LocaleUtils from"../../utils/LocaleUtils";import MiscUtils from"../../utils/MiscUtils";import Input from"../widgets/Input";import Spinner from"../widgets/Spinner";import"./style/TimelineFeaturesSlider.css";var TimelineFeaturesSlider=/*#__PURE__*/function(_React$Component){function TimelineFeaturesSlider(){var _this;_classCallCheck(this,TimelineFeaturesSlider);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}_this=_callSuper(this,TimelineFeaturesSlider,[].concat(args));_defineProperty(_this,"state",{currentTimestampDrag:null,highlightFeatures:null,layerClassifications:{},layerAttrGroups:{}});_defineProperty(_this,"renderCursor",function(timestamp){if(_this.props.timeEnabled){var cursorPos=_this.state.currentTimestampDrag?_this.state.currentTimestampDrag.pos:_this.props.computePixelFromTime(timestamp);var cursorStyle={left:cursorPos-2+"px"};return/*#__PURE__*/React.createElement("div",{className:"timeline-slider-cursor",style:cursorStyle},/*#__PURE__*/React.createElement("div",{className:"timeline-slider-cursor-label"},_this.props.cursorFormat.includes("date")?/*#__PURE__*/React.createElement("div",null,/*#__PURE__*/React.createElement(Input,{onChange:_this.setCursorDate,required:true,type:"date",value:dayjs(timestamp).format("YYYY-MM-DD")})):null,_this.props.cursorFormat.includes("time")?/*#__PURE__*/React.createElement("div",null,/*#__PURE__*/React.createElement(Input,{onChange:_this.setCursorTime,required:true,type:"time",value:dayjs(timestamp).format("HH:mm:ss")})):null))}return null});_defineProperty(_this,"setCursorDate",function(date){if(date){var newdate=dayjs(date,"YYYY-MM-DD");_this.props.timestampChanged(+dayjs(_this.props.currentTimestamp).year(newdate.year()).month(newdate.month()).date(newdate.date()))}});_defineProperty(_this,"setCursorTime",function(time){if(time){var parts=time.split(":").map(function(x){return parseInt(x,10)});_this.props.timestampChanged(+dayjs(_this.props.currentTimestamp).hour(parts[0]).minute(parts[1]).second(parts[2]))}});_defineProperty(_this,"pickCurrentTimestamp",function(event){if(["INPUT","SELECT","OPTION"].includes(event.target.nodeName)){return}clearTimeout(_this.timestampChangeTimeout);var target=event.currentTarget;var rect=target.getBoundingClientRect();var computeTimestamp=function computeTimestamp(ev){if(!_this.props.timeEnabled){return}var pos=Math.max(0,Math.min(ev.clientX-rect.left,rect.right-rect.left));var newTimestamp=dayjs(_this.props.computeTimeFromPixel(pos));// Snap to configured step interval
|
|
8
|
+
var add=null;if(_this.props.stepSizeUnit.endsWith("m")){add=newTimestamp.second()>30;newTimestamp=newTimestamp.second(0)}else if(_this.props.stepSizeUnit.endsWith("h")){add=newTimestamp.minute()>30;newTimestamp=newTimestamp.second(0).minute(0)}else if(_this.props.stepSizeUnit.endsWith("d")){add=newTimestamp.hour()>12;newTimestamp=newTimestamp.second(0).minute(0).hour(0)}else if(_this.props.stepSizeUnit.endsWith("M")){add=newTimestamp.date()>15;newTimestamp=newTimestamp.second(0).minute(0).hour(0).date(1)}else if(_this.props.stepSizeUnit.endsWith("y")){add=newTimestamp.month()>5;newTimestamp=newTimestamp.second(0).minute(0).hour(0).date(1).month(0)}if(add){var num=parseInt(_this.props.stepSizeUnit.slice(0,-1),10)||1;newTimestamp=newTimestamp.add(num,_this.props.stepSizeUnit.slice(-1))}_this.setState({currentTimestampDrag:{pos:pos,time:newTimestamp}})};document.addEventListener("mousemove",computeTimestamp);document.addEventListener("mouseup",function(){if(_this.state.currentTimestampDrag){_this.props.timestampChanged(+_this.state.currentTimestampDrag.time);_this.setState({currentTimestampDrag:null})}document.removeEventListener("mousemove",computeTimestamp)},{once:true,capture:true});computeTimestamp(event)});_defineProperty(_this,"renderTimeFeatures",function(sliderGeom){return Object.entries(_this.props.timeFeatures.features).map(function(_ref){var _ref2=_slicedToArray(_ref,2),layer=_ref2[0],features=_ref2[1];var layerTitleStyle={top:sliderGeom.top+"px",left:0,right:0};sliderGeom.top+=30;var classattr=(_this.state.layerClassifications[layer]||{}).attr||"";var groupattr=(_this.state.layerAttrGroups[layer]||{}).attr||"";var sliderFeatures=null;if(_this.state.layerAttrGroups[layer]){var layerAttrGroups=_this.state.layerAttrGroups[layer];sliderFeatures=Object.values(layerAttrGroups.groups).map(function(groupData){return _this.renderTimeFeature(sliderGeom,groupData.start,groupData.end,groupData.features,"",groupattr,groupData)})}else{var layerAttrClasses=_this.state.layerClassifications[layer];sliderFeatures=features.map(function(feature){var attrData=layerAttrClasses?layerAttrClasses.classes[feature.properties[layerAttrClasses.attr]]:null;var tstart=feature.properties.__startdate;var tend=feature.properties.__enddate;var label=feature.properties[feature.displayfield];return _this.renderTimeFeature(sliderGeom,tstart,tend,[feature],label,classattr,attrData)})}return[/*#__PURE__*/React.createElement("div",{className:"timeline-slider-layertitle",key:layer,style:layerTitleStyle},/*#__PURE__*/React.createElement("span",null,layer),/*#__PURE__*/React.createElement("span",null,LocaleUtils.tr("timemanager.group"),":\xA0"),/*#__PURE__*/React.createElement("select",{onChange:function onChange(ev){return _this.setGroupAttr(layer,ev.target.value)},value:groupattr},/*#__PURE__*/React.createElement("option",{value:""},LocaleUtils.tr("timemanager.groupnone")),_this.props.timeFeatures.attributes[layer].map(function(attr){return/*#__PURE__*/React.createElement("option",{key:attr,value:attr},attr)})),/*#__PURE__*/React.createElement("span",null,LocaleUtils.tr("timemanager.classify"),":\xA0"),/*#__PURE__*/React.createElement("select",{onChange:function onChange(ev){return _this.setClassification(layer,ev.target.value)},value:classattr},/*#__PURE__*/React.createElement("option",{value:""},LocaleUtils.tr("timemanager.classifynone")),_this.props.timeFeatures.attributes[layer].map(function(attr){return/*#__PURE__*/React.createElement("option",{key:attr,value:attr},attr)}))),sliderFeatures]})});_defineProperty(_this,"renderTimeLayers",function(sliderGeom){return Object.entries(_this.props.timeFeatures.features).reduce(function(res,_ref3){var _ref4=_slicedToArray(_ref3,2),layer=_ref4[0],features=_ref4[1];if(features.length>0){var tstart=features[0].properties.__startdate;var tend=features[0].properties.__enddate;for(var i=1;i<features.length;++i){if(features[i].properties.__startdate<tstart){tstart=features[i].properties.__startdate}if(features[i].properties.__enddate>tend){tend=features[i].properties.__enddate}}return[].concat(_toConsumableArray(res),[_this.renderTimeFeature(sliderGeom,tstart,tend,features,layer)])}return res},[])});_defineProperty(_this,"renderTimeFeature",function(sliderGeom,tstart,tend,features,label,attr,featClass){var left=tstart.isValid()?_this.props.computePixelFromTime(tstart):0;var right=tend.isValid()?_this.props.computePixelFromTime(tend):0;var style={top:sliderGeom.top+"px",left:left+"px"};if(tend.isValid()){style.width=right-left+"px"}else{style.right=0}var tooltip=LocaleUtils.tr("timemanager.starttime")+": "+(tstart.isValid()?tstart.format(_this.props.dateFormat):"-")+"\n"+LocaleUtils.tr("timemanager.endtime")+": "+(tend.isValid()?tend.format(_this.props.dateFormat):"-");if(featClass){style.backgroundColor=featClass.bg;style.color=featClass.fg;label+=(label?": ":"")+featClass.val;tooltip+="\n"+attr+": "+featClass.val}sliderGeom.top+=26;return/*#__PURE__*/React.createElement("div",{className:"timeline-slider-feature",key:features[0].id,onMouseEnter:function onMouseEnter(){return _this.setState({highlightFeatures:features})},onMouseLeave:function onMouseLeave(){return _this.setState({highlightFeatures:null})},style:style,title:tooltip},/*#__PURE__*/React.createElement("span",null,label))});_defineProperty(_this,"renderGradient",function(sliderGeom){if(!_this.props.markersEnabled){return null}var left=_this.props.computePixelFromTime(_this.props.startTime);var right=_this.props.computePixelFromTime(_this.props.endTime);var style={left:left+"px",width:right-left+"px",height:sliderGeom.top+"px",background:"linear-gradient(90deg, "+_this.props.markerConfiguration.gradient.join(", ")+")"};return/*#__PURE__*/React.createElement("div",{className:"timeline-slider-gradient",style:style})});_defineProperty(_this,"setClassification",function(layer,attr){_this.setState(function(state){var newLayerClassifications=_objectSpread({},state.layerClassifications);if(attr){var classes={};_this.props.timeFeatures.features[layer].forEach(function(feature){if(!classes[feature.properties[attr]]){var color=randomcolor();classes[feature.properties[attr]]={bg:color,fg:MiscUtils.isBrightColor(color)?"#000":"#FFF",val:feature.properties[attr]}}});newLayerClassifications[layer]={attr:attr,classes:classes}}else{delete newLayerClassifications[layer]}// Attr classification and grouping cannot be enabled at the same time
|
|
9
|
+
var newLayerAttrGroups=_objectSpread({},state.layerAttrGroups);delete newLayerAttrGroups[layer];return{layerClassifications:newLayerClassifications,layerAttrGroups:newLayerAttrGroups}})});_defineProperty(_this,"setGroupAttr",function(layer,attr){_this.setState(function(state){var newLayerAttrGroups=_objectSpread({},state.layerAttrGroups);if(attr){var groups={};_this.props.timeFeatures.features[layer].forEach(function(feature){if(!groups[feature.properties[attr]]){var color=randomcolor();groups[feature.properties[attr]]={bg:color,fg:MiscUtils.isBrightColor(color)?"#000":"#FFF",val:feature.properties[attr],features:[feature],start:feature.properties.__startdate,end:feature.properties.__enddate}}else{if(feature.properties.__startdate<groups[feature.properties[attr]].start){groups[feature.properties[attr]].start=feature.properties.__startdate}if(feature.properties.__enddate>groups[feature.properties[attr]].end){groups[feature.properties[attr]].end=feature.properties.__enddate}groups[feature.properties[attr]].features.push(feature)}});newLayerAttrGroups[layer]={attr:attr,groups:groups}}else{delete newLayerAttrGroups[layer]}// Attr classification and grouping cannot be enabled at the same time
|
|
10
|
+
var newLayerClassifications=_objectSpread({},state.layerClassifications);delete newLayerClassifications[layer];return{layerClassifications:newLayerClassifications,layerAttrGroups:newLayerAttrGroups}})});return _this}_inherits(TimelineFeaturesSlider,_React$Component);return _createClass(TimelineFeaturesSlider,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps,prevState){var _this2=this;if(this.state.highlightFeatures!==prevState.highlightFeatures){if(!this.state.highlightFeatures){this.props.removeLayer("timelinefeathighlight")}else{var layer={id:"timelinefeathighlight",role:LayerRole.MARKER,rev:+new Date};this.props.addLayerFeatures(layer,this.state.highlightFeatures,true)}}if(this.props.timeFeatures!==prevProps.timeFeatures){var newLayerClassifications=_objectSpread({},this.state.layerClassifications);Object.keys(this.state.layerClassifications).forEach(function(layername){if(!_this2.props.timeFeatures.attributes[layername]||_this2.props.timeFeatures.attributes[layername]!==prevProps.timeFeatures.attributes[layername]){delete newLayerClassifications.layername}});this.setState(function(state){var newLayerAttrGroups=_objectSpread({},state.layerAttrGroups);Object.keys(state.layerAttrGroups).forEach(function(layername){if(!_this2.props.timeFeatures.attributes[layername]||_this2.props.timeFeatures.attributes[layername]!==prevProps.timeFeatures.attributes[layername]){delete newLayerAttrGroups.layername}});return{layerAttrGroups:newLayerAttrGroups}})}}},{key:"render",value:function render(){var timestamp=this.state.currentTimestampDrag?this.state.currentTimestampDrag.time:this.props.currentTimestamp;var sliderGeom={top:5};return/*#__PURE__*/React.createElement("div",{className:"timeline-slider-container"},/*#__PURE__*/React.createElement("div",{className:"timeline-slider",onMouseDown:this.pickCurrentTimestamp},this.props.displayMode==="features"?this.renderTimeFeatures(sliderGeom):null,this.props.displayMode==="layers"?this.renderTimeLayers(sliderGeom):null,this.renderGradient(sliderGeom)),this.renderCursor(timestamp),this.props.timeFeatures.pendingRequests>0?/*#__PURE__*/React.createElement("div",{className:"timeline-slider-loading"},/*#__PURE__*/React.createElement(Spinner,null),/*#__PURE__*/React.createElement("span",null,LocaleUtils.tr("timemanager.loading"))):null)}}])}(React.Component);_defineProperty(TimelineFeaturesSlider,"propTypes",{addLayerFeatures:PropTypes.func,computePixelFromTime:PropTypes.func,computeTimeFromPixel:PropTypes.func,currentTimestamp:PropTypes.number,cursorFormat:PropTypes.string,dateFormat:PropTypes.string,displayMode:PropTypes.string,endTime:PropTypes.object,markerConfiguration:PropTypes.object,markersEnabled:PropTypes.bool,removeLayer:PropTypes.func,startTime:PropTypes.object,stepSizeUnit:PropTypes.string,timeEnabled:PropTypes.bool,timeFeatures:PropTypes.object,timestampChanged:PropTypes.func});export default connect(function(){return{}},{addLayerFeatures:addLayerFeatures,removeLayer:removeLayer})(TimelineFeaturesSlider);
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
div.fixtimeline {
|
|
2
|
+
padding: 0.25em;
|
|
3
|
+
height: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
border: 1px solid var(--border-color);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
div.fixtimeline-toolbar {
|
|
10
|
+
display: flex;
|
|
11
|
+
font-size: 70%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
div.fixtimeline-toolbar-spacer {
|
|
15
|
+
flex: 1 1 auto;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
div.fixtimeline-slider {
|
|
19
|
+
position: relative;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
button.fixtimeline-pan-left,
|
|
23
|
+
button.fixtimeline-pan-right {
|
|
24
|
+
position: absolute;
|
|
25
|
+
bottom: 0;
|
|
26
|
+
top: 0;
|
|
27
|
+
width: 1.5em;
|
|
28
|
+
height: initial;
|
|
29
|
+
z-index: 1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
button.fixtimeline-pan-left {
|
|
33
|
+
left: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
button.fixtimeline-pan-right {
|
|
37
|
+
right: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
div.fixtimeline-ticks {
|
|
41
|
+
margin-top: 2em;
|
|
42
|
+
position: relative;
|
|
43
|
+
height: 10px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
div.fixtimeline-ticks > span.fixtimeline-ltick {
|
|
47
|
+
position: absolute;
|
|
48
|
+
display: inline-block;
|
|
49
|
+
width: 2px;
|
|
50
|
+
height: 100%;
|
|
51
|
+
background-color: black;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
div.fixtimeline-ticks > span.fixtimeline-ltick > span {
|
|
55
|
+
position: absolute;
|
|
56
|
+
width: 10em;
|
|
57
|
+
text-align: center;
|
|
58
|
+
white-space: pre;
|
|
59
|
+
font-size: 70%;
|
|
60
|
+
left: -5em;
|
|
61
|
+
top: -2.5em;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
div.fixtimeline-ticks > span.fixtimeline-tick {
|
|
65
|
+
position: absolute;
|
|
66
|
+
display: inline-block;
|
|
67
|
+
width: 2px;
|
|
68
|
+
height: 50%;
|
|
69
|
+
bottom: 0;
|
|
70
|
+
background-color: gray;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
div.fixtimeline-ticks > span.fixtimeline-ltick:first-child,
|
|
74
|
+
div.fixtimeline-ticks > span.fixtimeline-ltick:last-child {
|
|
75
|
+
display: none;
|
|
76
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
div.inftimeline {
|
|
2
|
+
padding: 0 0.25em 0.25em 0.25em;
|
|
3
|
+
height: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
border: 1px solid var(--border-color);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
div.inftimeline-toolbar {
|
|
10
|
+
display: flex;
|
|
11
|
+
font-size: 75%;
|
|
12
|
+
align-items: center;
|
|
13
|
+
flex: 0 0 auto;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
div.inftimeline-toolbar-block {
|
|
17
|
+
margin-left: 1em;
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
div.inftimeline-toolbar-block > input,
|
|
23
|
+
div.inftimeline-toolbar-block > div.ToggleSwitch
|
|
24
|
+
{
|
|
25
|
+
width: 6em;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
div.inftimeline-toolbar-spacer {
|
|
29
|
+
flex: 1 1 auto;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
div.inftimeline-clip {
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
position: relative;
|
|
35
|
+
flex: 0 0 auto;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
div.inftimeline-ticks {
|
|
39
|
+
margin: 2em 0.25em 0 0.25em;
|
|
40
|
+
position: relative;
|
|
41
|
+
height: 10px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
div.inftimeline-ticks > span.inftimeline-ltick {
|
|
46
|
+
position: absolute;
|
|
47
|
+
display: inline-block;
|
|
48
|
+
width: 2px;
|
|
49
|
+
height: 100%;
|
|
50
|
+
background-color: black;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
div.inftimeline-ticks > span.inftimeline-ltick > span {
|
|
54
|
+
position: absolute;
|
|
55
|
+
width: 10em;
|
|
56
|
+
text-align: center;
|
|
57
|
+
white-space: pre;
|
|
58
|
+
font-size: 70%;
|
|
59
|
+
left: -5em;
|
|
60
|
+
top: -2.5em;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
div.inftimeline-ticks > span.inftimeline-tick {
|
|
64
|
+
position: absolute;
|
|
65
|
+
display: inline-block;
|
|
66
|
+
width: 2px;
|
|
67
|
+
height: 50%;
|
|
68
|
+
bottom: 0;
|
|
69
|
+
background-color: gray;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
button.inftimeline-pan-left,
|
|
73
|
+
button.inftimeline-pan-right {
|
|
74
|
+
position: absolute;
|
|
75
|
+
bottom: 0;
|
|
76
|
+
top: 0;
|
|
77
|
+
width: 1.5em;
|
|
78
|
+
height: initial;
|
|
79
|
+
z-index: 1;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
button.inftimeline-pan-left:disabled,
|
|
83
|
+
button.inftimeline-pan-right:disabled {
|
|
84
|
+
color: var(--text-color-disabled);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
button.inftimeline-pan-left {
|
|
89
|
+
left: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
button.inftimeline-pan-right {
|
|
93
|
+
right: 0;
|
|
94
|
+
}
|