@inweb/client 25.3.20 → 25.3.22
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 +12 -12
- package/dist/client.js.map +1 -1
- package/dist/client.min.js +1 -1
- package/dist/client.module.js +7 -7
- package/dist/client.module.js.map +1 -1
- package/lib/Api/Assembly.d.ts +1 -1
- package/lib/Api/Client.d.ts +1 -1
- package/lib/Api/File.d.ts +1 -2
- package/lib/Api/Model.d.ts +1 -2
- package/package.json +1 -2
- package/src/Api/Assembly.ts +1 -1
- package/src/Api/Client.ts +1 -1
- package/src/Api/File.ts +7 -7
- package/src/Api/Model.ts +1 -2
package/lib/Api/Assembly.d.ts
CHANGED
package/lib/Api/Client.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
30
30
|
*/
|
|
31
31
|
get serverUrl(): string;
|
|
32
32
|
/**
|
|
33
|
-
* Deprecated since `25.3`. Use
|
|
33
|
+
* Deprecated since `25.3`. Use `Viewer.options()` instead to change Viewer parameters.
|
|
34
34
|
*/
|
|
35
35
|
get options(): any;
|
|
36
36
|
/**
|
package/lib/Api/File.d.ts
CHANGED
|
@@ -289,8 +289,7 @@ export declare class File {
|
|
|
289
289
|
*/
|
|
290
290
|
getViewpoints(): Promise<any[]>;
|
|
291
291
|
/**
|
|
292
|
-
* Add new file viewpoint. To create a new viewpoint use
|
|
293
|
-
* {@link Viewer#createViewpoint | Viewer.createViewpoint()}.
|
|
292
|
+
* Add new file viewpoint. To create a new viewpoint use `Viewer.createViewpoint()`.
|
|
294
293
|
*
|
|
295
294
|
* @async
|
|
296
295
|
* @param viewpoint - Viewpoint.
|
package/lib/Api/Model.d.ts
CHANGED
|
@@ -109,8 +109,7 @@ export declare class Model {
|
|
|
109
109
|
*/
|
|
110
110
|
getViewpoints(): Promise<any[]>;
|
|
111
111
|
/**
|
|
112
|
-
* Add new model viewpoint. To create a new viewpoint use
|
|
113
|
-
* {@link Viewer#createViewpoint | Viewer.createViewpoint()}.
|
|
112
|
+
* Add new model viewpoint. To create a new viewpoint use `Viewer.createViewpoint()`.
|
|
114
113
|
*
|
|
115
114
|
* _**Note**: Assemblу models do not support viewpoints_.
|
|
116
115
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inweb/client",
|
|
3
|
-
"version": "25.3.
|
|
3
|
+
"version": "25.3.22",
|
|
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",
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"scripts": {
|
|
24
24
|
"build": "rollup -c rollup.config.js",
|
|
25
25
|
"test": "karma start karma.conf.js",
|
|
26
|
-
"docs": "jsdoc -c ../../.jsdoc.json",
|
|
27
26
|
"ts-docs": "typedoc"
|
|
28
27
|
},
|
|
29
28
|
"dependencies": {
|
package/src/Api/Assembly.ts
CHANGED
package/src/Api/Client.ts
CHANGED
|
@@ -63,7 +63,7 @@ export class Client extends EventEmitter2<ClientEventMap> {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
|
-
* Deprecated since `25.3`. Use
|
|
66
|
+
* Deprecated since `25.3`. Use `Viewer.options()` instead to change Viewer parameters.
|
|
67
67
|
*/
|
|
68
68
|
get options(): any {
|
|
69
69
|
console.warn(
|
package/src/Api/File.ts
CHANGED
|
@@ -483,8 +483,7 @@ export class File {
|
|
|
483
483
|
}
|
|
484
484
|
|
|
485
485
|
/**
|
|
486
|
-
* Add new file viewpoint. To create a new viewpoint use
|
|
487
|
-
* {@link Viewer#createViewpoint | Viewer.createViewpoint()}.
|
|
486
|
+
* Add new file viewpoint. To create a new viewpoint use `Viewer.createViewpoint()`.
|
|
488
487
|
*
|
|
489
488
|
* @async
|
|
490
489
|
* @param viewpoint - Viewpoint.
|
|
@@ -754,15 +753,16 @@ export class File {
|
|
|
754
753
|
onCheckout?: (file: File, ready: boolean) => boolean;
|
|
755
754
|
}
|
|
756
755
|
): Promise<this> {
|
|
757
|
-
|
|
756
|
+
const waitJobs = Array.isArray(jobs) ? jobs : [jobs];
|
|
758
757
|
if (waitAll === undefined) waitAll = true;
|
|
759
758
|
|
|
760
759
|
const checkDone = () =>
|
|
761
760
|
this.checkout().then((file) => {
|
|
762
|
-
const readyJobs =
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
761
|
+
const readyJobs = waitJobs.filter((job: string) => {
|
|
762
|
+
const jobStatus = file.status[job] || {};
|
|
763
|
+
return ["none", "done", "failed"].includes(jobStatus.state || "none");
|
|
764
|
+
});
|
|
765
|
+
const ready = waitAll ? readyJobs.length === waitJobs.length : readyJobs.length > 0;
|
|
766
766
|
const cancel = params?.onCheckout?.(file, ready);
|
|
767
767
|
return cancel || ready;
|
|
768
768
|
});
|
package/src/Api/Model.ts
CHANGED
|
@@ -195,8 +195,7 @@ export class Model {
|
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
/**
|
|
198
|
-
* Add new model viewpoint. To create a new viewpoint use
|
|
199
|
-
* {@link Viewer#createViewpoint | Viewer.createViewpoint()}.
|
|
198
|
+
* Add new model viewpoint. To create a new viewpoint use `Viewer.createViewpoint()`.
|
|
200
199
|
*
|
|
201
200
|
* _**Note**: Assemblу models do not support viewpoints_.
|
|
202
201
|
*
|