@inweb/client 25.3.24 → 25.3.26
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 +34 -20
- package/dist/client.js.map +1 -1
- package/dist/client.min.js +1 -1
- package/dist/client.module.js +25 -16
- package/dist/client.module.js.map +1 -1
- package/lib/Api/IFile.d.ts +1 -1
- package/package.json +2 -2
- package/src/Api/Client.ts +3 -1
- package/src/Api/File.ts +13 -4
- 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.26",
|
|
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.26"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/src/Api/Client.ts
CHANGED
|
@@ -491,7 +491,9 @@ export class Client extends EventEmitter2<ClientEventMap> {
|
|
|
491
491
|
const jobs: string[] = [];
|
|
492
492
|
if (params.geometry) jobs.push((await result.extractGeometry(geometryType)).outputFormat);
|
|
493
493
|
if (params.properties) jobs.push((await result.extractProperties()).outputFormat);
|
|
494
|
-
if (
|
|
494
|
+
if (jobs.length > 0)
|
|
495
|
+
if (params.waitForDone) await result.waitForDone(jobs, true, params);
|
|
496
|
+
else await result.checkout();
|
|
495
497
|
|
|
496
498
|
return result;
|
|
497
499
|
}
|
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,13 +867,20 @@ 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
|
-
if (
|
|
881
|
+
if (jobs.length > 0)
|
|
882
|
+
if (params.waitForDone) await result.waitForDone(jobs, true, params);
|
|
883
|
+
else await result.checkout();
|
|
875
884
|
|
|
876
885
|
await this.checkout();
|
|
877
886
|
|