@geode/opengeodeweb-front 10.22.1-rc.1 → 10.22.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.
Files changed (79) hide show
  1. package/app/components/CrsSelector.vue +7 -4
  2. package/app/components/ExtensionSelector.vue +2 -4
  3. package/app/components/FileSelector.vue +1 -1
  4. package/app/components/Inspector/InspectionButton.vue +10 -7
  5. package/app/components/MissingFilesSelector.vue +8 -9
  6. package/app/components/ObjectSelector.vue +9 -5
  7. package/app/components/PackagesVersions.vue +1 -2
  8. package/app/components/RemoteRenderingView.vue +3 -4
  9. package/app/components/Screenshot.vue +8 -4
  10. package/app/components/ViewToolbar.vue +6 -2
  11. package/app/components/Viewer/Options/AttributeSelector.vue +2 -2
  12. package/app/components/Viewer/Options/TextureItem.vue +9 -10
  13. package/app/composables/hover_highlight.js +2 -2
  14. package/app/composables/project_manager.js +3 -6
  15. package/app/composables/use_overlapping_picker.js +6 -3
  16. package/app/stores/app.js +10 -7
  17. package/app/stores/back.js +13 -11
  18. package/app/stores/camera_manager.js +3 -3
  19. package/app/stores/cloud.js +21 -18
  20. package/app/stores/data.js +6 -2
  21. package/app/stores/hybrid_viewer.js +13 -10
  22. package/app/stores/viewer.js +18 -16
  23. package/app/utils/extension.js +1 -1
  24. package/app/utils/import_workflow.js +4 -3
  25. package/internal/stores/data_style/mesh/cells/cell.js +19 -6
  26. package/internal/stores/data_style/mesh/cells/color.js +6 -3
  27. package/internal/stores/data_style/mesh/cells/textures.js +6 -3
  28. package/internal/stores/data_style/mesh/cells/vertex.js +10 -6
  29. package/internal/stores/data_style/mesh/cells/visibility.js +6 -3
  30. package/internal/stores/data_style/mesh/edges/color.js +6 -3
  31. package/internal/stores/data_style/mesh/edges/edge.js +13 -6
  32. package/internal/stores/data_style/mesh/edges/vertex.js +10 -6
  33. package/internal/stores/data_style/mesh/edges/visibility.js +6 -3
  34. package/internal/stores/data_style/mesh/edges/width.js +6 -3
  35. package/internal/stores/data_style/mesh/index.js +12 -4
  36. package/internal/stores/data_style/mesh/points/color.js +6 -3
  37. package/internal/stores/data_style/mesh/points/size.js +6 -3
  38. package/internal/stores/data_style/mesh/points/vertex.js +11 -6
  39. package/internal/stores/data_style/mesh/points/visibility.js +6 -3
  40. package/internal/stores/data_style/mesh/polygons/color.js +6 -3
  41. package/internal/stores/data_style/mesh/polygons/polygon.js +9 -6
  42. package/internal/stores/data_style/mesh/polygons/textures.js +6 -3
  43. package/internal/stores/data_style/mesh/polygons/vertex.js +10 -6
  44. package/internal/stores/data_style/mesh/polygons/visibility.js +6 -3
  45. package/internal/stores/data_style/mesh/polyhedra/color.js +6 -3
  46. package/internal/stores/data_style/mesh/polyhedra/polyhedron.js +14 -6
  47. package/internal/stores/data_style/mesh/polyhedra/vertex.js +14 -6
  48. package/internal/stores/data_style/mesh/polyhedra/visibility.js +6 -3
  49. package/internal/stores/data_style/model/common.js +24 -22
  50. package/internal/stores/data_style/model/edges/visibility.js +3 -3
  51. package/internal/stores/data_style/model/points/size.js +6 -3
  52. package/internal/stores/data_style/model/points/visibility.js +3 -3
  53. package/internal/stores/data_style/model/visibility.js +3 -2
  54. package/internal/stores/hybrid_viewer.js +27 -33
  55. package/internal/stores/hybrid_viewer_camera.js +9 -6
  56. package/internal/stores/hybrid_viewer_constants.js +21 -0
  57. package/internal/stores/hybrid_viewer_highlight.js +2 -1
  58. package/internal/utils/api_fetch.js +2 -1
  59. package/internal/utils/viewer_call.js +2 -2
  60. package/package.json +3 -3
  61. package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +12 -8
  62. package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +12 -8
  63. package/tests/integration/stores/data_style/mesh/index.nuxt.test.js +3 -2
  64. package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +12 -8
  65. package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +12 -8
  66. package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +12 -8
  67. package/tests/integration/stores/data_style/model/blocks.nuxt.test.js +6 -13
  68. package/tests/integration/stores/data_style/model/corners.nuxt.test.js +6 -13
  69. package/tests/integration/stores/data_style/model/edges.nuxt.test.js +3 -2
  70. package/tests/integration/stores/data_style/model/index.nuxt.test.js +3 -2
  71. package/tests/integration/stores/data_style/model/lines.nuxt.test.js +6 -13
  72. package/tests/integration/stores/data_style/model/points.nuxt.test.js +6 -4
  73. package/tests/integration/stores/data_style/model/surfaces.nuxt.test.js +6 -13
  74. package/tests/integration/stores/viewer.nuxt.test.js +1 -2
  75. package/tests/unit/components/CrsSelector.nuxt.test.js +1 -1
  76. package/tests/unit/components/Inspector/InspectionButton.nuxt.test.js +1 -1
  77. package/tests/unit/components/MissingFilesSelector.nuxt.test.js +1 -1
  78. package/tests/unit/composables/api_fetch.nuxt.test.js +5 -6
  79. package/tests/vitest.config.js +0 -1
@@ -9,6 +9,7 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
9
9
  // Local constants
10
10
  const meshCellsCellAttributeSchemas = viewer_schemas.opengeodeweb_viewer.mesh.cells.attribute.cell;
11
11
 
12
+ // oxlint-disable-next-line max-lines-per-function
12
13
  export function useMeshCellsCellAttributeStyle() {
13
14
  const viewerStore = useViewerStore();
14
15
  const meshCellsCommonStyle = useMeshCellsCommonStyle();
@@ -42,9 +43,13 @@ export function useMeshCellsCellAttributeStyle() {
42
43
  }
43
44
 
44
45
  function setMeshCellsCellAttributeName(id, name) {
46
+ const schema = meshCellsCellAttributeSchemas.name;
47
+ const params = { id, name };
45
48
  return viewerStore.request(
46
- meshCellsCellAttributeSchemas.name,
47
- { id, name },
49
+ {
50
+ schema,
51
+ params,
52
+ },
48
53
  {
49
54
  response_function: () => meshCellsCommonStyle.mutateMeshCellsCellStyle(id, { name }),
50
55
  },
@@ -62,9 +67,13 @@ export function useMeshCellsCellAttributeStyle() {
62
67
  const name = meshCellsCellAttributeName(id);
63
68
  const points = getRGBPointsFromPreset(meshCellsCellAttributeColorMap(id));
64
69
  if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
70
+ const schema = meshCellsCellAttributeSchemas.color_map;
71
+ const params = { id, points, minimum, maximum };
65
72
  return viewerStore.request(
66
- meshCellsCellAttributeSchemas.color_map,
67
- { id, points, minimum, maximum },
73
+ {
74
+ schema,
75
+ params,
76
+ },
68
77
  {
69
78
  response_function: () =>
70
79
  setMeshCellsCellAttributeStoredConfig(id, name, { minimum, maximum }),
@@ -87,9 +96,13 @@ export function useMeshCellsCellAttributeStyle() {
87
96
  const points = getRGBPointsFromPreset(colorMap);
88
97
  const { minimum, maximum } = storedConfig;
89
98
  if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
99
+ const schema = meshCellsCellAttributeSchemas.color_map;
100
+ const params = { id, points, minimum, maximum };
90
101
  return viewerStore.request(
91
- meshCellsCellAttributeSchemas.color_map,
92
- { id, points, minimum, maximum },
102
+ {
103
+ schema,
104
+ params,
105
+ },
93
106
  {
94
107
  response_function: () => setMeshCellsCellAttributeStoredConfig(id, name, { colorMap }),
95
108
  },
@@ -6,7 +6,7 @@ import { useMeshCellsCommonStyle } from "./common";
6
6
  import { useViewerStore } from "@ogw_front/stores/viewer";
7
7
 
8
8
  // Local constants
9
- const meshCellsColorSchemas = viewer_schemas.opengeodeweb_viewer.mesh.cells.color;
9
+ const schema = viewer_schemas.opengeodeweb_viewer.mesh.cells.color;
10
10
 
11
11
  export function useMeshCellsColorStyle() {
12
12
  const viewerStore = useViewerStore();
@@ -16,9 +16,12 @@ export function useMeshCellsColorStyle() {
16
16
  return meshCellsCommonStyle.meshCellsColoring(id).color;
17
17
  }
18
18
  function setMeshCellsColor(id, color) {
19
+ const params = { id, color };
19
20
  return viewerStore.request(
20
- meshCellsColorSchemas,
21
- { id, color },
21
+ {
22
+ schema,
23
+ params,
24
+ },
22
25
  {
23
26
  response_function: () =>
24
27
  meshCellsCommonStyle.mutateMeshCellsColoring(id, {
@@ -6,7 +6,7 @@ import { useMeshCellsCommonStyle } from "./common";
6
6
  import { useViewerStore } from "@ogw_front/stores/viewer";
7
7
 
8
8
  // Local constants
9
- const meshCellsTexturesSchemas = viewer_schemas.opengeodeweb_viewer.mesh.cells.apply_textures;
9
+ const schema = viewer_schemas.opengeodeweb_viewer.mesh.cells.apply_textures;
10
10
 
11
11
  export function useMeshCellsTexturesStyle() {
12
12
  const viewerStore = useViewerStore();
@@ -16,9 +16,12 @@ export function useMeshCellsTexturesStyle() {
16
16
  return meshCellsCommonStyle.meshCellsColoring(id).textures;
17
17
  }
18
18
  function setMeshCellsTextures(id, textures) {
19
+ const params = { id, textures };
19
20
  return viewerStore.request(
20
- meshCellsTexturesSchemas,
21
- { id, textures },
21
+ {
22
+ schema,
23
+ params,
24
+ },
22
25
  {
23
26
  response_function: () =>
24
27
  meshCellsCommonStyle.mutateMeshCellsStyle(id, {
@@ -10,6 +10,7 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
10
10
  const meshCellsVertexAttributeSchemas =
11
11
  viewer_schemas.opengeodeweb_viewer.mesh.cells.attribute.vertex;
12
12
 
13
+ // oxlint-disable-next-line max-lines-per-function
13
14
  export function useMeshCellsVertexAttributeStyle() {
14
15
  const viewerStore = useViewerStore();
15
16
  const meshCellsCommonStyle = useMeshCellsCommonStyle();
@@ -51,9 +52,10 @@ export function useMeshCellsVertexAttributeStyle() {
51
52
  }
52
53
 
53
54
  function setMeshCellsVertexAttributeName(id, name) {
55
+ const schema = meshCellsVertexAttributeSchemas.name;
56
+ const params = { id, name };
54
57
  return viewerStore.request(
55
- meshCellsVertexAttributeSchemas.name,
56
- { id, name },
58
+ { schema, params },
57
59
  {
58
60
  response_function: () => {
59
61
  const updates = { name };
@@ -84,9 +86,10 @@ export function useMeshCellsVertexAttributeStyle() {
84
86
  const name = meshCellsVertexAttributeName(id);
85
87
  const points = getRGBPointsFromPreset(meshCellsVertexAttributeColorMap(id));
86
88
  if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
89
+ const schema = meshCellsVertexAttributeSchemas.color_map;
90
+ const params = { id, points, minimum, maximum };
87
91
  return viewerStore.request(
88
- meshCellsVertexAttributeSchemas.color_map,
89
- { id, points, minimum, maximum },
92
+ { schema, params },
90
93
  {
91
94
  response_function: () =>
92
95
  setMeshCellsVertexAttributeStoredConfig(id, name, { minimum, maximum }),
@@ -112,9 +115,10 @@ export function useMeshCellsVertexAttributeStyle() {
112
115
  const points = getRGBPointsFromPreset(colorMap);
113
116
  const { minimum, maximum } = storedConfig;
114
117
  if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
118
+ const schema = meshCellsVertexAttributeSchemas.color_map;
119
+ const params = { id, points, minimum, maximum };
115
120
  return viewerStore.request(
116
- meshCellsVertexAttributeSchemas.color_map,
117
- { id, points, minimum, maximum },
121
+ { schema, params },
118
122
  {
119
123
  response_function: () => setMeshCellsVertexAttributeStoredConfig(id, name, { colorMap }),
120
124
  },
@@ -6,7 +6,7 @@ import { useMeshCellsCommonStyle } from "./common";
6
6
  import { useViewerStore } from "@ogw_front/stores/viewer";
7
7
 
8
8
  // Local constants
9
- const meshCellsVisibilitySchema = viewer_schemas.opengeodeweb_viewer.mesh.cells.visibility;
9
+ const schema = viewer_schemas.opengeodeweb_viewer.mesh.cells.visibility;
10
10
 
11
11
  export function useMeshCellsVisibilityStyle() {
12
12
  const viewerStore = useViewerStore();
@@ -16,9 +16,12 @@ export function useMeshCellsVisibilityStyle() {
16
16
  return meshCellsCommonStyle.meshCellsStyle(id).visibility;
17
17
  }
18
18
  function setMeshCellsVisibility(id, visibility) {
19
+ const params = { id, visibility };
19
20
  return viewerStore.request(
20
- meshCellsVisibilitySchema,
21
- { id, visibility },
21
+ {
22
+ schema,
23
+ params,
24
+ },
22
25
  {
23
26
  response_function: () => meshCellsCommonStyle.mutateMeshCellsStyle(id, { visibility }),
24
27
  },
@@ -6,7 +6,7 @@ import { useMeshEdgesCommonStyle } from "./common";
6
6
  import { useViewerStore } from "@ogw_front/stores/viewer";
7
7
 
8
8
  // Local constants
9
- const meshEdgesColorSchemas = viewer_schemas.opengeodeweb_viewer.mesh.edges.color;
9
+ const schema = viewer_schemas.opengeodeweb_viewer.mesh.edges.color;
10
10
 
11
11
  export function useMeshEdgesColorStyle() {
12
12
  const viewerStore = useViewerStore();
@@ -16,9 +16,12 @@ export function useMeshEdgesColorStyle() {
16
16
  return meshEdgesCommonStyle.meshEdgesColoring(id).color;
17
17
  }
18
18
  function setMeshEdgesColor(id, color) {
19
+ const params = { id, color };
19
20
  return viewerStore.request(
20
- meshEdgesColorSchemas,
21
- { id, color },
21
+ {
22
+ schema,
23
+ params,
24
+ },
22
25
  {
23
26
  response_function: () =>
24
27
  meshEdgesCommonStyle.mutateMeshEdgesColoring(id, {
@@ -9,6 +9,7 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
9
9
  // Local constants
10
10
  const meshEdgesEdgeAttributeSchemas = viewer_schemas.opengeodeweb_viewer.mesh.edges.attribute.edge;
11
11
 
12
+ // oxlint-disable-next-line max-lines-per-function
12
13
  export function useMeshEdgesEdgeAttributeStyle() {
13
14
  const viewerStore = useViewerStore();
14
15
  const meshEdgesCommonStyle = useMeshEdgesCommonStyle();
@@ -54,9 +55,13 @@ export function useMeshEdgesEdgeAttributeStyle() {
54
55
  }
55
56
 
56
57
  function setMeshEdgesEdgeAttributeName(id, name) {
58
+ const schema = meshEdgesEdgeAttributeSchemas.name;
59
+ const params = { id, name };
57
60
  return viewerStore.request(
58
- meshEdgesEdgeAttributeSchemas.name,
59
- { id, name },
61
+ {
62
+ schema,
63
+ params,
64
+ },
60
65
  {
61
66
  response_function: () => {
62
67
  const updates = { name };
@@ -87,9 +92,10 @@ export function useMeshEdgesEdgeAttributeStyle() {
87
92
  const name = meshEdgesEdgeAttributeName(id);
88
93
  const points = getRGBPointsFromPreset(meshEdgesEdgeAttributeColorMap(id));
89
94
  if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
95
+ const schema = meshEdgesEdgeAttributeSchemas.color_map;
96
+ const params = { id, points, minimum, maximum };
90
97
  return viewerStore.request(
91
- meshEdgesEdgeAttributeSchemas.color_map,
92
- { id, points, minimum, maximum },
98
+ { schema, params },
93
99
  {
94
100
  response_function: () =>
95
101
  setMeshEdgesEdgeAttributeStoredConfig(id, name, { minimum, maximum }),
@@ -115,9 +121,10 @@ export function useMeshEdgesEdgeAttributeStyle() {
115
121
  const points = getRGBPointsFromPreset(colorMap);
116
122
  const { minimum, maximum } = storedConfig;
117
123
  if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
124
+ const schema = meshEdgesEdgeAttributeSchemas.color_map;
125
+ const params = { id, points, minimum, maximum };
118
126
  return viewerStore.request(
119
- meshEdgesEdgeAttributeSchemas.color_map,
120
- { id, points, minimum, maximum },
127
+ { schema, params },
121
128
  {
122
129
  response_function: () => setMeshEdgesEdgeAttributeStoredConfig(id, name, { colorMap }),
123
130
  },
@@ -9,6 +9,7 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
9
9
  const meshEdgesVertexAttributeSchemas =
10
10
  viewer_schemas.opengeodeweb_viewer.mesh.edges.attribute.vertex;
11
11
 
12
+ // oxlint-disable-next-line max-lines-per-function
12
13
  export function useMeshEdgesVertexAttributeStyle() {
13
14
  const viewerStore = useViewerStore();
14
15
  const meshEdgesCommonStyle = useMeshEdgesCommonStyle();
@@ -53,9 +54,10 @@ export function useMeshEdgesVertexAttributeStyle() {
53
54
  return meshEdgesVertexAttribute(id).name;
54
55
  }
55
56
  function setMeshEdgesVertexAttributeName(id, name) {
57
+ const schema = meshEdgesVertexAttributeSchemas.name;
58
+ const params = { id, name };
56
59
  return viewerStore.request(
57
- meshEdgesVertexAttributeSchemas.name,
58
- { id, name },
60
+ { schema, params },
59
61
  {
60
62
  response_function: () => {
61
63
  const updates = { name };
@@ -85,9 +87,10 @@ export function useMeshEdgesVertexAttributeStyle() {
85
87
  const name = meshEdgesVertexAttributeName(id);
86
88
  const points = getRGBPointsFromPreset(meshEdgesVertexAttributeColorMap(id));
87
89
  if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
90
+ const schema = meshEdgesVertexAttributeSchemas.color_map;
91
+ const params = { id, points, minimum, maximum };
88
92
  return viewerStore.request(
89
- meshEdgesVertexAttributeSchemas.color_map,
90
- { id, points, minimum, maximum },
93
+ { schema, params },
91
94
  {
92
95
  response_function: () =>
93
96
  setMeshEdgesVertexAttributeStoredConfig(id, name, { minimum, maximum }),
@@ -112,9 +115,10 @@ export function useMeshEdgesVertexAttributeStyle() {
112
115
  const points = getRGBPointsFromPreset(colorMap);
113
116
  const { minimum, maximum } = storedConfig;
114
117
  if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
118
+ const schema = meshEdgesVertexAttributeSchemas.color_map;
119
+ const params = { id, points, minimum, maximum };
115
120
  return viewerStore.request(
116
- meshEdgesVertexAttributeSchemas.color_map,
117
- { id, points, minimum, maximum },
121
+ { schema, params },
118
122
  {
119
123
  response_function: () => setMeshEdgesVertexAttributeStoredConfig(id, name, { colorMap }),
120
124
  },
@@ -5,7 +5,7 @@ import { useMeshEdgesCommonStyle } from "./common";
5
5
  import { useViewerStore } from "@ogw_front/stores/viewer";
6
6
 
7
7
  // Local constants
8
- const meshEdgesVisibilitySchema = viewer_schemas.opengeodeweb_viewer.mesh.edges.visibility;
8
+ const schema = viewer_schemas.opengeodeweb_viewer.mesh.edges.visibility;
9
9
 
10
10
  export function useMeshEdgesVisibilityStyle() {
11
11
  const viewerStore = useViewerStore();
@@ -15,9 +15,12 @@ export function useMeshEdgesVisibilityStyle() {
15
15
  return meshEdgesCommonStyle.meshEdgesStyle(id).visibility;
16
16
  }
17
17
  function setMeshEdgesVisibility(id, visibility) {
18
+ const params = { id, visibility };
18
19
  return viewerStore.request(
19
- meshEdgesVisibilitySchema,
20
- { id, visibility },
20
+ {
21
+ schema,
22
+ params,
23
+ },
21
24
  {
22
25
  response_function: () => meshEdgesCommonStyle.mutateMeshEdgesStyle(id, { visibility }),
23
26
  },
@@ -5,7 +5,7 @@ import { useMeshEdgesCommonStyle } from "./common";
5
5
  import { useViewerStore } from "@ogw_front/stores/viewer";
6
6
 
7
7
  // Local constants
8
- const meshEdgesWidthSchemas = viewer_schemas.opengeodeweb_viewer.mesh.edges.width;
8
+ const schema = viewer_schemas.opengeodeweb_viewer.mesh.edges.width;
9
9
 
10
10
  export function useMeshEdgesWidthStyle() {
11
11
  const viewerStore = useViewerStore();
@@ -15,9 +15,12 @@ export function useMeshEdgesWidthStyle() {
15
15
  return meshEdgesCommonStyle.meshEdgesStyle(id).width;
16
16
  }
17
17
  function setMeshEdgesWidth(id, width) {
18
+ const params = { id, width };
18
19
  return viewerStore.request(
19
- meshEdgesWidthSchemas,
20
- { id, width },
20
+ {
21
+ schema,
22
+ params,
23
+ },
21
24
  {
22
25
  response_function: () => meshEdgesCommonStyle.mutateMeshEdgesStyle(id, { width }),
23
26
  },
@@ -29,9 +29,13 @@ export function useMeshStyle() {
29
29
  return dataStyleState.getStyle(id).visibility;
30
30
  }
31
31
  function setMeshVisibility(id, visibility) {
32
+ const schema = meshSchemas.visibility;
33
+ const params = { id, visibility };
32
34
  return viewerStore.request(
33
- meshSchemas.visibility,
34
- { id, visibility },
35
+ {
36
+ schema,
37
+ params,
38
+ },
35
39
  {
36
40
  response_function: async () => {
37
41
  await hybridViewerStore.setVisibility(id, visibility);
@@ -46,9 +50,13 @@ export function useMeshStyle() {
46
50
  }
47
51
 
48
52
  function setMeshColor(id, color) {
53
+ const schema = meshSchemas.color;
54
+ const params = { id, color };
49
55
  return viewerStore.request(
50
- meshSchemas.color,
51
- { id, color },
56
+ {
57
+ schema,
58
+ params,
59
+ },
52
60
  {
53
61
  response_function: () => dataStyleState.mutateStyle(id, { color }),
54
62
  },
@@ -6,7 +6,7 @@ import { useMeshPointsCommonStyle } from "./common";
6
6
  import { useViewerStore } from "@ogw_front/stores/viewer";
7
7
 
8
8
  // Local constants
9
- const meshPointsColorSchemas = viewer_schemas.opengeodeweb_viewer.mesh.points.color;
9
+ const schema = viewer_schemas.opengeodeweb_viewer.mesh.points.color;
10
10
 
11
11
  export function useMeshPointsColorStyle() {
12
12
  const viewerStore = useViewerStore();
@@ -16,9 +16,12 @@ export function useMeshPointsColorStyle() {
16
16
  return meshPointsCommonStyle.meshPointsColoring(id).color;
17
17
  }
18
18
  function setMeshPointsColor(id, color) {
19
+ const params = { id, color };
19
20
  return viewerStore.request(
20
- meshPointsColorSchemas,
21
- { id, color },
21
+ {
22
+ schema,
23
+ params,
24
+ },
22
25
  {
23
26
  response_function: () =>
24
27
  meshPointsCommonStyle.mutateMeshPointsColoring(id, {
@@ -6,7 +6,7 @@ import { useMeshPointsCommonStyle } from "./common";
6
6
  import { useViewerStore } from "@ogw_front/stores/viewer";
7
7
 
8
8
  // Local constants
9
- const meshPointsSizeSchemas = viewer_schemas.opengeodeweb_viewer.mesh.points.size;
9
+ const schema = viewer_schemas.opengeodeweb_viewer.mesh.points.size;
10
10
 
11
11
  export function useMeshPointsSizeStyle() {
12
12
  const viewerStore = useViewerStore();
@@ -16,9 +16,12 @@ export function useMeshPointsSizeStyle() {
16
16
  return meshPointsCommonStyle.meshPointsStyle(id).size;
17
17
  }
18
18
  function setMeshPointsSize(id, size) {
19
+ const params = { id, size };
19
20
  return viewerStore.request(
20
- meshPointsSizeSchemas,
21
- { id, size },
21
+ {
22
+ schema,
23
+ params,
24
+ },
22
25
  {
23
26
  response_function: () => meshPointsCommonStyle.mutateMeshPointsStyle(id, { size }),
24
27
  },
@@ -10,6 +10,7 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
10
10
  const meshPointsVertexAttributeSchemas =
11
11
  viewer_schemas.opengeodeweb_viewer.mesh.points.attribute.vertex;
12
12
 
13
+ // oxlint-disable-next-line max-lines-per-function
13
14
  function useMeshPointsVertexAttributeConfig() {
14
15
  const meshPointsCommonStyle = useMeshPointsCommonStyle();
15
16
 
@@ -74,14 +75,16 @@ function useMeshPointsVertexAttributeConfig() {
74
75
  };
75
76
  }
76
77
 
78
+ // oxlint-disable-next-line max-lines-per-function
77
79
  function useMeshPointsVertexAttributeActions() {
78
80
  const viewerStore = useViewerStore();
79
81
  const config = useMeshPointsVertexAttributeConfig();
80
82
 
81
83
  function setMeshPointsVertexAttributeName(id, name) {
84
+ const schema = meshPointsVertexAttributeSchemas.name;
85
+ const params = { id, name };
82
86
  return viewerStore.request(
83
- meshPointsVertexAttributeSchemas.name,
84
- { id, name },
87
+ { schema, params },
85
88
  {
86
89
  response_function: () => {
87
90
  const updates = { name };
@@ -105,9 +108,10 @@ function useMeshPointsVertexAttributeActions() {
105
108
  const name = config.meshPointsVertexAttributeName(id);
106
109
  const points = getRGBPointsFromPreset(config.meshPointsVertexAttributeColorMap(id));
107
110
  if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
111
+ const schema = meshPointsVertexAttributeSchemas.color_map;
112
+ const params = { id, points, minimum, maximum };
108
113
  return viewerStore.request(
109
- meshPointsVertexAttributeSchemas.color_map,
110
- { id, points, minimum, maximum },
114
+ { schema, params },
111
115
  {
112
116
  response_function: () =>
113
117
  config.setMeshPointsVertexAttributeStoredConfig(id, name, { minimum, maximum }),
@@ -126,9 +130,10 @@ function useMeshPointsVertexAttributeActions() {
126
130
  const points = getRGBPointsFromPreset(colorMap);
127
131
  const { minimum, maximum } = storedConfig;
128
132
  if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
133
+ const schema = meshPointsVertexAttributeSchemas.color_map;
134
+ const params = { id, points, minimum, maximum };
129
135
  return viewerStore.request(
130
- meshPointsVertexAttributeSchemas.color_map,
131
- { id, points, minimum, maximum },
136
+ { schema, params },
132
137
  {
133
138
  response_function: () =>
134
139
  config.setMeshPointsVertexAttributeStoredConfig(id, name, { colorMap }),
@@ -6,7 +6,7 @@ import { useMeshPointsCommonStyle } from "./common";
6
6
  import { useViewerStore } from "@ogw_front/stores/viewer";
7
7
 
8
8
  // Local constants
9
- const meshPointsVisibilitySchema = viewer_schemas.opengeodeweb_viewer.mesh.points.visibility;
9
+ const schema = viewer_schemas.opengeodeweb_viewer.mesh.points.visibility;
10
10
 
11
11
  export function useMeshPointsVisibilityStyle() {
12
12
  const viewerStore = useViewerStore();
@@ -16,9 +16,12 @@ export function useMeshPointsVisibilityStyle() {
16
16
  return meshPointsCommonStyle.meshPointsStyle(id).visibility;
17
17
  }
18
18
  function setMeshPointsVisibility(id, visibility) {
19
+ const params = { id, visibility };
19
20
  return viewerStore.request(
20
- meshPointsVisibilitySchema,
21
- { id, visibility },
21
+ {
22
+ schema,
23
+ params,
24
+ },
22
25
  {
23
26
  response_function: () => meshPointsCommonStyle.mutateMeshPointsStyle(id, { visibility }),
24
27
  },
@@ -6,7 +6,7 @@ import { useMeshPolygonsCommonStyle } from "./common";
6
6
  import { useViewerStore } from "@ogw_front/stores/viewer";
7
7
 
8
8
  // Local constants
9
- const meshPolygonsColorSchemas = viewer_schemas.opengeodeweb_viewer.mesh.polygons.color;
9
+ const schema = viewer_schemas.opengeodeweb_viewer.mesh.polygons.color;
10
10
 
11
11
  export function useMeshPolygonsColorStyle() {
12
12
  const viewerStore = useViewerStore();
@@ -16,9 +16,12 @@ export function useMeshPolygonsColorStyle() {
16
16
  return meshPolygonsCommonStyle.meshPolygonsColoring(id).color;
17
17
  }
18
18
  function setMeshPolygonsColor(id, color) {
19
+ const params = { id, color };
19
20
  return viewerStore.request(
20
- meshPolygonsColorSchemas,
21
- { id, color },
21
+ {
22
+ schema,
23
+ params,
24
+ },
22
25
  {
23
26
  response_function: () =>
24
27
  meshPolygonsCommonStyle.mutateMeshPolygonsColoring(id, {
@@ -52,9 +52,10 @@ export function useMeshPolygonsPolygonAttributeStyle() {
52
52
  }
53
53
 
54
54
  function setMeshPolygonsPolygonAttributeName(id, name) {
55
+ const schema = meshPolygonsPolygonAttributeSchemas.name;
56
+ const params = { id, name };
55
57
  return viewerStore.request(
56
- meshPolygonsPolygonAttributeSchemas.name,
57
- { id, name },
58
+ { schema, params },
58
59
  {
59
60
  response_function: () => {
60
61
  const updates = { name };
@@ -85,9 +86,10 @@ export function useMeshPolygonsPolygonAttributeStyle() {
85
86
  const name = meshPolygonsPolygonAttributeName(id);
86
87
  const points = getRGBPointsFromPreset(meshPolygonsPolygonAttributeColorMap(id));
87
88
  if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
89
+ const schema = meshPolygonsPolygonAttributeSchemas.color_map;
90
+ const params = { id, points, minimum, maximum };
88
91
  return viewerStore.request(
89
- meshPolygonsPolygonAttributeSchemas.color_map,
90
- { id, points, minimum, maximum },
92
+ { schema, params },
91
93
  {
92
94
  response_function: () =>
93
95
  setMeshPolygonsPolygonAttributeStoredConfig(id, name, { minimum, maximum }),
@@ -113,9 +115,10 @@ export function useMeshPolygonsPolygonAttributeStyle() {
113
115
  const points = getRGBPointsFromPreset(colorMap);
114
116
  const { minimum, maximum } = storedConfig;
115
117
  if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
118
+ const schema = meshPolygonsPolygonAttributeSchemas.color_map;
119
+ const params = { id, points, minimum, maximum };
116
120
  return viewerStore.request(
117
- meshPolygonsPolygonAttributeSchemas.color_map,
118
- { id, points, minimum, maximum },
121
+ { schema, params },
119
122
  {
120
123
  response_function: () =>
121
124
  setMeshPolygonsPolygonAttributeStoredConfig(id, name, { colorMap }),
@@ -6,7 +6,7 @@ import { useMeshPolygonsCommonStyle } from "./common";
6
6
  import { useViewerStore } from "@ogw_front/stores/viewer";
7
7
 
8
8
  // Local constants
9
- const meshPolygonsTexturesSchemas = viewer_schemas.opengeodeweb_viewer.mesh.polygons.apply_textures;
9
+ const schema = viewer_schemas.opengeodeweb_viewer.mesh.polygons.apply_textures;
10
10
 
11
11
  export function useMeshPolygonsTexturesStyle() {
12
12
  const viewerStore = useViewerStore();
@@ -16,9 +16,12 @@ export function useMeshPolygonsTexturesStyle() {
16
16
  return meshPolygonsCommonStyle.meshPolygonsColoring(id).textures;
17
17
  }
18
18
  function setMeshPolygonsTextures(id, textures) {
19
+ const params = { id, textures };
19
20
  return viewerStore.request(
20
- meshPolygonsTexturesSchemas,
21
- { id, textures },
21
+ {
22
+ schema,
23
+ params,
24
+ },
22
25
  {
23
26
  response_function: () =>
24
27
  meshPolygonsCommonStyle.mutateMeshPolygonsStyle(id, {
@@ -10,6 +10,7 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
10
10
  const meshPolygonsVertexAttributeSchemas =
11
11
  viewer_schemas.opengeodeweb_viewer.mesh.polygons.attribute.vertex;
12
12
 
13
+ // oxlint-disable-next-line max-lines-per-function
13
14
  export function useMeshPolygonsVertexAttributeStyle() {
14
15
  const viewerStore = useViewerStore();
15
16
  const meshPolygonsCommonStyle = useMeshPolygonsCommonStyle();
@@ -51,9 +52,10 @@ export function useMeshPolygonsVertexAttributeStyle() {
51
52
  }
52
53
 
53
54
  function setMeshPolygonsVertexAttributeName(id, name) {
55
+ const schema = meshPolygonsVertexAttributeSchemas.name;
56
+ const params = { id, name };
54
57
  return viewerStore.request(
55
- meshPolygonsVertexAttributeSchemas.name,
56
- { id, name },
58
+ { schema, params },
57
59
  {
58
60
  response_function: () => {
59
61
  const updates = { name };
@@ -84,9 +86,10 @@ export function useMeshPolygonsVertexAttributeStyle() {
84
86
  const name = meshPolygonsVertexAttributeName(id);
85
87
  const points = getRGBPointsFromPreset(meshPolygonsVertexAttributeColorMap(id));
86
88
  if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
89
+ const schema = meshPolygonsVertexAttributeSchemas.color_map;
90
+ const params = { id, points, minimum, maximum };
87
91
  return viewerStore.request(
88
- meshPolygonsVertexAttributeSchemas.color_map,
89
- { id, points, minimum, maximum },
92
+ { schema, params },
90
93
  {
91
94
  response_function: () =>
92
95
  setMeshPolygonsVertexAttributeStoredConfig(id, name, { minimum, maximum }),
@@ -112,9 +115,10 @@ export function useMeshPolygonsVertexAttributeStyle() {
112
115
  const points = getRGBPointsFromPreset(colorMap);
113
116
  const { minimum, maximum } = storedConfig;
114
117
  if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
118
+ const schema = meshPolygonsVertexAttributeSchemas.color_map;
119
+ const params = { id, points, minimum, maximum };
115
120
  return viewerStore.request(
116
- meshPolygonsVertexAttributeSchemas.color_map,
117
- { id, points, minimum, maximum },
121
+ { schema, params },
118
122
  {
119
123
  response_function: () =>
120
124
  setMeshPolygonsVertexAttributeStoredConfig(id, name, { colorMap }),
@@ -6,7 +6,7 @@ import { useMeshPolygonsCommonStyle } from "./common";
6
6
  import { useViewerStore } from "@ogw_front/stores/viewer";
7
7
 
8
8
  // Local constants
9
- const meshPolygonsVisibilitySchema = viewer_schemas.opengeodeweb_viewer.mesh.polygons.visibility;
9
+ const schema = viewer_schemas.opengeodeweb_viewer.mesh.polygons.visibility;
10
10
 
11
11
  export function useMeshPolygonsVisibilityStyle() {
12
12
  const viewerStore = useViewerStore();
@@ -16,9 +16,12 @@ export function useMeshPolygonsVisibilityStyle() {
16
16
  return meshPolygonsCommonStyle.meshPolygonsStyle(id).visibility;
17
17
  }
18
18
  function setMeshPolygonsVisibility(id, visibility) {
19
+ const params = { id, visibility };
19
20
  return viewerStore.request(
20
- meshPolygonsVisibilitySchema,
21
- { id, visibility },
21
+ {
22
+ schema,
23
+ params,
24
+ },
22
25
  {
23
26
  response_function: () =>
24
27
  meshPolygonsCommonStyle.mutateMeshPolygonsStyle(id, {