@inweb/client 25.3.23 → 25.3.25
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.
- package/dist/client.js +24 -16
- package/dist/client.js.map +1 -1
- package/dist/client.min.js +1 -1
- package/dist/client.module.js +23 -14
- package/dist/client.module.js.map +1 -1
- package/lib/Api/IFile.d.ts +1 -1
- package/package.json +2 -2
- package/src/Api/File.ts +10 -3
- package/src/Api/IFile.ts +1 -1
package/lib/Api/IFile.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inweb/client",
|
|
3
|
-
"version": "25.3.
|
|
3
|
+
"version": "25.3.25",
|
|
4
4
|
"description": "JavaScript REST API client for the Open Cloud Server",
|
|
5
5
|
"homepage": "https://cloud.opendesign.com/docs/index.html",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
"ts-docs": "typedoc"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@inweb/eventemitter2": "^25.3.
|
|
29
|
+
"@inweb/eventemitter2": "^25.3.25"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/src/Api/File.ts
CHANGED
|
@@ -134,6 +134,8 @@ export class File {
|
|
|
134
134
|
this._data.updatedBy.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.updatedBy.userId}/avatar`;
|
|
135
135
|
this._data.updatedBy.fullName = userFullName(this._data.updatedBy);
|
|
136
136
|
this._data.updatedBy.initials = userInitials(this._data.updatedBy.fullName);
|
|
137
|
+
// versions since 24.10
|
|
138
|
+
this._data.versions ??= [{ ...value }];
|
|
137
139
|
// geometryGltf status since 24.12
|
|
138
140
|
this._data.status.geometryGltf ??= { state: "none" };
|
|
139
141
|
}
|
|
@@ -865,11 +867,16 @@ export class File {
|
|
|
865
867
|
.then((xhr: XMLHttpRequest) => JSON.parse(xhr.responseText))
|
|
866
868
|
.then((data) => new File(data, this.httpClient));
|
|
867
869
|
|
|
868
|
-
|
|
869
|
-
if (
|
|
870
|
+
let geometryType = "";
|
|
871
|
+
if (this.versions[0].status.geometryGltf.state !== "none") geometryType = "gltf";
|
|
872
|
+
if (this.versions[0].status.geometry.state !== "none") geometryType = "vsfx";
|
|
873
|
+
|
|
874
|
+
params = { ...params };
|
|
875
|
+
if (params.geometry === undefined) params.geometry = geometryType !== "";
|
|
876
|
+
if (params.properties === undefined) params.properties = this.versions[0].status.properties.state !== "none";
|
|
870
877
|
|
|
871
878
|
const jobs: string[] = [];
|
|
872
|
-
if (params.geometry) jobs.push((await result.extractGeometry(
|
|
879
|
+
if (params.geometry) jobs.push((await result.extractGeometry(geometryType)).outputFormat);
|
|
873
880
|
if (params.properties) jobs.push((await result.extractProperties()).outputFormat);
|
|
874
881
|
if (params.waitForDone && jobs.length > 0) await result.waitForDone(jobs, true, params);
|
|
875
882
|
|