@geode/opengeodeweb-front 10.44.0 → 10.44.1-rc.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 +4 -4
  218. package/shared/utils/fetch_raw.ts +7 -8
@@ -2,6 +2,7 @@
2
2
  import { formatCrs, formatCrsCode } from "@ogw_front/utils/crs";
3
3
  import ComponentRelations from "@ogw_front/components/Viewer/ObjectTree/Base/ComponentRelations.vue";
4
4
  import type { DisplayItem } from "@ogw_front/composables/virtual_tree";
5
+ import type { GeodeIdentified } from "@ogw_front/types/identifiers";
5
6
  import { middleTruncate } from "@ogw_front/utils/string";
6
7
  import { useClipboard } from "@vueuse/core";
7
8
  import { useCrsStore } from "@ogw_front/stores/crs";
@@ -33,9 +34,8 @@ const labelContainer = useTemplateRef("label-container");
33
34
  const { width: containerWidth } = useElementSize(labelContainer);
34
35
 
35
36
  // The item prop can be either a DisplayItem wrapper (with a `.raw` domain object) or the domain object itself when this component is used outside CommonTreeView's slot machinery; the domain object always carries an id/title at runtime.
36
- interface LabeledItem {
37
+ interface LabeledItem extends Partial<GeodeIdentified> {
37
38
  id: string;
38
- geode_id?: string;
39
39
  title?: string;
40
40
  is_active?: boolean;
41
41
  category?: string;
@@ -1,5 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  // oxlint-disable max-dependencies
3
+ import type { GeodeObjectTyped, ViewerTyped } from "@ogw_front/types/identifiers";
3
4
  import {
4
5
  type MapStyle,
5
6
  basemapGroup,
@@ -33,12 +34,10 @@ interface Emits {
33
34
 
34
35
  const emit = defineEmits<Emits>();
35
36
 
36
- interface TreeGroupItem {
37
+ interface TreeGroupItem extends Partial<GeodeObjectTyped>, Partial<ViewerTyped> {
37
38
  raw?: TreeGroupItem;
38
39
  id: string;
39
40
  title?: string;
40
- viewer_type?: string;
41
- geode_object_type?: string;
42
41
  children?: TreeGroupItem[];
43
42
  }
44
43
 
@@ -16,6 +16,7 @@ import {
16
16
  import { type RangesPerData, useBatchGroup } from "@ogw_front/composables/batch_style";
17
17
  import { getAttributeRange, intersectAttributes } from "@ogw_front/utils/attributes";
18
18
  import { DEFAULT_NO_DATA_COLOR } from "@ogw_front/utils/default_styles/constants";
19
+ import type { DataId } from "@ogw_front/types/identifiers";
19
20
  import ViewerOptionsAttributeColorBar from "@ogw_front/components/Viewer/Options/AttributeColorBar.vue";
20
21
  import ViewerOptionsNoDataColorInfo from "@ogw_front/components/Viewer/Options/NoDataColorInfo.vue";
21
22
  import ViewerOptionsTimeStepSlider from "@ogw_front/components/Viewer/Options/TimeStepSlider.vue";
@@ -34,12 +35,12 @@ const attributeNoDataColor = defineModel<typeof DEFAULT_NO_DATA_COLOR>("attribut
34
35
  const attributeTimeStep = defineModel<number>("attributeTimeStep");
35
36
 
36
37
  interface Props {
37
- id: string;
38
+ dataId: DataId;
38
39
  componentIds?: string[];
39
40
  schemas: AttributeSchemas;
40
41
  }
41
42
 
42
- const { id, componentIds = undefined, schemas } = defineProps<Props>();
43
+ const { dataId, componentIds = undefined, schemas } = defineProps<Props>();
43
44
 
44
45
  interface Emits {
45
46
  "update:attributeColorMap": [colorMap: string];
@@ -55,7 +56,7 @@ const rangesPerTarget = ref(new Map<string, AttributeRangeInfo>());
55
56
  let rangesName: string | undefined = undefined;
56
57
  let rangesLoading: Promise<void> = Promise.resolve();
57
58
 
58
- const groupTargetIds = useBatchGroup(() => id);
59
+ const groupTargetIds = useBatchGroup(() => dataId);
59
60
 
60
61
  const currentAttribute = computed<AttributeInfo | undefined>(() =>
61
62
  attributes.value.find((attr) => attr.attribute_name === attributeName.value),
@@ -84,7 +85,7 @@ const componentItems = computed<{ title: string; value: number }[]>(() => {
84
85
  });
85
86
 
86
87
  function requestParams(): AttributeRequestParams | undefined {
87
- return attributeRequestParams(schemas, id, componentIds);
88
+ return attributeRequestParams(schemas, dataId, componentIds);
88
89
  }
89
90
 
90
91
  function getRangeTargets(name: string): [string, AttributeRequestParams | undefined][] {
@@ -95,7 +96,7 @@ function getRangeTargets(name: string): [string, AttributeRequestParams | undefi
95
96
  )
96
97
  .map(([targetId]) => [targetId, { id: targetId }]);
97
98
  }
98
- return [[id, requestParams()]];
99
+ return [[dataId, requestParams()]];
99
100
  }
100
101
 
101
102
  // Ranges are computed by the back for the selected attribute only, as scanning every step of every series is slow
@@ -127,7 +128,10 @@ async function loadRanges(name: string): Promise<void> {
127
128
  }
128
129
 
129
130
  function applyRange(): void {
130
- const { min, max } = getAttributeRange(rangesPerTarget.value.get(id), attributeItem.value ?? 0);
131
+ const { min, max } = getAttributeRange(
132
+ rangesPerTarget.value.get(dataId),
133
+ attributeItem.value ?? 0,
134
+ );
131
135
  attributeRange.value = [min, max];
132
136
  }
133
137
 
@@ -188,7 +192,7 @@ onMounted(async () => {
188
192
  });
189
193
 
190
194
  watch(
191
- [(): string => id, (): string[] | undefined => componentIds, (): AttributeSchemas => schemas],
195
+ [(): string => dataId, (): string[] | undefined => componentIds, (): AttributeSchemas => schemas],
192
196
  async () => {
193
197
  await getAttributes();
194
198
  },
@@ -5,18 +5,15 @@ import {
5
5
  buildColoringStyles,
6
6
  resolveAttributeSchemas,
7
7
  } from "@ogw_front/utils/coloring_styles";
8
+ import type { DataId } from "@ogw_front/types/identifiers";
8
9
  import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
9
10
  import type { RangesPerData } from "@ogw_front/composables/batch_style";
11
+ import type { Texture } from "@ogw_front/types/texture";
10
12
  import ViewerOptionsAttributeSelector from "@ogw_front/components/Viewer/Options/AttributeSelector.vue";
11
13
  import ViewerOptionsColorPicker from "@ogw_front/components/Viewer/Options/ColorPicker.vue";
12
14
  import ViewerOptionsOpacitySlider from "@ogw_front/components/Viewer/Options/Sliders/Opacity.vue";
13
15
  import ViewerOptionsTexturesSelector from "@ogw_front/components/Viewer/Options/TexturesSelector.vue";
14
16
 
15
- interface Texture {
16
- id: string;
17
- texture_name: string;
18
- }
19
-
20
17
  interface CapabilityConfig {
21
18
  available?: boolean;
22
19
  hasColorMap?: boolean;
@@ -78,7 +75,7 @@ const polyhedron_attribute_no_data_color = defineModel<RGBAColor>(
78
75
  const polyhedron_attribute_time_step = defineModel<number>("polyhedron_attribute_time_step");
79
76
 
80
77
  interface Props {
81
- id: string;
78
+ dataId: DataId;
82
79
  componentIds?: string[];
83
80
  capabilities?: Record<string, CapabilityConfig>;
84
81
  schemas?: Schemas;
@@ -86,7 +83,7 @@ interface Props {
86
83
  }
87
84
 
88
85
  const {
89
- id,
86
+ dataId,
90
87
  componentIds = undefined,
91
88
  capabilities = {},
92
89
  schemas = {},
@@ -237,7 +234,7 @@ watch(
237
234
  <ViewerOptionsColorPicker v-model="color" />
238
235
  </template>
239
236
  <template v-if="active_key === textures_dict['value']">
240
- <ViewerOptionsTexturesSelector v-model="textures" :id="id" />
237
+ <ViewerOptionsTexturesSelector v-model="textures" :data-id="dataId" />
241
238
  </template>
242
239
  <template v-if="active_key === vertex_dict['value'] && hasColorMap('vertex')">
243
240
  <ViewerOptionsAttributeSelector
@@ -248,7 +245,7 @@ watch(
248
245
  v-model:attributeNoDataColor="vertex_attribute_no_data_color"
249
246
  v-model:attributeTimeStep="vertex_attribute_time_step"
250
247
  @ranges_per_data="emit('vertex_attribute_ranges_per_data', $event)"
251
- :id="id"
248
+ :data-id="dataId"
252
249
  :componentIds="componentIds"
253
250
  :schemas="vertexSchemas"
254
251
  />
@@ -262,7 +259,7 @@ watch(
262
259
  v-model:attributeNoDataColor="edge_attribute_no_data_color"
263
260
  v-model:attributeTimeStep="edge_attribute_time_step"
264
261
  @ranges_per_data="emit('edge_attribute_ranges_per_data', $event)"
265
- :id="id"
262
+ :data-id="dataId"
266
263
  :componentIds="componentIds"
267
264
  :schemas="edgeSchemas"
268
265
  />
@@ -276,7 +273,7 @@ watch(
276
273
  v-model:attributeNoDataColor="cell_attribute_no_data_color"
277
274
  v-model:attributeTimeStep="cell_attribute_time_step"
278
275
  @ranges_per_data="emit('cell_attribute_ranges_per_data', $event)"
279
- :id="id"
276
+ :data-id="dataId"
280
277
  :componentIds="componentIds"
281
278
  :schemas="cellSchemas"
282
279
  />
@@ -290,7 +287,7 @@ watch(
290
287
  v-model:attributeNoDataColor="polygon_attribute_no_data_color"
291
288
  v-model:attributeTimeStep="polygon_attribute_time_step"
292
289
  @ranges_per_data="emit('polygon_attribute_ranges_per_data', $event)"
293
- :id="id"
290
+ :data-id="dataId"
294
291
  :componentIds="componentIds"
295
292
  :schemas="polygonSchemas"
296
293
  />
@@ -304,7 +301,7 @@ watch(
304
301
  v-model:attributeNoDataColor="polyhedron_attribute_no_data_color"
305
302
  v-model:attributeTimeStep="polyhedron_attribute_time_step"
306
303
  @ranges_per_data="emit('polyhedron_attribute_ranges_per_data', $event)"
307
- :id="id"
304
+ :data-id="dataId"
308
305
  :componentIds="componentIds"
309
306
  :schemas="polyhedronSchemas"
310
307
  />
@@ -1,4 +1,5 @@
1
1
  <script setup lang="ts">
2
+ import type { DataId } from "@ogw_front/types/identifiers";
2
3
  import FileUploader from "@ogw_front/components/FileUploader.vue";
3
4
  import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
4
5
  import { intersectBy } from "@ogw_front/utils/attributes";
@@ -16,12 +17,12 @@ interface Emits {
16
17
  const emit = defineEmits<Emits>();
17
18
 
18
19
  interface Props {
19
- id: string;
20
+ dataId: DataId;
20
21
  textureId: string;
21
22
  textureName: string;
22
23
  }
23
24
 
24
- const { id, textureId: propTextureId, textureName: propTextureName } = defineProps<Props>();
25
+ const { dataId, textureId: propTextureId, textureName: propTextureName } = defineProps<Props>();
25
26
 
26
27
  const textureName = ref<string>(propTextureName);
27
28
  const textureId = ref<string>(propTextureId);
@@ -43,11 +44,11 @@ watch(
43
44
  const textureCoordinates = ref<string[]>([]);
44
45
  const backStore = useBackStore();
45
46
 
46
- const groupTargetIds = useBatchGroup(() => id);
47
+ const groupTargetIds = useBatchGroup(() => dataId);
47
48
 
48
49
  async function getTextureCoordinates(): Promise<void> {
49
50
  const schema = back_schemas.opengeodeweb_back.texture_coordinates;
50
- const targetIds = groupTargetIds.value ?? [id];
51
+ const targetIds = groupTargetIds.value ?? [dataId];
51
52
  const responses = await requestForTargets<{ texture_coordinates: string[] }>(schema, targetIds, {
52
53
  texture_coordinates: [],
53
54
  });
@@ -1,18 +1,15 @@
1
1
  <script setup lang="ts">
2
+ import type { DataId } from "@ogw_front/types/identifiers";
3
+ import type { Texture } from "@ogw_front/types/texture";
2
4
  import ViewerOptionsTextureItem from "@ogw_front/components/Viewer/Options/TextureItem.vue";
3
5
 
4
- interface Texture {
5
- id: string;
6
- texture_name: string;
7
- }
8
-
9
6
  const textures = defineModel<Texture[]>();
10
7
 
11
8
  interface Props {
12
- id: string;
9
+ dataId: DataId;
13
10
  }
14
11
 
15
- const { id } = defineProps<Props>();
12
+ const { dataId } = defineProps<Props>();
16
13
 
17
14
  const internal_textures = ref<Texture[]>([]);
18
15
 
@@ -51,7 +48,7 @@ function update_value_event($event: { key: keyof Texture; value: string }, index
51
48
  />
52
49
  </v-col>
53
50
  <ViewerOptionsTextureItem
54
- :id="id"
51
+ :data-id="dataId"
55
52
  :texture-name="texture.texture_name"
56
53
  :texture-id="texture.id"
57
54
  @update_value="update_value_event($event, index)"
@@ -1,4 +1,6 @@
1
1
  <script setup lang="ts">
2
+ import type { AttributeTimeStep } from "@ogw_front/types/attribute";
3
+
2
4
  const timeStep = defineModel<number>();
3
5
 
4
6
  interface Props {
@@ -7,7 +9,7 @@ interface Props {
7
9
 
8
10
  const { timeSteps } = defineProps<Props>();
9
11
 
10
- const sliderTimeStep = ref<number>(0);
12
+ const sliderTimeStep = ref<AttributeTimeStep>(0);
11
13
 
12
14
  watch(
13
15
  timeStep,
@@ -1,32 +1,25 @@
1
1
  <script setup lang="ts">
2
2
  import GlassCard from "@ogw_front/components/GlassCard.vue";
3
+ import type { ProposedItem } from "@ogw_front/composables/use_overlapping_picker";
3
4
  import { formatListId } from "@ogw_front/utils/name_cleaner";
4
5
  import { geode_objects } from "@ogw_front/assets/geode_objects";
5
6
 
6
- interface IntermediateItem {
7
- id: string;
8
- viewer_id: number | undefined;
9
- name: string;
10
- viewer_type: string | undefined;
11
- geode_object_type: string | undefined;
12
- }
13
-
14
7
  interface Props {
15
8
  displayIntermediate: boolean;
16
- intermediateItems: IntermediateItem[];
9
+ intermediateItems: ProposedItem[];
17
10
  menuStyle: Record<string, unknown>;
18
11
  }
19
12
 
20
13
  const { displayIntermediate, intermediateItems, menuStyle } = defineProps<Props>();
21
14
 
22
15
  interface Emits {
23
- select: [item: IntermediateItem];
16
+ select: [item: ProposedItem];
24
17
  "update:displayIntermediate": [val: boolean];
25
18
  }
26
19
 
27
20
  const emit = defineEmits<Emits>();
28
21
 
29
- function selectItem(item: IntermediateItem): void {
22
+ function selectItem(item: ProposedItem): void {
30
23
  emit("select", item);
31
24
  }
32
25
 
@@ -64,7 +57,7 @@ function handleUpdate(val: boolean): void {
64
57
  <v-list class="py-1 bg-transparent" density="compact">
65
58
  <v-list-item
66
59
  v-for="item in intermediateItems"
67
- :key="`${item.id}-${item.viewer_id}`"
60
+ :key="`${item.data_id}-${item.viewer_id}`"
68
61
  class="intermediate-picker-item px-3 py-2"
69
62
  @click="selectItem(item)"
70
63
  >
@@ -89,7 +82,7 @@ function handleUpdate(val: boolean): void {
89
82
  >
90
83
  <span class="font-weight-medium mr-1">{{ item.geode_object_type }}</span>
91
84
  <span style="font-family: monospace; opacity: 0.65; font-size: 0.72rem"
92
- >&middot; {{ formatListId(item.id) }}</span
85
+ >&middot; {{ formatListId(item.data_id) }}</span
93
86
  >
94
87
  </v-list-item-subtitle>
95
88
  </v-list-item>
@@ -7,6 +7,8 @@ import {
7
7
  import ViewerContextMenuItem, {
8
8
  type ItemProps,
9
9
  } from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
10
+ import type { MeshId } from "@ogw_front/types/identifiers";
11
+ import type { Opacity } from "@ogw_front/types/style";
10
12
  import PointSetPoints from "@ogw_front/assets/viewer_svgs/point_set_points.svg";
11
13
  import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
12
14
  import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
@@ -25,134 +27,134 @@ interface Props {
25
27
 
26
28
  const { itemProps } = defineProps<Props>();
27
29
 
28
- const id = toRef(() => itemProps.id);
30
+ const dataId = toRef(() => itemProps.id);
29
31
 
30
32
  const visibility = computed({
31
- get: () => dataStyleStore.meshPointsVisibility(id.value),
33
+ get: () => dataStyleStore.meshPointsVisibility(dataId.value),
32
34
  set: async (newValue) => {
33
35
  if (newValue === undefined) {
34
36
  return;
35
37
  }
36
- await applyBatchStyle(id.value, (targetId: string) =>
37
- dataStyleStore.setMeshPointsVisibility(targetId, newValue),
38
+ await applyBatchStyle(dataId.value, (meshId: MeshId) =>
39
+ dataStyleStore.setMeshPointsVisibility(meshId, newValue),
38
40
  );
39
41
  hybridViewerStore.remoteRender();
40
42
  },
41
43
  });
42
44
  const size = computed({
43
- get: () => dataStyleStore.meshPointsSize(id.value),
45
+ get: () => dataStyleStore.meshPointsSize(dataId.value),
44
46
  set: async (newValue) => {
45
47
  if (newValue === undefined) {
46
48
  return;
47
49
  }
48
- await applyBatchStyle(id.value, (targetId: string) =>
49
- dataStyleStore.setMeshPointsSize(targetId, newValue),
50
+ await applyBatchStyle(dataId.value, (meshId: MeshId) =>
51
+ dataStyleStore.setMeshPointsSize(meshId, newValue),
50
52
  );
51
53
  hybridViewerStore.remoteRender();
52
54
  },
53
55
  });
54
56
  const coloring_style_key = computed({
55
- get: () => dataStyleStore.meshPointsActiveColoring(id.value),
57
+ get: () => dataStyleStore.meshPointsActiveColoring(dataId.value),
56
58
  set: async (newValue) => {
57
- await applyBatchStyle(id.value, (targetId: string) =>
58
- dataStyleStore.setMeshPointsActiveColoring(targetId, newValue),
59
+ await applyBatchStyle(dataId.value, (meshId: MeshId) =>
60
+ dataStyleStore.setMeshPointsActiveColoring(meshId, newValue),
59
61
  );
60
62
  hybridViewerStore.remoteRender();
61
63
  },
62
64
  });
63
65
  const color = computed<RGBAColor | undefined>({
64
- get: () => dataStyleStore.meshPointsColor(id.value) as RGBAColor | undefined,
66
+ get: () => dataStyleStore.meshPointsColor(dataId.value) as RGBAColor | undefined,
65
67
  set: async (newValue) => {
66
68
  if (newValue === undefined) {
67
69
  return;
68
70
  }
69
- await applyBatchStyle(id.value, (targetId: string) =>
70
- dataStyleStore.setMeshPointsColor(targetId, newValue),
71
+ await applyBatchStyle(dataId.value, (meshId: MeshId) =>
72
+ dataStyleStore.setMeshPointsColor(meshId, newValue),
71
73
  );
72
74
  hybridViewerStore.remoteRender();
73
75
  },
74
76
  });
75
- const opacity = computed<number | undefined>({
76
- get: () => dataStyleStore.meshPointsOpacity(id.value),
77
+ const opacity = computed<Opacity | undefined>({
78
+ get: () => dataStyleStore.meshPointsOpacity(dataId.value),
77
79
  set: async (newValue) => {
78
80
  if (newValue === undefined) {
79
81
  return;
80
82
  }
81
- await applyBatchStyle(id.value, (targetId: string) =>
82
- dataStyleStore.setMeshPointsOpacity(targetId, newValue),
83
+ await applyBatchStyle(dataId.value, (meshId: MeshId) =>
84
+ dataStyleStore.setMeshPointsOpacity(meshId, newValue),
83
85
  );
84
86
  hybridViewerStore.remoteRender();
85
87
  },
86
88
  });
87
89
  const vertex_attribute_name = computed({
88
- get: () => dataStyleStore.meshPointsVertexAttributeName(id.value),
90
+ get: () => dataStyleStore.meshPointsVertexAttributeName(dataId.value),
89
91
  set: async (newValue) => {
90
92
  if (newValue === undefined) {
91
93
  return;
92
94
  }
93
- await applyBatchStyle(id.value, (targetId: string) =>
94
- Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeName(targetId, newValue)),
95
+ await applyBatchStyle(dataId.value, (meshId: MeshId) =>
96
+ Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeName(meshId, newValue)),
95
97
  );
96
98
  hybridViewerStore.remoteRender();
97
99
  },
98
100
  });
99
101
 
100
102
  const vertex_attribute_time_step = computed({
101
- get: () => dataStyleStore.meshPointsVertexAttributeTimeStep(id.value),
103
+ get: () => dataStyleStore.meshPointsVertexAttributeTimeStep(dataId.value),
102
104
  set: async (newValue) => {
103
105
  if (newValue === undefined) {
104
106
  return;
105
107
  }
106
- await applyBatchStyle(id.value, (targetId: string) =>
107
- Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeTimeStep(targetId, newValue)),
108
+ await applyBatchStyle(dataId.value, (meshId: MeshId) =>
109
+ Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeTimeStep(meshId, newValue)),
108
110
  );
109
111
  hybridViewerStore.remoteRender();
110
112
  },
111
113
  });
112
114
  const vertex_attribute_item = computed({
113
- get: () => dataStyleStore.meshPointsVertexAttributeItem(id.value),
115
+ get: () => dataStyleStore.meshPointsVertexAttributeItem(dataId.value),
114
116
  set: async (newValue) => {
115
- await applyBatchStyle(id.value, (targetId: string) =>
116
- Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeItem(targetId, newValue)),
117
+ await applyBatchStyle(dataId.value, (meshId: MeshId) =>
118
+ Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeItem(meshId, newValue)),
117
119
  );
118
120
  hybridViewerStore.remoteRender();
119
121
  },
120
122
  });
121
123
  const vertex_attribute_range = computed({
122
- get: () => dataStyleStore.meshPointsVertexAttributeRange(id.value),
124
+ get: () => dataStyleStore.meshPointsVertexAttributeRange(dataId.value),
123
125
  set: async (newValue) => {
124
126
  const [minimum, maximum] = newValue;
125
127
  if (minimum === undefined || maximum === undefined) {
126
128
  return;
127
129
  }
128
- await applyBatchStyle(id.value, (targetId: string) =>
129
- Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeRange(targetId, minimum, maximum)),
130
+ await applyBatchStyle(dataId.value, (meshId: MeshId) =>
131
+ Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeRange(meshId, minimum, maximum)),
130
132
  );
131
133
  hybridViewerStore.remoteRender();
132
134
  },
133
135
  });
134
136
  const vertex_attribute_color_map = computed({
135
- get: () => dataStyleStore.meshPointsVertexAttributeColorMap(id.value),
137
+ get: () => dataStyleStore.meshPointsVertexAttributeColorMap(dataId.value),
136
138
  set: async (newValue) => {
137
- await applyBatchStyle(id.value, (targetId: string) =>
138
- Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeColorMap(targetId, newValue)),
139
+ await applyBatchStyle(dataId.value, (meshId: MeshId) =>
140
+ Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeColorMap(meshId, newValue)),
139
141
  );
140
142
  hybridViewerStore.remoteRender();
141
143
  },
142
144
  });
143
145
  const vertex_attribute_no_data_color = computed<RGBAColor>({
144
- get: () => dataStyleStore.meshPointsVertexAttributeNoDataColor(id.value),
146
+ get: () => dataStyleStore.meshPointsVertexAttributeNoDataColor(dataId.value),
145
147
  set: async (newValue) => {
146
- await applyBatchStyle(id.value, (targetId: string) =>
147
- dataStyleStore.setMeshPointsVertexAttributeNoDataColor(targetId, newValue),
148
+ await applyBatchStyle(dataId.value, (meshId: MeshId) =>
149
+ dataStyleStore.setMeshPointsVertexAttributeNoDataColor(meshId, newValue),
148
150
  );
149
151
  hybridViewerStore.remoteRender();
150
152
  },
151
153
  });
152
154
 
153
155
  async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
154
- await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
155
- dataStyleStore.setMeshPointsVertexAttributeRange(targetId, minimum, maximum),
156
+ await applyRangesPerData(ranges, (meshId, minimum, maximum) =>
157
+ dataStyleStore.setMeshPointsVertexAttributeRange(meshId, minimum, maximum),
156
158
  );
157
159
  hybridViewerStore.remoteRender();
158
160
  }
@@ -174,7 +176,7 @@ async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<v
174
176
  <v-divider class="my-2" />
175
177
  <ViewerOptionsSizeSlider data-testid="meshPointsSizeSlider" v-model="size" />
176
178
  <ViewerOptionsColoringTypeSelector
177
- :id="id"
179
+ :data-id="dataId"
178
180
  v-model:coloring_style_key="coloring_style_key"
179
181
  v-model:color="color"
180
182
  v-model:opacity="opacity"