@geode/opengeodeweb-front 9.11.2 → 9.11.3-rc.3

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.
Files changed (83) hide show
  1. package/.github/workflows/test.yml +2 -0
  2. package/.github/workflows/test_pr.yml +2 -0
  3. package/components/FeedBack/ErrorBanner.vue +1 -1
  4. package/components/FeedBack/Snackers.vue +1 -1
  5. package/components/HybridRenderingView.vue +35 -12
  6. package/components/Launcher.vue +1 -1
  7. package/components/PackagesVersions.vue +1 -1
  8. package/components/Recaptcha.vue +1 -1
  9. package/components/RemoteRenderingView.vue +1 -1
  10. package/components/Viewer/BreadCrumb.vue +1 -1
  11. package/components/Viewer/Generic/Mesh/EdgesOptions.vue +2 -2
  12. package/components/Viewer/Generic/Mesh/PolygonsOptions.vue +2 -2
  13. package/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +2 -2
  14. package/components/Viewer/Generic/Model/EdgesOptions.vue +2 -2
  15. package/components/Viewer/Generic/Model/PointsOptions.vue +2 -2
  16. package/components/Viewer/Options/PolygonAttributeSelector.vue +1 -8
  17. package/components/Viewer/Options/PolyhedronAttributeSelector.vue +1 -7
  18. package/components/Viewer/Options/TextureItem.vue +1 -8
  19. package/components/Viewer/Options/VertexAttributeSelector.vue +1 -5
  20. package/components/Viewer/PointSet/SpecificPointsOptions.vue +2 -2
  21. package/components/Viewer/Tree/ObjectTree.vue +7 -23
  22. package/components/Viewer/TreeObject.vue +1 -1
  23. package/components/Wrapper.vue +1 -1
  24. package/composables/api_fetch.js +2 -2
  25. package/composables/run_function_when_microservices_connected.js +1 -1
  26. package/composables/upload_file.js +2 -2
  27. package/composables/viewer_call.js +38 -38
  28. package/geode-opengeodeweb-back-5.10.0-rc.13.tgz +0 -0
  29. package/geode-opengeodeweb-viewer-1.11.0-rc.6.tgz +0 -0
  30. package/internal_stores/mesh/edges.js +49 -52
  31. package/internal_stores/mesh/index.js +20 -14
  32. package/internal_stores/mesh/points.js +9 -7
  33. package/internal_stores/mesh/polygons.js +9 -7
  34. package/internal_stores/mesh/polyhedra.js +8 -6
  35. package/internal_stores/model/blocks.js +1 -1
  36. package/internal_stores/model/corners.js +1 -1
  37. package/internal_stores/model/edges.js +1 -8
  38. package/internal_stores/model/index.js +1 -1
  39. package/internal_stores/model/lines.js +2 -2
  40. package/internal_stores/model/points.js +2 -2
  41. package/internal_stores/model/surfaces.js +1 -1
  42. package/package.json +13 -6
  43. package/stores/data_base.js +9 -1
  44. package/stores/data_style.js +7 -6
  45. package/stores/feedback.js +1 -1
  46. package/stores/geode.js +5 -5
  47. package/stores/hybrid_viewer.js +1 -1
  48. package/stores/infra.js +10 -10
  49. package/stores/treeview.js +1 -1
  50. package/stores/viewer.js +5 -6
  51. package/tests/integration/data/fake_id/edged_curve.vtp +20 -0
  52. package/tests/integration/microservices/back/requirements.in +1 -0
  53. package/tests/integration/microservices/back/requirements.txt +75 -0
  54. package/tests/integration/microservices/viewer/requirements.in +1 -0
  55. package/tests/integration/microservices/viewer/requirements.txt +87 -0
  56. package/tests/integration/stores/DataStyle/mesh/Edges.nuxt.test.js +138 -0
  57. package/{test → tests/unit}/components/CrsSelector.nuxt.test.js +6 -3
  58. package/{test → tests/unit}/components/ExtensionSelector.nuxt.test.js +6 -3
  59. package/{test → tests/unit}/components/FeedBack/ErrorsBanner.nuxt.test.js +10 -3
  60. package/{test → tests/unit}/components/FeedBack/Snackers.nuxt.test.js +24 -21
  61. package/{test → tests/unit}/components/FileSelector.nuxt.test.js +5 -2
  62. package/{test → tests/unit}/components/FileUploader.nuxt.test.js +6 -3
  63. package/{test → tests/unit}/components/Inspector/InspectionButton.nuxt.test.js +6 -3
  64. package/{test → tests/unit}/components/Launcher.nuxt.test.js +9 -2
  65. package/{test → tests/unit}/components/MissingFilesSelector.nuxt.test.js +6 -3
  66. package/{test → tests/unit}/components/ObjectSelector.nuxt.test.js +6 -3
  67. package/{test → tests/unit}/components/PackagesVersions.nuxt.test.js +5 -3
  68. package/{test → tests/unit}/components/Stepper.nuxt.test.js +1 -0
  69. package/{test → tests/unit}/components/Wrapper.nuxt.test.js +1 -1
  70. package/{test → tests/unit}/composables/api_fetch.nuxt.test.js +3 -2
  71. package/{test/composables/run_function_when_microservices_connected.test.js → tests/unit/composables/run_function_when_microservices_connected.nuxt.test.js} +18 -5
  72. package/{test → tests/unit}/composables/upload_file.nuxt.test.js +7 -8
  73. package/{test → tests/unit}/stores/Feedback.nuxt.test.js +12 -8
  74. package/{test → tests/unit}/stores/Geode.nuxt.test.js +33 -10
  75. package/{test → tests/unit}/stores/Infra.nuxt.test.js +58 -25
  76. package/{test → tests/unit}/stores/Viewer.nuxt.test.js +101 -20
  77. package/{test → tests/unit}/utils/validate_schema.nuxt.test.js +3 -0
  78. package/tests/vitest.config.js +33 -0
  79. package/utils/default_styles.js +246 -0
  80. package/utils/local.js +180 -0
  81. package/vitest.config.js +0 -13
  82. /package/{test → tests/unit}/components/Inspector/ResultPanel.nuxt.test.js +0 -0
  83. /package/{test → tests/unit}/components/Step.nuxt.test.js +0 -0
@@ -2,105 +2,102 @@ import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schem
2
2
  const mesh_edges_schemas = viewer_schemas.opengeodeweb_viewer.mesh.edges
3
3
 
4
4
  export function useMeshEdgesStyle() {
5
- /** State **/
6
5
  const dataStyleStore = useDataStyleStore()
7
6
 
8
- /** Getters **/
9
7
  function edgesVisibility(id) {
10
8
  return dataStyleStore.styles[id].edges.visibility
11
9
  }
12
- function edgesActiveColoring(id) {
13
- return dataStyleStore.styles[id].edges.coloring.active
14
- }
15
- function edgesColor(id) {
16
- return dataStyleStore.styles[id].edges.coloring.color
17
- }
18
- function edgesSize(id) {
19
- return dataStyleStore.styles[id].edges.size
20
- }
21
-
22
- /** Actions **/
23
10
  function setEdgesVisibility(id, visibility) {
24
- viewer_call(
11
+ const edges_style = dataStyleStore.styles[id].edges
12
+ return viewer_call(
25
13
  {
26
14
  schema: mesh_edges_schemas.visibility,
27
15
  params: { id, visibility },
28
16
  },
29
17
  {
30
18
  response_function: () => {
31
- dataStyleStore.styles[id].edges.visibility = visibility
32
- console.log(
33
- "setEdgesVisibility",
34
- dataStyleStore.styles[id].edges.visibility,
35
- )
19
+ edges_style.visibility = visibility
20
+ console.log(`${setEdgesVisibility.name} ${edges_style.visibility}`)
36
21
  },
37
22
  },
38
23
  )
39
24
  }
40
- function setEdgesActiveColoring(id, type) {
41
- if (type == "color")
42
- setEdgesColor(id, dataStyleStore.styles[id].edges.coloring.color)
43
- else if (type == "vertex") {
44
- const vertex = dataStyleStore.styles[id].edges.coloring.vertex
45
- if (vertex !== null) setEdgesVertexAttribute(id, vertex)
46
- } else if (type == "edges") {
47
- const edges = dataStyleStore.styles[id].edges.coloring.edges
48
- if (edges !== null) setEdgesEdgeAttribute(id, edges)
25
+
26
+ function edgesActiveColoring(id) {
27
+ return dataStyleStore.styles[id].edges.coloring.active
28
+ }
29
+ async function setEdgesActiveColoring(id, type) {
30
+ const coloring = dataStyleStore.styles[id].edges.coloring
31
+ if (type == "color") {
32
+ setEdgesColor(id, coloring.color)
33
+ // else if (type == "vertex") {
34
+ // const vertex = coloring.vertex
35
+ // if (vertex !== null) setEdgesVertexAttribute(id, vertex)
36
+ // } else if (type == "edges") {
37
+ // const edges = coloring.edges
38
+ // if (edges !== null) setEdgesEdgeAttribute(id, edges)
49
39
  } else throw new Error("Unknown edges coloring type: " + type)
50
- dataStyleStore.styles[id].edges.coloring.active = type
51
- console.log(
52
- "setEdgesActiveColoring",
53
- dataStyleStore.styles[id].edges.coloring.active,
54
- )
40
+ coloring.active = type
41
+ console.log(`${setEdgesActiveColoring.name} ${coloring.active}`)
55
42
  }
56
43
 
44
+ function edgesColor(id) {
45
+ return dataStyleStore.styles[id].edges.coloring.color
46
+ }
57
47
  function setEdgesColor(id, color) {
58
- viewer_call(
48
+ const coloring_style = dataStyleStore.styles[id].edges.coloring
49
+ return viewer_call(
59
50
  {
60
51
  schema: mesh_edges_schemas.color,
61
52
  params: { id, color },
62
53
  },
63
54
  {
64
55
  response_function: () => {
65
- dataStyleStore.styles[id].edges.coloring.color = color
56
+ coloring_style.color = color
66
57
  console.log(
67
- "setEdgesColor",
68
- dataStyleStore.styles[id].edges.coloring.color,
58
+ `${setEdgesColor.name} ${JSON.stringify(coloring_style.color)}`,
69
59
  )
70
60
  },
71
61
  },
72
62
  )
73
63
  }
74
- function setEdgesSize(id, size) {
75
- viewer_call(
64
+
65
+ function edgesWidth(id) {
66
+ return dataStyleStore.styles[id].edges.size
67
+ }
68
+ function setEdgesWidth(id, width) {
69
+ const edges_style = dataStyleStore.styles[id].edges
70
+ return viewer_call(
76
71
  {
77
- schema: mesh_edges_schemas.size,
78
- params: { id, size },
72
+ schema: mesh_edges_schemas.width,
73
+ params: { id, width },
79
74
  },
80
75
  {
81
76
  response_function: () => {
82
- dataStyleStore.styles[id].edges.size = size
83
- console.log("setEdgesSize", dataStyleStore.styles[id].edges.size)
77
+ edges_style.width = width
78
+ console.log(`${setEdgesWidth.name} ${edges_style.width}`)
84
79
  },
85
80
  },
86
81
  )
87
82
  }
88
83
 
89
- function applyEdgesStyle(id, style) {
90
- setEdgesVisibility(id, style.visibility)
91
- setEdgesActiveColoring(id, style.coloring.active)
92
- // setEdgesSize(id, style.size);
84
+ async function applyEdgesStyle(id, style) {
85
+ return Promise.all([
86
+ setEdgesVisibility(id, style.visibility),
87
+ setEdgesActiveColoring(id, style.coloring.active),
88
+ // setEdgesWidth(id, style.width);
89
+ ])
93
90
  }
94
91
 
95
92
  return {
96
- edgesVisibility,
93
+ applyEdgesStyle,
97
94
  edgesActiveColoring,
98
95
  edgesColor,
99
- edgesSize,
100
- setEdgesVisibility,
96
+ edgesVisibility,
97
+ edgesWidth,
101
98
  setEdgesActiveColoring,
102
99
  setEdgesColor,
103
- setEdgesSize,
104
- applyEdgesStyle,
100
+ setEdgesVisibility,
101
+ setEdgesWidth,
105
102
  }
106
103
  }
@@ -13,32 +13,38 @@ export default function useMeshStyle() {
13
13
  const hybridViewerStore = useHybridViewerStore()
14
14
 
15
15
  function setMeshVisibility(id, visibility) {
16
- viewer_call(
16
+ return viewer_call(
17
17
  {
18
18
  schema: viewer_schemas.opengeodeweb_viewer.mesh.visibility,
19
19
  params: { id, visibility },
20
20
  },
21
21
  {
22
22
  response_function: () => {
23
- dataStyleStore.styles[id].visibility = visibility
24
23
  hybridViewerStore.setVisibility(id, visibility)
25
- console.log("setMeshVisibility", dataStyleStore.styles[id].visibility)
24
+ dataStyleStore.styles[id].visibility = visibility
26
25
  },
27
26
  },
28
27
  )
29
28
  }
30
29
 
31
- function applyMeshDefaultStyle(id) {
32
- const id_style = dataStyleStore.styles[id]
33
- for (const [key, value] of Object.entries(id_style)) {
34
- if (key == "visibility") setMeshVisibility(id, value)
35
- else if (key == "points") pointsStyleStore.applyPointsStyle(id, value)
36
- else if (key == "edges") edgesStyleStore.applyEdgesStyle(id, value)
37
- else if (key == "polygons")
38
- polygonsStyleStore.applyPolygonsStyle(id, value)
39
- else if (key == "polyhedra")
40
- polyhedraStyleStore.applyPolyhedraStyle(id, value)
41
- }
30
+ async function applyMeshDefaultStyle(id) {
31
+ return new Promise(async (resolve) => {
32
+ const id_style = dataStyleStore.styles[id]
33
+ for (const [key, value] of Object.entries(id_style)) {
34
+ if (key == "visibility") {
35
+ await setMeshVisibility(id, value)
36
+ } else if (key == "points") {
37
+ await pointsStyleStore.applyPointsStyle(id, value)
38
+ } else if (key == "edges") {
39
+ await edgesStyleStore.applyEdgesStyle(id, value)
40
+ } else if (key == "polygons") {
41
+ await polygonsStyleStore.applyPolygonsStyle(id, value)
42
+ } else if (key == "polyhedra") {
43
+ await polyhedraStyleStore.applyPolyhedraStyle(id, value)
44
+ }
45
+ }
46
+ resolve()
47
+ })
42
48
  }
43
49
 
44
50
  return {
@@ -24,7 +24,7 @@ export function useMeshPointsStyle() {
24
24
 
25
25
  /** Actions **/
26
26
  function setPointsVisibility(id, visibility) {
27
- viewer_call(
27
+ return viewer_call(
28
28
  {
29
29
  schema: mesh_points_schemas.visibility,
30
30
  params: { id, visibility },
@@ -42,7 +42,7 @@ export function useMeshPointsStyle() {
42
42
  }
43
43
 
44
44
  function setPointsColor(id, color) {
45
- viewer_call(
45
+ return viewer_call(
46
46
  {
47
47
  schema: viewer_schemas.opengeodeweb_viewer.mesh.points.color,
48
48
  params: { id, color },
@@ -59,7 +59,7 @@ export function useMeshPointsStyle() {
59
59
  )
60
60
  }
61
61
  function setPointsVertexAttribute(id, vertex_attribute) {
62
- viewer_call(
62
+ return viewer_call(
63
63
  {
64
64
  schema: viewer_schemas.opengeodeweb_viewer.mesh.points.vertex_attribute,
65
65
  params: { id, ...vertex_attribute },
@@ -76,7 +76,7 @@ export function useMeshPointsStyle() {
76
76
  )
77
77
  }
78
78
  function setPointsSize(id, size) {
79
- viewer_call(
79
+ return viewer_call(
80
80
  {
81
81
  schema: viewer_schemas.opengeodeweb_viewer.mesh.points.size,
82
82
  params: { id, size },
@@ -108,9 +108,11 @@ export function useMeshPointsStyle() {
108
108
  }
109
109
 
110
110
  function applyPointsStyle(id, style) {
111
- setPointsVisibility(id, style.visibility)
112
- setPointsActiveColoring(id, style.coloring.active)
113
- setPointsSize(id, style.size)
111
+ return Promise.all([
112
+ setPointsVisibility(id, style.visibility),
113
+ setPointsActiveColoring(id, style.coloring.active),
114
+ setPointsSize(id, style.size),
115
+ ])
114
116
  }
115
117
 
116
118
  return {
@@ -27,7 +27,7 @@ export function useMeshPolygonsStyle() {
27
27
 
28
28
  /** Actions **/
29
29
  function setPolygonsVisibility(id, visibility) {
30
- viewer_call(
30
+ return viewer_call(
31
31
  {
32
32
  schema: mesh_polygons_schemas.visibility,
33
33
  params: { id, visibility },
@@ -67,7 +67,7 @@ export function useMeshPolygonsStyle() {
67
67
  )
68
68
  }
69
69
  function setPolygonsColor(id, color) {
70
- viewer_call(
70
+ return viewer_call(
71
71
  {
72
72
  schema: mesh_polygons_schemas.color,
73
73
  params: { id, color },
@@ -84,7 +84,7 @@ export function useMeshPolygonsStyle() {
84
84
  )
85
85
  }
86
86
  function setPolygonsTextures(id, textures) {
87
- viewer_call(
87
+ return viewer_call(
88
88
  {
89
89
  schema: viewer_schemas.opengeodeweb_viewer.mesh.apply_textures,
90
90
  params: { id, textures },
@@ -101,7 +101,7 @@ export function useMeshPolygonsStyle() {
101
101
  )
102
102
  }
103
103
  function setPolygonsVertexAttribute(id, vertex_attribute) {
104
- viewer_call(
104
+ return viewer_call(
105
105
  {
106
106
  schema: mesh_polygons_schemas.vertex_attribute,
107
107
  params: { id, ...vertex_attribute },
@@ -118,7 +118,7 @@ export function useMeshPolygonsStyle() {
118
118
  )
119
119
  }
120
120
  function setPolygonsPolygonAttribute(id, polygon_attribute) {
121
- viewer_call(
121
+ return viewer_call(
122
122
  {
123
123
  schema: mesh_polygons_schemas.polygon_attribute,
124
124
  params: { id, ...polygon_attribute },
@@ -137,8 +137,10 @@ export function useMeshPolygonsStyle() {
137
137
  }
138
138
 
139
139
  function applyPolygonsStyle(id, style) {
140
- setPolygonsVisibility(id, style.visibility)
141
- setPolygonsActiveColoring(id, style.coloring.active)
140
+ return Promise.all([
141
+ setPolygonsVisibility(id, style.visibility),
142
+ setPolygonsActiveColoring(id, style.coloring.active),
143
+ ])
142
144
  }
143
145
 
144
146
  return {
@@ -27,7 +27,7 @@ export function useMeshPolyhedraStyle() {
27
27
 
28
28
  /** Actions **/
29
29
  function setPolyhedraVisibility(id, visibility) {
30
- viewer_call(
30
+ return viewer_call(
31
31
  {
32
32
  schema: mesh_polyhedra_schemas.visibility,
33
33
  params: { id, visibility },
@@ -60,7 +60,7 @@ export function useMeshPolyhedraStyle() {
60
60
  )
61
61
  }
62
62
  function setPolyhedraColor(id, color) {
63
- viewer_call(
63
+ return viewer_call(
64
64
  {
65
65
  schema: mesh_polyhedra_schemas.color,
66
66
  params: { id, color },
@@ -78,7 +78,7 @@ export function useMeshPolyhedraStyle() {
78
78
  }
79
79
 
80
80
  function setPolyhedraVertexAttribute(id, vertex_attribute) {
81
- viewer_call(
81
+ return viewer_call(
82
82
  {
83
83
  schema: mesh_polyhedra_schemas.vertex_attribute,
84
84
  params: { id, ...vertex_attribute },
@@ -96,7 +96,7 @@ export function useMeshPolyhedraStyle() {
96
96
  }
97
97
 
98
98
  function setPolyhedraPolyhedronAttribute(id, polyhedron_attribute) {
99
- viewer_call(
99
+ return viewer_call(
100
100
  {
101
101
  schema: mesh_polyhedra_schemas.polyhedron_attribute,
102
102
  params: { id, ...polyhedron_attribute },
@@ -115,8 +115,10 @@ export function useMeshPolyhedraStyle() {
115
115
  }
116
116
 
117
117
  function applyPolyhedraStyle(id, style) {
118
- setPolyhedraVisibility(id, style.visibility)
119
- setPolyhedraActiveColoring(id, style.coloring.active)
118
+ return Promise.all([
119
+ setPolyhedraVisibility(id, style.visibility),
120
+ setPolyhedraActiveColoring(id, style.coloring.active),
121
+ ])
120
122
  }
121
123
 
122
124
  return {
@@ -15,7 +15,7 @@ export function useBlocksStyle() {
15
15
  /** Actions **/
16
16
  function setBlockVisibility(id, block_ids, visibility) {
17
17
  const block_flat_indexes = dataBaseStore.getFlatIndexes(id, block_ids)
18
- viewer_call(
18
+ return viewer_call(
19
19
  {
20
20
  schema: blocks_schemas.visibility,
21
21
  params: { id, block_ids: block_flat_indexes, visibility },
@@ -14,7 +14,7 @@ export function useCornersStyle() {
14
14
  /** Actions **/
15
15
  function setCornerVisibility(id, corner_ids, visibility) {
16
16
  const corner_flat_indexes = dataBaseStore.getFlatIndexes(id, corner_ids)
17
- viewer_call(
17
+ return viewer_call(
18
18
  {
19
19
  schema: corners_schemas.visibility,
20
20
  params: { id, block_ids: corner_flat_indexes, visibility },
@@ -9,14 +9,7 @@ export function useModelEdgesStyle() {
9
9
  }
10
10
 
11
11
  function setModelEdgesVisibility(id, visibility) {
12
- if (!dataStyleStore.styles[id]) {
13
- dataStyleStore.styles[id] = {}
14
- }
15
- if (!dataStyleStore.styles[id].edges) {
16
- dataStyleStore.styles[id].edges = {}
17
- }
18
-
19
- viewer_call(
12
+ return viewer_call(
20
13
  {
21
14
  schema: model_edges_schemas.visibility,
22
15
  params: { id, visibility },
@@ -63,7 +63,7 @@ export default function useModelStyle() {
63
63
  }
64
64
 
65
65
  function setModelVisibility(id, visibility) {
66
- viewer_call(
66
+ return viewer_call(
67
67
  {
68
68
  schema: viewer_schemas.opengeodeweb_viewer.model.visibility,
69
69
  params: { id, visibility },
@@ -18,7 +18,7 @@ export function useLinesStyle() {
18
18
  /** Actions **/
19
19
  function setLineVisibility(id, line_ids, visibility) {
20
20
  const line_flat_indexes = dataBaseStore.getFlatIndexes(id, line_ids)
21
- viewer_call(
21
+ return viewer_call(
22
22
  {
23
23
  schema: lines_schemas.visibility,
24
24
  params: { id, block_ids: line_flat_indexes, visibility },
@@ -38,7 +38,7 @@ export function useLinesStyle() {
38
38
 
39
39
  function setLineColor(id, line_ids, color) {
40
40
  const line_flat_indexes = dataBaseStore.getFlatIndexes(id, line_ids)
41
- viewer_call(
41
+ return viewer_call(
42
42
  {
43
43
  schema: lines_schemas.color,
44
44
  params: { id, block_ids: line_flat_indexes, color },
@@ -12,7 +12,7 @@ export function useModelPointsStyle() {
12
12
  }
13
13
 
14
14
  function setModelPointsVisibility(id, visibility) {
15
- viewer_call(
15
+ return viewer_call(
16
16
  {
17
17
  schema: model_points_schemas.visibility,
18
18
  params: { id, visibility },
@@ -27,7 +27,7 @@ export function useModelPointsStyle() {
27
27
  }
28
28
 
29
29
  function setModelPointsSize(id, size) {
30
- viewer_call(
30
+ return viewer_call(
31
31
  {
32
32
  schema: model_points_schemas.size,
33
33
  params: { id, size },
@@ -14,7 +14,7 @@ export function useSurfacesStyle() {
14
14
  /** Actions **/
15
15
  function setSurfaceVisibility(id, surface_ids, visibility) {
16
16
  const surface_flat_indexes = dataBaseStore.getFlatIndexes(id, surface_ids)
17
- viewer_call(
17
+ return viewer_call(
18
18
  {
19
19
  schema: surfaces_schemas.visibility,
20
20
  params: { id, block_ids: surface_flat_indexes, visibility },
package/package.json CHANGED
@@ -2,16 +2,19 @@
2
2
  "name": "@geode/opengeodeweb-front",
3
3
  "scripts": {
4
4
  "lint": "eslint --fix --ext .js,.vue --ignore-path .gitignore .",
5
- "test": "vitest",
6
- "coverage": "vitest run --coverage",
5
+ "test": "npm run test:unit",
6
+ "tests": "vitest --config ./tests/vitest.config.js",
7
+ "test:unit": "npm run tests --project unit",
8
+ "test:integration": "npm run tests --project integration",
7
9
  "geode_objects": "node scripts/generate_geode_objects.js && prettier ./assets/geode_objects.js --write",
8
10
  "build": ""
9
11
  },
10
12
  "devDependencies": {
11
- "@nuxt/test-utils": "3.18.0",
13
+ "@nuxt/test-utils": "3.19.2",
12
14
  "@pinia/testing": "0.1.7",
13
15
  "@vitejs/plugin-vue": "5.2.3",
14
16
  "@vue/test-utils": "2.4.6",
17
+ "electron": "36.4.0",
15
18
  "eslint": "9.26.0",
16
19
  "eslint-plugin-import": "2.31.0",
17
20
  "eslint-plugin-nuxt": "4.0.0",
@@ -21,13 +24,15 @@
21
24
  "eslint-plugin-vuetify": "2.5.2",
22
25
  "happy-dom": "17.4.6",
23
26
  "jsdom": "26.1.0",
27
+ "msw": "2.11.1",
24
28
  "nuxt": "3.13.2",
25
29
  "playwright-core": "1.52.0",
26
30
  "prettier": "3.3.3",
27
31
  "resize-observer-polyfill": "1.5.1",
32
+ "unplugin-auto-import": "^20.0.0",
28
33
  "vite": "6.3.5",
29
34
  "vite-plugin-vuetify": "2.1.1",
30
- "vitest": "3.1.2",
35
+ "vitest": "3.2.4",
31
36
  "vitest-environment-nuxt": "1.0.1"
32
37
  },
33
38
  "overrides": {
@@ -35,7 +40,7 @@
35
40
  },
36
41
  "description": "OpenSource Vue/Vuetify framework for web applications",
37
42
  "type": "module",
38
- "version": "9.11.2",
43
+ "version": "9.11.3-rc.3",
39
44
  "main": "./nuxt.config.js",
40
45
  "dependencies": {
41
46
  "@geode/opengeodeweb-back": "latest",
@@ -47,10 +52,12 @@
47
52
  "@vueuse/components": "13.1.0",
48
53
  "@vueuse/nuxt": "13.1.0",
49
54
  "ajv": "8.17.1",
55
+ "get-port-please": "3.2.0",
50
56
  "is-electron": "2.2.2",
51
57
  "js-file-download": "0.4.12",
52
58
  "nuxt": "3.13.2",
53
- "pinia": "2.3.1",
59
+ "pidtree": "0.6.0",
60
+ "pinia": "3.0.3",
54
61
  "sass": "1.87.0",
55
62
  "semver": "7.7.1",
56
63
  "uuid": "11.1.0",
@@ -1,7 +1,8 @@
1
1
  import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
2
+ import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
2
3
 
3
4
  export const useDataBaseStore = defineStore("dataBase", () => {
4
- const treeview_store = use_treeview_store()
5
+ const treeview_store = useTreeviewStore()
5
6
  const hybridViewerStore = useHybridViewerStore()
6
7
 
7
8
  /** State **/
@@ -41,6 +42,12 @@ export const useDataBaseStore = defineStore("dataBase", () => {
41
42
  }
42
43
 
43
44
  /** Actions **/
45
+ async function registerObject(id, file_name, viewer_object) {
46
+ return viewer_call({
47
+ schema: viewer_schemas.opengeodeweb_viewer.generic.register,
48
+ params: { id, file_name, viewer_object },
49
+ })
50
+ }
44
51
  async function addItem(
45
52
  id,
46
53
  value = {
@@ -137,6 +144,7 @@ export const useDataBaseStore = defineStore("dataBase", () => {
137
144
  itemMetaDatas,
138
145
  meshComponentType,
139
146
  formatedMeshComponents,
147
+ registerObject,
140
148
  addItem,
141
149
  fetchUuidToFlatIndexDict,
142
150
  fetchMeshComponents,
@@ -12,21 +12,22 @@ export const useDataStyleStore = defineStore("dataStyle", () => {
12
12
  /** Actions **/
13
13
  function addDataStyle(id, geode_object, object_type) {
14
14
  dataStyleState.styles[id] = getDefaultStyle(geode_object)
15
-
16
15
  if (object_type === "mesh") {
17
- meshStyleStore.applyMeshDefaultStyle(id)
16
+ return Promise.all([meshStyleStore.applyMeshDefaultStyle(id)])
18
17
  } else if (object_type === "model") {
19
- modelStyleStore.setMeshComponentsDefaultStyle(id)
20
- modelStyleStore.applyModelDefaultStyle(id)
18
+ return Promise.all([
19
+ modelStyleStore.setMeshComponentsDefaultStyle(id),
20
+ modelStyleStore.applyModelDefaultStyle(id),
21
+ ])
21
22
  }
22
23
  }
23
24
 
24
25
  function setVisibility(id, visibility) {
25
26
  const object_type = dataBaseStore.itemMetaDatas(id).object_type
26
27
  if (object_type === "mesh") {
27
- meshStyleStore.setMeshVisibility(id, visibility)
28
+ return Promise.all([meshStyleStore.setMeshVisibility(id, visibility)])
28
29
  } else if (object_type === "model") {
29
- modelStyleStore.setModelVisibility(id, visibility)
30
+ return Promise.all([modelStyleStore.setModelVisibility(id, visibility)])
30
31
  }
31
32
  }
32
33
 
@@ -1,6 +1,6 @@
1
1
  import { v4 as uuidv4 } from "uuid"
2
2
 
3
- export const use_feedback_store = defineStore("feedback", {
3
+ export const useFeedbackStore = defineStore("feedback", {
4
4
  state: () => ({
5
5
  feedbacks: [],
6
6
  server_error: false,
package/stores/geode.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
2
2
  import Status from "@ogw_f/utils/status.js"
3
3
 
4
- export const use_geode_store = defineStore("geode", {
4
+ export const useGeodeStore = defineStore("geode", {
5
5
  state: () => ({
6
6
  default_local_port: "5000",
7
7
  request_counter: 0,
@@ -9,13 +9,13 @@ export const use_geode_store = defineStore("geode", {
9
9
  }),
10
10
  getters: {
11
11
  protocol() {
12
- if (use_infra_store().app_mode == appMode.appMode.CLOUD) {
12
+ if (useInfraStore().app_mode == appMode.appMode.CLOUD) {
13
13
  return "https"
14
14
  }
15
15
  return "http"
16
16
  },
17
17
  port() {
18
- if (use_infra_store().app_mode == appMode.appMode.CLOUD) {
18
+ if (useInfraStore().app_mode == appMode.appMode.CLOUD) {
19
19
  return "443"
20
20
  }
21
21
  const GEODE_PORT = useRuntimeConfig().public.GEODE_PORT
@@ -25,7 +25,7 @@ export const use_geode_store = defineStore("geode", {
25
25
  return this.default_local_port
26
26
  },
27
27
  base_url() {
28
- const infra_store = use_infra_store()
28
+ const infra_store = useInfraStore()
29
29
  let geode_url = `${this.protocol}://${infra_store.domain_name}:${this.port}`
30
30
  if (infra_store.app_mode == appMode.appMode.CLOUD) {
31
31
  if (infra_store.ID == "") {
@@ -49,7 +49,7 @@ export const use_geode_store = defineStore("geode", {
49
49
  },
50
50
  do_ping() {
51
51
  const geode_store = this
52
- const feedback_store = use_feedback_store()
52
+ const feedback_store = useFeedbackStore()
53
53
  return useFetch(back_schemas.opengeodeweb_back.ping.$id, {
54
54
  baseURL: this.base_url,
55
55
  method: back_schemas.opengeodeweb_back.ping.methods[0],
@@ -8,7 +8,7 @@ import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schem
8
8
  import Status from "@ogw_f/utils/status.js"
9
9
 
10
10
  export const useHybridViewerStore = defineStore("hybridViewer", () => {
11
- const viewer_store = use_viewer_store()
11
+ const viewer_store = useViewerStore()
12
12
  const db = reactive({})
13
13
  const status = ref(Status.NOT_CREATED)
14
14
  const camera_options = reactive({})