@geode/opengeodeweb-front 10.0.0-rc.1 → 10.0.1-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/app/components/CrsSelector.vue +3 -3
  2. package/app/components/ExtensionSelector.vue +3 -3
  3. package/app/components/FileSelector.vue +1 -2
  4. package/app/components/Inspector/InspectionButton.vue +4 -4
  5. package/app/components/MissingFilesSelector.vue +3 -3
  6. package/app/components/ObjectSelector.vue +5 -4
  7. package/app/components/Viewer/BreadCrumb.vue +1 -1
  8. package/app/components/Viewer/ContextMenu.vue +2 -2
  9. package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +81 -0
  10. package/app/components/Viewer/Grid/2D/CellsOptions.vue +2 -2
  11. package/app/components/Viewer/Grid/3D/CellsOptions.vue +2 -2
  12. package/app/components/Viewer/Options/CellAttributeSelector.vue +52 -0
  13. package/app/components/Viewer/Options/ColoringTypeSelector.vue +15 -1
  14. package/app/components/Viewer/Options/PolygonAttributeSelector.vue +2 -2
  15. package/app/components/Viewer/Options/TextureItem.vue +1 -1
  16. package/app/components/Viewer/Options/VertexAttributeSelector.vue +5 -8
  17. package/app/components/Viewer/TreeObject.vue +2 -2
  18. package/app/composables/project_manager.js +1 -10
  19. package/app/stores/data_base.js +7 -14
  20. package/app/stores/data_style.js +11 -11
  21. package/app/stores/feedback.js +1 -1
  22. package/app/stores/hybrid_viewer.js +1 -1
  23. package/app/stores/menu.js +1 -1
  24. package/app/stores/treeview.js +4 -4
  25. package/app/stores/viewer.js +2 -3
  26. package/app/utils/default_styles.js +43 -7
  27. package/app/utils/file_import_workflow.js +16 -20
  28. package/app/utils/local.js +4 -0
  29. package/internal_stores/mesh/cells.js +176 -0
  30. package/internal_stores/mesh/index.js +9 -4
  31. package/internal_stores/mesh/polygons.js +12 -3
  32. package/package.json +1 -1
  33. package/tests/integration/data/uploads/test.og_psf3d +0 -0
  34. package/tests/integration/data/uploads/test.og_rgd2d +0 -0
  35. package/tests/integration/microservices/back/requirements.txt +1 -1
  36. package/tests/integration/microservices/viewer/requirements.txt +1 -1
  37. package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +142 -0
  38. package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +16 -14
  39. package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +15 -14
  40. package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +65 -14
  41. package/tests/unit/components/CrsSelector.nuxt.test.js +1 -1
  42. package/tests/unit/components/ExtensionSelector.nuxt.test.js +1 -1
  43. package/tests/unit/components/Inspector/InspectionButton.nuxt.test.js +2 -2
  44. package/tests/unit/components/MissingFilesSelector.nuxt.test.js +1 -1
  45. package/tests/unit/components/ObjectSelector.nuxt.test.js +3 -3
  46. package/tests/unit/components/Step.nuxt.test.js +4 -4
  47. package/tests/unit/components/Stepper.nuxt.test.js +4 -4
  48. package/tests/unit/components/Wrapper.nuxt.test.js +4 -4
  49. package/tests/unit/composables/ProjectManager.nuxt.test.js +15 -18
  50. package/tests/unit/plugins/project_load.nuxt.test.js +6 -6
@@ -34,11 +34,11 @@
34
34
  ])
35
35
 
36
36
  const props = defineProps({
37
- input_geode_object: { type: String, required: true },
37
+ geode_object_type: { type: String, required: true },
38
38
  key_to_update: { type: String, required: true },
39
39
  })
40
40
 
41
- const { input_geode_object, key_to_update } = props
41
+ const { geode_object_type, key_to_update } = props
42
42
 
43
43
  const search = ref("")
44
44
  const data_table_loading = ref(false)
@@ -64,7 +64,7 @@
64
64
  }
65
65
 
66
66
  async function get_crs_table() {
67
- const params = { input_geode_object }
67
+ const params = { geode_object_type }
68
68
  toggle_loading()
69
69
  await api_fetch(
70
70
  { schema, params },
@@ -67,10 +67,10 @@
67
67
  ])
68
68
 
69
69
  const props = defineProps({
70
- input_geode_object: { type: String, required: true },
70
+ geode_object_type: { type: String, required: true },
71
71
  filenames: { type: Array, required: true },
72
72
  })
73
- const { input_geode_object, filenames } = props
73
+ const { geode_object_type, filenames } = props
74
74
  const geode_objects_and_output_extensions = ref({})
75
75
  const loading = ref(false)
76
76
 
@@ -81,7 +81,7 @@
81
81
  geode_objects_and_output_extensions.value = {}
82
82
  var promise_array = []
83
83
  for (const filename of filenames) {
84
- const params = { input_geode_object, filename }
84
+ const params = { geode_object_type, filename }
85
85
  const promise = new Promise((resolve, reject) => {
86
86
  api_fetch(
87
87
  { schema, params },
@@ -52,9 +52,8 @@
52
52
 
53
53
  async function get_allowed_files() {
54
54
  toggle_loading()
55
- const params = { supported_feature }
56
55
  await api_fetch(
57
- { schema, params },
56
+ { schema },
58
57
  {
59
58
  response_function: (response) => {
60
59
  accept.value = response._data.extensions
@@ -3,7 +3,7 @@
3
3
  <v-btn
4
4
  :loading="loading"
5
5
  color="primary"
6
- @click="get_inspection_results(props.input_geode_object, props.filename)"
6
+ @click="get_inspection_results(props.geode_object_type, props.filename)"
7
7
  >
8
8
  Inspect
9
9
  <template #loader>
@@ -24,15 +24,15 @@
24
24
  "decrement_step",
25
25
  ])
26
26
  const props = defineProps({
27
- input_geode_object: { type: String, required: true },
27
+ geode_object_type: { type: String, required: true },
28
28
  filename: { type: String, required: true },
29
29
  })
30
30
  const loading = ref(false)
31
31
  const toggle_loading = useToggle(loading)
32
32
 
33
- async function get_inspection_results(input_geode_object, filename) {
33
+ async function get_inspection_results(geode_object_type, filename) {
34
34
  toggle_loading()
35
- const params = { input_geode_object, filename }
35
+ const params = { geode_object_type, filename }
36
36
 
37
37
  await api_fetch(
38
38
  { schema, params },
@@ -58,11 +58,11 @@
58
58
 
59
59
  const props = defineProps({
60
60
  multiple: { type: Boolean, required: true },
61
- input_geode_object: { type: String, required: true },
61
+ geode_object_type: { type: String, required: true },
62
62
  filenames: { type: Array, required: true },
63
63
  })
64
64
 
65
- const { multiple, input_geode_object, filenames } = props
65
+ const { multiple, geode_object_type, filenames } = props
66
66
 
67
67
  const accept = ref("")
68
68
  const loading = ref(false)
@@ -84,7 +84,7 @@
84
84
  var promise_array = []
85
85
 
86
86
  for (const filename of filenames) {
87
- const params = { input_geode_object, filename }
87
+ const params = { geode_object_type, filename }
88
88
  const promise = new Promise((resolve, reject) => {
89
89
  api_fetch(
90
90
  { schema, params },
@@ -109,7 +109,7 @@
109
109
  toggle_loading()
110
110
  allowed_objects.value = {}
111
111
  const promise_array = filenames.map((filename) => {
112
- const params = { filename, supported_feature }
112
+ const params = { filename }
113
113
  return api_fetch({ schema, params })
114
114
  })
115
115
  const responses = await Promise.all(promise_array)
@@ -141,9 +141,9 @@
141
141
  toggle_loading()
142
142
  }
143
143
 
144
- function set_geode_object(input_geode_object) {
145
- if (input_geode_object) {
146
- emit("update_values", { input_geode_object })
144
+ function set_geode_object(geode_object_type) {
145
+ if (geode_object_type) {
146
+ emit("update_values", { geode_object_type })
147
147
  emit("increment_step")
148
148
  }
149
149
  }
@@ -155,6 +155,7 @@
155
155
  filter: opacity(0.7);
156
156
  cursor: pointer;
157
157
  }
158
+
158
159
  .disabled div {
159
160
  cursor: not-allowed;
160
161
  }
@@ -21,7 +21,7 @@
21
21
  }}
22
22
  </v-icon>
23
23
  <span class="text-subtitle-1 font-weight-regular align-center mt-1">
24
- Model Explorer ({{ metaDatas.displayed_name }})
24
+ Model Explorer ({{ metaDatas.name }})
25
25
  </span>
26
26
  </template>
27
27
  </v-menu>
@@ -104,8 +104,8 @@
104
104
 
105
105
  const menu_items = computed(() =>
106
106
  menuStore.getMenuItems(
107
- meta_data.value.object_type,
108
- meta_data.value.geode_object,
107
+ meta_data.value.viewer_type,
108
+ meta_data.value.geode_object_type,
109
109
  ),
110
110
  )
111
111
 
@@ -0,0 +1,81 @@
1
+ <template>
2
+ <ViewerContextMenuItem
3
+ :itemProps="props.itemProps"
4
+ :tooltip="props.tooltip"
5
+ :btn_image="props.btn_image"
6
+ >
7
+ <template #options>
8
+ <ViewerOptionsVisibilitySwitch v-model="visibility" />
9
+ <template v-if="visibility">
10
+ <ViewerOptionsColoringTypeSelector
11
+ :id="id"
12
+ v-model:coloring_style_key="coloring_style_key"
13
+ v-model:color="color"
14
+ v-model:textures="textures"
15
+ v-model:vertex_attribute="vertex_attribute"
16
+ v-model:cell_attribute="cell_attribute"
17
+ />
18
+ </template>
19
+ </template>
20
+ </ViewerContextMenuItem>
21
+ </template>
22
+
23
+ <script setup>
24
+ import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenuItem.vue"
25
+ import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue"
26
+ import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue"
27
+
28
+ const dataStyleStore = useDataStyleStore()
29
+ const hybridViewerStore = useHybridViewerStore()
30
+
31
+ const props = defineProps({
32
+ itemProps: { type: Object, required: true },
33
+ btn_image: { type: String, required: true },
34
+ tooltip: { type: String, required: false, default: "Cells options" },
35
+ })
36
+
37
+ const id = toRef(() => props.itemProps.id)
38
+
39
+ const visibility = computed({
40
+ get: () => dataStyleStore.meshCellsVisibility(id.value),
41
+ set: (newValue) => {
42
+ dataStyleStore.setMeshCellsVisibility(id.value, newValue)
43
+ hybridViewerStore.remoteRender()
44
+ },
45
+ })
46
+ const coloring_style_key = computed({
47
+ get: () => dataStyleStore.meshCellsActiveColoring(id.value),
48
+ set: (newValue) => {
49
+ dataStyleStore.setMeshCellsActiveColoring(id.value, newValue)
50
+ hybridViewerStore.remoteRender()
51
+ },
52
+ })
53
+ const color = computed({
54
+ get: () => dataStyleStore.meshCellsColor(id.value),
55
+ set: (newValue) => {
56
+ dataStyleStore.setMeshCellsColor(id.value, newValue)
57
+ hybridViewerStore.remoteRender()
58
+ },
59
+ })
60
+ const textures = computed({
61
+ get: () => dataStyleStore.meshCellsTextures(id.value),
62
+ set: (newValue) => {
63
+ dataStyleStore.setMeshCellsTextures(id.value, newValue)
64
+ hybridViewerStore.remoteRender()
65
+ },
66
+ })
67
+ const vertex_attribute = computed({
68
+ get: () => dataStyleStore.meshCellsVertexAttribute(id.value),
69
+ set: (newValue) => {
70
+ dataStyleStore.setMeshCellsVertexAttribute(id.value, newValue)
71
+ hybridViewerStore.remoteRender()
72
+ },
73
+ })
74
+ const cell_attribute = computed({
75
+ get: () => dataStyleStore.meshCellsCellAttribute(id.value),
76
+ set: (newValue) => {
77
+ dataStyleStore.setMeshCellsCellAttribute(id.value, newValue)
78
+ hybridViewerStore.remoteRender()
79
+ },
80
+ })
81
+ </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <ViewerGenericMeshPolygonsOptions
2
+ <ViewerGenericMeshCellsOptions
3
3
  :itemProps="props.itemProps"
4
4
  :btn_image="Grid2D_Cells"
5
5
  tooltip="Cells options"
@@ -7,7 +7,7 @@
7
7
  </template>
8
8
 
9
9
  <script setup>
10
- import ViewerGenericMeshPolygonsOptions from "@ogw_front/components/Viewer/Generic/Mesh/PolygonsOptions.vue"
10
+ import ViewerGenericMeshCellsOptions from "@ogw_front/components/Viewer/Generic/Mesh/CellsOptions.vue"
11
11
  import Grid2D_Cells from "@ogw_front/assets/viewer_svgs/grid_2d_cells.svg"
12
12
 
13
13
  const props = defineProps({
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <ViewerGenericMeshPolyhedraOptions
2
+ <ViewerGenericMeshCellsOptions
3
3
  :itemProps="props.itemProps"
4
4
  :btn_image="Grid3DCells"
5
5
  tooltip="Cells options"
@@ -7,7 +7,7 @@
7
7
  </template>
8
8
 
9
9
  <script setup>
10
- import ViewerGenericMeshPolyhedraOptions from "@ogw_front/components/Viewer/Generic/Mesh/PolyhedraOptions.vue"
10
+ import ViewerGenericMeshCellsOptions from "@ogw_front/components/Viewer/Generic/Mesh/CellsOptions.vue"
11
11
  import Grid3DCells from "@ogw_front/assets/viewer_svgs/grid_3d_cells.svg"
12
12
 
13
13
  const props = defineProps({
@@ -0,0 +1,52 @@
1
+ <template>
2
+ <v-select
3
+ v-model="cell_attribute_name"
4
+ :items="cell_attribute_names"
5
+ label="Select an attribute"
6
+ density="compact"
7
+ />
8
+ </template>
9
+
10
+ <script setup>
11
+ import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
12
+
13
+ const props = defineProps({
14
+ id: { type: String, required: true },
15
+ })
16
+
17
+ const model = defineModel()
18
+ const cell_attribute_name = ref("")
19
+ const cell_attribute_names = ref([])
20
+ const cell_attribute = reactive({ name: cell_attribute_name.value })
21
+
22
+ onMounted(() => {
23
+ if (model.value != null) {
24
+ cell_attribute_name.value = model.value.name
25
+ }
26
+ })
27
+
28
+ watch(cell_attribute_name, (value) => {
29
+ cell_attribute.name = value
30
+ model.value = cell_attribute
31
+ })
32
+
33
+ onMounted(() => {
34
+ getCellAttributes()
35
+ })
36
+
37
+ function getCellAttributes() {
38
+ api_fetch(
39
+ {
40
+ schema: back_schemas.opengeodeweb_back.cell_attribute_names,
41
+ params: {
42
+ id: props.id,
43
+ },
44
+ },
45
+ {
46
+ response_function: (response) => {
47
+ cell_attribute_names.value = response._data.cell_attribute_names
48
+ },
49
+ },
50
+ )
51
+ }
52
+ </script>
@@ -37,6 +37,12 @@
37
37
  <!-- <template v-if="coloring_style_key === edge_dict['value']">
38
38
  <ViewerOptionsEdgeAttributeSelector v-model="edge_attribute" :id="id" />
39
39
  </template> -->
40
+ <template v-if="coloring_style_key === cell_dict['value']">
41
+ <ViewerOptionsCellAttributeSelector
42
+ v-model="cell_attribute"
43
+ :id="id"
44
+ />
45
+ </template>
40
46
  <template v-if="coloring_style_key === polygon_dict['value']">
41
47
  <ViewerOptionsPolygonAttributeSelector
42
48
  v-model="polygon_attribute"
@@ -61,6 +67,7 @@
61
67
  import ViewerOptionsVertexAttributeSelector from "@ogw_front/components/Viewer/Options/VertexAttributeSelector.vue"
62
68
  // import ViewerOptionsEdgeAttributeSelector from "@ogw_front/components/Viewer/Options/EdgeAttributeSelector.vue"
63
69
  import ViewerOptionsPolygonAttributeSelector from "@ogw_front/components/Viewer/Options/PolygonAttributeSelector.vue"
70
+ import ViewerOptionsCellAttributeSelector from "@ogw_front/components/Viewer/Options/CellAttributeSelector.vue"
64
71
  import ViewerOptionsPolyhedronAttributeSelector from "@ogw_front/components/Viewer/Options/PolyhedronAttributeSelector.vue"
65
72
 
66
73
  const coloring_style_key = defineModel("coloring_style_key")
@@ -69,6 +76,7 @@
69
76
  const textures = defineModel("textures")
70
77
  const vertex_attribute = defineModel("vertex_attribute")
71
78
  // const edge_attribute = defineModel("edge_attribute");
79
+ const cell_attribute = defineModel("cell_attribute")
72
80
  const polygon_attribute = defineModel("polygon_attribute")
73
81
  const polyhedron_attribute = defineModel("polyhedron_attribute")
74
82
 
@@ -83,6 +91,10 @@
83
91
  const has_vertex = computed(() =>
84
92
  vertex_attribute.value !== undefined ? true : false,
85
93
  )
94
+ // const has_edge = computed(() => (edge_attribute.value !== undefined ? true : false));
95
+ const has_cells = computed(() =>
96
+ cell_attribute.value !== undefined ? true : false,
97
+ )
86
98
  const has_polygons = computed(() =>
87
99
  polygon_attribute.value !== undefined ? true : false,
88
100
  )
@@ -93,7 +105,8 @@
93
105
  const color_dict = { name: "Color", value: "color" }
94
106
  const textures_dict = { name: "Textures", value: "textures" }
95
107
  const vertex_dict = { name: "Vertex attribute", value: "vertex" }
96
- // const edge_dict = { name: "Edge attribute", value: "edge" };
108
+ // const edge_dict = { name: "Edge attribute", value: "edge" }
109
+ const cell_dict = { name: "Cell attribute", value: "cell" }
97
110
  const polygon_dict = { name: "Polygon attribute", value: "polygon" }
98
111
  const polyhedron_dict = {
99
112
  name: "Polyhedron attribute",
@@ -105,6 +118,7 @@
105
118
  if (has_textures.value) array.push(textures_dict)
106
119
  if (has_vertex.value) array.push(vertex_dict)
107
120
  // if (has_edges.value) array.push(edge_dict);
121
+ if (has_cells.value) array.push(cell_dict)
108
122
  if (has_polygons.value) array.push(polygon_dict)
109
123
  if (has_polyhedra.value) array.push(polyhedron_dict)
110
124
 
@@ -31,10 +31,10 @@
31
31
  })
32
32
 
33
33
  onMounted(() => {
34
- getVertexAttributes()
34
+ getPolygonAttributes()
35
35
  })
36
36
 
37
- function getVertexAttributes() {
37
+ function getPolygonAttributes() {
38
38
  api_fetch(
39
39
  {
40
40
  schema: back_schemas.opengeodeweb_back.polygon_attribute_names,
@@ -81,7 +81,7 @@
81
81
  {
82
82
  schema: back_schemas.opengeodeweb_back.save_viewable_file,
83
83
  params: {
84
- input_geode_object: "RasterImage2D",
84
+ geode_object_type: "RasterImage2D",
85
85
  filename: value[0].name,
86
86
  },
87
87
  },
@@ -12,7 +12,12 @@
12
12
 
13
13
  const model = defineModel()
14
14
 
15
+ const props = defineProps({
16
+ id: { type: String, required: true },
17
+ })
18
+
15
19
  const vertex_attribute_name = ref("")
20
+ const vertex_attribute_names = ref([])
16
21
 
17
22
  onMounted(() => {
18
23
  if (model.value != null) {
@@ -26,14 +31,6 @@
26
31
  model.value = vertex_attribute
27
32
  })
28
33
 
29
- const props = defineProps({
30
- id: { type: String, required: true },
31
- })
32
-
33
- const dataBaseStore = useDataBaseStore()
34
-
35
- const vertex_attribute_names = ref([])
36
-
37
34
  onMounted(() => {
38
35
  getVertexAttributes()
39
36
  })
@@ -63,7 +63,7 @@
63
63
  dataStyleStore.setVisibility(item.id, false)
64
64
 
65
65
  const objectMeta = dataBaseStore.itemMetaDatas(item.id)
66
- if (objectMeta.object_type === "mesh") {
66
+ if (objectMeta.viewer_type === "mesh") {
67
67
  if (dataBaseStore.db[item.id]?.mesh_components_selection) {
68
68
  dataBaseStore.db[item.id].mesh_components_selection = []
69
69
  }
@@ -77,7 +77,7 @@
77
77
  )
78
78
 
79
79
  function isModel(item) {
80
- return item.object_type === "model"
80
+ return item.viewer_type === "model"
81
81
  }
82
82
 
83
83
  onMounted(() => {
@@ -92,18 +92,9 @@ export function useProjectManager() {
92
92
  const items = Object.entries(snapshotDataBase).map(function (pair) {
93
93
  const id = pair[0]
94
94
  const item = pair[1]
95
- const binaryLightViewable =
96
- item && item.vtk_js && item.vtk_js.binary_light_viewable
97
- ? item.vtk_js.binary_light_viewable
98
- : undefined
99
95
  return {
100
96
  id: id,
101
- object_type: item.object_type,
102
- geode_object: item.geode_object,
103
- native_filename: item.native_filename,
104
- viewable_filename: item.viewable_filename,
105
- displayed_name: item.displayed_name,
106
- vtk_js: { binary_light_viewable: binaryLightViewable },
97
+ ...item,
107
98
  }
108
99
  })
109
100
 
@@ -51,12 +51,12 @@ export const useDataBaseStore = defineStore("dataBase", () => {
51
51
  async function addItem(
52
52
  id,
53
53
  value = {
54
- object_type,
55
- geode_object,
56
- native_filename,
57
- viewable_filename,
58
- displayed_name,
59
- vtk_js: { binary_light_viewable },
54
+ viewer_type,
55
+ geode_object_type,
56
+ native_file,
57
+ viewable_file,
58
+ name,
59
+ binary_light_viewable,
60
60
  },
61
61
  ) {
62
62
  db[id] = value
@@ -125,14 +125,7 @@ export const useDataBaseStore = defineStore("dataBase", () => {
125
125
  for (const [id, item] of Object.entries(db)) {
126
126
  if (!item) continue
127
127
  snapshotDb[id] = {
128
- object_type: item.object_type,
129
- geode_object: item.geode_object,
130
- native_filename: item.native_filename,
131
- viewable_filename: item.viewable_filename,
132
- displayed_name: item.displayed_name,
133
- vtk_js: {
134
- binary_light_viewable: item?.vtk_js?.binary_light_viewable,
135
- },
128
+ ...item,
136
129
  }
137
130
  }
138
131
  return { db: snapshotDb }
@@ -19,23 +19,23 @@ export const useDataStyleStore = defineStore("dataStyle", () => {
19
19
  "dataBaseStore.itemMetaDatas(id)",
20
20
  dataBaseStore.itemMetaDatas(id),
21
21
  )
22
- const object_type = dataBaseStore.itemMetaDatas(id).object_type
23
- if (object_type === "mesh") {
22
+ const { viewer_type } = dataBaseStore.itemMetaDatas(id)
23
+ if (viewer_type === "mesh") {
24
24
  return Promise.all([meshStyleStore.setMeshVisibility(id, visibility)])
25
- } else if (object_type === "model") {
25
+ } else if (viewer_type === "model") {
26
26
  return Promise.all([modelStyleStore.setModelVisibility(id, visibility)])
27
27
  }
28
- throw new Error("Unknown object_type")
28
+ throw new Error("Unknown viewer_type")
29
29
  }
30
30
 
31
31
  function applyDefaultStyle(id) {
32
- const { object_type } = dataBaseStore.itemMetaDatas(id)
33
- if (object_type === "mesh") {
32
+ const { viewer_type } = dataBaseStore.itemMetaDatas(id)
33
+ if (viewer_type === "mesh") {
34
34
  return meshStyleStore.applyMeshStyle(id)
35
- } else if (object_type === "model") {
35
+ } else if (viewer_type === "model") {
36
36
  return modelStyleStore.applyModelStyle(id)
37
37
  } else {
38
- throw new Error("Unknown object_type: " + object_type)
38
+ throw new Error("Unknown viewer_type: " + viewer_type)
39
39
  }
40
40
  }
41
41
 
@@ -58,11 +58,11 @@ export const useDataStyleStore = defineStore("dataStyle", () => {
58
58
  const promises = []
59
59
  for (const id of ids) {
60
60
  const meta = dataBaseStore.itemMetaDatas(id)
61
- const objectType = meta?.object_type
61
+ const viewerType = meta?.viewer_type
62
62
  const style = dataStyleState.styles[id]
63
- if (style && objectType === "mesh") {
63
+ if (style && viewerType === "mesh") {
64
64
  promises.push(meshStyleStore.applyMeshStyle(id))
65
- } else if (style && objectType === "model") {
65
+ } else if (style && viewerType === "model") {
66
66
  promises.push(modelStyleStore.applyModelStyle(id))
67
67
  }
68
68
  }
@@ -4,7 +4,7 @@ export const useFeedbackStore = defineStore("feedback", {
4
4
  state: () => ({
5
5
  feedbacks: [],
6
6
  server_error: false,
7
- feedbacks_timeout_miliseconds: 5000,
7
+ feedbacks_timeout_miliseconds: 10 * 1000,
8
8
  }),
9
9
  actions: {
10
10
  async add_error(code, route, name, description) {
@@ -56,7 +56,7 @@ export const useHybridViewerStore = defineStore("hybridViewer", () => {
56
56
  const reader = vtkXMLPolyDataReader.newInstance()
57
57
  const textEncoder = new TextEncoder()
58
58
  await reader.parseAsArrayBuffer(
59
- textEncoder.encode(value.vtk_js.binary_light_viewable),
59
+ textEncoder.encode(value.binary_light_viewable),
60
60
  )
61
61
  const polydata = reader.getOutputData(0)
62
62
  const mapper = vtkMapper.newInstance()
@@ -64,7 +64,7 @@ const Grid2D_menu = [
64
64
  const Grid3D_menu = [
65
65
  Grid3DPointsOptions,
66
66
  Grid3DEdgesOptions,
67
- Grid3DFacetsOptions,
67
+ // Grid3DFacetsOptions,
68
68
  Grid3DCellsOptions,
69
69
  ]
70
70
 
@@ -11,11 +11,11 @@ export const useTreeviewStore = defineStore("treeview", () => {
11
11
  const pendingSelectionIds = ref([])
12
12
 
13
13
  // /** Functions **/
14
- function addItem(geodeObject, displayed_name, id, object_type) {
15
- const child = { title: displayed_name, id, object_type }
14
+ function addItem(geode_object_type, name, id, viewer_type) {
15
+ const child = { title: name, id, viewer_type }
16
16
 
17
17
  for (let i = 0; i < items.value.length; i++) {
18
- if (items.value[i].title === geodeObject) {
18
+ if (items.value[i].title === geode_object_type) {
19
19
  items.value[i].children.push(child)
20
20
  items.value[i].children.sort((a, b) =>
21
21
  a.title.localeCompare(b.title, undefined, {
@@ -27,7 +27,7 @@ export const useTreeviewStore = defineStore("treeview", () => {
27
27
  return
28
28
  }
29
29
  }
30
- items.value.push({ title: geodeObject, children: [child] })
30
+ items.value.push({ title: geode_object_type, children: [child] })
31
31
  selection.value.push(child)
32
32
  }
33
33
 
@@ -105,9 +105,8 @@ export const useViewerStore = defineStore("viewer", {
105
105
  })
106
106
 
107
107
  // Connect
108
- const { connectImageStream } = await import(
109
- "@kitware/vtk.js/Rendering/Misc/RemoteView"
110
- )
108
+ const { connectImageStream } =
109
+ await import("@kitware/vtk.js/Rendering/Misc/RemoteView")
111
110
  const viewer_store = this
112
111
  return new Promise((resolve, reject) => {
113
112
  clientToConnect