@geode/opengeodeweb-front 10.3.0 → 10.3.1
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/.eslintrc.cjs +1 -0
- package/app/assets/geode_objects.js +1 -3
- package/app/components/Carousel.vue +7 -4
- package/app/components/CrsSelector.vue +5 -6
- package/app/components/DragAndDrop.vue +18 -8
- package/app/components/ExtensionSelector.vue +9 -17
- package/app/components/FeedBack/ErrorBanner.vue +1 -1
- package/app/components/FeedBack/Snackers.vue +4 -1
- package/app/components/FileSelector.vue +21 -10
- package/app/components/FileUploader.vue +15 -32
- package/app/components/HybridRenderingView.vue +5 -3
- package/app/components/Inspector/InspectionButton.vue +2 -2
- package/app/components/Inspector/ResultPanel.vue +4 -4
- package/app/components/Launcher.vue +1 -1
- package/app/components/Loading.vue +6 -6
- package/app/components/MissingFilesSelector.vue +23 -29
- package/app/components/ObjectSelector.vue +11 -10
- package/app/components/OptionCard.vue +1 -1
- package/app/components/PackagesVersions.vue +5 -3
- package/app/components/Recaptcha.vue +6 -4
- package/app/components/RemoteRenderingView.vue +4 -3
- package/app/components/Screenshot.vue +4 -4
- package/app/components/Step.vue +7 -7
- package/app/components/VeaseViewToolbar.vue +3 -3
- package/app/components/Viewer/BreadCrumb.vue +2 -4
- package/app/components/Viewer/ContextMenu.vue +77 -45
- package/app/components/Viewer/ContextMenuItem.vue +42 -33
- package/app/components/Viewer/EdgedCurve/PointsOptions.vue +3 -3
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +5 -5
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +6 -6
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +5 -5
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +5 -5
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +6 -7
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +6 -6
- package/app/components/Viewer/Generic/Model/EdgesOptions.vue +3 -3
- package/app/components/Viewer/Generic/Model/PointsOptions.vue +4 -4
- package/app/components/Viewer/Grid/2D/CellsOptions.vue +3 -3
- package/app/components/Viewer/Grid/2D/EdgesOptions.vue +3 -3
- package/app/components/Viewer/Grid/2D/PointsOptions.vue +3 -3
- package/app/components/Viewer/Grid/3D/CellsOptions.vue +3 -3
- package/app/components/Viewer/Grid/3D/EdgesOptions.vue +3 -3
- package/app/components/Viewer/Grid/3D/FacetsOptions.vue +3 -3
- package/app/components/Viewer/Grid/3D/PointsOptions.vue +3 -3
- package/app/components/Viewer/HybridSolid/EdgesOptions.vue +3 -3
- package/app/components/Viewer/HybridSolid/PointsOptions.vue +3 -3
- package/app/components/Viewer/HybridSolid/PolygonsOptions.vue +3 -3
- package/app/components/Viewer/HybridSolid/PolyhedraOptions.vue +3 -3
- package/app/components/Viewer/Options/CellAttributeSelector.vue +23 -20
- package/app/components/Viewer/Options/ColorMapList.vue +75 -50
- package/app/components/Viewer/Options/ColorMapPicker.vue +38 -32
- package/app/components/Viewer/Options/ColorPicker.vue +3 -3
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +29 -21
- package/app/components/Viewer/Options/EdgeAttributeSelector.vue +7 -7
- package/app/components/Viewer/Options/PolygonAttributeSelector.vue +7 -7
- package/app/components/Viewer/Options/PolyhedronAttributeSelector.vue +7 -7
- package/app/components/Viewer/Options/TextureItem.vue +5 -5
- package/app/components/Viewer/Options/TexturesSelector.vue +5 -5
- package/app/components/Viewer/Options/VertexAttributeSelector.vue +7 -7
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +5 -5
- package/app/components/Viewer/PolygonalSurface/EdgesOptions.vue +3 -3
- package/app/components/Viewer/PolygonalSurface/PointsOptions.vue +3 -3
- package/app/components/Viewer/PolygonalSurface/SpecificPolygonsOptions.vue +6 -6
- package/app/components/Viewer/Solid/EdgesOptions.vue +3 -3
- package/app/components/Viewer/Solid/PointsOptions.vue +3 -3
- package/app/components/Viewer/Solid/PolygonsOptions.vue +3 -3
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +6 -6
- package/app/components/Viewer/TetrahedralSolid/TetrahedraOptions.vue +3 -3
- package/app/components/Viewer/TetrahedralSolid/TrianglesOptions.vue +3 -3
- package/app/components/Viewer/Tree/ObjectTree.vue +7 -9
- package/app/components/Viewer/TreeComponent.vue +9 -13
- package/app/components/Viewer/TreeObject.vue +8 -9
- package/app/components/Viewer/TriangulatedSurface/EdgesOptions.vue +3 -3
- package/app/components/Viewer/TriangulatedSurface/PointsOptions.vue +3 -3
- package/app/components/Viewer/TriangulatedSurface/TrianglesOptions.vue +3 -3
- package/app/components/Wrapper.vue +1 -2
- package/app/components/ZScaling.vue +1 -1
- package/app/composables/project_manager.js +6 -6
- package/app/plugins/auto_store_register.js +1 -1
- package/app/stores/app.js +45 -41
- package/app/stores/data.js +52 -51
- package/app/stores/data_style.js +12 -11
- package/app/stores/feedback.js +5 -1
- package/app/stores/geode.js +16 -13
- package/app/stores/hybrid_viewer.js +72 -44
- package/app/stores/infra.js +18 -16
- package/app/stores/lambda.js +1 -9
- package/app/stores/menu.js +13 -13
- package/app/stores/treeview.js +15 -13
- package/app/stores/viewer.js +39 -33
- package/app/utils/app_mode.js +4 -3
- package/app/utils/default_styles.js +55 -47
- package/app/utils/file_import_workflow.js +4 -17
- package/app/utils/local.js +195 -184
- package/app/utils/upload_file.js +1 -2
- package/eslint.config.js +2 -2
- package/internal/database/database.js +17 -32
- package/internal/database/extended_database.js +25 -0
- package/internal/stores/data_style/mesh/cells/cell.js +3 -3
- package/internal/stores/data_style/mesh/cells/color.js +1 -1
- package/internal/stores/data_style/mesh/cells/index.js +7 -7
- package/internal/stores/data_style/mesh/cells/textures.js +1 -1
- package/internal/stores/data_style/mesh/cells/vertex.js +3 -3
- package/internal/stores/data_style/mesh/cells/visibility.js +1 -1
- package/internal/stores/data_style/mesh/edges/color.js +1 -1
- package/internal/stores/data_style/mesh/edges/edge.js +22 -22
- package/internal/stores/data_style/mesh/edges/index.js +7 -7
- package/internal/stores/data_style/mesh/edges/vertex.js +3 -3
- package/internal/stores/data_style/mesh/edges/visibility.js +1 -1
- package/internal/stores/data_style/mesh/edges/width.js +1 -1
- package/internal/stores/data_style/mesh/index.js +4 -5
- package/internal/stores/data_style/mesh/points/color.js +1 -1
- package/internal/stores/data_style/mesh/points/index.js +6 -6
- package/internal/stores/data_style/mesh/points/size.js +1 -1
- package/internal/stores/data_style/mesh/points/vertex.js +3 -3
- package/internal/stores/data_style/mesh/points/visibility.js +1 -1
- package/internal/stores/data_style/mesh/polygons/color.js +1 -1
- package/internal/stores/data_style/mesh/polygons/index.js +7 -7
- package/internal/stores/data_style/mesh/polygons/polygon.js +3 -3
- package/internal/stores/data_style/mesh/polygons/textures.js +1 -1
- package/internal/stores/data_style/mesh/polygons/vertex.js +3 -3
- package/internal/stores/data_style/mesh/polygons/visibility.js +1 -1
- package/internal/stores/data_style/mesh/polyhedra/color.js +1 -1
- package/internal/stores/data_style/mesh/polyhedra/index.js +6 -6
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.js +3 -3
- package/internal/stores/data_style/mesh/polyhedra/vertex.js +3 -3
- package/internal/stores/data_style/mesh/polyhedra/visibility.js +1 -1
- package/internal/stores/data_style/model/edges.js +1 -1
- package/internal/stores/data_style/model/index.js +32 -22
- package/internal/utils/api_fetch.js +8 -5
- package/internal/utils/viewer_call.js +42 -46
- package/nuxt.config.js +3 -3
- package/package.json +1 -1
- package/scripts/generate_geode_objects.js +8 -7
- package/tests/integration/setup.js +28 -21
- package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +18 -10
- package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +18 -10
- package/tests/integration/stores/data_style/mesh/index.nuxt.test.js +9 -5
- package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +17 -10
- package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +18 -10
- package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +18 -10
- package/tests/integration/stores/data_style/model/blocks.nuxt.test.js +10 -6
- package/tests/integration/stores/data_style/model/corners.nuxt.test.js +10 -6
- package/tests/integration/stores/data_style/model/edges.nuxt.test.js +9 -5
- package/tests/integration/stores/data_style/model/index.nuxt.test.js +9 -5
- package/tests/integration/stores/data_style/model/lines.nuxt.test.js +10 -6
- package/tests/integration/stores/data_style/model/points.nuxt.test.js +9 -5
- package/tests/integration/stores/data_style/model/surfaces.nuxt.test.js +10 -6
- package/tests/integration/stores/viewer.nuxt.test.js +55 -39
- package/tests/setup_indexeddb.js +1 -0
- package/tests/unit/components/CrsSelector.nuxt.test.js +18 -19
- package/tests/unit/components/ExtensionSelector.nuxt.test.js +24 -19
- package/tests/unit/components/FeedBack/ErrorsBanner.nuxt.test.js +23 -36
- package/tests/unit/components/FeedBack/Snackers.nuxt.test.js +20 -25
- package/tests/unit/components/FileSelector.nuxt.test.js +27 -27
- package/tests/unit/components/FileUploader.nuxt.test.js +18 -17
- package/tests/unit/components/Inspector/InspectionButton.nuxt.test.js +9 -16
- package/tests/unit/components/Inspector/ResultPanel.nuxt.test.js +8 -6
- package/tests/unit/components/Launcher.nuxt.test.js +12 -17
- package/tests/unit/components/MissingFilesSelector.nuxt.test.js +16 -19
- package/tests/unit/components/ObjectSelector.nuxt.test.js +30 -34
- package/tests/unit/components/PackagesVersions.nuxt.test.js +8 -11
- package/tests/unit/components/Step.nuxt.test.js +8 -7
- package/tests/unit/components/Stepper.nuxt.test.js +14 -12
- package/tests/unit/composables/ProjectManager.nuxt.test.js +142 -100
- package/tests/unit/composables/api_fetch.nuxt.test.js +12 -39
- package/tests/unit/composables/run_function_when_microservices_connected.nuxt.test.js +36 -61
- package/tests/unit/composables/upload_file.nuxt.test.js +21 -25
- package/tests/unit/plugins/project_load.nuxt.test.js +22 -21
- package/tests/unit/stores/App.nuxt.test.js +45 -43
- package/tests/unit/stores/Feedback.nuxt.test.js +16 -18
- package/tests/unit/stores/Geode.nuxt.test.js +135 -137
- package/tests/unit/stores/Infra.nuxt.test.js +20 -26
- package/tests/unit/stores/Lambda.nuxt.test.js +30 -31
- package/tests/unit/stores/Treeview.nuxt.test.js +53 -55
- package/tests/unit/stores/Viewer.nuxt.test.js +16 -23
- package/tests/unit/utils/validate_schema.nuxt.test.js +18 -18
- package/tests/utils.js +15 -2
- package/tests/vitest.config.js +6 -2
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import ViewerGenericMeshEdgesOptions from "@ogw_front/components/Viewer/Generic/Mesh/EdgesOptions"
|
|
3
2
|
import PolygonalSurfaceEdges from "@ogw_front/assets/viewer_svgs/surface_edges.svg"
|
|
3
|
+
import ViewerGenericMeshEdgesOptions from "@ogw_front/components/Viewer/Generic/Mesh/EdgesOptions"
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const { itemProps } = defineProps({
|
|
6
6
|
itemProps: { type: Object, required: true },
|
|
7
7
|
})
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
11
|
<ViewerGenericMeshEdgesOptions
|
|
12
|
-
:itemProps="
|
|
12
|
+
:itemProps="itemProps"
|
|
13
13
|
:btn_image="PolygonalSurfaceEdges"
|
|
14
14
|
/>
|
|
15
15
|
</template>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import ViewerGenericMeshPointsOptions from "@ogw_front/components/Viewer/Generic/Mesh/PointsOptions"
|
|
3
2
|
import PolygonalSurfacePoints from "@ogw_front/assets/viewer_svgs/surface_points.svg"
|
|
3
|
+
import ViewerGenericMeshPointsOptions from "@ogw_front/components/Viewer/Generic/Mesh/PointsOptions"
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const { itemProps } = defineProps({
|
|
6
6
|
itemProps: { type: Object, required: true },
|
|
7
7
|
})
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
11
|
<ViewerGenericMeshPointsOptions
|
|
12
|
-
:itemProps="
|
|
12
|
+
:itemProps="itemProps"
|
|
13
13
|
:btn_image="PolygonalSurfacePoints"
|
|
14
14
|
/>
|
|
15
15
|
</template>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import PolygonalSurfacePolygons from "@ogw_front/assets/viewer_svgs/surface_triangles.svg"
|
|
2
3
|
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenuItem"
|
|
3
|
-
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch"
|
|
4
4
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector"
|
|
5
|
-
import
|
|
5
|
+
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch"
|
|
6
6
|
|
|
7
7
|
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
8
8
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer"
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
const dataStyleStore = useDataStyleStore()
|
|
11
11
|
const hybridViewerStore = useHybridViewerStore()
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const { itemProps } = defineProps({
|
|
14
14
|
itemProps: { type: Object, required: true },
|
|
15
15
|
tooltip: { type: String, required: false, default: "Polygons options" },
|
|
16
16
|
})
|
|
17
17
|
|
|
18
|
-
const id = toRef(() =>
|
|
18
|
+
const id = toRef(() => itemProps.id)
|
|
19
19
|
|
|
20
20
|
const visibility = computed({
|
|
21
21
|
get: () => dataStyleStore.meshPolygonsVisibility(id.value),
|
|
@@ -115,8 +115,8 @@
|
|
|
115
115
|
|
|
116
116
|
<template>
|
|
117
117
|
<ViewerContextMenuItem
|
|
118
|
-
:itemProps="
|
|
119
|
-
:tooltip="
|
|
118
|
+
:itemProps="itemProps"
|
|
119
|
+
:tooltip="tooltip"
|
|
120
120
|
:btn_image="PolygonalSurfacePolygons"
|
|
121
121
|
>
|
|
122
122
|
<template #options>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import ViewerGenericMeshEdgesOptions from "@ogw_front/components/Viewer/Generic/Mesh/EdgesOptions"
|
|
3
2
|
import SolidEdges from "@ogw_front/assets/viewer_svgs/solid_edges.svg"
|
|
3
|
+
import ViewerGenericMeshEdgesOptions from "@ogw_front/components/Viewer/Generic/Mesh/EdgesOptions"
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const { itemProps } = defineProps({
|
|
6
6
|
itemProps: { type: Object, required: true },
|
|
7
7
|
})
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
11
|
<ViewerGenericMeshEdgesOptions
|
|
12
|
-
:itemProps="
|
|
12
|
+
:itemProps="itemProps"
|
|
13
13
|
:btn_image="SolidEdges"
|
|
14
14
|
/>
|
|
15
15
|
</template>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import ViewerGenericMeshPointsOptions from "@ogw_front/components/Viewer/Generic/Mesh/PointsOptions"
|
|
3
2
|
import SolidPoints from "@ogw_front/assets/viewer_svgs/solid_points.svg"
|
|
3
|
+
import ViewerGenericMeshPointsOptions from "@ogw_front/components/Viewer/Generic/Mesh/PointsOptions"
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const { itemProps } = defineProps({
|
|
6
6
|
itemProps: { type: Object, required: true },
|
|
7
7
|
})
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
11
|
<ViewerGenericMeshPointsOptions
|
|
12
|
-
:itemProps="
|
|
12
|
+
:itemProps="itemProps"
|
|
13
13
|
:btn_image="SolidPoints"
|
|
14
14
|
/>
|
|
15
15
|
</template>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import ViewerGenericMeshPolygonsOptions from "@ogw_front/components/Viewer/Generic/Mesh/PolygonsOptions"
|
|
3
2
|
import SolidFacets from "@ogw_front/assets/viewer_svgs/solid_facets.svg"
|
|
3
|
+
import ViewerGenericMeshPolygonsOptions from "@ogw_front/components/Viewer/Generic/Mesh/PolygonsOptions"
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const { itemProps } = defineProps({
|
|
6
6
|
itemProps: { type: Object, required: true },
|
|
7
7
|
})
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
11
|
<ViewerGenericMeshPolygonsOptions
|
|
12
|
-
:itemProps="
|
|
12
|
+
:itemProps="itemProps"
|
|
13
13
|
:btn_image="SolidFacets"
|
|
14
14
|
/>
|
|
15
15
|
</template>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import SolidPolyhedra from "@ogw_front/assets/viewer_svgs/solid_polyhedra.svg"
|
|
2
3
|
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenuItem"
|
|
3
|
-
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch"
|
|
4
4
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector"
|
|
5
|
-
import
|
|
5
|
+
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch"
|
|
6
6
|
|
|
7
7
|
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
8
8
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer"
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
const dataStyleStore = useDataStyleStore()
|
|
11
11
|
const hybridViewerStore = useHybridViewerStore()
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const { itemProps } = defineProps({
|
|
14
14
|
itemProps: { type: Object, required: true },
|
|
15
15
|
tooltip: { type: String, required: false, default: "Polyhedra options" },
|
|
16
16
|
})
|
|
17
17
|
|
|
18
|
-
const id = toRef(() =>
|
|
18
|
+
const id = toRef(() => itemProps.id)
|
|
19
19
|
|
|
20
20
|
const visibility = computed({
|
|
21
21
|
get: () => dataStyleStore.meshPolyhedraVisibility(id.value),
|
|
@@ -108,8 +108,8 @@
|
|
|
108
108
|
</script>
|
|
109
109
|
<template>
|
|
110
110
|
<ViewerContextMenuItem
|
|
111
|
-
:itemProps="
|
|
112
|
-
:tooltip="
|
|
111
|
+
:itemProps="itemProps"
|
|
112
|
+
:tooltip="tooltip"
|
|
113
113
|
:btn_image="SolidPolyhedra"
|
|
114
114
|
>
|
|
115
115
|
<template #options>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import ViewerGenericMeshPolyhedraOptions from "@ogw_front/components/Viewer/Generic/Mesh/PolyhedraOptions"
|
|
3
2
|
import TetrahedralSolidTetrahedra from "@ogw_front/assets/viewer_svgs/solid_polyhedra.svg"
|
|
3
|
+
import ViewerGenericMeshPolyhedraOptions from "@ogw_front/components/Viewer/Generic/Mesh/PolyhedraOptions"
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const { itemProps } = defineProps({
|
|
6
6
|
itemProps: { type: Object, required: true },
|
|
7
7
|
})
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
11
|
<ViewerGenericMeshPolyhedraOptions
|
|
12
|
-
:itemProps="
|
|
12
|
+
:itemProps="itemProps"
|
|
13
13
|
:btn_image="TetrahedralSolidTetrahedra"
|
|
14
14
|
tooltip="Tetrahedra options"
|
|
15
15
|
/>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import ViewerGenericMeshPolygonsOptions from "@ogw_front/components/Viewer/Generic/Mesh/PolygonsOptions"
|
|
3
2
|
import TetrahedralSolidTriangles from "@ogw_front/assets/viewer_svgs/solid_facets.svg"
|
|
3
|
+
import ViewerGenericMeshPolygonsOptions from "@ogw_front/components/Viewer/Generic/Mesh/PolygonsOptions"
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const { itemProps } = defineProps({
|
|
6
6
|
itemProps: { type: Object, required: true },
|
|
7
7
|
})
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
11
|
<ViewerGenericMeshPolygonsOptions
|
|
12
|
-
:itemProps="
|
|
12
|
+
:itemProps="itemProps"
|
|
13
13
|
:btn_image="TetrahedralSolidTriangles"
|
|
14
14
|
tooltip="Triangles options"
|
|
15
15
|
/>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import ViewerBreadCrumb from "@ogw_front/components/Viewer/BreadCrumb"
|
|
3
|
-
import ViewerTreeObject from "@ogw_front/components/Viewer/TreeObject"
|
|
4
3
|
import ViewerTreeComponent from "@ogw_front/components/Viewer/TreeComponent"
|
|
4
|
+
import ViewerTreeObject from "@ogw_front/components/Viewer/TreeObject"
|
|
5
5
|
import { useTreeviewStore } from "@ogw_front/stores/treeview"
|
|
6
6
|
|
|
7
|
+
const WIDTH_MIN = 150
|
|
8
|
+
|
|
7
9
|
const treeviewStore = useTreeviewStore()
|
|
8
10
|
const emit = defineEmits(["show-menu"])
|
|
9
11
|
|
|
@@ -14,16 +16,16 @@
|
|
|
14
16
|
function onResizeStart(event) {
|
|
15
17
|
const startWidth = treeviewStore.panelWidth
|
|
16
18
|
const startX = event.clientX
|
|
17
|
-
|
|
18
|
-
const deltaX =
|
|
19
|
+
function resize(event) {
|
|
20
|
+
const deltaX = event.clientX - startX
|
|
19
21
|
const newWidth = Math.max(
|
|
20
|
-
|
|
22
|
+
WIDTH_MIN,
|
|
21
23
|
Math.min(startWidth + deltaX, window.innerWidth),
|
|
22
24
|
)
|
|
23
25
|
treeviewStore.setPanelWidth(newWidth)
|
|
24
26
|
document.body.style.userSelect = "none"
|
|
25
27
|
}
|
|
26
|
-
|
|
28
|
+
function stopResize() {
|
|
27
29
|
document.removeEventListener("mousemove", resize)
|
|
28
30
|
document.removeEventListener("mouseup", stopResize)
|
|
29
31
|
document.body.style.userSelect = ""
|
|
@@ -31,10 +33,6 @@
|
|
|
31
33
|
document.addEventListener("mousemove", resize)
|
|
32
34
|
document.addEventListener("mouseup", stopResize)
|
|
33
35
|
}
|
|
34
|
-
|
|
35
|
-
onMounted(() => {})
|
|
36
|
-
|
|
37
|
-
onUnmounted(() => {})
|
|
38
36
|
</script>
|
|
39
37
|
|
|
40
38
|
<template>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
3
2
|
import { useDataStore } from "@ogw_front/stores/data"
|
|
3
|
+
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
4
4
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer"
|
|
5
5
|
|
|
6
6
|
import { compareSelections } from "@ogw_front/utils/treeview"
|
|
@@ -9,36 +9,32 @@
|
|
|
9
9
|
const dataStore = useDataStore()
|
|
10
10
|
const hybridViewerStore = useHybridViewerStore()
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const { id } = defineProps({ id: { type: String, required: true } })
|
|
13
13
|
|
|
14
14
|
const emit = defineEmits(["show-menu"])
|
|
15
15
|
|
|
16
16
|
const items = ref([])
|
|
17
|
-
const mesh_components_selection = dataStyleStore.visibleMeshComponents(
|
|
18
|
-
props.id,
|
|
19
|
-
)
|
|
17
|
+
const mesh_components_selection = dataStyleStore.visibleMeshComponents(id)
|
|
20
18
|
|
|
21
19
|
watchEffect(async () => {
|
|
22
|
-
items.value = await dataStore.formatedMeshComponents(
|
|
20
|
+
items.value = await dataStore.formatedMeshComponents(id)
|
|
23
21
|
})
|
|
24
22
|
|
|
25
23
|
watch(
|
|
26
24
|
mesh_components_selection,
|
|
27
25
|
async (current, previous) => {
|
|
28
|
-
if (!previous)
|
|
26
|
+
if (!previous) {
|
|
27
|
+
return
|
|
28
|
+
}
|
|
29
29
|
|
|
30
30
|
const { added, removed } = compareSelections(current, previous)
|
|
31
31
|
|
|
32
32
|
if (added.length > 0) {
|
|
33
|
-
await dataStyleStore.setModelMeshComponentsVisibility(
|
|
34
|
-
props.id,
|
|
35
|
-
added,
|
|
36
|
-
true,
|
|
37
|
-
)
|
|
33
|
+
await dataStyleStore.setModelMeshComponentsVisibility(id, added, true)
|
|
38
34
|
}
|
|
39
35
|
if (removed.length > 0) {
|
|
40
36
|
await dataStyleStore.setModelMeshComponentsVisibility(
|
|
41
|
-
|
|
37
|
+
id,
|
|
42
38
|
removed,
|
|
43
39
|
false,
|
|
44
40
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { useTreeviewStore } from "@ogw_front/stores/treeview"
|
|
3
2
|
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
4
3
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer"
|
|
4
|
+
import { useTreeviewStore } from "@ogw_front/stores/treeview"
|
|
5
5
|
|
|
6
6
|
import { compareSelections } from "@ogw_front/utils/treeview"
|
|
7
7
|
|
|
@@ -18,17 +18,16 @@
|
|
|
18
18
|
watch(
|
|
19
19
|
() => treeviewStore.selection,
|
|
20
20
|
async (current, previous) => {
|
|
21
|
-
|
|
22
|
-
if (current
|
|
21
|
+
const oldSelection = previous || []
|
|
22
|
+
if (current === oldSelection) {
|
|
23
23
|
return
|
|
24
24
|
}
|
|
25
25
|
const { added, removed } = compareSelections(current, previous)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
26
|
+
const updates = [
|
|
27
|
+
...added.map((item) => dataStyleStore.setVisibility(item.id, true)),
|
|
28
|
+
...removed.map((item) => dataStyleStore.setVisibility(item.id, false)),
|
|
29
|
+
]
|
|
30
|
+
await Promise.all(updates)
|
|
32
31
|
hybridViewerStore.remoteRender()
|
|
33
32
|
},
|
|
34
33
|
)
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import ViewerGenericMeshEdgesOptions from "@ogw_front/components/Viewer/Generic/Mesh/EdgesOptions"
|
|
3
2
|
import SurfaceEdges from "@ogw_front/assets/viewer_svgs/surface_edges.svg"
|
|
3
|
+
import ViewerGenericMeshEdgesOptions from "@ogw_front/components/Viewer/Generic/Mesh/EdgesOptions"
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const { itemProps } = defineProps({
|
|
6
6
|
itemProps: { type: Object, required: true },
|
|
7
7
|
})
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
11
|
<ViewerGenericMeshEdgesOptions
|
|
12
|
-
:itemProps="
|
|
12
|
+
:itemProps="itemProps"
|
|
13
13
|
:btn_image="SurfaceEdges"
|
|
14
14
|
/>
|
|
15
15
|
</template>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import ViewerGenericMeshPointsOptions from "@ogw_front/components/Viewer/Generic/Mesh/PointsOptions"
|
|
3
2
|
import TriangulatedSurfaceEdgesPoints from "@ogw_front/assets/viewer_svgs/surface_points.svg"
|
|
3
|
+
import ViewerGenericMeshPointsOptions from "@ogw_front/components/Viewer/Generic/Mesh/PointsOptions"
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const { itemProps } = defineProps({
|
|
6
6
|
itemProps: { type: Object, required: true },
|
|
7
7
|
})
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
11
|
<ViewerGenericMeshPointsOptions
|
|
12
|
-
:itemProps="
|
|
12
|
+
:itemProps="itemProps"
|
|
13
13
|
:btn_image="TriangulatedSurfaceEdgesPoints"
|
|
14
14
|
/>
|
|
15
15
|
</template>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import ViewerSpecificPolygonsOptions from "@ogw_front/components/Viewer/PolygonalSurface/SpecificPolygonsOptions"
|
|
3
2
|
import TriangulatedSurfaceTriangles from "@ogw_front/assets/viewer_svgs/surface_triangles.svg"
|
|
3
|
+
import ViewerSpecificPolygonsOptions from "@ogw_front/components/Viewer/PolygonalSurface/SpecificPolygonsOptions"
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const { itemProps } = defineProps({
|
|
6
6
|
itemProps: { type: Object, required: true },
|
|
7
7
|
})
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
11
|
<ViewerSpecificPolygonsOptions
|
|
12
|
-
:itemProps="
|
|
12
|
+
:itemProps="itemProps"
|
|
13
13
|
:btn_image="TriangulatedSurfaceTriangles"
|
|
14
14
|
tooltip="Triangles options"
|
|
15
15
|
/>
|
|
@@ -5,15 +5,15 @@ import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schem
|
|
|
5
5
|
import { importWorkflowFromSnapshot } from "@ogw_front/utils/file_import_workflow"
|
|
6
6
|
|
|
7
7
|
import { useAppStore } from "@ogw_front/stores/app"
|
|
8
|
-
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
9
8
|
import { useDataStore } from "@ogw_front/stores/data"
|
|
9
|
+
import { useDataStyleStore } from "@ogw_front/stores/data_style"
|
|
10
10
|
import { useGeodeStore } from "@ogw_front/stores/geode"
|
|
11
11
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer"
|
|
12
12
|
import { useTreeviewStore } from "@ogw_front/stores/treeview"
|
|
13
13
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
14
14
|
|
|
15
15
|
export function useProjectManager() {
|
|
16
|
-
|
|
16
|
+
async function exportProject() {
|
|
17
17
|
console.log("[export triggered]")
|
|
18
18
|
const appStore = useAppStore()
|
|
19
19
|
const geodeStore = useGeodeStore()
|
|
@@ -23,14 +23,14 @@ export function useProjectManager() {
|
|
|
23
23
|
|
|
24
24
|
const result = await $fetch(schema.$id, {
|
|
25
25
|
baseURL: geodeStore.base_url,
|
|
26
|
-
method: schema.methods.
|
|
26
|
+
method: schema.methods.find((method) => method !== "OPTIONS"),
|
|
27
27
|
body: { snapshot, filename: defaultName },
|
|
28
28
|
})
|
|
29
29
|
fileDownload(result, defaultName)
|
|
30
30
|
return { result }
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
async function importProjectFile(file) {
|
|
34
34
|
const geodeStore = useGeodeStore()
|
|
35
35
|
const dataStyleStore = useDataStyleStore()
|
|
36
36
|
const viewerStore = useViewerStore()
|
|
@@ -40,7 +40,7 @@ export function useProjectManager() {
|
|
|
40
40
|
|
|
41
41
|
await viewerStore.ws_connect()
|
|
42
42
|
|
|
43
|
-
const client = viewerStore
|
|
43
|
+
const { client } = viewerStore
|
|
44
44
|
if (client && client.getConnection && client.getConnection().getSession) {
|
|
45
45
|
await client
|
|
46
46
|
.getConnection()
|
|
@@ -75,7 +75,7 @@ export function useProjectManager() {
|
|
|
75
75
|
|
|
76
76
|
treeviewStore.isImporting = true
|
|
77
77
|
|
|
78
|
-
const client2 = viewerStore
|
|
78
|
+
const { client: client2 } = viewerStore
|
|
79
79
|
if (
|
|
80
80
|
client2 &&
|
|
81
81
|
client2.getConnection &&
|
package/app/stores/app.js
CHANGED
|
@@ -22,23 +22,20 @@ export const useAppStore = defineStore("app", () => {
|
|
|
22
22
|
console.log(
|
|
23
23
|
`[AppStore] Exporting stores, total registered: ${stores.length}`,
|
|
24
24
|
)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
console.error(`[AppStore] Error exporting store "${storeId}":`, error)
|
|
40
|
-
}
|
|
41
|
-
}
|
|
25
|
+
await Promise.all(
|
|
26
|
+
stores.map(async (store) => {
|
|
27
|
+
if (!store.exportStores) {
|
|
28
|
+
return
|
|
29
|
+
}
|
|
30
|
+
const storeId = store.$id
|
|
31
|
+
try {
|
|
32
|
+
snapshot[storeId] = await store.exportStores(params)
|
|
33
|
+
exportCount += 1
|
|
34
|
+
} catch (error) {
|
|
35
|
+
console.error(`[AppStore] Error exporting store "${storeId}":`, error)
|
|
36
|
+
}
|
|
37
|
+
}),
|
|
38
|
+
)
|
|
42
39
|
console.log(
|
|
43
40
|
`[AppStore] Exported ${exportCount} stores; snapshot keys:`,
|
|
44
41
|
Object.keys(snapshot),
|
|
@@ -55,20 +52,24 @@ export const useAppStore = defineStore("app", () => {
|
|
|
55
52
|
|
|
56
53
|
let importedCount = 0
|
|
57
54
|
const notFoundStores = []
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
55
|
+
await Promise.all(
|
|
56
|
+
stores.map(async (store) => {
|
|
57
|
+
if (!store.importStores) {
|
|
58
|
+
return
|
|
59
|
+
}
|
|
60
|
+
const storeId = store.$id
|
|
61
|
+
if (!snapshot[storeId]) {
|
|
62
|
+
notFoundStores.push(storeId)
|
|
63
|
+
return
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
await store.importStores(snapshot[storeId])
|
|
67
|
+
importedCount += 1
|
|
68
|
+
} catch (error) {
|
|
69
|
+
console.error(`[AppStore] Error importing store "${storeId}":`, error)
|
|
70
|
+
}
|
|
71
|
+
}),
|
|
72
|
+
)
|
|
72
73
|
if (notFoundStores.length > 0) {
|
|
73
74
|
console.warn(
|
|
74
75
|
`[AppStore] Stores not found in snapshot: ${notFoundStores.join(", ")}`,
|
|
@@ -78,8 +79,8 @@ export const useAppStore = defineStore("app", () => {
|
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
const loadedExtensions = ref(new Map())
|
|
81
|
-
const extensionAPI = ref(
|
|
82
|
-
const codeTransformer = ref(
|
|
82
|
+
const extensionAPI = ref(undefined)
|
|
83
|
+
const codeTransformer = ref(undefined)
|
|
83
84
|
|
|
84
85
|
function setExtensionAPI(api) {
|
|
85
86
|
extensionAPI.value = api
|
|
@@ -93,7 +94,7 @@ export const useAppStore = defineStore("app", () => {
|
|
|
93
94
|
return loadedExtensions.value.get(id)
|
|
94
95
|
}
|
|
95
96
|
|
|
96
|
-
async function loadExtension(path, backendPath =
|
|
97
|
+
async function loadExtension(path, backendPath = undefined) {
|
|
97
98
|
try {
|
|
98
99
|
let finalURL = path
|
|
99
100
|
|
|
@@ -156,13 +157,14 @@ export const useAppStore = defineStore("app", () => {
|
|
|
156
157
|
}
|
|
157
158
|
|
|
158
159
|
function getLoadedExtensions() {
|
|
159
|
-
return
|
|
160
|
+
return [...loadedExtensions.value.values()]
|
|
160
161
|
}
|
|
161
162
|
|
|
162
163
|
function unloadExtension(id) {
|
|
163
164
|
const extensionData = getExtension(id)
|
|
164
|
-
if (!extensionData)
|
|
165
|
-
|
|
165
|
+
if (!extensionData) {
|
|
166
|
+
return false
|
|
167
|
+
}
|
|
166
168
|
if (
|
|
167
169
|
extensionData.module &&
|
|
168
170
|
typeof extensionData.module.uninstall === "function"
|
|
@@ -189,8 +191,9 @@ export const useAppStore = defineStore("app", () => {
|
|
|
189
191
|
|
|
190
192
|
function toggleExtension(id) {
|
|
191
193
|
const extensionData = getExtension(id)
|
|
192
|
-
if (!extensionData)
|
|
193
|
-
|
|
194
|
+
if (!extensionData) {
|
|
195
|
+
return false
|
|
196
|
+
}
|
|
194
197
|
extensionData.enabled = !extensionData.enabled
|
|
195
198
|
console.log(
|
|
196
199
|
`[AppStore] Extension ${extensionData.enabled ? "enabled" : "disabled"}: ${id}`,
|
|
@@ -200,8 +203,9 @@ export const useAppStore = defineStore("app", () => {
|
|
|
200
203
|
|
|
201
204
|
function setExtensionEnabled(id, enabled) {
|
|
202
205
|
const extensionData = getExtension(id)
|
|
203
|
-
if (!extensionData)
|
|
204
|
-
|
|
206
|
+
if (!extensionData) {
|
|
207
|
+
return false
|
|
208
|
+
}
|
|
205
209
|
extensionData.enabled = enabled
|
|
206
210
|
console.log(
|
|
207
211
|
`[AppStore] Extension ${enabled ? "enabled" : "disabled"}: ${id}`,
|