@geode/opengeodeweb-front 10.44.0 → 10.44.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 (218) hide show
  1. package/app/components/ClippingPlanes.vue +7 -5
  2. package/app/components/CrsSelector.vue +2 -1
  3. package/app/components/ExtensionSelector.vue +8 -7
  4. package/app/components/FactorFilterPanel.vue +4 -4
  5. package/app/components/MissingFilesSelector.vue +2 -1
  6. package/app/components/ObjectSelector.vue +4 -3
  7. package/app/components/ThresholdCard.vue +6 -5
  8. package/app/components/ThresholdFilter.vue +11 -10
  9. package/app/components/TimeSeriesTargetSelector.vue +10 -7
  10. package/app/components/Viewer/ContextMenu/InfoCard.vue +12 -10
  11. package/app/components/Viewer/EdgedCurve/SpecificEdgesColoring.vue +72 -63
  12. package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +12 -10
  13. package/app/components/Viewer/Generic/Mesh/CellsColoring.vue +76 -71
  14. package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +8 -6
  15. package/app/components/Viewer/Generic/Mesh/EdgesColoring.vue +72 -63
  16. package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +12 -10
  17. package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +54 -45
  18. package/app/components/Viewer/Generic/Mesh/PolygonsColoring.vue +76 -73
  19. package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +8 -6
  20. package/app/components/Viewer/Generic/Mesh/PolyhedraColoring.vue +72 -67
  21. package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +8 -6
  22. package/app/components/Viewer/Generic/Model/BlocksOptions.vue +29 -21
  23. package/app/components/Viewer/Generic/Model/ComponentEdgesOptions.vue +8 -6
  24. package/app/components/Viewer/Generic/Model/ComponentPointsOptions.vue +8 -6
  25. package/app/components/Viewer/Generic/Model/CornerComponentOptions.vue +15 -7
  26. package/app/components/Viewer/Generic/Model/CornersOptions.vue +2 -1
  27. package/app/components/Viewer/Generic/Model/CornersTypeOptions.vue +13 -6
  28. package/app/components/Viewer/Generic/Model/LineComponentOptions.vue +19 -11
  29. package/app/components/Viewer/Generic/Model/LinesOptions.vue +2 -1
  30. package/app/components/Viewer/Generic/Model/LinesTypeOptions.vue +17 -10
  31. package/app/components/Viewer/Generic/Model/ModelEdgesCard.vue +3 -2
  32. package/app/components/Viewer/Generic/Model/ModelPointsCard.vue +2 -1
  33. package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +3 -2
  34. package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +29 -21
  35. package/app/components/Viewer/ObjectTree/Base/ItemLabel.vue +2 -2
  36. package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +2 -3
  37. package/app/components/Viewer/Options/AttributeSelector.vue +11 -7
  38. package/app/components/Viewer/Options/ColoringTypeSelector.vue +10 -13
  39. package/app/components/Viewer/Options/TextureItem.vue +5 -4
  40. package/app/components/Viewer/Options/TexturesSelector.vue +5 -8
  41. package/app/components/Viewer/Options/TimeStepSlider.vue +3 -1
  42. package/app/components/Viewer/OverlappingObjectsPicker.vue +6 -13
  43. package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +40 -38
  44. package/app/components/Viewer/Solid/SpecificPolyhedraColoring.vue +69 -65
  45. package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +8 -6
  46. package/app/components/Viewer/Surface/PolygonsColoring.vue +73 -71
  47. package/app/components/Viewer/Surface/PolygonsOptions.vue +8 -6
  48. package/app/composables/attribute_coloring_style.ts +17 -12
  49. package/app/composables/attribute_selector.ts +9 -15
  50. package/app/composables/batch_style.ts +25 -16
  51. package/app/composables/batch_style_model.ts +6 -5
  52. package/app/composables/clipping_planes_widget.ts +2 -5
  53. package/app/composables/clipping_slices.ts +2 -1
  54. package/app/composables/hover_highlight.ts +17 -16
  55. package/app/composables/live_data_item.ts +3 -2
  56. package/app/composables/model_attribute_style.ts +2 -1
  57. package/app/composables/model_menu_context.ts +3 -4
  58. package/app/composables/model_tree.ts +3 -2
  59. package/app/composables/project_manager_helpers/types.ts +10 -4
  60. package/app/composables/tree_filter.ts +3 -3
  61. package/app/composables/tree_keyboard_nav.ts +1 -6
  62. package/app/composables/tree_scroll.ts +2 -0
  63. package/app/composables/use_overlapping_picker.ts +9 -9
  64. package/app/stores/basemap_helpers/georeferenced.ts +1 -1
  65. package/app/stores/basemap_helpers/viewer.ts +2 -1
  66. package/app/stores/crs.ts +6 -5
  67. package/app/stores/data.ts +84 -69
  68. package/app/stores/data_helpers/collections.ts +13 -21
  69. package/app/stores/data_helpers/mesh.ts +19 -24
  70. package/app/stores/data_helpers/relations.ts +12 -12
  71. package/app/stores/data_style.ts +26 -20
  72. package/app/stores/menu.ts +17 -11
  73. package/app/stores/treeview.ts +28 -27
  74. package/app/types/attribute.ts +37 -0
  75. package/app/types/identifiers.ts +72 -0
  76. package/app/types/style.ts +13 -0
  77. package/app/types/texture.ts +6 -0
  78. package/app/types/tree.ts +17 -0
  79. package/app/utils/attribute_range.ts +2 -1
  80. package/app/utils/attributes.ts +13 -4
  81. package/app/utils/basemap_tree.ts +3 -5
  82. package/app/utils/clipping_planes.ts +6 -4
  83. package/app/utils/clipping_planes_scene.ts +4 -3
  84. package/app/utils/crs.ts +4 -1
  85. package/app/utils/default_styles/constants.ts +8 -1
  86. package/app/utils/default_styles/mesh_components.ts +21 -25
  87. package/app/utils/default_styles/meshes.ts +7 -22
  88. package/app/utils/default_styles/model_components.ts +22 -26
  89. package/app/utils/default_styles/models.ts +11 -13
  90. package/app/utils/import_workflow.ts +37 -29
  91. package/app/utils/legacy_data_id.ts +16 -0
  92. package/app/utils/slice.ts +7 -2
  93. package/app/utils/threshold.ts +1 -8
  94. package/app/utils/threshold_sources.ts +8 -5
  95. package/app/utils/treeview.ts +3 -2
  96. package/internal/database/tables/data.ts +1 -1
  97. package/internal/database/tables/data_style.ts +1 -1
  98. package/internal/database/tables/model_components.ts +1 -1
  99. package/internal/database/tables/model_components_relation.ts +1 -1
  100. package/internal/stores/data_style/attribute_default.ts +14 -0
  101. package/internal/stores/data_style/attribute_types.ts +59 -0
  102. package/internal/stores/data_style/attribute_valid.ts +16 -0
  103. package/internal/stores/data_style/mesh/base_style.ts +17 -15
  104. package/internal/stores/data_style/mesh/cells/cell.ts +64 -49
  105. package/internal/stores/data_style/mesh/cells/cell_attribute.ts +42 -66
  106. package/internal/stores/data_style/mesh/cells/cell_config.ts +59 -53
  107. package/internal/stores/data_style/mesh/cells/color.ts +8 -7
  108. package/internal/stores/data_style/mesh/cells/common.ts +16 -15
  109. package/internal/stores/data_style/mesh/cells/index.ts +49 -47
  110. package/internal/stores/data_style/mesh/cells/opacity.ts +12 -10
  111. package/internal/stores/data_style/mesh/cells/textures.ts +8 -7
  112. package/internal/stores/data_style/mesh/cells/vertex.ts +66 -50
  113. package/internal/stores/data_style/mesh/cells/vertex_attribute.ts +37 -67
  114. package/internal/stores/data_style/mesh/cells/vertex_config.ts +62 -53
  115. package/internal/stores/data_style/mesh/cells/visibility.ts +11 -7
  116. package/internal/stores/data_style/mesh/edges/color.ts +8 -7
  117. package/internal/stores/data_style/mesh/edges/common.ts +13 -12
  118. package/internal/stores/data_style/mesh/edges/edge.ts +64 -49
  119. package/internal/stores/data_style/mesh/edges/edge_attribute.ts +42 -66
  120. package/internal/stores/data_style/mesh/edges/edge_config.ts +59 -53
  121. package/internal/stores/data_style/mesh/edges/index.ts +49 -47
  122. package/internal/stores/data_style/mesh/edges/opacity.ts +12 -10
  123. package/internal/stores/data_style/mesh/edges/vertex.ts +66 -50
  124. package/internal/stores/data_style/mesh/edges/vertex_attribute.ts +37 -67
  125. package/internal/stores/data_style/mesh/edges/vertex_config.ts +62 -53
  126. package/internal/stores/data_style/mesh/edges/visibility.ts +11 -7
  127. package/internal/stores/data_style/mesh/edges/width.ts +9 -7
  128. package/internal/stores/data_style/mesh/index.ts +27 -24
  129. package/internal/stores/data_style/mesh/points/color.ts +8 -7
  130. package/internal/stores/data_style/mesh/points/common.ts +16 -14
  131. package/internal/stores/data_style/mesh/points/index.ts +39 -37
  132. package/internal/stores/data_style/mesh/points/opacity.ts +12 -10
  133. package/internal/stores/data_style/mesh/points/size.ts +9 -7
  134. package/internal/stores/data_style/mesh/points/vertex.ts +66 -50
  135. package/internal/stores/data_style/mesh/points/vertex_attribute.ts +37 -67
  136. package/internal/stores/data_style/mesh/points/vertex_config.ts +62 -53
  137. package/internal/stores/data_style/mesh/points/visibility.ts +8 -6
  138. package/internal/stores/data_style/mesh/polygons/color.ts +8 -7
  139. package/internal/stores/data_style/mesh/polygons/common.ts +19 -15
  140. package/internal/stores/data_style/mesh/polygons/index.ts +49 -50
  141. package/internal/stores/data_style/mesh/polygons/opacity.ts +12 -10
  142. package/internal/stores/data_style/mesh/polygons/polygon.ts +66 -50
  143. package/internal/stores/data_style/mesh/polygons/polygon_attribute.ts +37 -67
  144. package/internal/stores/data_style/mesh/polygons/polygon_config.ts +65 -53
  145. package/internal/stores/data_style/mesh/polygons/textures.ts +8 -7
  146. package/internal/stores/data_style/mesh/polygons/vertex.ts +66 -50
  147. package/internal/stores/data_style/mesh/polygons/vertex_attribute.ts +37 -67
  148. package/internal/stores/data_style/mesh/polygons/vertex_config.ts +65 -53
  149. package/internal/stores/data_style/mesh/polygons/visibility.ts +12 -7
  150. package/internal/stores/data_style/mesh/polyhedra/color.ts +13 -9
  151. package/internal/stores/data_style/mesh/polyhedra/common.ts +13 -12
  152. package/internal/stores/data_style/mesh/polyhedra/index.ts +51 -51
  153. package/internal/stores/data_style/mesh/polyhedra/opacity.ts +12 -10
  154. package/internal/stores/data_style/mesh/polyhedra/polyhedron.ts +59 -53
  155. package/internal/stores/data_style/mesh/polyhedra/polyhedron_attribute.ts +46 -69
  156. package/internal/stores/data_style/mesh/polyhedra/polyhedron_config.ts +65 -55
  157. package/internal/stores/data_style/mesh/polyhedra/vertex.ts +66 -50
  158. package/internal/stores/data_style/mesh/polyhedra/vertex_attribute.ts +37 -67
  159. package/internal/stores/data_style/mesh/polyhedra/vertex_config.ts +65 -53
  160. package/internal/stores/data_style/mesh/polyhedra/visibility.ts +12 -7
  161. package/internal/stores/data_style/model/blocks/apply_coloring.ts +11 -12
  162. package/internal/stores/data_style/model/blocks/color.ts +25 -26
  163. package/internal/stores/data_style/model/blocks/coloring_groups.ts +5 -9
  164. package/internal/stores/data_style/model/blocks/common.ts +26 -22
  165. package/internal/stores/data_style/model/blocks/index.ts +8 -7
  166. package/internal/stores/data_style/model/blocks/polyhedron.ts +114 -135
  167. package/internal/stores/data_style/model/blocks/vertex.ts +110 -132
  168. package/internal/stores/data_style/model/blocks/visibility.ts +11 -9
  169. package/internal/stores/data_style/model/color.ts +55 -41
  170. package/internal/stores/data_style/model/common.ts +16 -14
  171. package/internal/stores/data_style/model/component_style.ts +0 -16
  172. package/internal/stores/data_style/model/corners/color.ts +21 -19
  173. package/internal/stores/data_style/model/corners/common.ts +26 -22
  174. package/internal/stores/data_style/model/corners/index.ts +21 -24
  175. package/internal/stores/data_style/model/corners/vertex.ts +103 -122
  176. package/internal/stores/data_style/model/corners/visibility.ts +11 -9
  177. package/internal/stores/data_style/model/edges/common.ts +7 -6
  178. package/internal/stores/data_style/model/edges/component.ts +63 -55
  179. package/internal/stores/data_style/model/edges/visibility.ts +24 -16
  180. package/internal/stores/data_style/model/edges/width.ts +10 -8
  181. package/internal/stores/data_style/model/index.ts +7 -6
  182. package/internal/stores/data_style/model/lines/apply_coloring.ts +11 -9
  183. package/internal/stores/data_style/model/lines/color.ts +25 -23
  184. package/internal/stores/data_style/model/lines/coloring_groups.ts +5 -9
  185. package/internal/stores/data_style/model/lines/common.ts +29 -21
  186. package/internal/stores/data_style/model/lines/edge.ts +109 -128
  187. package/internal/stores/data_style/model/lines/index.ts +8 -7
  188. package/internal/stores/data_style/model/lines/vertex.ts +109 -128
  189. package/internal/stores/data_style/model/lines/visibility.ts +11 -9
  190. package/internal/stores/data_style/model/points/common.ts +7 -6
  191. package/internal/stores/data_style/model/points/component.ts +62 -54
  192. package/internal/stores/data_style/model/points/index.ts +12 -7
  193. package/internal/stores/data_style/model/points/size.ts +10 -8
  194. package/internal/stores/data_style/model/points/visibility.ts +13 -8
  195. package/internal/stores/data_style/model/selection.ts +6 -11
  196. package/internal/stores/data_style/model/surfaces/apply_coloring.ts +11 -15
  197. package/internal/stores/data_style/model/surfaces/color.ts +31 -23
  198. package/internal/stores/data_style/model/surfaces/coloring_groups.ts +5 -9
  199. package/internal/stores/data_style/model/surfaces/common.ts +26 -22
  200. package/internal/stores/data_style/model/surfaces/index.ts +8 -7
  201. package/internal/stores/data_style/model/surfaces/polygon.ts +113 -138
  202. package/internal/stores/data_style/model/surfaces/vertex.ts +117 -133
  203. package/internal/stores/data_style/model/surfaces/visibility.ts +11 -9
  204. package/internal/stores/data_style/model/visibility.ts +18 -16
  205. package/internal/stores/data_style/model/visibility_dispatch.ts +4 -4
  206. package/internal/stores/data_style/state.ts +7 -6
  207. package/internal/stores/data_style/state_shared.ts +11 -10
  208. package/internal/stores/data_style/time_step.ts +21 -15
  209. package/internal/stores/data_style/types.ts +4 -3
  210. package/internal/stores/hybrid_viewer/camera.ts +11 -6
  211. package/internal/stores/hybrid_viewer/filters.ts +16 -14
  212. package/internal/stores/hybrid_viewer/highlight.ts +6 -5
  213. package/internal/stores/hybrid_viewer/scene.ts +20 -18
  214. package/internal/stores/hybrid_viewer/vtk_types.ts +2 -2
  215. package/internal/utils/api_fetch.ts +1 -1
  216. package/internal/utils/upload_file.ts +1 -7
  217. package/package.json +1 -1
  218. package/shared/utils/fetch_raw.ts +7 -8
@@ -2,7 +2,9 @@
2
2
  import ViewerContextMenuItem, {
3
3
  type ItemProps,
4
4
  } from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
5
+ import type { Visibility, Width } from "@ogw_front/types/style";
5
6
  import EdgedCurveEdges from "@ogw_front/assets/viewer_svgs/edged_curve_edges.svg";
7
+ import type { MeshId } from "@ogw_front/types/identifiers";
6
8
  import ViewerEdgedCurveSpecificEdgesColoring from "@ogw_front/components/Viewer/EdgedCurve/SpecificEdgesColoring.vue";
7
9
  import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
8
10
  import ViewerOptionsWidthSlider from "@ogw_front/components/Viewer/Options/Sliders/Width.vue";
@@ -20,22 +22,22 @@ interface Props {
20
22
 
21
23
  const { itemProps } = defineProps<Props>();
22
24
 
23
- const id = toRef(() => itemProps.id);
25
+ const dataId = toRef(() => itemProps.id);
24
26
 
25
- const visibility = computed<boolean>({
26
- get: () => dataStyleStore.meshEdgesVisibility(id.value),
27
+ const visibility = computed<Visibility>({
28
+ get: () => dataStyleStore.meshEdgesVisibility(dataId.value),
27
29
  set: async (newValue) => {
28
- await applyBatchStyle(id.value, (targetId: string) =>
29
- dataStyleStore.setMeshEdgesVisibility(targetId, newValue),
30
+ await applyBatchStyle(dataId.value, (meshId: MeshId) =>
31
+ dataStyleStore.setMeshEdgesVisibility(meshId, newValue),
30
32
  );
31
33
  hybridViewerStore.remoteRender();
32
34
  },
33
35
  });
34
- const width = computed<number>({
35
- get: () => dataStyleStore.meshEdgesWidth(id.value),
36
+ const width = computed<Width>({
37
+ get: () => dataStyleStore.meshEdgesWidth(dataId.value),
36
38
  set: async (newValue) => {
37
- await applyBatchStyle(id.value, (targetId: string) =>
38
- dataStyleStore.setMeshEdgesWidth(targetId, newValue),
39
+ await applyBatchStyle(dataId.value, (meshId: MeshId) =>
40
+ dataStyleStore.setMeshEdgesWidth(meshId, newValue),
39
41
  );
40
42
  hybridViewerStore.remoteRender();
41
43
  },
@@ -55,7 +57,7 @@ const width = computed<number>({
55
57
  <template v-if="visibility">
56
58
  <v-divider class="my-2" />
57
59
  <ViewerOptionsWidthSlider data-testid="meshEdgesWidthSlider" v-model="width" />
58
- <ViewerEdgedCurveSpecificEdgesColoring :id="id" />
60
+ <ViewerEdgedCurveSpecificEdgesColoring :data-id="dataId" />
59
61
  </template>
60
62
  </template>
61
63
  </ViewerContextMenuItem>
@@ -1,196 +1,201 @@
1
1
  <script setup lang="ts">
2
+ import type {
3
+ AttributeColorMap,
4
+ AttributeItem,
5
+ AttributeName,
6
+ AttributeRange,
7
+ AttributeTimeStep,
8
+ } from "@ogw_front/types/attribute";
9
+ import type { DataId, MeshId } from "@ogw_front/types/identifiers";
2
10
  import {
3
11
  type RangesPerData,
4
12
  applyRangesPerData,
5
13
  useBatchStyle,
6
14
  } from "@ogw_front/composables/batch_style";
15
+ import type { Opacity } from "@ogw_front/types/style";
7
16
  import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
17
+ import type { Texture } from "@ogw_front/types/texture";
8
18
  import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
9
19
  import { useBatchStyleModel } from "@ogw_front/composables/batch_style_model";
10
20
  import { useDataStyleStore } from "@ogw_front/stores/data_style";
11
21
  import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
12
22
 
13
- interface Texture {
14
- id: string;
15
- texture_name: string;
16
- }
17
-
18
23
  const dataStyleStore = useDataStyleStore();
19
24
  const hybridViewerStore = useHybridViewerStore();
20
25
  const { applyBatchStyle } = useBatchStyle();
21
26
 
22
27
  interface Props {
23
- id: string;
28
+ dataId: DataId;
24
29
  }
25
30
 
26
- const { id } = defineProps<Props>();
31
+ const { dataId } = defineProps<Props>();
27
32
 
28
33
  const coloring_style_key = computed<string>({
29
- get: () => dataStyleStore.meshCellsActiveColoring(id),
34
+ get: () => dataStyleStore.meshCellsActiveColoring(dataId),
30
35
  set: async (newValue) => {
31
- await applyBatchStyle(id, (targetId: string) =>
32
- dataStyleStore.setMeshCellsActiveColoring(targetId, newValue),
36
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
37
+ dataStyleStore.setMeshCellsActiveColoring(meshId, newValue),
33
38
  );
34
39
  hybridViewerStore.remoteRender();
35
40
  },
36
41
  });
37
42
  const color = useBatchStyleModel<RGBAColor>(
38
- () => id,
39
- (targetId) => dataStyleStore.meshCellsColor(targetId) as RGBAColor | undefined,
40
- (targetId, value) => dataStyleStore.setMeshCellsColor(targetId, value),
43
+ () => dataId,
44
+ (meshId) => dataStyleStore.meshCellsColor(meshId) as RGBAColor | undefined,
45
+ (meshId, value) => dataStyleStore.setMeshCellsColor(meshId, value),
41
46
  );
42
- const opacity = useBatchStyleModel<number>(
43
- () => id,
44
- (targetId) => dataStyleStore.meshCellsOpacity(targetId),
45
- (targetId, value) => dataStyleStore.setMeshCellsOpacity(targetId, value),
47
+ const opacity = useBatchStyleModel<Opacity>(
48
+ () => dataId,
49
+ (meshId) => dataStyleStore.meshCellsOpacity(meshId),
50
+ (meshId, value) => dataStyleStore.setMeshCellsOpacity(meshId, value),
46
51
  );
47
52
  const textures = useBatchStyleModel<Texture[]>(
48
- () => id,
49
- (targetId) => dataStyleStore.meshCellsTextures(targetId) as Texture[] | undefined,
50
- (targetId, value) => dataStyleStore.setMeshCellsTextures(targetId, value),
53
+ () => dataId,
54
+ (meshId) => dataStyleStore.meshCellsTextures(meshId) as Texture[] | undefined,
55
+ (meshId, value) => dataStyleStore.setMeshCellsTextures(meshId, value),
51
56
  );
52
57
 
53
- const vertex_attribute_name = computed<string | undefined>({
54
- get: () => dataStyleStore.meshCellsVertexAttributeName(id),
58
+ const vertex_attribute_name = computed<AttributeName | undefined>({
59
+ get: () => dataStyleStore.meshCellsVertexAttributeName(dataId),
55
60
  set: async (newValue) => {
56
61
  if (newValue === undefined) {
57
62
  return;
58
63
  }
59
- await applyBatchStyle(id, (targetId: string) =>
60
- Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeName(targetId, newValue)),
64
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
65
+ Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeName(meshId, newValue)),
61
66
  );
62
67
  hybridViewerStore.remoteRender();
63
68
  },
64
69
  });
65
70
 
66
- const vertex_attribute_time_step = computed<number | undefined>({
67
- get: () => dataStyleStore.meshCellsVertexAttributeTimeStep(id),
71
+ const vertex_attribute_time_step = computed<AttributeTimeStep | undefined>({
72
+ get: () => dataStyleStore.meshCellsVertexAttributeTimeStep(dataId),
68
73
  set: async (newValue) => {
69
74
  if (newValue === undefined) {
70
75
  return;
71
76
  }
72
- await applyBatchStyle(id, (targetId: string) =>
73
- Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeTimeStep(targetId, newValue)),
77
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
78
+ Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeTimeStep(meshId, newValue)),
74
79
  );
75
80
  hybridViewerStore.remoteRender();
76
81
  },
77
82
  });
78
- const vertex_attribute_item = computed<string | undefined>({
79
- get: () => dataStyleStore.meshCellsVertexAttributeItem(id),
83
+ const vertex_attribute_item = computed<AttributeItem>({
84
+ get: () => dataStyleStore.meshCellsVertexAttributeItem(dataId),
80
85
  set: async (newValue) => {
81
- await applyBatchStyle(id, (targetId: string) =>
82
- Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeItem(targetId, newValue)),
86
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
87
+ Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeItem(meshId, newValue)),
83
88
  );
84
89
  hybridViewerStore.remoteRender();
85
90
  },
86
91
  });
87
- const vertex_attribute_range = computed<[number, number] | undefined>({
88
- get: () => dataStyleStore.meshCellsVertexAttributeRange(id),
92
+ const vertex_attribute_range = computed<AttributeRange>({
93
+ get: () => dataStyleStore.meshCellsVertexAttributeRange(dataId),
89
94
  set: async (newValue) => {
90
95
  const [minimum, maximum] = newValue;
91
96
  if (minimum === undefined || maximum === undefined) {
92
97
  return;
93
98
  }
94
- await applyBatchStyle(id, (targetId: string) =>
95
- Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeRange(targetId, minimum, maximum)),
99
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
100
+ Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeRange(meshId, minimum, maximum)),
96
101
  );
97
102
  hybridViewerStore.remoteRender();
98
103
  },
99
104
  });
100
- const vertex_attribute_color_map = computed<Map<string, RGBAColor>>({
101
- get: () => dataStyleStore.meshCellsVertexAttributeColorMap(id),
105
+ const vertex_attribute_color_map = computed<AttributeColorMap | undefined>({
106
+ get: () => dataStyleStore.meshCellsVertexAttributeColorMap(dataId),
102
107
  set: async (newValue) => {
103
- await applyBatchStyle(id, (targetId: string) =>
104
- Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeColorMap(targetId, newValue)),
108
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
109
+ Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeColorMap(meshId, newValue)),
105
110
  );
106
111
  hybridViewerStore.remoteRender();
107
112
  },
108
113
  });
109
114
  const vertex_attribute_no_data_color = computed<RGBAColor>({
110
- get: () => dataStyleStore.meshCellsVertexAttributeNoDataColor(id),
115
+ get: () => dataStyleStore.meshCellsVertexAttributeNoDataColor(dataId),
111
116
  set: async (newValue) => {
112
- await applyBatchStyle(id, (targetId: string) =>
113
- dataStyleStore.setMeshCellsVertexAttributeNoDataColor(targetId, newValue),
117
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
118
+ dataStyleStore.setMeshCellsVertexAttributeNoDataColor(meshId, newValue),
114
119
  );
115
120
  hybridViewerStore.remoteRender();
116
121
  },
117
122
  });
118
- const cell_attribute_name = computed<string | undefined>({
119
- get: () => dataStyleStore.meshCellsCellAttributeName(id),
123
+ const cell_attribute_name = computed<AttributeName | undefined>({
124
+ get: () => dataStyleStore.meshCellsCellAttributeName(dataId),
120
125
  set: async (newValue) => {
121
126
  if (newValue === undefined) {
122
127
  return;
123
128
  }
124
- await applyBatchStyle(id, (targetId: string) =>
125
- Promise.resolve(dataStyleStore.setMeshCellsCellAttributeName(targetId, newValue)),
129
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
130
+ Promise.resolve(dataStyleStore.setMeshCellsCellAttributeName(meshId, newValue)),
126
131
  );
127
132
  hybridViewerStore.remoteRender();
128
133
  },
129
134
  });
130
135
 
131
- const cell_attribute_time_step = computed<number | undefined>({
132
- get: () => dataStyleStore.meshCellsCellAttributeTimeStep(id),
136
+ const cell_attribute_time_step = computed<AttributeTimeStep | undefined>({
137
+ get: () => dataStyleStore.meshCellsCellAttributeTimeStep(dataId),
133
138
  set: async (newValue) => {
134
139
  if (newValue === undefined) {
135
140
  return;
136
141
  }
137
- await applyBatchStyle(id, (targetId: string) =>
138
- Promise.resolve(dataStyleStore.setMeshCellsCellAttributeTimeStep(targetId, newValue)),
142
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
143
+ Promise.resolve(dataStyleStore.setMeshCellsCellAttributeTimeStep(meshId, newValue)),
139
144
  );
140
145
  hybridViewerStore.remoteRender();
141
146
  },
142
147
  });
143
- const cell_attribute_item = computed<string | undefined>({
144
- get: () => dataStyleStore.meshCellsCellAttributeItem(id),
148
+ const cell_attribute_item = computed<AttributeItem>({
149
+ get: () => dataStyleStore.meshCellsCellAttributeItem(dataId),
145
150
  set: async (newValue) => {
146
- await applyBatchStyle(id, (targetId: string) =>
147
- Promise.resolve(dataStyleStore.setMeshCellsCellAttributeItem(targetId, newValue)),
151
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
152
+ Promise.resolve(dataStyleStore.setMeshCellsCellAttributeItem(meshId, newValue)),
148
153
  );
149
154
  hybridViewerStore.remoteRender();
150
155
  },
151
156
  });
152
- const cell_attribute_range = computed<[number, number] | undefined>({
153
- get: () => dataStyleStore.meshCellsCellAttributeRange(id),
157
+ const cell_attribute_range = computed<AttributeRange>({
158
+ get: () => dataStyleStore.meshCellsCellAttributeRange(dataId),
154
159
  set: async (newValue) => {
155
160
  const [minimum, maximum] = newValue;
156
161
  if (minimum === undefined || maximum === undefined) {
157
162
  return;
158
163
  }
159
- await applyBatchStyle(id, (targetId: string) =>
160
- Promise.resolve(dataStyleStore.setMeshCellsCellAttributeRange(targetId, minimum, maximum)),
164
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
165
+ Promise.resolve(dataStyleStore.setMeshCellsCellAttributeRange(meshId, minimum, maximum)),
161
166
  );
162
167
  hybridViewerStore.remoteRender();
163
168
  },
164
169
  });
165
- const cell_attribute_color_map = computed<Map<string, RGBAColor>>({
166
- get: () => dataStyleStore.meshCellsCellAttributeColorMap(id),
170
+ const cell_attribute_color_map = computed<AttributeColorMap | undefined>({
171
+ get: () => dataStyleStore.meshCellsCellAttributeColorMap(dataId),
167
172
  set: async (newValue) => {
168
- await applyBatchStyle(id, (targetId: string) =>
169
- Promise.resolve(dataStyleStore.setMeshCellsCellAttributeColorMap(targetId, newValue)),
173
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
174
+ Promise.resolve(dataStyleStore.setMeshCellsCellAttributeColorMap(meshId, newValue)),
170
175
  );
171
176
  hybridViewerStore.remoteRender();
172
177
  },
173
178
  });
174
179
  const cell_attribute_no_data_color = computed<RGBAColor>({
175
- get: () => dataStyleStore.meshCellsCellAttributeNoDataColor(id),
180
+ get: () => dataStyleStore.meshCellsCellAttributeNoDataColor(dataId),
176
181
  set: async (newValue) => {
177
- await applyBatchStyle(id, (targetId: string) =>
178
- dataStyleStore.setMeshCellsCellAttributeNoDataColor(targetId, newValue),
182
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
183
+ dataStyleStore.setMeshCellsCellAttributeNoDataColor(meshId, newValue),
179
184
  );
180
185
  hybridViewerStore.remoteRender();
181
186
  },
182
187
  });
183
188
 
184
189
  async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
185
- await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
186
- dataStyleStore.setMeshCellsVertexAttributeRange(targetId, minimum, maximum),
190
+ await applyRangesPerData(ranges, (meshId, minimum, maximum) =>
191
+ dataStyleStore.setMeshCellsVertexAttributeRange(meshId, minimum, maximum),
187
192
  );
188
193
  hybridViewerStore.remoteRender();
189
194
  }
190
195
 
191
196
  async function setCellAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
192
- await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
193
- dataStyleStore.setMeshCellsCellAttributeRange(targetId, minimum, maximum),
197
+ await applyRangesPerData(ranges, (meshId, minimum, maximum) =>
198
+ dataStyleStore.setMeshCellsCellAttributeRange(meshId, minimum, maximum),
194
199
  );
195
200
  hybridViewerStore.remoteRender();
196
201
  }
@@ -198,7 +203,7 @@ async function setCellAttributeRangesPerData(ranges: RangesPerData): Promise<voi
198
203
 
199
204
  <template>
200
205
  <ViewerOptionsColoringTypeSelector
201
- :id="id"
206
+ :data-id="dataId"
202
207
  v-model:coloring_style_key="coloring_style_key"
203
208
  v-model:color="color"
204
209
  v-model:opacity="opacity"
@@ -2,8 +2,10 @@
2
2
  import ViewerContextMenuItem, {
3
3
  type ItemProps,
4
4
  } from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
5
+ import type { MeshId } from "@ogw_front/types/identifiers";
5
6
  import ViewerGenericMeshCellsColoring from "@ogw_front/components/Viewer/Generic/Mesh/CellsColoring.vue";
6
7
  import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
8
+ import type { Visibility } from "@ogw_front/types/style";
7
9
  import { useBatchStyle } from "@ogw_front/composables/batch_style";
8
10
  import { useDataStyleStore } from "@ogw_front/stores/data_style";
9
11
  import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
@@ -20,13 +22,13 @@ interface Props {
20
22
 
21
23
  const { itemProps, btnImage, tooltip = "Cells options" } = defineProps<Props>();
22
24
 
23
- const id = toRef(() => itemProps.id);
25
+ const dataId = toRef(() => itemProps.id);
24
26
 
25
- const visibility = computed<boolean>({
26
- get: () => dataStyleStore.meshCellsVisibility(id.value),
27
+ const visibility = computed<Visibility>({
28
+ get: () => dataStyleStore.meshCellsVisibility(dataId.value),
27
29
  set: async (newValue) => {
28
- await applyBatchStyle(id.value, (targetId: string) =>
29
- dataStyleStore.setMeshCellsVisibility(targetId, newValue),
30
+ await applyBatchStyle(dataId.value, (meshId: MeshId) =>
31
+ dataStyleStore.setMeshCellsVisibility(meshId, newValue),
30
32
  );
31
33
  hybridViewerStore.remoteRender();
32
34
  },
@@ -45,7 +47,7 @@ const visibility = computed<boolean>({
45
47
  <ViewerOptionsVisibilitySwitch data-testid="meshCellsVisibilitySwitch" v-model="visibility" />
46
48
  <template v-if="visibility">
47
49
  <v-divider />
48
- <ViewerGenericMeshCellsColoring :id="id" />
50
+ <ViewerGenericMeshCellsColoring :data-id="dataId" />
49
51
  </template>
50
52
  </template>
51
53
  </ViewerContextMenuItem>
@@ -1,9 +1,18 @@
1
1
  <script setup lang="ts">
2
+ import type {
3
+ AttributeColorMap,
4
+ AttributeItem,
5
+ AttributeName,
6
+ AttributeRange,
7
+ AttributeTimeStep,
8
+ } from "@ogw_front/types/attribute";
9
+ import type { DataId, MeshId } from "@ogw_front/types/identifiers";
2
10
  import {
3
11
  type RangesPerData,
4
12
  applyRangesPerData,
5
13
  useBatchStyle,
6
14
  } from "@ogw_front/composables/batch_style";
15
+ import type { Opacity } from "@ogw_front/types/style";
7
16
  import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
8
17
  import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
9
18
  import { useBatchStyleModel } from "@ogw_front/composables/batch_style_model";
@@ -15,172 +24,172 @@ const hybridViewerStore = useHybridViewerStore();
15
24
  const { applyBatchStyle } = useBatchStyle();
16
25
 
17
26
  interface Props {
18
- id: string;
27
+ dataId: DataId;
19
28
  capabilities: Record<string, { available?: boolean; hasColorMap?: boolean }>;
20
29
  }
21
30
 
22
- const { id, capabilities } = defineProps<Props>();
31
+ const { dataId, capabilities } = defineProps<Props>();
23
32
 
24
33
  const coloring_style_key = computed<string>({
25
- get: () => dataStyleStore.meshEdgesActiveColoring(id),
34
+ get: () => dataStyleStore.meshEdgesActiveColoring(dataId),
26
35
  set: async (newValue) => {
27
- await applyBatchStyle(id, (targetId: string) =>
28
- dataStyleStore.setMeshEdgesActiveColoring(targetId, newValue),
36
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
37
+ dataStyleStore.setMeshEdgesActiveColoring(meshId, newValue),
29
38
  );
30
39
  hybridViewerStore.remoteRender();
31
40
  },
32
41
  });
33
42
  const color = useBatchStyleModel<RGBAColor>(
34
- () => id,
35
- (targetId) => dataStyleStore.meshEdgesColor(targetId) as RGBAColor | undefined,
36
- (targetId, value) => dataStyleStore.setMeshEdgesColor(targetId, value),
43
+ () => dataId,
44
+ (meshId) => dataStyleStore.meshEdgesColor(meshId) as RGBAColor | undefined,
45
+ (meshId, value) => dataStyleStore.setMeshEdgesColor(meshId, value),
37
46
  );
38
- const opacity = useBatchStyleModel<number>(
39
- () => id,
40
- (targetId) => dataStyleStore.meshEdgesOpacity(targetId),
41
- (targetId, value) => dataStyleStore.setMeshEdgesOpacity(targetId, value),
47
+ const opacity = useBatchStyleModel<Opacity>(
48
+ () => dataId,
49
+ (meshId) => dataStyleStore.meshEdgesOpacity(meshId),
50
+ (meshId, value) => dataStyleStore.setMeshEdgesOpacity(meshId, value),
42
51
  );
43
- const vertex_attribute_name = computed<string | undefined>({
44
- get: () => dataStyleStore.meshEdgesVertexAttributeName(id),
52
+ const vertex_attribute_name = computed<AttributeName | undefined>({
53
+ get: () => dataStyleStore.meshEdgesVertexAttributeName(dataId),
45
54
  set: async (newValue) => {
46
55
  if (newValue === undefined) {
47
56
  return;
48
57
  }
49
- await applyBatchStyle(id, (targetId: string) =>
50
- Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeName(targetId, newValue)),
58
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
59
+ Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeName(meshId, newValue)),
51
60
  );
52
61
  hybridViewerStore.remoteRender();
53
62
  },
54
63
  });
55
64
 
56
- const vertex_attribute_time_step = computed<number | undefined>({
57
- get: () => dataStyleStore.meshEdgesVertexAttributeTimeStep(id),
65
+ const vertex_attribute_time_step = computed<AttributeTimeStep | undefined>({
66
+ get: () => dataStyleStore.meshEdgesVertexAttributeTimeStep(dataId),
58
67
  set: async (newValue) => {
59
68
  if (newValue === undefined) {
60
69
  return;
61
70
  }
62
- await applyBatchStyle(id, (targetId: string) =>
63
- Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeTimeStep(targetId, newValue)),
71
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
72
+ Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeTimeStep(meshId, newValue)),
64
73
  );
65
74
  hybridViewerStore.remoteRender();
66
75
  },
67
76
  });
68
- const vertex_attribute_item = computed<string | undefined>({
69
- get: () => dataStyleStore.meshEdgesVertexAttributeItem(id),
77
+ const vertex_attribute_item = computed<AttributeItem>({
78
+ get: () => dataStyleStore.meshEdgesVertexAttributeItem(dataId),
70
79
  set: async (newValue) => {
71
- await applyBatchStyle(id, (targetId: string) =>
72
- Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeItem(targetId, newValue)),
80
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
81
+ Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeItem(meshId, newValue)),
73
82
  );
74
83
  hybridViewerStore.remoteRender();
75
84
  },
76
85
  });
77
- const vertex_attribute_range = computed<[number, number] | undefined>({
78
- get: () => dataStyleStore.meshEdgesVertexAttributeRange(id),
86
+ const vertex_attribute_range = computed<AttributeRange>({
87
+ get: () => dataStyleStore.meshEdgesVertexAttributeRange(dataId),
79
88
  set: async (newValue) => {
80
89
  const [minimum, maximum] = newValue;
81
90
  if (minimum === undefined || maximum === undefined) {
82
91
  return;
83
92
  }
84
- await applyBatchStyle(id, (targetId: string) =>
85
- Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeRange(targetId, minimum, maximum)),
93
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
94
+ Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeRange(meshId, minimum, maximum)),
86
95
  );
87
96
  hybridViewerStore.remoteRender();
88
97
  },
89
98
  });
90
- const vertex_attribute_color_map = computed<Map<string, RGBAColor>>({
91
- get: () => dataStyleStore.meshEdgesVertexAttributeColorMap(id),
99
+ const vertex_attribute_color_map = computed<AttributeColorMap | undefined>({
100
+ get: () => dataStyleStore.meshEdgesVertexAttributeColorMap(dataId),
92
101
  set: async (newValue) => {
93
- await applyBatchStyle(id, (targetId: string) =>
94
- Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeColorMap(targetId, newValue)),
102
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
103
+ Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeColorMap(meshId, newValue)),
95
104
  );
96
105
  hybridViewerStore.remoteRender();
97
106
  },
98
107
  });
99
108
  const vertex_attribute_no_data_color = computed<RGBAColor>({
100
- get: () => dataStyleStore.meshEdgesVertexAttributeNoDataColor(id),
109
+ get: () => dataStyleStore.meshEdgesVertexAttributeNoDataColor(dataId),
101
110
  set: async (newValue) => {
102
- await applyBatchStyle(id, (targetId: string) =>
103
- dataStyleStore.setMeshEdgesVertexAttributeNoDataColor(targetId, newValue),
111
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
112
+ dataStyleStore.setMeshEdgesVertexAttributeNoDataColor(meshId, newValue),
104
113
  );
105
114
  hybridViewerStore.remoteRender();
106
115
  },
107
116
  });
108
- const edge_attribute_name = computed<string | undefined>({
109
- get: () => dataStyleStore.meshEdgesEdgeAttributeName(id),
117
+ const edge_attribute_name = computed<AttributeName | undefined>({
118
+ get: () => dataStyleStore.meshEdgesEdgeAttributeName(dataId),
110
119
  set: async (newValue) => {
111
120
  if (newValue === undefined) {
112
121
  return;
113
122
  }
114
- await applyBatchStyle(id, (targetId: string) =>
115
- Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeName(targetId, newValue)),
123
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
124
+ Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeName(meshId, newValue)),
116
125
  );
117
126
  hybridViewerStore.remoteRender();
118
127
  },
119
128
  });
120
129
 
121
- const edge_attribute_time_step = computed<number | undefined>({
122
- get: () => dataStyleStore.meshEdgesEdgeAttributeTimeStep(id),
130
+ const edge_attribute_time_step = computed<AttributeTimeStep | undefined>({
131
+ get: () => dataStyleStore.meshEdgesEdgeAttributeTimeStep(dataId),
123
132
  set: async (newValue) => {
124
133
  if (newValue === undefined) {
125
134
  return;
126
135
  }
127
- await applyBatchStyle(id, (targetId: string) =>
128
- Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeTimeStep(targetId, newValue)),
136
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
137
+ Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeTimeStep(meshId, newValue)),
129
138
  );
130
139
  hybridViewerStore.remoteRender();
131
140
  },
132
141
  });
133
- const edge_attribute_item = computed<string | undefined>({
134
- get: () => dataStyleStore.meshEdgesEdgeAttributeItem(id),
142
+ const edge_attribute_item = computed<AttributeItem>({
143
+ get: () => dataStyleStore.meshEdgesEdgeAttributeItem(dataId),
135
144
  set: async (newValue) => {
136
- await applyBatchStyle(id, (targetId: string) =>
137
- Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeItem(targetId, newValue)),
145
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
146
+ Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeItem(meshId, newValue)),
138
147
  );
139
148
  hybridViewerStore.remoteRender();
140
149
  },
141
150
  });
142
- const edge_attribute_range = computed<[number, number] | undefined>({
143
- get: () => dataStyleStore.meshEdgesEdgeAttributeRange(id),
151
+ const edge_attribute_range = computed<AttributeRange>({
152
+ get: () => dataStyleStore.meshEdgesEdgeAttributeRange(dataId),
144
153
  set: async (newValue) => {
145
154
  const [minimum, maximum] = newValue;
146
155
  if (minimum === undefined || maximum === undefined) {
147
156
  return;
148
157
  }
149
- await applyBatchStyle(id, (targetId: string) =>
150
- Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeRange(targetId, minimum, maximum)),
158
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
159
+ Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeRange(meshId, minimum, maximum)),
151
160
  );
152
161
  hybridViewerStore.remoteRender();
153
162
  },
154
163
  });
155
- const edge_attribute_color_map = computed<Map<string, RGBAColor>>({
156
- get: () => dataStyleStore.meshEdgesEdgeAttributeColorMap(id),
164
+ const edge_attribute_color_map = computed<AttributeColorMap | undefined>({
165
+ get: () => dataStyleStore.meshEdgesEdgeAttributeColorMap(dataId),
157
166
  set: async (newValue) => {
158
- await applyBatchStyle(id, (targetId: string) =>
159
- Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeColorMap(targetId, newValue)),
167
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
168
+ Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeColorMap(meshId, newValue)),
160
169
  );
161
170
  hybridViewerStore.remoteRender();
162
171
  },
163
172
  });
164
173
  const edge_attribute_no_data_color = computed<RGBAColor>({
165
- get: () => dataStyleStore.meshEdgesEdgeAttributeNoDataColor(id),
174
+ get: () => dataStyleStore.meshEdgesEdgeAttributeNoDataColor(dataId),
166
175
  set: async (newValue) => {
167
- await applyBatchStyle(id, (targetId: string) =>
168
- dataStyleStore.setMeshEdgesEdgeAttributeNoDataColor(targetId, newValue),
176
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
177
+ dataStyleStore.setMeshEdgesEdgeAttributeNoDataColor(meshId, newValue),
169
178
  );
170
179
  hybridViewerStore.remoteRender();
171
180
  },
172
181
  });
173
182
 
174
183
  async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
175
- await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
176
- dataStyleStore.setMeshEdgesVertexAttributeRange(targetId, minimum, maximum),
184
+ await applyRangesPerData(ranges, (meshId, minimum, maximum) =>
185
+ dataStyleStore.setMeshEdgesVertexAttributeRange(meshId, minimum, maximum),
177
186
  );
178
187
  hybridViewerStore.remoteRender();
179
188
  }
180
189
 
181
190
  async function setEdgeAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
182
- await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
183
- dataStyleStore.setMeshEdgesEdgeAttributeRange(targetId, minimum, maximum),
191
+ await applyRangesPerData(ranges, (meshId, minimum, maximum) =>
192
+ dataStyleStore.setMeshEdgesEdgeAttributeRange(meshId, minimum, maximum),
184
193
  );
185
194
  hybridViewerStore.remoteRender();
186
195
  }
@@ -188,7 +197,7 @@ async function setEdgeAttributeRangesPerData(ranges: RangesPerData): Promise<voi
188
197
 
189
198
  <template>
190
199
  <ViewerOptionsColoringTypeSelector
191
- :id="id"
200
+ :data-id="dataId"
192
201
  v-model:coloring_style_key="coloring_style_key"
193
202
  v-model:color="color"
194
203
  v-model:opacity="opacity"