bruce-models 3.1.5 → 3.1.6

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 (35) hide show
  1. package/dist/bruce-models.es5.js +47 -25
  2. package/dist/bruce-models.es5.js.map +1 -1
  3. package/dist/bruce-models.umd.js +44 -24
  4. package/dist/bruce-models.umd.js.map +1 -1
  5. package/dist/lib/bruce-models.js +3 -1
  6. package/dist/lib/bruce-models.js.map +1 -1
  7. package/dist/lib/client-file/client-file.js.map +1 -1
  8. package/dist/lib/custom-form/custom-form.js.map +1 -1
  9. package/dist/lib/project/project-view-bookmark.js +0 -8
  10. package/dist/lib/project/project-view-bookmark.js.map +1 -1
  11. package/dist/lib/project/project-view-legacy-bookmark.js +12 -0
  12. package/dist/lib/project/project-view-legacy-bookmark.js.map +1 -0
  13. package/dist/lib/project/project-view-legacy-tile.js.map +1 -1
  14. package/dist/lib/project/project-view-legacy.js +12 -0
  15. package/dist/lib/project/project-view-legacy.js.map +1 -0
  16. package/dist/lib/project/project-view.js +1 -9
  17. package/dist/lib/project/project-view.js.map +1 -1
  18. package/dist/lib/user/permission.js +1 -0
  19. package/dist/lib/user/permission.js.map +1 -1
  20. package/dist/lib/util/object-utils.js +25 -6
  21. package/dist/lib/util/object-utils.js.map +1 -1
  22. package/dist/types/bruce-models.d.ts +3 -1
  23. package/dist/types/client-file/client-file.d.ts +5 -5
  24. package/dist/types/entity/entity-attachment.d.ts +1 -1
  25. package/dist/types/entity/entity-lod.d.ts +1 -1
  26. package/dist/types/entity/entity-type.d.ts +5 -5
  27. package/dist/types/entity/entity.d.ts +1 -1
  28. package/dist/types/import/imported-file.d.ts +1 -1
  29. package/dist/types/project/project-view-bookmark.d.ts +56 -113
  30. package/dist/types/project/project-view-legacy-bookmark.d.ts +62 -0
  31. package/dist/types/project/project-view-legacy.d.ts +49 -0
  32. package/dist/types/project/project-view.d.ts +30 -82
  33. package/dist/types/user/permission.d.ts +1 -0
  34. package/dist/types/util/object-utils.d.ts +2 -2
  35. package/package.json +1 -1
@@ -0,0 +1,62 @@
1
+ import { Camera } from "../common/camera";
2
+ import { UTC } from "../common/utc";
3
+ import { Markup } from "../markup/markup";
4
+ /**
5
+ * Deprecated Project View Bookmark record.
6
+ * This was used in the legacy web Navigator.
7
+ */
8
+ export declare namespace ProjectViewLegacyBookmark {
9
+ const DATA_VERSION = 1;
10
+ interface IBookmark {
11
+ ID?: string;
12
+ Title?: string;
13
+ Camera?: ICamera;
14
+ Settings?: ISettings;
15
+ "Screenshot.ClientFile.ID"?: string;
16
+ "UI.View.ID"?: string;
17
+ "Created.ByUser.ID"?: string;
18
+ "Created.Date"?: UTC.IUTC;
19
+ DataVersion: number;
20
+ DisplayOrder?: number;
21
+ }
22
+ interface IBookmarkImagery {
23
+ title: string;
24
+ contrast: number;
25
+ hue: number;
26
+ saturation: number;
27
+ gamma: number;
28
+ brightness: number;
29
+ alpha: number;
30
+ }
31
+ interface ISettings {
32
+ selectedItemIds?: string[];
33
+ order?: number;
34
+ hiddenEntityIds?: string[];
35
+ drawnRelationEntityIDs?: string[];
36
+ imagery?: IBookmarkImagery[];
37
+ terrain?: string;
38
+ globeColor?: string;
39
+ shadows?: boolean;
40
+ groundOcclusion?: boolean;
41
+ ambientOcclusion?: boolean;
42
+ markup?: Markup.IMarkup;
43
+ cameraFrustum?: Camera.EFrustum;
44
+ displayTimeline?: boolean;
45
+ timelineSettings?: any;
46
+ }
47
+ /**
48
+ * Lat,lon is in degrees.
49
+ * Altitude is meters relative to ground.
50
+ * Heading, pitch, roll are in radians.
51
+ */
52
+ interface ICamera {
53
+ position: {
54
+ latitude: number;
55
+ longitude: number;
56
+ height: number;
57
+ };
58
+ heading: number;
59
+ pitch: number;
60
+ roll: number;
61
+ }
62
+ }
@@ -0,0 +1,49 @@
1
+ import { MenuItem } from "./menu-item";
2
+ import { ProjectView as PV } from "./project-view";
3
+ import { ProjectViewLegacyTile } from "./project-view-legacy-tile";
4
+ /**
5
+ * Deprecated Project View record.
6
+ * This was used in the legacy web Navigator.
7
+ */
8
+ export declare namespace ProjectViewLegacy {
9
+ const DATA_VERSION = 1;
10
+ interface IShadowSettings {
11
+ IsShadowEnabled?: boolean;
12
+ IsShadowSoft?: boolean;
13
+ ShadowSampleSize?: number;
14
+ }
15
+ interface ISettings extends PV.ISettings {
16
+ BookmarkTransitionSpeed?: number;
17
+ Camera?: any;
18
+ CameraFrustum?: number;
19
+ CesiumMapSources?: ProjectViewLegacyTile.IMapSource[];
20
+ CesiumTerrainSources?: ProjectViewLegacyTile.ITerrainSource[];
21
+ ControlsSettings?: any;
22
+ DefaultMapTiles?: string;
23
+ DefaultTerrain?: string;
24
+ DisplayTimeline?: boolean;
25
+ GroundOcclusion?: boolean;
26
+ Extensions?: any;
27
+ GlobeColor?: string;
28
+ SelectionHighlightColor?: string;
29
+ LayersMenu?: MenuItem.IItem[];
30
+ OASettings?: any;
31
+ LogoImage?: any;
32
+ LegendImage?: any;
33
+ TilesetBackfaceCulling?: boolean;
34
+ TopPanelComponents?: string[];
35
+ LeftPanelComponents?: string[];
36
+ PostProcessFXAA?: boolean;
37
+ Shadows?: boolean;
38
+ CustomFormSettings?: any;
39
+ PreloadEntityTypes?: boolean;
40
+ ClickActions?: any;
41
+ Shadow?: {
42
+ StaticCamera?: IShadowSettings;
43
+ MovingCamera?: IShadowSettings;
44
+ };
45
+ }
46
+ interface IView extends PV.IView {
47
+ Settings: ISettings;
48
+ }
49
+ }
@@ -2,7 +2,6 @@ import { Api } from "../api/api";
2
2
  import { BruceApi } from "../api/bruce-api";
3
3
  import { UTC } from "../common/utc";
4
4
  import { MenuItem } from "./menu-item";
5
- import { ProjectViewLegacyTile } from "./project-view-legacy-tile";
6
5
  import { ProjectViewTile } from "./project-view-tile";
7
6
  import { ProjectViewBookmark } from "./project-view-bookmark";
8
7
  import { ProjectViewSelection } from "./project-view-selection";
@@ -14,8 +13,8 @@ import { ProjectViewSelection } from "./project-view-selection";
14
13
  export declare namespace ProjectView {
15
14
  function GetCacheKey(viewId: string): string;
16
15
  function GetListCacheKey(): string;
17
- const DEFAULT_DATA_VERSION = 1;
18
- interface IBaseView {
16
+ const DEFAULT_DATA_VERSION = 2;
17
+ interface IView {
19
18
  ID?: string;
20
19
  Name: string;
21
20
  Description?: string;
@@ -26,110 +25,59 @@ export declare namespace ProjectView {
26
25
  CreatedByUIVersion?: string;
27
26
  DataVersion: number;
28
27
  SupportEmail?: string;
29
- Settings?: IBaseSettings;
28
+ Settings?: ISettings;
30
29
  IsDefault?: boolean;
31
30
  }
32
31
  /**
33
32
  * These are the base settings expected in any project view data-version.
34
33
  * The only exception is data-version = 1 which is our deprecated legacy format.
35
34
  */
36
- interface IBaseSettings {
35
+ interface ISettings {
37
36
  menuItems?: MenuItem.IItem[];
38
37
  IsLoginRequired?: boolean;
39
38
  IsRestricted?: boolean;
40
39
  branding?: IBranding;
41
40
  selection?: ProjectViewSelection.ISelection;
41
+ imageries?: ProjectViewTile.IViewImagery[];
42
+ terrains?: ProjectViewTile.IViewTerrain[];
43
+ defaults?: {
44
+ camera?: ProjectViewBookmark.ICamera;
45
+ settings?: ProjectViewBookmark.ISettings;
46
+ };
47
+ contact?: IContact;
48
+ plugins?: IPlugins;
49
+ selectionColor?: string;
50
+ present?: IPresent;
42
51
  }
43
52
  interface IBranding {
44
53
  bannerFileId?: string;
45
54
  }
46
- type View = LegacyNavigator.IView | Navigator.IView | IBaseView;
47
- namespace LegacyNavigator {
48
- const DATA_VERSION = 1;
49
- interface IShadowSettings {
50
- IsShadowEnabled?: boolean;
51
- IsShadowSoft?: boolean;
52
- ShadowSampleSize?: number;
53
- }
54
- interface ISettings extends IBaseSettings {
55
- BookmarkTransitionSpeed?: number;
56
- Camera?: any;
57
- CameraFrustum?: number;
58
- CesiumMapSources?: ProjectViewLegacyTile.IMapSource[];
59
- CesiumTerrainSources?: ProjectViewLegacyTile.ITerrainSource[];
60
- ControlsSettings?: any;
61
- DefaultMapTiles?: string;
62
- DefaultTerrain?: string;
63
- DisplayTimeline?: boolean;
64
- GroundOcclusion?: boolean;
65
- Extensions?: any;
66
- GlobeColor?: string;
67
- SelectionHighlightColor?: string;
68
- LayersMenu?: MenuItem.IItem[];
69
- OASettings?: any;
70
- LogoImage?: any;
71
- LegendImage?: any;
72
- TilesetBackfaceCulling?: boolean;
73
- TopPanelComponents?: string[];
74
- LeftPanelComponents?: string[];
75
- PostProcessFXAA?: boolean;
76
- Shadows?: boolean;
77
- CustomFormSettings?: any;
78
- PreloadEntityTypes?: boolean;
79
- ClickActions?: any;
80
- Shadow?: {
81
- StaticCamera?: IShadowSettings;
82
- MovingCamera?: IShadowSettings;
83
- };
84
- }
85
- interface IView extends IBaseView {
86
- Settings: ISettings;
87
- }
55
+ interface IPresent {
56
+ bookmarkDuration?: number;
88
57
  }
89
- namespace Navigator {
90
- const DATA_VERSION = 2;
91
- interface ISettings extends IBaseSettings {
92
- imageries?: ProjectViewTile.IViewImagery[];
93
- terrains?: ProjectViewTile.IViewTerrain[];
94
- defaults?: {
95
- camera?: ProjectViewBookmark.Navigator.ICamera;
96
- settings?: ProjectViewBookmark.Navigator.ISettings;
97
- };
98
- contact?: IContact;
99
- plugins?: IPlugins;
100
- selectionColor?: string;
101
- present?: IPresent;
102
- }
103
- interface IPresent {
104
- bookmarkDuration?: number;
105
- }
106
- /**
107
- * Describes how to present contact information to the users.
108
- */
109
- interface IContact {
110
- enabled: boolean;
111
- description?: string;
112
- icon?: string;
113
- }
114
- interface IPlugins {
115
- enabledIds: string[];
116
- }
117
- interface IView extends IBaseView {
118
- Settings: ISettings;
119
- }
58
+ /**
59
+ * Describes how to present contact information to the users.
60
+ */
61
+ interface IContact {
62
+ enabled: boolean;
63
+ description?: string;
64
+ icon?: string;
65
+ }
66
+ interface IPlugins {
67
+ enabledIds: string[];
120
68
  }
121
69
  function Get(params: {
122
70
  api?: BruceApi.Api;
123
71
  viewId: string;
124
72
  req?: Api.IReqParams;
125
73
  }): Promise<{
126
- view: View;
74
+ view: IView;
127
75
  }>;
128
76
  function GetList(params: {
129
77
  api?: BruceApi.Api;
130
78
  req?: Api.IReqParams;
131
79
  }): Promise<{
132
- views: View[];
80
+ views: IView[];
133
81
  }>;
134
82
  function Delete(params: {
135
83
  api?: BruceApi.Api;
@@ -138,9 +86,9 @@ export declare namespace ProjectView {
138
86
  }): Promise<void>;
139
87
  function Update(params: {
140
88
  api?: BruceApi.Api;
141
- view: View;
89
+ view: IView;
142
90
  req?: Api.IReqParams;
143
91
  }): Promise<{
144
- view: View;
92
+ view: IView;
145
93
  }>;
146
94
  }
@@ -2,6 +2,7 @@ export declare namespace Permission {
2
2
  type Perm = EPerm | string;
3
3
  enum EPerm {
4
4
  ADMIN = "ADMIN",
5
+ ADMIN_VIEW = "ADMIN_VIEW",
5
6
  LOGIN = "LOGIN",
6
7
  DELETE_ENTITY_TYPE = "DELETE_ENTITY_TYPE",
7
8
  CREATE_ENTITY_TYPE = "CREATE_ENTITY_TYPE",
@@ -1,7 +1,7 @@
1
1
  export declare namespace ObjectUtils {
2
2
  /**
3
- * Generates a Bruce compatible UID.
3
+ * Generates a Nextspace compatible UID.
4
4
  * @returns
5
5
  */
6
- function UId(): string;
6
+ function UId(length?: number): string;
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bruce-models",
3
- "version": "3.1.5",
3
+ "version": "3.1.6",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "dist/bruce-models.umd.js",