@geode/opengeodeweb-front 10.44.0-rc.5 → 10.44.0-rc.6

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.
@@ -13,6 +13,7 @@ import PointSet3D from "@ogw_front/assets/img/geode_objects/PointSet3D.svg";
13
13
  import PolygonalSurface2D from "@ogw_front/assets/img/geode_objects/PolygonalSurface2D.svg";
14
14
  import PolygonalSurface3D from "@ogw_front/assets/img/geode_objects/PolygonalSurface3D.svg";
15
15
  import PolyhedralSolid3D from "@ogw_front/assets/img/geode_objects/PolyhedralSolid3D.svg";
16
+ // oxlint-disable-next-line import/max-dependencies -- one icon import per geode object.
16
17
  import RasterImage2D from "@ogw_front/assets/img/geode_objects/RasterImage2D.svg";
17
18
  import RasterImage3D from "@ogw_front/assets/img/geode_objects/RasterImage3D.svg";
18
19
  import RegularGrid2D from "@ogw_front/assets/img/geode_objects/RegularGrid2D.svg";
@@ -1,5 +1,4 @@
1
1
  <script setup lang="ts">
2
- // oxlint-disable max-dependencies
3
2
  import {
4
3
  type ViewerIdResult,
5
4
  useOverlappingPicker,
@@ -1,37 +1,12 @@
1
- import back_schemas, {
2
- type CRSList,
3
- } from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
1
+ import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
4
2
  import fileDownload from "js-file-download";
5
- import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
6
3
 
7
- import { type DataStyleSnapshot, useDataStyleStore } from "@ogw_front/stores/data_style";
8
- import { type NewDataItem, useDataStore } from "@ogw_front/stores/data";
9
- import { type TreeviewSnapshot, useTreeviewStore } from "@ogw_front/stores/treeview";
10
- import type { CameraSnapshot } from "@ogw_internal/stores/hybrid_viewer/camera";
11
- import type { ModelComponentRecord } from "@ogw_front/stores/data_helpers/mesh.js";
12
- import type { ModelComponentRelationRecord } from "@ogw_front/stores/data.js";
13
- import { importWorkflowFromSnapshot } from "@ogw_front/utils/import_workflow";
14
- import { oldestCrs } from "@ogw_front/utils/crs";
4
+ import type { ProjectSnapshot } from "@ogw_front/composables/project_manager_helpers/types";
5
+ import { resetProject } from "@ogw_front/composables/project_manager_helpers/reset";
6
+ import { restoreProject } from "@ogw_front/composables/project_manager_helpers/restore";
15
7
  import { useAppStore } from "@ogw_front/stores/app";
16
8
  import { useBackStore } from "@ogw_front/stores/back";
17
- import { useCrsStore } from "@ogw_front/stores/crs";
18
9
  import { useFeedbackStore } from "@ogw_front/stores/feedback";
19
- import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
20
- import { useViewerStore } from "@ogw_front/stores/viewer";
21
-
22
- interface ProjectDataSnapshot {
23
- items: NewDataItem[];
24
- modelComponents: ModelComponentRecord[];
25
- modelComponentsRelations: ModelComponentRelationRecord[];
26
- }
27
-
28
- interface ProjectSnapshot {
29
- treeview?: TreeviewSnapshot;
30
- data?: ProjectDataSnapshot;
31
- hybridViewer?: CameraSnapshot;
32
- dataStyle?: DataStyleSnapshot;
33
- crs?: { projectCrs?: CRSList };
34
- }
35
10
 
36
11
  async function exportProject(): Promise<{ result: Blob }> {
37
12
  const appStore = useAppStore();
@@ -47,50 +22,10 @@ async function exportProject(): Promise<{ result: Blob }> {
47
22
  return { result };
48
23
  }
49
24
 
50
- async function releaseViewerDatabase(
51
- client: ReturnType<typeof useViewerStore>["client"],
52
- ): Promise<void> {
53
- if (
54
- client !== undefined &&
55
- client.getConnection !== undefined &&
56
- client.getConnection().getSession !== undefined
57
- ) {
58
- await client.getConnection().getSession().call("opengeodeweb_viewer.release_database", [{}]);
59
- }
60
- }
61
-
62
- async function importProjectToViewer(
63
- client: ReturnType<typeof useViewerStore>["client"],
64
- ): Promise<void> {
65
- if (
66
- client !== undefined &&
67
- client.getConnection !== undefined &&
68
- client.getConnection().getSession !== undefined
69
- ) {
70
- await client.getConnection().getSession().call("opengeodeweb_viewer.import_project", [{}]);
71
- }
72
- }
73
-
74
25
  async function importProject(file: File): Promise<void> {
75
26
  const backStore = useBackStore();
76
- const dataStyleStore = useDataStyleStore();
77
- const viewerStore = useViewerStore();
78
- const dataStore = useDataStore();
79
- const treeviewStore = useTreeviewStore();
80
- const hybridViewerStore = useHybridViewerStore();
81
- const crsStore = useCrsStore();
82
-
83
- await viewerStore.ws_connect();
84
-
85
- await releaseViewerDatabase(viewerStore.client);
86
- const resetVisualizationSchema = viewer_schemas.opengeodeweb_viewer.viewer.reset_visualization;
87
- const timeout = undefined;
88
- await viewerStore.request({ schema: resetVisualizationSchema, timeout });
89
27
 
90
- treeviewStore.clear();
91
- await dataStore.clear();
92
- hybridViewerStore.clear();
93
- crsStore.reset();
28
+ await resetProject();
94
29
 
95
30
  const importProjectSchema = back_schemas.opengeodeweb_back.import_project;
96
31
  const form = new FormData();
@@ -103,34 +38,8 @@ async function importProject(file: File): Promise<void> {
103
38
  const result = await backStore.request({ schema: importProjectSchema, params: form });
104
39
  const snapshot: ProjectSnapshot = result.snapshot;
105
40
 
106
- treeviewStore.isImporting = true;
107
-
108
- await importProjectToViewer(viewerStore.client);
109
-
110
- treeviewStore.importStores(snapshot.treeview);
111
- if (snapshot.data !== undefined) {
112
- await dataStore.importStores(snapshot.data);
113
- }
114
- await hybridViewerStore.initHybridViewer();
115
-
116
- const items = snapshot.data?.items ?? [];
117
- await importWorkflowFromSnapshot(items);
118
- // After every data item is added: on partial data the project CRS would follow them.
119
- // A project saved without a project CRS takes the one of its oldest data, read in the
120
- // Snapshot: the stored items carry the import time as creation date
121
- if (snapshot.crs?.projectCrs === undefined) {
122
- crsStore.importStores({ projectCrs: oldestCrs(snapshot.data?.items ?? []) });
123
- } else {
124
- crsStore.importStores(snapshot.crs);
125
- }
126
- await hybridViewerStore.importStores(snapshot.hybridViewer);
127
- if (snapshot.dataStyle !== undefined) {
128
- await dataStyleStore.importStores(snapshot.dataStyle);
129
- }
130
- await dataStyleStore.applyAllStylesFromState();
41
+ await restoreProject(snapshot);
131
42
 
132
- treeviewStore.finalizeImportSelection();
133
- treeviewStore.isImporting = false;
134
43
  const feedbackStore = useFeedbackStore();
135
44
  feedbackStore.add_success("Project imported successfully");
136
45
  }
@@ -0,0 +1,31 @@
1
+ import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
2
+
3
+ import { releaseViewerDatabase } from "@ogw_front/composables/project_manager_helpers/viewer_session";
4
+ import { useCrsStore } from "@ogw_front/stores/crs";
5
+ import { useDataStore } from "@ogw_front/stores/data";
6
+ import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
7
+ import { useTreeviewStore } from "@ogw_front/stores/treeview";
8
+ import { useViewerStore } from "@ogw_front/stores/viewer";
9
+
10
+ // Empties the viewer and every store, ready to receive an imported project.
11
+ async function resetProject(): Promise<void> {
12
+ const viewerStore = useViewerStore();
13
+ const dataStore = useDataStore();
14
+ const treeviewStore = useTreeviewStore();
15
+ const hybridViewerStore = useHybridViewerStore();
16
+ const crsStore = useCrsStore();
17
+
18
+ await viewerStore.ws_connect();
19
+
20
+ await releaseViewerDatabase(viewerStore.client);
21
+ const resetVisualizationSchema = viewer_schemas.opengeodeweb_viewer.viewer.reset_visualization;
22
+ const timeout = undefined;
23
+ await viewerStore.request({ schema: resetVisualizationSchema, timeout });
24
+
25
+ treeviewStore.clear();
26
+ await dataStore.clear();
27
+ hybridViewerStore.clear();
28
+ crsStore.reset();
29
+ }
30
+
31
+ export { resetProject };
@@ -0,0 +1,55 @@
1
+ import type { ProjectSnapshot } from "@ogw_front/composables/project_manager_helpers/types";
2
+ import { importProjectToViewer } from "@ogw_front/composables/project_manager_helpers/viewer_session";
3
+ import { importWorkflowFromSnapshot } from "@ogw_front/utils/import_workflow";
4
+ import { oldestCrs } from "@ogw_front/utils/crs";
5
+ import { useCrsStore } from "@ogw_front/stores/crs";
6
+ import { useDataStore } from "@ogw_front/stores/data";
7
+ import { useDataStyleStore } from "@ogw_front/stores/data_style";
8
+ import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
9
+ import { useTreeviewStore } from "@ogw_front/stores/treeview";
10
+ import { useViewerStore } from "@ogw_front/stores/viewer";
11
+
12
+ // After every data item is added: on partial data the project CRS would follow them.
13
+ // A project saved without a project CRS takes the one of its oldest data, read in the
14
+ // Snapshot: the stored items carry the import time as creation date
15
+ function restoreCrs(snapshot: ProjectSnapshot): void {
16
+ const crsStore = useCrsStore();
17
+ if (snapshot.crs?.projectCrs === undefined) {
18
+ crsStore.importStores({ projectCrs: oldestCrs(snapshot.data?.items ?? []) });
19
+ } else {
20
+ crsStore.importStores(snapshot.crs);
21
+ }
22
+ }
23
+
24
+ // Loads a project snapshot into the (already reset) viewer and stores.
25
+ async function restoreProject(snapshot: ProjectSnapshot): Promise<void> {
26
+ const dataStyleStore = useDataStyleStore();
27
+ const viewerStore = useViewerStore();
28
+ const dataStore = useDataStore();
29
+ const treeviewStore = useTreeviewStore();
30
+ const hybridViewerStore = useHybridViewerStore();
31
+
32
+ treeviewStore.isImporting = true;
33
+
34
+ await importProjectToViewer(viewerStore.client);
35
+
36
+ treeviewStore.importStores(snapshot.treeview);
37
+ if (snapshot.data !== undefined) {
38
+ await dataStore.importStores(snapshot.data);
39
+ }
40
+ await hybridViewerStore.initHybridViewer();
41
+
42
+ const items = snapshot.data?.items ?? [];
43
+ await importWorkflowFromSnapshot(items);
44
+ restoreCrs(snapshot);
45
+ await hybridViewerStore.importStores(snapshot.hybridViewer);
46
+ if (snapshot.dataStyle !== undefined) {
47
+ await dataStyleStore.importStores(snapshot.dataStyle);
48
+ }
49
+ await dataStyleStore.applyAllStylesFromState();
50
+
51
+ treeviewStore.finalizeImportSelection();
52
+ treeviewStore.isImporting = false;
53
+ }
54
+
55
+ export { restoreProject };
@@ -0,0 +1,22 @@
1
+ import type { ModelComponentRelationRecord, NewDataItem } from "@ogw_front/stores/data";
2
+ import type { CRSList } from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
3
+ import type { CameraSnapshot } from "@ogw_internal/stores/hybrid_viewer/camera";
4
+ import type { DataStyleSnapshot } from "@ogw_front/stores/data_style";
5
+ import type { ModelComponentRecord } from "@ogw_front/stores/data_helpers/mesh.js";
6
+ import type { TreeviewSnapshot } from "@ogw_front/stores/treeview";
7
+
8
+ interface ProjectDataSnapshot {
9
+ items: NewDataItem[];
10
+ modelComponents: ModelComponentRecord[];
11
+ modelComponentsRelations: ModelComponentRelationRecord[];
12
+ }
13
+
14
+ interface ProjectSnapshot {
15
+ treeview?: TreeviewSnapshot;
16
+ data?: ProjectDataSnapshot;
17
+ hybridViewer?: CameraSnapshot;
18
+ dataStyle?: DataStyleSnapshot;
19
+ crs?: { projectCrs?: CRSList };
20
+ }
21
+
22
+ export type { ProjectSnapshot };
@@ -0,0 +1,25 @@
1
+ import type { useViewerStore } from "@ogw_front/stores/viewer";
2
+
3
+ type ViewerClient = ReturnType<typeof useViewerStore>["client"];
4
+
5
+ async function releaseViewerDatabase(client: ViewerClient): Promise<void> {
6
+ if (
7
+ client !== undefined &&
8
+ client.getConnection !== undefined &&
9
+ client.getConnection().getSession !== undefined
10
+ ) {
11
+ await client.getConnection().getSession().call("opengeodeweb_viewer.release_database", [{}]);
12
+ }
13
+ }
14
+
15
+ async function importProjectToViewer(client: ViewerClient): Promise<void> {
16
+ if (
17
+ client !== undefined &&
18
+ client.getConnection !== undefined &&
19
+ client.getConnection().getSession !== undefined
20
+ ) {
21
+ await client.getConnection().getSession().call("opengeodeweb_viewer.import_project", [{}]);
22
+ }
23
+ }
24
+
25
+ export { importProjectToViewer, releaseViewerDatabase };
@@ -1,127 +1,23 @@
1
- // PointSet components
2
- import PointSetPointsOptions from "@ogw_front/components/Viewer/PointSet/SpecificPointsOptions.vue";
3
-
4
- // EdgedCurve components
5
- import EdgedCurveEdgesOptions from "@ogw_front/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue";
6
- import EdgedCurvePointsOptions from "@ogw_front/components/Viewer/EdgedCurve/PointsOptions.vue";
7
-
8
- // Surface components
9
- import SurfaceEdgesOptions from "@ogw_front/components/Viewer/Surface/EdgesOptions.vue";
10
- import SurfacePointsOptions from "@ogw_front/components/Viewer/Surface/PointsOptions.vue";
11
- import SurfacePolygonsOptions from "@ogw_front/components/Viewer/Surface/PolygonsOptions.vue";
12
-
13
- // TriangulatedSurface components
14
- import TriangulatedSurfaceTrianglesOptions from "@ogw_front/components/Viewer/Surface/Triangulated/TrianglesOptions.vue";
15
-
16
- // Grid 2D components
17
- import Grid2DCellsOptions from "@ogw_front/components/Viewer/Grid/2D/CellsOptions.vue";
18
- import Grid2DEdgesOptions from "@ogw_front/components/Viewer/Grid/2D/EdgesOptions.vue";
19
- import Grid2DPointsOptions from "@ogw_front/components/Viewer/Grid/2D/PointsOptions.vue";
20
-
21
- // Grid 3D components
22
- import Grid3DCellsOptions from "@ogw_front/components/Viewer/Grid/3D/CellsOptions.vue";
23
- import Grid3DEdgesOptions from "@ogw_front/components/Viewer/Grid/3D/EdgesOptions.vue";
24
- import Grid3DPointsOptions from "@ogw_front/components/Viewer/Grid/3D/PointsOptions.vue";
25
-
26
- // Solid components
27
- import SolidEdgesOptions from "@ogw_front/components/Viewer/Solid/EdgesOptions.vue";
28
- import SolidPointsOptions from "@ogw_front/components/Viewer/Solid/PointsOptions.vue";
29
- import SolidPolygonsOptions from "@ogw_front/components/Viewer/Solid/PolygonsOptions.vue";
30
- import SolidPolyhedraOptions from "@ogw_front/components/Viewer/Solid/SpecificPolyhedraOptions.vue";
31
-
32
- // TetrahedralSolid components
33
- import TetrahedralSolidTetrahedraOptions from "@ogw_front/components/Viewer/TetrahedralSolid/TetrahedraOptions.vue";
34
- import TetrahedralSolidTrianglesOptions from "@ogw_front/components/Viewer/TetrahedralSolid/TrianglesOptions.vue";
35
-
36
- // Model components
37
- import ModelEdgesOptions from "@ogw_front/components/Viewer/Generic/Model/EdgesOptions.vue";
38
- import ModelPointsOptions from "@ogw_front/components/Viewer/Generic/Model/PointsOptions.vue";
39
- import ModelStyleOptions from "@ogw_front/components/Viewer/Generic/Model/ModelStyleOptions.vue";
40
-
41
- import type { Component } from "vue";
42
-
43
- type MenuItems = Component[];
44
-
45
- const PointSet_menu = [PointSetPointsOptions];
46
-
47
- const EdgedCurve_menu = [EdgedCurvePointsOptions, EdgedCurveEdgesOptions];
48
-
49
- const PolygonalSurface_menu = [SurfacePointsOptions, SurfaceEdgesOptions, SurfacePolygonsOptions];
50
-
51
- const TriangulatedSurface_menu = [
52
- SurfacePointsOptions,
53
- SurfaceEdgesOptions,
54
- TriangulatedSurfaceTrianglesOptions,
55
- ];
56
-
57
- const Grid2D_menu = [Grid2DPointsOptions, Grid2DEdgesOptions, Grid2DCellsOptions];
58
- const Grid3D_menu = [
59
- Grid3DPointsOptions,
60
- Grid3DEdgesOptions,
61
- // Grid3DFacetsOptions,
62
- Grid3DCellsOptions,
63
- ];
64
-
65
- const Solid_menu = [
66
- SolidPointsOptions,
67
- SolidEdgesOptions,
68
- SolidPolygonsOptions,
69
- SolidPolyhedraOptions,
70
- ];
71
-
72
- const TetrahedralSolid_menu = [
73
- SolidPointsOptions,
74
- SolidEdgesOptions,
75
- TetrahedralSolidTrianglesOptions,
76
- TetrahedralSolidTetrahedraOptions,
77
- ];
78
-
79
- const BRep_menu = [ModelEdgesOptions, ModelPointsOptions, ModelStyleOptions];
80
-
81
- const CrossSection_menu = [ModelEdgesOptions, ModelPointsOptions, ModelStyleOptions];
82
-
83
- const ImplicitCrossSection_menu = [ModelEdgesOptions, ModelPointsOptions, ModelStyleOptions];
84
- const ImplicitStructuralModel_menu = [ModelEdgesOptions, ModelPointsOptions, ModelStyleOptions];
85
-
86
- const Section_menu = [ModelEdgesOptions, ModelPointsOptions, ModelStyleOptions];
87
-
88
- const StructuralModel_menu = [ModelEdgesOptions, ModelPointsOptions, ModelStyleOptions];
89
-
90
- const ModelComponent_menu = [ModelEdgesOptions, ModelPointsOptions, ModelStyleOptions];
1
+ import { modelComponentMenus, modelComponentTypeMenus, modelMenus } from "./model.js";
2
+ import type { MenuItems } from "./types.js";
3
+ import { edgedCurveMenus } from "./mesh/edged_curve.js";
4
+ import { gridMenus } from "./mesh/grid.js";
5
+ import { pointSetMenus } from "./mesh/point_set.js";
6
+ import { solidMenus } from "./mesh/solid.js";
7
+ import { surfaceMenus } from "./mesh/surface.js";
91
8
 
92
9
  const menusData: Record<string, Record<string, MenuItems>> = {
93
10
  mesh: {
94
- EdgedCurve2D: EdgedCurve_menu,
95
- EdgedCurve3D: EdgedCurve_menu,
96
- HybridSolid3D: Solid_menu,
97
- LightRegularGrid2D: Grid2D_menu,
98
- LightRegularGrid3D: Grid3D_menu,
99
- PointSet2D: PointSet_menu,
100
- PointSet3D: PointSet_menu,
101
- PolygonalSurface2D: PolygonalSurface_menu,
102
- PolygonalSurface3D: PolygonalSurface_menu,
103
- PolyhedralSolid3D: Solid_menu,
104
- RegularGrid2D: Grid2D_menu,
105
- RegularGrid3D: Grid3D_menu,
106
- TetrahedralSolid3D: TetrahedralSolid_menu,
107
- TriangulatedSurface2D: TriangulatedSurface_menu,
108
- TriangulatedSurface3D: TriangulatedSurface_menu,
109
- },
110
- model: {
111
- BRep: BRep_menu,
112
- CrossSection: CrossSection_menu,
113
- ImplicitCrossSection: ImplicitCrossSection_menu,
114
- ImplicitStructuralModel: ImplicitStructuralModel_menu,
115
- Section: Section_menu,
116
- StructuralModel: StructuralModel_menu,
117
- },
118
- model_component_type: {
119
- type: ModelComponent_menu,
120
- },
121
- model_component: {
122
- component: ModelComponent_menu,
11
+ ...edgedCurveMenus,
12
+ ...gridMenus,
13
+ ...pointSetMenus,
14
+ ...solidMenus,
15
+ ...surfaceMenus,
123
16
  },
17
+ model: modelMenus,
18
+ model_component_type: modelComponentTypeMenus,
19
+ model_component: modelComponentMenus,
124
20
  };
125
21
 
126
22
  export { menusData };
127
- export type { MenuItems };
23
+ export type { MenuItems } from "./types.js";
@@ -0,0 +1,12 @@
1
+ import EdgedCurveEdgesOptions from "@ogw_front/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue";
2
+ import EdgedCurvePointsOptions from "@ogw_front/components/Viewer/EdgedCurve/PointsOptions.vue";
3
+ import type { MenuItems } from "@ogw_front/stores/menu_helpers/types";
4
+
5
+ const EdgedCurve_menu = [EdgedCurvePointsOptions, EdgedCurveEdgesOptions];
6
+
7
+ const edgedCurveMenus: Record<string, MenuItems> = {
8
+ EdgedCurve2D: EdgedCurve_menu,
9
+ EdgedCurve3D: EdgedCurve_menu,
10
+ };
11
+
12
+ export { edgedCurveMenus };
@@ -0,0 +1,24 @@
1
+ import Grid2DCellsOptions from "@ogw_front/components/Viewer/Grid/2D/CellsOptions.vue";
2
+ import Grid2DEdgesOptions from "@ogw_front/components/Viewer/Grid/2D/EdgesOptions.vue";
3
+ import Grid2DPointsOptions from "@ogw_front/components/Viewer/Grid/2D/PointsOptions.vue";
4
+ import Grid3DCellsOptions from "@ogw_front/components/Viewer/Grid/3D/CellsOptions.vue";
5
+ import Grid3DEdgesOptions from "@ogw_front/components/Viewer/Grid/3D/EdgesOptions.vue";
6
+ import Grid3DPointsOptions from "@ogw_front/components/Viewer/Grid/3D/PointsOptions.vue";
7
+ import type { MenuItems } from "@ogw_front/stores/menu_helpers/types";
8
+
9
+ const Grid2D_menu = [Grid2DPointsOptions, Grid2DEdgesOptions, Grid2DCellsOptions];
10
+ const Grid3D_menu = [
11
+ Grid3DPointsOptions,
12
+ Grid3DEdgesOptions,
13
+ // Grid3DFacetsOptions,
14
+ Grid3DCellsOptions,
15
+ ];
16
+
17
+ const gridMenus: Record<string, MenuItems> = {
18
+ LightRegularGrid2D: Grid2D_menu,
19
+ LightRegularGrid3D: Grid3D_menu,
20
+ RegularGrid2D: Grid2D_menu,
21
+ RegularGrid3D: Grid3D_menu,
22
+ };
23
+
24
+ export { gridMenus };
@@ -0,0 +1,11 @@
1
+ import type { MenuItems } from "@ogw_front/stores/menu_helpers/types";
2
+ import PointSetPointsOptions from "@ogw_front/components/Viewer/PointSet/SpecificPointsOptions.vue";
3
+
4
+ const PointSet_menu = [PointSetPointsOptions];
5
+
6
+ const pointSetMenus: Record<string, MenuItems> = {
7
+ PointSet2D: PointSet_menu,
8
+ PointSet3D: PointSet_menu,
9
+ };
10
+
11
+ export { pointSetMenus };
@@ -0,0 +1,29 @@
1
+ import type { MenuItems } from "@ogw_front/stores/menu_helpers/types";
2
+ import SolidEdgesOptions from "@ogw_front/components/Viewer/Solid/EdgesOptions.vue";
3
+ import SolidPointsOptions from "@ogw_front/components/Viewer/Solid/PointsOptions.vue";
4
+ import SolidPolygonsOptions from "@ogw_front/components/Viewer/Solid/PolygonsOptions.vue";
5
+ import SolidPolyhedraOptions from "@ogw_front/components/Viewer/Solid/SpecificPolyhedraOptions.vue";
6
+ import TetrahedralSolidTetrahedraOptions from "@ogw_front/components/Viewer/TetrahedralSolid/TetrahedraOptions.vue";
7
+ import TetrahedralSolidTrianglesOptions from "@ogw_front/components/Viewer/TetrahedralSolid/TrianglesOptions.vue";
8
+
9
+ const Solid_menu = [
10
+ SolidPointsOptions,
11
+ SolidEdgesOptions,
12
+ SolidPolygonsOptions,
13
+ SolidPolyhedraOptions,
14
+ ];
15
+
16
+ const TetrahedralSolid_menu = [
17
+ SolidPointsOptions,
18
+ SolidEdgesOptions,
19
+ TetrahedralSolidTrianglesOptions,
20
+ TetrahedralSolidTetrahedraOptions,
21
+ ];
22
+
23
+ const solidMenus: Record<string, MenuItems> = {
24
+ HybridSolid3D: Solid_menu,
25
+ PolyhedralSolid3D: Solid_menu,
26
+ TetrahedralSolid3D: TetrahedralSolid_menu,
27
+ };
28
+
29
+ export { solidMenus };
@@ -0,0 +1,22 @@
1
+ import type { MenuItems } from "@ogw_front/stores/menu_helpers/types";
2
+ import SurfaceEdgesOptions from "@ogw_front/components/Viewer/Surface/EdgesOptions.vue";
3
+ import SurfacePointsOptions from "@ogw_front/components/Viewer/Surface/PointsOptions.vue";
4
+ import SurfacePolygonsOptions from "@ogw_front/components/Viewer/Surface/PolygonsOptions.vue";
5
+ import TriangulatedSurfaceTrianglesOptions from "@ogw_front/components/Viewer/Surface/Triangulated/TrianglesOptions.vue";
6
+
7
+ const PolygonalSurface_menu = [SurfacePointsOptions, SurfaceEdgesOptions, SurfacePolygonsOptions];
8
+
9
+ const TriangulatedSurface_menu = [
10
+ SurfacePointsOptions,
11
+ SurfaceEdgesOptions,
12
+ TriangulatedSurfaceTrianglesOptions,
13
+ ];
14
+
15
+ const surfaceMenus: Record<string, MenuItems> = {
16
+ PolygonalSurface2D: PolygonalSurface_menu,
17
+ PolygonalSurface3D: PolygonalSurface_menu,
18
+ TriangulatedSurface2D: TriangulatedSurface_menu,
19
+ TriangulatedSurface3D: TriangulatedSurface_menu,
20
+ };
21
+
22
+ export { surfaceMenus };
@@ -0,0 +1,25 @@
1
+ import type { MenuItems } from "./types.js";
2
+ import ModelEdgesOptions from "@ogw_front/components/Viewer/Generic/Model/EdgesOptions.vue";
3
+ import ModelPointsOptions from "@ogw_front/components/Viewer/Generic/Model/PointsOptions.vue";
4
+ import ModelStyleOptions from "@ogw_front/components/Viewer/Generic/Model/ModelStyleOptions.vue";
5
+
6
+ const Model_menu = [ModelEdgesOptions, ModelPointsOptions, ModelStyleOptions];
7
+
8
+ const modelMenus: Record<string, MenuItems> = {
9
+ BRep: Model_menu,
10
+ CrossSection: Model_menu,
11
+ ImplicitCrossSection: Model_menu,
12
+ ImplicitStructuralModel: Model_menu,
13
+ Section: Model_menu,
14
+ StructuralModel: Model_menu,
15
+ };
16
+
17
+ const modelComponentTypeMenus: Record<string, MenuItems> = {
18
+ type: Model_menu,
19
+ };
20
+
21
+ const modelComponentMenus: Record<string, MenuItems> = {
22
+ component: Model_menu,
23
+ };
24
+
25
+ export { modelComponentMenus, modelComponentTypeMenus, modelMenus };
@@ -0,0 +1,5 @@
1
+ import type { Component } from "vue";
2
+
3
+ type MenuItems = Component[];
4
+
5
+ export type { MenuItems };
@@ -27,7 +27,6 @@ import type {
27
27
  RequestHandlers,
28
28
  ResponseOf,
29
29
  } from "@ogw_shared/utils/types.js";
30
- // oxlint-disable-next-line import/max-dependencies -- all imports above are required by this store.
31
30
  import type { RpcClient } from "@ogw_shared/utils/call_raw.js";
32
31
 
33
32
  interface PickedPoint {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geode/opengeodeweb-front",
3
- "version": "10.44.0-rc.5",
3
+ "version": "10.44.0-rc.6",
4
4
  "description": "OpenSource Vue/Nuxt/Pinia/Vuetify framework for web applications",
5
5
  "homepage": "https://github.com/Geode-solutions/OpenGeodeWeb-Front",
6
6
  "bugs": {