@geode/opengeodeweb-front 10.3.0 → 10.3.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 (178) hide show
  1. package/.eslintrc.cjs +1 -0
  2. package/app/assets/geode_objects.js +1 -3
  3. package/app/components/Carousel.vue +7 -4
  4. package/app/components/CrsSelector.vue +5 -6
  5. package/app/components/DragAndDrop.vue +18 -8
  6. package/app/components/ExtensionSelector.vue +9 -17
  7. package/app/components/FeedBack/ErrorBanner.vue +1 -1
  8. package/app/components/FeedBack/Snackers.vue +4 -1
  9. package/app/components/FileSelector.vue +21 -10
  10. package/app/components/FileUploader.vue +15 -32
  11. package/app/components/HybridRenderingView.vue +5 -3
  12. package/app/components/Inspector/InspectionButton.vue +2 -2
  13. package/app/components/Inspector/ResultPanel.vue +4 -4
  14. package/app/components/Launcher.vue +1 -1
  15. package/app/components/Loading.vue +6 -6
  16. package/app/components/MissingFilesSelector.vue +23 -29
  17. package/app/components/ObjectSelector.vue +11 -10
  18. package/app/components/OptionCard.vue +1 -1
  19. package/app/components/PackagesVersions.vue +5 -3
  20. package/app/components/Recaptcha.vue +6 -4
  21. package/app/components/RemoteRenderingView.vue +4 -3
  22. package/app/components/Screenshot.vue +4 -4
  23. package/app/components/Step.vue +7 -7
  24. package/app/components/VeaseViewToolbar.vue +3 -3
  25. package/app/components/Viewer/BreadCrumb.vue +2 -4
  26. package/app/components/Viewer/ContextMenu.vue +77 -45
  27. package/app/components/Viewer/ContextMenuItem.vue +42 -33
  28. package/app/components/Viewer/EdgedCurve/PointsOptions.vue +3 -3
  29. package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +5 -5
  30. package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +6 -6
  31. package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +5 -5
  32. package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +5 -5
  33. package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +6 -7
  34. package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +6 -6
  35. package/app/components/Viewer/Generic/Model/EdgesOptions.vue +3 -3
  36. package/app/components/Viewer/Generic/Model/PointsOptions.vue +4 -4
  37. package/app/components/Viewer/Grid/2D/CellsOptions.vue +3 -3
  38. package/app/components/Viewer/Grid/2D/EdgesOptions.vue +3 -3
  39. package/app/components/Viewer/Grid/2D/PointsOptions.vue +3 -3
  40. package/app/components/Viewer/Grid/3D/CellsOptions.vue +3 -3
  41. package/app/components/Viewer/Grid/3D/EdgesOptions.vue +3 -3
  42. package/app/components/Viewer/Grid/3D/FacetsOptions.vue +3 -3
  43. package/app/components/Viewer/Grid/3D/PointsOptions.vue +3 -3
  44. package/app/components/Viewer/HybridSolid/EdgesOptions.vue +3 -3
  45. package/app/components/Viewer/HybridSolid/PointsOptions.vue +3 -3
  46. package/app/components/Viewer/HybridSolid/PolygonsOptions.vue +3 -3
  47. package/app/components/Viewer/HybridSolid/PolyhedraOptions.vue +3 -3
  48. package/app/components/Viewer/Options/CellAttributeSelector.vue +23 -20
  49. package/app/components/Viewer/Options/ColorMapList.vue +75 -50
  50. package/app/components/Viewer/Options/ColorMapPicker.vue +38 -32
  51. package/app/components/Viewer/Options/ColorPicker.vue +3 -3
  52. package/app/components/Viewer/Options/ColoringTypeSelector.vue +29 -21
  53. package/app/components/Viewer/Options/EdgeAttributeSelector.vue +7 -7
  54. package/app/components/Viewer/Options/PolygonAttributeSelector.vue +7 -7
  55. package/app/components/Viewer/Options/PolyhedronAttributeSelector.vue +7 -7
  56. package/app/components/Viewer/Options/TextureItem.vue +5 -5
  57. package/app/components/Viewer/Options/TexturesSelector.vue +5 -5
  58. package/app/components/Viewer/Options/VertexAttributeSelector.vue +7 -7
  59. package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +5 -5
  60. package/app/components/Viewer/PolygonalSurface/EdgesOptions.vue +3 -3
  61. package/app/components/Viewer/PolygonalSurface/PointsOptions.vue +3 -3
  62. package/app/components/Viewer/PolygonalSurface/SpecificPolygonsOptions.vue +6 -6
  63. package/app/components/Viewer/Solid/EdgesOptions.vue +3 -3
  64. package/app/components/Viewer/Solid/PointsOptions.vue +3 -3
  65. package/app/components/Viewer/Solid/PolygonsOptions.vue +3 -3
  66. package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +6 -6
  67. package/app/components/Viewer/TetrahedralSolid/TetrahedraOptions.vue +3 -3
  68. package/app/components/Viewer/TetrahedralSolid/TrianglesOptions.vue +3 -3
  69. package/app/components/Viewer/Tree/ObjectTree.vue +7 -9
  70. package/app/components/Viewer/TreeComponent.vue +9 -13
  71. package/app/components/Viewer/TreeObject.vue +8 -9
  72. package/app/components/Viewer/TriangulatedSurface/EdgesOptions.vue +3 -3
  73. package/app/components/Viewer/TriangulatedSurface/PointsOptions.vue +3 -3
  74. package/app/components/Viewer/TriangulatedSurface/TrianglesOptions.vue +3 -3
  75. package/app/components/Wrapper.vue +1 -2
  76. package/app/components/ZScaling.vue +1 -1
  77. package/app/composables/project_manager.js +6 -6
  78. package/app/plugins/auto_store_register.js +1 -1
  79. package/app/stores/app.js +45 -41
  80. package/app/stores/data.js +52 -51
  81. package/app/stores/data_style.js +12 -11
  82. package/app/stores/feedback.js +5 -1
  83. package/app/stores/geode.js +16 -13
  84. package/app/stores/hybrid_viewer.js +72 -44
  85. package/app/stores/infra.js +18 -16
  86. package/app/stores/lambda.js +1 -9
  87. package/app/stores/menu.js +13 -13
  88. package/app/stores/treeview.js +15 -13
  89. package/app/stores/viewer.js +39 -33
  90. package/app/utils/app_mode.js +4 -3
  91. package/app/utils/default_styles.js +55 -47
  92. package/app/utils/file_import_workflow.js +4 -17
  93. package/app/utils/local.js +195 -184
  94. package/app/utils/upload_file.js +1 -2
  95. package/eslint.config.js +2 -2
  96. package/internal/database/database.js +17 -32
  97. package/internal/database/extended_database.js +25 -0
  98. package/internal/stores/data_style/mesh/cells/cell.js +3 -3
  99. package/internal/stores/data_style/mesh/cells/color.js +1 -1
  100. package/internal/stores/data_style/mesh/cells/index.js +7 -7
  101. package/internal/stores/data_style/mesh/cells/textures.js +1 -1
  102. package/internal/stores/data_style/mesh/cells/vertex.js +3 -3
  103. package/internal/stores/data_style/mesh/cells/visibility.js +1 -1
  104. package/internal/stores/data_style/mesh/edges/color.js +1 -1
  105. package/internal/stores/data_style/mesh/edges/edge.js +22 -22
  106. package/internal/stores/data_style/mesh/edges/index.js +7 -7
  107. package/internal/stores/data_style/mesh/edges/vertex.js +3 -3
  108. package/internal/stores/data_style/mesh/edges/visibility.js +1 -1
  109. package/internal/stores/data_style/mesh/edges/width.js +1 -1
  110. package/internal/stores/data_style/mesh/index.js +4 -5
  111. package/internal/stores/data_style/mesh/points/color.js +1 -1
  112. package/internal/stores/data_style/mesh/points/index.js +6 -6
  113. package/internal/stores/data_style/mesh/points/size.js +1 -1
  114. package/internal/stores/data_style/mesh/points/vertex.js +3 -3
  115. package/internal/stores/data_style/mesh/points/visibility.js +1 -1
  116. package/internal/stores/data_style/mesh/polygons/color.js +1 -1
  117. package/internal/stores/data_style/mesh/polygons/index.js +7 -7
  118. package/internal/stores/data_style/mesh/polygons/polygon.js +3 -3
  119. package/internal/stores/data_style/mesh/polygons/textures.js +1 -1
  120. package/internal/stores/data_style/mesh/polygons/vertex.js +3 -3
  121. package/internal/stores/data_style/mesh/polygons/visibility.js +1 -1
  122. package/internal/stores/data_style/mesh/polyhedra/color.js +1 -1
  123. package/internal/stores/data_style/mesh/polyhedra/index.js +6 -6
  124. package/internal/stores/data_style/mesh/polyhedra/polyhedron.js +3 -3
  125. package/internal/stores/data_style/mesh/polyhedra/vertex.js +3 -3
  126. package/internal/stores/data_style/mesh/polyhedra/visibility.js +1 -1
  127. package/internal/stores/data_style/model/edges.js +1 -1
  128. package/internal/stores/data_style/model/index.js +32 -22
  129. package/internal/utils/api_fetch.js +8 -5
  130. package/internal/utils/viewer_call.js +42 -46
  131. package/nuxt.config.js +3 -3
  132. package/package.json +1 -1
  133. package/scripts/generate_geode_objects.js +8 -7
  134. package/tests/integration/setup.js +28 -21
  135. package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +18 -10
  136. package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +18 -10
  137. package/tests/integration/stores/data_style/mesh/index.nuxt.test.js +9 -5
  138. package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +17 -10
  139. package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +18 -10
  140. package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +18 -10
  141. package/tests/integration/stores/data_style/model/blocks.nuxt.test.js +10 -6
  142. package/tests/integration/stores/data_style/model/corners.nuxt.test.js +10 -6
  143. package/tests/integration/stores/data_style/model/edges.nuxt.test.js +9 -5
  144. package/tests/integration/stores/data_style/model/index.nuxt.test.js +9 -5
  145. package/tests/integration/stores/data_style/model/lines.nuxt.test.js +10 -6
  146. package/tests/integration/stores/data_style/model/points.nuxt.test.js +9 -5
  147. package/tests/integration/stores/data_style/model/surfaces.nuxt.test.js +10 -6
  148. package/tests/integration/stores/viewer.nuxt.test.js +55 -39
  149. package/tests/setup_indexeddb.js +1 -0
  150. package/tests/unit/components/CrsSelector.nuxt.test.js +18 -19
  151. package/tests/unit/components/ExtensionSelector.nuxt.test.js +24 -19
  152. package/tests/unit/components/FeedBack/ErrorsBanner.nuxt.test.js +23 -36
  153. package/tests/unit/components/FeedBack/Snackers.nuxt.test.js +20 -25
  154. package/tests/unit/components/FileSelector.nuxt.test.js +27 -27
  155. package/tests/unit/components/FileUploader.nuxt.test.js +18 -17
  156. package/tests/unit/components/Inspector/InspectionButton.nuxt.test.js +9 -16
  157. package/tests/unit/components/Inspector/ResultPanel.nuxt.test.js +8 -6
  158. package/tests/unit/components/Launcher.nuxt.test.js +12 -17
  159. package/tests/unit/components/MissingFilesSelector.nuxt.test.js +16 -19
  160. package/tests/unit/components/ObjectSelector.nuxt.test.js +30 -34
  161. package/tests/unit/components/PackagesVersions.nuxt.test.js +8 -11
  162. package/tests/unit/components/Step.nuxt.test.js +8 -7
  163. package/tests/unit/components/Stepper.nuxt.test.js +14 -12
  164. package/tests/unit/composables/ProjectManager.nuxt.test.js +142 -100
  165. package/tests/unit/composables/api_fetch.nuxt.test.js +12 -39
  166. package/tests/unit/composables/run_function_when_microservices_connected.nuxt.test.js +36 -61
  167. package/tests/unit/composables/upload_file.nuxt.test.js +21 -25
  168. package/tests/unit/plugins/project_load.nuxt.test.js +22 -21
  169. package/tests/unit/stores/App.nuxt.test.js +45 -43
  170. package/tests/unit/stores/Feedback.nuxt.test.js +16 -18
  171. package/tests/unit/stores/Geode.nuxt.test.js +135 -137
  172. package/tests/unit/stores/Infra.nuxt.test.js +20 -26
  173. package/tests/unit/stores/Lambda.nuxt.test.js +30 -31
  174. package/tests/unit/stores/Treeview.nuxt.test.js +53 -55
  175. package/tests/unit/stores/Viewer.nuxt.test.js +16 -23
  176. package/tests/unit/utils/validate_schema.nuxt.test.js +18 -18
  177. package/tests/utils.js +15 -2
  178. package/tests/vitest.config.js +6 -2
@@ -1,12 +1,12 @@
1
1
  // Third party imports
2
2
 
3
3
  // Local imports
4
- import { useMeshCellsCommonStyle } from "./common"
5
- import { useMeshCellsVisibilityStyle } from "./visibility"
4
+ import { useMeshCellsCellAttributeStyle } from "./cell"
6
5
  import { useMeshCellsColorStyle } from "./color"
6
+ import { useMeshCellsCommonStyle } from "./common"
7
7
  import { useMeshCellsTexturesStyle } from "./textures"
8
8
  import { useMeshCellsVertexAttributeStyle } from "./vertex"
9
- import { useMeshCellsCellAttributeStyle } from "./cell"
9
+ import { useMeshCellsVisibilityStyle } from "./visibility"
10
10
 
11
11
  // Local constants
12
12
 
@@ -33,14 +33,14 @@ export function useMeshCellsStyle() {
33
33
  )
34
34
  } else if (type === "textures") {
35
35
  const textures = meshCellsTexturesStore.meshCellsTextures(id)
36
- if (textures === null) {
36
+ if (textures === undefined) {
37
37
  return Promise.resolve()
38
38
  }
39
39
  return meshCellsTexturesStore.setMeshCellsTextures(id, textures)
40
40
  } else if (type === "vertex") {
41
41
  const name =
42
42
  meshCellsVertexAttributeStyle.meshCellsVertexAttributeName(id)
43
- if (name === null) {
43
+ if (name === undefined) {
44
44
  return Promise.resolve()
45
45
  }
46
46
  return meshCellsVertexAttributeStyle.setMeshCellsVertexAttributeName(
@@ -49,12 +49,12 @@ export function useMeshCellsStyle() {
49
49
  )
50
50
  } else if (type === "cell") {
51
51
  const name = meshCellsCellAttributeStyle.meshCellsCellAttributeName(id)
52
- if (name === null) {
52
+ if (name === undefined) {
53
53
  return Promise.resolve()
54
54
  }
55
55
  await meshCellsCellAttributeStyle.setMeshCellsCellAttributeName(id, name)
56
56
  } else {
57
- throw new Error("Unknown mesh cells coloring type: " + type)
57
+ throw new Error(`Unknown mesh cells coloring type: ${type}`)
58
58
  }
59
59
  }
60
60
 
@@ -2,8 +2,8 @@
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
3
3
 
4
4
  // Local imports
5
- import { useViewerStore } from "@ogw_front/stores/viewer"
6
5
  import { useMeshCellsCommonStyle } from "./common"
6
+ import { useViewerStore } from "@ogw_front/stores/viewer"
7
7
 
8
8
  // Local constants
9
9
  const meshCellsTexturesSchemas =
@@ -2,9 +2,9 @@
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
3
3
 
4
4
  // Local imports
5
- import { useViewerStore } from "@ogw_front/stores/viewer"
6
5
  import { getRGBPointsFromPreset } from "@ogw_front/utils/colormap"
7
6
  import { useMeshCellsCommonStyle } from "./common"
7
+ import { useViewerStore } from "@ogw_front/stores/viewer"
8
8
 
9
9
  // Local constants
10
10
  const meshCellsVertexAttributeSchemas =
@@ -30,7 +30,7 @@ export function useMeshCellsVertexAttributeStyle() {
30
30
  }
31
31
 
32
32
  function meshCellsVertexAttributeStoredConfig(id, name) {
33
- const storedConfigs = meshCellsVertexAttribute(id).storedConfigs
33
+ const { storedConfigs } = meshCellsVertexAttribute(id)
34
34
  if (name in storedConfigs) {
35
35
  return storedConfigs[name]
36
36
  }
@@ -46,7 +46,7 @@ export function useMeshCellsVertexAttributeStyle() {
46
46
  name,
47
47
  { minimum, maximum, colorMap },
48
48
  ) {
49
- const storedConfigs = meshCellsVertexAttribute(id).storedConfigs
49
+ const { storedConfigs } = meshCellsVertexAttribute(id)
50
50
  storedConfigs[name] = { minimum, maximum, colorMap }
51
51
  return storedConfigs[name]
52
52
  }
@@ -2,8 +2,8 @@
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
3
3
 
4
4
  // Local imports
5
- import { useViewerStore } from "@ogw_front/stores/viewer"
6
5
  import { useMeshCellsCommonStyle } from "./common"
6
+ import { useViewerStore } from "@ogw_front/stores/viewer"
7
7
 
8
8
  // Local constants
9
9
  const meshCellsVisibilitySchema =
@@ -2,8 +2,8 @@
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
3
3
 
4
4
  // Local imports
5
- import { useViewerStore } from "@ogw_front/stores/viewer"
6
5
  import { useMeshEdgesCommonStyle } from "./common"
6
+ import { useViewerStore } from "@ogw_front/stores/viewer"
7
7
 
8
8
  // Local constants
9
9
  const meshEdgesColorSchemas =
@@ -2,9 +2,9 @@
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
3
3
 
4
4
  // Local imports
5
- import { useViewerStore } from "@ogw_front/stores/viewer"
6
- import { getRGBPointsFromPreset } from "@ogw_front/utils/colormap"
5
+ // import { getRGBPointsFromPreset } from "@ogw_front/utils/colormap"
7
6
  import { useMeshEdgesCommonStyle } from "./common"
7
+ import { useViewerStore } from "@ogw_front/stores/viewer"
8
8
 
9
9
  // Local constants
10
10
  const meshEdgesEdgeAttributeSchemas =
@@ -18,27 +18,27 @@ export function useMeshEdgesEdgeAttributeStyle() {
18
18
  return meshEdgesCommonStyle.meshEdgesColoring(id).edge
19
19
  }
20
20
 
21
- function meshEdgesEdgeAttributeStoredConfig(id, name) {
22
- const storedConfigs = meshEdgesEdgeAttribute(id).storedConfigs
23
- if (name in storedConfigs) {
24
- return storedConfigs[name]
25
- }
26
- return setMeshEdgesEdgeAttributeStoredConfig(id, name, {
27
- minimum: 0,
28
- maximum: 1,
29
- colorMap: "Cool to Warm",
30
- })
31
- }
21
+ // function meshEdgesEdgeAttributeStoredConfig(id, name) {
22
+ // const { storedConfigs } = meshEdgesEdgeAttribute(id)
23
+ // if (name in storedConfigs) {
24
+ // return storedConfigs[name]
25
+ // }
26
+ // return setMeshEdgesEdgeAttributeStoredConfig(id, name, {
27
+ // minimum: 0,
28
+ // maximum: 1,
29
+ // colorMap: "Cool to Warm",
30
+ // })
31
+ // }
32
32
 
33
- function setMeshEdgesEdgeAttributeStoredConfig(
34
- id,
35
- name,
36
- { minimum, maximum, colorMap },
37
- ) {
38
- const storedConfigs = meshEdgesEdgeAttribute(id).storedConfigs
39
- storedConfigs[name] = { minimum, maximum, colorMap }
40
- return storedConfigs[name]
41
- }
33
+ // function setMeshEdgesEdgeAttributeStoredConfig(
34
+ // id,
35
+ // name,
36
+ // { minimum, maximum, colorMap },
37
+ // ) {
38
+ // const { storedConfigs } = meshEdgesEdgeAttribute(id)
39
+ // storedConfigs[name] = { minimum, maximum, colorMap }
40
+ // return storedConfigs[name]
41
+ // }
42
42
 
43
43
  function meshEdgesEdgeAttributeName(id) {
44
44
  console.log(
@@ -1,12 +1,12 @@
1
1
  // Third party imports
2
2
 
3
3
  // Local imports
4
+ import { useMeshEdgesColorStyle } from "./color"
4
5
  import { useMeshEdgesCommonStyle } from "./common"
6
+ import { useMeshEdgesEdgeAttributeStyle } from "./edge"
7
+ import { useMeshEdgesVertexAttributeStyle } from "./vertex"
5
8
  import { useMeshEdgesVisibilityStyle } from "./visibility"
6
- import { useMeshEdgesColorStyle } from "./color"
7
9
  import { useMeshEdgesWidthStyle } from "./width"
8
- import { useMeshEdgesVertexAttributeStyle } from "./vertex"
9
- import { useMeshEdgesEdgeAttributeStyle } from "./edge"
10
10
 
11
11
  // Local constants
12
12
 
@@ -33,14 +33,14 @@ export function useMeshEdgesStyle() {
33
33
  )
34
34
  } else if (type === "textures") {
35
35
  const textures = meshEdgesTexturesStore.meshEdgesTextures(id)
36
- if (textures === null) {
36
+ if (textures === undefined) {
37
37
  return Promise.resolve()
38
38
  }
39
39
  return meshEdgesTexturesStore.setMeshEdgesTextures(id, textures)
40
40
  } else if (type === "vertex") {
41
41
  const name =
42
42
  meshEdgesVertexAttributeStyle.meshEdgesVertexAttributeName(id)
43
- if (name === null) {
43
+ if (name === undefined) {
44
44
  return Promise.resolve()
45
45
  }
46
46
  return meshEdgesVertexAttributeStyle.setMeshEdgesVertexAttributeName(
@@ -49,12 +49,12 @@ export function useMeshEdgesStyle() {
49
49
  )
50
50
  } else if (type === "edge") {
51
51
  const name = meshEdgesEdgeAttributeStyle.meshEdgesEdgeAttributeName(id)
52
- if (name === null) {
52
+ if (name === undefined) {
53
53
  return Promise.resolve()
54
54
  }
55
55
  return meshEdgesEdgeAttributeStyle.setMeshEdgesEdgeAttributeName(id, name)
56
56
  } else {
57
- throw new Error("Unknown mesh edges coloring type: " + type)
57
+ throw new Error(`Unknown mesh edges coloring type: ${type}`)
58
58
  }
59
59
  }
60
60
 
@@ -2,9 +2,9 @@
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
3
3
 
4
4
  // Local imports
5
- import { useViewerStore } from "@ogw_front/stores/viewer"
6
5
  import { getRGBPointsFromPreset } from "@ogw_front/utils/colormap"
7
6
  import { useMeshEdgesCommonStyle } from "./common"
7
+ import { useViewerStore } from "@ogw_front/stores/viewer"
8
8
 
9
9
  // Local constants
10
10
  const meshEdgesVertexAttributeSchemas =
@@ -30,7 +30,7 @@ export function useMeshEdgesVertexAttributeStyle() {
30
30
  }
31
31
 
32
32
  function meshEdgesVertexAttributeStoredConfig(id, name) {
33
- const storedConfigs = meshEdgesVertexAttribute(id).storedConfigs
33
+ const { storedConfigs } = meshEdgesVertexAttribute(id)
34
34
  if (name in storedConfigs) {
35
35
  return storedConfigs[name]
36
36
  }
@@ -46,7 +46,7 @@ export function useMeshEdgesVertexAttributeStyle() {
46
46
  name,
47
47
  { minimum, maximum, colorMap },
48
48
  ) {
49
- const storedConfigs = meshEdgesVertexAttribute(id).storedConfigs
49
+ const { storedConfigs } = meshEdgesVertexAttribute(id)
50
50
  storedConfigs[name] = { minimum, maximum, colorMap }
51
51
  return storedConfigs[name]
52
52
  }
@@ -2,8 +2,8 @@
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
3
3
 
4
4
  // Local imports
5
- import { useViewerStore } from "@ogw_front/stores/viewer"
6
5
  import { useMeshEdgesCommonStyle } from "./common"
6
+ import { useViewerStore } from "@ogw_front/stores/viewer"
7
7
 
8
8
  // Local constants
9
9
  const meshEdgesVisibilitySchema =
@@ -2,8 +2,8 @@
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
3
3
 
4
4
  // Local imports
5
- import { useViewerStore } from "@ogw_front/stores/viewer"
6
5
  import { useMeshEdgesCommonStyle } from "./common"
6
+ import { useViewerStore } from "@ogw_front/stores/viewer"
7
7
 
8
8
  // Local constants
9
9
  const meshEdgesWidthSchemas =
@@ -6,9 +6,9 @@ import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer"
6
6
  import { useViewerStore } from "@ogw_front/stores/viewer"
7
7
 
8
8
  import { useDataStyleStateStore } from "../state"
9
- import { useMeshPointsStyle } from "./points"
10
- import { useMeshEdgesStyle } from "./edges"
11
9
  import { useMeshCellsStyle } from "./cells"
10
+ import { useMeshEdgesStyle } from "./edges"
11
+ import { useMeshPointsStyle } from "./points"
12
12
  import { useMeshPolygonsStyle } from "./polygons"
13
13
  import { useMeshPolyhedraStyle } from "./polyhedra"
14
14
 
@@ -58,9 +58,8 @@ export default function useMeshStyle() {
58
58
  promise_array.push(meshPolygonsStyle.applyMeshPolygonsStyle(id))
59
59
  } else if (key === "polyhedra") {
60
60
  promise_array.push(meshPolyhedraStyle.applyMeshPolyhedraStyle(id))
61
- } else if (key === "attributes") {
62
- } else {
63
- throw new Error("Unknown mesh key: " + key)
61
+ } else if (key !== "attributes") {
62
+ throw new Error(`Unknown mesh key: ${key}`)
64
63
  }
65
64
  }
66
65
  return Promise.all(promise_array)
@@ -2,8 +2,8 @@
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
3
3
 
4
4
  // Local imports
5
- import { useViewerStore } from "@ogw_front/stores/viewer"
6
5
  import { useMeshPointsCommonStyle } from "./common"
6
+ import { useViewerStore } from "@ogw_front/stores/viewer"
7
7
 
8
8
  // Local constants
9
9
  const meshPointsColorSchemas =
@@ -1,11 +1,11 @@
1
1
  // Third party imports
2
2
 
3
3
  // Local imports
4
- import { useMeshPointsCommonStyle } from "./common"
5
- import { useMeshPointsVisibilityStyle } from "./visibility"
6
4
  import { useMeshPointsColorStyle } from "./color"
5
+ import { useMeshPointsCommonStyle } from "./common"
7
6
  import { useMeshPointsSizeStyle } from "./size"
8
7
  import { useMeshPointsVertexAttributeStyle } from "./vertex"
8
+ import { useMeshPointsVisibilityStyle } from "./visibility"
9
9
 
10
10
  // Local constants
11
11
 
@@ -31,14 +31,14 @@ export function useMeshPointsStyle() {
31
31
  )
32
32
  } else if (type === "textures") {
33
33
  const textures = meshPointsTexturesStore.meshPointsTextures(id)
34
- if (textures === null) {
34
+ if (textures === undefined) {
35
35
  return Promise.resolve()
36
36
  }
37
37
  return meshPointsTexturesStore.setMeshPointsTextures(id, textures)
38
38
  } else if (type === "vertex") {
39
39
  const name =
40
40
  meshPointsVertexAttributeStyle.meshPointsVertexAttributeName(id)
41
- if (name === null) {
41
+ if (name === undefined) {
42
42
  return Promise.resolve()
43
43
  }
44
44
  return meshPointsVertexAttributeStyle.setMeshPointsVertexAttributeName(
@@ -48,7 +48,7 @@ export function useMeshPointsStyle() {
48
48
  } else if (type === "polygon") {
49
49
  const name =
50
50
  meshPointsPolygonAttributeStyleStore.meshPointsPolygonAttributeName(id)
51
- if (name === null) {
51
+ if (name === undefined) {
52
52
  return Promise.resolve()
53
53
  }
54
54
  await meshPointsPolygonAttributeStyleStore.setMeshPointsPolygonAttributeName(
@@ -56,7 +56,7 @@ export function useMeshPointsStyle() {
56
56
  name,
57
57
  )
58
58
  } else {
59
- throw new Error("Unknown mesh points coloring type: " + type)
59
+ throw new Error(`Unknown mesh points coloring type: ${type}`)
60
60
  }
61
61
  }
62
62
 
@@ -2,8 +2,8 @@
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
3
3
 
4
4
  // Local imports
5
- import { useViewerStore } from "@ogw_front/stores/viewer"
6
5
  import { useMeshPointsCommonStyle } from "./common"
6
+ import { useViewerStore } from "@ogw_front/stores/viewer"
7
7
 
8
8
  // Local constants
9
9
  const meshPointsSizeSchemas =
@@ -2,9 +2,9 @@
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
3
3
 
4
4
  // Local imports
5
- import { useViewerStore } from "@ogw_front/stores/viewer"
6
5
  import { getRGBPointsFromPreset } from "@ogw_front/utils/colormap"
7
6
  import { useMeshPointsCommonStyle } from "./common"
7
+ import { useViewerStore } from "@ogw_front/stores/viewer"
8
8
 
9
9
  // Local constants
10
10
  const meshPointsVertexAttributeSchemas =
@@ -30,7 +30,7 @@ export function useMeshPointsVertexAttributeStyle() {
30
30
  }
31
31
 
32
32
  function meshPointsVertexAttributeStoredConfig(id, name) {
33
- const storedConfigs = meshPointsVertexAttribute(id).storedConfigs
33
+ const { storedConfigs } = meshPointsVertexAttribute(id)
34
34
  if (name in storedConfigs) {
35
35
  return storedConfigs[name]
36
36
  }
@@ -46,7 +46,7 @@ export function useMeshPointsVertexAttributeStyle() {
46
46
  name,
47
47
  { minimum, maximum, colorMap },
48
48
  ) {
49
- const storedConfigs = meshPointsVertexAttribute(id).storedConfigs
49
+ const { storedConfigs } = meshPointsVertexAttribute(id)
50
50
  storedConfigs[name] = { minimum, maximum, colorMap }
51
51
  return storedConfigs[name]
52
52
  }
@@ -2,8 +2,8 @@
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
3
3
 
4
4
  // Local imports
5
- import { useViewerStore } from "@ogw_front/stores/viewer"
6
5
  import { useMeshPointsCommonStyle } from "./common"
6
+ import { useViewerStore } from "@ogw_front/stores/viewer"
7
7
 
8
8
  // Local constants
9
9
  const meshPointsVisibilitySchema =
@@ -2,8 +2,8 @@
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
3
3
 
4
4
  // Local imports
5
- import { useViewerStore } from "@ogw_front/stores/viewer"
6
5
  import { useMeshPolygonsCommonStyle } from "./common"
6
+ import { useViewerStore } from "@ogw_front/stores/viewer"
7
7
 
8
8
  // Local constants
9
9
  const meshPolygonsColorSchemas =
@@ -1,12 +1,12 @@
1
1
  // Third party imports
2
2
 
3
3
  // Local imports
4
- import { useMeshPolygonsCommonStyle } from "./common"
5
- import { useMeshPolygonsVisibilityStyle } from "./visibility"
6
4
  import { useMeshPolygonsColorStyle } from "./color"
5
+ import { useMeshPolygonsCommonStyle } from "./common"
6
+ import { useMeshPolygonsPolygonAttributeStyle } from "./polygon"
7
7
  import { useMeshPolygonsTexturesStyle } from "./textures"
8
8
  import { useMeshPolygonsVertexAttributeStyle } from "./vertex"
9
- import { useMeshPolygonsPolygonAttributeStyle } from "./polygon"
9
+ import { useMeshPolygonsVisibilityStyle } from "./visibility"
10
10
 
11
11
  // Local constants
12
12
 
@@ -34,14 +34,14 @@ export function useMeshPolygonsStyle() {
34
34
  )
35
35
  } else if (type === "textures") {
36
36
  const textures = meshPolygonsTexturesStyle.meshPolygonsTextures(id)
37
- if (textures === null) {
37
+ if (textures === undefined) {
38
38
  return Promise.resolve()
39
39
  }
40
40
  return meshPolygonsTexturesStyle.setMeshPolygonsTextures(id, textures)
41
41
  } else if (type === "vertex") {
42
42
  const name =
43
43
  meshPolygonsVertexAttributeStyle.meshPolygonsVertexAttributeName(id)
44
- if (name === null) {
44
+ if (name === undefined) {
45
45
  return Promise.resolve()
46
46
  }
47
47
  return meshPolygonsVertexAttributeStyle.setMeshPolygonsVertexAttributeName(
@@ -51,7 +51,7 @@ export function useMeshPolygonsStyle() {
51
51
  } else if (type === "polygon") {
52
52
  const name =
53
53
  meshPolygonsPolygonAttributeStyle.meshPolygonsPolygonAttributeName(id)
54
- if (name === null) {
54
+ if (name === undefined) {
55
55
  return Promise.resolve()
56
56
  }
57
57
  await meshPolygonsPolygonAttributeStyle.setMeshPolygonsPolygonAttributeName(
@@ -59,7 +59,7 @@ export function useMeshPolygonsStyle() {
59
59
  name,
60
60
  )
61
61
  } else {
62
- throw new Error("Unknown mesh polygons coloring type: " + type)
62
+ throw new Error(`Unknown mesh polygons coloring type: ${type}`)
63
63
  }
64
64
  }
65
65
 
@@ -2,9 +2,9 @@
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
3
3
 
4
4
  // Local imports
5
- import { useViewerStore } from "@ogw_front/stores/viewer"
6
5
  import { getRGBPointsFromPreset } from "@ogw_front/utils/colormap"
7
6
  import { useMeshPolygonsCommonStyle } from "./common"
7
+ import { useViewerStore } from "@ogw_front/stores/viewer"
8
8
 
9
9
  // Local constants
10
10
  const meshPolygonsPolygonAttributeSchemas =
@@ -30,7 +30,7 @@ export function useMeshPolygonsPolygonAttributeStyle() {
30
30
  }
31
31
 
32
32
  function meshPolygonsPolygonAttributeStoredConfig(id, name) {
33
- const storedConfigs = meshPolygonsPolygonAttribute(id).storedConfigs
33
+ const { storedConfigs } = meshPolygonsPolygonAttribute(id)
34
34
  if (name in storedConfigs) {
35
35
  return storedConfigs[name]
36
36
  }
@@ -46,7 +46,7 @@ export function useMeshPolygonsPolygonAttributeStyle() {
46
46
  name,
47
47
  { minimum, maximum, colorMap },
48
48
  ) {
49
- const storedConfigs = meshPolygonsPolygonAttribute(id).storedConfigs
49
+ const { storedConfigs } = meshPolygonsPolygonAttribute(id)
50
50
  storedConfigs[name] = { minimum, maximum, colorMap }
51
51
  return storedConfigs[name]
52
52
  }
@@ -2,8 +2,8 @@
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
3
3
 
4
4
  // Local imports
5
- import { useViewerStore } from "@ogw_front/stores/viewer"
6
5
  import { useMeshPolygonsCommonStyle } from "./common"
6
+ import { useViewerStore } from "@ogw_front/stores/viewer"
7
7
 
8
8
  // Local constants
9
9
  const meshPolygonsTexturesSchemas =
@@ -2,9 +2,9 @@
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
3
3
 
4
4
  // Local imports
5
- import { useViewerStore } from "@ogw_front/stores/viewer"
6
5
  import { getRGBPointsFromPreset } from "@ogw_front/utils/colormap"
7
6
  import { useMeshPolygonsCommonStyle } from "./common"
7
+ import { useViewerStore } from "@ogw_front/stores/viewer"
8
8
 
9
9
  // Local constants
10
10
  const meshPolygonsVertexAttributeSchemas =
@@ -30,7 +30,7 @@ export function useMeshPolygonsVertexAttributeStyle() {
30
30
  }
31
31
 
32
32
  function meshPolygonsVertexAttributeStoredConfig(id, name) {
33
- const storedConfigs = meshPolygonsVertexAttribute(id).storedConfigs
33
+ const { storedConfigs } = meshPolygonsVertexAttribute(id)
34
34
  if (name in storedConfigs) {
35
35
  return storedConfigs[name]
36
36
  }
@@ -46,7 +46,7 @@ export function useMeshPolygonsVertexAttributeStyle() {
46
46
  name,
47
47
  { minimum, maximum, colorMap },
48
48
  ) {
49
- const storedConfigs = meshPolygonsVertexAttribute(id).storedConfigs
49
+ const { storedConfigs } = meshPolygonsVertexAttribute(id)
50
50
  storedConfigs[name] = { minimum, maximum, colorMap }
51
51
  return storedConfigs[name]
52
52
  }
@@ -2,8 +2,8 @@
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
3
3
 
4
4
  // Local imports
5
- import { useViewerStore } from "@ogw_front/stores/viewer"
6
5
  import { useMeshPolygonsCommonStyle } from "./common"
6
+ import { useViewerStore } from "@ogw_front/stores/viewer"
7
7
 
8
8
  // Local constants
9
9
  const meshPolygonsVisibilitySchema =
@@ -2,8 +2,8 @@
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
3
3
 
4
4
  // Local imports
5
- import { useViewerStore } from "@ogw_front/stores/viewer"
6
5
  import { useMeshPolyhedraCommonStyle } from "./common"
6
+ import { useViewerStore } from "@ogw_front/stores/viewer"
7
7
 
8
8
  // Local constants
9
9
  const meshPolyhedraColorSchemas =
@@ -1,11 +1,11 @@
1
1
  // Third party imports
2
2
 
3
3
  // Local imports
4
- import { useMeshPolyhedraCommonStyle } from "./common"
5
- import { useMeshPolyhedraVisibilityStyle } from "./visibility"
6
4
  import { useMeshPolyhedraColorStyle } from "./color"
7
- import { useMeshPolyhedraVertexAttributeStyle } from "./vertex"
5
+ import { useMeshPolyhedraCommonStyle } from "./common"
8
6
  import { useMeshPolyhedraPolyhedronAttributeStyle } from "./polyhedron"
7
+ import { useMeshPolyhedraVertexAttributeStyle } from "./vertex"
8
+ import { useMeshPolyhedraVisibilityStyle } from "./visibility"
9
9
 
10
10
  // Local constants
11
11
 
@@ -34,7 +34,7 @@ export function useMeshPolyhedraStyle() {
34
34
  } else if (type === "vertex") {
35
35
  const name =
36
36
  meshPolyhedraVertexAttributeStyle.meshPolyhedraVertexAttributeName(id)
37
- if (name === null) {
37
+ if (name === undefined) {
38
38
  return Promise.resolve()
39
39
  }
40
40
  return meshPolyhedraVertexAttributeStyle.setMeshPolyhedraVertexAttributeName(
@@ -46,7 +46,7 @@ export function useMeshPolyhedraStyle() {
46
46
  meshPolyhedraPolyhedronAttributeStyle.meshPolyhedraPolyhedronAttributeName(
47
47
  id,
48
48
  )
49
- if (name === null) {
49
+ if (name === undefined) {
50
50
  return Promise.resolve()
51
51
  }
52
52
  await meshPolyhedraPolyhedronAttributeStyle.setMeshPolyhedraPolyhedronAttributeName(
@@ -54,7 +54,7 @@ export function useMeshPolyhedraStyle() {
54
54
  name,
55
55
  )
56
56
  } else {
57
- throw new Error("Unknown mesh polyhedra coloring type: " + type)
57
+ throw new Error(`Unknown mesh polyhedra coloring type: ${type}`)
58
58
  }
59
59
  }
60
60
 
@@ -2,9 +2,9 @@
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
3
3
 
4
4
  // Local imports
5
- import { useViewerStore } from "@ogw_front/stores/viewer"
6
5
  import { getRGBPointsFromPreset } from "@ogw_front/utils/colormap"
7
6
  import { useMeshPolyhedraCommonStyle } from "./common"
7
+ import { useViewerStore } from "@ogw_front/stores/viewer"
8
8
 
9
9
  // Local constants
10
10
  const meshPolyhedraPolyhedronAttributeSchemas =
@@ -30,7 +30,7 @@ export function useMeshPolyhedraPolyhedronAttributeStyle() {
30
30
  }
31
31
 
32
32
  function meshPolyhedraPolyhedronAttributeStoredConfig(id, name) {
33
- const storedConfigs = meshPolyhedraPolyhedronAttribute(id).storedConfigs
33
+ const { storedConfigs } = meshPolyhedraPolyhedronAttribute(id)
34
34
  if (name in storedConfigs) {
35
35
  return storedConfigs[name]
36
36
  }
@@ -46,7 +46,7 @@ export function useMeshPolyhedraPolyhedronAttributeStyle() {
46
46
  name,
47
47
  { minimum, maximum, colorMap },
48
48
  ) {
49
- const storedConfigs = meshPolyhedraPolyhedronAttribute(id).storedConfigs
49
+ const { storedConfigs } = meshPolyhedraPolyhedronAttribute(id)
50
50
  storedConfigs[name] = { minimum, maximum, colorMap }
51
51
  return storedConfigs[name]
52
52
  }
@@ -2,9 +2,9 @@
2
2
  import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
3
3
 
4
4
  // Local imports
5
- import { useViewerStore } from "@ogw_front/stores/viewer"
6
5
  import { getRGBPointsFromPreset } from "@ogw_front/utils/colormap"
7
6
  import { useMeshPolyhedraCommonStyle } from "./common"
7
+ import { useViewerStore } from "@ogw_front/stores/viewer"
8
8
 
9
9
  // Local constants
10
10
  const meshPolyhedraVertexAttributeSchemas =
@@ -30,7 +30,7 @@ export function useMeshPolyhedraVertexAttributeStyle() {
30
30
  }
31
31
 
32
32
  function meshPolyhedraVertexAttributeStoredConfig(id, name) {
33
- const storedConfigs = meshPolyhedraVertexAttribute(id).storedConfigs
33
+ const { storedConfigs } = meshPolyhedraVertexAttribute(id)
34
34
  if (name in storedConfigs) {
35
35
  return storedConfigs[name]
36
36
  }
@@ -46,7 +46,7 @@ export function useMeshPolyhedraVertexAttributeStyle() {
46
46
  name,
47
47
  { minimum, maximum, colorMap },
48
48
  ) {
49
- const storedConfigs = meshPolyhedraVertexAttribute(id).storedConfigs
49
+ const { storedConfigs } = meshPolyhedraVertexAttribute(id)
50
50
  storedConfigs[name] = { minimum, maximum, colorMap }
51
51
  return storedConfigs[name]
52
52
  }