@geode/opengeodeweb-front 10.45.0-rc.1 → 11.0.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.
@@ -73,7 +73,11 @@ async function files_uploaded_event(value: UploadFile[]): Promise<void> {
73
73
  { schema, params },
74
74
  {
75
75
  response_function: (response) => {
76
- textureId.value = response.id;
76
+ // A texture file holds a single image: the first imported object is the texture
77
+ const [texture] = response.data;
78
+ if (texture) {
79
+ textureId.value = texture.id;
80
+ }
77
81
  },
78
82
  },
79
83
  );
@@ -78,7 +78,8 @@ async function importItem(imported: LegacyDataId<NewDataItem> | NewDataItem): Pr
78
78
  const dataId = await importDataItem(fromLegacyDataId(imported));
79
79
  return dataId;
80
80
  }
81
- async function importFile(filename: string, geode_object_type: GeodeObjectType): Promise<string> {
81
+ // A single file can hold several objects: every one of them is imported, ids are returned in the response order
82
+ async function importFile(filename: string, geode_object_type: GeodeObjectType): Promise<string[]> {
82
83
  const backStore = useBackStore();
83
84
  const schema = back_schemas.opengeodeweb_back.save_viewable_file;
84
85
  const params = {
@@ -89,8 +90,15 @@ async function importFile(filename: string, geode_object_type: GeodeObjectType):
89
90
  schema,
90
91
  params,
91
92
  });
92
- // oxlint-disable-next-line no-unsafe-type-assertion -- this is the trusted API boundary; the back-end response shape matches NewDataItem, except for its legacy id.
93
- return importItem(response as LegacyDataId<NewDataItem>);
93
+ // oxlint-disable-next-line no-unsafe-type-assertion -- this is the trusted API boundary; each back-end response item matches NewDataItem, except for its legacy id.
94
+ const items = response.data as LegacyDataId<NewDataItem>[];
95
+ const dataIds = await Promise.all(
96
+ items.map(async (item) => {
97
+ const dataId = await importItem(item);
98
+ return dataId;
99
+ }),
100
+ );
101
+ return dataIds;
94
102
  }
95
103
 
96
104
  async function importWorkflow(files: readonly FileToImport[]): Promise<string[]> {
@@ -113,13 +121,13 @@ async function importWorkflow(files: readonly FileToImport[]): Promise<string[]>
113
121
  // A failing file does not prevent the other files from being imported
114
122
  const chunk_results = await Promise.allSettled(
115
123
  chunk.map(async ({ filename, geode_object_type }) => {
116
- const dataId = await importFile(filename, geode_object_type);
117
- return dataId;
124
+ const dataIds = await importFile(filename, geode_object_type);
125
+ return dataIds;
118
126
  }),
119
127
  );
120
128
  for (const result of chunk_results) {
121
129
  if (result.status === "fulfilled") {
122
- results.push(result.value);
130
+ results.push(...result.value);
123
131
  } else {
124
132
  errors.push(result.reason);
125
133
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geode/opengeodeweb-front",
3
- "version": "10.45.0-rc.1",
3
+ "version": "11.0.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",