@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/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,13 +2592,19 @@
|
|
|
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
2610
|
if (params.waitForDone && jobs.length > 0)
|
|
@@ -3716,7 +3724,7 @@
|
|
|
3716
3724
|
.then((data) => ({
|
|
3717
3725
|
...data,
|
|
3718
3726
|
server: data.version,
|
|
3719
|
-
client: "25.3.
|
|
3727
|
+
client: "25.3.25",
|
|
3720
3728
|
}));
|
|
3721
3729
|
}
|
|
3722
3730
|
/**
|
|
@@ -4393,7 +4401,7 @@
|
|
|
4393
4401
|
}
|
|
4394
4402
|
|
|
4395
4403
|
///////////////////////////////////////////////////////////////////////////////
|
|
4396
|
-
const version = "25.3.
|
|
4404
|
+
const version = "25.3.25";
|
|
4397
4405
|
|
|
4398
4406
|
exports.Assembly = Assembly;
|
|
4399
4407
|
exports.ClashTest = ClashTest;
|