@geode/opengeodeweb-front 12.0.0-rc.1 → 12.0.0

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 (170) hide show
  1. package/.build/shared/utils/response_handlers/load.js +5 -2
  2. package/app/assets/geode_objects.ts +37 -108
  3. package/app/assets/img/geode_objects/HorizonStack3D.svg +10 -0
  4. package/app/components/CrsSelector.vue +6 -6
  5. package/app/components/ExtensionSelector.vue +21 -14
  6. package/app/components/MissingFilesSelector.vue +1 -1
  7. package/app/components/ObjectSelector.vue +7 -14
  8. package/app/components/ThresholdFilter.vue +1 -1
  9. package/app/components/TimeSeriesTargetSelector.vue +2 -5
  10. package/app/components/Viewer/ContextMenu/ContextMenu.vue +1 -1
  11. package/app/components/Viewer/EdgedCurve/SpecificEdgesColoring.vue +12 -9
  12. package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +2 -2
  13. package/app/components/Viewer/Generic/Mesh/CellsColoring.vue +12 -9
  14. package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +1 -1
  15. package/app/components/Viewer/Generic/Mesh/EdgesColoring.vue +12 -9
  16. package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +3 -3
  17. package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +12 -8
  18. package/app/components/Viewer/Generic/Mesh/PolygonsColoring.vue +12 -9
  19. package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +1 -1
  20. package/app/components/Viewer/Generic/Mesh/PolyhedraColoring.vue +12 -9
  21. package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +1 -1
  22. package/app/components/Viewer/Generic/Model/BlocksOptions.vue +16 -17
  23. package/app/components/Viewer/Generic/Model/ComponentEdgesOptions.vue +11 -6
  24. package/app/components/Viewer/Generic/Model/ComponentPointsOptions.vue +11 -6
  25. package/app/components/Viewer/Generic/Model/CornerComponentOptions.vue +7 -8
  26. package/app/components/Viewer/Generic/Model/CornersTypeOptions.vue +7 -8
  27. package/app/components/Viewer/Generic/Model/LineComponentOptions.vue +9 -10
  28. package/app/components/Viewer/Generic/Model/LinesTypeOptions.vue +9 -10
  29. package/app/components/Viewer/Generic/Model/ModelEdgesCard.vue +2 -2
  30. package/app/components/Viewer/Generic/Model/ModelPointsCard.vue +1 -1
  31. package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +3 -4
  32. package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +16 -17
  33. package/app/components/Viewer/ObjectTree/Layout.vue +2 -2
  34. package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +2 -1
  35. package/app/components/Viewer/Options/AttributeSelector.vue +1 -1
  36. package/app/components/Viewer/Options/ColorPicker.vue +3 -3
  37. package/app/components/Viewer/Options/ColoringTypeSelector.vue +8 -8
  38. package/app/components/Viewer/Options/TextureItem.vue +2 -6
  39. package/app/components/Viewer/Options/TexturesSelector.vue +1 -1
  40. package/app/components/Viewer/OverlappingObjectsPicker.vue +3 -3
  41. package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +4 -5
  42. package/app/components/Viewer/Scene/BackgroundOptions.vue +2 -2
  43. package/app/components/Viewer/Scene/TextOptions.vue +2 -2
  44. package/app/components/Viewer/Solid/SpecificPolyhedraColoring.vue +12 -12
  45. package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +1 -1
  46. package/app/components/Viewer/Surface/PolygonsColoring.vue +12 -12
  47. package/app/components/Viewer/Surface/PolygonsOptions.vue +1 -1
  48. package/app/composables/attribute_selector.ts +1 -1
  49. package/app/composables/batch_style.ts +3 -3
  50. package/app/composables/batch_style_model.ts +1 -1
  51. package/app/composables/clipping_slices.ts +2 -1
  52. package/app/composables/hover_highlight.ts +10 -7
  53. package/app/composables/live_data_item.ts +1 -1
  54. package/app/composables/model_menu_context.ts +11 -4
  55. package/app/composables/project_manager_helpers/types.ts +2 -2
  56. package/app/composables/use_overlapping_picker.ts +10 -8
  57. package/app/composables/viewer_context_menu.ts +4 -2
  58. package/app/composables/viewer_reset.ts +4 -5
  59. package/app/stores/basemap_helpers/builds.ts +2 -2
  60. package/app/stores/basemap_helpers/viewer.ts +1 -1
  61. package/app/stores/crs.ts +12 -12
  62. package/app/stores/data.ts +4 -5
  63. package/app/stores/data_helpers/mesh.ts +2 -1
  64. package/app/stores/data_style.ts +4 -3
  65. package/app/stores/menu.ts +18 -12
  66. package/app/stores/treeview.ts +5 -4
  67. package/app/types/attribute.ts +5 -21
  68. package/app/types/identifiers.ts +5 -15
  69. package/app/utils/attribute_range.ts +1 -1
  70. package/app/utils/attributes.ts +2 -1
  71. package/app/utils/clipping_planes.ts +1 -1
  72. package/app/utils/color_picker.ts +3 -3
  73. package/app/utils/crs.ts +6 -6
  74. package/app/utils/default_styles/constants.ts +17 -22
  75. package/app/utils/default_styles/index.ts +3 -3
  76. package/app/utils/default_styles/mesh_components.ts +15 -11
  77. package/app/utils/default_styles/meshes.ts +1 -1
  78. package/app/utils/default_styles/model_components.ts +14 -10
  79. package/app/utils/default_styles/models.ts +1 -1
  80. package/app/utils/import_workflow.ts +3 -1
  81. package/app/utils/legacy_data_id.ts +2 -1
  82. package/app/utils/slice.ts +2 -1
  83. package/app/utils/threshold_sources.ts +1 -1
  84. package/internal/stores/data_style/attribute_types.ts +6 -6
  85. package/internal/stores/data_style/mesh/base_style.ts +6 -7
  86. package/internal/stores/data_style/mesh/cells/cell.ts +6 -6
  87. package/internal/stores/data_style/mesh/cells/cell_attribute.ts +8 -6
  88. package/internal/stores/data_style/mesh/cells/cell_config.ts +5 -6
  89. package/internal/stores/data_style/mesh/cells/color.ts +6 -6
  90. package/internal/stores/data_style/mesh/cells/opacity.ts +3 -4
  91. package/internal/stores/data_style/mesh/cells/vertex.ts +6 -6
  92. package/internal/stores/data_style/mesh/cells/vertex_attribute.ts +8 -6
  93. package/internal/stores/data_style/mesh/cells/vertex_config.ts +5 -6
  94. package/internal/stores/data_style/mesh/cells/visibility.ts +1 -1
  95. package/internal/stores/data_style/mesh/edges/color.ts +6 -6
  96. package/internal/stores/data_style/mesh/edges/edge.ts +6 -6
  97. package/internal/stores/data_style/mesh/edges/edge_attribute.ts +8 -6
  98. package/internal/stores/data_style/mesh/edges/edge_config.ts +5 -6
  99. package/internal/stores/data_style/mesh/edges/opacity.ts +3 -4
  100. package/internal/stores/data_style/mesh/edges/vertex.ts +6 -6
  101. package/internal/stores/data_style/mesh/edges/vertex_attribute.ts +8 -6
  102. package/internal/stores/data_style/mesh/edges/vertex_config.ts +5 -6
  103. package/internal/stores/data_style/mesh/edges/visibility.ts +1 -1
  104. package/internal/stores/data_style/mesh/edges/width.ts +6 -6
  105. package/internal/stores/data_style/mesh/index.ts +3 -4
  106. package/internal/stores/data_style/mesh/points/color.ts +6 -6
  107. package/internal/stores/data_style/mesh/points/common.ts +1 -1
  108. package/internal/stores/data_style/mesh/points/opacity.ts +3 -4
  109. package/internal/stores/data_style/mesh/points/size.ts +6 -6
  110. package/internal/stores/data_style/mesh/points/vertex.ts +6 -6
  111. package/internal/stores/data_style/mesh/points/vertex_attribute.ts +8 -6
  112. package/internal/stores/data_style/mesh/points/vertex_config.ts +5 -6
  113. package/internal/stores/data_style/mesh/points/visibility.ts +1 -1
  114. package/internal/stores/data_style/mesh/polygons/color.ts +6 -6
  115. package/internal/stores/data_style/mesh/polygons/opacity.ts +3 -4
  116. package/internal/stores/data_style/mesh/polygons/polygon.ts +6 -6
  117. package/internal/stores/data_style/mesh/polygons/polygon_attribute.ts +8 -6
  118. package/internal/stores/data_style/mesh/polygons/polygon_config.ts +5 -6
  119. package/internal/stores/data_style/mesh/polygons/vertex.ts +6 -6
  120. package/internal/stores/data_style/mesh/polygons/vertex_attribute.ts +8 -6
  121. package/internal/stores/data_style/mesh/polygons/vertex_config.ts +5 -6
  122. package/internal/stores/data_style/mesh/polygons/visibility.ts +1 -1
  123. package/internal/stores/data_style/mesh/polyhedra/color.ts +6 -6
  124. package/internal/stores/data_style/mesh/polyhedra/opacity.ts +3 -4
  125. package/internal/stores/data_style/mesh/polyhedra/polyhedron.ts +6 -6
  126. package/internal/stores/data_style/mesh/polyhedra/polyhedron_attribute.ts +8 -6
  127. package/internal/stores/data_style/mesh/polyhedra/polyhedron_config.ts +5 -6
  128. package/internal/stores/data_style/mesh/polyhedra/vertex.ts +6 -6
  129. package/internal/stores/data_style/mesh/polyhedra/vertex_attribute.ts +8 -6
  130. package/internal/stores/data_style/mesh/polyhedra/vertex_config.ts +5 -6
  131. package/internal/stores/data_style/mesh/polyhedra/visibility.ts +1 -1
  132. package/internal/stores/data_style/model/blocks/color.ts +6 -6
  133. package/internal/stores/data_style/model/blocks/coloring_groups.ts +2 -2
  134. package/internal/stores/data_style/model/blocks/polyhedron.ts +12 -9
  135. package/internal/stores/data_style/model/blocks/vertex.ts +12 -9
  136. package/internal/stores/data_style/model/blocks/visibility.ts +1 -1
  137. package/internal/stores/data_style/model/color.ts +10 -11
  138. package/internal/stores/data_style/model/common.ts +3 -4
  139. package/internal/stores/data_style/model/corners/color.ts +6 -6
  140. package/internal/stores/data_style/model/corners/index.ts +2 -2
  141. package/internal/stores/data_style/model/corners/vertex.ts +12 -9
  142. package/internal/stores/data_style/model/corners/visibility.ts +1 -1
  143. package/internal/stores/data_style/model/edges/component.ts +13 -13
  144. package/internal/stores/data_style/model/edges/visibility.ts +1 -1
  145. package/internal/stores/data_style/model/edges/width.ts +6 -6
  146. package/internal/stores/data_style/model/lines/color.ts +6 -6
  147. package/internal/stores/data_style/model/lines/coloring_groups.ts +2 -2
  148. package/internal/stores/data_style/model/lines/edge.ts +12 -9
  149. package/internal/stores/data_style/model/lines/vertex.ts +12 -9
  150. package/internal/stores/data_style/model/lines/visibility.ts +1 -1
  151. package/internal/stores/data_style/model/points/component.ts +17 -13
  152. package/internal/stores/data_style/model/points/index.ts +2 -2
  153. package/internal/stores/data_style/model/points/size.ts +6 -6
  154. package/internal/stores/data_style/model/points/visibility.ts +1 -1
  155. package/internal/stores/data_style/model/surfaces/color.ts +6 -6
  156. package/internal/stores/data_style/model/surfaces/coloring_groups.ts +2 -2
  157. package/internal/stores/data_style/model/surfaces/polygon.ts +12 -9
  158. package/internal/stores/data_style/model/surfaces/vertex.ts +12 -9
  159. package/internal/stores/data_style/model/surfaces/visibility.ts +1 -1
  160. package/internal/stores/data_style/model/visibility.ts +1 -1
  161. package/internal/stores/data_style/scene.ts +5 -5
  162. package/internal/stores/data_style/time_step.ts +3 -2
  163. package/internal/stores/data_style/types.ts +3 -4
  164. package/internal/stores/hybrid_viewer/camera.ts +1 -1
  165. package/internal/stores/hybrid_viewer/filters.ts +2 -2
  166. package/internal/stores/hybrid_viewer/highlight.ts +2 -1
  167. package/internal/stores/hybrid_viewer/scene.ts +3 -3
  168. package/package.json +5 -4
  169. package/shared/utils/response_handlers/load.ts +19 -11
  170. package/app/types/style.ts +0 -13
@@ -2,13 +2,16 @@
2
2
  function getFileExtension(filename) {
3
3
  return filename.slice(filename.lastIndexOf(".") + 1);
4
4
  }
5
+ function allowedObjectTypes(objectMap) {
6
+ return Object.keys(objectMap);
7
+ }
5
8
  function getObject(objectMap, key) {
6
9
  const object = objectMap[key];
7
10
  if (!object) throw new Error(`Unknown geode object key: ${key}`);
8
11
  return object;
9
12
  }
10
13
  function intersectAllowedObjects(allowedObjectsList) {
11
- const allKeys = [...new Set(allowedObjectsList.flatMap((object) => Object.keys(object)))];
14
+ const allKeys = [...new Set(allowedObjectsList.flatMap((object) => allowedObjectTypes(object)))];
12
15
  const commonKeys = allKeys.filter((key) => allowedObjectsList.every((object) => key in object));
13
16
  const mergedEntries = commonKeys.map((key) => {
14
17
  const loadScores = allowedObjectsList.map((object) => getObject(object, key).is_loadable);
@@ -33,7 +36,7 @@ function resolveAllowedObjects(filenames, allowedObjectsList) {
33
36
  };
34
37
  }
35
38
  function sortCandidates(objectMap) {
36
- return Object.keys(objectMap).filter((key) => getObject(objectMap, key).is_loadable > 0).toSorted((keyA, keyB) => {
39
+ return allowedObjectTypes(objectMap).filter((key) => getObject(objectMap, key).is_loadable > 0).toSorted((keyA, keyB) => {
37
40
  const objectA = getObject(objectMap, keyA);
38
41
  const objectB = getObject(objectMap, keyB);
39
42
  if (objectA.is_loadable !== objectB.is_loadable) return objectB.is_loadable - objectA.is_loadable;
@@ -1,8 +1,12 @@
1
+ // oxlint-disable import/max-dependencies -- one icon import per geode object type
2
+ import type { GeodeObjectType } from "@geode/opengeodeweb-microservice/data_types";
3
+
1
4
  import BRep from "@ogw_front/assets/img/geode_objects/BRep.svg";
2
5
  import CrossSection from "@ogw_front/assets/img/geode_objects/CrossSection.svg";
3
6
  import EdgedCurve2D from "@ogw_front/assets/img/geode_objects/EdgedCurve2D.svg";
4
7
  import EdgedCurve3D from "@ogw_front/assets/img/geode_objects/EdgedCurve3D.svg";
5
8
  import Graph from "@ogw_front/assets/img/geode_objects/Graph.svg";
9
+ import HorizonStack3D from "@ogw_front/assets/img/geode_objects/HorizonStack3D.svg";
6
10
  import HybridSolid3D from "@ogw_front/assets/img/geode_objects/HybridSolid3D.svg";
7
11
  import ImplicitCrossSection from "@ogw_front/assets/img/geode_objects/ImplicitCrossSection.svg";
8
12
  import ImplicitStructuralModel from "@ogw_front/assets/img/geode_objects/ImplicitStructuralModel.svg";
@@ -13,7 +17,6 @@ import PointSet3D from "@ogw_front/assets/img/geode_objects/PointSet3D.svg";
13
17
  import PolygonalSurface2D from "@ogw_front/assets/img/geode_objects/PolygonalSurface2D.svg";
14
18
  import PolygonalSurface3D from "@ogw_front/assets/img/geode_objects/PolygonalSurface3D.svg";
15
19
  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.
17
20
  import RasterImage2D from "@ogw_front/assets/img/geode_objects/RasterImage2D.svg";
18
21
  import RasterImage3D from "@ogw_front/assets/img/geode_objects/RasterImage3D.svg";
19
22
  import RegularGrid2D from "@ogw_front/assets/img/geode_objects/RegularGrid2D.svg";
@@ -25,112 +28,38 @@ import TriangulatedSurface2D from "@ogw_front/assets/img/geode_objects/Triangula
25
28
  import TriangulatedSurface3D from "@ogw_front/assets/img/geode_objects/TriangulatedSurface3D.svg";
26
29
  import VertexSet from "@ogw_front/assets/img/geode_objects/VertexSet.svg";
27
30
 
28
- interface GeodeObject {
29
- tooltip: string;
30
- image: string;
31
- }
32
-
33
- const geode_objects: Record<string, GeodeObject> = {
34
- BRep: {
35
- tooltip: "BRep",
36
- image: BRep,
37
- },
38
- CrossSection: {
39
- tooltip: "CrossSection",
40
- image: CrossSection,
41
- },
42
- EdgedCurve2D: {
43
- tooltip: "EdgedCurve2D",
44
- image: EdgedCurve2D,
45
- },
46
- EdgedCurve3D: {
47
- tooltip: "EdgedCurve3D",
48
- image: EdgedCurve3D,
49
- },
50
- Graph: {
51
- tooltip: "Graph",
52
- image: Graph,
53
- },
54
- HybridSolid3D: {
55
- tooltip: "HybridSolid3D",
56
- image: HybridSolid3D,
57
- },
58
- ImplicitCrossSection: {
59
- tooltip: "ImplicitCrossSection",
60
- image: ImplicitCrossSection,
61
- },
62
- ImplicitStructuralModel: {
63
- tooltip: "ImplicitStructuralModel",
64
- image: ImplicitStructuralModel,
65
- },
66
- LightRegularGrid2D: {
67
- tooltip: "LightRegularGrid2D",
68
- image: LightRegularGrid2D,
69
- },
70
- LightRegularGrid3D: {
71
- tooltip: "LightRegularGrid3D",
72
- image: LightRegularGrid3D,
73
- },
74
- PointSet2D: {
75
- tooltip: "PointSet2D",
76
- image: PointSet2D,
77
- },
78
- PointSet3D: {
79
- tooltip: "PointSet3D",
80
- image: PointSet3D,
81
- },
82
- PolygonalSurface2D: {
83
- tooltip: "PolygonalSurface2D",
84
- image: PolygonalSurface2D,
85
- },
86
- PolygonalSurface3D: {
87
- tooltip: "PolygonalSurface3D",
88
- image: PolygonalSurface3D,
89
- },
90
- PolyhedralSolid3D: {
91
- tooltip: "PolyhedralSolid3D",
92
- image: PolyhedralSolid3D,
93
- },
94
- RasterImage2D: {
95
- tooltip: "RasterImage2D",
96
- image: RasterImage2D,
97
- },
98
- RasterImage3D: {
99
- tooltip: "RasterImage3D",
100
- image: RasterImage3D,
101
- },
102
- RegularGrid2D: {
103
- tooltip: "RegularGrid2D",
104
- image: RegularGrid2D,
105
- },
106
- RegularGrid3D: {
107
- tooltip: "RegularGrid3D",
108
- image: RegularGrid3D,
109
- },
110
- Section: {
111
- tooltip: "Section",
112
- image: Section,
113
- },
114
- StructuralModel: {
115
- tooltip: "StructuralModel",
116
- image: StructuralModel,
117
- },
118
- TetrahedralSolid3D: {
119
- tooltip: "TetrahedralSolid3D",
120
- image: TetrahedralSolid3D,
121
- },
122
- TriangulatedSurface2D: {
123
- tooltip: "TriangulatedSurface2D",
124
- image: TriangulatedSurface2D,
125
- },
126
- TriangulatedSurface3D: {
127
- tooltip: "TriangulatedSurface3D",
128
- image: TriangulatedSurface3D,
129
- },
130
- VertexSet: {
131
- tooltip: "VertexSet",
132
- image: VertexSet,
133
- },
31
+ // Icon of each geode object type: every type of data_types.py must have one
32
+ const geodeObjectImages: Record<GeodeObjectType, string> = {
33
+ BRep,
34
+ CrossSection,
35
+ EdgedCurve2D,
36
+ EdgedCurve3D,
37
+ Graph,
38
+ HorizonStack3D,
39
+ HybridSolid3D,
40
+ ImplicitCrossSection,
41
+ ImplicitStructuralModel,
42
+ LightRegularGrid2D,
43
+ LightRegularGrid3D,
44
+ PointSet2D,
45
+ PointSet3D,
46
+ PolygonalSurface2D,
47
+ PolygonalSurface3D,
48
+ PolyhedralSolid3D,
49
+ RasterImage2D,
50
+ RasterImage3D,
51
+ RegularGrid2D,
52
+ RegularGrid3D,
53
+ Section,
54
+ StructuralModel,
55
+ TetrahedralSolid3D,
56
+ TriangulatedSurface2D,
57
+ TriangulatedSurface3D,
58
+ VertexSet,
134
59
  };
135
60
 
136
- export { geode_objects };
61
+ function geodeObjectImage(geodeObjectType: GeodeObjectType): string {
62
+ return geodeObjectImages[geodeObjectType];
63
+ }
64
+
65
+ export { geodeObjectImage };
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="18.141853mm" height="18.141851mm" viewBox="0 0 64.282157 64.282151" version="1.1">
3
+ <g style="fill:none;stroke:#000000;stroke-width:4.24248075;stroke-linecap:round;stroke-linejoin:round">
4
+ <path d="M 15,6 H 49 V 58 H 15 Z" />
5
+ <path d="M 15.00,17.00 C 25.20,12.00 30.30,22.00 38.80,17.00 S 46.28,14.50 49.00,17.00" />
6
+ <path d="M 15,28 H 49" />
7
+ <path d="M 15.00,39.50 C 25.20,34.50 30.30,44.50 38.80,39.50 S 46.28,37.00 49.00,39.50" />
8
+ <path d="M 15,49 H 49" />
9
+ </g>
10
+ </svg>
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import type { CRSList } from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
3
- import type { GeodeObjectType } from "@ogw_front/types/identifiers";
2
+ import type { CRS } from "@geode/opengeodeweb-back/schema_types";
3
+ import type { GeodeObjectType } from "@geode/opengeodeweb-microservice/data_types";
4
4
  import { useCrsStore } from "@ogw_front/stores/crs";
5
5
 
6
6
  interface Props {
@@ -10,23 +10,23 @@ interface Props {
10
10
  }
11
11
 
12
12
  const { geodeObjectType, compact = false } = defineProps<Props>();
13
- const selectedCrs = defineModel<CRSList | undefined>();
13
+ const selectedCrs = defineModel<CRS | undefined>();
14
14
 
15
15
  const search = ref<string>("");
16
16
  const data_table_loading = ref<boolean>(false);
17
17
  // Thousands of rows that are never mutated: no deep reactivity
18
- const crs_list = shallowRef<CRSList[]>([]);
18
+ const crs_list = shallowRef<CRS[]>([]);
19
19
  // Keys of the selected rows: the item-value of the table, "AUTHORITY:CODE"
20
20
  const selected_crs = ref<string[]>([]);
21
21
  const toggle_loading = useToggle(data_table_loading);
22
22
  const crsStore = useCrsStore();
23
23
 
24
24
  // Codes are only unique within an authority (e.g. EPSG:4812 and ESRI:4812)
25
- function crs_key(crs: CRSList): string {
25
+ function crs_key(crs: CRS): string {
26
26
  return `${crs.authority}:${crs.code}`;
27
27
  }
28
28
 
29
- function get_selected_crs(key: string | undefined): CRSList | undefined {
29
+ function get_selected_crs(key: string | undefined): CRS | undefined {
30
30
  return crs_list.value.find((crs) => crs_key(crs) === key);
31
31
  }
32
32
 
@@ -2,7 +2,7 @@
2
2
  import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
3
3
 
4
4
  import FetchingData from "@ogw_front/components/FetchingData.vue";
5
- import type { GeodeObjectType } from "@ogw_front/types/identifiers";
5
+ import type { GeodeObjectType } from "@geode/opengeodeweb-microservice/data_types";
6
6
  import { useBackStore } from "@ogw_front/stores/back";
7
7
 
8
8
  const schema = schemas.opengeodeweb_back.geode_objects_and_output_extensions;
@@ -20,7 +20,9 @@ interface Props {
20
20
  const { geodeObjectType, filenames } = defineProps<Props>();
21
21
  type OutputExtensions = Record<string, { is_saveable: boolean }>;
22
22
 
23
- const geode_objects_and_output_extensions = ref<Record<GeodeObjectType, OutputExtensions>>({});
23
+ const geode_objects_and_output_extensions = ref<Partial<Record<GeodeObjectType, OutputExtensions>>>(
24
+ {},
25
+ );
24
26
  const loading = ref<boolean>(false);
25
27
 
26
28
  const toggle_loading = useToggle(loading);
@@ -29,25 +31,28 @@ async function get_output_file_extensions(): Promise<void> {
29
31
  toggle_loading();
30
32
  geode_objects_and_output_extensions.value = {};
31
33
  const backStore = useBackStore();
32
- const values: Record<GeodeObjectType, Record<string, boolean>>[] = await Promise.all(
33
- filenames.map(async (filename): Promise<Record<GeodeObjectType, Record<string, boolean>>> => {
34
- const params = { geode_object_type: geodeObjectType, filename };
35
- const response = await backStore.request({ schema, params });
36
- return response.geode_objects_and_output_extensions;
37
- }),
34
+ const values: Partial<Record<GeodeObjectType, Record<string, boolean>>>[] = await Promise.all(
35
+ filenames.map(
36
+ async (filename): Promise<Partial<Record<GeodeObjectType, Record<string, boolean>>>> => {
37
+ const params = { geode_object_type: geodeObjectType, filename };
38
+ const response = await backStore.request({ schema, params });
39
+ return response.geode_objects_and_output_extensions;
40
+ },
41
+ ),
38
42
  );
39
- const all_keys = [...new Set(values.flatMap((value) => Object.keys(value)))];
43
+ const all_keys = [...new Set(values.flatMap((value) => Object.keys(value) as GeodeObjectType[]))];
40
44
  const common_keys = all_keys.filter((i) => !values.some((j) => !Object.keys(j).includes(i)));
41
- const final_object: Record<GeodeObjectType, OutputExtensions> = {};
45
+ const final_object: Partial<Record<GeodeObjectType, OutputExtensions>> = {};
42
46
  for (const key of common_keys) {
43
- final_object[key] = {};
47
+ const output_extensions: OutputExtensions = {};
48
+ final_object[key] = output_extensions;
44
49
  for (const value of values) {
45
50
  const extensions = value[key];
46
51
  if (!extensions) {
47
52
  continue;
48
53
  }
49
54
  for (const [extension, is_saveable] of Object.entries(extensions)) {
50
- final_object[key][extension] = { is_saveable };
55
+ output_extensions[extension] = { is_saveable };
51
56
  }
52
57
  }
53
58
  }
@@ -56,7 +61,7 @@ async function get_output_file_extensions(): Promise<void> {
56
61
  }
57
62
 
58
63
  function update_values(output_geode_object: GeodeObjectType, output_extension: string): void {
59
- if (output_geode_object !== "" && output_extension !== "") {
64
+ if (output_extension !== "") {
60
65
  emit("update_values", {
61
66
  output_geode_object,
62
67
  output_extension,
@@ -100,7 +105,9 @@ await get_output_file_extensions();
100
105
  class="card ma-2"
101
106
  :color="extension.is_saveable ? 'primary' : 'grey'"
102
107
  hover
103
- @click="update_values(output_geode_object, output_extension)"
108
+ @click="
109
+ update_values(output_geode_object as GeodeObjectType, output_extension)
110
+ "
104
111
  :disabled="!extension.is_saveable"
105
112
  >
106
113
  <v-card-title align="center">
@@ -5,7 +5,7 @@ import { matchExpectedFiles, uploadPath } from "@ogw_front/utils/upload_path";
5
5
  import DragAndDrop from "@ogw_front/components/DragAndDrop.vue";
6
6
  import FetchingData from "@ogw_front/components/FetchingData.vue";
7
7
  import FileUploader from "@ogw_front/components/FileUploader.vue";
8
- import type { GeodeObjectType } from "@ogw_front/types/identifiers";
8
+ import type { GeodeObjectType } from "@geode/opengeodeweb-microservice/data_types";
9
9
  import { useBackStore } from "@ogw_front/stores/back";
10
10
  import { useFeedbackStore } from "@ogw_front/stores/feedback";
11
11
 
@@ -7,8 +7,8 @@ import {
7
7
  resolveAllowedObjectsPerFile,
8
8
  } from "@ogw_shared/utils/response_handlers/load.js";
9
9
  import FetchingData from "@ogw_front/components/FetchingData.vue";
10
- import type { GeodeObjectType } from "@ogw_front/types/identifiers";
11
- import { geode_objects } from "@ogw_front/assets/geode_objects";
10
+ import type { GeodeObjectType } from "@geode/opengeodeweb-microservice/data_types";
11
+ import { geodeObjectImage } from "@ogw_front/assets/geode_objects";
12
12
  import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
13
13
  import { useBackStore } from "@ogw_front/stores/back";
14
14
 
@@ -94,15 +94,8 @@ function groupPendingFiles(pending: readonly FileAllowedObjects[]): PendingGroup
94
94
  return [...groups.values()];
95
95
  }
96
96
 
97
- // The geode_objects lookup is fixed and keyed by known object type names; a missing entry only happens if the backend reports a type this table doesn't know about.
98
97
  function geodeObjectTooltip(key: string, isLoadable: boolean): string {
99
- return isLoadable
100
- ? (geode_objects[key]?.tooltip ?? key)
101
- : `Data not loadable with this class (${key})`;
102
- }
103
-
104
- function geodeObjectImage(key: string): string | undefined {
105
- return geode_objects[key]?.image;
98
+ return isLoadable ? key : `Data not loadable with this class (${key})`;
106
99
  }
107
100
 
108
101
  function showCommonGeodeObjects(
@@ -229,7 +222,7 @@ await getAllowedGeodeObjects();
229
222
  Choose the data type for: {{ pendingFilenames.join(", ") }}
230
223
  </v-col>
231
224
  <v-col v-for="(value, key) in allowedGeodeObjects" :key="key" cols="3" md="4">
232
- <v-tooltip :text="geodeObjectTooltip(key, Boolean(value['is_loadable']))" location="bottom">
225
+ <v-tooltip :text="geodeObjectTooltip(key, Boolean(value?.is_loadable))" location="bottom">
233
226
  <template v-slot:activator="{ props }">
234
227
  <span v-bind="props">
235
228
  <v-card
@@ -238,13 +231,13 @@ await getAllowedGeodeObjects();
238
231
  hover
239
232
  rounded
240
233
  @click="setGeodeObject(key)"
241
- :disabled="!value['is_loadable']"
242
- :elevation="value['is_loadable'] ? 5 : 3"
234
+ :disabled="!value?.is_loadable"
235
+ :elevation="value?.is_loadable ? 5 : 3"
243
236
  >
244
237
  <v-img
245
238
  :src="geodeObjectImage(key)"
246
239
  cover
247
- :class="!value['is_loadable'] ? 'disabled' : undefined"
240
+ :class="!value?.is_loadable ? 'disabled' : undefined"
248
241
  />
249
242
  </v-card>
250
243
  </span>
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import type { Threshold, ThresholdAttribute } from "@ogw_internal/stores/hybrid_viewer/filters";
3
3
  import type { AttributeSource } from "@ogw_front/utils/threshold";
4
- import type { DataId } from "@ogw_front/types/identifiers";
4
+ import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
5
5
  import ThresholdCard from "@ogw_front/components/ThresholdCard.vue";
6
6
  import ToolPanel from "@ogw_front/components/ToolPanel.vue";
7
7
  import { fetchSources } from "@ogw_front/utils/threshold_sources";
@@ -1,12 +1,9 @@
1
1
  <script setup lang="ts">
2
2
  import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
3
3
 
4
- import type {
5
- DataIdentified,
6
- GeodeObjectType,
7
- GeodeObjectTyped,
8
- } from "@ogw_front/types/identifiers";
4
+ import type { DataIdentified, GeodeObjectTyped } from "@ogw_front/types/identifiers";
9
5
  import FetchingData from "@ogw_front/components/FetchingData.vue";
6
+ import type { GeodeObjectType } from "@geode/opengeodeweb-microservice/data_types";
10
7
  import { useBackStore } from "@ogw_front/stores/back";
11
8
  import { useDataStore } from "@ogw_front/stores/data";
12
9
 
@@ -114,7 +114,7 @@ useEventListener(globalThis, "mouseup", (event: MouseEvent) => {
114
114
 
115
115
  const menu_items = shallowRef<Component[]>([]);
116
116
  watch(
117
- () => [meta_data.value.viewer_object_type, meta_data.value.geode_object_type],
117
+ () => [meta_data.value.viewer_object_type, meta_data.value.geode_object_type] as const,
118
118
  ([viewer_object_type, geode_object_type]) => {
119
119
  menu_items.value = menuStore.getMenuItems(viewer_object_type, geode_object_type);
120
120
  },
@@ -1,19 +1,22 @@
1
1
  <script setup lang="ts">
2
2
  import type {
3
3
  AttributeColorMap,
4
- AttributeItem,
5
- AttributeName,
6
4
  AttributeRange,
7
5
  AttributeTimeStep,
8
6
  } from "@ogw_front/types/attribute";
9
- import type { DataId, MeshId } from "@ogw_front/types/identifiers";
7
+ import type {
8
+ AttributeItem,
9
+ AttributeName,
10
+ ColorRGBA,
11
+ Opacity,
12
+ } from "@geode/opengeodeweb-viewer/schema_types";
10
13
  import {
11
14
  type RangesPerData,
12
15
  applyRangesPerData,
13
16
  useBatchStyle,
14
17
  } from "@ogw_front/composables/batch_style";
15
- import type { Opacity } from "@ogw_front/types/style";
16
- import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
18
+ import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
19
+ import type { MeshId } from "@ogw_front/types/identifiers";
17
20
  import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
18
21
  import { useBatchStyleModel } from "@ogw_front/composables/batch_style_model";
19
22
  import { useDataStyleStore } from "@ogw_front/stores/data_style";
@@ -38,9 +41,9 @@ const coloring_style_key = computed<string>({
38
41
  hybridViewerStore.remoteRender();
39
42
  },
40
43
  });
41
- const color = useBatchStyleModel<RGBAColor>(
44
+ const color = useBatchStyleModel<ColorRGBA>(
42
45
  () => dataId,
43
- (meshId) => dataStyleStore.meshEdgesColor(meshId) as RGBAColor | undefined,
46
+ (meshId) => dataStyleStore.meshEdgesColor(meshId) as ColorRGBA | undefined,
44
47
  (meshId, value) => dataStyleStore.setMeshEdgesColor(meshId, value),
45
48
  );
46
49
  const opacity = useBatchStyleModel<Opacity>(
@@ -104,7 +107,7 @@ const vertex_attribute_color_map = computed<AttributeColorMap | undefined>({
104
107
  hybridViewerStore.remoteRender();
105
108
  },
106
109
  });
107
- const vertex_attribute_no_data_color = computed<RGBAColor>({
110
+ const vertex_attribute_no_data_color = computed<ColorRGBA>({
108
111
  get: () => dataStyleStore.meshEdgesVertexAttributeNoDataColor(dataId),
109
112
  set: async (newValue) => {
110
113
  await applyBatchStyle(dataId, (meshId: MeshId) =>
@@ -169,7 +172,7 @@ const edge_attribute_color_map = computed<AttributeColorMap | undefined>({
169
172
  hybridViewerStore.remoteRender();
170
173
  },
171
174
  });
172
- const edge_attribute_no_data_color = computed<RGBAColor>({
175
+ const edge_attribute_no_data_color = computed<ColorRGBA>({
173
176
  get: () => dataStyleStore.meshEdgesEdgeAttributeNoDataColor(dataId),
174
177
  set: async (newValue) => {
175
178
  await applyBatchStyle(dataId, (meshId: MeshId) =>
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
+ import type { EdgeWidth, Visibility } from "@geode/opengeodeweb-viewer/schema_types";
2
3
  import ViewerContextMenuItem, {
3
4
  type ItemProps,
4
5
  } from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
5
- import type { Visibility, Width } from "@ogw_front/types/style";
6
6
  import EdgedCurveEdges from "@ogw_front/assets/viewer_svgs/edged_curve_edges.svg";
7
7
  import type { MeshId } from "@ogw_front/types/identifiers";
8
8
  import ViewerEdgedCurveSpecificEdgesColoring from "@ogw_front/components/Viewer/EdgedCurve/SpecificEdgesColoring.vue";
@@ -33,7 +33,7 @@ const visibility = computed<Visibility>({
33
33
  hybridViewerStore.remoteRender();
34
34
  },
35
35
  });
36
- const width = computed<Width>({
36
+ const width = computed<EdgeWidth>({
37
37
  get: () => dataStyleStore.meshEdgesWidth(dataId.value),
38
38
  set: async (newValue) => {
39
39
  await applyBatchStyle(dataId.value, (meshId: MeshId) =>
@@ -1,19 +1,22 @@
1
1
  <script setup lang="ts">
2
2
  import type {
3
3
  AttributeColorMap,
4
- AttributeItem,
5
- AttributeName,
6
4
  AttributeRange,
7
5
  AttributeTimeStep,
8
6
  } from "@ogw_front/types/attribute";
9
- import type { DataId, MeshId } from "@ogw_front/types/identifiers";
7
+ import type {
8
+ AttributeItem,
9
+ AttributeName,
10
+ ColorRGBA,
11
+ Opacity,
12
+ } from "@geode/opengeodeweb-viewer/schema_types";
10
13
  import {
11
14
  type RangesPerData,
12
15
  applyRangesPerData,
13
16
  useBatchStyle,
14
17
  } from "@ogw_front/composables/batch_style";
15
- import type { Opacity } from "@ogw_front/types/style";
16
- import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
18
+ import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
19
+ import type { MeshId } from "@ogw_front/types/identifiers";
17
20
  import type { Texture } from "@ogw_front/types/texture";
18
21
  import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
19
22
  import { useBatchStyleModel } from "@ogw_front/composables/batch_style_model";
@@ -39,9 +42,9 @@ const coloring_style_key = computed<string>({
39
42
  hybridViewerStore.remoteRender();
40
43
  },
41
44
  });
42
- const color = useBatchStyleModel<RGBAColor>(
45
+ const color = useBatchStyleModel<ColorRGBA>(
43
46
  () => dataId,
44
- (meshId) => dataStyleStore.meshCellsColor(meshId) as RGBAColor | undefined,
47
+ (meshId) => dataStyleStore.meshCellsColor(meshId) as ColorRGBA | undefined,
45
48
  (meshId, value) => dataStyleStore.setMeshCellsColor(meshId, value),
46
49
  );
47
50
  const opacity = useBatchStyleModel<Opacity>(
@@ -111,7 +114,7 @@ const vertex_attribute_color_map = computed<AttributeColorMap | undefined>({
111
114
  hybridViewerStore.remoteRender();
112
115
  },
113
116
  });
114
- const vertex_attribute_no_data_color = computed<RGBAColor>({
117
+ const vertex_attribute_no_data_color = computed<ColorRGBA>({
115
118
  get: () => dataStyleStore.meshCellsVertexAttributeNoDataColor(dataId),
116
119
  set: async (newValue) => {
117
120
  await applyBatchStyle(dataId, (meshId: MeshId) =>
@@ -176,7 +179,7 @@ const cell_attribute_color_map = computed<AttributeColorMap | undefined>({
176
179
  hybridViewerStore.remoteRender();
177
180
  },
178
181
  });
179
- const cell_attribute_no_data_color = computed<RGBAColor>({
182
+ const cell_attribute_no_data_color = computed<ColorRGBA>({
180
183
  get: () => dataStyleStore.meshCellsCellAttributeNoDataColor(dataId),
181
184
  set: async (newValue) => {
182
185
  await applyBatchStyle(dataId, (meshId: MeshId) =>
@@ -5,7 +5,7 @@ import ViewerContextMenuItem, {
5
5
  import type { MeshId } from "@ogw_front/types/identifiers";
6
6
  import ViewerGenericMeshCellsColoring from "@ogw_front/components/Viewer/Generic/Mesh/CellsColoring.vue";
7
7
  import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
8
- import type { Visibility } from "@ogw_front/types/style";
8
+ import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
9
9
  import { useBatchStyle } from "@ogw_front/composables/batch_style";
10
10
  import { useDataStyleStore } from "@ogw_front/stores/data_style";
11
11
  import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
@@ -1,19 +1,22 @@
1
1
  <script setup lang="ts">
2
2
  import type {
3
3
  AttributeColorMap,
4
- AttributeItem,
5
- AttributeName,
6
4
  AttributeRange,
7
5
  AttributeTimeStep,
8
6
  } from "@ogw_front/types/attribute";
9
- import type { DataId, MeshId } from "@ogw_front/types/identifiers";
7
+ import type {
8
+ AttributeItem,
9
+ AttributeName,
10
+ ColorRGBA,
11
+ Opacity,
12
+ } from "@geode/opengeodeweb-viewer/schema_types";
10
13
  import {
11
14
  type RangesPerData,
12
15
  applyRangesPerData,
13
16
  useBatchStyle,
14
17
  } from "@ogw_front/composables/batch_style";
15
- import type { Opacity } from "@ogw_front/types/style";
16
- import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
18
+ import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
19
+ import type { MeshId } from "@ogw_front/types/identifiers";
17
20
  import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
18
21
  import { useBatchStyleModel } from "@ogw_front/composables/batch_style_model";
19
22
  import { useDataStyleStore } from "@ogw_front/stores/data_style";
@@ -39,9 +42,9 @@ const coloring_style_key = computed<string>({
39
42
  hybridViewerStore.remoteRender();
40
43
  },
41
44
  });
42
- const color = useBatchStyleModel<RGBAColor>(
45
+ const color = useBatchStyleModel<ColorRGBA>(
43
46
  () => dataId,
44
- (meshId) => dataStyleStore.meshEdgesColor(meshId) as RGBAColor | undefined,
47
+ (meshId) => dataStyleStore.meshEdgesColor(meshId) as ColorRGBA | undefined,
45
48
  (meshId, value) => dataStyleStore.setMeshEdgesColor(meshId, value),
46
49
  );
47
50
  const opacity = useBatchStyleModel<Opacity>(
@@ -105,7 +108,7 @@ const vertex_attribute_color_map = computed<AttributeColorMap | undefined>({
105
108
  hybridViewerStore.remoteRender();
106
109
  },
107
110
  });
108
- const vertex_attribute_no_data_color = computed<RGBAColor>({
111
+ const vertex_attribute_no_data_color = computed<ColorRGBA>({
109
112
  get: () => dataStyleStore.meshEdgesVertexAttributeNoDataColor(dataId),
110
113
  set: async (newValue) => {
111
114
  await applyBatchStyle(dataId, (meshId: MeshId) =>
@@ -170,7 +173,7 @@ const edge_attribute_color_map = computed<AttributeColorMap | undefined>({
170
173
  hybridViewerStore.remoteRender();
171
174
  },
172
175
  });
173
- const edge_attribute_no_data_color = computed<RGBAColor>({
176
+ const edge_attribute_no_data_color = computed<ColorRGBA>({
174
177
  get: () => dataStyleStore.meshEdgesEdgeAttributeNoDataColor(dataId),
175
178
  set: async (newValue) => {
176
179
  await applyBatchStyle(dataId, (meshId: MeshId) =>
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import type { Size, Visibility } from "@ogw_front/types/style";
2
+ import type { EdgeWidth, Visibility } from "@geode/opengeodeweb-viewer/schema_types";
3
3
  import ViewerContextMenuItem, {
4
4
  type ItemProps,
5
5
  } from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
@@ -40,7 +40,7 @@ const visibility = computed<Visibility>({
40
40
  hybridViewerStore.remoteRender();
41
41
  },
42
42
  });
43
- const size = computed<Size>({
43
+ const width = computed<EdgeWidth>({
44
44
  get: () => dataStyleStore.meshEdgesWidth(dataId.value),
45
45
  set: async (newValue) => {
46
46
  await applyBatchStyle(dataId.value, (meshId: MeshId) =>
@@ -70,7 +70,7 @@ const size = computed<Size>({
70
70
  </v-row>
71
71
  <template v-if="visibility">
72
72
  <v-divider class="my-2" />
73
- <ViewerOptionsWidthSlider data-testid="meshEdgesWidthSlider" v-model="size" />
73
+ <ViewerOptionsWidthSlider data-testid="meshEdgesWidthSlider" v-model="width" />
74
74
  <ViewerGenericMeshEdgesColoring :data-id="dataId" :capabilities="capabilities" />
75
75
  </template>
76
76
  </template>