@geode/opengeodeweb-front 10.34.0-rc.3 → 10.34.0-rc.5
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/README.md +8 -0
- package/app/assets/{geode_objects.js → geode_objects.ts} +8 -1
- package/app/components/ActionButton.vue +28 -12
- package/app/components/Basic/Slider.vue +2 -2
- package/app/components/Basic/Switch.vue +2 -2
- package/app/components/CameraManager/List.vue +9 -9
- package/app/components/CameraManager/Saver.vue +8 -2
- package/app/components/CameraManager.vue +20 -10
- package/app/components/CameraOrientation.vue +29 -15
- package/app/components/ClippingPlaneCard.vue +11 -12
- package/app/components/ClippingPlanes.vue +25 -15
- package/app/components/CrsSelector.vue +24 -15
- package/app/components/DeleteDialog.vue +16 -16
- package/app/components/DragAndDrop.vue +53 -33
- package/app/components/DragAndDropInternal/DragAndDropInline.vue +29 -16
- package/app/components/DragAndDropInternal/DragAndDropOverlay.vue +32 -19
- package/app/components/ExtensionSelector.vue +32 -16
- package/app/components/FeedBack/ErrorBanner.vue +1 -2
- package/app/components/FeedBack/Snackers.vue +3 -3
- package/app/components/FetchingData.vue +8 -12
- package/app/components/FileSelector.vue +20 -12
- package/app/components/FileUploader.vue +45 -24
- package/app/components/GlassCard.vue +16 -12
- package/app/components/HybridRenderingView.vue +22 -11
- package/app/components/HybridViewerTooltip.vue +24 -22
- package/app/components/InfraConnected.vue +1 -1
- package/app/components/Launcher.vue +11 -9
- package/app/components/Loading/EcoMessages.vue +16 -11
- package/app/components/Loading/Header.vue +6 -7
- package/app/components/Loading/Progress.vue +6 -7
- package/app/components/Loading.vue +8 -12
- package/app/components/MissingFilesSelector.vue +29 -15
- package/app/components/ObjectSelector.vue +33 -18
- package/app/components/PackagesVersions.vue +14 -7
- package/app/components/Recaptcha.vue +16 -22
- package/app/components/RemoteRenderingView.vue +16 -9
- package/app/components/Ruler.vue +8 -6
- package/app/components/Screenshot.vue +19 -13
- package/app/components/SearchBar.vue +10 -6
- package/app/components/ShrinkFilter.vue +12 -7
- package/app/components/Step.vue +30 -11
- package/app/components/Stepper.vue +18 -7
- package/app/components/ToolPanel.vue +25 -12
- package/app/components/ViewToolbar.vue +33 -21
- package/app/components/Viewer/ContextMenu/CenterButton.vue +14 -9
- package/app/components/Viewer/ContextMenu/CircularItems.vue +13 -10
- package/app/components/Viewer/ContextMenu/ContextMenu.vue +25 -20
- package/app/components/Viewer/ContextMenu/ContextMenuItem.vue +21 -9
- package/app/components/Viewer/ContextMenu/InfoCard.vue +31 -14
- package/app/components/Viewer/EdgedCurve/PointsOptions.vue +8 -5
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +59 -36
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +67 -39
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +61 -38
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +43 -27
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +84 -40
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +67 -38
- package/app/components/Viewer/Generic/Model/BlocksOptions.vue +101 -35
- package/app/components/Viewer/Generic/Model/CornersOptions.vue +67 -27
- package/app/components/Viewer/Generic/Model/EdgesOptions.vue +14 -8
- package/app/components/Viewer/Generic/Model/LinesOptions.vue +96 -43
- package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +24 -12
- package/app/components/Viewer/Generic/Model/ModelStyleOptions.vue +10 -5
- package/app/components/Viewer/Generic/Model/PointsOptions.vue +16 -10
- package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +105 -31
- package/app/components/Viewer/Grid/2D/CellsOptions.vue +8 -5
- package/app/components/Viewer/Grid/2D/EdgesOptions.vue +8 -5
- package/app/components/Viewer/Grid/2D/PointsOptions.vue +8 -5
- package/app/components/Viewer/Grid/3D/CellsOptions.vue +8 -5
- package/app/components/Viewer/Grid/3D/EdgesOptions.vue +8 -5
- package/app/components/Viewer/Grid/3D/FacetsOptions.vue +8 -5
- package/app/components/Viewer/Grid/3D/PointsOptions.vue +8 -5
- package/app/components/Viewer/ObjectTree/Base/CommonTreeView.vue +63 -37
- package/app/components/Viewer/ObjectTree/Base/Controls.vue +24 -9
- package/app/components/Viewer/ObjectTree/Base/ItemLabel.vue +35 -14
- package/app/components/Viewer/ObjectTree/Base/StickyHeader.vue +22 -9
- package/app/components/Viewer/ObjectTree/Base/TreeRow.vue +26 -11
- package/app/components/Viewer/ObjectTree/Box.vue +30 -15
- package/app/components/Viewer/ObjectTree/Layout.vue +43 -25
- package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +59 -30
- package/app/components/Viewer/ObjectTree/Views/ModelCollections.vue +76 -30
- package/app/components/Viewer/ObjectTree/Views/ModelComponents.vue +86 -34
- package/app/components/Viewer/Options/AttributeColorBar.vue +12 -6
- package/app/components/Viewer/Options/AttributeRangeSelector.vue +6 -4
- package/app/components/Viewer/Options/AttributeSelector.vue +61 -28
- package/app/components/Viewer/Options/ColorMapList.vue +44 -18
- package/app/components/Viewer/Options/ColorMapPicker.vue +12 -8
- package/app/components/Viewer/Options/ColorPicker.vue +20 -13
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +77 -57
- package/app/components/Viewer/Options/ColormapQuickPicker.vue +10 -8
- package/app/components/Viewer/Options/OptionsSection.vue +6 -4
- package/app/components/Viewer/Options/Sliders/Size.vue +3 -3
- package/app/components/Viewer/Options/Sliders/Slider.vue +9 -6
- package/app/components/Viewer/Options/Sliders/Width.vue +3 -3
- package/app/components/Viewer/Options/TextureItem.vue +24 -19
- package/app/components/Viewer/Options/TexturesSelector.vue +23 -12
- package/app/components/Viewer/Options/VisibilitySwitch.vue +3 -3
- package/app/components/Viewer/OverlappingObjectsPicker.vue +28 -12
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +41 -25
- package/app/components/Viewer/Solid/EdgesOptions.vue +8 -5
- package/app/components/Viewer/Solid/PointsOptions.vue +8 -5
- package/app/components/Viewer/Solid/PolygonsOptions.vue +8 -5
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +66 -37
- package/app/components/Viewer/Surface/EdgesOptions.vue +8 -5
- package/app/components/Viewer/Surface/PointsOptions.vue +8 -5
- package/app/components/Viewer/Surface/PolygonsOptions.vue +72 -38
- package/app/components/Viewer/Surface/Triangulated/TrianglesOptions.vue +8 -5
- package/app/components/Viewer/TetrahedralSolid/TetrahedraOptions.vue +8 -5
- package/app/components/Viewer/TetrahedralSolid/TrianglesOptions.vue +8 -5
- package/app/components/Viewer/Ui.vue +18 -13
- package/app/components/Wrapper.vue +18 -9
- package/app/components/ZScaling.vue +15 -9
- package/app/components/csv-preview/CsvPreviewer.vue +38 -17
- package/app/components/csv-preview/CsvSettings.vue +26 -48
- package/app/components/csv-preview/CsvTable.vue +34 -14
- package/app/composables/{batch_style.js → batch_style.ts} +4 -1
- package/app/composables/{clipping_planes_widget.js → clipping_planes_widget.ts} +105 -42
- package/app/composables/{global_attribute_style.js → global_attribute_style.ts} +72 -30
- package/app/composables/{hover_highlight.js → hover_highlight.ts} +16 -12
- package/app/composables/{model_collections.js → model_collections.ts} +10 -4
- package/app/composables/{model_components.js → model_components.ts} +10 -4
- package/app/composables/{project_manager.js → project_manager.ts} +1 -1
- package/app/composables/{responsive_middle_truncate.js → responsive_middle_truncate.ts} +15 -1
- package/app/composables/{run_function_when_microservices_connected.js → run_function_when_microservices_connected.ts} +1 -1
- package/app/composables/{stepper_tree.js → stepper_tree.ts} +10 -10
- package/app/composables/{tree_filter.js → tree_filter.ts} +49 -15
- package/app/composables/{tree_keyboard_nav.js → tree_keyboard_nav.ts} +44 -16
- package/app/composables/{tree_scroll.js → tree_scroll.ts} +26 -7
- package/app/composables/{use_adaptive_styles.js → use_adaptive_styles.ts} +39 -15
- package/app/composables/{use_overlapping_picker.js → use_overlapping_picker.ts} +58 -14
- package/app/composables/{use_quick_colormap.js → use_quick_colormap.ts} +15 -3
- package/app/composables/{virtual_tree.js → virtual_tree.ts} +69 -21
- package/app/plugins/{auto_store_register.js → auto_store_register.ts} +4 -1
- package/app/stores/{app.js → app.ts} +98 -37
- package/app/stores/{back.js → back.ts} +26 -16
- package/app/stores/camera_manager.ts +78 -0
- package/app/stores/{cloud.js → cloud.ts} +5 -4
- package/app/stores/{data.js → data.ts} +110 -37
- package/app/stores/data_helpers/collections.ts +140 -0
- package/app/stores/data_helpers/mesh.ts +160 -0
- package/app/stores/{data_style.js → data_style.ts} +39 -10
- package/app/stores/{feedback.js → feedback.ts} +16 -5
- package/app/stores/{hybrid_viewer.js → hybrid_viewer.ts} +29 -14
- package/app/stores/{infra.js → infra.ts} +18 -9
- package/app/stores/{menu.js → menu.ts} +54 -32
- package/app/stores/{treeview.js → treeview.ts} +108 -45
- package/app/stores/{viewer.js → viewer.ts} +45 -24
- package/app/utils/attributes.ts +40 -0
- package/app/utils/{clipping_planes.js → clipping_planes.ts} +30 -15
- package/app/utils/{colormap.js → colormap.ts} +29 -14
- package/app/utils/default_styles/{constants.js → constants.ts} +25 -12
- package/app/utils/default_styles/{index.js → index.ts} +3 -2
- package/app/utils/default_styles/{meshes.js → meshes.ts} +27 -48
- package/app/utils/default_styles/{models.js → models.ts} +25 -40
- package/app/utils/{extension.js → extension.ts} +27 -10
- package/app/utils/{import_workflow.js → import_workflow.ts} +32 -18
- package/app/utils/{log.js → log.ts} +12 -2
- package/app/utils/{name_cleaner.js → name_cleaner.ts} +5 -5
- package/app/utils/status.ts +19 -0
- package/app/utils/{stores.js → stores.ts} +5 -5
- package/app/utils/{string.js → string.ts} +5 -5
- package/app/utils/{treeview.js → treeview.ts} +4 -1
- package/internal/database/{base_database.js → base_database.ts} +2 -2
- package/internal/database/{database.js → database.ts} +30 -18
- package/internal/database/{extended_database.js → extended_database.ts} +5 -1
- package/internal/database/tables/camera_positions.ts +6 -0
- package/internal/database/tables/{data.js → data.ts} +3 -1
- package/internal/database/tables/data_style.ts +6 -0
- package/internal/database/tables/model_component_datastyle.ts +6 -0
- package/internal/database/tables/model_component_type_datastyle.ts +6 -0
- package/internal/database/tables/model_components.ts +6 -0
- package/internal/database/tables/model_components_relation.ts +6 -0
- package/internal/database/tables/table_definition.ts +5 -0
- package/internal/stores/data_style/mesh/cells/{cell.js → cell.ts} +83 -36
- package/internal/stores/data_style/mesh/cells/{color.js → color.ts} +2 -2
- package/internal/stores/data_style/mesh/cells/{common.js → common.ts} +8 -7
- package/internal/stores/data_style/mesh/cells/{index.js → index.ts} +5 -5
- package/internal/stores/data_style/mesh/cells/{textures.js → textures.ts} +3 -3
- package/internal/stores/data_style/mesh/cells/{vertex.js → vertex.ts} +79 -28
- package/internal/stores/data_style/mesh/cells/{visibility.js → visibility.ts} +3 -3
- package/internal/stores/data_style/mesh/edges/{color.js → color.ts} +2 -2
- package/internal/stores/data_style/mesh/edges/{common.js → common.ts} +7 -6
- package/internal/stores/data_style/mesh/edges/{edge.js → edge.ts} +81 -29
- package/internal/stores/data_style/mesh/edges/{index.js → index.ts} +5 -6
- package/internal/stores/data_style/mesh/edges/{vertex.js → vertex.ts} +81 -29
- package/internal/stores/data_style/mesh/edges/{visibility.js → visibility.ts} +3 -3
- package/internal/stores/data_style/mesh/edges/{width.js → width.ts} +3 -3
- package/internal/stores/data_style/mesh/{index.js → index.ts} +9 -8
- package/internal/stores/data_style/mesh/points/{color.js → color.ts} +2 -2
- package/internal/stores/data_style/mesh/points/{common.js → common.ts} +8 -7
- package/internal/stores/data_style/mesh/points/{index.js → index.ts} +5 -5
- package/internal/stores/data_style/mesh/points/{size.js → size.ts} +3 -3
- package/internal/stores/data_style/mesh/points/{vertex.js → vertex.ts} +79 -28
- package/internal/stores/data_style/mesh/points/{visibility.js → visibility.ts} +7 -5
- package/internal/stores/data_style/mesh/polygons/{color.js → color.ts} +2 -2
- package/internal/stores/data_style/mesh/polygons/{common.js → common.ts} +7 -6
- package/internal/stores/data_style/mesh/polygons/{index.js → index.ts} +5 -5
- package/internal/stores/data_style/mesh/polygons/{polygon.js → polygon.ts} +81 -29
- package/internal/stores/data_style/mesh/polygons/{textures.js → textures.ts} +3 -3
- package/internal/stores/data_style/mesh/polygons/{vertex.js → vertex.ts} +81 -29
- package/internal/stores/data_style/mesh/polygons/{visibility.js → visibility.ts} +3 -3
- package/internal/stores/data_style/mesh/polyhedra/{color.js → color.ts} +2 -2
- package/internal/stores/data_style/mesh/polyhedra/{common.js → common.ts} +7 -6
- package/internal/stores/data_style/mesh/polyhedra/{index.js → index.ts} +5 -5
- package/internal/stores/data_style/mesh/polyhedra/{polyhedron.js → polyhedron.ts} +86 -29
- package/internal/stores/data_style/mesh/polyhedra/{vertex.js → vertex.ts} +81 -29
- package/internal/stores/data_style/mesh/polyhedra/{visibility.js → visibility.ts} +3 -3
- package/internal/stores/data_style/model/blocks/{color.js → color.ts} +18 -6
- package/internal/stores/data_style/model/blocks/{common.js → common.ts} +9 -8
- package/internal/stores/data_style/model/blocks/{index.js → index.ts} +26 -11
- package/internal/stores/data_style/model/blocks/{polyhedron.js → polyhedron.ts} +121 -30
- package/internal/stores/data_style/model/blocks/{vertex.js → vertex.ts} +110 -30
- package/internal/stores/data_style/model/blocks/{visibility.js → visibility.ts} +6 -2
- package/internal/stores/data_style/model/{color.js → color.ts} +70 -28
- package/internal/stores/data_style/model/common.ts +216 -0
- package/internal/stores/data_style/model/corners/{color.js → color.ts} +18 -6
- package/internal/stores/data_style/model/corners/{common.js → common.ts} +9 -8
- package/internal/stores/data_style/model/corners/{index.js → index.ts} +24 -10
- package/internal/stores/data_style/model/corners/{vertex.js → vertex.ts} +115 -35
- package/internal/stores/data_style/model/corners/{visibility.js → visibility.ts} +6 -2
- package/internal/stores/data_style/model/edges/{common.js → common.ts} +4 -3
- package/internal/stores/data_style/model/edges/{index.js → index.ts} +0 -6
- package/internal/stores/data_style/model/edges/{visibility.js → visibility.ts} +4 -4
- package/internal/stores/data_style/model/{index.js → index.ts} +4 -4
- package/internal/stores/data_style/model/lines/{color.js → color.ts} +18 -6
- package/internal/stores/data_style/model/lines/{common.js → common.ts} +9 -8
- package/internal/stores/data_style/model/lines/{edge.js → edge.ts} +107 -30
- package/internal/stores/data_style/model/lines/{index.js → index.ts} +26 -11
- package/internal/stores/data_style/model/lines/{vertex.js → vertex.ts} +107 -30
- package/internal/stores/data_style/model/lines/{visibility.js → visibility.ts} +6 -2
- package/internal/stores/data_style/model/points/{common.js → common.ts} +4 -3
- package/internal/stores/data_style/model/points/{index.js → index.ts} +6 -3
- package/internal/stores/data_style/model/points/{size.js → size.ts} +3 -3
- package/internal/stores/data_style/model/points/{visibility.js → visibility.ts} +3 -3
- package/internal/stores/data_style/model/selection.ts +116 -0
- package/internal/stores/data_style/model/surfaces/{color.js → color.ts} +18 -6
- package/internal/stores/data_style/model/surfaces/{common.js → common.ts} +9 -8
- package/internal/stores/data_style/model/surfaces/{index.js → index.ts} +28 -11
- package/internal/stores/data_style/model/surfaces/{polygon.js → polygon.ts} +122 -30
- package/internal/stores/data_style/model/surfaces/{vertex.js → vertex.ts} +122 -30
- package/internal/stores/data_style/model/surfaces/{visibility.js → visibility.ts} +6 -2
- package/internal/stores/data_style/model/{visibility.js → visibility.ts} +38 -20
- package/internal/stores/data_style/state.ts +269 -0
- package/internal/stores/data_style/types.ts +30 -0
- package/internal/stores/hybrid_viewer/{brightness.js → brightness.ts} +35 -11
- package/internal/stores/hybrid_viewer/{camera.js → camera.ts} +90 -52
- package/internal/stores/hybrid_viewer/{camera_animation.js → camera_animation.ts} +27 -10
- package/internal/stores/hybrid_viewer/{constants.js → constants.ts} +2 -2
- package/internal/stores/hybrid_viewer/{filters.js → filters.ts} +9 -6
- package/internal/stores/hybrid_viewer/{highlight.js → highlight.ts} +81 -29
- package/internal/stores/hybrid_viewer/{ruler.js → ruler.ts} +38 -19
- package/internal/stores/hybrid_viewer/{scene.js → scene.ts} +39 -29
- package/internal/stores/hybrid_viewer/viewport.ts +168 -0
- package/internal/stores/hybrid_viewer/vtk_types.ts +74 -0
- package/internal/utils/api_fetch.ts +102 -0
- package/internal/utils/upload_file.ts +94 -0
- package/internal/utils/viewer_call.ts +90 -0
- package/internal/utils/ws_client.ts +43 -0
- package/{nuxt.config.js → nuxt.config.ts} +6 -1
- package/opengeodeweb_front_schemas.js +175 -0
- package/package.json +32 -8
- package/server/api/cloud/extensions/{run.post.js → run.post.ts} +17 -9
- package/server/api/local/app/{project_folder_path.post.js → project_folder_path.post.ts} +7 -3
- package/server/api/local/app/{run_back.post.js → run_back.post.ts} +12 -4
- package/server/api/local/app/{run_viewer.post.js → run_viewer.post.ts} +12 -4
- package/server/api/local/extensions/{kill.post.js → kill.post.ts} +12 -6
- package/server/api/local/extensions/{run.post.js → run.post.ts} +17 -9
- package/server/api/local/extensions/{upload.put.js → upload.put.ts} +13 -4
- package/server/api/microservice/app/{get_is_app_ready.get.js → get_is_app_ready.get.ts} +4 -3
- package/server/api/microservice/app/{set_app_base_url.post.js → set_app_base_url.post.ts} +9 -4
- package/server/api/microservice/app/{set_back_base_url.post.js → set_back_base_url.post.ts} +9 -4
- package/server/api/microservice/app/{set_is_app_ready.post.js → set_is_app_ready.post.ts} +9 -4
- package/server/api/microservice/app/{set_viewer_base_url.post.js → set_viewer_base_url.post.ts} +9 -4
- package/server/api/microservice/extensions/{download.post.js → download.post.ts} +9 -3
- package/server/api/serverless/{run_cloud.post.js → run_cloud.post.ts} +13 -7
- package/server/types/vendor.d.ts +64 -0
- package/server/utils/app_config.js +34 -64
- package/server/utils/app_config.ts +96 -0
- package/server/utils/cleanup.js +97 -148
- package/server/utils/cleanup.ts +189 -0
- package/server/utils/cloud.js +103 -149
- package/server/utils/cloud.ts +219 -0
- package/server/utils/{extension.js → extension.ts} +17 -4
- package/server/utils/microservices.js +126 -159
- package/server/utils/microservices.ts +206 -0
- package/server/utils/path.js +88 -134
- package/server/utils/path.ts +173 -0
- package/server/utils/scripts.js +116 -164
- package/server/utils/scripts.ts +195 -0
- package/server/utils/server.js +34 -50
- package/server/utils/server.ts +67 -0
- package/server/utils/server_config.js +23 -38
- package/server/utils/server_config.ts +60 -0
- package/server/utils/ws_client.js +81 -106
- package/server/utils/ws_client.ts +134 -0
- package/shared/app_mode.js +5 -4
- package/shared/app_mode.ts +7 -0
- package/shared/scripts.js +37 -32
- package/shared/scripts.ts +44 -0
- package/shared/utils/call_raw.js +25 -41
- package/shared/utils/call_raw.ts +66 -0
- package/shared/utils/call_schema.js +24 -41
- package/shared/utils/call_schema.ts +57 -0
- package/shared/utils/fetch_raw.js +36 -57
- package/shared/utils/fetch_raw.ts +85 -0
- package/shared/utils/fetch_schema.js +27 -44
- package/shared/utils/fetch_schema.ts +61 -0
- package/shared/utils/file.js +6 -10
- package/shared/utils/file.ts +16 -0
- package/shared/utils/parse_boolean.js +20 -13
- package/shared/utils/parse_boolean.ts +16 -0
- package/shared/utils/response_handlers/load.js +39 -66
- package/shared/utils/response_handlers/load.ts +94 -0
- package/shared/utils/types.js +1 -0
- package/shared/utils/types.ts +27 -0
- package/shared/utils/validate_schema.js +13 -9
- package/shared/utils/validate_schema.ts +15 -0
- package/.github/workflows/config.json +0 -5
- package/.github/workflows/deploy.yml +0 -15
- package/.github/workflows/manual_release.yml +0 -11
- package/.github/workflows/merge_request.yml +0 -9
- package/.github/workflows/pr_update.yml +0 -11
- package/.github/workflows/prepare_deploy.yml +0 -9
- package/.github/workflows/schedule.yml +0 -18
- package/.github/workflows/test.yml +0 -14
- package/.github/workflows/test_pr.yml +0 -12
- package/.oxlintrc.json +0 -150
- package/.releaserc +0 -11
- package/app/stores/camera_manager.js +0 -57
- package/app/stores/data_helpers/collections.js +0 -96
- package/app/stores/data_helpers/mesh.js +0 -122
- package/app/utils/attributes.js +0 -23
- package/app/utils/status.js +0 -10
- package/commitlint.config.js +0 -20
- package/internal/database/tables/camera_positions.js +0 -4
- package/internal/database/tables/data_style.js +0 -4
- package/internal/database/tables/model_component_datastyle.js +0 -4
- package/internal/database/tables/model_component_type_datastyle.js +0 -4
- package/internal/database/tables/model_components.js +0 -4
- package/internal/database/tables/model_components_relation.js +0 -4
- package/internal/stores/data_style/model/common.js +0 -141
- package/internal/stores/data_style/model/selection.js +0 -89
- package/internal/stores/data_style/state.js +0 -197
- package/internal/stores/hybrid_viewer/viewport.js +0 -140
- package/internal/utils/api_fetch.js +0 -52
- package/internal/utils/upload_file.js +0 -57
- package/internal/utils/viewer_call.js +0 -49
- package/internal/utils/ws_client.js +0 -29
- package/scripts/generate_geode_objects.js +0 -24
- package/tests/integration/data/uploads/test.og_brep +0 -0
- package/tests/integration/data/uploads/test.og_edc2d +0 -0
- package/tests/integration/data/uploads/test.og_edc3d +0 -0
- package/tests/integration/data/uploads/test.og_psf3d +0 -0
- package/tests/integration/data/uploads/test.og_rgd2d +0 -0
- package/tests/integration/data/uploads/test.og_rgd3d +0 -0
- package/tests/integration/data/uploads/test.vtu +0 -22
- package/tests/integration/setup.js +0 -92
- package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +0 -343
- package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +0 -254
- package/tests/integration/stores/data_style/mesh/index.nuxt.test.js +0 -62
- package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +0 -201
- package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +0 -260
- package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +0 -267
- package/tests/integration/stores/data_style/model/blocks.nuxt.test.js +0 -397
- package/tests/integration/stores/data_style/model/corners.nuxt.test.js +0 -264
- package/tests/integration/stores/data_style/model/edges.nuxt.test.js +0 -71
- package/tests/integration/stores/data_style/model/index.nuxt.test.js +0 -92
- package/tests/integration/stores/data_style/model/lines.nuxt.test.js +0 -379
- package/tests/integration/stores/data_style/model/points.nuxt.test.js +0 -95
- package/tests/integration/stores/data_style/model/surfaces.nuxt.test.js +0 -574
- package/tests/integration/stores/viewer.nuxt.test.js +0 -69
- package/tests/setup_indexeddb.js +0 -4
- package/tests/unit/components/CrsSelector.nuxt.test.js +0 -55
- package/tests/unit/components/DragAndDrop.nuxt.test.js +0 -89
- package/tests/unit/components/ExtensionSelector.nuxt.test.js +0 -65
- package/tests/unit/components/FeedBack/ErrorsBanner.nuxt.test.js +0 -41
- package/tests/unit/components/FeedBack/Snackers.nuxt.test.js +0 -49
- package/tests/unit/components/FileSelector.nuxt.test.js +0 -124
- package/tests/unit/components/FileUploader.nuxt.test.js +0 -69
- package/tests/unit/components/MissingFilesSelector.nuxt.test.js +0 -77
- package/tests/unit/components/ObjectSelector.nuxt.test.js +0 -118
- package/tests/unit/components/PackagesVersions.nuxt.test.js +0 -42
- package/tests/unit/components/Step.nuxt.test.js +0 -51
- package/tests/unit/components/Stepper.nuxt.test.js +0 -41
- package/tests/unit/components/ToolPanel.nuxt.test.js +0 -66
- package/tests/unit/composables/api_fetch.nuxt.test.js +0 -75
- package/tests/unit/composables/project_manager.nuxt.test.js +0 -299
- package/tests/unit/composables/run_function_when_microservices_connected.nuxt.test.js +0 -57
- package/tests/unit/composables/upload_file.nuxt.test.js +0 -45
- package/tests/unit/composables/virtual_tree.nuxt.test.js +0 -63
- package/tests/unit/plugins/project_load.nuxt.test.js +0 -98
- package/tests/unit/stores/app.nuxt.test.js +0 -189
- package/tests/unit/stores/back.nuxt.test.js +0 -147
- package/tests/unit/stores/cloud.nuxt.test.js +0 -90
- package/tests/unit/stores/data.nuxt.test.js +0 -162
- package/tests/unit/stores/feedback.nuxt.test.js +0 -90
- package/tests/unit/stores/infra.nuxt.test.js +0 -313
- package/tests/unit/stores/treeview.nuxt.test.js +0 -63
- package/tests/unit/stores/viewer.nuxt.test.js +0 -161
- package/tests/unit/utils/validate_schema.nuxt.test.js +0 -38
- package/tests/utils.js +0 -20
- package/tests/vitest.config.js +0 -67
- /package/server/api/local/app/{kill.post.js → kill.post.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
# OpenGeodeWeb-Front
|
|
2
2
|
|
|
3
3
|
OpenSource Vue/Vuetify framework for web applications.
|
|
4
|
+
|
|
5
|
+
## Development
|
|
6
|
+
|
|
7
|
+
This codebase is written in TypeScript (`strict` mode, `noUncheckedIndexedAccess`).
|
|
8
|
+
|
|
9
|
+
- `npm run typecheck` — type-checks the app/server/shared code (via `nuxt typecheck`) and the tests/scripts code (via `tsc -p tsconfig.tests.json`), which live under separate `tsconfig.json` projects since Nuxt's own generated config only covers the former.
|
|
10
|
+
- `npm run lint` — runs [oxlint](https://oxc.rs/docs/guide/usage/linter.html) with autofix. The project's `.oxlintrc.json` must stay in sync with the shared [`Geode-solutions/actions`](https://github.com/Geode-solutions/actions) config, which CI re-downloads and enforces on every run.
|
|
11
|
+
- `npm run test:unit` / `npm run test:integration` — run the Vitest suites under `tests/`.
|
|
@@ -24,7 +24,12 @@ import TriangulatedSurface2D from "@ogw_front/assets/img/geode_objects/Triangula
|
|
|
24
24
|
import TriangulatedSurface3D from "@ogw_front/assets/img/geode_objects/TriangulatedSurface3D.svg";
|
|
25
25
|
import VertexSet from "@ogw_front/assets/img/geode_objects/VertexSet.svg";
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
interface GeodeObject {
|
|
28
|
+
tooltip: string;
|
|
29
|
+
image: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const geode_objects: Record<string, GeodeObject> = {
|
|
28
33
|
BRep: {
|
|
29
34
|
tooltip: "BRep",
|
|
30
35
|
image: BRep,
|
|
@@ -126,3 +131,5 @@ export const geode_objects = {
|
|
|
126
131
|
image: VertexSet,
|
|
127
132
|
},
|
|
128
133
|
};
|
|
134
|
+
|
|
135
|
+
export { geode_objects };
|
|
@@ -1,17 +1,33 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
const DEFAULT_ICON_SIZE = 28;
|
|
3
|
-
const { icon, tooltip, color, size, variant, density, tooltipLocation, iconSize } = defineProps({
|
|
4
|
-
icon: { type: String, required: true },
|
|
5
|
-
tooltip: { type: String, required: true },
|
|
6
|
-
color: { type: String, default: undefined },
|
|
7
|
-
size: { type: [String, Number], default: undefined },
|
|
8
|
-
variant: { type: String, default: undefined },
|
|
9
|
-
density: { type: String, default: "comfortable" },
|
|
10
|
-
tooltipLocation: { type: String, default: "left" },
|
|
11
|
-
iconSize: { type: [String, Number], default: DEFAULT_ICON_SIZE },
|
|
12
|
-
});
|
|
13
3
|
|
|
14
|
-
|
|
4
|
+
interface Props {
|
|
5
|
+
icon: string;
|
|
6
|
+
tooltip: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
size?: string | number;
|
|
9
|
+
// Vuetify's variant/density accept narrow literal unions; kept loose here since
|
|
10
|
+
// Callers pass plain strings and this is only a typing widening, not a behavior change.
|
|
11
|
+
variant?: any;
|
|
12
|
+
density?: any;
|
|
13
|
+
tooltipLocation?: string;
|
|
14
|
+
iconSize?: string | number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const {
|
|
18
|
+
icon,
|
|
19
|
+
tooltip,
|
|
20
|
+
color = undefined,
|
|
21
|
+
size = undefined,
|
|
22
|
+
variant = undefined,
|
|
23
|
+
density = "comfortable",
|
|
24
|
+
tooltipLocation = "left",
|
|
25
|
+
iconSize = DEFAULT_ICON_SIZE,
|
|
26
|
+
} = defineProps<Props>();
|
|
27
|
+
|
|
28
|
+
const emit = defineEmits<{
|
|
29
|
+
click: [event: MouseEvent];
|
|
30
|
+
}>();
|
|
15
31
|
</script>
|
|
16
32
|
|
|
17
33
|
<template>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
import { useCameraManagerStore } from "@ogw_front/stores/camera_manager";
|
|
3
3
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
4
4
|
|
|
@@ -7,10 +7,10 @@ const hybridViewerStore = useHybridViewerStore();
|
|
|
7
7
|
|
|
8
8
|
const savedPositions = cameraManagerStore.refAllCameraPositions();
|
|
9
9
|
|
|
10
|
-
const editingId = ref(undefined);
|
|
10
|
+
const editingId = ref<number | undefined>(undefined);
|
|
11
11
|
const editingName = ref("");
|
|
12
12
|
|
|
13
|
-
async function restorePosition(positionId) {
|
|
13
|
+
async function restorePosition(positionId: number) {
|
|
14
14
|
const position = await cameraManagerStore.getCameraPosition(positionId);
|
|
15
15
|
if (position) {
|
|
16
16
|
if (hybridViewerStore.genericRenderWindow) {
|
|
@@ -21,17 +21,17 @@ async function restorePosition(positionId) {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
async function deletePosition(positionId) {
|
|
24
|
+
async function deletePosition(positionId: number) {
|
|
25
25
|
await cameraManagerStore.deleteCameraPosition(positionId);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
function startEditing(position) {
|
|
28
|
+
function startEditing(position: { id?: number; name?: string }) {
|
|
29
29
|
editingId.value = position.id;
|
|
30
|
-
editingName.value = position.name;
|
|
30
|
+
editingName.value = position.name ?? "";
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
async function saveRename() {
|
|
34
|
-
if (editingName.value) {
|
|
34
|
+
if (editingName.value && editingId.value !== undefined) {
|
|
35
35
|
await cameraManagerStore.renameCameraPosition(editingId.value, editingName.value);
|
|
36
36
|
}
|
|
37
37
|
editingId.value = undefined;
|
|
@@ -55,7 +55,7 @@ async function saveRename() {
|
|
|
55
55
|
size="x-small"
|
|
56
56
|
class="mr-1"
|
|
57
57
|
:data-testid="`restoreCameraPosition${position.name}Button`"
|
|
58
|
-
@click="restorePosition(position.id)"
|
|
58
|
+
@click="restorePosition(position.id!)"
|
|
59
59
|
>
|
|
60
60
|
<v-icon size="14">mdi-play</v-icon>
|
|
61
61
|
<v-tooltip activator="parent" location="top">Restore</v-tooltip>
|
|
@@ -94,7 +94,7 @@ async function saveRename() {
|
|
|
94
94
|
variant="text"
|
|
95
95
|
size="x-small"
|
|
96
96
|
color="error"
|
|
97
|
-
@click="deletePosition(position.id)"
|
|
97
|
+
@click="deletePosition(position.id!)"
|
|
98
98
|
>
|
|
99
99
|
<v-icon size="14">mdi-delete</v-icon>
|
|
100
100
|
<v-tooltip activator="parent" location="top">Delete</v-tooltip>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
// Not auto-fixable (eslint's sort-imports core rule has no autofixer) and this file's import order doesn't match its syntax-kind-then-alphabetical requirement - left as-is rather than manually reordered across the codebase for a purely cosmetic rule.
|
|
3
|
+
// oxlint-disable eslint/sort-imports
|
|
2
4
|
import { useCameraManagerStore } from "@ogw_front/stores/camera_manager";
|
|
3
5
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
6
|
+
import type { CameraOptions } from "@ogw_internal/stores/hybrid_viewer/vtk_types.js";
|
|
4
7
|
|
|
5
8
|
const cameraManagerStore = useCameraManagerStore();
|
|
6
9
|
const hybridViewerStore = useHybridViewerStore();
|
|
@@ -13,7 +16,10 @@ async function saveCurrentPosition() {
|
|
|
13
16
|
}
|
|
14
17
|
await cameraManagerStore.saveCameraPosition(
|
|
15
18
|
newPositionName.value,
|
|
16
|
-
|
|
19
|
+
// HybridViewerStore.camera_options is a loosely-typed reactive object (it's
|
|
20
|
+
// Populated dynamically from the viewer's camera state), but is always a
|
|
21
|
+
// CameraOptions shape at runtime once the viewer has synced a camera.
|
|
22
|
+
toRaw(hybridViewerStore.camera_options) as unknown as CameraOptions,
|
|
17
23
|
);
|
|
18
24
|
newPositionName.value = "";
|
|
19
25
|
}
|
|
@@ -1,15 +1,25 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import List from "@ogw_front/components/CameraManager/List";
|
|
3
|
-
import Saver from "@ogw_front/components/CameraManager/Saver";
|
|
4
|
-
import ToolPanel from "@ogw_front/components/ToolPanel";
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import List from "@ogw_front/components/CameraManager/List.vue";
|
|
3
|
+
import Saver from "@ogw_front/components/CameraManager/Saver.vue";
|
|
4
|
+
import ToolPanel from "@ogw_front/components/ToolPanel.vue";
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const DEFAULT_PANEL_WIDTH = 260;
|
|
7
7
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
const emit = defineEmits<{
|
|
9
|
+
close: [];
|
|
10
|
+
}>();
|
|
11
|
+
|
|
12
|
+
interface Props {
|
|
13
|
+
showDialog: boolean;
|
|
14
|
+
width?: number;
|
|
15
|
+
escapeFunction?: () => void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const {
|
|
19
|
+
showDialog,
|
|
20
|
+
width = DEFAULT_PANEL_WIDTH,
|
|
21
|
+
escapeFunction = undefined,
|
|
22
|
+
} = defineProps<Props>();
|
|
13
23
|
|
|
14
24
|
function handleClose() {
|
|
15
25
|
if (escapeFunction) {
|
|
@@ -1,18 +1,31 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
// Not auto-fixable (eslint's sort-imports core rule has no autofixer) and this file's import order doesn't match its syntax-kind-then-alphabetical requirement - left as-is rather than manually reordered across the codebase for a purely cosmetic rule.
|
|
3
|
+
// oxlint-disable eslint/sort-imports
|
|
4
|
+
import ToolPanel from "@ogw_front/components/ToolPanel.vue";
|
|
3
5
|
import { applyCameraOptions } from "@ogw_internal/stores/hybrid_viewer/camera";
|
|
4
6
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
7
|
+
import type { CameraOptions } from "@ogw_internal/stores/hybrid_viewer/vtk_types.js";
|
|
5
8
|
import { newInstance as vtkAnnotatedCubeActor } from "@kitware/vtk.js/Rendering/Core/AnnotatedCubeActor";
|
|
6
9
|
import { newInstance as vtkGenericRenderWindow } from "@kitware/vtk.js/Rendering/Misc/GenericRenderWindow";
|
|
7
10
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const DEFAULT_PANEL_WIDTH = 260;
|
|
12
|
+
|
|
13
|
+
interface Props {
|
|
14
|
+
panel?: boolean;
|
|
15
|
+
width?: number;
|
|
16
|
+
escapeFunction?: () => void;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const {
|
|
20
|
+
panel = false,
|
|
21
|
+
width = DEFAULT_PANEL_WIDTH,
|
|
22
|
+
escapeFunction = undefined,
|
|
23
|
+
} = defineProps<Props>();
|
|
13
24
|
|
|
14
|
-
const show = defineModel("show", {
|
|
15
|
-
const emit = defineEmits
|
|
25
|
+
const show = defineModel<boolean>("show", { default: false });
|
|
26
|
+
const emit = defineEmits<{
|
|
27
|
+
select: [value: string];
|
|
28
|
+
}>();
|
|
16
29
|
|
|
17
30
|
const orientations = [
|
|
18
31
|
{
|
|
@@ -65,12 +78,13 @@ const orientations = [
|
|
|
65
78
|
},
|
|
66
79
|
];
|
|
67
80
|
|
|
68
|
-
const hoveredFace = ref(undefined);
|
|
81
|
+
const hoveredFace = ref<string | undefined>(undefined);
|
|
69
82
|
const hybridViewerStore = useHybridViewerStore();
|
|
70
83
|
const cubeContainer = useTemplateRef("cubeContainer");
|
|
71
84
|
|
|
72
|
-
|
|
73
|
-
let
|
|
85
|
+
// VTK.js objects have no usable type declarations here; `any` is the pragmatic choice.
|
|
86
|
+
let genericRenderWindow: any = undefined;
|
|
87
|
+
let cubeActor: any = undefined;
|
|
74
88
|
let isInteracting = false;
|
|
75
89
|
|
|
76
90
|
function initVTK() {
|
|
@@ -100,7 +114,7 @@ function initVTK() {
|
|
|
100
114
|
edgeColor: "rgba(255, 255, 255, 0.4)",
|
|
101
115
|
edgeThickness: 0.1,
|
|
102
116
|
resolution: 400,
|
|
103
|
-
fontSizeScale: (resolution) => resolution / 4,
|
|
117
|
+
fontSizeScale: (resolution: number) => resolution / 4,
|
|
104
118
|
});
|
|
105
119
|
|
|
106
120
|
for (const orientation of orientations) {
|
|
@@ -124,7 +138,7 @@ function syncCubeCamera() {
|
|
|
124
138
|
return;
|
|
125
139
|
}
|
|
126
140
|
const camera = genericRenderWindow.getRenderer().getActiveCamera();
|
|
127
|
-
applyCameraOptions(camera, options);
|
|
141
|
+
applyCameraOptions(camera, options as unknown as CameraOptions);
|
|
128
142
|
genericRenderWindow.getRenderer().resetCamera();
|
|
129
143
|
genericRenderWindow.getRenderWindow().render();
|
|
130
144
|
}
|
|
@@ -151,7 +165,7 @@ watch(hoveredFace, (newFace, oldFace) => {
|
|
|
151
165
|
if (!cubeActor) {
|
|
152
166
|
return;
|
|
153
167
|
}
|
|
154
|
-
function updateFace(face, active) {
|
|
168
|
+
function updateFace(face: string | undefined, active: boolean) {
|
|
155
169
|
const config = orientations.find((orientation) => orientation.face === face);
|
|
156
170
|
if (config) {
|
|
157
171
|
cubeActor[`set${config.vtkKey}FaceProperty`]({
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
import { getPlaneCssColor } from "@ogw_front/utils/clipping_planes";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
plane: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
index: {
|
|
10
|
-
type: Number,
|
|
11
|
-
required: true,
|
|
12
|
-
},
|
|
13
|
-
});
|
|
4
|
+
interface Props {
|
|
5
|
+
plane: { origin?: number[]; normal: number[] };
|
|
6
|
+
index: number;
|
|
7
|
+
}
|
|
14
8
|
|
|
15
|
-
const
|
|
9
|
+
const { plane, index } = defineProps<Props>();
|
|
10
|
+
|
|
11
|
+
const emit = defineEmits<{
|
|
12
|
+
remove: [];
|
|
13
|
+
flipNormal: [];
|
|
14
|
+
}>();
|
|
16
15
|
</script>
|
|
17
16
|
|
|
18
17
|
<template>
|
|
@@ -1,28 +1,35 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
import { DEBOUNCE_DELAY, DEFAULT_NORMALS } from "@ogw_front/utils/clipping_planes";
|
|
3
|
-
import ClippingPlaneCard from "@ogw_front/components/ClippingPlaneCard";
|
|
4
|
-
import ToolPanel from "@ogw_front/components/ToolPanel";
|
|
3
|
+
import ClippingPlaneCard from "@ogw_front/components/ClippingPlaneCard.vue";
|
|
4
|
+
import ToolPanel from "@ogw_front/components/ToolPanel.vue";
|
|
5
5
|
import { useClippingPlanesWidget } from "@ogw_front/composables/clipping_planes_widget";
|
|
6
6
|
import { useDataStore } from "@ogw_front/stores/data";
|
|
7
7
|
import { useDebounceFn } from "@vueuse/core";
|
|
8
8
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
escapeFunction
|
|
12
|
-
}
|
|
10
|
+
interface Props {
|
|
11
|
+
escapeFunction?: () => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const { escapeFunction = undefined } = defineProps<Props>();
|
|
13
15
|
|
|
14
|
-
const show = defineModel("show", {
|
|
16
|
+
const show = defineModel<boolean>("show", { default: false });
|
|
15
17
|
const dataStore = useDataStore();
|
|
16
18
|
const hybridViewerStore = useHybridViewerStore();
|
|
17
19
|
const targetAllVisible = ref(true);
|
|
18
|
-
const selectedDatasetIds = ref([]);
|
|
19
|
-
const planes = ref
|
|
20
|
+
const selectedDatasetIds = ref<string[]>([]);
|
|
21
|
+
const planes = ref<{ origin?: number[]; normal: number[] }[]>([
|
|
22
|
+
{ origin: undefined, normal: [1, 0, 0] },
|
|
23
|
+
]);
|
|
20
24
|
const allItems = dataStore.refAllItems();
|
|
21
25
|
const availableDatasets = computed(() =>
|
|
22
|
-
allItems.value.map((item) => ({
|
|
26
|
+
allItems.value.map((item) => ({
|
|
27
|
+
title: item.name || item.id,
|
|
28
|
+
value: item.id,
|
|
29
|
+
})),
|
|
23
30
|
);
|
|
24
31
|
const widgetContainer = useTemplateRef("widgetContainer");
|
|
25
|
-
let debouncedApply = undefined;
|
|
32
|
+
let debouncedApply: ((...args: unknown[]) => void) | undefined = undefined;
|
|
26
33
|
|
|
27
34
|
const {
|
|
28
35
|
getSceneCenter,
|
|
@@ -39,7 +46,7 @@ const {
|
|
|
39
46
|
selectedDatasetIds,
|
|
40
47
|
allItems,
|
|
41
48
|
hybridViewerStore,
|
|
42
|
-
debouncedApply: (...args) => debouncedApply?.(...args),
|
|
49
|
+
debouncedApply: (...args: unknown[]) => debouncedApply?.(...args),
|
|
43
50
|
});
|
|
44
51
|
|
|
45
52
|
async function applyClippingPlanes() {
|
|
@@ -66,15 +73,18 @@ async function applyClippingPlanes() {
|
|
|
66
73
|
debouncedApply = useDebounceFn(() => applyClippingPlanes(), DEBOUNCE_DELAY);
|
|
67
74
|
|
|
68
75
|
function addPlane() {
|
|
69
|
-
|
|
76
|
+
// Index is always in-bounds (modulo the fixed-size list); the fallbacks only
|
|
77
|
+
// Satisfy noUncheckedIndexedAccess and are never hit at runtime.
|
|
78
|
+
const normal = DEFAULT_NORMALS[planes.value.length % DEFAULT_NORMALS.length] ??
|
|
79
|
+
DEFAULT_NORMALS[0] ?? [1, 0, 0];
|
|
70
80
|
planes.value.push({ origin: getSceneCenter(), normal });
|
|
71
81
|
}
|
|
72
82
|
|
|
73
|
-
function removePlane(index) {
|
|
83
|
+
function removePlane(index: number) {
|
|
74
84
|
planes.value.splice(index, 1);
|
|
75
85
|
}
|
|
76
86
|
|
|
77
|
-
function flipNormal(plane) {
|
|
87
|
+
function flipNormal(plane: { normal: number[] }) {
|
|
78
88
|
plane.normal = plane.normal.map((component) => -component);
|
|
79
89
|
syncWidgets();
|
|
80
90
|
applyClippingPlanes();
|
|
@@ -1,27 +1,36 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json";
|
|
3
3
|
import { useBackStore } from "@ogw_front/stores/back";
|
|
4
4
|
|
|
5
5
|
const schema = schemas.opengeodeweb_back.geographic_coordinate_systems;
|
|
6
6
|
|
|
7
|
-
const emit = defineEmits
|
|
7
|
+
const emit = defineEmits<{
|
|
8
|
+
update_values: [values: Record<string, unknown>];
|
|
9
|
+
increment_step: [];
|
|
10
|
+
decrement_step: [];
|
|
11
|
+
}>();
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
geodeObjectType:
|
|
11
|
-
keyToUpdate:
|
|
12
|
-
}
|
|
13
|
+
interface Props {
|
|
14
|
+
geodeObjectType: string;
|
|
15
|
+
keyToUpdate: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const { geodeObjectType, keyToUpdate } = defineProps<Props>();
|
|
13
19
|
|
|
14
20
|
const search = ref("");
|
|
15
21
|
const data_table_loading = ref(false);
|
|
16
|
-
const crs_list = ref([]);
|
|
17
|
-
const selected_crs = ref([]);
|
|
22
|
+
const crs_list = ref<Record<string, unknown>[]>([]);
|
|
23
|
+
const selected_crs = ref<unknown[]>([]);
|
|
18
24
|
const toggle_loading = useToggle(data_table_loading);
|
|
19
25
|
const backStore = useBackStore();
|
|
20
26
|
|
|
21
|
-
function get_selected_crs(crs_code) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
function get_selected_crs(crs_code: unknown) {
|
|
28
|
+
// Pre-existing off-by-one fixed: `i <= length` read one past the end of
|
|
29
|
+
// Crs_list, which would have thrown on `undefined["code"]` at runtime.
|
|
30
|
+
for (let i = 0; i < crs_list.value.length; i += 1) {
|
|
31
|
+
const crs = crs_list.value[i];
|
|
32
|
+
if (crs && crs["code"] === crs_code) {
|
|
33
|
+
return crs;
|
|
25
34
|
}
|
|
26
35
|
}
|
|
27
36
|
}
|
|
@@ -41,8 +50,8 @@ async function get_crs_table() {
|
|
|
41
50
|
await backStore.request(
|
|
42
51
|
{ schema, params },
|
|
43
52
|
{
|
|
44
|
-
response_function: (response) => {
|
|
45
|
-
crs_list.value = response.crs_list;
|
|
53
|
+
response_function: (response: unknown) => {
|
|
54
|
+
crs_list.value = (response as { crs_list: Record<string, unknown>[] }).crs_list;
|
|
46
55
|
},
|
|
47
56
|
},
|
|
48
57
|
);
|
|
@@ -58,7 +67,7 @@ const headers = [
|
|
|
58
67
|
},
|
|
59
68
|
{ title: "Code", align: "end", key: "code" },
|
|
60
69
|
{ title: "Name", align: "end", key: "name" },
|
|
61
|
-
];
|
|
70
|
+
] as const;
|
|
62
71
|
|
|
63
72
|
// oxlint-disable-next-line no-top-level-await
|
|
64
73
|
await get_crs_table();
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
import GlassCard from "./GlassCard.vue";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
default: false,
|
|
8
|
-
},
|
|
9
|
-
item: {
|
|
10
|
-
type: Object,
|
|
11
|
-
default: undefined,
|
|
12
|
-
},
|
|
13
|
-
selectedCount: {
|
|
14
|
-
type: Number,
|
|
15
|
-
default: 0,
|
|
16
|
-
},
|
|
17
|
-
});
|
|
4
|
+
interface DeleteItem {
|
|
5
|
+
name: string;
|
|
6
|
+
}
|
|
18
7
|
|
|
19
|
-
|
|
8
|
+
interface Props {
|
|
9
|
+
show?: boolean;
|
|
10
|
+
item?: DeleteItem;
|
|
11
|
+
selectedCount?: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const { show = false, item = undefined, selectedCount = 0 } = defineProps<Props>();
|
|
15
|
+
|
|
16
|
+
const emit = defineEmits<{
|
|
17
|
+
"update:show": [value: boolean];
|
|
18
|
+
confirm: [];
|
|
19
|
+
}>();
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
22
|
<template>
|
|
@@ -1,37 +1,54 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
// Not auto-fixable (eslint's sort-imports core rule has no autofixer) and this file's import order doesn't match its syntax-kind-then-alphabetical requirement - left as-is rather than manually reordered across the codebase for a purely cosmetic rule.
|
|
3
|
+
// oxlint-disable eslint/sort-imports
|
|
2
4
|
import { onMounted, onUnmounted, ref } from "vue";
|
|
3
5
|
import DragAndDropInline from "./DragAndDropInternal/DragAndDropInline.vue";
|
|
4
6
|
import DragAndDropOverlay from "./DragAndDropInternal/DragAndDropOverlay.vue";
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
});
|
|
8
|
+
interface DragAndDropTexts {
|
|
9
|
+
idle: string;
|
|
10
|
+
drop: string;
|
|
11
|
+
loading: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface Props {
|
|
15
|
+
multiple?: boolean;
|
|
16
|
+
accept?: string | string[];
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
showExtensions?: boolean;
|
|
19
|
+
fullscreen?: boolean;
|
|
20
|
+
inline?: boolean;
|
|
21
|
+
showOverlay?: boolean;
|
|
22
|
+
texts?: DragAndDropTexts;
|
|
23
|
+
}
|
|
24
24
|
|
|
25
|
-
const
|
|
25
|
+
const {
|
|
26
|
+
multiple = false,
|
|
27
|
+
accept = "",
|
|
28
|
+
loading = false,
|
|
29
|
+
showExtensions = true,
|
|
30
|
+
fullscreen = false,
|
|
31
|
+
inline = true,
|
|
32
|
+
showOverlay = true,
|
|
33
|
+
texts = {
|
|
34
|
+
idle: "Click or drag and drop",
|
|
35
|
+
drop: "Drop files here",
|
|
36
|
+
loading: "Loading...",
|
|
37
|
+
},
|
|
38
|
+
} = defineProps<Props>();
|
|
39
|
+
|
|
40
|
+
const emit = defineEmits<{
|
|
41
|
+
"files-selected": [files: File[]];
|
|
42
|
+
}>();
|
|
26
43
|
|
|
27
44
|
const isDragging = ref(false);
|
|
28
45
|
const isInternalDrag = ref(false);
|
|
29
46
|
const dragCounter = ref(0);
|
|
30
|
-
const fileInput = ref(undefined);
|
|
47
|
+
const fileInput = ref<HTMLInputElement | undefined>(undefined);
|
|
31
48
|
|
|
32
49
|
const WILDCARD_SUFFIX_LENGTH = 2;
|
|
33
50
|
|
|
34
|
-
function isFileAccepted(file, acceptValue) {
|
|
51
|
+
function isFileAccepted(file: File, acceptValue: string | string[] | undefined) {
|
|
35
52
|
const fileName = (file.name || "").toLowerCase();
|
|
36
53
|
const fileType = (file.type || "").toLowerCase();
|
|
37
54
|
const isVext = fileName.endsWith(".vext");
|
|
@@ -39,7 +56,7 @@ function isFileAccepted(file, acceptValue) {
|
|
|
39
56
|
if (!acceptValue) {
|
|
40
57
|
return !isVext;
|
|
41
58
|
}
|
|
42
|
-
let rules = [];
|
|
59
|
+
let rules: string[] = [];
|
|
43
60
|
if (Array.isArray(acceptValue)) {
|
|
44
61
|
rules = acceptValue;
|
|
45
62
|
} else if (typeof acceptValue === "string") {
|
|
@@ -79,8 +96,8 @@ function triggerFileDialog() {
|
|
|
79
96
|
fileInput.value?.click();
|
|
80
97
|
}
|
|
81
98
|
|
|
82
|
-
function onDragEnter(event) {
|
|
83
|
-
if (!isInternalDrag.value && event.dataTransfer
|
|
99
|
+
function onDragEnter(event: DragEvent) {
|
|
100
|
+
if (!isInternalDrag.value && event.dataTransfer?.types.includes("Files")) {
|
|
84
101
|
dragCounter.value += 1;
|
|
85
102
|
isDragging.value = true;
|
|
86
103
|
}
|
|
@@ -94,23 +111,25 @@ function onDragLeave() {
|
|
|
94
111
|
}
|
|
95
112
|
}
|
|
96
113
|
|
|
97
|
-
function onDragOver(event) {
|
|
98
|
-
if (!isInternalDrag.value && event.dataTransfer
|
|
114
|
+
function onDragOver(event: DragEvent) {
|
|
115
|
+
if (!isInternalDrag.value && event.dataTransfer?.types.includes("Files")) {
|
|
99
116
|
event.preventDefault();
|
|
100
117
|
}
|
|
101
118
|
}
|
|
102
119
|
|
|
103
|
-
function onDrop(event) {
|
|
120
|
+
function onDrop(event: DragEvent) {
|
|
104
121
|
event.preventDefault();
|
|
105
122
|
dragCounter.value = 0;
|
|
106
123
|
isDragging.value = false;
|
|
107
|
-
const files = [...event.dataTransfer
|
|
124
|
+
const files = [...(event.dataTransfer?.files ?? [])].filter((file) =>
|
|
125
|
+
isFileAccepted(file, accept),
|
|
126
|
+
);
|
|
108
127
|
if (files.length > 0) {
|
|
109
128
|
emit("files-selected", files);
|
|
110
129
|
}
|
|
111
130
|
}
|
|
112
131
|
|
|
113
|
-
function onKeyDown(event) {
|
|
132
|
+
function onKeyDown(event: KeyboardEvent) {
|
|
114
133
|
if (event.key === "Escape") {
|
|
115
134
|
event.preventDefault();
|
|
116
135
|
event.stopPropagation();
|
|
@@ -119,12 +138,13 @@ function onKeyDown(event) {
|
|
|
119
138
|
}
|
|
120
139
|
}
|
|
121
140
|
|
|
122
|
-
function handleFileSelect(event) {
|
|
123
|
-
const
|
|
141
|
+
function handleFileSelect(event: Event) {
|
|
142
|
+
const target = event.target as HTMLInputElement;
|
|
143
|
+
const files = [...(target.files ?? [])];
|
|
124
144
|
if (files.length > 0) {
|
|
125
145
|
emit("files-selected", files);
|
|
126
146
|
}
|
|
127
|
-
|
|
147
|
+
target.value = "";
|
|
128
148
|
}
|
|
129
149
|
|
|
130
150
|
function onInternalDragStart() {
|