@procore/bim-webviewer-sdk 15.1.0-rc.0 → 15.1.0-test-viewpoints-endpoint.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.
Files changed (28) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/Procore.Bim.Webviewer.d.ts +92 -26
  3. package/dist/Procore.Bim.Webviewer.js +1 -1
  4. package/dist/types/src/Webviewer.d.ts +40 -25
  5. package/dist/types/src/api/analytic_events/analyticKeys.d.ts +3 -0
  6. package/dist/types/src/api/types/Model.d.ts +0 -21
  7. package/dist/types/src/api/types/ModelRevision.d.ts +9 -0
  8. package/dist/types/src/api/types/Viewpoint.d.ts +15 -0
  9. package/dist/types/src/components/Tool.d.ts +19 -0
  10. package/dist/types/src/components/ToolBarComponent/ToolBarComponent.d.ts +31 -5
  11. package/dist/types/src/components/ToolBarTools.d.ts +17 -16
  12. package/dist/types/src/components/ViewpointManager/ViewpointManager.d.ts +10 -2
  13. package/dist/types/src/components/ViewpointManager/__tests__/fixtures.d.ts +5 -1
  14. package/dist/types/src/components/WindowModelObjectComponent/WindowModelObjectComponent.d.ts +1 -1
  15. package/dist/types/src/components/WindowSettingsComponent.d.ts +1 -1
  16. package/dist/types/src/components/WindowTreeViewComponent.d.ts +4 -4
  17. package/dist/types/src/components/WindowViewPropertiesComponent/WindowViewPropertiesComponent.d.ts +1 -1
  18. package/dist/types/src/controllers/CacheController.d.ts +2 -1
  19. package/dist/types/src/procoregl/HiddenNodeServices/HiddenNodeServices.d.ts +1 -1
  20. package/dist/types/src/sdk.d.ts +12 -3
  21. package/dist/types/src/types/WebviewerOptions.d.ts +3 -2
  22. package/dist/types/src/utils/ApiMetaData/ApiMetaData.d.ts +1 -1
  23. package/dist/types/src/utils/ApiMetaData/__tests__/mocks.d.ts +1 -1
  24. package/dist/types/src/utils/Enums.d.ts +13 -12
  25. package/dist/types/src/viewpoint/ViewpointFactory.d.ts +5 -1
  26. package/dist/types/src/viewpoint/types.d.ts +5 -1
  27. package/package.json +1 -1
  28. package/dist/types/src/components/ToolEnum.d.ts +0 -4
package/CHANGELOG.md CHANGED
@@ -5,6 +5,18 @@ 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
+ ## [Unreleased]
9
+
10
+ ## Changed
11
+
12
+ - Changed `model.getViewpoint` and `model.setViewpoint` to include `visibility` and `render_mode`.
13
+ - Viewpoints selected in the Views tool now respect visibility and render mode if the views contain them.
14
+ - [Internal] Added new `SDK_VIEWPOINT` origin for section box and render mode that is used when they are set specifically from an sdk call to `setViewpoint` (vs an sdk call to `setRenderMode` for example)
15
+ - Some enums and types for them are now exposed
16
+ - `TOOL_ENUM` and its type `ToolEnum`. Used to enable tools when instantiating the `Webviewer`
17
+ - `TOOL_BAR_TOOLS` and its type `ToolBarTools`. Used for enabling tools within the toolbar and for some events.
18
+ - `ACTION` and its type `Action`. Used in some events to describe type of camera movement.
19
+
8
20
  ## [15.1.0] - 2024-05-13
9
21
 
10
22
  ## Added
@@ -1,3 +1,15 @@
1
+ export declare const ACTION: {
2
+ readonly NONE: -1;
3
+ readonly PAN: 1;
4
+ readonly KEYMOVE: 2;
5
+ readonly ROTATE: 3;
6
+ readonly FLY: 4;
7
+ readonly ORBIT: 5;
8
+ readonly STRAFE: 6;
9
+ };
10
+
11
+ export declare type Action = (typeof ACTION)[keyof typeof ACTION];
12
+
1
13
  export declare type Attachment = {
2
14
  id: number;
3
15
  content_type: string;
@@ -317,7 +329,45 @@ export declare class TestRoutineRecorder {
317
329
  print(): void;
318
330
  }
319
331
 
320
- export declare type Tool = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
332
+ export declare const TOOL: {
333
+ readonly ALL: 0;
334
+ readonly BOTTOMTOOL: 1;
335
+ readonly FLOORPLAN: 2;
336
+ readonly OBJECTMODELTREE: 3;
337
+ readonly MODELVIEWS: 4;
338
+ readonly COACHMARKS: 5;
339
+ readonly COACHMARKSHIDDEN: 6;
340
+ readonly COACHMARKSECTION: 7;
341
+ readonly MEASUREMENT_SD: 8;
342
+ readonly SETTINGS: 9;
343
+ readonly CONTEXTMENU: 10;
344
+ readonly COACHMARKSFOV: 11;
345
+ readonly VIEW_PROPERTIES: 12;
346
+ readonly LOADING: 13;
347
+ readonly XRAY_MODE: 14;
348
+ readonly SECTION_BOX: 15;
349
+ };
350
+
351
+ export declare type Tool = (typeof TOOL)[keyof typeof TOOL];
352
+
353
+ export declare const TOOL_BAR_TOOLS: {
354
+ readonly NONE: 0;
355
+ readonly HOME: 1;
356
+ readonly NAV_DEFAULT: 2;
357
+ readonly NAV_FLY: 3;
358
+ readonly NAV_ORBIT: 4;
359
+ readonly OBJECT: 5;
360
+ readonly PREMEASURE: 6;
361
+ readonly MEASURE: 7;
362
+ readonly SETTING: 8;
363
+ readonly VIEW: 9;
364
+ readonly PROPERTIES: 10;
365
+ readonly CONTEXT_MENU: 11;
366
+ readonly XRAY_MODE: 12;
367
+ readonly SECTION_BOX: 13;
368
+ };
369
+
370
+ export declare type ToolBarTools = (typeof TOOL_BAR_TOOLS)[keyof typeof TOOL_BAR_TOOLS];
321
371
 
322
372
  export declare type Vector2 = {
323
373
  x: number;
@@ -336,7 +386,8 @@ export declare type Viewpoint = {
336
386
  camera_data: string;
337
387
  sections_data: string;
338
388
  redlines_data: string;
339
- visibility?: Visibility;
389
+ visibility?: Visibility | null;
390
+ render_mode?: RenderMode | null;
340
391
  };
341
392
 
342
393
  export declare type Visibility = {
@@ -362,33 +413,48 @@ export declare type WebFormatExtractionItem = {
362
413
  export declare class Webviewer {
363
414
  options: Options;
364
415
  static readonly tools: {
365
- [key: string]: Tool;
416
+ readonly ALL: 0;
417
+ readonly BOTTOMTOOL: 1;
418
+ readonly FLOORPLAN: 2;
419
+ readonly OBJECTMODELTREE: 3;
420
+ readonly MODELVIEWS: 4;
421
+ readonly COACHMARKS: 5;
422
+ readonly COACHMARKSHIDDEN: 6;
423
+ readonly COACHMARKSECTION: 7;
424
+ readonly MEASUREMENT_SD: 8;
425
+ readonly SETTINGS: 9;
426
+ readonly CONTEXTMENU: 10;
427
+ readonly COACHMARKSFOV: 11;
428
+ readonly VIEW_PROPERTIES: 12;
429
+ readonly LOADING: 13;
430
+ readonly XRAY_MODE: 14;
431
+ readonly SECTION_BOX: 15;
366
432
  };
367
433
  static readonly toolbar_enum: {
368
- NONE: number;
369
- HOME: number;
370
- NAV_DEFAULT: number;
371
- NAV_FLY: number;
372
- NAV_ORBIT: number;
373
- OBJECT: number;
374
- PREMEASURE: number;
375
- MEASURE: number;
376
- SETTING: number;
377
- VIEW: number;
378
- PROPERTIES: number;
379
- CONTEXT_MENU: number;
380
- XRAY_MODE: number;
381
- SECTION_BOX: number;
434
+ readonly NONE: 0;
435
+ readonly HOME: 1;
436
+ readonly NAV_DEFAULT: 2;
437
+ readonly NAV_FLY: 3;
438
+ readonly NAV_ORBIT: 4;
439
+ readonly OBJECT: 5;
440
+ readonly PREMEASURE: 6;
441
+ readonly MEASURE: 7;
442
+ readonly SETTING: 8;
443
+ readonly VIEW: 9;
444
+ readonly PROPERTIES: 10;
445
+ readonly CONTEXT_MENU: 11;
446
+ readonly XRAY_MODE: 12;
447
+ readonly SECTION_BOX: 13;
448
+ };
449
+ static readonly action: {
450
+ readonly NONE: -1;
451
+ readonly PAN: 1;
452
+ readonly KEYMOVE: 2;
453
+ readonly ROTATE: 3;
454
+ readonly FLY: 4;
455
+ readonly ORBIT: 5;
456
+ readonly STRAFE: 6;
382
457
  };
383
- static readonly action: Readonly<{
384
- NONE: -1;
385
- PAN: 1;
386
- KEYMOVE: 2;
387
- ROTATE: 3;
388
- FLY: 4;
389
- ORBIT: 5;
390
- STRAFE: 6;
391
- }>;
392
458
  events: {
393
459
  addEventListener: (eventName: string, callback: any) => void;
394
460
  removeEventListener: (eventName: string, callback: any) => void;