@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/dist/client.js
CHANGED
|
@@ -1935,29 +1935,31 @@
|
|
|
1935
1935
|
return this._data;
|
|
1936
1936
|
}
|
|
1937
1937
|
set data(value) {
|
|
1938
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1939
|
-
var
|
|
1938
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
1939
|
+
var _m, _o, _p, _q, _r, _s, _t, _u;
|
|
1940
1940
|
this._data = value;
|
|
1941
1941
|
this._data.previewUrl = value.preview ? `${this.httpClient.serverUrl}${this.path}/preview` : "";
|
|
1942
1942
|
// owner since 24.8
|
|
1943
1943
|
if (typeof this._data.owner === "string")
|
|
1944
1944
|
this._data.owner = { userId: this._data.owner };
|
|
1945
|
-
(_a = (
|
|
1945
|
+
(_a = (_m = this._data).owner) !== null && _a !== void 0 ? _a : (_m.owner = {});
|
|
1946
1946
|
this._data.owner.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.owner.userId}/avatar`;
|
|
1947
1947
|
this._data.owner.fullName = userFullName(this._data.owner);
|
|
1948
1948
|
this._data.owner.initials = userInitials(this._data.owner.fullName);
|
|
1949
1949
|
// status since 24.9
|
|
1950
|
-
(_b = (
|
|
1951
|
-
(_c = (
|
|
1952
|
-
(_e = (
|
|
1953
|
-
(_g = (
|
|
1950
|
+
(_b = (_o = this._data).status) !== null && _b !== void 0 ? _b : (_o.status = {});
|
|
1951
|
+
(_c = (_p = this._data.status).geometry) !== null && _c !== void 0 ? _c : (_p.geometry = { state: (_d = this._data.geometryStatus) !== null && _d !== void 0 ? _d : "none" });
|
|
1952
|
+
(_e = (_q = this._data.status).properties) !== null && _e !== void 0 ? _e : (_q.properties = { state: (_f = this._data.propertiesStatus) !== null && _f !== void 0 ? _f : "none" });
|
|
1953
|
+
(_g = (_r = this._data.status).validation) !== null && _g !== void 0 ? _g : (_r.validation = { state: (_h = this._data.validationStatus) !== null && _h !== void 0 ? _h : "none" });
|
|
1954
1954
|
// updatedBy since 24.10
|
|
1955
|
-
(_j = (
|
|
1955
|
+
(_j = (_s = this._data).updatedBy) !== null && _j !== void 0 ? _j : (_s.updatedBy = {});
|
|
1956
1956
|
this._data.updatedBy.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.updatedBy.userId}/avatar`;
|
|
1957
1957
|
this._data.updatedBy.fullName = userFullName(this._data.updatedBy);
|
|
1958
1958
|
this._data.updatedBy.initials = userInitials(this._data.updatedBy.fullName);
|
|
1959
|
+
// versions since 24.10
|
|
1960
|
+
(_k = (_t = this._data).versions) !== null && _k !== void 0 ? _k : (_t.versions = [{ ...value }]);
|
|
1959
1961
|
// geometryGltf status since 24.12
|
|
1960
|
-
(
|
|
1962
|
+
(_l = (_u = this._data.status).geometryGltf) !== null && _l !== void 0 ? _l : (_u.geometryGltf = { state: "none" });
|
|
1961
1963
|
}
|
|
1962
1964
|
/**
|
|
1963
1965
|
* Returns a list of files in different formats in which the active version of the file was
|
|
@@ -2590,17 +2592,26 @@
|
|
|
2590
2592
|
.uploadFile(`${this.path}/versions`, file, (progress) => { var _a; return (_a = params.onProgress) === null || _a === void 0 ? void 0 : _a.call(params, progress, file); })
|
|
2591
2593
|
.then((xhr) => JSON.parse(xhr.responseText))
|
|
2592
2594
|
.then((data) => new File(data, this.httpClient));
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2595
|
+
let geometryType = "";
|
|
2596
|
+
if (this.versions[0].status.geometryGltf.state !== "none")
|
|
2597
|
+
geometryType = "gltf";
|
|
2598
|
+
if (this.versions[0].status.geometry.state !== "none")
|
|
2599
|
+
geometryType = "vsfx";
|
|
2600
|
+
params = { ...params };
|
|
2601
|
+
if (params.geometry === undefined)
|
|
2602
|
+
params.geometry = geometryType !== "";
|
|
2603
|
+
if (params.properties === undefined)
|
|
2604
|
+
params.properties = this.versions[0].status.properties.state !== "none";
|
|
2597
2605
|
const jobs = [];
|
|
2598
2606
|
if (params.geometry)
|
|
2599
|
-
jobs.push((await result.extractGeometry(
|
|
2607
|
+
jobs.push((await result.extractGeometry(geometryType)).outputFormat);
|
|
2600
2608
|
if (params.properties)
|
|
2601
2609
|
jobs.push((await result.extractProperties()).outputFormat);
|
|
2602
|
-
if (
|
|
2603
|
-
|
|
2610
|
+
if (jobs.length > 0)
|
|
2611
|
+
if (params.waitForDone)
|
|
2612
|
+
await result.waitForDone(jobs, true, params);
|
|
2613
|
+
else
|
|
2614
|
+
await result.checkout();
|
|
2604
2615
|
await this.checkout();
|
|
2605
2616
|
return result;
|
|
2606
2617
|
}
|
|
@@ -3716,7 +3727,7 @@
|
|
|
3716
3727
|
.then((data) => ({
|
|
3717
3728
|
...data,
|
|
3718
3729
|
server: data.version,
|
|
3719
|
-
client: "25.3.
|
|
3730
|
+
client: "25.3.26",
|
|
3720
3731
|
}));
|
|
3721
3732
|
}
|
|
3722
3733
|
/**
|
|
@@ -4031,8 +4042,11 @@
|
|
|
4031
4042
|
jobs.push((await result.extractGeometry(geometryType)).outputFormat);
|
|
4032
4043
|
if (params.properties)
|
|
4033
4044
|
jobs.push((await result.extractProperties()).outputFormat);
|
|
4034
|
-
if (
|
|
4035
|
-
|
|
4045
|
+
if (jobs.length > 0)
|
|
4046
|
+
if (params.waitForDone)
|
|
4047
|
+
await result.waitForDone(jobs, true, params);
|
|
4048
|
+
else
|
|
4049
|
+
await result.checkout();
|
|
4036
4050
|
return result;
|
|
4037
4051
|
}
|
|
4038
4052
|
/**
|
|
@@ -4393,7 +4407,7 @@
|
|
|
4393
4407
|
}
|
|
4394
4408
|
|
|
4395
4409
|
///////////////////////////////////////////////////////////////////////////////
|
|
4396
|
-
const version = "25.3.
|
|
4410
|
+
const version = "25.3.26";
|
|
4397
4411
|
|
|
4398
4412
|
exports.Assembly = Assembly;
|
|
4399
4413
|
exports.ClashTest = ClashTest;
|