@procore/bim-webviewer-sdk 14.0.0 → 14.1.0-rc.0
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/CHANGELOG.md +23 -0
- package/dist/Procore.Bim.Webviewer.d.ts +17 -2
- package/dist/Procore.Bim.Webviewer.js +1 -1
- package/dist/types/src/Webviewer.d.ts +4 -0
- package/dist/types/src/api/analytic_events/__tests__/payloadFactories.test.d.ts +1 -0
- package/dist/types/src/api/analytic_events/analyticKeys.d.ts +20 -8
- package/dist/types/src/api/analytic_events/payloadFactories.d.ts +16 -8
- package/dist/types/src/api/types/FileExtraction.d.ts +8 -0
- package/dist/types/src/api/types/Model.d.ts +3 -1
- package/dist/types/src/components/HomeViewpointManager/HomeViewpointManager.d.ts +7 -1
- package/dist/types/src/components/HomeViewpointManager/__tests__/fixtures.d.ts +8 -1
- package/dist/types/src/components/RootComponent.d.ts +2 -0
- package/dist/types/src/components/ShortestDistanceComponent.d.ts +27 -3
- package/dist/types/src/components/StatsJS.d.ts +11 -0
- package/dist/types/src/components/__tests__/ShortestDistanceComponent.test.d.ts +1 -0
- package/dist/types/src/controllers/Bootstrapper.d.ts +4 -4
- package/dist/types/src/controllers/PubSubController.d.ts +1 -0
- package/dist/types/src/controllers/RenderController.d.ts +17 -12
- package/dist/types/src/controllers/RenderControllerProxy.d.ts +4 -11
- package/dist/types/src/controllers/RenderControllerWorker.d.ts +3 -0
- package/dist/types/src/procoregl/StreamedGeometryFactory.d.ts +0 -2
- package/dist/types/src/pwfreader/PWF.d.ts +3 -0
- package/dist/types/src/pwfreader/pwf/impl/bufferReader/PartitionProxyBufferReader.d.ts +1 -0
- package/dist/types/src/pwfreader/shared/MeshServices.d.ts +1 -0
- package/dist/types/src/pwfreader/shared/Meshnode.d.ts +17 -11
- package/dist/types/src/pwfreader/streaming/PartitionProxy.d.ts +6 -0
- package/dist/types/src/pwfreader/streaming/PartitionUrl.d.ts +1 -0
- package/dist/types/src/pwfreader/streaming/StreamedMeshServices.d.ts +1 -1
- package/dist/types/src/pwfreader/streaming/StreamedMeshnode.d.ts +2 -12
- package/dist/types/src/pwfreader/streaming/__tests__/PartitionUrl.test.d.ts +1 -0
- package/dist/types/src/utils/ApiMetaData/ApiMetaData.d.ts +2 -1
- package/dist/types/src/utils/ApiMetaData/__tests__/mocks.d.ts +9 -2
- package/dist/types/src/utils/LRUCache.d.ts +13 -0
- package/dist/types/src/utils/__tests__/LRUCache.test.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,29 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
|
|
7
7
|
|
|
8
|
+
## [14.1.0] - 2024-04-15
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Fixes the loading of partitioned models when on `production`.
|
|
13
|
+
- Fixes the inconsistencies of the ShortestDistanceComponent when operating on partitioned models.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- Add `model.getViewpoint` and `model.setViewpoint` methods.
|
|
18
|
+
- These methods interact with the viewpoints schema defined by the `bim_viewpoints` endpoint (https://developers.procore.com/reference/rest/v1/bim-viewpoints?version=1.0)
|
|
19
|
+
- Calls to `camera.get/setBcfCamera`, `model.getSections/setSectionsData`, `markup.setRedlines` (or its deprecated alias `camera.setMarkup`) for the purpose of constructing viewpoints can be replaced with calls to `model.get/setViewpoint`
|
|
20
|
+
- public events `initializationComplete` and `initializationComplete` have their payloads updated to include `step_failed`, and `error_descriptions` properties. Should an error occur during initialization, the `step_failed` property will be set to the step failed while bootstrapping the model and the `error_descriptions` will be set to the error message.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- Removed some development-only checks from renderer in the production build for a minor performance improvement.
|
|
25
|
+
- Minor reduction in build size
|
|
26
|
+
|
|
27
|
+
### Removed
|
|
28
|
+
|
|
29
|
+
- "Could not find node with id" console warning that some models would generate a lot of. It's not really a problem and there's no need to clog the console with it.
|
|
30
|
+
|
|
8
31
|
## [14.0.0] - 2024-04-01
|
|
9
32
|
|
|
10
33
|
### Fixed
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
declare type Attachment = {
|
|
2
|
+
id: number;
|
|
3
|
+
content_type: string;
|
|
4
|
+
name: string;
|
|
5
|
+
size: number;
|
|
6
|
+
url: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
1
9
|
declare type AutodeskFormatClipBox = {
|
|
2
10
|
Type: 'OrientedBox3D';
|
|
3
11
|
Version: 1;
|
|
@@ -48,6 +56,7 @@ export declare namespace Benchmark {
|
|
|
48
56
|
declare type BimFileUpload = {
|
|
49
57
|
id: number;
|
|
50
58
|
file_version: FileVersion;
|
|
59
|
+
attachment: Attachment;
|
|
51
60
|
};
|
|
52
61
|
|
|
53
62
|
declare type BoundingBox = {
|
|
@@ -175,7 +184,7 @@ declare type Model = {
|
|
|
175
184
|
declare type ModelRevision = {
|
|
176
185
|
id: number;
|
|
177
186
|
revision: number;
|
|
178
|
-
viewpoints:
|
|
187
|
+
viewpoints: ModelRevisionViewpoint[];
|
|
179
188
|
};
|
|
180
189
|
|
|
181
190
|
declare type ModelRevisionModePwfV1Options = CommonOptions & PwfV1Bundle & {
|
|
@@ -188,6 +197,10 @@ declare type ModelRevisionModePwfV2Options = CommonOptions & PwfV2Bundle & {
|
|
|
188
197
|
modelRevisionId: ModelRevision['id'];
|
|
189
198
|
};
|
|
190
199
|
|
|
200
|
+
declare type ModelRevisionViewpoint = Viewpoint & {
|
|
201
|
+
primary: boolean;
|
|
202
|
+
};
|
|
203
|
+
|
|
191
204
|
declare const NAV_MODE: {
|
|
192
205
|
readonly DEFAULT: 0;
|
|
193
206
|
readonly FLY: 1;
|
|
@@ -308,7 +321,6 @@ declare type Viewpoint = {
|
|
|
308
321
|
camera_data: string;
|
|
309
322
|
sections_data: string;
|
|
310
323
|
redlines_data: string;
|
|
311
|
-
primary: boolean;
|
|
312
324
|
};
|
|
313
325
|
|
|
314
326
|
declare type WebFormatExtractionItem = {
|
|
@@ -457,6 +469,7 @@ export declare class Webviewer {
|
|
|
457
469
|
setOptions: (opts: {
|
|
458
470
|
selection: string;
|
|
459
471
|
}) => void;
|
|
472
|
+
setCanvasSelectionEnabled: (enabled: boolean) => void;
|
|
460
473
|
MapToModelSpace: (point: Vector2, modelA: Vector2, modelB: Vector2, planA: Vector2, planB: Vector2, imgSize: Vector2, rect: Vector2, direction: Vector2, applyOffset: boolean) => Promise<{
|
|
461
474
|
x?: number;
|
|
462
475
|
y?: number;
|
|
@@ -501,6 +514,8 @@ export declare class Webviewer {
|
|
|
501
514
|
clearAllObjectColor: () => Promise<void> | void;
|
|
502
515
|
filterObjectTree: (objectIds: number[]) => Promise<void>;
|
|
503
516
|
clearObjectTreeFilter: () => Promise<void>;
|
|
517
|
+
getViewpoint: () => Promise<Viewpoint>;
|
|
518
|
+
setViewpoint: (viewpoint: Viewpoint) => Promise<void>;
|
|
504
519
|
};
|
|
505
520
|
api: {
|
|
506
521
|
getNamesForObjects: (ids: number[]) => Promise<any>;
|