@geode/opengeodeweb-front 10.43.2 → 10.44.0-rc.10

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 (254) hide show
  1. package/.build/server/utils/cleanup.js +7 -2
  2. package/.build/server/utils/microservices.js +9 -81
  3. package/.build/server/utils/microservices_process.js +85 -0
  4. package/.build/server/utils/scripts.js +34 -23
  5. package/.build/server/utils/typed_handler.js +5 -1
  6. package/.build/server/utils/ws_client.js +7 -2
  7. package/.build/shared/utils/fetch_raw.js +2 -2
  8. package/.build/shared/utils/parse_boolean.js +2 -1
  9. package/app/assets/geode_objects.ts +1 -0
  10. package/app/components/BasemapAttribution.vue +28 -0
  11. package/app/components/ClippingPlanes.vue +22 -78
  12. package/app/components/CrsSelector.vue +53 -46
  13. package/app/components/DragAndDrop.vue +16 -79
  14. package/app/components/FeedBack/Snackers.vue +27 -0
  15. package/app/components/FileSelector.vue +9 -6
  16. package/app/components/HybridViewerTooltip.vue +8 -2
  17. package/app/components/MissingFilesSelector.vue +40 -23
  18. package/app/components/ObjectSelector.vue +34 -20
  19. package/app/components/ProjectCrs.vue +37 -0
  20. package/app/components/Screenshot.vue +17 -59
  21. package/app/components/ThresholdCard.vue +205 -0
  22. package/app/components/ThresholdFilter.vue +81 -216
  23. package/app/components/ViewToolbar.vue +15 -231
  24. package/app/components/Viewer/Basemap/CropOptions.vue +50 -0
  25. package/app/components/Viewer/Basemap/OpacityOptions.vue +52 -0
  26. package/app/components/Viewer/ContextMenu/CircularItems.vue +1 -2
  27. package/app/components/Viewer/ContextMenu/ContextMenu.vue +11 -6
  28. package/app/components/Viewer/ContextMenu/ContextMenuItem.vue +10 -7
  29. package/app/components/Viewer/ContextMenu/InfoCard.vue +30 -0
  30. package/app/components/Viewer/EdgedCurve/SpecificEdgesColoring.vue +209 -0
  31. package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +3 -191
  32. package/app/components/Viewer/Generic/Mesh/CellsColoring.vue +221 -0
  33. package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +3 -210
  34. package/app/components/Viewer/Generic/Mesh/EdgesColoring.vue +211 -0
  35. package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +3 -192
  36. package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +13 -0
  37. package/app/components/Viewer/Generic/Mesh/PolygonsColoring.vue +227 -0
  38. package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +3 -215
  39. package/app/components/Viewer/Generic/Mesh/PolyhedraColoring.vue +221 -0
  40. package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +3 -203
  41. package/app/components/Viewer/Generic/Model/BlocksOptions.vue +14 -12
  42. package/app/components/Viewer/Generic/Model/ComponentPointsOptions.vue +2 -18
  43. package/app/components/Viewer/Generic/Model/CornerComponentOptions.vue +145 -0
  44. package/app/components/Viewer/Generic/Model/CornersOptions.vue +15 -294
  45. package/app/components/Viewer/Generic/Model/CornersTypeOptions.vue +173 -0
  46. package/app/components/Viewer/Generic/Model/LineComponentOptions.vue +218 -0
  47. package/app/components/Viewer/Generic/Model/LinesOptions.vue +15 -427
  48. package/app/components/Viewer/Generic/Model/LinesTypeOptions.vue +229 -0
  49. package/app/components/Viewer/Generic/Model/ModelCardTabs.vue +35 -0
  50. package/app/components/Viewer/Generic/Model/ModelEdgesCard.vue +34 -25
  51. package/app/components/Viewer/Generic/Model/ModelPointsCard.vue +34 -25
  52. package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +17 -5
  53. package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +16 -12
  54. package/app/components/Viewer/ObjectTree/Base/ComponentRelations.vue +4 -1
  55. package/app/components/Viewer/ObjectTree/Base/ItemLabel.vue +71 -1
  56. package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +55 -10
  57. package/app/components/Viewer/Options/AttributeRangeSelector.vue +11 -4
  58. package/app/components/Viewer/Options/AttributeSelector.vue +40 -136
  59. package/app/components/Viewer/Options/ColorPicker.vue +4 -1
  60. package/app/components/Viewer/Options/ColoringTypeSelector.vue +48 -74
  61. package/app/components/Viewer/Options/ColormapQuickPicker.vue +13 -7
  62. package/app/components/Viewer/Options/NoDataColorInfo.vue +56 -0
  63. package/app/components/Viewer/Options/Sliders/Opacity.vue +22 -0
  64. package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +13 -0
  65. package/app/components/Viewer/Scene/BackgroundOptions.vue +37 -0
  66. package/app/components/Viewer/Scene/OrientationWidgetOptions.vue +48 -0
  67. package/app/components/Viewer/Scene/TextOptions.vue +63 -0
  68. package/app/components/Viewer/Solid/SpecificPolyhedraColoring.vue +217 -0
  69. package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +4 -199
  70. package/app/components/Viewer/Surface/PolygonsColoring.vue +224 -0
  71. package/app/components/Viewer/Surface/PolygonsOptions.vue +3 -213
  72. package/app/components/Viewer/Ui.vue +9 -0
  73. package/app/components/csv-preview/CsvPreviewer.vue +4 -1
  74. package/app/composables/attribute_coloring_style.ts +8 -2
  75. package/app/composables/attribute_selector.ts +126 -0
  76. package/app/composables/batch_style_model.ts +34 -0
  77. package/app/composables/clipping_slices.ts +166 -0
  78. package/app/composables/global_attribute_style.ts +4 -3
  79. package/app/composables/hover_highlight.ts +19 -18
  80. package/app/composables/live_data_item.ts +39 -0
  81. package/app/composables/model_tabs.ts +86 -0
  82. package/app/composables/overlapping_picker_menu.ts +43 -0
  83. package/app/composables/project_manager.ts +5 -81
  84. package/app/composables/project_manager_helpers/reset.ts +34 -0
  85. package/app/composables/project_manager_helpers/restore.ts +67 -0
  86. package/app/composables/project_manager_helpers/types.ts +24 -0
  87. package/app/composables/project_manager_helpers/viewer_session.ts +25 -0
  88. package/app/composables/stepper_tree.ts +10 -2
  89. package/app/composables/tree_filter.ts +11 -2
  90. package/app/composables/tree_keyboard_nav.ts +4 -2
  91. package/app/composables/use_overlapping_picker.ts +30 -42
  92. package/app/composables/view_toolbar_options.ts +126 -0
  93. package/app/composables/view_toolbar_tool_options.ts +115 -0
  94. package/app/composables/view_toolbar_tools.ts +108 -0
  95. package/app/composables/viewer_context_menu.ts +19 -1
  96. package/app/composables/virtual_tree.ts +20 -131
  97. package/app/composables/virtual_tree_flatten.ts +109 -0
  98. package/app/composables/virtual_tree_types.ts +81 -0
  99. package/app/stores/app.ts +8 -55
  100. package/app/stores/app_helpers/extension.ts +90 -51
  101. package/app/stores/app_helpers/registry.ts +69 -0
  102. package/app/stores/basemap.ts +52 -0
  103. package/app/stores/basemap_detail.ts +51 -0
  104. package/app/stores/basemap_helpers/builds.ts +158 -0
  105. package/app/stores/basemap_helpers/detail_layers.ts +72 -0
  106. package/app/stores/basemap_helpers/detail_map.ts +62 -0
  107. package/app/stores/basemap_helpers/detail_refresh.ts +134 -0
  108. package/app/stores/basemap_helpers/detail_view.ts +94 -0
  109. package/app/stores/basemap_helpers/extent.ts +40 -0
  110. package/app/stores/basemap_helpers/georeferenced.ts +50 -0
  111. package/app/stores/basemap_helpers/layers.ts +66 -0
  112. package/app/stores/basemap_helpers/settings.ts +87 -0
  113. package/app/stores/basemap_helpers/viewer.ts +114 -0
  114. package/app/stores/crs.ts +136 -0
  115. package/app/stores/data.ts +24 -1
  116. package/app/stores/data_style.ts +8 -0
  117. package/app/stores/feedback.ts +12 -2
  118. package/app/stores/hybrid_viewer.ts +1 -1
  119. package/app/stores/infra.ts +26 -21
  120. package/app/stores/menu.ts +8 -124
  121. package/app/stores/menu_helpers/basemap.ts +10 -0
  122. package/app/stores/menu_helpers/menus_data.ts +27 -0
  123. package/app/stores/menu_helpers/mesh/edged_curve.ts +12 -0
  124. package/app/stores/menu_helpers/mesh/grid.ts +24 -0
  125. package/app/stores/menu_helpers/mesh/point_set.ts +11 -0
  126. package/app/stores/menu_helpers/mesh/solid.ts +29 -0
  127. package/app/stores/menu_helpers/mesh/surface.ts +22 -0
  128. package/app/stores/menu_helpers/model.ts +25 -0
  129. package/app/stores/menu_helpers/scene.ts +10 -0
  130. package/app/stores/menu_helpers/types.ts +5 -0
  131. package/app/stores/treeview.ts +17 -10
  132. package/app/stores/viewer.ts +17 -79
  133. package/app/stores/viewer_helpers/actions.ts +68 -0
  134. package/app/stores/viewer_helpers/request.ts +61 -0
  135. package/app/utils/basemap_tree.ts +76 -0
  136. package/app/utils/clipping_planes.ts +4 -131
  137. package/app/utils/clipping_planes_scene.ts +131 -0
  138. package/app/utils/color_picker.ts +18 -15
  139. package/app/utils/coloring_styles.ts +101 -0
  140. package/app/utils/crs.ts +38 -0
  141. package/app/utils/default_styles/constants.ts +10 -0
  142. package/app/utils/default_styles/index.ts +17 -1
  143. package/app/utils/default_styles/mesh_components.ts +168 -0
  144. package/app/utils/default_styles/meshes.ts +13 -153
  145. package/app/utils/default_styles/model_components.ts +170 -0
  146. package/app/utils/default_styles/models.ts +16 -153
  147. package/app/utils/drag_and_drop.ts +80 -0
  148. package/app/utils/extension.ts +1 -1
  149. package/app/utils/import_workflow.ts +26 -11
  150. package/app/utils/model_component_coloring.ts +46 -0
  151. package/app/utils/threshold.ts +33 -0
  152. package/app/utils/threshold_sources.ts +51 -0
  153. package/app/utils/treeview.ts +12 -1
  154. package/app/utils/upload_path.ts +15 -9
  155. package/app/utils/visible_map_area.ts +129 -0
  156. package/internal/database/base_database.ts +2 -0
  157. package/internal/database/database.ts +47 -29
  158. package/internal/database/tables/scene_style.ts +6 -0
  159. package/internal/stores/data_style/mesh/base_style.ts +74 -0
  160. package/internal/stores/data_style/mesh/cells/cell.ts +27 -150
  161. package/internal/stores/data_style/mesh/cells/cell_attribute.ts +74 -0
  162. package/internal/stores/data_style/mesh/cells/cell_config.ts +152 -0
  163. package/internal/stores/data_style/mesh/cells/color.ts +3 -1
  164. package/internal/stores/data_style/mesh/cells/index.ts +17 -1
  165. package/internal/stores/data_style/mesh/cells/opacity.ts +54 -0
  166. package/internal/stores/data_style/mesh/cells/vertex.ts +26 -157
  167. package/internal/stores/data_style/mesh/cells/vertex_attribute.ts +80 -0
  168. package/internal/stores/data_style/mesh/cells/vertex_config.ts +152 -0
  169. package/internal/stores/data_style/mesh/edges/color.ts +3 -1
  170. package/internal/stores/data_style/mesh/edges/edge.ts +27 -150
  171. package/internal/stores/data_style/mesh/edges/edge_attribute.ts +74 -0
  172. package/internal/stores/data_style/mesh/edges/edge_config.ts +152 -0
  173. package/internal/stores/data_style/mesh/edges/index.ts +17 -1
  174. package/internal/stores/data_style/mesh/edges/opacity.ts +54 -0
  175. package/internal/stores/data_style/mesh/edges/vertex.ts +26 -157
  176. package/internal/stores/data_style/mesh/edges/vertex_attribute.ts +80 -0
  177. package/internal/stores/data_style/mesh/edges/vertex_config.ts +152 -0
  178. package/internal/stores/data_style/mesh/index.ts +2 -57
  179. package/internal/stores/data_style/mesh/points/color.ts +3 -1
  180. package/internal/stores/data_style/mesh/points/index.ts +17 -1
  181. package/internal/stores/data_style/mesh/points/opacity.ts +54 -0
  182. package/internal/stores/data_style/mesh/points/vertex.ts +26 -157
  183. package/internal/stores/data_style/mesh/points/vertex_attribute.ts +80 -0
  184. package/internal/stores/data_style/mesh/points/vertex_config.ts +152 -0
  185. package/internal/stores/data_style/mesh/polygons/color.ts +3 -1
  186. package/internal/stores/data_style/mesh/polygons/index.ts +17 -1
  187. package/internal/stores/data_style/mesh/polygons/opacity.ts +54 -0
  188. package/internal/stores/data_style/mesh/polygons/polygon.ts +27 -152
  189. package/internal/stores/data_style/mesh/polygons/polygon_attribute.ts +80 -0
  190. package/internal/stores/data_style/mesh/polygons/polygon_config.ts +148 -0
  191. package/internal/stores/data_style/mesh/polygons/vertex.ts +26 -157
  192. package/internal/stores/data_style/mesh/polygons/vertex_attribute.ts +80 -0
  193. package/internal/stores/data_style/mesh/polygons/vertex_config.ts +152 -0
  194. package/internal/stores/data_style/mesh/polyhedra/color.ts +3 -1
  195. package/internal/stores/data_style/mesh/polyhedra/index.ts +17 -1
  196. package/internal/stores/data_style/mesh/polyhedra/opacity.ts +54 -0
  197. package/internal/stores/data_style/mesh/polyhedra/polyhedron.ts +27 -160
  198. package/internal/stores/data_style/mesh/polyhedra/polyhedron_attribute.ts +82 -0
  199. package/internal/stores/data_style/mesh/polyhedra/polyhedron_config.ts +157 -0
  200. package/internal/stores/data_style/mesh/polyhedra/vertex.ts +26 -157
  201. package/internal/stores/data_style/mesh/polyhedra/vertex_attribute.ts +80 -0
  202. package/internal/stores/data_style/mesh/polyhedra/vertex_config.ts +152 -0
  203. package/internal/stores/data_style/model/blocks/apply_coloring.ts +173 -0
  204. package/internal/stores/data_style/model/blocks/color.ts +58 -57
  205. package/internal/stores/data_style/model/blocks/coloring_groups.ts +18 -0
  206. package/internal/stores/data_style/model/blocks/index.ts +12 -140
  207. package/internal/stores/data_style/model/blocks/polyhedron.ts +102 -54
  208. package/internal/stores/data_style/model/blocks/vertex.ts +102 -54
  209. package/internal/stores/data_style/model/color.ts +25 -26
  210. package/internal/stores/data_style/model/common.ts +10 -119
  211. package/internal/stores/data_style/model/common_mutations.ts +184 -0
  212. package/internal/stores/data_style/model/corners/index.ts +85 -78
  213. package/internal/stores/data_style/model/corners/vertex.ts +97 -49
  214. package/internal/stores/data_style/model/lines/apply_coloring.ts +154 -0
  215. package/internal/stores/data_style/model/lines/color.ts +53 -40
  216. package/internal/stores/data_style/model/lines/coloring_groups.ts +18 -0
  217. package/internal/stores/data_style/model/lines/edge.ts +102 -54
  218. package/internal/stores/data_style/model/lines/index.ts +10 -134
  219. package/internal/stores/data_style/model/lines/vertex.ts +102 -54
  220. package/internal/stores/data_style/model/surfaces/apply_coloring.ts +186 -0
  221. package/internal/stores/data_style/model/surfaces/color.ts +68 -56
  222. package/internal/stores/data_style/model/surfaces/coloring_groups.ts +18 -0
  223. package/internal/stores/data_style/model/surfaces/index.ts +16 -160
  224. package/internal/stores/data_style/model/surfaces/polygon.ts +94 -46
  225. package/internal/stores/data_style/model/surfaces/vertex.ts +94 -46
  226. package/internal/stores/data_style/model/visibility.ts +3 -156
  227. package/internal/stores/data_style/model/visibility_dispatch.ts +110 -0
  228. package/internal/stores/data_style/scene.ts +118 -0
  229. package/internal/stores/data_style/state.ts +5 -181
  230. package/internal/stores/data_style/state_shared.ts +199 -0
  231. package/internal/stores/data_style/types.ts +24 -1
  232. package/internal/stores/hybrid_viewer/brightness.ts +8 -2
  233. package/internal/stores/hybrid_viewer/camera.ts +7 -161
  234. package/internal/stores/hybrid_viewer/camera_animation.ts +4 -3
  235. package/internal/stores/hybrid_viewer/camera_helpers.ts +120 -0
  236. package/internal/stores/hybrid_viewer/camera_orientation.ts +60 -0
  237. package/internal/stores/hybrid_viewer/filters.ts +54 -11
  238. package/internal/stores/hybrid_viewer/highlight.ts +80 -63
  239. package/internal/stores/hybrid_viewer/ruler.ts +4 -3
  240. package/internal/stores/hybrid_viewer/scene.ts +34 -26
  241. package/internal/stores/hybrid_viewer/vtk_types.ts +2 -1
  242. package/internal/utils/ws_client.ts +8 -1
  243. package/package.json +5 -5
  244. package/server/api/local/extensions/run.post.ts +6 -4
  245. package/server/api/local/extensions/upload.put.ts +47 -20
  246. package/server/utils/cleanup.ts +12 -2
  247. package/server/utils/microservices.ts +10 -102
  248. package/server/utils/microservices_process.ts +127 -0
  249. package/server/utils/scripts.ts +35 -30
  250. package/server/utils/typed_handler.ts +8 -1
  251. package/server/utils/ws_client.ts +15 -2
  252. package/shared/utils/fetch_raw.ts +2 -2
  253. package/shared/utils/parse_boolean.ts +4 -1
  254. package/app/components/Viewer/Options/OptionsSection.vue +0 -76
@@ -0,0 +1,224 @@
1
+ <script setup lang="ts">
2
+ import {
3
+ type RangesPerData,
4
+ applyRangesPerData,
5
+ useBatchStyle,
6
+ } from "@ogw_front/composables/batch_style";
7
+ import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
8
+ import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
9
+ import { useBatchStyleModel } from "@ogw_front/composables/batch_style_model";
10
+ import { useDataStyleStore } from "@ogw_front/stores/data_style";
11
+ import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
12
+
13
+ interface Texture {
14
+ id: string;
15
+ texture_name: string;
16
+ }
17
+
18
+ const dataStyleStore = useDataStyleStore();
19
+ const hybridViewerStore = useHybridViewerStore();
20
+ const { applyBatchStyle } = useBatchStyle();
21
+
22
+ interface Props {
23
+ id: string;
24
+ }
25
+
26
+ const { id } = defineProps<Props>();
27
+
28
+ const coloring_style_key = computed<string>({
29
+ get: () => dataStyleStore.meshPolygonsActiveColoring(id),
30
+ set: async (newValue) => {
31
+ await applyBatchStyle(id, (targetId: string) =>
32
+ dataStyleStore.setMeshPolygonsActiveColoring(targetId, newValue),
33
+ );
34
+ hybridViewerStore.remoteRender();
35
+ },
36
+ });
37
+ const color = useBatchStyleModel<RGBAColor>(
38
+ () => id,
39
+ (targetId) => dataStyleStore.meshPolygonsColor(targetId) as RGBAColor | undefined,
40
+ (targetId, value) => dataStyleStore.setMeshPolygonsColor(targetId, value),
41
+ );
42
+ const opacity = useBatchStyleModel<number>(
43
+ () => id,
44
+ (targetId) => dataStyleStore.meshPolygonsOpacity(targetId),
45
+ (targetId, value) => dataStyleStore.setMeshPolygonsOpacity(targetId, value),
46
+ );
47
+ const textures = useBatchStyleModel<Texture[]>(
48
+ () => id,
49
+ (targetId) => dataStyleStore.meshPolygonsTextures(targetId) as Texture[] | undefined,
50
+ (targetId, value) => dataStyleStore.setMeshPolygonsTextures(targetId, value),
51
+ );
52
+ const vertex_attribute_name = computed<string | undefined>({
53
+ get: () => dataStyleStore.meshPolygonsVertexAttributeName(id),
54
+ set: async (newValue) => {
55
+ if (newValue === undefined) {
56
+ return;
57
+ }
58
+ await applyBatchStyle(id, (targetId: string) =>
59
+ Promise.resolve(dataStyleStore.setMeshPolygonsVertexAttributeName(targetId, newValue)),
60
+ );
61
+ hybridViewerStore.remoteRender();
62
+ },
63
+ });
64
+
65
+ const vertex_attribute_time_step = computed<number | undefined>({
66
+ get: () => dataStyleStore.meshPolygonsVertexAttributeTimeStep(id),
67
+ set: async (newValue) => {
68
+ if (newValue === undefined) {
69
+ return;
70
+ }
71
+ await applyBatchStyle(id, (targetId: string) =>
72
+ Promise.resolve(dataStyleStore.setMeshPolygonsVertexAttributeTimeStep(targetId, newValue)),
73
+ );
74
+ hybridViewerStore.remoteRender();
75
+ },
76
+ });
77
+ const vertex_attribute_item = computed<string | undefined>({
78
+ get: () => dataStyleStore.meshPolygonsVertexAttributeItem(id),
79
+ set: async (newValue) => {
80
+ await applyBatchStyle(id, (targetId: string) =>
81
+ Promise.resolve(dataStyleStore.setMeshPolygonsVertexAttributeItem(targetId, newValue)),
82
+ );
83
+ hybridViewerStore.remoteRender();
84
+ },
85
+ });
86
+ const vertex_attribute_range = computed<[number, number] | undefined>({
87
+ get: () => dataStyleStore.meshPolygonsVertexAttributeRange(id),
88
+ set: async (newValue) => {
89
+ const [minimum, maximum] = newValue;
90
+ if (minimum === undefined || maximum === undefined) {
91
+ return;
92
+ }
93
+ await applyBatchStyle(id, (targetId: string) =>
94
+ Promise.resolve(
95
+ dataStyleStore.setMeshPolygonsVertexAttributeRange(targetId, minimum, maximum),
96
+ ),
97
+ );
98
+ hybridViewerStore.remoteRender();
99
+ },
100
+ });
101
+ const vertex_attribute_color_map = computed<Map<string, RGBAColor> | undefined>({
102
+ get: () => dataStyleStore.meshPolygonsVertexAttributeColorMap(id),
103
+ set: async (newValue) => {
104
+ await applyBatchStyle(id, (targetId: string) =>
105
+ Promise.resolve(dataStyleStore.setMeshPolygonsVertexAttributeColorMap(targetId, newValue)),
106
+ );
107
+ hybridViewerStore.remoteRender();
108
+ },
109
+ });
110
+ const vertex_attribute_no_data_color = computed<RGBAColor>({
111
+ get: () => dataStyleStore.meshPolygonsVertexAttributeNoDataColor(id),
112
+ set: async (newValue) => {
113
+ await applyBatchStyle(id, (targetId: string) =>
114
+ dataStyleStore.setMeshPolygonsVertexAttributeNoDataColor(targetId, newValue),
115
+ );
116
+ hybridViewerStore.remoteRender();
117
+ },
118
+ });
119
+ const polygon_attribute_name = computed<string | undefined>({
120
+ get: () => dataStyleStore.meshPolygonsPolygonAttributeName(id),
121
+ set: async (newValue) => {
122
+ if (newValue === undefined) {
123
+ return;
124
+ }
125
+ await applyBatchStyle(id, (targetId: string) =>
126
+ Promise.resolve(dataStyleStore.setMeshPolygonsPolygonAttributeName(targetId, newValue)),
127
+ );
128
+ hybridViewerStore.remoteRender();
129
+ },
130
+ });
131
+
132
+ const polygon_attribute_time_step = computed<number | undefined>({
133
+ get: () => dataStyleStore.meshPolygonsPolygonAttributeTimeStep(id),
134
+ set: async (newValue) => {
135
+ if (newValue === undefined) {
136
+ return;
137
+ }
138
+ await applyBatchStyle(id, (targetId: string) =>
139
+ Promise.resolve(dataStyleStore.setMeshPolygonsPolygonAttributeTimeStep(targetId, newValue)),
140
+ );
141
+ hybridViewerStore.remoteRender();
142
+ },
143
+ });
144
+ const polygon_attribute_item = computed<string | undefined>({
145
+ get: () => dataStyleStore.meshPolygonsPolygonAttributeItem(id),
146
+ set: async (newValue) => {
147
+ await applyBatchStyle(id, (targetId: string) =>
148
+ Promise.resolve(dataStyleStore.setMeshPolygonsPolygonAttributeItem(targetId, newValue)),
149
+ );
150
+ hybridViewerStore.remoteRender();
151
+ },
152
+ });
153
+ const polygon_attribute_range = computed<[number, number] | undefined>({
154
+ get: () => dataStyleStore.meshPolygonsPolygonAttributeRange(id),
155
+ set: async (newValue) => {
156
+ const [minimum, maximum] = newValue;
157
+ if (minimum === undefined || maximum === undefined) {
158
+ return;
159
+ }
160
+ await applyBatchStyle(id, (targetId: string) =>
161
+ Promise.resolve(
162
+ dataStyleStore.setMeshPolygonsPolygonAttributeRange(targetId, minimum, maximum),
163
+ ),
164
+ );
165
+ hybridViewerStore.remoteRender();
166
+ },
167
+ });
168
+ const polygon_attribute_color_map = computed<Map<string, RGBAColor> | undefined>({
169
+ get: () => dataStyleStore.meshPolygonsPolygonAttributeColorMap(id),
170
+ set: async (newValue) => {
171
+ await applyBatchStyle(id, (targetId: string) =>
172
+ Promise.resolve(dataStyleStore.setMeshPolygonsPolygonAttributeColorMap(targetId, newValue)),
173
+ );
174
+ hybridViewerStore.remoteRender();
175
+ },
176
+ });
177
+ const polygon_attribute_no_data_color = computed<RGBAColor>({
178
+ get: () => dataStyleStore.meshPolygonsPolygonAttributeNoDataColor(id),
179
+ set: async (newValue) => {
180
+ await applyBatchStyle(id, (targetId: string) =>
181
+ dataStyleStore.setMeshPolygonsPolygonAttributeNoDataColor(targetId, newValue),
182
+ );
183
+ hybridViewerStore.remoteRender();
184
+ },
185
+ });
186
+
187
+ async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
188
+ await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
189
+ dataStyleStore.setMeshPolygonsVertexAttributeRange(targetId, minimum, maximum),
190
+ );
191
+ hybridViewerStore.remoteRender();
192
+ }
193
+
194
+ async function setPolygonAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
195
+ await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
196
+ dataStyleStore.setMeshPolygonsPolygonAttributeRange(targetId, minimum, maximum),
197
+ );
198
+ hybridViewerStore.remoteRender();
199
+ }
200
+ </script>
201
+
202
+ <template>
203
+ <ViewerOptionsColoringTypeSelector
204
+ :id="id"
205
+ v-model:coloring_style_key="coloring_style_key"
206
+ v-model:color="color"
207
+ v-model:opacity="opacity"
208
+ v-model:textures="textures"
209
+ v-model:vertex_attribute_name="vertex_attribute_name"
210
+ v-model:vertex_attribute_item="vertex_attribute_item"
211
+ v-model:vertex_attribute_range="vertex_attribute_range"
212
+ @vertex_attribute_ranges_per_data="setVertexAttributeRangesPerData"
213
+ v-model:vertex_attribute_color_map="vertex_attribute_color_map"
214
+ v-model:vertex_attribute_no_data_color="vertex_attribute_no_data_color"
215
+ v-model:vertex_attribute_time_step="vertex_attribute_time_step"
216
+ v-model:polygon_attribute_name="polygon_attribute_name"
217
+ v-model:polygon_attribute_item="polygon_attribute_item"
218
+ v-model:polygon_attribute_range="polygon_attribute_range"
219
+ @polygon_attribute_ranges_per_data="setPolygonAttributeRangesPerData"
220
+ v-model:polygon_attribute_color_map="polygon_attribute_color_map"
221
+ v-model:polygon_attribute_no_data_color="polygon_attribute_no_data_color"
222
+ v-model:polygon_attribute_time_step="polygon_attribute_time_step"
223
+ />
224
+ </template>
@@ -1,16 +1,11 @@
1
1
  <script setup lang="ts">
2
- import {
3
- type RangesPerData,
4
- applyRangesPerData,
5
- useBatchStyle,
6
- } from "@ogw_front/composables/batch_style";
7
2
  import ViewerContextMenuItem, {
8
3
  type ItemProps,
9
4
  } from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
10
5
  import PolygonalSurfacePolygons from "@ogw_front/assets/viewer_svgs/surface_triangles.svg";
11
- import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
12
- import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
13
6
  import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
7
+ import ViewerSurfacePolygonsColoring from "@ogw_front/components/Viewer/Surface/PolygonsColoring.vue";
8
+ import { useBatchStyle } from "@ogw_front/composables/batch_style";
14
9
  import { useDataStyleStore } from "@ogw_front/stores/data_style";
15
10
  import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
16
11
 
@@ -18,11 +13,6 @@ const dataStyleStore = useDataStyleStore();
18
13
  const hybridViewerStore = useHybridViewerStore();
19
14
  const { applyBatchStyle } = useBatchStyle();
20
15
 
21
- interface Texture {
22
- id: string;
23
- texture_name: string;
24
- }
25
-
26
16
  interface Props {
27
17
  itemProps: ItemProps & { index: number };
28
18
  tooltip?: string;
@@ -41,187 +31,6 @@ const visibility = computed<boolean>({
41
31
  hybridViewerStore.remoteRender();
42
32
  },
43
33
  });
44
- const coloring_style_key = computed<string>({
45
- get: () => dataStyleStore.meshPolygonsActiveColoring(id.value),
46
- set: async (newValue) => {
47
- await applyBatchStyle(id.value, (targetId: string) =>
48
- dataStyleStore.setMeshPolygonsActiveColoring(targetId, newValue),
49
- );
50
- hybridViewerStore.remoteRender();
51
- },
52
- });
53
- const color = computed<RGBAColor | undefined>({
54
- get: () => dataStyleStore.meshPolygonsColor(id.value) as RGBAColor | undefined,
55
- set: async (newValue) => {
56
- if (newValue === undefined) {
57
- return;
58
- }
59
- await applyBatchStyle(id.value, (targetId: string) =>
60
- dataStyleStore.setMeshPolygonsColor(targetId, newValue),
61
- );
62
- hybridViewerStore.remoteRender();
63
- },
64
- });
65
- const textures = computed<Texture[] | undefined>({
66
- get: () => dataStyleStore.meshPolygonsTextures(id.value) as Texture[] | undefined,
67
- set: async (newValue) => {
68
- if (newValue === undefined) {
69
- return;
70
- }
71
- await applyBatchStyle(id.value, (targetId: string) =>
72
- dataStyleStore.setMeshPolygonsTextures(targetId, newValue),
73
- );
74
- hybridViewerStore.remoteRender();
75
- },
76
- });
77
- const vertex_attribute_name = computed<string | undefined>({
78
- get: () => dataStyleStore.meshPolygonsVertexAttributeName(id.value),
79
- set: async (newValue) => {
80
- if (newValue === undefined) {
81
- return;
82
- }
83
- await applyBatchStyle(id.value, (targetId: string) =>
84
- Promise.resolve(dataStyleStore.setMeshPolygonsVertexAttributeName(targetId, newValue)),
85
- );
86
- hybridViewerStore.remoteRender();
87
- },
88
- });
89
-
90
- const vertex_attribute_time_step = computed<number | undefined>({
91
- get: () => dataStyleStore.meshPolygonsVertexAttributeTimeStep(id.value),
92
- set: async (newValue) => {
93
- if (newValue === undefined) {
94
- return;
95
- }
96
- await applyBatchStyle(id.value, (targetId: string) =>
97
- Promise.resolve(dataStyleStore.setMeshPolygonsVertexAttributeTimeStep(targetId, newValue)),
98
- );
99
- hybridViewerStore.remoteRender();
100
- },
101
- });
102
- const vertex_attribute_item = computed<string | undefined>({
103
- get: () => dataStyleStore.meshPolygonsVertexAttributeItem(id.value),
104
- set: async (newValue) => {
105
- await applyBatchStyle(id.value, (targetId: string) =>
106
- Promise.resolve(dataStyleStore.setMeshPolygonsVertexAttributeItem(targetId, newValue)),
107
- );
108
- hybridViewerStore.remoteRender();
109
- },
110
- });
111
- const vertex_attribute_range = computed<[number, number] | undefined>({
112
- get: () => dataStyleStore.meshPolygonsVertexAttributeRange(id.value),
113
- set: async (newValue) => {
114
- const [minimum, maximum] = newValue;
115
- if (minimum === undefined || maximum === undefined) {
116
- return;
117
- }
118
- await applyBatchStyle(id.value, (targetId: string) =>
119
- Promise.resolve(
120
- dataStyleStore.setMeshPolygonsVertexAttributeRange(targetId, minimum, maximum),
121
- ),
122
- );
123
- hybridViewerStore.remoteRender();
124
- },
125
- });
126
- const vertex_attribute_color_map = computed<Map<string, RGBAColor> | undefined>({
127
- get: () => dataStyleStore.meshPolygonsVertexAttributeColorMap(id.value),
128
- set: async (newValue) => {
129
- await applyBatchStyle(id.value, (targetId: string) =>
130
- Promise.resolve(dataStyleStore.setMeshPolygonsVertexAttributeColorMap(targetId, newValue)),
131
- );
132
- hybridViewerStore.remoteRender();
133
- },
134
- });
135
- const vertex_attribute_no_data_color = computed<RGBAColor>({
136
- get: () => dataStyleStore.meshPolygonsVertexAttributeNoDataColor(id.value),
137
- set: async (newValue) => {
138
- await applyBatchStyle(id.value, (targetId: string) =>
139
- dataStyleStore.setMeshPolygonsVertexAttributeNoDataColor(targetId, newValue),
140
- );
141
- hybridViewerStore.remoteRender();
142
- },
143
- });
144
- const polygon_attribute_name = computed<string | undefined>({
145
- get: () => dataStyleStore.meshPolygonsPolygonAttributeName(id.value),
146
- set: async (newValue) => {
147
- if (newValue === undefined) {
148
- return;
149
- }
150
- await applyBatchStyle(id.value, (targetId: string) =>
151
- Promise.resolve(dataStyleStore.setMeshPolygonsPolygonAttributeName(targetId, newValue)),
152
- );
153
- hybridViewerStore.remoteRender();
154
- },
155
- });
156
-
157
- const polygon_attribute_time_step = computed<number | undefined>({
158
- get: () => dataStyleStore.meshPolygonsPolygonAttributeTimeStep(id.value),
159
- set: async (newValue) => {
160
- if (newValue === undefined) {
161
- return;
162
- }
163
- await applyBatchStyle(id.value, (targetId: string) =>
164
- Promise.resolve(dataStyleStore.setMeshPolygonsPolygonAttributeTimeStep(targetId, newValue)),
165
- );
166
- hybridViewerStore.remoteRender();
167
- },
168
- });
169
- const polygon_attribute_item = computed<string | undefined>({
170
- get: () => dataStyleStore.meshPolygonsPolygonAttributeItem(id.value),
171
- set: async (newValue) => {
172
- await applyBatchStyle(id.value, (targetId: string) =>
173
- Promise.resolve(dataStyleStore.setMeshPolygonsPolygonAttributeItem(targetId, newValue)),
174
- );
175
- hybridViewerStore.remoteRender();
176
- },
177
- });
178
- const polygon_attribute_range = computed<[number, number] | undefined>({
179
- get: () => dataStyleStore.meshPolygonsPolygonAttributeRange(id.value),
180
- set: async (newValue) => {
181
- const [minimum, maximum] = newValue;
182
- if (minimum === undefined || maximum === undefined) {
183
- return;
184
- }
185
- await applyBatchStyle(id.value, (targetId: string) =>
186
- Promise.resolve(
187
- dataStyleStore.setMeshPolygonsPolygonAttributeRange(targetId, minimum, maximum),
188
- ),
189
- );
190
- hybridViewerStore.remoteRender();
191
- },
192
- });
193
- const polygon_attribute_color_map = computed<Map<string, RGBAColor> | undefined>({
194
- get: () => dataStyleStore.meshPolygonsPolygonAttributeColorMap(id.value),
195
- set: async (newValue) => {
196
- await applyBatchStyle(id.value, (targetId: string) =>
197
- Promise.resolve(dataStyleStore.setMeshPolygonsPolygonAttributeColorMap(targetId, newValue)),
198
- );
199
- hybridViewerStore.remoteRender();
200
- },
201
- });
202
- const polygon_attribute_no_data_color = computed<RGBAColor>({
203
- get: () => dataStyleStore.meshPolygonsPolygonAttributeNoDataColor(id.value),
204
- set: async (newValue) => {
205
- await applyBatchStyle(id.value, (targetId: string) =>
206
- dataStyleStore.setMeshPolygonsPolygonAttributeNoDataColor(targetId, newValue),
207
- );
208
- hybridViewerStore.remoteRender();
209
- },
210
- });
211
-
212
- async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
213
- await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
214
- dataStyleStore.setMeshPolygonsVertexAttributeRange(targetId, minimum, maximum),
215
- );
216
- hybridViewerStore.remoteRender();
217
- }
218
-
219
- async function setPolygonAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
220
- await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
221
- dataStyleStore.setMeshPolygonsPolygonAttributeRange(targetId, minimum, maximum),
222
- );
223
- hybridViewerStore.remoteRender();
224
- }
225
34
  </script>
226
35
 
227
36
  <template>
@@ -238,26 +47,7 @@ async function setPolygonAttributeRangesPerData(ranges: RangesPerData): Promise<
238
47
  v-model="visibility"
239
48
  />
240
49
  <template v-if="visibility">
241
- <ViewerOptionsColoringTypeSelector
242
- :id="id"
243
- v-model:coloring_style_key="coloring_style_key"
244
- v-model:color="color"
245
- v-model:textures="textures"
246
- v-model:vertex_attribute_name="vertex_attribute_name"
247
- v-model:vertex_attribute_item="vertex_attribute_item"
248
- v-model:vertex_attribute_range="vertex_attribute_range"
249
- @vertex_attribute_ranges_per_data="setVertexAttributeRangesPerData"
250
- v-model:vertex_attribute_color_map="vertex_attribute_color_map"
251
- v-model:vertex_attribute_no_data_color="vertex_attribute_no_data_color"
252
- v-model:vertex_attribute_time_step="vertex_attribute_time_step"
253
- v-model:polygon_attribute_name="polygon_attribute_name"
254
- v-model:polygon_attribute_item="polygon_attribute_item"
255
- v-model:polygon_attribute_range="polygon_attribute_range"
256
- @polygon_attribute_ranges_per_data="setPolygonAttributeRangesPerData"
257
- v-model:polygon_attribute_color_map="polygon_attribute_color_map"
258
- v-model:polygon_attribute_no_data_color="polygon_attribute_no_data_color"
259
- v-model:polygon_attribute_time_step="polygon_attribute_time_step"
260
- />
50
+ <ViewerSurfacePolygonsColoring :id="id" />
261
51
  </template>
262
52
  </template>
263
53
  </ViewerContextMenuItem>
@@ -3,12 +3,15 @@ import {
3
3
  type ViewerIdResult,
4
4
  useOverlappingPicker,
5
5
  } from "@ogw_front/composables/use_overlapping_picker";
6
+ import BasemapAttribution from "@ogw_front/components/BasemapAttribution.vue";
6
7
  import OverlappingObjectsPicker from "@ogw_front/components/Viewer/OverlappingObjectsPicker.vue";
8
+ import ProjectCrs from "@ogw_front/components/ProjectCrs.vue";
7
9
  import ToolActiveChip from "@ogw_front/components/Viewer/ToolActiveChip.vue";
8
10
  import type { TreeMenuPayload } from "@ogw_front/utils/treeview";
9
11
  import ViewerContextMenu from "@ogw_front/components/Viewer/ContextMenu/ContextMenu.vue";
10
12
  import ViewerObjectTreeLayout from "@ogw_front/components/Viewer/ObjectTree/Layout.vue";
11
13
  import { getCurrentInstance } from "vue";
14
+ import { useBasemapDetailStore } from "@ogw_front/stores/basemap_detail";
12
15
  import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
13
16
  import { useMenuStore } from "@ogw_front/stores/menu";
14
17
  import { useViewerStore } from "@ogw_front/stores/viewer";
@@ -27,6 +30,8 @@ const emit = defineEmits<{
27
30
  const menuStore = useMenuStore();
28
31
  const viewerStore = useViewerStore();
29
32
  const hybridViewerStore = useHybridViewerStore();
33
+ // The sharper map of the visible area follows the camera of this viewer
34
+ useBasemapDetailStore();
30
35
 
31
36
  const hoverHighlightLabel = computed(
32
37
  () =>
@@ -106,6 +111,10 @@ defineExpose({ get_viewer_id });
106
111
  :container-height="containerHeight"
107
112
  />
108
113
 
114
+ <ProjectCrs />
115
+
116
+ <BasemapAttribution />
117
+
109
118
  <OverlappingObjectsPicker
110
119
  :display-intermediate="displayIntermediate"
111
120
  :intermediate-items="intermediateItems"
@@ -105,7 +105,10 @@ function parseContent(): string[] {
105
105
 
106
106
  const allLines = rawContent.value.split(/\r?\n/u).filter((line) => line.trim() !== "");
107
107
  const headerLine = allLines[headerRow.value];
108
- const rawHeaders = headerLine ? splitLine(headerLine) : [];
108
+ let rawHeaders: string[] = [];
109
+ if (headerLine) {
110
+ rawHeaders = splitLine(headerLine);
111
+ }
109
112
 
110
113
  previewHeaders.value = rawHeaders.map((header, index) => ({
111
114
  title: header || `Column ${index + 1}`,
@@ -78,7 +78,10 @@ function useAttributeColoringStyle(colorings: Ref<AttributeColoring[]>): Attribu
78
78
 
79
79
  const currentColormap = computed((): string => {
80
80
  const [coloring] = colorings.value;
81
- return coloring ? String(coloring.read("ColorMap")) : "batlow";
81
+ if (!coloring) {
82
+ return "batlow";
83
+ }
84
+ return String(coloring.read("ColorMap"));
82
85
  });
83
86
 
84
87
  async function applyGlobalColormap(colorMap: string): Promise<void> {
@@ -152,7 +155,10 @@ function useAttributeColoringStyle(colorings: Ref<AttributeColoring[]>): Attribu
152
155
  const currentTimeStep = computed<number>({
153
156
  get(): number {
154
157
  const coloring = temporalColoring.value;
155
- return coloring ? Number(coloring.read("TimeStep") ?? 0) : 0;
158
+ if (!coloring) {
159
+ return 0;
160
+ }
161
+ return Number(coloring.read("TimeStep") ?? 0);
156
162
  },
157
163
  // Setter cannot be async (see `currentRange`), so the write is delegated.
158
164
  set: (step: number): void => {
@@ -0,0 +1,126 @@
1
+ import type { AttributeRangeInfo, AttributeSchemas } from "@ogw_front/utils/attribute_range";
2
+ import type { AttributeRange } from "@ogw_front/composables/batch_style";
3
+ import { getAttributeRange } from "@ogw_front/utils/attributes";
4
+
5
+ interface AttributeInfo {
6
+ attribute_name: string;
7
+ nb_items: number;
8
+ time_steps?: number[];
9
+ [key: string]: unknown;
10
+ }
11
+
12
+ // The minimum and maximum of an attribute range: each one is clamped by the other
13
+ function useAttributeRangeBounds(attributeRange: Ref<(number | undefined)[]>): {
14
+ rangeMin: WritableComputedRef<number | undefined>;
15
+ rangeMax: WritableComputedRef<number | undefined>;
16
+ } {
17
+ const rangeMin = computed<number | undefined>({
18
+ get: () => attributeRange.value[0],
19
+ set: (val: number | undefined) => {
20
+ if (val === undefined) {
21
+ return;
22
+ }
23
+ const [, currentMax] = attributeRange.value;
24
+ let newMin = val;
25
+ if (typeof currentMax === "number" && val > currentMax) {
26
+ newMin = currentMax;
27
+ }
28
+ attributeRange.value = [newMin, currentMax];
29
+ },
30
+ });
31
+ const rangeMax = computed<number | undefined>({
32
+ get: () => attributeRange.value[1],
33
+ set: (val: number | undefined) => {
34
+ if (val === undefined) {
35
+ return;
36
+ }
37
+ const [currentMin] = attributeRange.value;
38
+ let newMax = val;
39
+ if (typeof currentMin === "number" && val < currentMin) {
40
+ newMax = currentMin;
41
+ }
42
+ attributeRange.value = [currentMin, newMax];
43
+ },
44
+ });
45
+ return { rangeMin, rangeMax };
46
+ }
47
+
48
+ // The items of an attribute with several components
49
+ function attributeItemOptions(itemCount: number): { title: string; value: number }[] {
50
+ return Array.from({ length: itemCount }, (_, index) => ({
51
+ title: `Item ${index + 1}`,
52
+ value: index,
53
+ }));
54
+ }
55
+
56
+ // The range of every target for the picked item
57
+ function attributeRangesPerTarget(
58
+ rangesPerTarget: ReadonlyMap<string, AttributeRangeInfo>,
59
+ item: number,
60
+ ): Map<string, AttributeRange> {
61
+ const ranges = new Map<string, AttributeRange>();
62
+ for (const [targetId, range] of rangesPerTarget) {
63
+ const { min, max } = getAttributeRange(range, item);
64
+ ranges.set(targetId, [min, max]);
65
+ }
66
+ return ranges;
67
+ }
68
+
69
+ // Commits the first time step when the picked series changes and the stored one is not valid
70
+ function useSeriesTimeStepCommit(
71
+ timeSteps: ComputedRef<number[]>,
72
+ seriesName: () => string | undefined,
73
+ attributeTimeStep: Readonly<Ref<number | undefined>>,
74
+ resetTimeStep: () => void,
75
+ ): () => void {
76
+ let committedSeries: string | undefined = undefined;
77
+
78
+ return (): void => {
79
+ if (timeSteps.value.length === 0) {
80
+ committedSeries = undefined;
81
+ return;
82
+ }
83
+ const name = seriesName();
84
+ if (name === committedSeries) {
85
+ return;
86
+ }
87
+ committedSeries = name;
88
+ const current = attributeTimeStep.value;
89
+ const valid = current !== undefined && current >= 0 && current < timeSteps.value.length;
90
+ // A valid step is already stored and applied with the series: emitting it again re-applies the attribute
91
+ if (!valid) {
92
+ resetTimeStep();
93
+ }
94
+ };
95
+ }
96
+
97
+ interface AttributeRequestParams {
98
+ id: string;
99
+ component_ids?: string[];
100
+ }
101
+
102
+ // Params of the "names" request, or undefined when the schema needs components and none is selected
103
+ function attributeRequestParams(
104
+ schemas: AttributeSchemas,
105
+ id: string,
106
+ componentIds: string[] | undefined,
107
+ ): AttributeRequestParams | undefined {
108
+ const { properties } = schemas.names;
109
+ if (typeof properties !== "object" || properties === null || !("component_ids" in properties)) {
110
+ return { id };
111
+ }
112
+ if (!Array.isArray(componentIds) || componentIds.length === 0) {
113
+ return undefined;
114
+ }
115
+ return { id, component_ids: componentIds };
116
+ }
117
+
118
+ export {
119
+ type AttributeInfo,
120
+ type AttributeRequestParams,
121
+ attributeItemOptions,
122
+ attributeRequestParams,
123
+ attributeRangesPerTarget,
124
+ useAttributeRangeBounds,
125
+ useSeriesTimeStepCommit,
126
+ };