@geode/opengeodeweb-front 10.38.0 → 10.39.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 (54) hide show
  1. package/app/components/ThresholdFilter.vue +33 -5
  2. package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +28 -0
  3. package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +28 -0
  4. package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +28 -0
  5. package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +14 -0
  6. package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +28 -0
  7. package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +30 -0
  8. package/app/components/Viewer/Generic/Model/BlocksOptions.vue +53 -0
  9. package/app/components/Viewer/Generic/Model/CornersOptions.vue +24 -0
  10. package/app/components/Viewer/Generic/Model/LinesOptions.vue +48 -0
  11. package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +58 -0
  12. package/app/components/Viewer/Options/AttributeSelector.vue +25 -0
  13. package/app/components/Viewer/Options/ColoringTypeSelector.vue +10 -0
  14. package/app/components/Viewer/Options/ColormapQuickPicker.vue +17 -2
  15. package/app/components/Viewer/Options/TimeStepSlider.vue +120 -0
  16. package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +14 -0
  17. package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +30 -0
  18. package/app/components/Viewer/Surface/PolygonsOptions.vue +28 -0
  19. package/app/composables/global_attribute_style.ts +94 -0
  20. package/app/stores/data_style.ts +3 -0
  21. package/app/utils/attributes.ts +46 -9
  22. package/internal/stores/data_style/mesh/cells/cell.ts +20 -1
  23. package/internal/stores/data_style/mesh/cells/index.ts +4 -2
  24. package/internal/stores/data_style/mesh/cells/vertex.ts +23 -1
  25. package/internal/stores/data_style/mesh/edges/edge.ts +20 -1
  26. package/internal/stores/data_style/mesh/edges/index.ts +4 -2
  27. package/internal/stores/data_style/mesh/edges/vertex.ts +23 -1
  28. package/internal/stores/data_style/mesh/index.ts +68 -0
  29. package/internal/stores/data_style/mesh/points/index.ts +2 -1
  30. package/internal/stores/data_style/mesh/points/vertex.ts +23 -1
  31. package/internal/stores/data_style/mesh/polygons/index.ts +11 -2
  32. package/internal/stores/data_style/mesh/polygons/polygon.ts +23 -1
  33. package/internal/stores/data_style/mesh/polygons/vertex.ts +23 -1
  34. package/internal/stores/data_style/mesh/polyhedra/index.ts +11 -2
  35. package/internal/stores/data_style/mesh/polyhedra/polyhedron.ts +27 -1
  36. package/internal/stores/data_style/mesh/polyhedra/vertex.ts +23 -1
  37. package/internal/stores/data_style/model/blocks/color.ts +11 -2
  38. package/internal/stores/data_style/model/blocks/index.ts +36 -6
  39. package/internal/stores/data_style/model/blocks/polyhedron.ts +61 -7
  40. package/internal/stores/data_style/model/blocks/vertex.ts +61 -7
  41. package/internal/stores/data_style/model/corners/color.ts +5 -1
  42. package/internal/stores/data_style/model/corners/index.ts +18 -3
  43. package/internal/stores/data_style/model/corners/vertex.ts +68 -8
  44. package/internal/stores/data_style/model/lines/color.ts +10 -2
  45. package/internal/stores/data_style/model/lines/edge.ts +58 -7
  46. package/internal/stores/data_style/model/lines/index.ts +35 -6
  47. package/internal/stores/data_style/model/lines/vertex.ts +58 -7
  48. package/internal/stores/data_style/model/surfaces/color.ts +10 -2
  49. package/internal/stores/data_style/model/surfaces/index.ts +53 -6
  50. package/internal/stores/data_style/model/surfaces/polygon.ts +76 -15
  51. package/internal/stores/data_style/model/surfaces/vertex.ts +70 -12
  52. package/internal/stores/data_style/time_step.ts +75 -0
  53. package/internal/stores/data_style/types.ts +1 -0
  54. package/package.json +1 -1
@@ -1,7 +1,9 @@
1
1
  <script setup lang="ts">
2
2
  import {
3
3
  MESH_ELEMENT_KINDS,
4
+ MODEL_COMPONENT_ATTRIBUTE_SCHEMAS,
4
5
  MODEL_COMPONENT_KINDS,
6
+ attributeArrayName,
5
7
  getAttributeRange,
6
8
  } from "@ogw_front/utils/attributes";
7
9
  import type { JsonRpcSchema } from "@ogw_shared/utils/types.js";
@@ -10,6 +12,7 @@ import ViewerOptionsAttributeRangeSelector from "@ogw_front/components/Viewer/Op
10
12
  import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
11
13
  import { useBackStore } from "@ogw_front/stores/back";
12
14
  import { useDataStore } from "@ogw_front/stores/data";
15
+ import { useDataStyleStore } from "@ogw_front/stores/data_style";
13
16
  import { useDebounceFn } from "@vueuse/core";
14
17
  import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
15
18
 
@@ -24,6 +27,7 @@ const { escapeFunction = undefined } = defineProps<Props>();
24
27
  interface AttributeSource {
25
28
  title: string;
26
29
  schema: JsonRpcSchema;
30
+ timeStepKey: string;
27
31
  params: Record<string, unknown>;
28
32
  location: "point" | "cell";
29
33
  }
@@ -31,12 +35,14 @@ interface AttributeSource {
31
35
  interface AttributeInfo {
32
36
  attribute_name: string;
33
37
  nb_items: number;
38
+ time_steps?: number[];
34
39
  [key: string]: unknown;
35
40
  }
36
41
 
37
42
  const show = defineModel<boolean>("show", { default: false });
38
43
  const backStore = useBackStore();
39
44
  const dataStore = useDataStore();
45
+ const dataStyleStore = useDataStyleStore();
40
46
  const hybridViewerStore = useHybridViewerStore();
41
47
  const selectedDatasetId = ref<string>();
42
48
  const sources = ref<AttributeSource[]>([]);
@@ -60,6 +66,19 @@ const availableSources = computed<{ title: string; value: number }[]>(() =>
60
66
  const currentAttribute = computed<AttributeInfo | undefined>(() =>
61
67
  attributes.value.find((attribute) => attribute.attribute_name === attributeName.value),
62
68
  );
69
+ const currentTimeStep = computed<number | undefined>(() => {
70
+ const source = sources.value[selectedSourceIndex.value ?? -1];
71
+ if (!selectedDatasetId.value || !source || !currentAttribute.value?.time_steps?.length) {
72
+ return undefined;
73
+ }
74
+ const step =
75
+ dataStyleStore.attributeTimeStep(
76
+ selectedDatasetId.value,
77
+ source.timeStepKey,
78
+ attributeName.value,
79
+ ) ?? 0;
80
+ return Math.min(step, currentAttribute.value.time_steps.length - 1);
81
+ });
63
82
  const itemOptions = computed<{ title: string; value: number }[]>(() =>
64
83
  Array.from({ length: currentAttribute.value?.nb_items ?? 0 }, (_, index) => ({
65
84
  title: `Item ${index + 1}`,
@@ -78,11 +97,16 @@ function attributeSource(
78
97
  kind: string,
79
98
  title: string,
80
99
  params: Record<string, unknown>,
81
- isModel: boolean,
100
+ modelType?: string,
82
101
  ): AttributeSource {
102
+ const schema = attributeSchema(kind, modelType !== undefined);
83
103
  return {
84
104
  title: `${title}${kind} attribute`,
85
- schema: attributeSchema(kind, isModel),
105
+ schema,
106
+ timeStepKey:
107
+ modelType === undefined
108
+ ? schema.$id
109
+ : (MODEL_COMPONENT_ATTRIBUTE_SCHEMAS[modelType]?.[kind]?.$id ?? schema.$id),
86
110
  params,
87
111
  location: kind === "vertex" ? "point" : "cell",
88
112
  };
@@ -93,7 +117,7 @@ async function fetchSources(id: string): Promise<AttributeSource[]> {
93
117
  if (item.viewer_type !== "model") {
94
118
  return ["vertex", MESH_ELEMENT_KINDS[item.geode_object_type]]
95
119
  .filter((kind): kind is string => kind !== undefined)
96
- .map((kind) => attributeSource(kind, "", { id }, false));
120
+ .map((kind) => attributeSource(kind, "", { id }));
97
121
  }
98
122
  const modelSources = await Promise.all(
99
123
  Object.entries(MODEL_COMPONENT_KINDS).map(async ([type, kinds]) => {
@@ -101,7 +125,7 @@ async function fetchSources(id: string): Promise<AttributeSource[]> {
101
125
  if (component_ids.length === 0) {
102
126
  return [];
103
127
  }
104
- return kinds.map((kind) => attributeSource(kind, `${type} `, { id, component_ids }, true));
128
+ return kinds.map((kind) => attributeSource(kind, `${type} `, { id, component_ids }, type));
105
129
  }),
106
130
  );
107
131
  return modelSources.flat();
@@ -120,7 +144,7 @@ async function applyThreshold(): Promise<void> {
120
144
  return;
121
145
  }
122
146
  await hybridViewerStore.setThreshold([selectedDatasetId.value], {
123
- name: attributeName.value,
147
+ name: attributeArrayName(attributeName.value, currentTimeStep.value),
124
148
  location: source.location,
125
149
  item: attributeItem.value,
126
150
  minimum: minimum.value,
@@ -177,6 +201,10 @@ watch(attributeItem, () => {
177
201
  resetRange();
178
202
  });
179
203
 
204
+ watch(currentTimeStep, () => {
205
+ debouncedApply();
206
+ });
207
+
180
208
  watch([minimum, maximum], () => {
181
209
  debouncedApply();
182
210
  });
@@ -78,6 +78,19 @@ const vertex_attribute_name = computed<string | undefined>({
78
78
  hybridViewerStore.remoteRender();
79
79
  },
80
80
  });
81
+
82
+ const vertex_attribute_time_step = computed<number | undefined>({
83
+ get: () => dataStyleStore.meshEdgesVertexAttributeTimeStep(id.value),
84
+ set: async (newValue) => {
85
+ if (newValue === undefined) {
86
+ return;
87
+ }
88
+ await applyBatchStyle(id.value, (targetId: string) =>
89
+ Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeTimeStep(targetId, newValue)),
90
+ );
91
+ hybridViewerStore.remoteRender();
92
+ },
93
+ });
81
94
  const vertex_attribute_item = computed<string | undefined>({
82
95
  get: () => dataStyleStore.meshEdgesVertexAttributeItem(id.value),
83
96
  set: async (newValue) => {
@@ -130,6 +143,19 @@ const edge_attribute_name = computed<string | undefined>({
130
143
  hybridViewerStore.remoteRender();
131
144
  },
132
145
  });
146
+
147
+ const edge_attribute_time_step = computed<number | undefined>({
148
+ get: () => dataStyleStore.meshEdgesEdgeAttributeTimeStep(id.value),
149
+ set: async (newValue) => {
150
+ if (newValue === undefined) {
151
+ return;
152
+ }
153
+ await applyBatchStyle(id.value, (targetId: string) =>
154
+ Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeTimeStep(targetId, newValue)),
155
+ );
156
+ hybridViewerStore.remoteRender();
157
+ },
158
+ });
133
159
  const edge_attribute_item = computed<string | undefined>({
134
160
  get: () => dataStyleStore.meshEdgesEdgeAttributeItem(id.value),
135
161
  set: async (newValue) => {
@@ -209,12 +235,14 @@ async function setEdgeAttributeRangesPerData(ranges: RangesPerData): Promise<voi
209
235
  @vertex_attribute_ranges_per_data="setVertexAttributeRangesPerData"
210
236
  v-model:vertex_attribute_color_map="vertex_attribute_color_map"
211
237
  v-model:vertex_attribute_no_data_color="vertex_attribute_no_data_color"
238
+ v-model:vertex_attribute_time_step="vertex_attribute_time_step"
212
239
  v-model:edge_attribute_name="edge_attribute_name"
213
240
  v-model:edge_attribute_item="edge_attribute_item"
214
241
  v-model:edge_attribute_range="edge_attribute_range"
215
242
  @edge_attribute_ranges_per_data="setEdgeAttributeRangesPerData"
216
243
  v-model:edge_attribute_color_map="edge_attribute_color_map"
217
244
  v-model:edge_attribute_no_data_color="edge_attribute_no_data_color"
245
+ v-model:edge_attribute_time_step="edge_attribute_time_step"
218
246
  />
219
247
  </template>
220
248
  </template>
@@ -87,6 +87,19 @@ const vertex_attribute_name = computed<string | undefined>({
87
87
  hybridViewerStore.remoteRender();
88
88
  },
89
89
  });
90
+
91
+ const vertex_attribute_time_step = computed<number | undefined>({
92
+ get: () => dataStyleStore.meshCellsVertexAttributeTimeStep(id.value),
93
+ set: async (newValue) => {
94
+ if (newValue === undefined) {
95
+ return;
96
+ }
97
+ await applyBatchStyle(id.value, (targetId: string) =>
98
+ Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeTimeStep(targetId, newValue)),
99
+ );
100
+ hybridViewerStore.remoteRender();
101
+ },
102
+ });
90
103
  const vertex_attribute_item = computed<string | undefined>({
91
104
  get: () => dataStyleStore.meshCellsVertexAttributeItem(id.value),
92
105
  set: async (newValue) => {
@@ -139,6 +152,19 @@ const cell_attribute_name = computed<string | undefined>({
139
152
  hybridViewerStore.remoteRender();
140
153
  },
141
154
  });
155
+
156
+ const cell_attribute_time_step = computed<number | undefined>({
157
+ get: () => dataStyleStore.meshCellsCellAttributeTimeStep(id.value),
158
+ set: async (newValue) => {
159
+ if (newValue === undefined) {
160
+ return;
161
+ }
162
+ await applyBatchStyle(id.value, (targetId: string) =>
163
+ Promise.resolve(dataStyleStore.setMeshCellsCellAttributeTimeStep(targetId, newValue)),
164
+ );
165
+ hybridViewerStore.remoteRender();
166
+ },
167
+ });
142
168
  const cell_attribute_item = computed<string | undefined>({
143
169
  get: () => dataStyleStore.meshCellsCellAttributeItem(id.value),
144
170
  set: async (newValue) => {
@@ -218,12 +244,14 @@ async function setCellAttributeRangesPerData(ranges: RangesPerData): Promise<voi
218
244
  @vertex_attribute_ranges_per_data="setVertexAttributeRangesPerData"
219
245
  v-model:vertex_attribute_color_map="vertex_attribute_color_map"
220
246
  v-model:vertex_attribute_no_data_color="vertex_attribute_no_data_color"
247
+ v-model:vertex_attribute_time_step="vertex_attribute_time_step"
221
248
  v-model:cell_attribute_name="cell_attribute_name"
222
249
  v-model:cell_attribute_item="cell_attribute_item"
223
250
  v-model:cell_attribute_range="cell_attribute_range"
224
251
  @cell_attribute_ranges_per_data="setCellAttributeRangesPerData"
225
252
  v-model:cell_attribute_color_map="cell_attribute_color_map"
226
253
  v-model:cell_attribute_no_data_color="cell_attribute_no_data_color"
254
+ v-model:cell_attribute_time_step="cell_attribute_time_step"
227
255
  />
228
256
  </template>
229
257
  </template>
@@ -79,6 +79,19 @@ const vertex_attribute_name = computed<string | undefined>({
79
79
  hybridViewerStore.remoteRender();
80
80
  },
81
81
  });
82
+
83
+ const vertex_attribute_time_step = computed<number | undefined>({
84
+ get: () => dataStyleStore.meshEdgesVertexAttributeTimeStep(id.value),
85
+ set: async (newValue) => {
86
+ if (newValue === undefined) {
87
+ return;
88
+ }
89
+ await applyBatchStyle(id.value, (targetId: string) =>
90
+ Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeTimeStep(targetId, newValue)),
91
+ );
92
+ hybridViewerStore.remoteRender();
93
+ },
94
+ });
82
95
  const vertex_attribute_item = computed<string | undefined>({
83
96
  get: () => dataStyleStore.meshEdgesVertexAttributeItem(id.value),
84
97
  set: async (newValue) => {
@@ -131,6 +144,19 @@ const edge_attribute_name = computed<string | undefined>({
131
144
  hybridViewerStore.remoteRender();
132
145
  },
133
146
  });
147
+
148
+ const edge_attribute_time_step = computed<number | undefined>({
149
+ get: () => dataStyleStore.meshEdgesEdgeAttributeTimeStep(id.value),
150
+ set: async (newValue) => {
151
+ if (newValue === undefined) {
152
+ return;
153
+ }
154
+ await applyBatchStyle(id.value, (targetId: string) =>
155
+ Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeTimeStep(targetId, newValue)),
156
+ );
157
+ hybridViewerStore.remoteRender();
158
+ },
159
+ });
134
160
  const edge_attribute_item = computed<string | undefined>({
135
161
  get: () => dataStyleStore.meshEdgesEdgeAttributeItem(id.value),
136
162
  set: async (newValue) => {
@@ -217,12 +243,14 @@ async function setEdgeAttributeRangesPerData(ranges: RangesPerData): Promise<voi
217
243
  @vertex_attribute_ranges_per_data="setVertexAttributeRangesPerData"
218
244
  v-model:vertex_attribute_color_map="vertex_attribute_color_map"
219
245
  v-model:vertex_attribute_no_data_color="vertex_attribute_no_data_color"
246
+ v-model:vertex_attribute_time_step="vertex_attribute_time_step"
220
247
  v-model:edge_attribute_name="edge_attribute_name"
221
248
  v-model:edge_attribute_item="edge_attribute_item"
222
249
  v-model:edge_attribute_range="edge_attribute_range"
223
250
  @edge_attribute_ranges_per_data="setEdgeAttributeRangesPerData"
224
251
  v-model:edge_attribute_color_map="edge_attribute_color_map"
225
252
  v-model:edge_attribute_no_data_color="edge_attribute_no_data_color"
253
+ v-model:edge_attribute_time_step="edge_attribute_time_step"
226
254
  />
227
255
  </template>
228
256
  </template>
@@ -79,6 +79,19 @@ const vertex_attribute_name = computed<string | undefined>({
79
79
  hybridViewerStore.remoteRender();
80
80
  },
81
81
  });
82
+
83
+ const vertex_attribute_time_step = computed<number | undefined>({
84
+ get: () => dataStyleStore.meshPointsVertexAttributeTimeStep(id.value),
85
+ set: async (newValue) => {
86
+ if (newValue === undefined) {
87
+ return;
88
+ }
89
+ await applyBatchStyle(id.value, (targetId: string) =>
90
+ Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeTimeStep(targetId, newValue)),
91
+ );
92
+ hybridViewerStore.remoteRender();
93
+ },
94
+ });
82
95
  const vertex_attribute_item = computed<string | undefined>({
83
96
  get: () => dataStyleStore.meshPointsVertexAttributeItem(id.value),
84
97
  set: async (newValue) => {
@@ -158,6 +171,7 @@ async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<v
158
171
  @vertex_attribute_ranges_per_data="setVertexAttributeRangesPerData"
159
172
  v-model:vertex_attribute_color_map="vertex_attribute_color_map"
160
173
  v-model:vertex_attribute_no_data_color="vertex_attribute_no_data_color"
174
+ v-model:vertex_attribute_time_step="vertex_attribute_time_step"
161
175
  :capabilities="{ vertex: { available: false } }"
162
176
  />
163
177
  </template>
@@ -98,6 +98,19 @@ const vertex_attribute_name = computed<string | undefined>({
98
98
  hybridViewerStore.remoteRender();
99
99
  },
100
100
  });
101
+
102
+ const vertex_attribute_time_step = computed<number | undefined>({
103
+ get: () => dataStyleStore.meshPolygonsVertexAttributeTimeStep(id.value),
104
+ set: async (newValue) => {
105
+ if (newValue === undefined) {
106
+ return;
107
+ }
108
+ await applyBatchStyle(id.value, (targetId: string) =>
109
+ Promise.resolve(dataStyleStore.setMeshPolygonsVertexAttributeTimeStep(targetId, newValue)),
110
+ );
111
+ hybridViewerStore.remoteRender();
112
+ },
113
+ });
101
114
  const vertex_attribute_item = computed<string | undefined>({
102
115
  get: () => dataStyleStore.meshPolygonsVertexAttributeItem(id.value),
103
116
  set: async (newValue) => {
@@ -152,6 +165,19 @@ const polygon_attribute_name = computed<string | undefined>({
152
165
  hybridViewerStore.remoteRender();
153
166
  },
154
167
  });
168
+
169
+ const polygon_attribute_time_step = computed<number | undefined>({
170
+ get: () => dataStyleStore.meshPolygonsPolygonAttributeTimeStep(id.value),
171
+ set: async (newValue) => {
172
+ if (newValue === undefined) {
173
+ return;
174
+ }
175
+ await applyBatchStyle(id.value, (targetId: string) =>
176
+ Promise.resolve(dataStyleStore.setMeshPolygonsPolygonAttributeTimeStep(targetId, newValue)),
177
+ );
178
+ hybridViewerStore.remoteRender();
179
+ },
180
+ });
155
181
  const polygon_attribute_item = computed<string | undefined>({
156
182
  get: () => dataStyleStore.meshPolygonsPolygonAttributeItem(id.value),
157
183
  set: async (newValue) => {
@@ -236,12 +262,14 @@ async function setPolygonAttributeRangesPerData(ranges: RangesPerData): Promise<
236
262
  @vertex_attribute_ranges_per_data="setVertexAttributeRangesPerData"
237
263
  v-model:vertex_attribute_color_map="vertex_attribute_color_map"
238
264
  v-model:vertex_attribute_no_data_color="vertex_attribute_no_data_color"
265
+ v-model:vertex_attribute_time_step="vertex_attribute_time_step"
239
266
  v-model:polygon_attribute_name="polygon_attribute_name"
240
267
  v-model:polygon_attribute_item="polygon_attribute_item"
241
268
  v-model:polygon_attribute_range="polygon_attribute_range"
242
269
  @polygon_attribute_ranges_per_data="setPolygonAttributeRangesPerData"
243
270
  v-model:polygon_attribute_color_map="polygon_attribute_color_map"
244
271
  v-model:polygon_attribute_no_data_color="polygon_attribute_no_data_color"
272
+ v-model:polygon_attribute_time_step="polygon_attribute_time_step"
245
273
  :capabilities="capabilities"
246
274
  />
247
275
  </template>
@@ -69,6 +69,19 @@ const vertex_attribute_name = computed<string | undefined>({
69
69
  hybridViewerStore.remoteRender();
70
70
  },
71
71
  });
72
+
73
+ const vertex_attribute_time_step = computed<number | undefined>({
74
+ get: () => dataStyleStore.meshPolyhedraVertexAttributeTimeStep(id.value),
75
+ set: async (newValue) => {
76
+ if (newValue === undefined) {
77
+ return;
78
+ }
79
+ await applyBatchStyle(id.value, (targetId: string) =>
80
+ Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeTimeStep(targetId, newValue)),
81
+ );
82
+ hybridViewerStore.remoteRender();
83
+ },
84
+ });
72
85
  const vertex_attribute_item = computed<string | undefined>({
73
86
  get: () => dataStyleStore.meshPolyhedraVertexAttributeItem(id.value),
74
87
  set: async (newValue) => {
@@ -123,6 +136,21 @@ const polyhedron_attribute_name = computed<string | undefined>({
123
136
  hybridViewerStore.remoteRender();
124
137
  },
125
138
  });
139
+
140
+ const polyhedron_attribute_time_step = computed<number | undefined>({
141
+ get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeTimeStep(id.value),
142
+ set: async (newValue) => {
143
+ if (newValue === undefined) {
144
+ return;
145
+ }
146
+ await applyBatchStyle(id.value, (targetId: string) =>
147
+ Promise.resolve(
148
+ dataStyleStore.setMeshPolyhedraPolyhedronAttributeTimeStep(targetId, newValue),
149
+ ),
150
+ );
151
+ hybridViewerStore.remoteRender();
152
+ },
153
+ });
126
154
  const polyhedron_attribute_item = computed<string | undefined>({
127
155
  get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeItem(id.value),
128
156
  set: async (newValue) => {
@@ -208,12 +236,14 @@ async function setPolyhedronAttributeRangesPerData(ranges: RangesPerData): Promi
208
236
  @vertex_attribute_ranges_per_data="setVertexAttributeRangesPerData"
209
237
  v-model:vertex_attribute_color_map="vertex_attribute_color_map"
210
238
  v-model:vertex_attribute_no_data_color="vertex_attribute_no_data_color"
239
+ v-model:vertex_attribute_time_step="vertex_attribute_time_step"
211
240
  v-model:polyhedron_attribute_name="polyhedron_attribute_name"
212
241
  v-model:polyhedron_attribute_item="polyhedron_attribute_item"
213
242
  v-model:polyhedron_attribute_range="polyhedron_attribute_range"
214
243
  @polyhedron_attribute_ranges_per_data="setPolyhedronAttributeRangesPerData"
215
244
  v-model:polyhedron_attribute_color_map="polyhedron_attribute_color_map"
216
245
  v-model:polyhedron_attribute_no_data_color="polyhedron_attribute_no_data_color"
246
+ v-model:polyhedron_attribute_time_step="polyhedron_attribute_time_step"
217
247
  :capabilities="{
218
248
  vertex: { available: true, hasColorMap: true },
219
249
  polyhedron: { available: true, hasColorMap: true },
@@ -1,4 +1,5 @@
1
1
  <script setup lang="ts">
2
+ // oxlint-disable eslint/max-lines
2
3
  import type { CollectionComponent } from "@ogw_front/stores/data_helpers/collections";
3
4
  import OptionsSection from "@ogw_front/components/Viewer/Options/OptionsSection.vue";
4
5
  import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
@@ -121,6 +122,17 @@ const blocksVertexAttributeName = computed<string | undefined>({
121
122
  },
122
123
  });
123
124
 
125
+ const blocksVertexAttributeTimeStep = computed<number | undefined>({
126
+ get: () => dataStyleStore.modelBlocksVertexAttributeTimeStep(modelId, referenceBlockId.value),
127
+ set: async (newValue) => {
128
+ if (newValue === undefined) {
129
+ return;
130
+ }
131
+ await dataStyleStore.setModelBlocksVertexAttributeTimeStep(modelId, targetBlockIds, newValue);
132
+ hybridViewerStore.remoteRender();
133
+ },
134
+ });
135
+
124
136
  const blocksVertexAttributeItem = computed<string | undefined>({
125
137
  get: () => dataStyleStore.modelBlocksVertexAttributeItem(modelId, referenceBlockId.value),
126
138
  set: async (newValue) => {
@@ -177,6 +189,21 @@ const blocksPolyhedronAttributeName = computed<string | undefined>({
177
189
  },
178
190
  });
179
191
 
192
+ const blocksPolyhedronAttributeTimeStep = computed<number | undefined>({
193
+ get: () => dataStyleStore.modelBlocksPolyhedronAttributeTimeStep(modelId, referenceBlockId.value),
194
+ set: async (newValue) => {
195
+ if (newValue === undefined) {
196
+ return;
197
+ }
198
+ await dataStyleStore.setModelBlocksPolyhedronAttributeTimeStep(
199
+ modelId,
200
+ targetBlockIds,
201
+ newValue,
202
+ );
203
+ hybridViewerStore.remoteRender();
204
+ },
205
+ });
206
+
180
207
  const blocksPolyhedronAttributeItem = computed<string | undefined>({
181
208
  get: () => dataStyleStore.modelBlocksPolyhedronAttributeItem(modelId, referenceBlockId.value),
182
209
  set: async (newValue) => {
@@ -239,6 +266,17 @@ const vertexAttributeName = computed<string | undefined>({
239
266
  },
240
267
  });
241
268
 
269
+ const vertexAttributeTimeStep = computed<number | undefined>({
270
+ get: () => dataStyleStore.modelBlocksVertexAttributeTimeStep(modelId, blockId),
271
+ set: async (newValue) => {
272
+ if (blockId === undefined || newValue === undefined) {
273
+ return;
274
+ }
275
+ await dataStyleStore.setModelBlocksVertexAttributeTimeStep(modelId, [blockId], newValue);
276
+ hybridViewerStore.remoteRender();
277
+ },
278
+ });
279
+
242
280
  const vertexAttributeItem = computed<string | undefined>({
243
281
  get: () => dataStyleStore.modelBlocksVertexAttributeItem(modelId, blockId),
244
282
  set: async (newValue) => {
@@ -295,6 +333,17 @@ const polyhedronAttributeName = computed<string | undefined>({
295
333
  },
296
334
  });
297
335
 
336
+ const polyhedronAttributeTimeStep = computed<number | undefined>({
337
+ get: () => dataStyleStore.modelBlocksPolyhedronAttributeTimeStep(modelId, blockId),
338
+ set: async (newValue) => {
339
+ if (blockId === undefined || newValue === undefined) {
340
+ return;
341
+ }
342
+ await dataStyleStore.setModelBlocksPolyhedronAttributeTimeStep(modelId, [blockId], newValue);
343
+ hybridViewerStore.remoteRender();
344
+ },
345
+ });
346
+
298
347
  const polyhedronAttributeItem = computed<string | undefined>({
299
348
  get: () => dataStyleStore.modelBlocksPolyhedronAttributeItem(modelId, blockId),
300
349
  set: async (newValue) => {
@@ -372,11 +421,13 @@ const polyhedronSchema = back_schemas.opengeodeweb_back.model_component_polyhedr
372
421
  v-model:vertex_attribute_range="blocksVertexAttributeRange"
373
422
  v-model:vertex_attribute_color_map="blocksVertexAttributeColorMap"
374
423
  v-model:vertex_attribute_no_data_color="blocksVertexAttributeNoDataColor"
424
+ v-model:vertex_attribute_time_step="blocksVertexAttributeTimeStep"
375
425
  v-model:polyhedron_attribute_name="blocksPolyhedronAttributeName"
376
426
  v-model:polyhedron_attribute_item="blocksPolyhedronAttributeItem"
377
427
  v-model:polyhedron_attribute_range="blocksPolyhedronAttributeRange"
378
428
  v-model:polyhedron_attribute_color_map="blocksPolyhedronAttributeColorMap"
379
429
  v-model:polyhedron_attribute_no_data_color="blocksPolyhedronAttributeNoDataColor"
430
+ v-model:polyhedron_attribute_time_step="blocksPolyhedronAttributeTimeStep"
380
431
  :capabilities="capabilities"
381
432
  :schemas="{ vertex: vertexSchema, polyhedron: polyhedronSchema }"
382
433
  :allowRandom="true"
@@ -400,11 +451,13 @@ const polyhedronSchema = back_schemas.opengeodeweb_back.model_component_polyhedr
400
451
  v-model:vertex_attribute_range="vertexAttributeRange"
401
452
  v-model:vertex_attribute_color_map="vertexAttributeColorMap"
402
453
  v-model:vertex_attribute_no_data_color="vertexAttributeNoDataColor"
454
+ v-model:vertex_attribute_time_step="vertexAttributeTimeStep"
403
455
  v-model:polyhedron_attribute_name="polyhedronAttributeName"
404
456
  v-model:polyhedron_attribute_item="polyhedronAttributeItem"
405
457
  v-model:polyhedron_attribute_range="polyhedronAttributeRange"
406
458
  v-model:polyhedron_attribute_color_map="polyhedronAttributeColorMap"
407
459
  v-model:polyhedron_attribute_no_data_color="polyhedronAttributeNoDataColor"
460
+ v-model:polyhedron_attribute_time_step="polyhedronAttributeTimeStep"
408
461
  :capabilities="capabilities"
409
462
  :schemas="{ vertex: vertexSchema, polyhedron: polyhedronSchema }"
410
463
  :allowRandom="true"
@@ -123,6 +123,17 @@ const cornersVertexAttributeName = computed<string | undefined>({
123
123
  },
124
124
  });
125
125
 
126
+ const cornersVertexAttributeTimeStep = computed<number | undefined>({
127
+ get: () => dataStyleStore.modelCornersVertexAttributeTimeStep(modelId, referenceCornerId.value),
128
+ set: async (newValue) => {
129
+ if (newValue === undefined) {
130
+ return;
131
+ }
132
+ await dataStyleStore.setModelCornersVertexAttributeTimeStep(modelId, targetCornerIds, newValue);
133
+ hybridViewerStore.remoteRender();
134
+ },
135
+ });
136
+
126
137
  const cornersVertexAttributeItem = computed<string | undefined>({
127
138
  get: () => dataStyleStore.modelCornersVertexAttributeItem(modelId, referenceCornerId.value),
128
139
  set: async (newValue) => {
@@ -181,6 +192,17 @@ const vertexAttributeName = computed<string | undefined>({
181
192
  },
182
193
  });
183
194
 
195
+ const vertexAttributeTimeStep = computed<number | undefined>({
196
+ get: () => dataStyleStore.modelCornersVertexAttributeTimeStep(modelId, cornerId),
197
+ set: async (newValue) => {
198
+ if (cornerId === undefined || newValue === undefined) {
199
+ return;
200
+ }
201
+ await dataStyleStore.setModelCornersVertexAttributeTimeStep(modelId, [cornerId], newValue);
202
+ hybridViewerStore.remoteRender();
203
+ },
204
+ });
205
+
184
206
  const vertexAttributeItem = computed<string | undefined>({
185
207
  get: () => dataStyleStore.modelCornersVertexAttributeItem(modelId, cornerId),
186
208
  set: async (newValue) => {
@@ -252,6 +274,7 @@ const vertexSchema = back_schemas.opengeodeweb_back.model_component_vertex_attri
252
274
  v-model:vertex_attribute_range="cornersVertexAttributeRange"
253
275
  v-model:vertex_attribute_color_map="cornersVertexAttributeColorMap"
254
276
  v-model:vertex_attribute_no_data_color="cornersVertexAttributeNoDataColor"
277
+ v-model:vertex_attribute_time_step="cornersVertexAttributeTimeStep"
255
278
  :capabilities="capabilities"
256
279
  :schemas="{ vertex: vertexSchema }"
257
280
  :allowRandom="true"
@@ -275,6 +298,7 @@ const vertexSchema = back_schemas.opengeodeweb_back.model_component_vertex_attri
275
298
  v-model:vertex_attribute_range="vertexAttributeRange"
276
299
  v-model:vertex_attribute_color_map="vertexAttributeColorMap"
277
300
  v-model:vertex_attribute_no_data_color="vertexAttributeNoDataColor"
301
+ v-model:vertex_attribute_time_step="vertexAttributeTimeStep"
278
302
  :capabilities="capabilities"
279
303
  :schemas="{ vertex: vertexSchema }"
280
304
  :allowRandom="true"
@@ -120,6 +120,17 @@ const linesVertexAttributeName = computed<string | undefined>({
120
120
  },
121
121
  });
122
122
 
123
+ const linesVertexAttributeTimeStep = computed<number | undefined>({
124
+ get: () => dataStyleStore.modelLinesVertexAttributeTimeStep(modelId, referenceLineId.value),
125
+ set: async (newValue) => {
126
+ if (newValue === undefined) {
127
+ return;
128
+ }
129
+ await dataStyleStore.setModelLinesVertexAttributeTimeStep(modelId, targetLineIds, newValue);
130
+ hybridViewerStore.remoteRender();
131
+ },
132
+ });
133
+
123
134
  const linesVertexAttributeItem = computed<string | undefined>({
124
135
  get: () => dataStyleStore.modelLinesVertexAttributeItem(modelId, referenceLineId.value),
125
136
  set: async (newValue) => {
@@ -172,6 +183,17 @@ const linesEdgeAttributeName = computed<string | undefined>({
172
183
  },
173
184
  });
174
185
 
186
+ const linesEdgeAttributeTimeStep = computed<number | undefined>({
187
+ get: () => dataStyleStore.modelLinesEdgeAttributeTimeStep(modelId, referenceLineId.value),
188
+ set: async (newValue) => {
189
+ if (newValue === undefined) {
190
+ return;
191
+ }
192
+ await dataStyleStore.setModelLinesEdgeAttributeTimeStep(modelId, targetLineIds, newValue);
193
+ hybridViewerStore.remoteRender();
194
+ },
195
+ });
196
+
175
197
  const linesEdgeAttributeItem = computed<string | undefined>({
176
198
  get: () => dataStyleStore.modelLinesEdgeAttributeItem(modelId, referenceLineId.value),
177
199
  set: async (newValue) => {
@@ -220,6 +242,17 @@ const vertexAttributeName = computed<string | undefined>({
220
242
  },
221
243
  });
222
244
 
245
+ const vertexAttributeTimeStep = computed<number | undefined>({
246
+ get: () => dataStyleStore.modelLinesVertexAttributeTimeStep(modelId, lineId),
247
+ set: async (newValue) => {
248
+ if (lineId === undefined || newValue === undefined) {
249
+ return;
250
+ }
251
+ await dataStyleStore.setModelLinesVertexAttributeTimeStep(modelId, [lineId], newValue);
252
+ hybridViewerStore.remoteRender();
253
+ },
254
+ });
255
+
223
256
  const vertexAttributeItem = computed<string | undefined>({
224
257
  get: () => dataStyleStore.modelLinesVertexAttributeItem(modelId, lineId),
225
258
  set: async (newValue) => {
@@ -276,6 +309,17 @@ const edgeAttributeName = computed<string | undefined>({
276
309
  },
277
310
  });
278
311
 
312
+ const edgeAttributeTimeStep = computed<number | undefined>({
313
+ get: () => dataStyleStore.modelLinesEdgeAttributeTimeStep(modelId, lineId),
314
+ set: async (newValue) => {
315
+ if (lineId === undefined || newValue === undefined) {
316
+ return;
317
+ }
318
+ await dataStyleStore.setModelLinesEdgeAttributeTimeStep(modelId, [lineId], newValue);
319
+ hybridViewerStore.remoteRender();
320
+ },
321
+ });
322
+
279
323
  const edgeAttributeItem = computed<string | undefined>({
280
324
  get: () => dataStyleStore.modelLinesEdgeAttributeItem(modelId, lineId),
281
325
  set: async (newValue) => {
@@ -348,11 +392,13 @@ const edgeSchema = back_schemas.opengeodeweb_back.model_component_edge_attribute
348
392
  v-model:vertex_attribute_range="linesVertexAttributeRange"
349
393
  v-model:vertex_attribute_color_map="linesVertexAttributeColorMap"
350
394
  v-model:vertex_attribute_no_data_color="linesVertexAttributeNoDataColor"
395
+ v-model:vertex_attribute_time_step="linesVertexAttributeTimeStep"
351
396
  v-model:edge_attribute_name="linesEdgeAttributeName"
352
397
  v-model:edge_attribute_item="linesEdgeAttributeItem"
353
398
  v-model:edge_attribute_range="linesEdgeAttributeRange"
354
399
  v-model:edge_attribute_color_map="linesEdgeAttributeColorMap"
355
400
  v-model:edge_attribute_no_data_color="linesEdgeAttributeNoDataColor"
401
+ v-model:edge_attribute_time_step="linesEdgeAttributeTimeStep"
356
402
  :capabilities="capabilities"
357
403
  :schemas="{ vertex: vertexSchema, edge: edgeSchema }"
358
404
  :allowRandom="true"
@@ -376,11 +422,13 @@ const edgeSchema = back_schemas.opengeodeweb_back.model_component_edge_attribute
376
422
  v-model:vertex_attribute_range="vertexAttributeRange"
377
423
  v-model:vertex_attribute_color_map="vertexAttributeColorMap"
378
424
  v-model:vertex_attribute_no_data_color="vertexAttributeNoDataColor"
425
+ v-model:vertex_attribute_time_step="vertexAttributeTimeStep"
379
426
  v-model:edge_attribute_name="edgeAttributeName"
380
427
  v-model:edge_attribute_item="edgeAttributeItem"
381
428
  v-model:edge_attribute_range="edgeAttributeRange"
382
429
  v-model:edge_attribute_color_map="edgeAttributeColorMap"
383
430
  v-model:edge_attribute_no_data_color="edgeAttributeNoDataColor"
431
+ v-model:edge_attribute_time_step="edgeAttributeTimeStep"
384
432
  :capabilities="capabilities"
385
433
  :schemas="{ vertex: vertexSchema, edge: edgeSchema }"
386
434
  :allowRandom="true"