@geode/opengeodeweb-front 10.6.2 → 10.6.3-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 (235) hide show
  1. package/.eslintrc.cjs +1 -1
  2. package/.oxlintrc.json +3 -22
  3. package/app/assets/geode_objects.js +26 -26
  4. package/app/components/Carousel.vue +62 -66
  5. package/app/components/CrsSelector.vue +48 -52
  6. package/app/components/DeleteDialog.vue +21 -37
  7. package/app/components/DragAndDrop.vue +35 -41
  8. package/app/components/ExtensionSelector.vue +50 -63
  9. package/app/components/FeedBack/ErrorBanner.vue +7 -10
  10. package/app/components/FeedBack/Snackers.vue +12 -14
  11. package/app/components/FetchingData.vue +1 -6
  12. package/app/components/FileSelector.vue +41 -47
  13. package/app/components/FileUploader.vue +62 -79
  14. package/app/components/GlassCard.vue +19 -19
  15. package/app/components/HybridRenderingView.vue +37 -38
  16. package/app/components/InfraConnected.vue +3 -3
  17. package/app/components/Inspector/InspectionButton.vue +27 -31
  18. package/app/components/Inspector/ResultPanel.vue +13 -24
  19. package/app/components/Launcher.vue +13 -13
  20. package/app/components/Loading.vue +63 -69
  21. package/app/components/MissingFilesSelector.vue +53 -73
  22. package/app/components/ObjectSelector.vue +81 -99
  23. package/app/components/PackagesVersions.vue +27 -30
  24. package/app/components/Recaptcha.vue +60 -71
  25. package/app/components/RemoteRenderingView.vue +102 -108
  26. package/app/components/Screenshot.vue +36 -42
  27. package/app/components/SearchBar.vue +5 -5
  28. package/app/components/Step.vue +37 -44
  29. package/app/components/Stepper.vue +29 -35
  30. package/app/components/VeaseViewToolbar.vue +69 -78
  31. package/app/components/ViewToolbar.vue +41 -45
  32. package/app/components/Viewer/BreadCrumb.vue +18 -30
  33. package/app/components/Viewer/ContextMenu.vue +176 -179
  34. package/app/components/Viewer/ContextMenuItem.vue +105 -117
  35. package/app/components/Viewer/EdgedCurve/PointsOptions.vue +6 -9
  36. package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +82 -93
  37. package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +84 -99
  38. package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +83 -98
  39. package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +62 -73
  40. package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +84 -108
  41. package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +82 -105
  42. package/app/components/Viewer/Generic/Model/EdgesOptions.vue +19 -23
  43. package/app/components/Viewer/Generic/Model/PointsOptions.vue +26 -30
  44. package/app/components/Viewer/Grid/2D/CellsOptions.vue +5 -5
  45. package/app/components/Viewer/Grid/2D/EdgesOptions.vue +6 -9
  46. package/app/components/Viewer/Grid/2D/PointsOptions.vue +6 -9
  47. package/app/components/Viewer/Grid/3D/CellsOptions.vue +5 -5
  48. package/app/components/Viewer/Grid/3D/EdgesOptions.vue +6 -9
  49. package/app/components/Viewer/Grid/3D/FacetsOptions.vue +5 -5
  50. package/app/components/Viewer/Grid/3D/PointsOptions.vue +6 -9
  51. package/app/components/Viewer/HybridSolid/EdgesOptions.vue +6 -9
  52. package/app/components/Viewer/HybridSolid/PointsOptions.vue +6 -9
  53. package/app/components/Viewer/HybridSolid/PolygonsOptions.vue +6 -9
  54. package/app/components/Viewer/HybridSolid/PolyhedraOptions.vue +6 -9
  55. package/app/components/Viewer/Options/AttributeColorBar.vue +8 -8
  56. package/app/components/Viewer/Options/AttributeSelector.vue +73 -78
  57. package/app/components/Viewer/Options/ColorMapList.vue +115 -140
  58. package/app/components/Viewer/Options/ColorMapPicker.vue +128 -142
  59. package/app/components/Viewer/Options/ColorPicker.vue +9 -9
  60. package/app/components/Viewer/Options/ColoringTypeSelector.vue +77 -91
  61. package/app/components/Viewer/Options/TextureItem.vue +54 -58
  62. package/app/components/Viewer/Options/TexturesSelector.vue +22 -26
  63. package/app/components/Viewer/Options/VisibilitySwitch.vue +1 -1
  64. package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +61 -68
  65. package/app/components/Viewer/PolygonalSurface/EdgesOptions.vue +6 -9
  66. package/app/components/Viewer/PolygonalSurface/PointsOptions.vue +6 -9
  67. package/app/components/Viewer/PolygonalSurface/SpecificPolygonsOptions.vue +83 -103
  68. package/app/components/Viewer/Solid/EdgesOptions.vue +6 -9
  69. package/app/components/Viewer/Solid/PointsOptions.vue +6 -9
  70. package/app/components/Viewer/Solid/PolygonsOptions.vue +6 -9
  71. package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +82 -105
  72. package/app/components/Viewer/TetrahedralSolid/TetrahedraOptions.vue +5 -5
  73. package/app/components/Viewer/TetrahedralSolid/TrianglesOptions.vue +5 -5
  74. package/app/components/Viewer/Tree/ObjectTree.vue +80 -89
  75. package/app/components/Viewer/TreeComponent.vue +43 -49
  76. package/app/components/Viewer/TreeObject.vue +48 -50
  77. package/app/components/Viewer/TriangulatedSurface/EdgesOptions.vue +6 -9
  78. package/app/components/Viewer/TriangulatedSurface/PointsOptions.vue +5 -5
  79. package/app/components/Viewer/TriangulatedSurface/TrianglesOptions.vue +5 -5
  80. package/app/components/Wrapper.vue +8 -8
  81. package/app/components/ZScaling.vue +18 -27
  82. package/app/composables/project_manager.js +57 -67
  83. package/app/composables/run_function_when_microservices_connected.js +8 -8
  84. package/app/plugins/auto_store_register.js +11 -13
  85. package/app/stores/app.js +118 -138
  86. package/app/stores/data.js +52 -68
  87. package/app/stores/data_style.js +36 -36
  88. package/app/stores/feedback.js +17 -20
  89. package/app/stores/geode.js +54 -55
  90. package/app/stores/hybrid_viewer.js +164 -177
  91. package/app/stores/infra.js +45 -55
  92. package/app/stores/lambda.js +26 -26
  93. package/app/stores/menu.js +78 -85
  94. package/app/stores/treeview.js +57 -65
  95. package/app/stores/viewer.js +92 -104
  96. package/app/utils/colormap.js +3 -3
  97. package/app/utils/config.js +16 -22
  98. package/app/utils/default_styles.js +50 -62
  99. package/app/utils/extension.js +44 -44
  100. package/app/utils/file_import_workflow.js +50 -64
  101. package/app/utils/local/app_mode.js +2 -2
  102. package/app/utils/local/cleanup.js +66 -72
  103. package/app/utils/local/microservices.js +61 -71
  104. package/app/utils/local/path.js +16 -19
  105. package/app/utils/local/scripts.js +22 -22
  106. package/app/utils/recaptcha.js +6 -6
  107. package/app/utils/server.js +21 -24
  108. package/app/utils/status.js +2 -2
  109. package/app/utils/treeview.js +4 -4
  110. package/app/utils/validate_schema.js +7 -7
  111. package/commitlint.config.js +2 -2
  112. package/eslint.config.js +4 -4
  113. package/internal/database/database.js +38 -46
  114. package/internal/database/extended_database.js +9 -10
  115. package/internal/database/tables/data.js +2 -3
  116. package/internal/database/tables/model_components.js +1 -1
  117. package/internal/database/tables/model_components_relation.js +1 -1
  118. package/internal/stores/data_style/mesh/cells/cell.js +47 -63
  119. package/internal/stores/data_style/mesh/cells/color.js +11 -16
  120. package/internal/stores/data_style/mesh/cells/common.js +6 -6
  121. package/internal/stores/data_style/mesh/cells/index.js +37 -47
  122. package/internal/stores/data_style/mesh/cells/textures.js +11 -12
  123. package/internal/stores/data_style/mesh/cells/vertex.js +47 -58
  124. package/internal/stores/data_style/mesh/cells/visibility.js +11 -16
  125. package/internal/stores/data_style/mesh/edges/color.js +11 -16
  126. package/internal/stores/data_style/mesh/edges/common.js +6 -6
  127. package/internal/stores/data_style/mesh/edges/edge.js +47 -63
  128. package/internal/stores/data_style/mesh/edges/index.js +38 -52
  129. package/internal/stores/data_style/mesh/edges/vertex.js +47 -58
  130. package/internal/stores/data_style/mesh/edges/visibility.js +11 -16
  131. package/internal/stores/data_style/mesh/edges/width.js +11 -16
  132. package/internal/stores/data_style/mesh/index.js +34 -34
  133. package/internal/stores/data_style/mesh/points/color.js +11 -16
  134. package/internal/stores/data_style/mesh/points/common.js +6 -6
  135. package/internal/stores/data_style/mesh/points/index.js +35 -49
  136. package/internal/stores/data_style/mesh/points/size.js +11 -16
  137. package/internal/stores/data_style/mesh/points/vertex.js +47 -58
  138. package/internal/stores/data_style/mesh/points/visibility.js +11 -16
  139. package/internal/stores/data_style/mesh/polygons/color.js +11 -16
  140. package/internal/stores/data_style/mesh/polygons/common.js +6 -6
  141. package/internal/stores/data_style/mesh/polygons/index.js +36 -45
  142. package/internal/stores/data_style/mesh/polygons/polygon.js +45 -56
  143. package/internal/stores/data_style/mesh/polygons/textures.js +11 -16
  144. package/internal/stores/data_style/mesh/polygons/vertex.js +47 -58
  145. package/internal/stores/data_style/mesh/polygons/visibility.js +11 -16
  146. package/internal/stores/data_style/mesh/polyhedra/color.js +11 -16
  147. package/internal/stores/data_style/mesh/polyhedra/common.js +6 -6
  148. package/internal/stores/data_style/mesh/polyhedra/index.js +29 -42
  149. package/internal/stores/data_style/mesh/polyhedra/polyhedron.js +43 -47
  150. package/internal/stores/data_style/mesh/polyhedra/vertex.js +47 -58
  151. package/internal/stores/data_style/mesh/polyhedra/visibility.js +11 -17
  152. package/internal/stores/data_style/model/blocks/color.js +21 -24
  153. package/internal/stores/data_style/model/blocks/common.js +6 -6
  154. package/internal/stores/data_style/model/blocks/index.js +13 -17
  155. package/internal/stores/data_style/model/blocks/visibility.js +21 -24
  156. package/internal/stores/data_style/model/corners/color.js +21 -24
  157. package/internal/stores/data_style/model/corners/common.js +6 -6
  158. package/internal/stores/data_style/model/corners/index.js +14 -18
  159. package/internal/stores/data_style/model/corners/visibility.js +21 -25
  160. package/internal/stores/data_style/model/edges/common.js +4 -4
  161. package/internal/stores/data_style/model/edges/index.js +7 -7
  162. package/internal/stores/data_style/model/edges/visibility.js +11 -15
  163. package/internal/stores/data_style/model/index.js +84 -100
  164. package/internal/stores/data_style/model/lines/color.js +21 -24
  165. package/internal/stores/data_style/model/lines/common.js +6 -6
  166. package/internal/stores/data_style/model/lines/index.js +13 -17
  167. package/internal/stores/data_style/model/lines/visibility.js +21 -24
  168. package/internal/stores/data_style/model/points/common.js +4 -4
  169. package/internal/stores/data_style/model/points/index.js +9 -9
  170. package/internal/stores/data_style/model/points/size.js +11 -11
  171. package/internal/stores/data_style/model/points/visibility.js +11 -15
  172. package/internal/stores/data_style/model/surfaces/color.js +21 -24
  173. package/internal/stores/data_style/model/surfaces/common.js +6 -6
  174. package/internal/stores/data_style/model/surfaces/index.js +14 -22
  175. package/internal/stores/data_style/model/surfaces/visibility.js +18 -22
  176. package/internal/stores/data_style/state.js +11 -11
  177. package/internal/utils/api_fetch.js +24 -34
  178. package/internal/utils/upload_file.js +19 -24
  179. package/internal/utils/viewer_call.js +23 -36
  180. package/nuxt.config.js +7 -11
  181. package/package.json +3 -3
  182. package/scripts/generate_geode_objects.js +14 -16
  183. package/server/api/app/kill.post.js +4 -4
  184. package/server/api/app/project_folder_path.post.js +11 -11
  185. package/server/api/app/run_back.post.js +12 -12
  186. package/server/api/app/run_viewer.post.js +12 -12
  187. package/server/api/extensions/run.post.js +34 -41
  188. package/server/api/extensions/upload.put.js +48 -62
  189. package/tests/integration/setup.js +43 -53
  190. package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +90 -116
  191. package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +81 -107
  192. package/tests/integration/stores/data_style/mesh/index.nuxt.test.js +38 -41
  193. package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +85 -101
  194. package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +89 -113
  195. package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +81 -105
  196. package/tests/integration/stores/data_style/model/blocks.nuxt.test.js +56 -73
  197. package/tests/integration/stores/data_style/model/corners.nuxt.test.js +59 -76
  198. package/tests/integration/stores/data_style/model/edges.nuxt.test.js +39 -42
  199. package/tests/integration/stores/data_style/model/index.nuxt.test.js +31 -34
  200. package/tests/integration/stores/data_style/model/lines.nuxt.test.js +60 -73
  201. package/tests/integration/stores/data_style/model/points.nuxt.test.js +52 -55
  202. package/tests/integration/stores/data_style/model/surfaces.nuxt.test.js +59 -80
  203. package/tests/integration/stores/viewer.nuxt.test.js +35 -38
  204. package/tests/setup_indexeddb.js +2 -2
  205. package/tests/unit/components/CrsSelector.nuxt.test.js +28 -28
  206. package/tests/unit/components/ExtensionSelector.nuxt.test.js +33 -35
  207. package/tests/unit/components/FeedBack/ErrorsBanner.nuxt.test.js +23 -23
  208. package/tests/unit/components/FeedBack/Snackers.nuxt.test.js +18 -18
  209. package/tests/unit/components/FileSelector.nuxt.test.js +57 -59
  210. package/tests/unit/components/FileUploader.nuxt.test.js +35 -39
  211. package/tests/unit/components/Inspector/InspectionButton.nuxt.test.js +28 -28
  212. package/tests/unit/components/Inspector/ResultPanel.nuxt.test.js +22 -27
  213. package/tests/unit/components/Launcher.nuxt.test.js +20 -22
  214. package/tests/unit/components/MissingFilesSelector.nuxt.test.js +37 -37
  215. package/tests/unit/components/ObjectSelector.nuxt.test.js +62 -62
  216. package/tests/unit/components/PackagesVersions.nuxt.test.js +16 -16
  217. package/tests/unit/components/Step.nuxt.test.js +18 -19
  218. package/tests/unit/components/Stepper.nuxt.test.js +18 -18
  219. package/tests/unit/composables/api_fetch.nuxt.test.js +34 -36
  220. package/tests/unit/composables/project_manager.nuxt.test.js +93 -112
  221. package/tests/unit/composables/run_function_when_microservices_connected.nuxt.test.js +36 -36
  222. package/tests/unit/composables/upload_file.nuxt.test.js +27 -29
  223. package/tests/unit/plugins/project_load.nuxt.test.js +31 -33
  224. package/tests/unit/stores/app.nuxt.test.js +90 -92
  225. package/tests/unit/stores/feedback.nuxt.test.js +47 -57
  226. package/tests/unit/stores/geode.nuxt.test.js +111 -115
  227. package/tests/unit/stores/infra.nuxt.test.js +148 -148
  228. package/tests/unit/stores/lambda.nuxt.test.js +72 -74
  229. package/tests/unit/stores/treeview.nuxt.test.js +19 -21
  230. package/tests/unit/stores/viewer.nuxt.test.js +109 -122
  231. package/tests/unit/utils/recaptcha.nuxt.test.js +25 -29
  232. package/tests/unit/utils/validate_schema.nuxt.test.js +17 -17
  233. package/tests/utils.js +11 -11
  234. package/tests/vitest.config.js +9 -9
  235. package/vuetify_config.js +2 -2
@@ -1,130 +1,119 @@
1
1
  // Third party imports
2
- import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
2
+ import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json";
3
3
 
4
4
  // Local imports
5
- import { getRGBPointsFromPreset } from "@ogw_front/utils/colormap"
6
- import { useMeshPolyhedraCommonStyle } from "./common"
7
- import { useViewerStore } from "@ogw_front/stores/viewer"
5
+ import { getRGBPointsFromPreset } from "@ogw_front/utils/colormap";
6
+ import { useMeshPolyhedraCommonStyle } from "./common";
7
+ import { useViewerStore } from "@ogw_front/stores/viewer";
8
8
 
9
9
  // Local constants
10
10
  const meshPolyhedraVertexAttributeSchemas =
11
- viewer_schemas.opengeodeweb_viewer.mesh.polyhedra.attribute.vertex
11
+ viewer_schemas.opengeodeweb_viewer.mesh.polyhedra.attribute.vertex;
12
12
 
13
13
  export function useMeshPolyhedraVertexAttributeStyle() {
14
- const viewerStore = useViewerStore()
15
- const meshPolyhedraCommonStyle = useMeshPolyhedraCommonStyle()
14
+ const viewerStore = useViewerStore();
15
+ const meshPolyhedraCommonStyle = useMeshPolyhedraCommonStyle();
16
16
 
17
17
  function meshPolyhedraVertexAttribute(id) {
18
- return meshPolyhedraCommonStyle.meshPolyhedraColoring(id).vertex
18
+ return meshPolyhedraCommonStyle.meshPolyhedraColoring(id).vertex;
19
19
  }
20
20
 
21
21
  function meshPolyhedraVertexAttributeStoredConfig(id, name) {
22
- const { storedConfigs } = meshPolyhedraVertexAttribute(id)
22
+ const { storedConfigs } = meshPolyhedraVertexAttribute(id);
23
23
  if (name in storedConfigs) {
24
- return storedConfigs[name]
24
+ return storedConfigs[name];
25
25
  }
26
26
  return setMeshPolyhedraVertexAttributeStoredConfig(id, name, {
27
27
  minimum: undefined,
28
28
  maximum: undefined,
29
29
  colorMap: undefined,
30
- })
30
+ });
31
31
  }
32
32
 
33
- function setMeshPolyhedraVertexAttributeStoredConfig(
34
- id,
35
- name,
36
- { minimum, maximum, colorMap },
37
- ) {
38
- const { storedConfigs } = meshPolyhedraVertexAttribute(id)
39
- storedConfigs[name] = { minimum, maximum, colorMap }
40
- return storedConfigs[name]
33
+ function setMeshPolyhedraVertexAttributeStoredConfig(id, name, { minimum, maximum, colorMap }) {
34
+ const { storedConfigs } = meshPolyhedraVertexAttribute(id);
35
+ storedConfigs[name] = { minimum, maximum, colorMap };
36
+ return storedConfigs[name];
41
37
  }
42
38
 
43
39
  function meshPolyhedraVertexAttributeName(id) {
44
- console.log(
45
- meshPolyhedraVertexAttributeName.name,
46
- { id },
47
- meshPolyhedraVertexAttribute(id),
48
- )
49
- return meshPolyhedraVertexAttribute(id).name
40
+ console.log(meshPolyhedraVertexAttributeName.name, { id }, meshPolyhedraVertexAttribute(id));
41
+ return meshPolyhedraVertexAttribute(id).name;
50
42
  }
51
43
  function setMeshPolyhedraVertexAttributeName(id, name) {
52
- console.log(setMeshPolyhedraVertexAttributeName.name, { id, name })
44
+ console.log(setMeshPolyhedraVertexAttributeName.name, { id, name });
53
45
  return viewerStore.request(
54
46
  meshPolyhedraVertexAttributeSchemas.name,
55
47
  { id, name },
56
48
  {
57
49
  response_function: async () => {
58
- meshPolyhedraVertexAttribute(id).name = name
59
- const { minimum, maximum } = meshPolyhedraVertexAttributeStoredConfig(
60
- id,
61
- name,
62
- )
63
- await setMeshPolyhedraVertexAttributeRange(id, minimum, maximum)
50
+ meshPolyhedraVertexAttribute(id).name = name;
51
+ const { minimum, maximum } = meshPolyhedraVertexAttributeStoredConfig(id, name);
52
+ await setMeshPolyhedraVertexAttributeRange(id, minimum, maximum);
64
53
  console.log(
65
54
  setMeshPolyhedraVertexAttributeName.name,
66
55
  { id },
67
56
  meshPolyhedraVertexAttributeName(id),
68
- )
57
+ );
69
58
  },
70
59
  },
71
- )
60
+ );
72
61
  }
73
62
 
74
63
  function meshPolyhedraVertexAttributeRange(id) {
75
- const name = meshPolyhedraVertexAttributeName(id)
76
- const storedConfig = meshPolyhedraVertexAttributeStoredConfig(id, name)
77
- const { minimum, maximum } = storedConfig
78
- return [minimum, maximum]
64
+ const name = meshPolyhedraVertexAttributeName(id);
65
+ const storedConfig = meshPolyhedraVertexAttributeStoredConfig(id, name);
66
+ const { minimum, maximum } = storedConfig;
67
+ return [minimum, maximum];
79
68
  }
80
69
  function setMeshPolyhedraVertexAttributeRange(id, minimum, maximum) {
81
- const name = meshPolyhedraVertexAttributeName(id)
82
- const storedConfig = meshPolyhedraVertexAttributeStoredConfig(id, name)
83
- storedConfig.minimum = minimum
84
- storedConfig.maximum = maximum
85
- return setMeshPolyhedraVertexAttributeColorMap(id, storedConfig.colorMap)
70
+ const name = meshPolyhedraVertexAttributeName(id);
71
+ const storedConfig = meshPolyhedraVertexAttributeStoredConfig(id, name);
72
+ storedConfig.minimum = minimum;
73
+ storedConfig.maximum = maximum;
74
+ return setMeshPolyhedraVertexAttributeColorMap(id, storedConfig.colorMap);
86
75
  }
87
76
 
88
77
  function meshPolyhedraVertexAttributeColorMap(id) {
89
- const name = meshPolyhedraVertexAttributeName(id)
90
- const storedConfig = meshPolyhedraVertexAttributeStoredConfig(id, name)
91
- const { colorMap } = storedConfig
92
- return colorMap
78
+ const name = meshPolyhedraVertexAttributeName(id);
79
+ const storedConfig = meshPolyhedraVertexAttributeStoredConfig(id, name);
80
+ const { colorMap } = storedConfig;
81
+ return colorMap;
93
82
  }
94
83
  function setMeshPolyhedraVertexAttributeColorMap(id, colorMap) {
95
- const name = meshPolyhedraVertexAttributeName(id)
96
- const storedConfig = meshPolyhedraVertexAttributeStoredConfig(id, name)
84
+ const name = meshPolyhedraVertexAttributeName(id);
85
+ const storedConfig = meshPolyhedraVertexAttributeStoredConfig(id, name);
97
86
  if (
98
87
  storedConfig.minimum === undefined ||
99
88
  storedConfig.maximum === undefined ||
100
89
  colorMap === undefined
101
90
  ) {
102
- storedConfig.colorMap = colorMap
103
- return
91
+ storedConfig.colorMap = colorMap;
92
+ return;
104
93
  }
105
- const points = getRGBPointsFromPreset(colorMap)
106
- const { minimum, maximum } = storedConfig
94
+ const points = getRGBPointsFromPreset(colorMap);
95
+ const { minimum, maximum } = storedConfig;
107
96
 
108
97
  console.log(setMeshPolyhedraVertexAttributeColorMap.name, {
109
98
  id,
110
99
  minimum,
111
100
  maximum,
112
101
  colorMap,
113
- })
102
+ });
114
103
  return viewerStore.request(
115
104
  meshPolyhedraVertexAttributeSchemas.color_map,
116
105
  { id, points, minimum, maximum },
117
106
  {
118
107
  response_function: () => {
119
- storedConfig.colorMap = colorMap
108
+ storedConfig.colorMap = colorMap;
120
109
  console.log(
121
110
  setMeshPolyhedraVertexAttributeColorMap.name,
122
111
  { id },
123
112
  meshPolyhedraVertexAttributeColorMap(id),
124
- )
113
+ );
125
114
  },
126
115
  },
127
- )
116
+ );
128
117
  }
129
118
 
130
119
  return {
@@ -135,5 +124,5 @@ export function useMeshPolyhedraVertexAttributeStyle() {
135
124
  setMeshPolyhedraVertexAttributeName,
136
125
  setMeshPolyhedraVertexAttributeRange,
137
126
  setMeshPolyhedraVertexAttributeColorMap,
138
- }
127
+ };
139
128
  }
@@ -1,20 +1,19 @@
1
1
  // Third party imports
2
- import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
2
+ import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json";
3
3
 
4
4
  // Local imports
5
- import { useMeshPolyhedraCommonStyle } from "./common"
6
- import { useViewerStore } from "@ogw_front/stores/viewer"
5
+ import { useMeshPolyhedraCommonStyle } from "./common";
6
+ import { useViewerStore } from "@ogw_front/stores/viewer";
7
7
 
8
8
  // Local constants
9
- const meshPolyhedraVisibilitySchema =
10
- viewer_schemas.opengeodeweb_viewer.mesh.polyhedra.visibility
9
+ const meshPolyhedraVisibilitySchema = viewer_schemas.opengeodeweb_viewer.mesh.polyhedra.visibility;
11
10
 
12
11
  export function useMeshPolyhedraVisibilityStyle() {
13
- const viewerStore = useViewerStore()
14
- const meshPolyhedraCommonStyle = useMeshPolyhedraCommonStyle()
12
+ const viewerStore = useViewerStore();
13
+ const meshPolyhedraCommonStyle = useMeshPolyhedraCommonStyle();
15
14
 
16
15
  function meshPolyhedraVisibility(id) {
17
- return meshPolyhedraCommonStyle.meshPolyhedraStyle(id).visibility
16
+ return meshPolyhedraCommonStyle.meshPolyhedraStyle(id).visibility;
18
17
  }
19
18
  function setMeshPolyhedraVisibility(id, visibility) {
20
19
  return viewerStore.request(
@@ -22,20 +21,15 @@ export function useMeshPolyhedraVisibilityStyle() {
22
21
  { id, visibility },
23
22
  {
24
23
  response_function: () => {
25
- meshPolyhedraCommonStyle.meshPolyhedraStyle(id).visibility =
26
- visibility
27
- console.log(
28
- setMeshPolyhedraVisibility.name,
29
- { id },
30
- meshPolyhedraVisibility(id),
31
- )
24
+ meshPolyhedraCommonStyle.meshPolyhedraStyle(id).visibility = visibility;
25
+ console.log(setMeshPolyhedraVisibility.name, { id }, meshPolyhedraVisibility(id));
32
26
  },
33
27
  },
34
- )
28
+ );
35
29
  }
36
30
 
37
31
  return {
38
32
  meshPolyhedraVisibility,
39
33
  setMeshPolyhedraVisibility,
40
- }
34
+ };
41
35
  }
@@ -1,39 +1,36 @@
1
1
  // Third party imports
2
- import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
2
+ import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json";
3
3
 
4
4
  // Local imports
5
- import { useDataStore } from "@ogw_front/stores/data"
6
- import { useModelBlocksCommonStyle } from "./common"
7
- import { useViewerStore } from "@ogw_front/stores/viewer"
5
+ import { useDataStore } from "@ogw_front/stores/data";
6
+ import { useModelBlocksCommonStyle } from "./common";
7
+ import { useViewerStore } from "@ogw_front/stores/viewer";
8
8
 
9
9
  // Local constants
10
- const model_blocks_schemas = viewer_schemas.opengeodeweb_viewer.model.blocks
10
+ const model_blocks_schemas = viewer_schemas.opengeodeweb_viewer.model.blocks;
11
11
 
12
12
  export function useModelBlocksColorStyle() {
13
- const dataStore = useDataStore()
14
- const viewerStore = useViewerStore()
15
- const modelBlocksCommonStyle = useModelBlocksCommonStyle()
13
+ const dataStore = useDataStore();
14
+ const viewerStore = useViewerStore();
15
+ const modelBlocksCommonStyle = useModelBlocksCommonStyle();
16
16
 
17
17
  function modelBlockColor(id, block_id) {
18
- return modelBlocksCommonStyle.modelBlockStyle(id, block_id).color
18
+ return modelBlocksCommonStyle.modelBlockStyle(id, block_id).color;
19
19
  }
20
20
  function saveModelBlockColor(id, block_id, color) {
21
- modelBlocksCommonStyle.modelBlockStyle(id, block_id).color = color
21
+ modelBlocksCommonStyle.modelBlockStyle(id, block_id).color = color;
22
22
  }
23
23
  async function setModelBlocksColor(id, block_ids, color) {
24
24
  if (!block_ids || block_ids.length === 0) {
25
- return
25
+ return;
26
26
  }
27
- const blocks_viewer_ids = await dataStore.getMeshComponentsViewerIds(
28
- id,
29
- block_ids,
30
- )
27
+ const blocks_viewer_ids = await dataStore.getMeshComponentsViewerIds(id, block_ids);
31
28
  if (!blocks_viewer_ids || blocks_viewer_ids.length === 0) {
32
- console.warn(
33
- "[setModelBlocksColor] No viewer IDs found, skipping color request",
34
- { id, block_ids },
35
- )
36
- return
29
+ console.warn("[setModelBlocksColor] No viewer IDs found, skipping color request", {
30
+ id,
31
+ block_ids,
32
+ });
33
+ return;
37
34
  }
38
35
  return viewerStore.request(
39
36
  model_blocks_schemas.color,
@@ -41,21 +38,21 @@ export function useModelBlocksColorStyle() {
41
38
  {
42
39
  response_function: () => {
43
40
  for (const block_id of block_ids) {
44
- saveModelBlockColor(id, block_id, color)
41
+ saveModelBlockColor(id, block_id, color);
45
42
  }
46
43
  console.log(
47
44
  setModelBlocksColor.name,
48
45
  { id },
49
46
  { block_ids },
50
47
  JSON.stringify(modelBlockColor(id, block_ids[0])),
51
- )
48
+ );
52
49
  },
53
50
  },
54
- )
51
+ );
55
52
  }
56
53
 
57
54
  return {
58
55
  modelBlockColor,
59
56
  setModelBlocksColor,
60
- }
57
+ };
61
58
  }
@@ -1,21 +1,21 @@
1
- import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state"
1
+ import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state";
2
2
 
3
3
  export function useModelBlocksCommonStyle() {
4
- const dataStyleStateStore = useDataStyleStateStore()
4
+ const dataStyleStateStore = useDataStyleStateStore();
5
5
 
6
6
  function modelBlocksStyle(id) {
7
- return dataStyleStateStore.getStyle(id).blocks
7
+ return dataStyleStateStore.getStyle(id).blocks;
8
8
  }
9
9
 
10
10
  function modelBlockStyle(id, block_id) {
11
11
  if (!modelBlocksStyle(id)[block_id]) {
12
- modelBlocksStyle(id)[block_id] = {}
12
+ modelBlocksStyle(id)[block_id] = {};
13
13
  }
14
- return modelBlocksStyle(id)[block_id]
14
+ return modelBlocksStyle(id)[block_id];
15
15
  }
16
16
 
17
17
  return {
18
18
  modelBlocksStyle,
19
19
  modelBlockStyle,
20
- }
20
+ };
21
21
  }
@@ -1,30 +1,26 @@
1
1
  // Local imports
2
- import { useDataStore } from "@ogw_front/stores/data"
3
- import { useModelBlocksColorStyle } from "./color"
4
- import { useModelBlocksCommonStyle } from "./common"
5
- import { useModelBlocksVisibilityStyle } from "./visibility"
2
+ import { useDataStore } from "@ogw_front/stores/data";
3
+ import { useModelBlocksColorStyle } from "./color";
4
+ import { useModelBlocksCommonStyle } from "./common";
5
+ import { useModelBlocksVisibilityStyle } from "./visibility";
6
6
 
7
7
  async function setModelBlocksDefaultStyle(_id) {
8
8
  // Placeholder for oxlint
9
9
  }
10
10
 
11
11
  export function useModelBlocksStyle() {
12
- const dataStore = useDataStore()
13
- const modelBlocksCommonStyle = useModelBlocksCommonStyle()
14
- const modelBlocksVisibilityStyle = useModelBlocksVisibilityStyle()
15
- const modelBlocksColorStyle = useModelBlocksColorStyle()
12
+ const dataStore = useDataStore();
13
+ const modelBlocksCommonStyle = useModelBlocksCommonStyle();
14
+ const modelBlocksVisibilityStyle = useModelBlocksVisibilityStyle();
15
+ const modelBlocksColorStyle = useModelBlocksColorStyle();
16
16
 
17
17
  async function applyModelBlocksStyle(id) {
18
- const style = modelBlocksCommonStyle.modelBlocksStyle(id)
19
- const blocks_ids = await dataStore.getBlocksGeodeIds(id)
18
+ const style = modelBlocksCommonStyle.modelBlocksStyle(id);
19
+ const blocks_ids = await dataStore.getBlocksGeodeIds(id);
20
20
  return Promise.all([
21
- modelBlocksVisibilityStyle.setModelBlocksVisibility(
22
- id,
23
- blocks_ids,
24
- style.visibility,
25
- ),
21
+ modelBlocksVisibilityStyle.setModelBlocksVisibility(id, blocks_ids, style.visibility),
26
22
  modelBlocksColorStyle.setModelBlocksColor(id, blocks_ids, style.color),
27
- ])
23
+ ]);
28
24
  }
29
25
 
30
26
  return {
@@ -33,5 +29,5 @@ export function useModelBlocksStyle() {
33
29
  ...modelBlocksCommonStyle,
34
30
  ...modelBlocksVisibilityStyle,
35
31
  ...modelBlocksColorStyle,
36
- }
32
+ };
37
33
  }
@@ -1,39 +1,36 @@
1
1
  // Third party imports
2
- import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
2
+ import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json";
3
3
 
4
4
  // Local imports
5
- import { useDataStore } from "@ogw_front/stores/data"
6
- import { useModelBlocksCommonStyle } from "./common"
7
- import { useViewerStore } from "@ogw_front/stores/viewer"
5
+ import { useDataStore } from "@ogw_front/stores/data";
6
+ import { useModelBlocksCommonStyle } from "./common";
7
+ import { useViewerStore } from "@ogw_front/stores/viewer";
8
8
 
9
9
  // Local constants
10
- const model_blocks_schemas = viewer_schemas.opengeodeweb_viewer.model.blocks
10
+ const model_blocks_schemas = viewer_schemas.opengeodeweb_viewer.model.blocks;
11
11
 
12
12
  export function useModelBlocksVisibilityStyle() {
13
- const dataStore = useDataStore()
14
- const viewerStore = useViewerStore()
15
- const modelBlocksCommonStyle = useModelBlocksCommonStyle()
13
+ const dataStore = useDataStore();
14
+ const viewerStore = useViewerStore();
15
+ const modelBlocksCommonStyle = useModelBlocksCommonStyle();
16
16
  function modelBlockVisibility(id, block_id) {
17
- return modelBlocksCommonStyle.modelBlockStyle(id, block_id).visibility
17
+ return modelBlocksCommonStyle.modelBlockStyle(id, block_id).visibility;
18
18
  }
19
19
  function saveModelBlockVisibility(id, block_id, visibility) {
20
- modelBlocksCommonStyle.modelBlockStyle(id, block_id).visibility = visibility
20
+ modelBlocksCommonStyle.modelBlockStyle(id, block_id).visibility = visibility;
21
21
  }
22
22
 
23
23
  async function setModelBlocksVisibility(id, block_ids, visibility) {
24
24
  if (!block_ids || block_ids.length === 0) {
25
- return
25
+ return;
26
26
  }
27
- const blocks_viewer_ids = await dataStore.getMeshComponentsViewerIds(
28
- id,
29
- block_ids,
30
- )
27
+ const blocks_viewer_ids = await dataStore.getMeshComponentsViewerIds(id, block_ids);
31
28
  if (!blocks_viewer_ids || blocks_viewer_ids.length === 0) {
32
- console.warn(
33
- "[setModelBlocksVisibility] No viewer IDs found, skipping visibility request",
34
- { id, block_ids },
35
- )
36
- return
29
+ console.warn("[setModelBlocksVisibility] No viewer IDs found, skipping visibility request", {
30
+ id,
31
+ block_ids,
32
+ });
33
+ return;
37
34
  }
38
35
  return viewerStore.request(
39
36
  model_blocks_schemas.visibility,
@@ -41,21 +38,21 @@ export function useModelBlocksVisibilityStyle() {
41
38
  {
42
39
  response_function: () => {
43
40
  for (const block_id of block_ids) {
44
- saveModelBlockVisibility(id, block_id, visibility)
41
+ saveModelBlockVisibility(id, block_id, visibility);
45
42
  }
46
43
  console.log(
47
44
  setModelBlocksVisibility.name,
48
45
  { id },
49
46
  { block_ids },
50
47
  modelBlockVisibility(id, block_ids[0]),
51
- )
48
+ );
52
49
  },
53
50
  },
54
- )
51
+ );
55
52
  }
56
53
 
57
54
  return {
58
55
  modelBlockVisibility,
59
56
  setModelBlocksVisibility,
60
- }
57
+ };
61
58
  }
@@ -1,38 +1,35 @@
1
1
  // Third party imports
2
- import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
2
+ import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json";
3
3
 
4
4
  // Local imports
5
- import { useDataStore } from "@ogw_front/stores/data"
6
- import { useModelCornersCommonStyle } from "./common"
7
- import { useViewerStore } from "@ogw_front/stores/viewer"
5
+ import { useDataStore } from "@ogw_front/stores/data";
6
+ import { useModelCornersCommonStyle } from "./common";
7
+ import { useViewerStore } from "@ogw_front/stores/viewer";
8
8
 
9
9
  // Local constants
10
- const model_corners_schemas = viewer_schemas.opengeodeweb_viewer.model.corners
10
+ const model_corners_schemas = viewer_schemas.opengeodeweb_viewer.model.corners;
11
11
 
12
12
  export function useModelCornersColorStyle() {
13
- const dataStore = useDataStore()
14
- const viewerStore = useViewerStore()
15
- const modelCornersCommonStyle = useModelCornersCommonStyle()
13
+ const dataStore = useDataStore();
14
+ const viewerStore = useViewerStore();
15
+ const modelCornersCommonStyle = useModelCornersCommonStyle();
16
16
  function modelCornerColor(id, corner_id) {
17
- return modelCornersCommonStyle.modelCornerStyle(id, corner_id).color
17
+ return modelCornersCommonStyle.modelCornerStyle(id, corner_id).color;
18
18
  }
19
19
  function saveModelCornerColor(id, corner_id, color) {
20
- modelCornersCommonStyle.modelCornerStyle(id, corner_id).color = color
20
+ modelCornersCommonStyle.modelCornerStyle(id, corner_id).color = color;
21
21
  }
22
22
  async function setModelCornersColor(id, corner_ids, color) {
23
23
  if (!corner_ids || corner_ids.length === 0) {
24
- return
24
+ return;
25
25
  }
26
- const corner_viewer_ids = await dataStore.getMeshComponentsViewerIds(
27
- id,
28
- corner_ids,
29
- )
26
+ const corner_viewer_ids = await dataStore.getMeshComponentsViewerIds(id, corner_ids);
30
27
  if (!corner_viewer_ids || corner_viewer_ids.length === 0) {
31
- console.warn(
32
- "[setModelCornersColor] No viewer IDs found, skipping color request",
33
- { id, corner_ids },
34
- )
35
- return
28
+ console.warn("[setModelCornersColor] No viewer IDs found, skipping color request", {
29
+ id,
30
+ corner_ids,
31
+ });
32
+ return;
36
33
  }
37
34
  return viewerStore.request(
38
35
  model_corners_schemas.color,
@@ -40,21 +37,21 @@ export function useModelCornersColorStyle() {
40
37
  {
41
38
  response_function: () => {
42
39
  for (const corner_id of corner_ids) {
43
- saveModelCornerColor(id, corner_id, color)
40
+ saveModelCornerColor(id, corner_id, color);
44
41
  }
45
42
  console.log(
46
43
  setModelCornersColor.name,
47
44
  { id },
48
45
  { corner_ids },
49
46
  JSON.stringify(modelCornerColor(id, corner_ids[0])),
50
- )
47
+ );
51
48
  },
52
49
  },
53
- )
50
+ );
54
51
  }
55
52
 
56
53
  return {
57
54
  modelCornerColor,
58
55
  setModelCornersColor,
59
- }
56
+ };
60
57
  }
@@ -1,21 +1,21 @@
1
- import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state"
1
+ import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state";
2
2
 
3
3
  export function useModelCornersCommonStyle() {
4
- const dataStyleStateStore = useDataStyleStateStore()
4
+ const dataStyleStateStore = useDataStyleStateStore();
5
5
 
6
6
  function modelCornersStyle(id) {
7
- return dataStyleStateStore.getStyle(id).corners
7
+ return dataStyleStateStore.getStyle(id).corners;
8
8
  }
9
9
 
10
10
  function modelCornerStyle(id, corner_id) {
11
11
  if (!modelCornersStyle(id)[corner_id]) {
12
- modelCornersStyle(id)[corner_id] = {}
12
+ modelCornersStyle(id)[corner_id] = {};
13
13
  }
14
- return modelCornersStyle(id)[corner_id]
14
+ return modelCornersStyle(id)[corner_id];
15
15
  }
16
16
 
17
17
  return {
18
18
  modelCornersStyle,
19
19
  modelCornerStyle,
20
- }
20
+ };
21
21
  }
@@ -1,31 +1,27 @@
1
1
  // Local imports
2
- import { useDataStore } from "@ogw_front/stores/data"
3
- import { useModelCornersColorStyle } from "./color"
4
- import { useModelCornersCommonStyle } from "./common"
5
- import { useModelCornersVisibilityStyle } from "./visibility"
2
+ import { useDataStore } from "@ogw_front/stores/data";
3
+ import { useModelCornersColorStyle } from "./color";
4
+ import { useModelCornersCommonStyle } from "./common";
5
+ import { useModelCornersVisibilityStyle } from "./visibility";
6
6
 
7
7
  async function setModelCornersDefaultStyle(_id) {
8
8
  // Placeholder for oxlint
9
9
  }
10
10
 
11
11
  export function useModelCornersStyle() {
12
- const dataStore = useDataStore()
13
- const modelCornersCommonStyle = useModelCornersCommonStyle()
14
- const modelCornersVisibilityStyle = useModelCornersVisibilityStyle()
15
- const modelCornersColorStyle = useModelCornersColorStyle()
12
+ const dataStore = useDataStore();
13
+ const modelCornersCommonStyle = useModelCornersCommonStyle();
14
+ const modelCornersVisibilityStyle = useModelCornersVisibilityStyle();
15
+ const modelCornersColorStyle = useModelCornersColorStyle();
16
16
 
17
17
  async function applyModelCornersStyle(id) {
18
- const style = modelCornersCommonStyle.modelCornersStyle(id)
19
- const corner_ids = await dataStore.getCornersGeodeIds(id)
20
- console.log(applyModelCornersStyle.name, { id }, { corner_ids })
18
+ const style = modelCornersCommonStyle.modelCornersStyle(id);
19
+ const corner_ids = await dataStore.getCornersGeodeIds(id);
20
+ console.log(applyModelCornersStyle.name, { id }, { corner_ids });
21
21
  return Promise.all([
22
- modelCornersVisibilityStyle.setModelCornersVisibility(
23
- id,
24
- corner_ids,
25
- style.visibility,
26
- ),
22
+ modelCornersVisibilityStyle.setModelCornersVisibility(id, corner_ids, style.visibility),
27
23
  modelCornersColorStyle.setModelCornersColor(id, corner_ids, style.color),
28
- ])
24
+ ]);
29
25
  }
30
26
 
31
27
  return {
@@ -34,5 +30,5 @@ export function useModelCornersStyle() {
34
30
  ...modelCornersCommonStyle,
35
31
  ...modelCornersVisibilityStyle,
36
32
  ...modelCornersColorStyle,
37
- }
33
+ };
38
34
  }