@geode/opengeodeweb-front 10.34.0-rc.2 → 10.34.0-rc.4
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 +25 -8
- 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 +29 -22
- package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +54 -28
- 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} +24 -17
- 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 -148
- 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
|
@@ -1,22 +1,35 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import GlassCard from "@ogw_front/components/GlassCard";
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import GlassCard from "@ogw_front/components/GlassCard.vue";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
interface DragAndDropTexts {
|
|
5
|
+
idle: string;
|
|
6
|
+
drop: string;
|
|
7
|
+
loading: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
isDragging: boolean;
|
|
12
|
+
loading: boolean;
|
|
13
|
+
texts?: DragAndDropTexts;
|
|
14
|
+
accept?: string | string[];
|
|
15
|
+
showExtensions: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const {
|
|
19
|
+
isDragging,
|
|
20
|
+
loading,
|
|
21
|
+
texts = {
|
|
22
|
+
idle: "Click or drag and drop",
|
|
23
|
+
drop: "Drop files here",
|
|
24
|
+
loading: "Loading...",
|
|
14
25
|
},
|
|
15
|
-
accept
|
|
16
|
-
showExtensions
|
|
17
|
-
});
|
|
26
|
+
accept = "",
|
|
27
|
+
showExtensions,
|
|
28
|
+
} = defineProps<Props>();
|
|
18
29
|
|
|
19
|
-
const emit = defineEmits
|
|
30
|
+
const emit = defineEmits<{
|
|
31
|
+
click: [];
|
|
32
|
+
}>();
|
|
20
33
|
</script>
|
|
21
34
|
|
|
22
35
|
<template>
|
|
@@ -1,22 +1,35 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
interface DragAndDropTexts {
|
|
3
|
+
idle: string;
|
|
4
|
+
drop: string;
|
|
5
|
+
loading: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
isDragging: boolean;
|
|
10
|
+
showOverlay: boolean;
|
|
11
|
+
fullscreen: boolean;
|
|
12
|
+
loading: boolean;
|
|
13
|
+
texts?: DragAndDropTexts;
|
|
14
|
+
multiple: boolean;
|
|
15
|
+
accept?: string | string[];
|
|
16
|
+
showExtensions: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const {
|
|
20
|
+
isDragging,
|
|
21
|
+
showOverlay,
|
|
22
|
+
fullscreen,
|
|
23
|
+
loading,
|
|
24
|
+
texts = {
|
|
25
|
+
idle: "Click or drag and drop",
|
|
26
|
+
drop: "Drop files here",
|
|
27
|
+
loading: "Loading...",
|
|
28
|
+
},
|
|
29
|
+
multiple,
|
|
30
|
+
accept = "",
|
|
31
|
+
showExtensions,
|
|
32
|
+
} = defineProps<Props>();
|
|
20
33
|
</script>
|
|
21
34
|
|
|
22
35
|
<template>
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json";
|
|
3
3
|
|
|
4
|
-
import FetchingData from "@ogw_front/components/FetchingData";
|
|
4
|
+
import FetchingData from "@ogw_front/components/FetchingData.vue";
|
|
5
5
|
import { useBackStore } from "@ogw_front/stores/back";
|
|
6
6
|
|
|
7
7
|
const schema = schemas.opengeodeweb_back.geode_objects_and_output_extensions;
|
|
8
|
-
const emit = defineEmits
|
|
8
|
+
const emit = defineEmits<{
|
|
9
|
+
update_values: [values: { output_geode_object: string; output_extension: string }];
|
|
10
|
+
increment_step: [];
|
|
11
|
+
decrement_step: [];
|
|
12
|
+
}>();
|
|
9
13
|
|
|
10
|
-
|
|
11
|
-
geodeObjectType:
|
|
12
|
-
filenames:
|
|
13
|
-
}
|
|
14
|
-
|
|
14
|
+
interface Props {
|
|
15
|
+
geodeObjectType: string;
|
|
16
|
+
filenames: string[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const { geodeObjectType, filenames } = defineProps<Props>();
|
|
20
|
+
type OutputExtensions = Record<string, { is_saveable: boolean }>;
|
|
21
|
+
|
|
22
|
+
const geode_objects_and_output_extensions = ref<Record<string, OutputExtensions>>({});
|
|
15
23
|
const loading = ref(false);
|
|
16
24
|
|
|
17
25
|
const toggle_loading = useToggle(loading);
|
|
@@ -20,22 +28,30 @@ async function get_output_file_extensions() {
|
|
|
20
28
|
toggle_loading();
|
|
21
29
|
geode_objects_and_output_extensions.value = {};
|
|
22
30
|
const backStore = useBackStore();
|
|
23
|
-
const values = await Promise.all(
|
|
24
|
-
filenames.map(async (filename) => {
|
|
31
|
+
const values: Record<string, OutputExtensions>[] = await Promise.all(
|
|
32
|
+
filenames.map(async (filename): Promise<Record<string, OutputExtensions>> => {
|
|
25
33
|
const params = { geode_object_type: geodeObjectType, filename };
|
|
26
34
|
const response = await backStore.request({ schema, params });
|
|
27
|
-
return
|
|
35
|
+
return (
|
|
36
|
+
response as {
|
|
37
|
+
geode_objects_and_output_extensions: Record<string, OutputExtensions>;
|
|
38
|
+
}
|
|
39
|
+
).geode_objects_and_output_extensions;
|
|
28
40
|
}),
|
|
29
41
|
);
|
|
30
42
|
const all_keys = [...new Set(values.flatMap((value) => Object.keys(value)))];
|
|
31
43
|
const common_keys = all_keys.filter((i) => !values.some((j) => !Object.keys(j).includes(i)));
|
|
32
|
-
const final_object = {};
|
|
44
|
+
const final_object: Record<string, OutputExtensions> = {};
|
|
33
45
|
for (const key of common_keys) {
|
|
34
46
|
final_object[key] = {};
|
|
35
47
|
for (const value of values) {
|
|
36
|
-
|
|
48
|
+
const extensions = value[key];
|
|
49
|
+
if (!extensions) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
for (const extension of Object.keys(extensions)) {
|
|
37
53
|
final_object[key][extension] = {
|
|
38
|
-
is_saveable:
|
|
54
|
+
is_saveable: extensions[extension]!.is_saveable,
|
|
39
55
|
};
|
|
40
56
|
}
|
|
41
57
|
}
|
|
@@ -44,7 +60,7 @@ async function get_output_file_extensions() {
|
|
|
44
60
|
toggle_loading();
|
|
45
61
|
}
|
|
46
62
|
|
|
47
|
-
function update_values(output_geode_object, output_extension) {
|
|
63
|
+
function update_values(output_geode_object: string, output_extension: string) {
|
|
48
64
|
if (output_geode_object !== "" && output_extension !== "") {
|
|
49
65
|
emit("update_values", {
|
|
50
66
|
output_geode_object,
|
|
@@ -67,7 +83,7 @@ await get_output_file_extensions();
|
|
|
67
83
|
class="justify-left"
|
|
68
84
|
>
|
|
69
85
|
<v-card class="card ma-2 pa-2" width="100%">
|
|
70
|
-
<v-card-title v-tooltip:bottom="`Export as a ${output_geode_object}`"
|
|
86
|
+
<v-card-title v-tooltip:bottom="`Export as a ${output_geode_object}`">
|
|
71
87
|
{{ output_geode_object }}
|
|
72
88
|
</v-card-title>
|
|
73
89
|
<v-card-text>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
import { useFeedbackStore } from "@ogw_front/stores/feedback";
|
|
3
3
|
|
|
4
4
|
const feedbackStore = useFeedbackStore();
|
|
@@ -18,7 +18,6 @@ function reload() {
|
|
|
18
18
|
<v-row>
|
|
19
19
|
<v-col cols="auto" class="text-white text-center">
|
|
20
20
|
<v-icon
|
|
21
|
-
v-bind="props"
|
|
22
21
|
color="white"
|
|
23
22
|
class="justify-right"
|
|
24
23
|
v-tooltip:bottom="'We turn off our server automatically after 5 minutes of inactivity'"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
import { useFeedbackStore } from "@ogw_front/stores/feedback";
|
|
3
3
|
|
|
4
4
|
const MARGIN_BETWEEN_SNACKERS = 60;
|
|
@@ -7,7 +7,7 @@ const FIRST_SNACKER_MARGIN = 8;
|
|
|
7
7
|
const feedbackStore = useFeedbackStore();
|
|
8
8
|
const show = ref(true);
|
|
9
9
|
|
|
10
|
-
function calc_margin(index) {
|
|
10
|
+
function calc_margin(index: number) {
|
|
11
11
|
return `${index * MARGIN_BETWEEN_SNACKERS + FIRST_SNACKER_MARGIN}px`;
|
|
12
12
|
}
|
|
13
13
|
</script>
|
|
@@ -15,7 +15,7 @@ function calc_margin(index) {
|
|
|
15
15
|
<template>
|
|
16
16
|
<v-snackbar
|
|
17
17
|
v-for="(feedback, index) in feedbackStore.feedbacks"
|
|
18
|
-
:key="feedback"
|
|
18
|
+
:key="feedback.id"
|
|
19
19
|
v-model="show"
|
|
20
20
|
:style="{ 'margin-bottom': calc_margin(index) }"
|
|
21
21
|
:color="feedback.type"
|
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
const DEFAULT_SIZE = 22;
|
|
3
3
|
const DEFAULT_WIDTH = 3;
|
|
4
4
|
|
|
5
|
+
interface Props {
|
|
6
|
+
text?: string;
|
|
7
|
+
size?: number | string;
|
|
8
|
+
width?: number | string;
|
|
9
|
+
}
|
|
10
|
+
|
|
5
11
|
const {
|
|
6
12
|
text = "Fetching data...",
|
|
7
13
|
size = DEFAULT_SIZE,
|
|
8
14
|
width = DEFAULT_WIDTH,
|
|
9
|
-
} = defineProps(
|
|
10
|
-
text: {
|
|
11
|
-
type: String,
|
|
12
|
-
},
|
|
13
|
-
size: {
|
|
14
|
-
type: [Number, String],
|
|
15
|
-
},
|
|
16
|
-
width: {
|
|
17
|
-
type: [Number, String],
|
|
18
|
-
},
|
|
19
|
-
});
|
|
15
|
+
} = defineProps<Props>();
|
|
20
16
|
</script>
|
|
21
17
|
|
|
22
18
|
<template>
|
|
@@ -1,20 +1,26 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json";
|
|
3
3
|
|
|
4
|
-
import FetchingData from "@ogw_front/components/FetchingData";
|
|
5
|
-
import FileUploader from "@ogw_front/components/FileUploader";
|
|
4
|
+
import FetchingData from "@ogw_front/components/FetchingData.vue";
|
|
5
|
+
import FileUploader from "@ogw_front/components/FileUploader.vue";
|
|
6
6
|
import { useBackStore } from "@ogw_front/stores/back";
|
|
7
7
|
|
|
8
8
|
const schema = schemas.opengeodeweb_back.allowed_files;
|
|
9
9
|
|
|
10
|
-
const emit = defineEmits
|
|
10
|
+
const emit = defineEmits<{
|
|
11
|
+
update_values: [values: { files: unknown[]; autoUpload: boolean }];
|
|
12
|
+
increment_step: [];
|
|
13
|
+
decrement_step: [];
|
|
14
|
+
}>();
|
|
11
15
|
|
|
12
|
-
|
|
13
|
-
multiple:
|
|
14
|
-
files
|
|
15
|
-
autoUpload
|
|
16
|
-
showOverlay
|
|
17
|
-
}
|
|
16
|
+
interface Props {
|
|
17
|
+
multiple: boolean;
|
|
18
|
+
files?: File[];
|
|
19
|
+
autoUpload?: boolean;
|
|
20
|
+
showOverlay?: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const { multiple, files = [], autoUpload = true, showOverlay = true } = defineProps<Props>();
|
|
18
24
|
|
|
19
25
|
const internal_files = ref(files);
|
|
20
26
|
const internal_auto_upload = ref(autoUpload);
|
|
@@ -37,7 +43,7 @@ watch(
|
|
|
37
43
|
|
|
38
44
|
const toggle_loading = useToggle(loading);
|
|
39
45
|
|
|
40
|
-
function files_uploaded_event(value) {
|
|
46
|
+
function files_uploaded_event(value: unknown[]) {
|
|
41
47
|
if (value.length > 0) {
|
|
42
48
|
emit("update_values", { files: value, autoUpload: false });
|
|
43
49
|
emit("increment_step");
|
|
@@ -47,7 +53,9 @@ function files_uploaded_event(value) {
|
|
|
47
53
|
async function get_allowed_files() {
|
|
48
54
|
toggle_loading();
|
|
49
55
|
const backStore = useBackStore();
|
|
50
|
-
const response = await backStore.request({ schema })
|
|
56
|
+
const response = (await backStore.request({ schema })) as {
|
|
57
|
+
extensions: string[];
|
|
58
|
+
};
|
|
51
59
|
accept.value = response.extensions.map((extension) => `.${extension}`).join(",");
|
|
52
60
|
toggle_loading();
|
|
53
61
|
}
|
|
@@ -1,46 +1,64 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
import { useBackStore } from "@ogw_front/stores/back";
|
|
3
3
|
|
|
4
|
-
import CsvPreviewer from "@ogw_front/components/csv-preview/CsvPreviewer";
|
|
5
|
-
import DragAndDrop from "@ogw_front/components/DragAndDrop";
|
|
4
|
+
import CsvPreviewer from "@ogw_front/components/csv-preview/CsvPreviewer.vue";
|
|
5
|
+
import DragAndDrop from "@ogw_front/components/DragAndDrop.vue";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// Files carry extra app-specific bookkeeping fields once picked up here.
|
|
8
|
+
type UploadFile = File & { isConfigured?: boolean; displayName?: string };
|
|
8
9
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
const emit = defineEmits<{
|
|
11
|
+
files_uploaded: [files: UploadFile[]];
|
|
12
|
+
decrement_step: [];
|
|
13
|
+
reset_values: [];
|
|
14
|
+
}>();
|
|
15
|
+
|
|
16
|
+
interface Props {
|
|
17
|
+
multiple?: boolean;
|
|
18
|
+
accept?: string | string[];
|
|
19
|
+
files?: UploadFile[];
|
|
20
|
+
autoUpload?: boolean;
|
|
21
|
+
showOverlay?: boolean;
|
|
22
|
+
mini?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const {
|
|
26
|
+
multiple = false,
|
|
27
|
+
accept = "",
|
|
28
|
+
files = [],
|
|
29
|
+
autoUpload = true,
|
|
30
|
+
showOverlay = false,
|
|
31
|
+
mini = false,
|
|
32
|
+
} = defineProps<Props>();
|
|
17
33
|
|
|
18
34
|
const backStore = useBackStore();
|
|
19
35
|
const internal_files = ref(files);
|
|
20
36
|
const dragAndDropRef = useTemplateRef("dragAndDropRef");
|
|
21
37
|
const csv_dialog = ref(false);
|
|
22
|
-
const current_csv_file = ref(undefined);
|
|
38
|
+
const current_csv_file = ref<UploadFile | undefined>(undefined);
|
|
23
39
|
const current_csv_index = ref(-1);
|
|
24
40
|
const loading = ref(false);
|
|
25
41
|
const files_uploaded = ref(false);
|
|
26
42
|
const toggle_loading = useToggle(loading);
|
|
27
43
|
|
|
28
|
-
function isCsv(file) {
|
|
44
|
+
function isCsv(file: UploadFile) {
|
|
29
45
|
return file.name.toLowerCase().endsWith(".csv");
|
|
30
46
|
}
|
|
31
47
|
|
|
32
|
-
function openCsvPreviewer(file, index) {
|
|
48
|
+
function openCsvPreviewer(file: UploadFile, index: number) {
|
|
33
49
|
current_csv_file.value = file;
|
|
34
50
|
current_csv_index.value = index;
|
|
35
51
|
csv_dialog.value = true;
|
|
36
52
|
}
|
|
37
53
|
|
|
38
|
-
async function onCsvConfirm(result) {
|
|
54
|
+
async function onCsvConfirm(result: unknown) {
|
|
55
|
+
// Only reachable while the CsvPreviewer dialog (gated on current_csv_file) is open.
|
|
56
|
+
const currentFile = current_csv_file.value;
|
|
57
|
+
if (!currentFile) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
39
60
|
const json_content = JSON.stringify(result, undefined, 2);
|
|
40
|
-
const base_name =
|
|
41
|
-
0,
|
|
42
|
-
current_csv_file.value.name.lastIndexOf("."),
|
|
43
|
-
);
|
|
61
|
+
const base_name = currentFile.name.slice(0, currentFile.name.lastIndexOf("."));
|
|
44
62
|
const json_filename = `${base_name}.json`;
|
|
45
63
|
|
|
46
64
|
const blob = new Blob([json_content], { type: "application/json" });
|
|
@@ -48,21 +66,24 @@ async function onCsvConfirm(result) {
|
|
|
48
66
|
type: "application/json",
|
|
49
67
|
});
|
|
50
68
|
|
|
51
|
-
|
|
69
|
+
currentFile.isConfigured = true;
|
|
52
70
|
await backStore.upload(json_file);
|
|
53
71
|
internal_files.value = [...internal_files.value];
|
|
54
72
|
csv_dialog.value = false;
|
|
55
73
|
}
|
|
56
74
|
|
|
57
|
-
function processSelectedFiles(selected_files) {
|
|
75
|
+
function processSelectedFiles(selected_files: UploadFile[]) {
|
|
58
76
|
if (multiple) {
|
|
59
77
|
internal_files.value = [...internal_files.value, ...selected_files];
|
|
60
78
|
} else {
|
|
61
|
-
|
|
79
|
+
const [firstFile] = selected_files;
|
|
80
|
+
if (firstFile) {
|
|
81
|
+
internal_files.value = [firstFile];
|
|
82
|
+
}
|
|
62
83
|
}
|
|
63
84
|
}
|
|
64
85
|
|
|
65
|
-
function removeFile(index) {
|
|
86
|
+
function removeFile(index: number) {
|
|
66
87
|
internal_files.value.splice(index, 1);
|
|
67
88
|
if (internal_files.value.length === 0) {
|
|
68
89
|
files_uploaded.value = false;
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
import { computed, useAttrs } from "vue";
|
|
3
3
|
import { onKeyStroke } from "@vueuse/core";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
variant
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
interface Props {
|
|
6
|
+
variant?: "panel" | "ui";
|
|
7
|
+
rounded?: string;
|
|
8
|
+
padding?: string;
|
|
9
|
+
theme?: string;
|
|
10
|
+
escapeFunction?: () => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
variant = "panel",
|
|
15
|
+
rounded = "xl",
|
|
16
|
+
padding = "pa-6",
|
|
17
|
+
theme = undefined,
|
|
18
|
+
escapeFunction = undefined,
|
|
19
|
+
} = defineProps<Props>();
|
|
16
20
|
|
|
17
21
|
const attrs = useAttrs();
|
|
18
22
|
const isInteractive = computed(() => Boolean(attrs.onClick));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
import ColormapQuickPicker from "@ogw_front/components/Viewer/Options/ColormapQuickPicker.vue";
|
|
3
|
-
import HybridViewerTooltip from "@ogw_front/components/HybridViewerTooltip";
|
|
4
|
-
import ViewToolbar from "@ogw_front/components/ViewToolbar";
|
|
3
|
+
import HybridViewerTooltip from "@ogw_front/components/HybridViewerTooltip.vue";
|
|
4
|
+
import ViewToolbar from "@ogw_front/components/ViewToolbar.vue";
|
|
5
5
|
|
|
6
6
|
import { useDataStore } from "@ogw_front/stores/data";
|
|
7
7
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
@@ -11,7 +11,9 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
|
11
11
|
|
|
12
12
|
const DEFAULT_ELEMENT_HEIGHT = 100;
|
|
13
13
|
|
|
14
|
-
const emit = defineEmits
|
|
14
|
+
const emit = defineEmits<{
|
|
15
|
+
click: [event: PointerEvent];
|
|
16
|
+
}>();
|
|
15
17
|
|
|
16
18
|
const container = useTemplateRef("viewer");
|
|
17
19
|
const hybridViewerStore = useHybridViewerStore();
|
|
@@ -22,9 +24,9 @@ const dataStore = useDataStore();
|
|
|
22
24
|
const { width: elementWidth, height: elementHeight } = useElementSize(container);
|
|
23
25
|
const { width: windowWidth, height: windowHeight } = useWindowSize();
|
|
24
26
|
|
|
25
|
-
function debounce(func, wait) {
|
|
26
|
-
let timeout = undefined;
|
|
27
|
-
return function executedFunction(...args) {
|
|
27
|
+
function debounce<Callback extends (...args: unknown[]) => void>(func: Callback, wait: number) {
|
|
28
|
+
let timeout: ReturnType<typeof setTimeout> | undefined = undefined;
|
|
29
|
+
return function executedFunction(...args: Parameters<Callback>) {
|
|
28
30
|
function later() {
|
|
29
31
|
clearTimeout(timeout);
|
|
30
32
|
func(...args);
|
|
@@ -46,17 +48,26 @@ onMounted(async () => {
|
|
|
46
48
|
if (import.meta.client) {
|
|
47
49
|
await hybridViewerStore.initHybridViewer();
|
|
48
50
|
await nextTick();
|
|
49
|
-
|
|
51
|
+
// UseTemplateRef's inferred type is broader than the { $el: HTMLElement } shape
|
|
52
|
+
// SetContainer expects; this element is only ever a component instance with $el
|
|
53
|
+
// (see the `containerEl.$el` usages below).
|
|
54
|
+
hybridViewerStore.setContainer(container as never);
|
|
50
55
|
debouncedResize();
|
|
51
56
|
}
|
|
52
57
|
});
|
|
53
58
|
|
|
54
59
|
const { pickColormap, quickColormap } = useQuickColormap();
|
|
55
60
|
|
|
56
|
-
async function handleClick(event) {
|
|
61
|
+
async function handleClick(event: PointerEvent) {
|
|
57
62
|
const { offsetX, offsetY, clientX, clientY } = event;
|
|
63
|
+
// Only ever fired from the pointerup handler bound to this same element.
|
|
64
|
+
const containerEl = container.value;
|
|
65
|
+
if (!containerEl) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
58
69
|
if (hybridViewerStore.is_ruler_active) {
|
|
59
|
-
const rect =
|
|
70
|
+
const rect = containerEl.$el.getBoundingClientRect();
|
|
60
71
|
const x = event.clientX - rect.left;
|
|
61
72
|
const y = elementHeight.value - (event.clientY - rect.top);
|
|
62
73
|
await hybridViewerStore.handleRulerClick(x, y);
|
|
@@ -64,7 +75,7 @@ async function handleClick(event) {
|
|
|
64
75
|
}
|
|
65
76
|
|
|
66
77
|
if (viewerStore.picking_mode) {
|
|
67
|
-
const rect =
|
|
78
|
+
const rect = containerEl.$el.getBoundingClientRect();
|
|
68
79
|
const x = event.clientX - rect.left;
|
|
69
80
|
const y = elementHeight.value - (event.clientY - rect.top);
|
|
70
81
|
await viewerStore.set_picked_point(x, y);
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import GlassCard from "@ogw_front/components/GlassCard";
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import GlassCard from "@ogw_front/components/GlassCard.vue";
|
|
3
3
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
4
4
|
|
|
5
5
|
const TOOLTIP_SCREEN_MARGIN = 10;
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
containerWidth:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
type: Number,
|
|
14
|
-
required: true,
|
|
15
|
-
},
|
|
16
|
-
});
|
|
7
|
+
interface Props {
|
|
8
|
+
containerWidth: number;
|
|
9
|
+
containerHeight: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { containerWidth, containerHeight } = defineProps<Props>();
|
|
17
13
|
|
|
18
14
|
const hybridViewerStore = useHybridViewerStore();
|
|
19
15
|
|
|
@@ -86,7 +82,7 @@ const sortedAttributes = computed(() => {
|
|
|
86
82
|
);
|
|
87
83
|
});
|
|
88
84
|
|
|
89
|
-
function capitalize(val) {
|
|
85
|
+
function capitalize(val: string) {
|
|
90
86
|
if (!val) {
|
|
91
87
|
return "";
|
|
92
88
|
}
|
|
@@ -94,7 +90,17 @@ function capitalize(val) {
|
|
|
94
90
|
return spaced.charAt(0).toUpperCase() + spaced.slice(1);
|
|
95
91
|
}
|
|
96
92
|
|
|
97
|
-
|
|
93
|
+
const fieldTypeLabel = computed(() => {
|
|
94
|
+
const fieldType = hybridViewerStore.hoverData?.fieldType;
|
|
95
|
+
return typeof fieldType === "string" ? capitalize(fieldType.toLowerCase()) : "";
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
const coordinates = computed<number[] | undefined>(() => {
|
|
99
|
+
const value = hybridViewerStore.hoverData?.attributes.coordinates;
|
|
100
|
+
return Array.isArray(value) ? (value as number[]) : undefined;
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
function formatAttributeValue(val: unknown) {
|
|
98
104
|
if (Array.isArray(val)) {
|
|
99
105
|
const formattedValues = val.map((value) => {
|
|
100
106
|
if (typeof value === "number") {
|
|
@@ -134,7 +140,7 @@ function formatAttributeValue(val) {
|
|
|
134
140
|
hybridViewerStore.hoverData.component?.id ||
|
|
135
141
|
hybridViewerStore.hoverData.blockName ||
|
|
136
142
|
hybridViewerStore.hoverData.modelName ||
|
|
137
|
-
`${
|
|
143
|
+
`${fieldTypeLabel} #${hybridViewerStore.hoverData.pickedId}`
|
|
138
144
|
}}
|
|
139
145
|
</span>
|
|
140
146
|
</v-col>
|
|
@@ -160,15 +166,11 @@ function formatAttributeValue(val) {
|
|
|
160
166
|
<template v-if="hasOtherAttributes">
|
|
161
167
|
<v-divider class="my-2" opacity="0.15" />
|
|
162
168
|
<v-row no-gutters class="flex-column ga-1">
|
|
163
|
-
<v-col
|
|
164
|
-
v-if="hybridViewerStore.hoverData.attributes.coordinates"
|
|
165
|
-
class="d-flex justify-space-between ga-3"
|
|
166
|
-
>
|
|
169
|
+
<v-col v-if="coordinates" class="d-flex justify-space-between ga-3">
|
|
167
170
|
<span class="tooltip-label">Position:</span>
|
|
168
171
|
<span class="tooltip-value font-mono">
|
|
169
|
-
[ {{ Number(
|
|
170
|
-
{{ Number(
|
|
171
|
-
{{ Number(hybridViewerStore.hoverData.attributes.coordinates[2]).toFixed(3) }} ]
|
|
172
|
+
[ {{ Number(coordinates[0]).toFixed(3) }}, {{ Number(coordinates[1]).toFixed(3) }},
|
|
173
|
+
{{ Number(coordinates[2]).toFixed(3) }} ]
|
|
172
174
|
</span>
|
|
173
175
|
</v-col>
|
|
174
176
|
<template v-for="[name, val] in sortedAttributes" :key="name">
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import Loading from "@ogw_front/components/Loading";
|
|
3
|
-
import Recaptcha from "@ogw_front/components/Recaptcha";
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import Loading from "@ogw_front/components/Loading.vue";
|
|
3
|
+
import Recaptcha from "@ogw_front/components/Recaptcha.vue";
|
|
4
4
|
import { Status } from "@ogw_front/utils/status";
|
|
5
5
|
import { appMode } from "@ogw_shared/app_mode";
|
|
6
6
|
import { useInfraStore } from "@ogw_front/stores/infra";
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
appName:
|
|
10
|
-
email
|
|
11
|
-
isUserAuthenticated
|
|
12
|
-
logo
|
|
13
|
-
}
|
|
8
|
+
interface Props {
|
|
9
|
+
appName: string;
|
|
10
|
+
email?: string;
|
|
11
|
+
isUserAuthenticated?: boolean;
|
|
12
|
+
logo?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const { appName, email = undefined, isUserAuthenticated = false, logo = "" } = defineProps<Props>();
|
|
14
16
|
|
|
15
17
|
const infraStore = useInfraStore();
|
|
16
18
|
if (infraStore.app_mode !== appMode.CLOUD) {
|