@geode/opengeodeweb-front 10.42.0-rc.1 → 10.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -176,7 +176,7 @@ watch(
176
176
  @folders-ignored="warnFoldersIgnored"
177
177
  />
178
178
 
179
- <v-card-text v-if="internal_files.length" class="mt-6 pa-0">
179
+ <v-card-text v-if="!mini && internal_files.length" class="mt-6 pa-0">
180
180
  <v-sheet class="d-flex align-center mb-4" color="transparent">
181
181
  <v-icon icon="mdi-file-check" class="mr-3" color="primary" size="24" />
182
182
  <span class="text-subtitle-1 font-weight-bold text-white"> Selected files </span>
@@ -95,8 +95,9 @@ watch(textureId, (value) => {
95
95
  </style>
96
96
 
97
97
  <template>
98
- <v-col cols="8" class="pa-1">
98
+ <v-col class="pa-1">
99
99
  <v-select
100
+ data-testid="textureNameSelector"
100
101
  v-model="textureName"
101
102
  :items="textureCoordinates"
102
103
  label="Select a texture"
@@ -104,7 +105,7 @@ watch(textureId, (value) => {
104
105
  hide-details
105
106
  />
106
107
  </v-col>
107
- <v-col cols="1" class="ma-1 d-flex justify-center align-center">
108
+ <v-col cols="auto" class="pa-1 d-flex justify-center align-center">
108
109
  <v-badge :model-value="textureId !== ''" color="white" floating dot offset-x="10" offset-y="10">
109
110
  <FileUploader
110
111
  @files_uploaded="files_uploaded_event($event)"
@@ -116,7 +117,7 @@ watch(textureId, (value) => {
116
117
  />
117
118
  </v-badge>
118
119
  </v-col>
119
- <v-col v-if="textureName === '' || textureId === ''" cols="1">
120
+ <v-col v-if="textureName === '' || textureId === ''" cols="auto">
120
121
  <v-icon size="20" icon="mdi-close-circle" v-tooltip:bottom="'Invalid texture'" />
121
122
  </v-col>
122
123
  </template>
@@ -1,3 +1,5 @@
1
+ import type { MeshApplyTexturesParams } from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
2
+
1
3
  import {
2
4
  type AttributeConfig,
3
5
  CELLS_DEFAULT_COLOR,
@@ -32,13 +34,11 @@ interface MeshEdgesColoring extends MeshComponentColoring {
32
34
 
33
35
  interface MeshCellsColoring extends MeshComponentColoring {
34
36
  cell: AttributeConfig;
35
- // oxlint-disable-next-line unicorn/no-null
36
- textures: null;
37
+ textures: MeshApplyTexturesParams["textures"];
37
38
  }
38
39
 
39
40
  interface MeshPolygonsColoring extends MeshComponentColoring {
40
- // oxlint-disable-next-line unicorn/no-null
41
- textures: null;
41
+ textures: MeshApplyTexturesParams["textures"];
42
42
  polygon: AttributeConfig;
43
43
  }
44
44
 
@@ -157,8 +157,7 @@ function meshCellsDefaultStyle(
157
157
  active: MESH_DEFAULT_ACTIVE_COLORING,
158
158
  cell: emptyAttributeConfig(),
159
159
  constant,
160
- // oxlint-disable-next-line unicorn/no-null
161
- textures: null,
160
+ textures: [],
162
161
  vertex: emptyAttributeConfig(),
163
162
  },
164
163
  };
@@ -173,8 +172,7 @@ function meshPolygonsDefaultStyle(
173
172
  coloring: {
174
173
  active: MESH_DEFAULT_ACTIVE_COLORING,
175
174
  constant,
176
- // oxlint-disable-next-line unicorn/no-null
177
- textures: null,
175
+ textures: [],
178
176
  polygon: emptyAttributeConfig(),
179
177
  vertex: emptyAttributeConfig(),
180
178
  },
@@ -68,10 +68,12 @@ async function setMeshCellsActiveColoring(
68
68
  return result;
69
69
  }
70
70
  if (type === "textures") {
71
- const result = await whenDefined(deps.texturesStyle.meshCellsTextures(id), async (value) => {
72
- const applied = await deps.texturesStyle.setMeshCellsTextures(id, value);
73
- return applied;
74
- });
71
+ const textures = deps.texturesStyle.meshCellsTextures(id);
72
+ // The viewer requires at least one texture: nothing to apply until one is picked.
73
+ if (textures === undefined || textures.length === 0) {
74
+ return undefined;
75
+ }
76
+ const result = await deps.texturesStyle.setMeshCellsTextures(id, textures);
75
77
  return result;
76
78
  }
77
79
  if (type === "vertex") {
@@ -78,10 +78,12 @@ async function setMeshPolygonsActiveColoring(
78
78
  return result;
79
79
  }
80
80
  if (type === "textures") {
81
- const result = await whenDefined(deps.texturesStyle.meshPolygonsTextures(id), async (value) => {
82
- const applied = await deps.texturesStyle.setMeshPolygonsTextures(id, value);
83
- return applied;
84
- });
81
+ const textures = deps.texturesStyle.meshPolygonsTextures(id);
82
+ // The viewer requires at least one texture: nothing to apply until one is picked.
83
+ if (textures === undefined || textures.length === 0) {
84
+ return undefined;
85
+ }
86
+ const result = await deps.texturesStyle.setMeshPolygonsTextures(id, textures);
85
87
  return result;
86
88
  }
87
89
  if (type === "vertex") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geode/opengeodeweb-front",
3
- "version": "10.42.0-rc.1",
3
+ "version": "10.42.0",
4
4
  "description": "OpenSource Vue/Nuxt/Pinia/Vuetify framework for web applications",
5
5
  "homepage": "https://github.com/Geode-solutions/OpenGeodeWeb-Front",
6
6
  "bugs": {
@@ -64,9 +64,9 @@
64
64
  "prepublishOnly": "npm run build"
65
65
  },
66
66
  "dependencies": {
67
- "@geode/cloud-api": "next",
68
- "@geode/opengeodeweb-back": "next",
69
- "@geode/opengeodeweb-viewer": "next",
67
+ "@geode/cloud-api": "latest",
68
+ "@geode/opengeodeweb-back": "latest",
69
+ "@geode/opengeodeweb-viewer": "latest",
70
70
  "@kitware/vtk.js": "33.3.0",
71
71
  "@mdi/font": "7.4.47",
72
72
  "@msgpack/msgpack": "2.8.0",