@geode/opengeodeweb-front 10.34.0-rc.9 → 10.34.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 (282) hide show
  1. package/{server → .build/server}/utils/app_config.js +10 -9
  2. package/{server → .build/server}/utils/cleanup.js +31 -17
  3. package/{server → .build/server}/utils/cloud.js +1 -4
  4. package/{server → .build/server}/utils/microservices.js +21 -9
  5. package/{server → .build/server}/utils/path.js +4 -4
  6. package/{server → .build/server}/utils/scripts.js +9 -9
  7. package/.build/server/utils/server_config.js +51 -0
  8. package/.build/server/utils/stream.js +6 -0
  9. package/{server → .build/server}/utils/ws_client.js +18 -3
  10. package/{shared → .build/shared}/scripts.js +10 -10
  11. package/.build/shared/utils/call_raw.js +31 -0
  12. package/{shared → .build/shared}/utils/call_schema.js +2 -2
  13. package/.build/shared/utils/fetch_raw.js +52 -0
  14. package/{shared → .build/shared}/utils/fetch_schema.js +2 -2
  15. package/{shared → .build/shared}/utils/file.js +3 -1
  16. package/{shared → .build/shared}/utils/response_handlers/load.js +10 -7
  17. package/{shared → .build/shared}/utils/validate_schema.js +1 -1
  18. package/app/components/ActionButton.vue +6 -6
  19. package/app/components/CameraManager/List.vue +5 -5
  20. package/app/components/CameraManager/Saver.vue +3 -5
  21. package/app/components/CameraManager.vue +6 -4
  22. package/app/components/CameraOrientation.vue +12 -12
  23. package/app/components/ClippingPlaneCard.vue +4 -2
  24. package/app/components/ClippingPlanes.vue +8 -8
  25. package/app/components/CrsSelector.vue +9 -10
  26. package/app/components/DeleteDialog.vue +4 -2
  27. package/app/components/DragAndDrop.vue +10 -12
  28. package/app/components/DragAndDropInternal/DragAndDropInline.vue +4 -2
  29. package/app/components/ExtensionSelector.vue +4 -4
  30. package/app/components/FeedBack/ErrorBanner.vue +3 -1
  31. package/app/components/FeedBack/Snackers.vue +4 -3
  32. package/app/components/FileSelector.vue +10 -8
  33. package/app/components/FileUploader.vue +11 -11
  34. package/app/components/GlassCard.vue +1 -1
  35. package/app/components/HybridRenderingView.vue +7 -5
  36. package/app/components/HybridViewerTooltip.vue +7 -7
  37. package/app/components/Launcher.vue +1 -1
  38. package/app/components/Loading/EcoMessages.vue +9 -3
  39. package/app/components/Loading.vue +2 -2
  40. package/app/components/MissingFilesSelector.vue +12 -10
  41. package/app/components/ObjectSelector.vue +10 -9
  42. package/app/components/PackagesVersions.vue +6 -5
  43. package/app/components/Recaptcha.vue +3 -3
  44. package/app/components/RemoteRenderingView.vue +6 -7
  45. package/app/components/Ruler.vue +3 -3
  46. package/app/components/Screenshot.vue +6 -6
  47. package/app/components/SearchBar.vue +4 -2
  48. package/app/components/ShrinkFilter.vue +7 -7
  49. package/app/components/Step.vue +6 -5
  50. package/app/components/Stepper.vue +4 -3
  51. package/app/components/ToolPanel.vue +6 -3
  52. package/app/components/ViewToolbar.vue +25 -28
  53. package/app/components/Viewer/ContextMenu/CenterButton.vue +7 -5
  54. package/app/components/Viewer/ContextMenu/CircularItems.vue +3 -3
  55. package/app/components/Viewer/ContextMenu/ContextMenu.vue +22 -19
  56. package/app/components/Viewer/ContextMenu/ContextMenuItem.vue +10 -8
  57. package/app/components/Viewer/ContextMenu/InfoCard.vue +11 -12
  58. package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +13 -17
  59. package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +11 -15
  60. package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +12 -16
  61. package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +8 -12
  62. package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +11 -15
  63. package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +11 -15
  64. package/app/components/Viewer/Generic/Model/BlocksOptions.vue +67 -38
  65. package/app/components/Viewer/Generic/Model/CornersOptions.vue +53 -23
  66. package/app/components/Viewer/Generic/Model/EdgesOptions.vue +1 -3
  67. package/app/components/Viewer/Generic/Model/LinesOptions.vue +67 -38
  68. package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +31 -15
  69. package/app/components/Viewer/Generic/Model/ModelStyleOptions.vue +2 -3
  70. package/app/components/Viewer/Generic/Model/PointsOptions.vue +6 -6
  71. package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +69 -38
  72. package/app/components/Viewer/ObjectTree/Base/CommonTreeView.vue +64 -46
  73. package/app/components/Viewer/ObjectTree/Base/Controls.vue +5 -5
  74. package/app/components/Viewer/ObjectTree/Base/ItemLabel.vue +13 -9
  75. package/app/components/Viewer/ObjectTree/Base/StickyHeader.vue +5 -5
  76. package/app/components/Viewer/ObjectTree/Base/TreeRow.vue +10 -10
  77. package/app/components/Viewer/ObjectTree/Box.vue +6 -4
  78. package/app/components/Viewer/ObjectTree/Layout.vue +23 -21
  79. package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +14 -14
  80. package/app/components/Viewer/ObjectTree/Views/{ModelCollections.vue → ModelTree.vue} +59 -24
  81. package/app/components/Viewer/Options/AttributeColorBar.vue +4 -2
  82. package/app/components/Viewer/Options/AttributeRangeSelector.vue +4 -2
  83. package/app/components/Viewer/Options/AttributeSelector.vue +7 -9
  84. package/app/components/Viewer/Options/ColorMapList.vue +15 -13
  85. package/app/components/Viewer/Options/ColorMapPicker.vue +4 -4
  86. package/app/components/Viewer/Options/ColorPicker.vue +223 -41
  87. package/app/components/Viewer/Options/ColoringTypeSelector.vue +16 -16
  88. package/app/components/Viewer/Options/ColormapQuickPicker.vue +7 -5
  89. package/app/components/Viewer/Options/OptionsSection.vue +1 -1
  90. package/app/components/Viewer/Options/TextureItem.vue +8 -6
  91. package/app/components/Viewer/Options/TexturesSelector.vue +1 -1
  92. package/app/components/Viewer/OverlappingObjectsPicker.vue +8 -9
  93. package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +2 -6
  94. package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +12 -16
  95. package/app/components/Viewer/Surface/PolygonsOptions.vue +12 -16
  96. package/app/components/Viewer/Ui.vue +2 -2
  97. package/app/components/Wrapper.vue +1 -4
  98. package/app/components/ZScaling.vue +5 -3
  99. package/app/components/csv-preview/CsvPreviewer.vue +38 -37
  100. package/app/components/csv-preview/CsvSettings.vue +6 -4
  101. package/app/components/csv-preview/CsvTable.vue +1 -1
  102. package/app/composables/batch_style.ts +5 -6
  103. package/app/composables/clipping_planes_widget.ts +73 -181
  104. package/app/composables/clipping_planes_widget_entries.ts +189 -0
  105. package/app/composables/copy_to_clipboard.ts +7 -0
  106. package/app/composables/global_attribute_style.ts +163 -83
  107. package/app/composables/hover_highlight.ts +46 -14
  108. package/app/composables/model_collections.ts +26 -13
  109. package/app/composables/model_components.ts +26 -13
  110. package/app/composables/project_manager.ts +76 -19
  111. package/app/composables/responsive_middle_truncate.ts +13 -13
  112. package/app/composables/stepper_tree.ts +34 -11
  113. package/app/composables/tree_filter.ts +66 -44
  114. package/app/composables/tree_keyboard_nav.ts +25 -11
  115. package/app/composables/tree_scroll.ts +44 -14
  116. package/app/composables/use_adaptive_styles.ts +66 -23
  117. package/app/composables/use_overlapping_picker.ts +66 -16
  118. package/app/composables/use_quick_colormap.ts +16 -5
  119. package/app/composables/virtual_tree.ts +75 -43
  120. package/app/composables/vtk_implicit_plane_widget.d.ts +2 -0
  121. package/app/plugins/auto_store_register.ts +2 -7
  122. package/app/plugins/click_outside_ignore_snackbars.client.ts +39 -0
  123. package/app/stores/app.ts +57 -192
  124. package/app/stores/app_helpers/extension.ts +179 -0
  125. package/app/stores/back.ts +37 -21
  126. package/app/stores/camera_manager.ts +22 -20
  127. package/app/stores/cloud.ts +17 -13
  128. package/app/stores/data.ts +88 -47
  129. package/app/stores/data_helpers/collections.ts +36 -38
  130. package/app/stores/data_helpers/mesh.ts +45 -36
  131. package/app/stores/data_style.ts +50 -28
  132. package/app/stores/feedback.ts +6 -6
  133. package/app/stores/hybrid_viewer.ts +41 -52
  134. package/app/stores/infra.ts +39 -37
  135. package/app/stores/menu.ts +23 -14
  136. package/app/stores/treeview.ts +72 -42
  137. package/app/stores/viewer.ts +39 -27
  138. package/app/utils/attributes.ts +3 -3
  139. package/app/utils/clipping_planes.ts +111 -14
  140. package/app/utils/color_picker.ts +57 -0
  141. package/app/utils/colormap.ts +58 -35
  142. package/app/utils/default_styles/index.ts +2 -2
  143. package/app/utils/default_styles/meshes.ts +107 -13
  144. package/app/utils/default_styles/models.ts +83 -14
  145. package/app/utils/extension.ts +47 -20
  146. package/app/utils/import_workflow.ts +21 -13
  147. package/app/utils/name_cleaner.ts +1 -1
  148. package/app/utils/string.ts +1 -1
  149. package/app/utils/treeview.ts +2 -2
  150. package/internal/database/base_database.ts +7 -3
  151. package/internal/database/database.ts +36 -26
  152. package/internal/database/extended_database.ts +1 -1
  153. package/internal/stores/data_style/mesh/cells/cell.ts +70 -34
  154. package/internal/stores/data_style/mesh/cells/color.ts +12 -6
  155. package/internal/stores/data_style/mesh/cells/common.ts +18 -8
  156. package/internal/stores/data_style/mesh/cells/index.ts +122 -42
  157. package/internal/stores/data_style/mesh/cells/textures.ts +12 -6
  158. package/internal/stores/data_style/mesh/cells/vertex.ts +75 -34
  159. package/internal/stores/data_style/mesh/cells/visibility.ts +15 -4
  160. package/internal/stores/data_style/mesh/edges/color.ts +12 -6
  161. package/internal/stores/data_style/mesh/edges/common.ts +14 -6
  162. package/internal/stores/data_style/mesh/edges/edge.ts +71 -39
  163. package/internal/stores/data_style/mesh/edges/index.ts +117 -42
  164. package/internal/stores/data_style/mesh/edges/vertex.ts +76 -39
  165. package/internal/stores/data_style/mesh/edges/visibility.ts +15 -4
  166. package/internal/stores/data_style/mesh/edges/width.ts +12 -4
  167. package/internal/stores/data_style/mesh/index.ts +30 -11
  168. package/internal/stores/data_style/mesh/points/color.ts +12 -6
  169. package/internal/stores/data_style/mesh/points/common.ts +21 -8
  170. package/internal/stores/data_style/mesh/points/index.ts +101 -50
  171. package/internal/stores/data_style/mesh/points/size.ts +12 -4
  172. package/internal/stores/data_style/mesh/points/vertex.ts +75 -34
  173. package/internal/stores/data_style/mesh/points/visibility.ts +17 -7
  174. package/internal/stores/data_style/mesh/polygons/color.ts +12 -6
  175. package/internal/stores/data_style/mesh/polygons/common.ts +23 -6
  176. package/internal/stores/data_style/mesh/polygons/index.ts +130 -70
  177. package/internal/stores/data_style/mesh/polygons/polygon.ts +77 -43
  178. package/internal/stores/data_style/mesh/polygons/textures.ts +12 -6
  179. package/internal/stores/data_style/mesh/polygons/vertex.ts +79 -39
  180. package/internal/stores/data_style/mesh/polygons/visibility.ts +16 -6
  181. package/internal/stores/data_style/mesh/polyhedra/color.ts +12 -6
  182. package/internal/stores/data_style/mesh/polyhedra/common.ts +14 -6
  183. package/internal/stores/data_style/mesh/polyhedra/index.ts +115 -56
  184. package/internal/stores/data_style/mesh/polyhedra/polyhedron.ts +80 -39
  185. package/internal/stores/data_style/mesh/polyhedra/vertex.ts +79 -39
  186. package/internal/stores/data_style/mesh/polyhedra/visibility.ts +16 -6
  187. package/internal/stores/data_style/model/blocks/color.ts +43 -13
  188. package/internal/stores/data_style/model/blocks/common.ts +21 -6
  189. package/internal/stores/data_style/model/blocks/index.ts +89 -59
  190. package/internal/stores/data_style/model/blocks/polyhedron.ts +101 -44
  191. package/internal/stores/data_style/model/blocks/vertex.ts +107 -42
  192. package/internal/stores/data_style/model/blocks/visibility.ts +17 -4
  193. package/internal/stores/data_style/model/color.ts +171 -83
  194. package/internal/stores/data_style/model/common.ts +70 -21
  195. package/internal/stores/data_style/model/corners/color.ts +43 -11
  196. package/internal/stores/data_style/model/corners/common.ts +25 -6
  197. package/internal/stores/data_style/model/corners/index.ts +66 -41
  198. package/internal/stores/data_style/model/corners/vertex.ts +105 -74
  199. package/internal/stores/data_style/model/corners/visibility.ts +19 -4
  200. package/internal/stores/data_style/model/edges/common.ts +12 -4
  201. package/internal/stores/data_style/model/edges/index.ts +2 -1
  202. package/internal/stores/data_style/model/edges/visibility.ts +24 -7
  203. package/internal/stores/data_style/model/index.ts +24 -11
  204. package/internal/stores/data_style/model/lines/color.ts +41 -11
  205. package/internal/stores/data_style/model/lines/common.ts +17 -6
  206. package/internal/stores/data_style/model/lines/edge.ts +105 -42
  207. package/internal/stores/data_style/model/lines/index.ts +86 -59
  208. package/internal/stores/data_style/model/lines/vertex.ts +105 -42
  209. package/internal/stores/data_style/model/lines/visibility.ts +17 -4
  210. package/internal/stores/data_style/model/points/common.ts +8 -4
  211. package/internal/stores/data_style/model/points/index.ts +10 -3
  212. package/internal/stores/data_style/model/points/size.ts +12 -4
  213. package/internal/stores/data_style/model/points/visibility.ts +16 -6
  214. package/internal/stores/data_style/model/selection.ts +80 -58
  215. package/internal/stores/data_style/model/surfaces/color.ts +41 -11
  216. package/internal/stores/data_style/model/surfaces/common.ts +23 -6
  217. package/internal/stores/data_style/model/surfaces/index.ts +89 -59
  218. package/internal/stores/data_style/model/surfaces/polygon.ts +107 -67
  219. package/internal/stores/data_style/model/surfaces/vertex.ts +111 -67
  220. package/internal/stores/data_style/model/surfaces/visibility.ts +18 -5
  221. package/internal/stores/data_style/model/visibility.ts +82 -20
  222. package/internal/stores/data_style/state.ts +77 -65
  223. package/internal/stores/hybrid_viewer/brightness.ts +49 -31
  224. package/internal/stores/hybrid_viewer/camera.ts +191 -177
  225. package/internal/stores/hybrid_viewer/camera_animation.ts +11 -10
  226. package/internal/stores/hybrid_viewer/core.ts +64 -0
  227. package/internal/stores/hybrid_viewer/filters.ts +10 -16
  228. package/internal/stores/hybrid_viewer/highlight.ts +91 -130
  229. package/internal/stores/hybrid_viewer/ruler.ts +24 -15
  230. package/internal/stores/hybrid_viewer/scene.ts +96 -117
  231. package/internal/stores/hybrid_viewer/viewport.ts +74 -65
  232. package/internal/stores/hybrid_viewer/vtk_types.ts +13 -29
  233. package/internal/utils/api_fetch.ts +54 -23
  234. package/internal/utils/upload_file.ts +74 -53
  235. package/internal/utils/viewer_call.ts +22 -13
  236. package/internal/utils/ws_client.ts +24 -13
  237. package/nuxt.config.ts +58 -1
  238. package/package.json +20 -8
  239. package/server/api/cloud/extensions/run.post.ts +6 -10
  240. package/server/api/local/app/project_folder_path.post.ts +4 -4
  241. package/server/api/local/app/run_back.post.ts +5 -7
  242. package/server/api/local/app/run_viewer.post.ts +5 -7
  243. package/server/api/local/extensions/kill.post.ts +4 -3
  244. package/server/api/local/extensions/run.post.ts +7 -10
  245. package/server/api/local/extensions/upload.put.ts +44 -54
  246. package/server/api/microservice/app/get_is_app_ready.get.ts +4 -5
  247. package/server/api/microservice/app/set_app_base_url.post.ts +5 -6
  248. package/server/api/microservice/app/set_back_base_url.post.ts +5 -6
  249. package/server/api/microservice/app/set_is_app_ready.post.ts +5 -6
  250. package/server/api/microservice/app/set_viewer_base_url.post.ts +5 -6
  251. package/server/api/microservice/extensions/download.post.ts +5 -4
  252. package/server/api/serverless/run_cloud.post.ts +53 -11
  253. package/server/utils/app_config.ts +29 -22
  254. package/server/utils/cleanup.ts +60 -30
  255. package/server/utils/cloud.ts +9 -8
  256. package/server/utils/extension.ts +23 -9
  257. package/server/utils/microservices.ts +33 -24
  258. package/server/utils/path.ts +4 -4
  259. package/server/utils/scripts.ts +26 -23
  260. package/server/utils/server.ts +2 -2
  261. package/server/utils/server_config.ts +41 -27
  262. package/server/utils/stream.ts +6 -0
  263. package/server/utils/ws_client.ts +42 -8
  264. package/shared/scripts.ts +15 -10
  265. package/shared/utils/call_raw.ts +23 -16
  266. package/shared/utils/call_schema.ts +5 -8
  267. package/shared/utils/fetch_raw.ts +87 -47
  268. package/shared/utils/fetch_schema.ts +6 -9
  269. package/shared/utils/file.ts +8 -2
  270. package/shared/utils/response_handlers/load.ts +26 -11
  271. package/shared/utils/types.ts +9 -9
  272. package/shared/utils/validate_schema.ts +1 -1
  273. package/app/components/Viewer/ObjectTree/Views/ModelComponents.vue +0 -276
  274. package/server/types/vendor.d.ts +0 -64
  275. package/server/utils/server_config.js +0 -43
  276. package/shared/utils/call_raw.js +0 -30
  277. package/shared/utils/fetch_raw.js +0 -40
  278. /package/{opengeodeweb_front_schemas.js → .build/opengeodeweb_front_schemas.js} +0 -0
  279. /package/{server → .build/server}/utils/server.js +0 -0
  280. /package/{shared → .build/shared}/app_mode.js +0 -0
  281. /package/{shared → .build/shared}/utils/parse_boolean.js +0 -0
  282. /package/{shared → .build/shared}/utils/types.js +0 -0
@@ -1,37 +1,47 @@
1
1
  <script setup lang="ts">
2
- // Not auto-fixable (eslint's sort-imports core rule has no autofixer) and this file's import order doesn't match its syntax-kind-then-alphabetical requirement - left as-is rather than manually reordered across the codebase for a purely cosmetic rule.
3
- // oxlint-disable eslint/sort-imports
4
- // This file exhaustively wires group- and per-component style properties (visibility/color/coloring/vertex+polyhedron attributes) to the style store; the formatter's line-wrapping of the resulting store calls pushes the file past max-lines even though no logic was added.
5
- // oxlint-disable eslint/max-lines
2
+ import type { CollectionComponent } from "@ogw_front/stores/data_helpers/collections";
6
3
  import OptionsSection from "@ogw_front/components/Viewer/Options/OptionsSection.vue";
4
+ import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
7
5
  import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
8
6
  import VisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
9
7
  import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json";
10
8
  import { useDataStyleStore } from "@ogw_front/stores/data_style";
11
9
  import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
12
- import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
13
10
 
14
11
  interface Props {
15
12
  modelId: string;
16
13
  blockId?: string;
17
14
  targetBlockIds: string[];
15
+ collections?: CollectionComponent[];
18
16
  }
19
17
 
20
- const { modelId, blockId = undefined, targetBlockIds } = defineProps<Props>();
18
+ const {
19
+ modelId,
20
+ blockId = undefined,
21
+ targetBlockIds,
22
+ collections = undefined,
23
+ } = defineProps<Props>();
21
24
 
22
25
  const dataStyleStore = useDataStyleStore();
23
26
  const hybridViewerStore = useHybridViewerStore();
24
27
 
28
+ const referenceBlockId = computed<string | undefined>(() =>
29
+ collections ? targetBlockIds[0] : undefined,
30
+ );
31
+
25
32
  // Visibility
26
- const blocksVisibility = computed({
27
- get: () => dataStyleStore.modelComponentTypeVisibility(modelId, "Block"),
33
+ const blocksVisibility = computed<boolean>({
34
+ get: () =>
35
+ collections
36
+ ? targetBlockIds.every((id) => dataStyleStore.modelBlockVisibility(modelId, id))
37
+ : dataStyleStore.modelComponentTypeVisibility(modelId, "Block"),
28
38
  set: async (newValue) => {
29
39
  await dataStyleStore.setModelBlocksVisibility(modelId, targetBlockIds, newValue);
30
40
  hybridViewerStore.remoteRender();
31
41
  },
32
42
  });
33
43
 
34
- const blockVisibility = computed({
44
+ const blockVisibility = computed<boolean | undefined>({
35
45
  get: () => dataStyleStore.modelBlockVisibility(modelId, blockId) as boolean | undefined,
36
46
  set: async (newValue) => {
37
47
  if (blockId === undefined) {
@@ -44,7 +54,8 @@ const blockVisibility = computed({
44
54
 
45
55
  // Color
46
56
  const blocksColor = computed<RGBAColor | undefined>({
47
- get: () => dataStyleStore.modelComponentTypeColor(modelId, "Block") as RGBAColor | undefined,
57
+ get: () =>
58
+ dataStyleStore.modelBlockColor(modelId, referenceBlockId.value) as RGBAColor | undefined,
48
59
  set: async (color) => {
49
60
  await dataStyleStore.setModelBlocksColor(modelId, targetBlockIds, color);
50
61
  hybridViewerStore.remoteRender();
@@ -64,12 +75,25 @@ const blockColor = computed<RGBAColor | undefined>({
64
75
 
65
76
  const blocksActiveColoring = computed<string | undefined>({
66
77
  get: () =>
67
- dataStyleStore.getModelComponentTypeActiveColoring(modelId, "Block") as string | undefined,
78
+ dataStyleStore.modelBlockActiveColoring(modelId, referenceBlockId.value) as string | undefined,
68
79
  set: async (coloringType) => {
69
80
  if (typeof coloringType !== "string") {
70
81
  return;
71
82
  }
72
- await dataStyleStore.setModelBlocksActiveColoring(modelId, targetBlockIds, coloringType);
83
+ if (collections && coloringType === "random") {
84
+ await Promise.all(
85
+ collections.map((collection) =>
86
+ dataStyleStore.setModelBlocksActiveColoring(
87
+ modelId,
88
+ collection.children.map((child) => child.id),
89
+ coloringType,
90
+ collection.id,
91
+ ),
92
+ ),
93
+ );
94
+ } else {
95
+ await dataStyleStore.setModelBlocksActiveColoring(modelId, targetBlockIds, coloringType);
96
+ }
73
97
  hybridViewerStore.remoteRender();
74
98
  },
75
99
  });
@@ -86,8 +110,8 @@ const blockActiveColoring = computed<string | undefined>({
86
110
  });
87
111
 
88
112
  // Group Attributes
89
- const blocksVertexAttributeName = computed({
90
- get: () => dataStyleStore.modelBlocksVertexAttributeName(modelId),
113
+ const blocksVertexAttributeName = computed<string | undefined>({
114
+ get: () => dataStyleStore.modelBlocksVertexAttributeName(modelId, referenceBlockId.value),
91
115
  set: async (newValue) => {
92
116
  if (newValue === undefined) {
93
117
  return;
@@ -97,16 +121,16 @@ const blocksVertexAttributeName = computed({
97
121
  },
98
122
  });
99
123
 
100
- const blocksVertexAttributeItem = computed({
101
- get: () => dataStyleStore.modelBlocksVertexAttributeItem(modelId),
124
+ const blocksVertexAttributeItem = computed<string | undefined>({
125
+ get: () => dataStyleStore.modelBlocksVertexAttributeItem(modelId, referenceBlockId.value),
102
126
  set: async (newValue) => {
103
127
  await dataStyleStore.setModelBlocksVertexAttributeItem(modelId, targetBlockIds, newValue);
104
128
  hybridViewerStore.remoteRender();
105
129
  },
106
130
  });
107
131
 
108
- const blocksVertexAttributeRange = computed({
109
- get: () => dataStyleStore.modelBlocksVertexAttributeRange(modelId),
132
+ const blocksVertexAttributeRange = computed<[number, number] | undefined>({
133
+ get: () => dataStyleStore.modelBlocksVertexAttributeRange(modelId, referenceBlockId.value),
110
134
  set: async (newValue) => {
111
135
  const [minimum, maximum] = newValue;
112
136
  if (minimum === undefined || maximum === undefined) {
@@ -122,8 +146,8 @@ const blocksVertexAttributeRange = computed({
122
146
  },
123
147
  });
124
148
 
125
- const blocksVertexAttributeColorMap = computed({
126
- get: () => dataStyleStore.modelBlocksVertexAttributeColorMap(modelId),
149
+ const blocksVertexAttributeColorMap = computed<Map<string, RGBAColor> | undefined>({
150
+ get: () => dataStyleStore.modelBlocksVertexAttributeColorMap(modelId, referenceBlockId.value),
127
151
  set: async (newValue) => {
128
152
  await dataStyleStore.setModelBlocksVertexAttributeColorMap(modelId, targetBlockIds, newValue);
129
153
  hybridViewerStore.remoteRender();
@@ -131,7 +155,10 @@ const blocksVertexAttributeColorMap = computed({
131
155
  });
132
156
 
133
157
  const blocksVertexAttributeNoDataColor = computed<RGBAColor | undefined>({
134
- get: () => dataStyleStore.modelBlocksVertexAttributeNoDataColor(modelId) as RGBAColor | undefined,
158
+ get: () =>
159
+ dataStyleStore.modelBlocksVertexAttributeNoDataColor(modelId, referenceBlockId.value) as
160
+ | RGBAColor
161
+ | undefined,
135
162
  set: async (newValue) => {
136
163
  await dataStyleStore.setModelBlocksVertexAttributeNoDataColor(
137
164
  modelId,
@@ -142,8 +169,8 @@ const blocksVertexAttributeNoDataColor = computed<RGBAColor | undefined>({
142
169
  },
143
170
  });
144
171
 
145
- const blocksPolyhedronAttributeName = computed({
146
- get: () => dataStyleStore.modelBlocksPolyhedronAttributeName(modelId),
172
+ const blocksPolyhedronAttributeName = computed<string | undefined>({
173
+ get: () => dataStyleStore.modelBlocksPolyhedronAttributeName(modelId, referenceBlockId.value),
147
174
  set: async (newValue) => {
148
175
  if (newValue === undefined) {
149
176
  return;
@@ -153,16 +180,16 @@ const blocksPolyhedronAttributeName = computed({
153
180
  },
154
181
  });
155
182
 
156
- const blocksPolyhedronAttributeItem = computed({
157
- get: () => dataStyleStore.modelBlocksPolyhedronAttributeItem(modelId),
183
+ const blocksPolyhedronAttributeItem = computed<string | undefined>({
184
+ get: () => dataStyleStore.modelBlocksPolyhedronAttributeItem(modelId, referenceBlockId.value),
158
185
  set: async (newValue) => {
159
186
  await dataStyleStore.setModelBlocksPolyhedronAttributeItem(modelId, targetBlockIds, newValue);
160
187
  hybridViewerStore.remoteRender();
161
188
  },
162
189
  });
163
190
 
164
- const blocksPolyhedronAttributeRange = computed({
165
- get: () => dataStyleStore.modelBlocksPolyhedronAttributeRange(modelId),
191
+ const blocksPolyhedronAttributeRange = computed<[number, number] | undefined>({
192
+ get: () => dataStyleStore.modelBlocksPolyhedronAttributeRange(modelId, referenceBlockId.value),
166
193
  set: async (newValue) => {
167
194
  const [minimum, maximum] = newValue;
168
195
  if (minimum === undefined || maximum === undefined) {
@@ -178,8 +205,8 @@ const blocksPolyhedronAttributeRange = computed({
178
205
  },
179
206
  });
180
207
 
181
- const blocksPolyhedronAttributeColorMap = computed({
182
- get: () => dataStyleStore.modelBlocksPolyhedronAttributeColorMap(modelId),
208
+ const blocksPolyhedronAttributeColorMap = computed<Map<string, RGBAColor> | undefined>({
209
+ get: () => dataStyleStore.modelBlocksPolyhedronAttributeColorMap(modelId, referenceBlockId.value),
183
210
  set: async (newValue) => {
184
211
  await dataStyleStore.setModelBlocksPolyhedronAttributeColorMap(
185
212
  modelId,
@@ -192,7 +219,9 @@ const blocksPolyhedronAttributeColorMap = computed({
192
219
 
193
220
  const blocksPolyhedronAttributeNoDataColor = computed<RGBAColor | undefined>({
194
221
  get: () =>
195
- dataStyleStore.modelBlocksPolyhedronAttributeNoDataColor(modelId) as RGBAColor | undefined,
222
+ dataStyleStore.modelBlocksPolyhedronAttributeNoDataColor(modelId, referenceBlockId.value) as
223
+ | RGBAColor
224
+ | undefined,
196
225
  set: async (newValue) => {
197
226
  await dataStyleStore.setModelBlocksPolyhedronAttributeNoDataColor(
198
227
  modelId,
@@ -204,7 +233,7 @@ const blocksPolyhedronAttributeNoDataColor = computed<RGBAColor | undefined>({
204
233
  });
205
234
 
206
235
  // Individual Attributes
207
- const vertexAttributeName = computed({
236
+ const vertexAttributeName = computed<string | undefined>({
208
237
  get: () => dataStyleStore.modelBlocksVertexAttributeName(modelId, blockId),
209
238
  set: async (newValue) => {
210
239
  if (blockId === undefined || newValue === undefined) {
@@ -215,7 +244,7 @@ const vertexAttributeName = computed({
215
244
  },
216
245
  });
217
246
 
218
- const vertexAttributeItem = computed({
247
+ const vertexAttributeItem = computed<string | undefined>({
219
248
  get: () => dataStyleStore.modelBlocksVertexAttributeItem(modelId, blockId),
220
249
  set: async (newValue) => {
221
250
  if (blockId === undefined) {
@@ -226,7 +255,7 @@ const vertexAttributeItem = computed({
226
255
  },
227
256
  });
228
257
 
229
- const vertexAttributeRange = computed({
258
+ const vertexAttributeRange = computed<[number, number] | undefined>({
230
259
  get: () => dataStyleStore.modelBlocksVertexAttributeRange(modelId, blockId),
231
260
  set: async (newValue) => {
232
261
  const [minimum, maximum] = newValue;
@@ -238,7 +267,7 @@ const vertexAttributeRange = computed({
238
267
  },
239
268
  });
240
269
 
241
- const vertexAttributeColorMap = computed({
270
+ const vertexAttributeColorMap = computed<Map<string, RGBAColor> | undefined>({
242
271
  get: () => dataStyleStore.modelBlocksVertexAttributeColorMap(modelId, blockId),
243
272
  set: async (newValue) => {
244
273
  if (blockId === undefined) {
@@ -261,7 +290,7 @@ const vertexAttributeNoDataColor = computed<RGBAColor | undefined>({
261
290
  },
262
291
  });
263
292
 
264
- const polyhedronAttributeName = computed({
293
+ const polyhedronAttributeName = computed<string | undefined>({
265
294
  get: () => dataStyleStore.modelBlocksPolyhedronAttributeName(modelId, blockId),
266
295
  set: async (newValue) => {
267
296
  if (blockId === undefined || newValue === undefined) {
@@ -272,7 +301,7 @@ const polyhedronAttributeName = computed({
272
301
  },
273
302
  });
274
303
 
275
- const polyhedronAttributeItem = computed({
304
+ const polyhedronAttributeItem = computed<string | undefined>({
276
305
  get: () => dataStyleStore.modelBlocksPolyhedronAttributeItem(modelId, blockId),
277
306
  set: async (newValue) => {
278
307
  if (blockId === undefined) {
@@ -283,7 +312,7 @@ const polyhedronAttributeItem = computed({
283
312
  },
284
313
  });
285
314
 
286
- const polyhedronAttributeRange = computed({
315
+ const polyhedronAttributeRange = computed<[number, number] | undefined>({
287
316
  get: () => dataStyleStore.modelBlocksPolyhedronAttributeRange(modelId, blockId),
288
317
  set: async (newValue) => {
289
318
  const [minimum, maximum] = newValue;
@@ -300,7 +329,7 @@ const polyhedronAttributeRange = computed({
300
329
  },
301
330
  });
302
331
 
303
- const polyhedronAttributeColorMap = computed({
332
+ const polyhedronAttributeColorMap = computed<Map<string, RGBAColor> | undefined>({
304
333
  get: () => dataStyleStore.modelBlocksPolyhedronAttributeColorMap(modelId, blockId),
305
334
  set: async (newValue) => {
306
335
  if (blockId === undefined) {
@@ -1,35 +1,47 @@
1
1
  <script setup lang="ts">
2
- // Not auto-fixable (eslint's sort-imports core rule has no autofixer) and this file's import order doesn't match its syntax-kind-then-alphabetical requirement - left as-is rather than manually reordered across the codebase for a purely cosmetic rule.
3
- // oxlint-disable eslint/sort-imports
2
+ import type { CollectionComponent } from "@ogw_front/stores/data_helpers/collections";
4
3
  import OptionsSection from "@ogw_front/components/Viewer/Options/OptionsSection.vue";
4
+ import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
5
5
  import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
6
6
  import VisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
7
7
  import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json";
8
8
  import { useDataStyleStore } from "@ogw_front/stores/data_style";
9
9
  import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
10
- import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
11
10
 
12
11
  interface Props {
13
12
  modelId: string;
14
13
  cornerId?: string;
15
14
  targetCornerIds: string[];
15
+ collections?: CollectionComponent[];
16
16
  }
17
17
 
18
- const { modelId, cornerId = undefined, targetCornerIds } = defineProps<Props>();
18
+ const {
19
+ modelId,
20
+ cornerId = undefined,
21
+ targetCornerIds,
22
+ collections = undefined,
23
+ } = defineProps<Props>();
19
24
 
20
25
  const dataStyleStore = useDataStyleStore();
21
26
  const hybridViewerStore = useHybridViewerStore();
22
27
 
28
+ const referenceCornerId = computed<string | undefined>(() =>
29
+ collections ? targetCornerIds[0] : undefined,
30
+ );
31
+
23
32
  // Visibility
24
- const cornersVisibility = computed({
25
- get: () => dataStyleStore.modelComponentTypeVisibility(modelId, "Corner"),
33
+ const cornersVisibility = computed<boolean>({
34
+ get: () =>
35
+ collections
36
+ ? targetCornerIds.every((id) => dataStyleStore.modelCornerVisibility(modelId, id))
37
+ : dataStyleStore.modelComponentTypeVisibility(modelId, "Corner"),
26
38
  set: async (newValue) => {
27
39
  await dataStyleStore.setModelCornersVisibility(modelId, targetCornerIds, newValue);
28
40
  hybridViewerStore.remoteRender();
29
41
  },
30
42
  });
31
43
 
32
- const cornerVisibility = computed({
44
+ const cornerVisibility = computed<boolean | undefined>({
33
45
  get: () => dataStyleStore.modelCornerVisibility(modelId, cornerId) as boolean | undefined,
34
46
  set: async (newValue) => {
35
47
  if (cornerId === undefined) {
@@ -42,7 +54,8 @@ const cornerVisibility = computed({
42
54
 
43
55
  // Color
44
56
  const cornersColor = computed<RGBAColor | undefined>({
45
- get: () => dataStyleStore.modelComponentTypeColor(modelId, "Corner") as RGBAColor | undefined,
57
+ get: () =>
58
+ dataStyleStore.modelCornerColor(modelId, referenceCornerId.value) as RGBAColor | undefined,
46
59
  set: async (color) => {
47
60
  await dataStyleStore.setModelCornersColor(modelId, targetCornerIds, color);
48
61
  hybridViewerStore.remoteRender();
@@ -62,12 +75,27 @@ const cornerColor = computed<RGBAColor | undefined>({
62
75
 
63
76
  const cornersActiveColoring = computed<string | undefined>({
64
77
  get: () =>
65
- dataStyleStore.getModelComponentTypeActiveColoring(modelId, "Corner") as string | undefined,
78
+ dataStyleStore.modelCornerActiveColoring(modelId, referenceCornerId.value) as
79
+ | string
80
+ | undefined,
66
81
  set: async (coloringType) => {
67
82
  if (typeof coloringType !== "string") {
68
83
  return;
69
84
  }
70
- await dataStyleStore.setModelCornersActiveColoring(modelId, targetCornerIds, coloringType);
85
+ if (collections && coloringType === "random") {
86
+ await Promise.all(
87
+ collections.map((collection) =>
88
+ dataStyleStore.setModelCornersActiveColoring(
89
+ modelId,
90
+ collection.children.map((child) => child.id),
91
+ coloringType,
92
+ collection.id,
93
+ ),
94
+ ),
95
+ );
96
+ } else {
97
+ await dataStyleStore.setModelCornersActiveColoring(modelId, targetCornerIds, coloringType);
98
+ }
71
99
  hybridViewerStore.remoteRender();
72
100
  },
73
101
  });
@@ -84,8 +112,8 @@ const cornerActiveColoring = computed<string | undefined>({
84
112
  });
85
113
 
86
114
  // Group Attributes
87
- const cornersVertexAttributeName = computed({
88
- get: () => dataStyleStore.modelCornersVertexAttributeName(modelId),
115
+ const cornersVertexAttributeName = computed<string | undefined>({
116
+ get: () => dataStyleStore.modelCornersVertexAttributeName(modelId, referenceCornerId.value),
89
117
  set: async (newValue) => {
90
118
  if (newValue === undefined) {
91
119
  return;
@@ -95,16 +123,16 @@ const cornersVertexAttributeName = computed({
95
123
  },
96
124
  });
97
125
 
98
- const cornersVertexAttributeItem = computed({
99
- get: () => dataStyleStore.modelCornersVertexAttributeItem(modelId),
126
+ const cornersVertexAttributeItem = computed<string | undefined>({
127
+ get: () => dataStyleStore.modelCornersVertexAttributeItem(modelId, referenceCornerId.value),
100
128
  set: async (newValue) => {
101
129
  await dataStyleStore.setModelCornersVertexAttributeItem(modelId, targetCornerIds, newValue);
102
130
  hybridViewerStore.remoteRender();
103
131
  },
104
132
  });
105
133
 
106
- const cornersVertexAttributeRange = computed({
107
- get: () => dataStyleStore.modelCornersVertexAttributeRange(modelId),
134
+ const cornersVertexAttributeRange = computed<[number, number] | undefined>({
135
+ get: () => dataStyleStore.modelCornersVertexAttributeRange(modelId, referenceCornerId.value),
108
136
  set: async (newValue) => {
109
137
  const [minimum, maximum] = newValue;
110
138
  if (minimum === undefined || maximum === undefined) {
@@ -120,8 +148,8 @@ const cornersVertexAttributeRange = computed({
120
148
  },
121
149
  });
122
150
 
123
- const cornersVertexAttributeColorMap = computed({
124
- get: () => dataStyleStore.modelCornersVertexAttributeColorMap(modelId),
151
+ const cornersVertexAttributeColorMap = computed<ColorMap | undefined>({
152
+ get: () => dataStyleStore.modelCornersVertexAttributeColorMap(modelId, referenceCornerId.value),
125
153
  set: async (newValue) => {
126
154
  await dataStyleStore.setModelCornersVertexAttributeColorMap(modelId, targetCornerIds, newValue);
127
155
  hybridViewerStore.remoteRender();
@@ -130,7 +158,9 @@ const cornersVertexAttributeColorMap = computed({
130
158
 
131
159
  const cornersVertexAttributeNoDataColor = computed<RGBAColor | undefined>({
132
160
  get: () =>
133
- dataStyleStore.modelCornersVertexAttributeNoDataColor(modelId) as RGBAColor | undefined,
161
+ dataStyleStore.modelCornersVertexAttributeNoDataColor(modelId, referenceCornerId.value) as
162
+ | RGBAColor
163
+ | undefined,
134
164
  set: async (newValue) => {
135
165
  await dataStyleStore.setModelCornersVertexAttributeNoDataColor(
136
166
  modelId,
@@ -142,7 +172,7 @@ const cornersVertexAttributeNoDataColor = computed<RGBAColor | undefined>({
142
172
  });
143
173
 
144
174
  // Individual Attributes
145
- const vertexAttributeName = computed({
175
+ const vertexAttributeName = computed<string | undefined>({
146
176
  get: () => dataStyleStore.modelCornersVertexAttributeName(modelId, cornerId),
147
177
  set: async (newValue) => {
148
178
  if (cornerId === undefined || newValue === undefined) {
@@ -153,7 +183,7 @@ const vertexAttributeName = computed({
153
183
  },
154
184
  });
155
185
 
156
- const vertexAttributeItem = computed({
186
+ const vertexAttributeItem = computed<string | undefined>({
157
187
  get: () => dataStyleStore.modelCornersVertexAttributeItem(modelId, cornerId),
158
188
  set: async (newValue) => {
159
189
  if (cornerId === undefined) {
@@ -164,7 +194,7 @@ const vertexAttributeItem = computed({
164
194
  },
165
195
  });
166
196
 
167
- const vertexAttributeRange = computed({
197
+ const vertexAttributeRange = computed<[number, number] | undefined>({
168
198
  get: () => dataStyleStore.modelCornersVertexAttributeRange(modelId, cornerId),
169
199
  set: async (newValue) => {
170
200
  const [minimum, maximum] = newValue;
@@ -176,7 +206,7 @@ const vertexAttributeRange = computed({
176
206
  },
177
207
  });
178
208
 
179
- const vertexAttributeColorMap = computed({
209
+ const vertexAttributeColorMap = computed<ColorMap | undefined>({
180
210
  get: () => dataStyleStore.modelCornersVertexAttributeColorMap(modelId, cornerId),
181
211
  set: async (newValue) => {
182
212
  if (cornerId === undefined) {
@@ -1,11 +1,9 @@
1
1
  <script setup lang="ts">
2
- import SurfaceEdges from "@ogw_front/assets/viewer_svgs/surface_edges.svg";
3
- // oxlint-disable import/consistent-type-specifier-style -- combining the default import with the type import avoids a duplicate-imports violation on this same module; using disable-next-line here is fragile because a formatter can re-wrap the import onto multiple lines and shift the flagged line
4
2
  import ViewerContextMenuItem, {
5
3
  type ItemProps,
6
4
  } from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
5
+ import SurfaceEdges from "@ogw_front/assets/viewer_svgs/surface_edges.svg";
7
6
  import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
8
-
9
7
  import { useBatchStyle } from "@ogw_front/composables/batch_style";
10
8
  import { useDataStyleStore } from "@ogw_front/stores/data_style";
11
9
  import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";