@geode/opengeodeweb-front 12.2.0-rc.4 → 12.2.0-rc.5

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 (115) hide show
  1. package/app/components/ClippingPlanes.vue +1 -1
  2. package/app/components/FactorFilterPanel.vue +1 -1
  3. package/app/components/Launcher.vue +3 -2
  4. package/app/components/ThresholdFilter.vue +1 -2
  5. package/app/components/Viewer/Basemap/CropOptions.vue +7 -8
  6. package/app/components/Viewer/Basemap/OpacityOptions.vue +7 -8
  7. package/app/components/Viewer/ContextMenu/CircularItems.vue +6 -43
  8. package/app/components/Viewer/ContextMenu/ContextMenu.vue +1 -6
  9. package/app/components/Viewer/ContextMenu/ContextMenuItem.vue +14 -16
  10. package/app/components/Viewer/EdgedCurve/PointsOptions.vue +5 -4
  11. package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +10 -13
  12. package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +8 -11
  13. package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +16 -13
  14. package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +28 -31
  15. package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +9 -11
  16. package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +8 -11
  17. package/app/components/Viewer/Generic/Model/BlocksOptions.vue +1 -1
  18. package/app/components/Viewer/Generic/Model/CornersOptions.vue +1 -1
  19. package/app/components/Viewer/Generic/Model/CornersTypeOptions.vue +1 -1
  20. package/app/components/Viewer/Generic/Model/EdgesOptions.vue +7 -8
  21. package/app/components/Viewer/Generic/Model/LinesOptions.vue +1 -1
  22. package/app/components/Viewer/Generic/Model/LinesTypeOptions.vue +1 -1
  23. package/app/components/Viewer/Generic/Model/ModelEdgesCard.vue +5 -7
  24. package/app/components/Viewer/Generic/Model/ModelPointsCard.vue +5 -7
  25. package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +5 -7
  26. package/app/components/Viewer/Generic/Model/ModelStyleOptions.vue +7 -8
  27. package/app/components/Viewer/Generic/Model/PointsOptions.vue +7 -8
  28. package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +1 -1
  29. package/app/components/Viewer/Grid/2D/CellsOptions.vue +6 -4
  30. package/app/components/Viewer/Grid/2D/EdgesOptions.vue +6 -4
  31. package/app/components/Viewer/Grid/2D/PointsOptions.vue +5 -4
  32. package/app/components/Viewer/Grid/3D/CellsOptions.vue +6 -4
  33. package/app/components/Viewer/Grid/3D/EdgesOptions.vue +6 -4
  34. package/app/components/Viewer/Grid/3D/FacetsOptions.vue +6 -4
  35. package/app/components/Viewer/Grid/3D/PointsOptions.vue +5 -4
  36. package/app/components/Viewer/Image/ImageOptions.vue +10 -13
  37. package/app/components/Viewer/ObjectTree/Base/CommonTreeView.vue +5 -0
  38. package/app/components/Viewer/ObjectTree/Base/ComponentRelations.vue +2 -2
  39. package/app/components/Viewer/ObjectTree/Base/StickyHeader.vue +4 -1
  40. package/app/components/Viewer/ObjectTree/Base/TreeRow.vue +6 -8
  41. package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +10 -15
  42. package/app/components/Viewer/ObjectTree/Views/ModelTree.vue +3 -0
  43. package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +28 -31
  44. package/app/components/Viewer/Scene/BackgroundOptions.vue +4 -7
  45. package/app/components/Viewer/Scene/OrientationWidgetOptions.vue +4 -7
  46. package/app/components/Viewer/Scene/TextOptions.vue +4 -7
  47. package/app/components/Viewer/Solid/EdgesOptions.vue +6 -4
  48. package/app/components/Viewer/Solid/PointsOptions.vue +5 -4
  49. package/app/components/Viewer/Solid/PolygonsOptions.vue +6 -4
  50. package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +8 -11
  51. package/app/components/Viewer/Surface/EdgesOptions.vue +6 -4
  52. package/app/components/Viewer/Surface/PointsOptions.vue +6 -4
  53. package/app/components/Viewer/Surface/PolygonsOptions.vue +8 -11
  54. package/app/components/Viewer/Surface/Triangulated/TrianglesOptions.vue +5 -4
  55. package/app/components/Viewer/TetrahedralSolid/TetrahedraOptions.vue +6 -4
  56. package/app/components/Viewer/TetrahedralSolid/TrianglesOptions.vue +6 -4
  57. package/app/composables/circular_menu.ts +45 -0
  58. package/app/composables/hover_highlight.ts +1 -1
  59. package/app/composables/model_menu_context.ts +7 -11
  60. package/app/composables/model_tree.ts +3 -3
  61. package/app/composables/project_manager_helpers/types.ts +2 -3
  62. package/app/composables/use_overlapping_picker.ts +7 -19
  63. package/app/composables/viewer_context_menu.ts +2 -1
  64. package/app/stores/api.ts +6 -59
  65. package/app/stores/app.ts +21 -55
  66. package/app/stores/back.ts +86 -145
  67. package/app/stores/camera_manager.ts +12 -25
  68. package/app/stores/cloud.ts +21 -101
  69. package/app/stores/crs.ts +3 -2
  70. package/app/stores/data.ts +66 -409
  71. package/app/stores/data_style.ts +99 -93
  72. package/app/stores/feedback.ts +57 -53
  73. package/app/stores/infra.ts +61 -101
  74. package/app/stores/treeview.ts +12 -31
  75. package/app/stores/viewer.ts +9 -29
  76. package/app/stores/viewer_helpers/actions.ts +1 -23
  77. package/app/utils/backend_lifecycle.ts +155 -0
  78. package/app/utils/import_item.ts +5 -4
  79. package/app/utils/threshold_sources.ts +3 -2
  80. package/app/utils/treeview.ts +25 -1
  81. package/app/utils/viewer_object_type.ts +21 -0
  82. package/internal/database/base_database.ts +2 -1
  83. package/internal/database/database.ts +90 -7
  84. package/internal/database/queries.ts +45 -0
  85. package/internal/database/tables/camera_positions.ts +11 -1
  86. package/internal/database/tables/data.ts +20 -1
  87. package/internal/database/tables/data_style.ts +3 -1
  88. package/internal/database/tables/model_component_datastyle.ts +3 -1
  89. package/internal/database/tables/model_component_type_datastyle.ts +3 -1
  90. package/internal/database/tables/model_components.ts +12 -1
  91. package/internal/database/tables/model_components_relation.ts +11 -1
  92. package/internal/database/tables/scene_style.ts +3 -1
  93. package/internal/database/tables/treeview_config.ts +31 -0
  94. package/internal/stores/data/items.ts +110 -0
  95. package/internal/stores/data/model/collections.ts +107 -0
  96. package/internal/stores/data/model/components.ts +129 -0
  97. package/internal/stores/data/model/mesh_components.ts +134 -0
  98. package/internal/stores/data/model/relations.ts +76 -0
  99. package/internal/stores/data/model/types.ts +14 -0
  100. package/internal/stores/data/registration.ts +54 -0
  101. package/internal/stores/data/snapshot.ts +83 -0
  102. package/internal/stores/data/types.ts +26 -0
  103. package/internal/stores/data_style/model/common_mutations.ts +47 -77
  104. package/internal/stores/data_style/model/selection.ts +3 -10
  105. package/internal/stores/data_style/scene.ts +2 -2
  106. package/internal/stores/data_style/state.ts +10 -8
  107. package/internal/stores/data_style/state_shared.ts +10 -7
  108. package/internal/stores/hybrid_viewer/highlight.ts +9 -14
  109. package/internal/stores/hybrid_viewer/scene.ts +1 -1
  110. package/internal/stores/microservice.ts +192 -0
  111. package/package.json +1 -1
  112. package/tests/browser/helpers/data/helpers/attribute.ts +2 -1
  113. package/app/stores/data_helpers/collections.ts +0 -122
  114. package/app/stores/data_helpers/mesh.ts +0 -167
  115. package/app/stores/data_helpers/relations.ts +0 -94
@@ -22,6 +22,8 @@ interface Props {
22
22
  options?: Record<string, unknown>;
23
23
  // Row tinted from outside the tree, e.g. while its model tree header is hovered
24
24
  linked?: { id: unknown; color: string };
25
+ // Whether a row shows its visibility toggle: the view knows which data a row stands for
26
+ isRowViewable: (item: DisplayItem) => boolean;
25
27
  }
26
28
 
27
29
  const {
@@ -32,6 +34,7 @@ const {
32
34
  scrollTop = 0,
33
35
  options = {},
34
36
  linked = undefined,
37
+ isRowViewable,
35
38
  } = defineProps<Props>();
36
39
 
37
40
  const treeWrapper = ref<HTMLDivElement | undefined>(undefined);
@@ -208,6 +211,7 @@ const { handleKeyDown } = useTreeKeyboardNav(
208
211
  :selection="actualSelection"
209
212
  :is-selected="isSelected"
210
213
  :get-indeterminate="getIndeterminate"
214
+ :is-row-viewable="isRowViewable"
211
215
  @toggle-open="toggleOpen"
212
216
  @toggle-select="toggleSelect"
213
217
  >
@@ -261,6 +265,7 @@ const { handleKeyDown } = useTreeKeyboardNav(
261
265
  :selection="actualSelection"
262
266
  :is-selected="isSelected"
263
267
  :get-indeterminate="getIndeterminate"
268
+ :is-row-viewable="isRowViewable"
264
269
  @toggle-open="toggleOpen"
265
270
  @toggle-select="toggleSelect"
266
271
  @hover-eye-enter="emit('hover:leave', { item })"
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import type { ComponentRelations } from "@ogw_front/stores/data_helpers/relations";
3
- import type { FormattedComponent } from "@ogw_front/stores/data_helpers/mesh";
2
+ import type { ComponentRelations } from "@ogw_internal/stores/data/model/relations";
3
+ import type { FormattedComponent } from "@ogw_internal/stores/data/model/mesh_components";
4
4
  import { MESH_COMPONENT_TYPES } from "@ogw_front/utils/default_styles";
5
5
  import { pluralize } from "@ogw_front/utils/string";
6
6
  import { useDataStore } from "@ogw_front/stores/data";
@@ -13,9 +13,11 @@ interface Props {
13
13
  selection: SelectionConfig;
14
14
  isSelected: (item: TreeItem) => boolean;
15
15
  getIndeterminate: (item: TreeItem) => boolean;
16
+ isRowViewable: (item: DisplayItem) => boolean;
16
17
  }
17
18
 
18
- const { item, itemProps, selection, isSelected, getIndeterminate } = defineProps<Props>();
19
+ const { item, itemProps, selection, isSelected, getIndeterminate, isRowViewable } =
20
+ defineProps<Props>();
19
21
 
20
22
  interface Emits {
21
23
  "toggle-open": [item: TreeItem];
@@ -33,6 +35,7 @@ const emit = defineEmits<Emits>();
33
35
  :selection="selection"
34
36
  :is-selected="isSelected"
35
37
  :get-indeterminate="getIndeterminate"
38
+ :is-row-viewable="isRowViewable"
36
39
  @toggle-open="$emit('toggle-open', $event)"
37
40
  @toggle-select="$emit('toggle-select', $event)"
38
41
  >
@@ -5,9 +5,6 @@ import type {
5
5
  SelectionConfig,
6
6
  TreeItem,
7
7
  } from "@ogw_front/composables/virtual_tree";
8
- import { useDataStore } from "@ogw_front/stores/data";
9
-
10
- const dataStore = useDataStore();
11
8
 
12
9
  interface Props {
13
10
  item: DisplayItem;
@@ -15,9 +12,12 @@ interface Props {
15
12
  selection: SelectionConfig;
16
13
  isSelected: (item: TreeItem) => boolean;
17
14
  getIndeterminate: (item: TreeItem) => boolean;
15
+ // Given by the view: it knows which data a row stands for
16
+ isRowViewable: (item: DisplayItem) => boolean;
18
17
  }
19
18
 
20
- const { item, itemProps, selection, isSelected, getIndeterminate } = defineProps<Props>();
19
+ const { item, itemProps, selection, isSelected, getIndeterminate, isRowViewable } =
20
+ defineProps<Props>();
21
21
 
22
22
  interface Emits {
23
23
  "toggle-open": [item: TreeItem];
@@ -34,10 +34,8 @@ function triggerHorizonStackModal(rawItem: unknown): void {
34
34
  globalThis.dispatchEvent(new CustomEvent("open-horizon-stack-modal", { detail: rawItem }));
35
35
  }
36
36
  const isHorizonStack = computed<boolean>(() => item.raw.geode_object_type === "HorizonStack3D");
37
- const isViewable = computed<boolean>(() => dataStore.isItemViewable(item.raw));
38
- const showEyeButton = computed<boolean>(
39
- () => !isHorizonStack.value && item.raw.title !== "HorizonStack3D" && isViewable.value,
40
- );
37
+ // A horizon stack row opens its modal instead of toggling a visibility
38
+ const showEyeButton = computed<boolean>(() => !isHorizonStack.value && isRowViewable(item));
41
39
 
42
40
  function isLoading(child: unknown): boolean {
43
41
  return (
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- // oxlint-disable max-dependencies
2
+ // oxlint-disable max-dependencies, eslint/max-lines
3
3
  import type { GeodeObjectTyped, ViewerObjectTyped } from "@ogw_front/types/identifiers";
4
4
  import {
5
5
  type MapStyle,
@@ -11,8 +11,10 @@ import {
11
11
  import {
12
12
  type TreeMenuPayload,
13
13
  compareSelections,
14
+ isObjectTreeRowViewable,
14
15
  withPendingImports,
15
16
  } from "@ogw_front/utils/treeview";
17
+ import { isImage, isModel } from "@ogw_front/utils/viewer_object_type";
16
18
  import CommonTreeView from "@ogw_front/components/Viewer/ObjectTree/Base/CommonTreeView.vue";
17
19
  import type { DisplayItem } from "@ogw_front/composables/virtual_tree";
18
20
  import type { GeodeObjectType } from "@geode/opengeodeweb-microservice/data_types";
@@ -168,14 +170,6 @@ const linkedRow = computed<{ id: string; color: string } | undefined>(() => {
168
170
  return { id, color };
169
171
  });
170
172
 
171
- function isModel(item: TreeGroupItem): boolean {
172
- const actualItem = item.raw || item;
173
- return (
174
- actualItem.viewer_object_type === "model" ||
175
- ["BRep", "Section"].includes(actualItem.geode_object_type ?? "")
176
- );
177
- }
178
-
179
173
  function handleHoverEnter({
180
174
  item,
181
175
  immediate = false,
@@ -186,31 +180,31 @@ function handleHoverEnter({
186
180
  const actualItem = item.raw || item;
187
181
 
188
182
  // Images are not pickable: the viewer has nothing to highlight
189
- if (!actualItem.viewer_object_type || actualItem.viewer_object_type === "image") {
183
+ if (!actualItem.viewer_object_type || isImage(actualItem)) {
190
184
  return;
191
185
  }
192
186
 
193
- const is_model = isModel(item);
194
- if (is_model) {
187
+ const itemIsModel = isModel(actualItem);
188
+ if (itemIsModel) {
195
189
  treeviewStore.setHoveredModel(actualItem.id);
196
190
  }
197
191
 
198
192
  onHoverEnter(
199
193
  actualItem.id,
200
194
  async () => {
201
- if (is_model) {
195
+ if (itemIsModel) {
202
196
  return await dataStore.getAllModelComponentsViewerIds(actualItem.id);
203
197
  }
204
198
  return [];
205
199
  },
206
- is_model ? "model" : "mesh",
200
+ itemIsModel ? "model" : "mesh",
207
201
  immediate,
208
202
  );
209
203
  }
210
204
 
211
205
  function handleHoverLeave({ item }: { item: TreeGroupItem }): void {
212
206
  const actualItem = item.raw || item;
213
- if (!actualItem.viewer_object_type || actualItem.viewer_object_type === "image") {
207
+ if (!actualItem.viewer_object_type || isImage(actualItem)) {
214
208
  return;
215
209
  }
216
210
  if (treeviewStore.hoveredModelId === actualItem.id) {
@@ -259,6 +253,7 @@ function expandAll(): void {
259
253
  }"
260
254
  :scroll-top="mainView?.scrollTop || 0"
261
255
  :linked="linkedRow"
256
+ :is-row-viewable="(row) => isObjectTreeRowViewable(row, dataStore.isViewable)"
262
257
  class="transparent-treeview virtual-tree-height"
263
258
  @update:selected="(val) => onUpdateSelection(val as string[])"
264
259
  @update:scroll-top="treeviewStore.setScrollTop(mainView?.id ?? '', $event)"
@@ -6,6 +6,7 @@ import FetchingData from "@ogw_front/components/FetchingData.vue";
6
6
  import type { ModelComponentMenuPayload } from "@ogw_front/utils/treeview";
7
7
  import ObjectTreeControls from "@ogw_front/components/Viewer/ObjectTree/Base/Controls.vue";
8
8
  import ObjectTreeItemLabel from "@ogw_front/components/Viewer/ObjectTree/Base/ItemLabel.vue";
9
+ import { useDataStore } from "@ogw_front/stores/data";
9
10
  import { useHoverhighlight } from "@ogw_front/composables/hover_highlight";
10
11
  import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
11
12
  import { useModelTree } from "@ogw_front/composables/model_tree";
@@ -36,6 +37,7 @@ interface Emits {
36
37
  const emit = defineEmits<Emits>();
37
38
 
38
39
  const treeviewStore = useTreeviewStore();
40
+ const dataStore = useDataStore();
39
41
 
40
42
  const {
41
43
  isLoading,
@@ -241,6 +243,7 @@ function getLeafViewerIds(item: CollectionTreeItem): number[] {
241
243
  }"
242
244
  :scroll-top="currentView?.scrollTop || 0"
243
245
  class="transparent-treeview virtual-tree-height"
246
+ :is-row-viewable="() => dataStore.isViewable(id)"
244
247
  @update:selected="(val) => onUpdateSelection(val as string[])"
245
248
  @update:scroll-top="treeviewStore.setScrollTop(id, $event)"
246
249
  @hover:enter="
@@ -5,11 +5,10 @@ import {
5
5
  applyRangesPerData,
6
6
  useBatchStyle,
7
7
  } from "@ogw_front/composables/batch_style";
8
- import ViewerContextMenuItem, {
9
- type ItemProps,
10
- } from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
8
+ import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
11
9
  import type { MeshId } from "@ogw_front/types/identifiers";
12
10
  import PointSetPoints from "@ogw_front/assets/viewer_svgs/point_set_points.svg";
11
+ import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
13
12
  import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
14
13
  import ViewerOptionsSizeSlider from "@ogw_front/components/Viewer/Options/Sliders/Size.vue";
15
14
  import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
@@ -21,77 +20,76 @@ const hybridViewerStore = useHybridViewerStore();
21
20
  const { applyBatchStyle } = useBatchStyle();
22
21
 
23
22
  interface Props {
24
- itemProps: ItemProps & { index: number };
23
+ dataId: DataId;
24
+ index: number;
25
25
  }
26
26
 
27
- const { itemProps } = defineProps<Props>();
28
-
29
- const dataId = toRef(() => itemProps.id);
27
+ const { dataId, index } = defineProps<Props>();
30
28
 
31
29
  const visibility = computed({
32
- get: () => dataStyleStore.meshPointsVisibility(dataId.value),
30
+ get: () => dataStyleStore.meshPointsVisibility(dataId),
33
31
  set: async (newValue) => {
34
32
  if (newValue === undefined) {
35
33
  return;
36
34
  }
37
- await applyBatchStyle(dataId.value, (meshId: MeshId) =>
35
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
38
36
  dataStyleStore.setMeshPointsVisibility(meshId, newValue),
39
37
  );
40
38
  hybridViewerStore.remoteRender();
41
39
  },
42
40
  });
43
41
  const size = computed({
44
- get: () => dataStyleStore.meshPointsSize(dataId.value),
42
+ get: () => dataStyleStore.meshPointsSize(dataId),
45
43
  set: async (newValue) => {
46
44
  if (newValue === undefined) {
47
45
  return;
48
46
  }
49
- await applyBatchStyle(dataId.value, (meshId: MeshId) =>
47
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
50
48
  dataStyleStore.setMeshPointsSize(meshId, newValue),
51
49
  );
52
50
  hybridViewerStore.remoteRender();
53
51
  },
54
52
  });
55
53
  const coloring_style_key = computed({
56
- get: () => dataStyleStore.meshPointsActiveColoring(dataId.value),
54
+ get: () => dataStyleStore.meshPointsActiveColoring(dataId),
57
55
  set: async (newValue) => {
58
- await applyBatchStyle(dataId.value, (meshId: MeshId) =>
56
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
59
57
  dataStyleStore.setMeshPointsActiveColoring(meshId, newValue),
60
58
  );
61
59
  hybridViewerStore.remoteRender();
62
60
  },
63
61
  });
64
62
  const color = computed<ColorRGBA | undefined>({
65
- get: () => dataStyleStore.meshPointsColor(dataId.value) as ColorRGBA | undefined,
63
+ get: () => dataStyleStore.meshPointsColor(dataId) as ColorRGBA | undefined,
66
64
  set: async (newValue) => {
67
65
  if (newValue === undefined) {
68
66
  return;
69
67
  }
70
- await applyBatchStyle(dataId.value, (meshId: MeshId) =>
68
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
71
69
  dataStyleStore.setMeshPointsColor(meshId, newValue),
72
70
  );
73
71
  hybridViewerStore.remoteRender();
74
72
  },
75
73
  });
76
74
  const opacity = computed<Opacity | undefined>({
77
- get: () => dataStyleStore.meshPointsOpacity(dataId.value),
75
+ get: () => dataStyleStore.meshPointsOpacity(dataId),
78
76
  set: async (newValue) => {
79
77
  if (newValue === undefined) {
80
78
  return;
81
79
  }
82
- await applyBatchStyle(dataId.value, (meshId: MeshId) =>
80
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
83
81
  dataStyleStore.setMeshPointsOpacity(meshId, newValue),
84
82
  );
85
83
  hybridViewerStore.remoteRender();
86
84
  },
87
85
  });
88
86
  const vertex_attribute_name = computed({
89
- get: () => dataStyleStore.meshPointsVertexAttributeName(dataId.value),
87
+ get: () => dataStyleStore.meshPointsVertexAttributeName(dataId),
90
88
  set: async (newValue) => {
91
89
  if (newValue === undefined) {
92
90
  return;
93
91
  }
94
- await applyBatchStyle(dataId.value, (meshId: MeshId) =>
92
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
95
93
  Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeName(meshId, newValue)),
96
94
  );
97
95
  hybridViewerStore.remoteRender();
@@ -99,52 +97,52 @@ const vertex_attribute_name = computed({
99
97
  });
100
98
 
101
99
  const vertex_attribute_time_step = computed({
102
- get: () => dataStyleStore.meshPointsVertexAttributeTimeStep(dataId.value),
100
+ get: () => dataStyleStore.meshPointsVertexAttributeTimeStep(dataId),
103
101
  set: async (newValue) => {
104
102
  if (newValue === undefined) {
105
103
  return;
106
104
  }
107
- await applyBatchStyle(dataId.value, (meshId: MeshId) =>
105
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
108
106
  Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeTimeStep(meshId, newValue)),
109
107
  );
110
108
  hybridViewerStore.remoteRender();
111
109
  },
112
110
  });
113
111
  const vertex_attribute_item = computed({
114
- get: () => dataStyleStore.meshPointsVertexAttributeItem(dataId.value),
112
+ get: () => dataStyleStore.meshPointsVertexAttributeItem(dataId),
115
113
  set: async (newValue) => {
116
- await applyBatchStyle(dataId.value, (meshId: MeshId) =>
114
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
117
115
  Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeItem(meshId, newValue)),
118
116
  );
119
117
  hybridViewerStore.remoteRender();
120
118
  },
121
119
  });
122
120
  const vertex_attribute_range = computed({
123
- get: () => dataStyleStore.meshPointsVertexAttributeRange(dataId.value),
121
+ get: () => dataStyleStore.meshPointsVertexAttributeRange(dataId),
124
122
  set: async (newValue) => {
125
123
  const [minimum, maximum] = newValue;
126
124
  if (minimum === undefined || maximum === undefined) {
127
125
  return;
128
126
  }
129
- await applyBatchStyle(dataId.value, (meshId: MeshId) =>
127
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
130
128
  Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeRange(meshId, minimum, maximum)),
131
129
  );
132
130
  hybridViewerStore.remoteRender();
133
131
  },
134
132
  });
135
133
  const vertex_attribute_color_map = computed({
136
- get: () => dataStyleStore.meshPointsVertexAttributeColorMap(dataId.value),
134
+ get: () => dataStyleStore.meshPointsVertexAttributeColorMap(dataId),
137
135
  set: async (newValue) => {
138
- await applyBatchStyle(dataId.value, (meshId: MeshId) =>
136
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
139
137
  Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeColorMap(meshId, newValue)),
140
138
  );
141
139
  hybridViewerStore.remoteRender();
142
140
  },
143
141
  });
144
142
  const vertex_attribute_no_data_color = computed<ColorRGBA>({
145
- get: () => dataStyleStore.meshPointsVertexAttributeNoDataColor(dataId.value),
143
+ get: () => dataStyleStore.meshPointsVertexAttributeNoDataColor(dataId),
146
144
  set: async (newValue) => {
147
- await applyBatchStyle(dataId.value, (meshId: MeshId) =>
145
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
148
146
  dataStyleStore.setMeshPointsVertexAttributeNoDataColor(meshId, newValue),
149
147
  );
150
148
  hybridViewerStore.remoteRender();
@@ -161,8 +159,7 @@ async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<v
161
159
  <template>
162
160
  <ViewerContextMenuItem
163
161
  data-testid="meshPointsMenu"
164
- :index="itemProps.index"
165
- :itemProps="itemProps"
162
+ :index="index"
166
163
  :btnImage="PointSetPoints"
167
164
  tooltip="Points options"
168
165
  >
@@ -1,16 +1,14 @@
1
1
  <script setup lang="ts">
2
- import ViewerContextMenuItem, {
3
- type ItemProps,
4
- } from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
5
2
  import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
3
+ import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
6
4
  import ViewerOptionsColorPicker from "@ogw_front/components/Viewer/Options/ColorPicker.vue";
7
5
  import { useDataStyleStore } from "@ogw_front/stores/data_style";
8
6
 
9
7
  interface Props {
10
- itemProps: ItemProps & { index: number };
8
+ index: number;
11
9
  }
12
10
 
13
- const { itemProps } = defineProps<Props>();
11
+ const { index } = defineProps<Props>();
14
12
 
15
13
  const dataStyleStore = useDataStyleStore();
16
14
 
@@ -25,8 +23,7 @@ const backgroundColor = computed<ColorRGBA>({
25
23
  <template>
26
24
  <ViewerContextMenuItem
27
25
  data-testid="sceneBackgroundMenu"
28
- :index="itemProps.index"
29
- :itemProps="itemProps"
26
+ :index="index"
30
27
  tooltip="Background"
31
28
  btnIcon="ph-image"
32
29
  >
@@ -1,16 +1,14 @@
1
1
  <script setup lang="ts">
2
- import ViewerContextMenuItem, {
3
- type ItemProps,
4
- } from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
5
2
  import type { SceneOrientationWidget } from "@ogw_internal/stores/data_style/types";
3
+ import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
6
4
  import { useDataStyleStore } from "@ogw_front/stores/data_style";
7
5
  import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
8
6
 
9
7
  interface Props {
10
- itemProps: ItemProps & { index: number };
8
+ index: number;
11
9
  }
12
10
 
13
- const { itemProps } = defineProps<Props>();
11
+ const { index } = defineProps<Props>();
14
12
 
15
13
  const dataStyleStore = useDataStyleStore();
16
14
  const hybridViewerStore = useHybridViewerStore();
@@ -27,8 +25,7 @@ const orientationWidget = computed<SceneOrientationWidget>({
27
25
  <template>
28
26
  <ViewerContextMenuItem
29
27
  data-testid="sceneOrientationWidgetMenu"
30
- :index="itemProps.index"
31
- :itemProps="itemProps"
28
+ :index="index"
32
29
  tooltip="Orientation widget"
33
30
  btnIcon="ph-compass"
34
31
  >
@@ -1,18 +1,16 @@
1
1
  <script setup lang="ts">
2
- import ViewerContextMenuItem, {
3
- type ItemProps,
4
- } from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
5
2
  import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
6
3
  import type { SceneFontFamily } from "@ogw_internal/stores/data_style/types";
4
+ import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
7
5
  import ViewerOptionsColorPicker from "@ogw_front/components/Viewer/Options/ColorPicker.vue";
8
6
  import { useDataStyleStore } from "@ogw_front/stores/data_style";
9
7
  import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
10
8
 
11
9
  interface Props {
12
- itemProps: ItemProps & { index: number };
10
+ index: number;
13
11
  }
14
12
 
15
- const { itemProps } = defineProps<Props>();
13
+ const { index } = defineProps<Props>();
16
14
 
17
15
  const dataStyleStore = useDataStyleStore();
18
16
  const hybridViewerStore = useHybridViewerStore();
@@ -43,8 +41,7 @@ const fontFamily = computed<SceneFontFamily>({
43
41
  <template>
44
42
  <ViewerContextMenuItem
45
43
  data-testid="sceneTextMenu"
46
- :index="itemProps.index"
47
- :itemProps="itemProps"
44
+ :index="index"
48
45
  tooltip="Text"
49
46
  btnIcon="ph-text-aa"
50
47
  >
@@ -1,18 +1,20 @@
1
1
  <script setup lang="ts">
2
- import type { ItemProps } from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
2
+ import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
3
3
  import SolidEdges from "@ogw_front/assets/viewer_svgs/solid_edges.svg";
4
4
  import ViewerGenericMeshEdgesOptions from "@ogw_front/components/Viewer/Generic/Mesh/EdgesOptions.vue";
5
5
 
6
6
  interface Props {
7
- itemProps: ItemProps & { index?: number };
7
+ dataId: DataId;
8
+ index: number;
8
9
  }
9
10
 
10
- const { itemProps } = defineProps<Props>();
11
+ const { dataId, index } = defineProps<Props>();
11
12
  </script>
12
13
 
13
14
  <template>
14
15
  <ViewerGenericMeshEdgesOptions
15
- :itemProps="itemProps"
16
+ :data-id="dataId"
17
+ :index="index"
16
18
  :btnImage="SolidEdges"
17
19
  :capabilities="{ edge: { available: false } }"
18
20
  />
@@ -1,15 +1,16 @@
1
1
  <script setup lang="ts">
2
- import type { ItemProps } from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
2
+ import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
3
3
  import SolidPoints from "@ogw_front/assets/viewer_svgs/solid_points.svg";
4
4
  import ViewerGenericMeshPointsOptions from "@ogw_front/components/Viewer/Generic/Mesh/PointsOptions.vue";
5
5
 
6
6
  interface Props {
7
- itemProps: ItemProps & { index?: number };
7
+ dataId: DataId;
8
+ index: number;
8
9
  }
9
10
 
10
- const { itemProps } = defineProps<Props>();
11
+ const { dataId, index } = defineProps<Props>();
11
12
  </script>
12
13
 
13
14
  <template>
14
- <ViewerGenericMeshPointsOptions :itemProps="itemProps" :btnImage="SolidPoints" />
15
+ <ViewerGenericMeshPointsOptions :data-id="dataId" :index="index" :btnImage="SolidPoints" />
15
16
  </template>
@@ -1,18 +1,20 @@
1
1
  <script setup lang="ts">
2
- import type { ItemProps } from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
2
+ import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
3
3
  import SolidFacets from "@ogw_front/assets/viewer_svgs/solid_facets.svg";
4
4
  import ViewerGenericMeshPolygonsOptions from "@ogw_front/components/Viewer/Generic/Mesh/PolygonsOptions.vue";
5
5
 
6
6
  interface Props {
7
- itemProps: ItemProps & { index?: number };
7
+ dataId: DataId;
8
+ index: number;
8
9
  }
9
10
 
10
- const { itemProps } = defineProps<Props>();
11
+ const { dataId, index } = defineProps<Props>();
11
12
  </script>
12
13
 
13
14
  <template>
14
15
  <ViewerGenericMeshPolygonsOptions
15
- :itemProps="itemProps"
16
+ :data-id="dataId"
17
+ :index="index"
16
18
  :btnImage="SolidFacets"
17
19
  :capabilities="{ textures: { available: false } }"
18
20
  />
@@ -1,9 +1,8 @@
1
1
  <script setup lang="ts">
2
- import ViewerContextMenuItem, {
3
- type ItemProps,
4
- } from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
2
+ import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
5
3
  import type { MeshId } from "@ogw_front/types/identifiers";
6
4
  import SolidPolyhedra from "@ogw_front/assets/viewer_svgs/solid_polyhedra.svg";
5
+ import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
7
6
  import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
8
7
  import ViewerSolidSpecificPolyhedraColoring from "@ogw_front/components/Viewer/Solid/SpecificPolyhedraColoring.vue";
9
8
  import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
@@ -16,18 +15,17 @@ const hybridViewerStore = useHybridViewerStore();
16
15
  const { applyBatchStyle } = useBatchStyle();
17
16
 
18
17
  interface Props {
19
- itemProps: ItemProps & { index: number };
18
+ dataId: DataId;
19
+ index: number;
20
20
  tooltip?: string;
21
21
  }
22
22
 
23
- const { itemProps, tooltip = "Polyhedra options" } = defineProps<Props>();
24
-
25
- const dataId = toRef(() => itemProps.id);
23
+ const { dataId, index, tooltip = "Polyhedra options" } = defineProps<Props>();
26
24
 
27
25
  const visibility = computed<Visibility>({
28
- get: () => dataStyleStore.meshPolyhedraVisibility(dataId.value),
26
+ get: () => dataStyleStore.meshPolyhedraVisibility(dataId),
29
27
  set: async (newValue) => {
30
- await applyBatchStyle(dataId.value, (meshId: MeshId) =>
28
+ await applyBatchStyle(dataId, (meshId: MeshId) =>
31
29
  dataStyleStore.setMeshPolyhedraVisibility(meshId, newValue),
32
30
  );
33
31
  hybridViewerStore.remoteRender();
@@ -38,8 +36,7 @@ const visibility = computed<Visibility>({
38
36
  <template>
39
37
  <ViewerContextMenuItem
40
38
  data-testid="meshPolyhedraMenu"
41
- :index="itemProps.index"
42
- :itemProps="itemProps"
39
+ :index="index"
43
40
  :tooltip="tooltip"
44
41
  :btnImage="SolidPolyhedra"
45
42
  >
@@ -1,18 +1,20 @@
1
1
  <script setup lang="ts">
2
- import type { ItemProps } from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
2
+ import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
3
3
  import SurfaceEdges from "@ogw_front/assets/viewer_svgs/surface_edges.svg";
4
4
  import ViewerGenericMeshEdgesOptions from "@ogw_front/components/Viewer/Generic/Mesh/EdgesOptions.vue";
5
5
 
6
6
  interface Props {
7
- itemProps: ItemProps & { index?: number };
7
+ dataId: DataId;
8
+ index: number;
8
9
  }
9
10
 
10
- const { itemProps } = defineProps<Props>();
11
+ const { dataId, index } = defineProps<Props>();
11
12
  </script>
12
13
 
13
14
  <template>
14
15
  <ViewerGenericMeshEdgesOptions
15
- :itemProps="itemProps"
16
+ :data-id="dataId"
17
+ :index="index"
16
18
  :btnImage="SurfaceEdges"
17
19
  :capabilities="{ edge: { available: false } }"
18
20
  />
@@ -1,18 +1,20 @@
1
1
  <script setup lang="ts">
2
- import type { ItemProps } from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
2
+ import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
3
3
  import TriangulatedSurfaceEdgesPoints from "@ogw_front/assets/viewer_svgs/surface_points.svg";
4
4
  import ViewerGenericMeshPointsOptions from "@ogw_front/components/Viewer/Generic/Mesh/PointsOptions.vue";
5
5
 
6
6
  interface Props {
7
- itemProps: ItemProps & { index?: number };
7
+ dataId: DataId;
8
+ index: number;
8
9
  }
9
10
 
10
- const { itemProps } = defineProps<Props>();
11
+ const { dataId, index } = defineProps<Props>();
11
12
  </script>
12
13
 
13
14
  <template>
14
15
  <ViewerGenericMeshPointsOptions
15
- :itemProps="itemProps"
16
+ :data-id="dataId"
17
+ :index="index"
16
18
  :btnImage="TriangulatedSurfaceEdgesPoints"
17
19
  />
18
20
  </template>