@itwin/core-backend 4.8.0-dev.3 → 4.8.0-dev.31
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 +57 -1
- package/lib/cjs/BackendHubAccess.d.ts +18 -16
- package/lib/cjs/BackendHubAccess.d.ts.map +1 -1
- package/lib/cjs/BackendHubAccess.js +16 -15
- package/lib/cjs/BackendHubAccess.js.map +1 -1
- package/lib/cjs/BackendLoggerCategory.d.ts +3 -1
- package/lib/cjs/BackendLoggerCategory.d.ts.map +1 -1
- package/lib/cjs/BackendLoggerCategory.js +2 -0
- package/lib/cjs/BackendLoggerCategory.js.map +1 -1
- package/lib/cjs/BisCoreSchema.js.map +1 -1
- package/lib/cjs/BlobContainerService.d.ts +3 -3
- package/lib/cjs/BlobContainerService.d.ts.map +1 -1
- package/lib/cjs/BlobContainerService.js.map +1 -1
- package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
- package/lib/cjs/BriefcaseManager.js +19 -11
- package/lib/cjs/BriefcaseManager.js.map +1 -1
- package/lib/cjs/Category.d.ts +0 -6
- package/lib/cjs/Category.d.ts.map +1 -1
- package/lib/cjs/Category.js +0 -6
- package/lib/cjs/Category.js.map +1 -1
- package/lib/cjs/ChangeSummaryManager.d.ts.map +1 -1
- package/lib/cjs/ChangeSummaryManager.js +13 -11
- package/lib/cjs/ChangeSummaryManager.js.map +1 -1
- package/lib/cjs/ChangedElementsDb.d.ts +1 -0
- package/lib/cjs/ChangedElementsDb.d.ts.map +1 -1
- package/lib/cjs/ChangedElementsDb.js +6 -4
- package/lib/cjs/ChangedElementsDb.js.map +1 -1
- package/lib/cjs/ChangedElementsManager.js.map +1 -1
- package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
- package/lib/cjs/ChangesetECAdaptor.js +242 -237
- package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
- package/lib/cjs/ChannelControl.d.ts +4 -26
- package/lib/cjs/ChannelControl.d.ts.map +1 -1
- package/lib/cjs/ChannelControl.js +2 -101
- package/lib/cjs/ChannelControl.js.map +1 -1
- package/lib/cjs/CheckpointManager.d.ts.map +1 -1
- package/lib/cjs/CheckpointManager.js +5 -3
- package/lib/cjs/CheckpointManager.js.map +1 -1
- package/lib/cjs/ClassRegistry.d.ts.map +1 -1
- package/lib/cjs/ClassRegistry.js +8 -7
- package/lib/cjs/ClassRegistry.js.map +1 -1
- package/lib/cjs/CloudSqlite.d.ts +49 -24
- package/lib/cjs/CloudSqlite.d.ts.map +1 -1
- package/lib/cjs/CloudSqlite.js +66 -7
- package/lib/cjs/CloudSqlite.js.map +1 -1
- package/lib/cjs/CodeService.d.ts +4 -4
- package/lib/cjs/CodeService.d.ts.map +1 -1
- package/lib/cjs/CodeService.js.map +1 -1
- package/lib/cjs/CodeSpecs.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
- package/lib/cjs/DevTools.d.ts.map +1 -1
- package/lib/cjs/DevTools.js +2 -1
- package/lib/cjs/DevTools.js.map +1 -1
- package/lib/cjs/DisplayStyle.d.ts +0 -3
- package/lib/cjs/DisplayStyle.d.ts.map +1 -1
- package/lib/cjs/DisplayStyle.js +0 -3
- package/lib/cjs/DisplayStyle.js.map +1 -1
- package/lib/cjs/ECDb.d.ts +6 -1
- package/lib/cjs/ECDb.d.ts.map +1 -1
- package/lib/cjs/ECDb.js +19 -14
- package/lib/cjs/ECDb.js.map +1 -1
- package/lib/cjs/ECSchemaXmlContext.js +2 -2
- package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
- package/lib/cjs/ECSqlStatement.d.ts +6 -3
- package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
- package/lib/cjs/ECSqlStatement.js +3 -3
- package/lib/cjs/ECSqlStatement.js.map +1 -1
- package/lib/cjs/Element.d.ts +3 -60
- package/lib/cjs/Element.d.ts.map +1 -1
- package/lib/cjs/Element.js +8 -64
- package/lib/cjs/Element.js.map +1 -1
- package/lib/cjs/ElementAspect.d.ts +0 -5
- package/lib/cjs/ElementAspect.d.ts.map +1 -1
- package/lib/cjs/ElementAspect.js +4 -8
- package/lib/cjs/ElementAspect.js.map +1 -1
- package/lib/cjs/ElementGraphics.d.ts.map +1 -1
- package/lib/cjs/ElementGraphics.js +2 -1
- package/lib/cjs/ElementGraphics.js.map +1 -1
- package/lib/cjs/ElementTreeWalker.js.map +1 -1
- package/lib/cjs/Entity.js.map +1 -1
- package/lib/cjs/EntityReferences.js.map +1 -1
- package/lib/cjs/ExportGraphics.js.map +1 -1
- package/lib/cjs/ExternalSource.js.map +1 -1
- package/lib/cjs/GeoCoordConfig.d.ts +10 -0
- package/lib/cjs/GeoCoordConfig.d.ts.map +1 -1
- package/lib/cjs/GeoCoordConfig.js +22 -24
- package/lib/cjs/GeoCoordConfig.js.map +1 -1
- package/lib/cjs/GeographicCRSServices.js +2 -2
- package/lib/cjs/GeographicCRSServices.js.map +1 -1
- package/lib/cjs/GeometrySummary.d.ts.map +1 -1
- package/lib/cjs/GeometrySummary.js +49 -48
- package/lib/cjs/GeometrySummary.js.map +1 -1
- package/lib/cjs/HubMock.js.map +1 -1
- package/lib/cjs/IModelCloneContext.js.map +1 -1
- package/lib/cjs/IModelDb.d.ts +33 -98
- package/lib/cjs/IModelDb.d.ts.map +1 -1
- package/lib/cjs/IModelDb.js +250 -164
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
- package/lib/cjs/IModelElementCloneContext.js +5 -4
- package/lib/cjs/IModelElementCloneContext.js.map +1 -1
- package/lib/cjs/IModelHost.d.ts +13 -4
- package/lib/cjs/IModelHost.d.ts.map +1 -1
- package/lib/cjs/IModelHost.js +39 -32
- package/lib/cjs/IModelHost.js.map +1 -1
- package/lib/cjs/IModelJsFs.js.map +1 -1
- package/lib/cjs/IpcHost.d.ts.map +1 -1
- package/lib/cjs/IpcHost.js +15 -13
- package/lib/cjs/IpcHost.js.map +1 -1
- package/lib/cjs/LineStyle.js.map +1 -1
- package/lib/cjs/LocalHub.d.ts +2 -2
- package/lib/cjs/LocalHub.d.ts.map +1 -1
- package/lib/cjs/LocalHub.js +18 -18
- package/lib/cjs/LocalHub.js.map +1 -1
- package/lib/cjs/LocalhostIpcHost.js.map +1 -1
- package/lib/cjs/LockControl.d.ts +73 -0
- package/lib/cjs/LockControl.d.ts.map +1 -0
- package/lib/cjs/LockControl.js +11 -0
- package/lib/cjs/LockControl.js.map +1 -0
- package/lib/cjs/Material.d.ts +2 -5
- package/lib/cjs/Material.d.ts.map +1 -1
- package/lib/cjs/Material.js +6 -4
- package/lib/cjs/Material.js.map +1 -1
- package/lib/cjs/Model.d.ts +0 -22
- package/lib/cjs/Model.d.ts.map +1 -1
- package/lib/cjs/Model.js +5 -26
- package/lib/cjs/Model.js.map +1 -1
- package/lib/cjs/NativeAppStorage.js.map +1 -1
- package/lib/cjs/NativeHost.js.map +1 -1
- package/lib/cjs/NavigationRelationship.js.map +1 -1
- package/lib/cjs/PromiseMemoizer.js.map +1 -1
- package/lib/cjs/PropertyStore.d.ts +17 -7
- package/lib/cjs/PropertyStore.d.ts.map +1 -1
- package/lib/cjs/PropertyStore.js +11 -5
- package/lib/cjs/PropertyStore.js.map +1 -1
- package/lib/cjs/Relationship.d.ts +0 -12
- package/lib/cjs/Relationship.d.ts.map +1 -1
- package/lib/cjs/Relationship.js +5 -16
- package/lib/cjs/Relationship.js.map +1 -1
- package/lib/cjs/RpcBackend.js.map +1 -1
- package/lib/cjs/SQLiteDb.d.ts +8 -4
- package/lib/cjs/SQLiteDb.d.ts.map +1 -1
- package/lib/cjs/SQLiteDb.js +25 -19
- package/lib/cjs/SQLiteDb.js.map +1 -1
- package/lib/cjs/Schema.js.map +1 -1
- package/lib/cjs/SchemaSync.d.ts +4 -1
- package/lib/cjs/SchemaSync.d.ts.map +1 -1
- package/lib/cjs/SchemaSync.js +24 -11
- package/lib/cjs/SchemaSync.js.map +1 -1
- package/lib/cjs/SchemaUtils.js +3 -3
- package/lib/cjs/SchemaUtils.js.map +1 -1
- package/lib/cjs/SqliteChangesetReader.d.ts.map +1 -1
- package/lib/cjs/SqliteChangesetReader.js +2 -2
- package/lib/cjs/SqliteChangesetReader.js.map +1 -1
- package/lib/cjs/SqliteStatement.js +2 -2
- package/lib/cjs/SqliteStatement.js.map +1 -1
- package/lib/cjs/TextAnnotationElement.js.map +1 -1
- package/lib/cjs/TextAnnotationGeometry.d.ts +5 -1
- package/lib/cjs/TextAnnotationGeometry.d.ts.map +1 -1
- package/lib/cjs/TextAnnotationGeometry.js +11 -8
- package/lib/cjs/TextAnnotationGeometry.js.map +1 -1
- package/lib/cjs/TextAnnotationLayout.d.ts +21 -13
- package/lib/cjs/TextAnnotationLayout.d.ts.map +1 -1
- package/lib/cjs/TextAnnotationLayout.js +134 -92
- package/lib/cjs/TextAnnotationLayout.js.map +1 -1
- package/lib/cjs/Texture.js.map +1 -1
- package/lib/cjs/TileStorage.js.map +1 -1
- package/lib/cjs/TxnManager.d.ts +2 -1
- package/lib/cjs/TxnManager.d.ts.map +1 -1
- package/lib/cjs/TxnManager.js +4 -2
- package/lib/cjs/TxnManager.js.map +1 -1
- package/lib/cjs/ViewDefinition.d.ts +1 -18
- package/lib/cjs/ViewDefinition.d.ts.map +1 -1
- package/lib/cjs/ViewDefinition.js +1 -18
- package/lib/cjs/ViewDefinition.js.map +1 -1
- package/lib/cjs/ViewStateHydrator.js.map +1 -1
- package/lib/cjs/ViewStore.d.ts +16 -2
- package/lib/cjs/ViewStore.d.ts.map +1 -1
- package/lib/cjs/ViewStore.js +20 -6
- package/lib/cjs/ViewStore.js.map +1 -1
- package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
- package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +33 -0
- package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +27 -31
- package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +94 -52
- package/lib/cjs/assets/Settings/backend.setting.json5 +21 -132
- package/lib/cjs/core-backend.d.ts +4 -2
- package/lib/cjs/core-backend.d.ts.map +1 -1
- package/lib/cjs/core-backend.js +5 -6
- package/lib/cjs/core-backend.js.map +1 -1
- package/lib/cjs/domains/FunctionalElements.d.ts +0 -10
- package/lib/cjs/domains/FunctionalElements.d.ts.map +1 -1
- package/lib/cjs/domains/FunctionalElements.js +0 -10
- package/lib/cjs/domains/FunctionalElements.js.map +1 -1
- package/lib/cjs/domains/FunctionalSchema.d.ts.map +1 -1
- package/lib/cjs/domains/FunctionalSchema.js +2 -1
- package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
- package/lib/cjs/domains/GenericElements.d.ts +0 -18
- package/lib/cjs/domains/GenericElements.d.ts.map +1 -1
- package/lib/cjs/domains/GenericElements.js +0 -18
- package/lib/cjs/domains/GenericElements.js.map +1 -1
- package/lib/cjs/domains/GenericSchema.js.map +1 -1
- package/lib/cjs/internal/ChangesetConflictArgs.d.ts +24 -0
- package/lib/cjs/internal/ChangesetConflictArgs.d.ts.map +1 -0
- package/lib/cjs/internal/ChangesetConflictArgs.js +7 -0
- package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -0
- package/lib/cjs/internal/ChannelAdmin.d.ts +34 -0
- package/lib/cjs/internal/ChannelAdmin.d.ts.map +1 -0
- package/lib/cjs/internal/ChannelAdmin.js +117 -0
- package/lib/cjs/internal/ChannelAdmin.js.map +1 -0
- package/lib/cjs/internal/NativePlatform.d.ts +15 -0
- package/lib/cjs/internal/NativePlatform.d.ts.map +1 -0
- package/lib/cjs/internal/NativePlatform.js +49 -0
- package/lib/cjs/internal/NativePlatform.js.map +1 -0
- package/lib/cjs/internal/NoLocks.d.ts +6 -0
- package/lib/cjs/internal/NoLocks.d.ts.map +1 -0
- package/lib/cjs/internal/NoLocks.js +31 -0
- package/lib/cjs/internal/NoLocks.js.map +1 -0
- package/lib/cjs/{ServerBasedLocks.d.ts → internal/ServerBasedLocks.d.ts} +10 -16
- package/lib/cjs/internal/ServerBasedLocks.d.ts.map +1 -0
- package/lib/cjs/{ServerBasedLocks.js → internal/ServerBasedLocks.js} +29 -18
- package/lib/cjs/internal/ServerBasedLocks.js.map +1 -0
- package/lib/cjs/internal/Symbols.d.ts +11 -0
- package/lib/cjs/internal/Symbols.d.ts.map +1 -0
- package/lib/cjs/internal/Symbols.js +21 -0
- package/lib/cjs/internal/Symbols.js.map +1 -0
- package/lib/cjs/internal/cross-package.d.ts +4 -0
- package/lib/cjs/internal/cross-package.d.ts.map +1 -0
- package/lib/cjs/internal/cross-package.js +16 -0
- package/lib/cjs/internal/cross-package.js.map +1 -0
- package/lib/cjs/internal/workspace/SettingsImpl.d.ts +43 -0
- package/lib/cjs/internal/workspace/SettingsImpl.d.ts.map +1 -0
- package/lib/cjs/internal/workspace/SettingsImpl.js +161 -0
- package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -0
- package/lib/cjs/internal/workspace/SettingsSchemasImpl.d.ts +6 -0
- package/lib/cjs/internal/workspace/SettingsSchemasImpl.d.ts.map +1 -0
- package/lib/cjs/internal/workspace/SettingsSchemasImpl.js +276 -0
- package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -0
- package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts +41 -0
- package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts.map +1 -0
- package/lib/cjs/internal/workspace/WorkspaceImpl.js +696 -0
- package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -0
- package/lib/cjs/internal/workspace/WorkspaceSqliteDb.d.ts +10 -0
- package/lib/cjs/internal/workspace/WorkspaceSqliteDb.d.ts.map +1 -0
- package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js +42 -0
- package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -0
- package/lib/cjs/rpc/multipart.js.map +1 -1
- package/lib/cjs/rpc/tracing.d.ts.map +1 -1
- package/lib/cjs/rpc/tracing.js +5 -2
- package/lib/cjs/rpc/tracing.js.map +1 -1
- package/lib/cjs/rpc/web/logging.js.map +1 -1
- package/lib/cjs/rpc/web/request.js.map +1 -1
- package/lib/cjs/rpc/web/response.js.map +1 -1
- package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +1 -0
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts.map +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +10 -6
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelTileRpcImpl.d.ts.map +1 -1
- package/lib/cjs/rpc-impl/IModelTileRpcImpl.js +5 -3
- package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/WipRpcImpl.js.map +1 -1
- package/lib/cjs/workspace/Settings.d.ts +167 -138
- package/lib/cjs/workspace/Settings.d.ts.map +1 -1
- package/lib/cjs/workspace/Settings.js +68 -138
- package/lib/cjs/workspace/Settings.js.map +1 -1
- package/lib/cjs/workspace/SettingsSchemas.d.ts +112 -48
- package/lib/cjs/workspace/SettingsSchemas.d.ts.map +1 -1
- package/lib/cjs/workspace/SettingsSchemas.js +1 -172
- package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
- package/lib/cjs/workspace/Workspace.d.ts +411 -277
- package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
- package/lib/cjs/workspace/Workspace.js +76 -457
- package/lib/cjs/workspace/Workspace.js.map +1 -1
- package/lib/cjs/workspace/WorkspaceEditor.d.ts +245 -0
- package/lib/cjs/workspace/WorkspaceEditor.d.ts.map +1 -0
- package/lib/cjs/workspace/WorkspaceEditor.js +34 -0
- package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -0
- package/package.json +15 -14
- package/lib/cjs/ServerBasedLocks.d.ts.map +0 -1
- package/lib/cjs/ServerBasedLocks.js.map +0 -1
- package/lib/cjs/assets/Settings/Schemas/Cloud.Schema.json +0 -45
|
@@ -14,7 +14,6 @@ import { IModelElementCloneContext } from "./IModelElementCloneContext";
|
|
|
14
14
|
* @public
|
|
15
15
|
*/
|
|
16
16
|
export declare class ModelSelector extends DefinitionElement {
|
|
17
|
-
/** @internal */
|
|
18
17
|
static get className(): string;
|
|
19
18
|
/** The array of modelIds of the GeometricModels displayed by this ModelSelector */
|
|
20
19
|
models: Id64String[];
|
|
@@ -54,7 +53,6 @@ export declare class ModelSelector extends DefinitionElement {
|
|
|
54
53
|
* @public
|
|
55
54
|
*/
|
|
56
55
|
export declare class CategorySelector extends DefinitionElement {
|
|
57
|
-
/** @internal */
|
|
58
56
|
static get className(): string;
|
|
59
57
|
/** The array of element Ids of the Categories selected by this CategorySelector */
|
|
60
58
|
categories: Id64String[];
|
|
@@ -96,7 +94,6 @@ export declare class CategorySelector extends DefinitionElement {
|
|
|
96
94
|
* @public
|
|
97
95
|
*/
|
|
98
96
|
export declare abstract class ViewDefinition extends DefinitionElement {
|
|
99
|
-
/** @internal */
|
|
100
97
|
static get className(): string;
|
|
101
98
|
/** The element Id of the [[CategorySelector]] for this ViewDefinition */
|
|
102
99
|
categorySelectorId: Id64String;
|
|
@@ -109,7 +106,7 @@ export declare abstract class ViewDefinition extends DefinitionElement {
|
|
|
109
106
|
static readonly requiredReferenceKeys: ReadonlyArray<string>;
|
|
110
107
|
/** @alpha */
|
|
111
108
|
static readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes>;
|
|
112
|
-
/** @
|
|
109
|
+
/** @beta */
|
|
113
110
|
protected static onCloned(context: IModelElementCloneContext, sourceElementProps: ViewDefinitionProps, targetElementProps: ViewDefinitionProps): void;
|
|
114
111
|
/** Type guard for `instanceof ViewDefinition3d` */
|
|
115
112
|
isView3d(): this is ViewDefinition3d;
|
|
@@ -143,7 +140,6 @@ export declare abstract class ViewDefinition extends DefinitionElement {
|
|
|
143
140
|
*/
|
|
144
141
|
export declare abstract class ViewDefinition3d extends ViewDefinition {
|
|
145
142
|
private readonly _details;
|
|
146
|
-
/** @internal */
|
|
147
143
|
static get className(): string;
|
|
148
144
|
/** If true, camera is used. Otherwise, use an orthographic projection. */
|
|
149
145
|
cameraOn: boolean;
|
|
@@ -175,7 +171,6 @@ export declare abstract class ViewDefinition3d extends ViewDefinition {
|
|
|
175
171
|
* @public
|
|
176
172
|
*/
|
|
177
173
|
export declare class SpatialViewDefinition extends ViewDefinition3d {
|
|
178
|
-
/** @internal */
|
|
179
174
|
static get className(): string;
|
|
180
175
|
/** The Id of the [[ModelSelector]] for this SpatialViewDefinition. */
|
|
181
176
|
modelSelectorId: Id64String;
|
|
@@ -218,7 +213,6 @@ export declare class SpatialViewDefinition extends ViewDefinition3d {
|
|
|
218
213
|
* @public
|
|
219
214
|
*/
|
|
220
215
|
export declare class OrthographicViewDefinition extends SpatialViewDefinition {
|
|
221
|
-
/** @internal */
|
|
222
216
|
static get className(): string;
|
|
223
217
|
constructor(props: SpatialViewDefinitionProps, iModel: IModelDb);
|
|
224
218
|
/**
|
|
@@ -257,7 +251,6 @@ export declare class OrthographicViewDefinition extends SpatialViewDefinition {
|
|
|
257
251
|
*/
|
|
258
252
|
export declare class ViewDefinition2d extends ViewDefinition {
|
|
259
253
|
private readonly _details;
|
|
260
|
-
/** @internal */
|
|
261
254
|
static get className(): string;
|
|
262
255
|
/** The Id of the Model displayed by this view. */
|
|
263
256
|
baseModelId: Id64String;
|
|
@@ -279,7 +272,6 @@ export declare class ViewDefinition2d extends ViewDefinition {
|
|
|
279
272
|
* @public
|
|
280
273
|
*/
|
|
281
274
|
export declare class DrawingViewDefinition extends ViewDefinition2d {
|
|
282
|
-
/** @internal */
|
|
283
275
|
static get className(): string;
|
|
284
276
|
protected constructor(props: ViewDefinition2dProps, iModel: IModelDb);
|
|
285
277
|
/** Create a DrawingViewDefinition
|
|
@@ -311,21 +303,18 @@ export declare class DrawingViewDefinition extends ViewDefinition2d {
|
|
|
311
303
|
* @public
|
|
312
304
|
*/
|
|
313
305
|
export declare class SheetViewDefinition extends ViewDefinition2d {
|
|
314
|
-
/** @internal */
|
|
315
306
|
static get className(): string;
|
|
316
307
|
}
|
|
317
308
|
/** A ViewDefinition used to display a 2d template model.
|
|
318
309
|
* @internal
|
|
319
310
|
*/
|
|
320
311
|
export declare class TemplateViewDefinition2d extends ViewDefinition2d {
|
|
321
|
-
/** @internal */
|
|
322
312
|
static get className(): string;
|
|
323
313
|
}
|
|
324
314
|
/** A ViewDefinition used to display a 3d template model.
|
|
325
315
|
* @internal
|
|
326
316
|
*/
|
|
327
317
|
export declare class TemplateViewDefinition3d extends ViewDefinition3d {
|
|
328
|
-
/** @internal */
|
|
329
318
|
static get className(): string;
|
|
330
319
|
}
|
|
331
320
|
/** An auxiliary coordinate system element. Auxiliary coordinate systems can be used by views to show
|
|
@@ -333,7 +322,6 @@ export declare class TemplateViewDefinition3d extends ViewDefinition3d {
|
|
|
333
322
|
* @public
|
|
334
323
|
*/
|
|
335
324
|
export declare abstract class AuxCoordSystem extends DefinitionElement {
|
|
336
|
-
/** @internal */
|
|
337
325
|
static get className(): string;
|
|
338
326
|
type: number;
|
|
339
327
|
description?: string;
|
|
@@ -343,7 +331,6 @@ export declare abstract class AuxCoordSystem extends DefinitionElement {
|
|
|
343
331
|
* @public
|
|
344
332
|
*/
|
|
345
333
|
export declare class AuxCoordSystem2d extends AuxCoordSystem {
|
|
346
|
-
/** @internal */
|
|
347
334
|
static get className(): string;
|
|
348
335
|
origin?: Point2d;
|
|
349
336
|
angle: number;
|
|
@@ -359,7 +346,6 @@ export declare class AuxCoordSystem2d extends AuxCoordSystem {
|
|
|
359
346
|
* @public
|
|
360
347
|
*/
|
|
361
348
|
export declare class AuxCoordSystem3d extends AuxCoordSystem {
|
|
362
|
-
/** @internal */
|
|
363
349
|
static get className(): string;
|
|
364
350
|
origin?: Point3d;
|
|
365
351
|
yaw: number;
|
|
@@ -377,7 +363,6 @@ export declare class AuxCoordSystem3d extends AuxCoordSystem {
|
|
|
377
363
|
* @public
|
|
378
364
|
*/
|
|
379
365
|
export declare class AuxCoordSystemSpatial extends AuxCoordSystem3d {
|
|
380
|
-
/** @internal */
|
|
381
366
|
static get className(): string;
|
|
382
367
|
/** Create a Code for a AuxCoordSystemSpatial element given a name that is meant to be unique within the scope of the specified DefinitionModel.
|
|
383
368
|
* @param iModel The IModelDb
|
|
@@ -390,7 +375,6 @@ export declare class AuxCoordSystemSpatial extends AuxCoordSystem3d {
|
|
|
390
375
|
* @public
|
|
391
376
|
*/
|
|
392
377
|
export declare class ViewAttachment extends GraphicalElement2d {
|
|
393
|
-
/** @internal */
|
|
394
378
|
static get className(): string;
|
|
395
379
|
view: RelatedElement;
|
|
396
380
|
constructor(props: ViewAttachmentProps, iModel: IModelDb);
|
|
@@ -400,7 +384,6 @@ export declare class ViewAttachment extends GraphicalElement2d {
|
|
|
400
384
|
* @internal
|
|
401
385
|
*/
|
|
402
386
|
export declare class LightLocation extends SpatialLocationElement {
|
|
403
|
-
/** @internal */
|
|
404
387
|
static get className(): string;
|
|
405
388
|
/** Whether this light is currently turned on. */
|
|
406
389
|
enabled: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewDefinition.d.ts","sourceRoot":"","sources":["../../src/ViewDefinition.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAQ,SAAS,EAAE,UAAU,EAA2B,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EACL,KAAK,EAAY,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAa,QAAQ,EAAE,kBAAkB,EAChH,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,qBAAqB,EAAE,qBAAqB,EAAE,mBAAmB,EAAe,MAAM,EAAE,qBAAqB,EAAE,IAAI,EAAE,cAAc,EACzH,mB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,IAAI,EAAG,MAAM,CAAC;gBACF,KAAK,EAAE,qBAAqB,EAAE,MAAM,EAAE,QAAQ;IAEjE;;;;OAIG;WACW,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;CAIlG;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,gBAAgB;IACzD,WAA2B,SAAS,IAAI,MAAM,CAAoC;IAClF;;;;OAIG;WACoB,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;CAI3G;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,kBAAkB;IACpD,WAA2B,SAAS,IAAI,MAAM,CAA6B;IACpE,IAAI,EAAE,cAAc,CAAC;gBACT,KAAK,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ;cAK5C,mBAAmB,CAAC,YAAY,EAAE,kBAAkB,GAAG,IAAI;CAI/E;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,sBAAsB;IACvD,WAA2B,SAAS,IAAI,MAAM,CAA4B;IAC1E,iDAAiD;IAC1C,OAAO,EAAG,OAAO,CAAC;IAEzB,SAAS,aAAa,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,QAAQ;CAClE"}
|
|
@@ -19,7 +19,6 @@ const Element_1 = require("./Element");
|
|
|
19
19
|
* @public
|
|
20
20
|
*/
|
|
21
21
|
class ModelSelector extends Element_1.DefinitionElement {
|
|
22
|
-
/** @internal */
|
|
23
22
|
static get className() { return "ModelSelector"; }
|
|
24
23
|
constructor(props, iModel) {
|
|
25
24
|
super(props, iModel);
|
|
@@ -83,7 +82,6 @@ exports.ModelSelector = ModelSelector;
|
|
|
83
82
|
* @public
|
|
84
83
|
*/
|
|
85
84
|
class CategorySelector extends Element_1.DefinitionElement {
|
|
86
|
-
/** @internal */
|
|
87
85
|
static get className() { return "CategorySelector"; }
|
|
88
86
|
constructor(props, iModel) {
|
|
89
87
|
super(props, iModel);
|
|
@@ -149,7 +147,6 @@ exports.CategorySelector = CategorySelector;
|
|
|
149
147
|
* @public
|
|
150
148
|
*/
|
|
151
149
|
class ViewDefinition extends (_b = Element_1.DefinitionElement) {
|
|
152
|
-
/** @internal */
|
|
153
150
|
static get className() { return "ViewDefinition"; }
|
|
154
151
|
constructor(props, iModel) {
|
|
155
152
|
super(props, iModel);
|
|
@@ -175,7 +172,7 @@ class ViewDefinition extends (_b = Element_1.DefinitionElement) {
|
|
|
175
172
|
referenceIds.addElement(acsId);
|
|
176
173
|
}
|
|
177
174
|
}
|
|
178
|
-
/** @
|
|
175
|
+
/** @beta */
|
|
179
176
|
static onCloned(context, sourceElementProps, targetElementProps) {
|
|
180
177
|
super.onCloned(context, sourceElementProps, targetElementProps);
|
|
181
178
|
if (context.isBetweenIModels && targetElementProps.jsonProperties && targetElementProps.jsonProperties.viewDetails) {
|
|
@@ -231,7 +228,6 @@ ViewDefinition.requiredReferenceKeyTypeMap = {
|
|
|
231
228
|
* @public
|
|
232
229
|
*/
|
|
233
230
|
class ViewDefinition3d extends ViewDefinition {
|
|
234
|
-
/** @internal */
|
|
235
231
|
static get className() { return "ViewDefinition3d"; }
|
|
236
232
|
constructor(props, iModel) {
|
|
237
233
|
super(props, iModel);
|
|
@@ -270,7 +266,6 @@ exports.ViewDefinition3d = ViewDefinition3d;
|
|
|
270
266
|
* @public
|
|
271
267
|
*/
|
|
272
268
|
class SpatialViewDefinition extends (_d = ViewDefinition3d) {
|
|
273
|
-
/** @internal */
|
|
274
269
|
static get className() { return "SpatialViewDefinition"; }
|
|
275
270
|
constructor(props, iModel) {
|
|
276
271
|
super(props, iModel);
|
|
@@ -356,7 +351,6 @@ SpatialViewDefinition.requiredReferenceKeyTypeMap = {
|
|
|
356
351
|
* @public
|
|
357
352
|
*/
|
|
358
353
|
class OrthographicViewDefinition extends SpatialViewDefinition {
|
|
359
|
-
/** @internal */
|
|
360
354
|
static get className() { return "OrthographicViewDefinition"; }
|
|
361
355
|
constructor(props, iModel) { super(props, iModel); }
|
|
362
356
|
/**
|
|
@@ -423,7 +417,6 @@ exports.OrthographicViewDefinition = OrthographicViewDefinition;
|
|
|
423
417
|
* @public
|
|
424
418
|
*/
|
|
425
419
|
class ViewDefinition2d extends ViewDefinition {
|
|
426
|
-
/** @internal */
|
|
427
420
|
static get className() { return "ViewDefinition2d"; }
|
|
428
421
|
constructor(props, iModel) {
|
|
429
422
|
super(props, iModel);
|
|
@@ -455,7 +448,6 @@ exports.ViewDefinition2d = ViewDefinition2d;
|
|
|
455
448
|
* @public
|
|
456
449
|
*/
|
|
457
450
|
class DrawingViewDefinition extends ViewDefinition2d {
|
|
458
|
-
/** @internal */
|
|
459
451
|
static get className() { return "DrawingViewDefinition"; }
|
|
460
452
|
constructor(props, iModel) {
|
|
461
453
|
super(props, iModel);
|
|
@@ -508,7 +500,6 @@ exports.DrawingViewDefinition = DrawingViewDefinition;
|
|
|
508
500
|
* @public
|
|
509
501
|
*/
|
|
510
502
|
class SheetViewDefinition extends ViewDefinition2d {
|
|
511
|
-
/** @internal */
|
|
512
503
|
static get className() { return "SheetViewDefinition"; }
|
|
513
504
|
}
|
|
514
505
|
exports.SheetViewDefinition = SheetViewDefinition;
|
|
@@ -516,7 +507,6 @@ exports.SheetViewDefinition = SheetViewDefinition;
|
|
|
516
507
|
* @internal
|
|
517
508
|
*/
|
|
518
509
|
class TemplateViewDefinition2d extends ViewDefinition2d {
|
|
519
|
-
/** @internal */
|
|
520
510
|
static get className() { return "TemplateViewDefinition2d"; }
|
|
521
511
|
}
|
|
522
512
|
exports.TemplateViewDefinition2d = TemplateViewDefinition2d;
|
|
@@ -524,7 +514,6 @@ exports.TemplateViewDefinition2d = TemplateViewDefinition2d;
|
|
|
524
514
|
* @internal
|
|
525
515
|
*/
|
|
526
516
|
class TemplateViewDefinition3d extends ViewDefinition3d {
|
|
527
|
-
/** @internal */
|
|
528
517
|
static get className() { return "TemplateViewDefinition3d"; }
|
|
529
518
|
}
|
|
530
519
|
exports.TemplateViewDefinition3d = TemplateViewDefinition3d;
|
|
@@ -533,7 +522,6 @@ exports.TemplateViewDefinition3d = TemplateViewDefinition3d;
|
|
|
533
522
|
* @public
|
|
534
523
|
*/
|
|
535
524
|
class AuxCoordSystem extends Element_1.DefinitionElement {
|
|
536
|
-
/** @internal */
|
|
537
525
|
static get className() { return "AuxCoordSystem"; }
|
|
538
526
|
constructor(props, iModel) { super(props, iModel); }
|
|
539
527
|
}
|
|
@@ -542,7 +530,6 @@ exports.AuxCoordSystem = AuxCoordSystem;
|
|
|
542
530
|
* @public
|
|
543
531
|
*/
|
|
544
532
|
class AuxCoordSystem2d extends AuxCoordSystem {
|
|
545
|
-
/** @internal */
|
|
546
533
|
static get className() { return "AuxCoordSystem2d"; }
|
|
547
534
|
constructor(props, iModel) { super(props, iModel); }
|
|
548
535
|
/** Create a Code for a AuxCoordSystem2d element given a name that is meant to be unique within the scope of the specified DefinitionModel.
|
|
@@ -560,7 +547,6 @@ exports.AuxCoordSystem2d = AuxCoordSystem2d;
|
|
|
560
547
|
* @public
|
|
561
548
|
*/
|
|
562
549
|
class AuxCoordSystem3d extends AuxCoordSystem {
|
|
563
|
-
/** @internal */
|
|
564
550
|
static get className() { return "AuxCoordSystem3d"; }
|
|
565
551
|
constructor(props, iModel) { super(props, iModel); }
|
|
566
552
|
/** Create a Code for a AuxCoordSystem3d element given a name that is meant to be unique within the scope of the specified DefinitionModel.
|
|
@@ -578,7 +564,6 @@ exports.AuxCoordSystem3d = AuxCoordSystem3d;
|
|
|
578
564
|
* @public
|
|
579
565
|
*/
|
|
580
566
|
class AuxCoordSystemSpatial extends AuxCoordSystem3d {
|
|
581
|
-
/** @internal */
|
|
582
567
|
static get className() { return "AuxCoordSystemSpatial"; }
|
|
583
568
|
/** Create a Code for a AuxCoordSystemSpatial element given a name that is meant to be unique within the scope of the specified DefinitionModel.
|
|
584
569
|
* @param iModel The IModelDb
|
|
@@ -595,7 +580,6 @@ exports.AuxCoordSystemSpatial = AuxCoordSystemSpatial;
|
|
|
595
580
|
* @public
|
|
596
581
|
*/
|
|
597
582
|
class ViewAttachment extends Element_1.GraphicalElement2d {
|
|
598
|
-
/** @internal */
|
|
599
583
|
static get className() { return "ViewAttachment"; }
|
|
600
584
|
constructor(props, iModel) {
|
|
601
585
|
super(props, iModel);
|
|
@@ -612,7 +596,6 @@ exports.ViewAttachment = ViewAttachment;
|
|
|
612
596
|
* @internal
|
|
613
597
|
*/
|
|
614
598
|
class LightLocation extends Element_1.SpatialLocationElement {
|
|
615
|
-
/** @internal */
|
|
616
599
|
static get className() { return "LightLocation"; }
|
|
617
600
|
constructor(props, iModel) { super(props, iModel); }
|
|
618
601
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewDefinition.js","sourceRoot":"","sources":["../../src/ViewDefinition.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;AAEH,sDAA2F;AAC3F,wDAE8B;AAC9B,oDAK4B;AAC5B,uCAA0F;AAK1F;;;;GAIG;AACH,MAAa,aAAc,SAAQ,2BAAiB;IAClD,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAK1E,YAAsB,KAAyB,EAAE,MAAgB;QAC/D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC7B,CAAC;IAEe,MAAM;QACpB,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,EAAwB,CAAC;QACjD,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACzB,OAAO,GAAG,CAAC;IACb,CAAC;IAEkB,mBAAmB,CAAC,YAAgC;QACrE,KAAK,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACxC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,OAA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;QACxC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxC,CAAC;CACF;AAbD,wCAaC;AAED;;GAEG;AACH,MAAa,aAAc,SAAQ,gCAAsB;IACvD,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAI1E,YAAsB,KAAyB,EAAE,MAAgB,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CAC7F;AAPD,sCAOC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ViewDefinitions\r\n */\r\n\r\nimport { Id64, Id64Array, Id64String, IModelStatus, JsonUtils } from \"@itwin/core-bentley\";\r\nimport {\r\n Angle, Matrix3d, Point2d, Point3d, Range2d, Range3d, StandardViewIndex, Transform, Vector3d, YawPitchRollAngles,\r\n} from \"@itwin/core-geometry\";\r\nimport {\r\n AuxCoordSystem2dProps, AuxCoordSystem3dProps, AuxCoordSystemProps, BisCodeSpec, Camera, CategorySelectorProps, Code, CodeScopeProps,\r\n CodeSpec, ConcreteEntityTypes, EntityReferenceSet, IModelError, LightLocationProps, ModelSelectorProps, RelatedElement,\r\n SpatialViewDefinitionProps, ViewAttachmentProps, ViewDefinition2dProps, ViewDefinition3dProps, ViewDefinitionProps, ViewDetails,\r\n ViewDetails3d,\r\n} from \"@itwin/core-common\";\r\nimport { DefinitionElement, GraphicalElement2d, SpatialLocationElement } from \"./Element\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { DisplayStyle, DisplayStyle2d, DisplayStyle3d } from \"./DisplayStyle\";\r\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\r\n\r\n/** Holds the list of Ids of GeometricModels displayed by a [[SpatialViewDefinition]]. Multiple SpatialViewDefinitions may point to the same ModelSelector.\r\n * @see [ModelSelectorState]($frontend)\r\n * See [how to create a ModelSelector]$(docs/learning/backend/CreateElements.md#ModelSelector).\r\n * @public\r\n */\r\nexport class ModelSelector extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"ModelSelector\"; }\r\n\r\n /** The array of modelIds of the GeometricModels displayed by this ModelSelector */\r\n public models: Id64String[];\r\n\r\n protected constructor(props: ModelSelectorProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.models = props.models;\r\n }\r\n\r\n public override toJSON(): ModelSelectorProps {\r\n const val = super.toJSON() as ModelSelectorProps;\r\n val.models = this.models;\r\n return val;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n this.models.forEach((modelId: Id64String) => referenceIds.addModel(modelId));\r\n }\r\n\r\n /** Create a Code for a ModelSelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the ModelSelector and provides the scope for its name.\r\n * @param codeValue The ModelSelector name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.modelSelector);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n\r\n /**\r\n * Create a ModelSelector to select which Models are displayed by a ViewDefinition.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the ModelSelector\r\n * @param models Array of models to select for display\r\n * @returns The newly constructed ModelSelector element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): ModelSelector {\r\n const modelSelectorProps: ModelSelectorProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n model: definitionModelId,\r\n models,\r\n isPrivate: false,\r\n };\r\n return new ModelSelector(modelSelectorProps, iModelDb);\r\n }\r\n /**\r\n * Insert a ModelSelector to select which Models are displayed by a ViewDefinition.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new ModelSelector into this DefinitionModel\r\n * @param name The name/CodeValue of the ModelSelector\r\n * @param models Array of models to select for display\r\n * @returns The Id of the newly inserted ModelSelector element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): Id64String {\r\n const modelSelector = this.create(iModelDb, definitionModelId, name, models);\r\n return iModelDb.elements.insertElement(modelSelector.toJSON());\r\n }\r\n}\r\n\r\n/** Holds a list of Ids of Categories to be displayed in a view.\r\n * @see [CategorySelectorState]($frontend)\r\n * See [how to create a CategorySelector]$(docs/learning/backend/CreateElements.md#CategorySelector).\r\n * @public\r\n */\r\nexport class CategorySelector extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"CategorySelector\"; }\r\n /** The array of element Ids of the Categories selected by this CategorySelector */\r\n public categories: Id64String[];\r\n\r\n protected constructor(props: CategorySelectorProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.categories = props.categories;\r\n }\r\n\r\n public override toJSON(): CategorySelectorProps {\r\n const val = super.toJSON() as CategorySelectorProps;\r\n val.categories = this.categories;\r\n return val;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n this.categories.forEach((categoryId: Id64String) => referenceIds.addElement(categoryId));\r\n }\r\n\r\n /** Create a Code for a CategorySelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the CategorySelector and provides the scope for its name.\r\n * @param codeValue The CategorySelector name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.categorySelector);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n\r\n /**\r\n * Create a CategorySelector to select which categories are displayed by a ViewDefinition.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name of the CategorySelector\r\n * @param categories Array of categories to select for display\r\n * @returns The newly constructed CategorySelector element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): CategorySelector {\r\n const categorySelectorProps: CategorySelectorProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n model: definitionModelId,\r\n categories,\r\n isPrivate: false,\r\n };\r\n return new CategorySelector(categorySelectorProps, iModelDb);\r\n }\r\n\r\n /**\r\n * Insert a CategorySelector to select which categories are displayed by a ViewDefinition.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new CategorySelector into this DefinitionModel\r\n * @param name The name of the CategorySelector\r\n * @param categories Array of categories to select for display\r\n * @returns The Id of the newly inserted CategorySelector element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): Id64String {\r\n const categorySelector = this.create(iModelDb, definitionModelId, name, categories);\r\n return iModelDb.elements.insertElement(categorySelector.toJSON());\r\n }\r\n}\r\n\r\n/**\r\n * The definition element for a view. ViewDefinitions specify the area/volume that is viewed, the Ids of a DisplayStyle and a CategorySelector,\r\n * plus additional view-specific parameters in their [[Element.jsonProperties]].\r\n * Subclasses of ViewDefinition determine which model(s) are viewed.\r\n * @note ViewDefinition is only available in the backend. See [ViewState]($frontend) for usage in the frontend.\r\n * @public\r\n */\r\nexport abstract class ViewDefinition extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"ViewDefinition\"; }\r\n /** The element Id of the [[CategorySelector]] for this ViewDefinition */\r\n public categorySelectorId: Id64String;\r\n /** The element Id of the [[DisplayStyle]] for this ViewDefinition */\r\n public displayStyleId: Id64String;\r\n\r\n protected constructor(props: ViewDefinitionProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n\r\n this.categorySelectorId = Id64.fromJSON(props.categorySelectorId);\r\n if (!Id64.isValid(this.categorySelectorId))\r\n throw new IModelError(IModelStatus.BadArg, `categorySelectorId is invalid`);\r\n\r\n this.displayStyleId = Id64.fromJSON(props.displayStyleId);\r\n if (!Id64.isValid(this.displayStyleId))\r\n throw new IModelError(IModelStatus.BadArg, `displayStyleId is invalid`);\r\n }\r\n\r\n public override toJSON(): ViewDefinitionProps {\r\n const json = super.toJSON() as ViewDefinitionProps;\r\n json.categorySelectorId = this.categorySelectorId;\r\n json.displayStyleId = this.displayStyleId;\r\n return json;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.categorySelectorId);\r\n referenceIds.addElement(this.displayStyleId);\r\n const acsId: Id64String = this.getAuxiliaryCoordinateSystemId();\r\n if (Id64.isValidId64(acsId)) {\r\n referenceIds.addElement(acsId);\r\n }\r\n }\r\n\r\n /** @beta */\r\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"categorySelectorId\", \"displayStyleId\"];\r\n /** @alpha */\r\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\r\n ...super.requiredReferenceKeyTypeMap,\r\n categorySelectorId: ConcreteEntityTypes.Element,\r\n displayStyleId: ConcreteEntityTypes.Element,\r\n };\r\n\r\n /** @internal */\r\n protected static override onCloned(context: IModelElementCloneContext, sourceElementProps: ViewDefinitionProps, targetElementProps: ViewDefinitionProps): void {\r\n super.onCloned(context, sourceElementProps, targetElementProps);\r\n if (context.isBetweenIModels && targetElementProps.jsonProperties && targetElementProps.jsonProperties.viewDetails) {\r\n const acsId: Id64String = Id64.fromJSON(targetElementProps.jsonProperties.viewDetails.acs);\r\n if (Id64.isValidId64(acsId)) {\r\n targetElementProps.jsonProperties.viewDetails.acs = context.findTargetElementId(acsId);\r\n }\r\n }\r\n }\r\n\r\n /** Type guard for `instanceof ViewDefinition3d` */\r\n public isView3d(): this is ViewDefinition3d { return this instanceof ViewDefinition3d; }\r\n /** Type guard for 'instanceof ViewDefinition2d` */\r\n public isView2d(): this is ViewDefinition2d { return this instanceof ViewDefinition2d; }\r\n /** Type guard for `instanceof SpatialViewDefinition` */\r\n public isSpatialView(): this is SpatialViewDefinition { return this instanceof SpatialViewDefinition; }\r\n /** Type guard for 'instanceof DrawingViewDefinition' */\r\n public isDrawingView(): this is DrawingViewDefinition { return this instanceof DrawingViewDefinition; }\r\n\r\n /** Load this view's DisplayStyle from the IModelDb. */\r\n public loadDisplayStyle(): DisplayStyle { return this.iModel.elements.getElement<DisplayStyle>(this.displayStyleId); }\r\n\r\n /** Load this view's CategorySelector from the IModelDb. */\r\n public loadCategorySelector(): CategorySelector { return this.iModel.elements.getElement<CategorySelector>(this.categorySelectorId); }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public abstract get details(): ViewDetails;\r\n\r\n /** The Id of the AuxiliaryCoordinateSystem for this ViewDefinition, or an invalid Id if no ACS is defined. */\r\n public getAuxiliaryCoordinateSystemId(): Id64String {\r\n return this.details.auxiliaryCoordinateSystemId;\r\n }\r\n\r\n /** Set or clear the AuxiliaryCoordinateSystem for this ViewDefinition.\r\n * @param acsId The Id of the new AuxiliaryCoordinateSystem. If `Id64.invalid` is passed, then no AuxiliaryCoordinateSystem will be used.\r\n */\r\n public setAuxiliaryCoordinateSystemId(acsId: Id64String) {\r\n this.details.auxiliaryCoordinateSystemId = acsId;\r\n }\r\n\r\n /** Create a Code for a ViewDefinition given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel to contain the ViewDefinition and provides the scope for its name.\r\n * @param codeValue The ViewDefinition name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.viewDefinition);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** Defines a view of one or more 3d models.\r\n * @public\r\n */\r\nexport abstract class ViewDefinition3d extends ViewDefinition {\r\n private readonly _details: ViewDetails3d;\r\n /** @internal */\r\n public static override get className(): string { return \"ViewDefinition3d\"; }\r\n /** If true, camera is used. Otherwise, use an orthographic projection. */\r\n public cameraOn: boolean;\r\n /** The lower left back corner of the view frustum. */\r\n public origin: Point3d;\r\n /** The extent (size) of the view frustum, in meters, along its x,y,z axes. */\r\n public extents: Vector3d;\r\n /** Rotation from world coordinates to view coordinates. */\r\n public angles: YawPitchRollAngles;\r\n /** The camera used for this view, if `cameraOn` is true. */\r\n public camera: Camera;\r\n\r\n protected constructor(props: ViewDefinition3dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.cameraOn = JsonUtils.asBool(props.cameraOn);\r\n this.origin = Point3d.fromJSON(props.origin);\r\n this.extents = Vector3d.fromJSON(props.extents);\r\n this.angles = YawPitchRollAngles.fromJSON(props.angles);\r\n this.camera = new Camera(props.camera);\r\n this._details = new ViewDetails3d(this.jsonProperties);\r\n }\r\n\r\n public override toJSON(): ViewDefinition3dProps {\r\n const val = super.toJSON() as ViewDefinition3dProps;\r\n val.cameraOn = this.cameraOn;\r\n val.origin = this.origin;\r\n val.extents = this.extents;\r\n val.angles = this.angles;\r\n val.camera = this.camera;\r\n return val;\r\n }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public get details(): ViewDetails3d { return this._details; }\r\n\r\n /** Load this view's DisplayStyle3d from the IModelDb. */\r\n public loadDisplayStyle3d(): DisplayStyle3d { return this.iModel.elements.getElement<DisplayStyle3d>(this.displayStyleId); }\r\n}\r\n\r\n/** Defines a view of one or more SpatialModels.\r\n * The list of viewed models is stored by the ModelSelector.\r\n *\r\n * This is how a SpatialViewDefinition selects the elements to display:\r\n *\r\n * SpatialViewDefinition\r\n * * ModelSelector\r\n * * ModelIds -------> SpatialModels <----------GeometricElement3d.Model\r\n * * CategorySelector\r\n * * CategoryIds -----> SpatialCategories <----------GeometricElement3d.Category\r\n * @public\r\n */\r\nexport class SpatialViewDefinition extends ViewDefinition3d {\r\n /** @internal */\r\n public static override get className(): string { return \"SpatialViewDefinition\"; }\r\n /** The Id of the [[ModelSelector]] for this SpatialViewDefinition. */\r\n public modelSelectorId: Id64String;\r\n\r\n protected constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.modelSelectorId = Id64.fromJSON(props.modelSelectorId);\r\n if (!Id64.isValid(this.modelSelectorId))\r\n throw new IModelError(IModelStatus.BadArg, `modelSelectorId is invalid`);\r\n }\r\n\r\n /** Construct a SpatialViewDefinition from its JSON representation. */\r\n public static fromJSON(props: Omit<SpatialViewDefinitionProps, \"classFullName\">, iModel: IModelDb) {\r\n return new SpatialViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\r\n }\r\n\r\n public override toJSON(): SpatialViewDefinitionProps {\r\n const json = super.toJSON() as SpatialViewDefinitionProps;\r\n json.modelSelectorId = this.modelSelectorId;\r\n return json;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.modelSelectorId);\r\n }\r\n\r\n /** @beta */\r\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"modelSelectorId\"];\r\n\r\n /** @alpha */\r\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\r\n ...super.requiredReferenceKeyTypeMap,\r\n modelSelectorId: ConcreteEntityTypes.Element,\r\n };\r\n\r\n /** Load this view's ModelSelector from the IModelDb. */\r\n public loadModelSelector(): ModelSelector { return this.iModel.elements.getElement<ModelSelector>(this.modelSelectorId); }\r\n /**\r\n * Create a SpatialViewDefinition with the camera turned on.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @param cameraAngle Camera angle in radians.\r\n * @returns The newly constructed SpatialViewDefinition element\r\n * @throws [[IModelError]] if there is a problem creating the view\r\n */\r\n public static createWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): SpatialViewDefinition {\r\n const rotation = Matrix3d.createStandardWorldToView(standardView);\r\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n const cameraDistance = 2 * (rotatedRange.diagonal().magnitudeXY() / 2.0) / Math.tan(cameraAngle / 2.0);\r\n const cameraLocation = rotatedRange.diagonalFractionToPoint(.5); // Start at center.\r\n cameraLocation.z += cameraDistance; // Back up by camera distance.\r\n rotation.multiplyTransposeVectorInPlace(cameraLocation);\r\n\r\n const viewDefinitionProps: SpatialViewDefinitionProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n modelSelectorId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\r\n extents: rotatedRange.diagonal(),\r\n angles,\r\n cameraOn: true,\r\n camera: { lens: { radians: cameraAngle }, focusDist: cameraDistance, eye: cameraLocation },\r\n };\r\n\r\n return new SpatialViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n /**\r\n * Insert an SpatialViewDefinition with the camera turned on.\r\n * @see [[createWithCamera]] for details.\r\n * @returns The Id of the newly inserted SpatialViewDefinition element\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insertWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): Id64String {\r\n const viewDefinition = this.createWithCamera(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView, cameraAngle);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n}\r\n\r\n/** Defines a spatial view that displays geometry on the image plane using a parallel orthographic projection.\r\n * See [how to create a OrthographicViewDefinition]$(docs/learning/backend/CreateElements.md#OrthographicViewDefinition).\r\n * @public\r\n */\r\nexport class OrthographicViewDefinition extends SpatialViewDefinition {\r\n /** @internal */\r\n public static override get className(): string { return \"OrthographicViewDefinition\"; }\r\n\r\n constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) { super(props, iModel); }\r\n\r\n /**\r\n * Create an OrthographicViewDefinition\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @returns The newly constructed OrthographicViewDefinition element\r\n * @throws [[IModelError]] if there is a problem creating the view\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): OrthographicViewDefinition {\r\n const rotation = Matrix3d.createStandardWorldToView(standardView);\r\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n const viewDefinitionProps: SpatialViewDefinitionProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n modelSelectorId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\r\n extents: rotatedRange.diagonal(),\r\n angles,\r\n cameraOn: false,\r\n camera: new Camera(), // not used when cameraOn === false\r\n };\r\n return new OrthographicViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n\r\n /**\r\n * Insert an OrthographicViewDefinition\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new OrthographicViewDefinition into this DefinitionModel\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @returns The Id of the newly inserted OrthographicViewDefinition element\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): Id64String {\r\n const viewDefinition = this.create(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n\r\n /** Set a new viewed range without changing the rotation or any other properties. */\r\n public setRange(range: Range3d): void {\r\n const rotation = this.angles.toMatrix3d();\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n this.origin = Point3d.createFrom(rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z));\r\n this.extents = rotatedRange.diagonal();\r\n }\r\n}\r\n\r\n/** Defines a view of a single 2d model. Each 2d model has its own coordinate system, so only one may appear per view.\r\n * @public\r\n */\r\nexport class ViewDefinition2d extends ViewDefinition {\r\n private readonly _details: ViewDetails;\r\n\r\n /** @internal */\r\n public static override get className(): string { return \"ViewDefinition2d\"; }\r\n /** The Id of the Model displayed by this view. */\r\n public baseModelId: Id64String;\r\n /** The lower-left corner of this view in Model coordinates. */\r\n public origin: Point2d;\r\n /** The delta (size) of this view, in meters, aligned with view x,y. */\r\n public delta: Point2d;\r\n /** The rotation of this view. */\r\n public angle: Angle;\r\n\r\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.baseModelId = Id64.fromJSON(props.baseModelId);\r\n this.origin = Point2d.fromJSON(props.origin);\r\n this.delta = Point2d.fromJSON(props.delta);\r\n this.angle = Angle.fromJSON(props.angle);\r\n this._details = new ViewDetails(this.jsonProperties);\r\n }\r\n\r\n public override toJSON(): ViewDefinition2dProps {\r\n const val = super.toJSON() as ViewDefinition2dProps;\r\n val.baseModelId = this.baseModelId;\r\n val.origin = this.origin;\r\n val.delta = this.delta;\r\n val.angle = this.angle;\r\n return val;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.baseModelId);\r\n }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public get details(): ViewDetails { return this._details; }\r\n\r\n /** Load this view's DisplayStyle2d from the IModelDb. */\r\n public loadDisplayStyle2d(): DisplayStyle2d { return this.iModel.elements.getElement<DisplayStyle2d>(this.displayStyleId); }\r\n}\r\n\r\n/** Defines a view of a [[DrawingModel]].\r\n * @public\r\n */\r\nexport class DrawingViewDefinition extends ViewDefinition2d {\r\n /** @internal */\r\n public static override get className(): string { return \"DrawingViewDefinition\"; }\r\n\r\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n\r\n /** Create a DrawingViewDefinition\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param baseModelId The base [[DrawingModel]]\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @throws [[IModelError]] if there is a problem creating the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): DrawingViewDefinition {\r\n const viewDefinitionProps: ViewDefinition2dProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n baseModelId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: { x: range.low.x, y: range.low.y },\r\n delta: range.diagonal(),\r\n angle: 0,\r\n };\r\n return new DrawingViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n\r\n /** Construct a DrawingViewDefinition from its JSON representation. */\r\n public static fromJSON(props: Omit<ViewDefinition2dProps, \"classFullName\">, iModel: IModelDb) {\r\n return new DrawingViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\r\n }\r\n\r\n /** Insert a DrawingViewDefinition\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new DrawingViewDefinition into this [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param baseModelId The base [[DrawingModel]]\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): Id64String {\r\n const viewDefinition = this.create(iModelDb, definitionModelId, name, baseModelId, categorySelectorId, displayStyleId, range);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n}\r\n\r\n/** Defines a view of a [[SheetModel]].\r\n * @public\r\n */\r\nexport class SheetViewDefinition extends ViewDefinition2d {\r\n /** @internal */\r\n public static override get className(): string { return \"SheetViewDefinition\"; }\r\n}\r\n\r\n/** A ViewDefinition used to display a 2d template model.\r\n * @internal\r\n */\r\nexport class TemplateViewDefinition2d extends ViewDefinition2d {\r\n /** @internal */\r\n public static override get className(): string { return \"TemplateViewDefinition2d\"; }\r\n}\r\n\r\n/** A ViewDefinition used to display a 3d template model.\r\n * @internal\r\n */\r\nexport class TemplateViewDefinition3d extends ViewDefinition3d {\r\n /** @internal */\r\n public static override get className(): string { return \"TemplateViewDefinition3d\"; }\r\n}\r\n\r\n/** An auxiliary coordinate system element. Auxiliary coordinate systems can be used by views to show\r\n * coordinate information in different units and/or orientations.\r\n * @public\r\n */\r\nexport abstract class AuxCoordSystem extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"AuxCoordSystem\"; }\r\n public type!: number;\r\n public description?: string;\r\n public constructor(props: AuxCoordSystemProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n\r\n/** A 2d auxiliary coordinate system.\r\n * @public\r\n */\r\nexport class AuxCoordSystem2d extends AuxCoordSystem {\r\n /** @internal */\r\n public static override get className(): string { return \"AuxCoordSystem2d\"; }\r\n public origin?: Point2d;\r\n public angle!: number;\r\n public constructor(props: AuxCoordSystem2dProps, iModel: IModelDb) { super(props, iModel); }\r\n\r\n /** Create a Code for a AuxCoordSystem2d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem2d element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystem2d name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem2d);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** A 3d auxiliary coordinate system.\r\n * @public\r\n */\r\nexport class AuxCoordSystem3d extends AuxCoordSystem {\r\n /** @internal */\r\n public static override get className(): string { return \"AuxCoordSystem3d\"; }\r\n public origin?: Point3d;\r\n public yaw!: number;\r\n public pitch!: number;\r\n public roll!: number;\r\n public constructor(props: AuxCoordSystem3dProps, iModel: IModelDb) { super(props, iModel); }\r\n\r\n /** Create a Code for a AuxCoordSystem3d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem3d element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystem3d name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem3d);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** A spatial auxiliary coordinate system.\r\n * @public\r\n */\r\nexport class AuxCoordSystemSpatial extends AuxCoordSystem3d {\r\n /** @internal */\r\n public static override get className(): string { return \"AuxCoordSystemSpatial\"; }\r\n /** Create a Code for a AuxCoordSystemSpatial element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystemSpatial element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystemSpatial name\r\n */\r\n public static override createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystemSpatial);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** Represents an *attachment* of a [[ViewDefinition]] to a [[Sheet]].\r\n * @public\r\n */\r\nexport class ViewAttachment extends GraphicalElement2d {\r\n /** @internal */\r\n public static override get className(): string { return \"ViewAttachment\"; }\r\n public view: RelatedElement;\r\n public constructor(props: ViewAttachmentProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.view = new RelatedElement(props.view);\r\n // ###NOTE: scale, displayPriority, and clipping vectors are stored in ViewAttachmentProps.jsonProperties.\r\n }\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.view.id);\r\n }\r\n}\r\n\r\n/** The position in space of a Light.\r\n * @internal\r\n */\r\nexport class LightLocation extends SpatialLocationElement {\r\n /** @internal */\r\n public static override get className(): string { return \"LightLocation\"; }\r\n /** Whether this light is currently turned on. */\r\n public enabled!: boolean;\r\n\r\n protected constructor(props: LightLocationProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ViewDefinition.js","sourceRoot":"","sources":["../../src/ViewDefinition.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;AAEH,sDAA2F;AAC3F,wDAE8B;AAC9B,oDAK4B;AAC5B,uCAA0F;AAK1F;;;;GAIG;AACH,MAAa,aAAc,SAAQ,2BAAiB;IAC3C,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAK1E,YAAsB,KAAyB,EAAE,MAAgB;QAC/D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC7B,CAAC;IAEe,MAAM;QACpB,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,EAAwB,CAAC;QACjD,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACzB,O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,IAAI,CAAC,EAAE,CAAC,CAAC;IACxC,CAAC;CACF;AAZD,wCAYC;AAED;;GAEG;AACH,MAAa,aAAc,SAAQ,gCAAsB;IAChD,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAI1E,YAAsB,KAAyB,EAAE,MAAgB,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CAC7F;AAND,sCAMC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ViewDefinitions\n */\n\nimport { Id64, Id64Array, Id64String, IModelStatus, JsonUtils } from \"@itwin/core-bentley\";\nimport {\n Angle, Matrix3d, Point2d, Point3d, Range2d, Range3d, StandardViewIndex, Transform, Vector3d, YawPitchRollAngles,\n} from \"@itwin/core-geometry\";\nimport {\n AuxCoordSystem2dProps, AuxCoordSystem3dProps, AuxCoordSystemProps, BisCodeSpec, Camera, CategorySelectorProps, Code, CodeScopeProps,\n CodeSpec, ConcreteEntityTypes, EntityReferenceSet, IModelError, LightLocationProps, ModelSelectorProps, RelatedElement,\n SpatialViewDefinitionProps, ViewAttachmentProps, ViewDefinition2dProps, ViewDefinition3dProps, ViewDefinitionProps, ViewDetails,\n ViewDetails3d,\n} from \"@itwin/core-common\";\nimport { DefinitionElement, GraphicalElement2d, SpatialLocationElement } from \"./Element\";\nimport { IModelDb } from \"./IModelDb\";\nimport { DisplayStyle, DisplayStyle2d, DisplayStyle3d } from \"./DisplayStyle\";\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\n\n/** Holds the list of Ids of GeometricModels displayed by a [[SpatialViewDefinition]]. Multiple SpatialViewDefinitions may point to the same ModelSelector.\n * @see [ModelSelectorState]($frontend)\n * See [how to create a ModelSelector]$(docs/learning/backend/CreateElements.md#ModelSelector).\n * @public\n */\nexport class ModelSelector extends DefinitionElement {\n public static override get className(): string { return \"ModelSelector\"; }\n\n /** The array of modelIds of the GeometricModels displayed by this ModelSelector */\n public models: Id64String[];\n\n protected constructor(props: ModelSelectorProps, iModel: IModelDb) {\n super(props, iModel);\n this.models = props.models;\n }\n\n public override toJSON(): ModelSelectorProps {\n const val = super.toJSON() as ModelSelectorProps;\n val.models = this.models;\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n this.models.forEach((modelId: Id64String) => referenceIds.addModel(modelId));\n }\n\n /** Create a Code for a ModelSelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the ModelSelector and provides the scope for its name.\n * @param codeValue The ModelSelector name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.modelSelector);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n\n /**\n * Create a ModelSelector to select which Models are displayed by a ViewDefinition.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the ModelSelector\n * @param models Array of models to select for display\n * @returns The newly constructed ModelSelector element.\n * @throws [[IModelError]] if unable to create the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): ModelSelector {\n const modelSelectorProps: ModelSelectorProps = {\n classFullName: this.classFullName,\n code: this.createCode(iModelDb, definitionModelId, name),\n model: definitionModelId,\n models,\n isPrivate: false,\n };\n return new ModelSelector(modelSelectorProps, iModelDb);\n }\n /**\n * Insert a ModelSelector to select which Models are displayed by a ViewDefinition.\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new ModelSelector into this DefinitionModel\n * @param name The name/CodeValue of the ModelSelector\n * @param models Array of models to select for display\n * @returns The Id of the newly inserted ModelSelector element.\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): Id64String {\n const modelSelector = this.create(iModelDb, definitionModelId, name, models);\n return iModelDb.elements.insertElement(modelSelector.toJSON());\n }\n}\n\n/** Holds a list of Ids of Categories to be displayed in a view.\n * @see [CategorySelectorState]($frontend)\n * See [how to create a CategorySelector]$(docs/learning/backend/CreateElements.md#CategorySelector).\n * @public\n */\nexport class CategorySelector extends DefinitionElement {\n public static override get className(): string { return \"CategorySelector\"; }\n /** The array of element Ids of the Categories selected by this CategorySelector */\n public categories: Id64String[];\n\n protected constructor(props: CategorySelectorProps, iModel: IModelDb) {\n super(props, iModel);\n this.categories = props.categories;\n }\n\n public override toJSON(): CategorySelectorProps {\n const val = super.toJSON() as CategorySelectorProps;\n val.categories = this.categories;\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n this.categories.forEach((categoryId: Id64String) => referenceIds.addElement(categoryId));\n }\n\n /** Create a Code for a CategorySelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the CategorySelector and provides the scope for its name.\n * @param codeValue The CategorySelector name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.categorySelector);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n\n /**\n * Create a CategorySelector to select which categories are displayed by a ViewDefinition.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name of the CategorySelector\n * @param categories Array of categories to select for display\n * @returns The newly constructed CategorySelector element.\n * @throws [[IModelError]] if unable to create the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): CategorySelector {\n const categorySelectorProps: CategorySelectorProps = {\n classFullName: this.classFullName,\n code: this.createCode(iModelDb, definitionModelId, name),\n model: definitionModelId,\n categories,\n isPrivate: false,\n };\n return new CategorySelector(categorySelectorProps, iModelDb);\n }\n\n /**\n * Insert a CategorySelector to select which categories are displayed by a ViewDefinition.\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new CategorySelector into this DefinitionModel\n * @param name The name of the CategorySelector\n * @param categories Array of categories to select for display\n * @returns The Id of the newly inserted CategorySelector element.\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): Id64String {\n const categorySelector = this.create(iModelDb, definitionModelId, name, categories);\n return iModelDb.elements.insertElement(categorySelector.toJSON());\n }\n}\n\n/**\n * The definition element for a view. ViewDefinitions specify the area/volume that is viewed, the Ids of a DisplayStyle and a CategorySelector,\n * plus additional view-specific parameters in their [[Element.jsonProperties]].\n * Subclasses of ViewDefinition determine which model(s) are viewed.\n * @note ViewDefinition is only available in the backend. See [ViewState]($frontend) for usage in the frontend.\n * @public\n */\nexport abstract class ViewDefinition extends DefinitionElement {\n public static override get className(): string { return \"ViewDefinition\"; }\n /** The element Id of the [[CategorySelector]] for this ViewDefinition */\n public categorySelectorId: Id64String;\n /** The element Id of the [[DisplayStyle]] for this ViewDefinition */\n public displayStyleId: Id64String;\n\n protected constructor(props: ViewDefinitionProps, iModel: IModelDb) {\n super(props, iModel);\n\n this.categorySelectorId = Id64.fromJSON(props.categorySelectorId);\n if (!Id64.isValid(this.categorySelectorId))\n throw new IModelError(IModelStatus.BadArg, `categorySelectorId is invalid`);\n\n this.displayStyleId = Id64.fromJSON(props.displayStyleId);\n if (!Id64.isValid(this.displayStyleId))\n throw new IModelError(IModelStatus.BadArg, `displayStyleId is invalid`);\n }\n\n public override toJSON(): ViewDefinitionProps {\n const json = super.toJSON() as ViewDefinitionProps;\n json.categorySelectorId = this.categorySelectorId;\n json.displayStyleId = this.displayStyleId;\n return json;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.categorySelectorId);\n referenceIds.addElement(this.displayStyleId);\n const acsId: Id64String = this.getAuxiliaryCoordinateSystemId();\n if (Id64.isValidId64(acsId)) {\n referenceIds.addElement(acsId);\n }\n }\n\n /** @beta */\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"categorySelectorId\", \"displayStyleId\"];\n /** @alpha */\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n ...super.requiredReferenceKeyTypeMap,\n categorySelectorId: ConcreteEntityTypes.Element,\n displayStyleId: ConcreteEntityTypes.Element,\n };\n\n /** @beta */\n protected static override onCloned(context: IModelElementCloneContext, sourceElementProps: ViewDefinitionProps, targetElementProps: ViewDefinitionProps): void {\n super.onCloned(context, sourceElementProps, targetElementProps);\n if (context.isBetweenIModels && targetElementProps.jsonProperties && targetElementProps.jsonProperties.viewDetails) {\n const acsId: Id64String = Id64.fromJSON(targetElementProps.jsonProperties.viewDetails.acs);\n if (Id64.isValidId64(acsId)) {\n targetElementProps.jsonProperties.viewDetails.acs = context.findTargetElementId(acsId);\n }\n }\n }\n\n /** Type guard for `instanceof ViewDefinition3d` */\n public isView3d(): this is ViewDefinition3d { return this instanceof ViewDefinition3d; }\n /** Type guard for 'instanceof ViewDefinition2d` */\n public isView2d(): this is ViewDefinition2d { return this instanceof ViewDefinition2d; }\n /** Type guard for `instanceof SpatialViewDefinition` */\n public isSpatialView(): this is SpatialViewDefinition { return this instanceof SpatialViewDefinition; }\n /** Type guard for 'instanceof DrawingViewDefinition' */\n public isDrawingView(): this is DrawingViewDefinition { return this instanceof DrawingViewDefinition; }\n\n /** Load this view's DisplayStyle from the IModelDb. */\n public loadDisplayStyle(): DisplayStyle { return this.iModel.elements.getElement<DisplayStyle>(this.displayStyleId); }\n\n /** Load this view's CategorySelector from the IModelDb. */\n public loadCategorySelector(): CategorySelector { return this.iModel.elements.getElement<CategorySelector>(this.categorySelectorId); }\n\n /** Provides access to optional detail settings for this view. */\n public abstract get details(): ViewDetails;\n\n /** The Id of the AuxiliaryCoordinateSystem for this ViewDefinition, or an invalid Id if no ACS is defined. */\n public getAuxiliaryCoordinateSystemId(): Id64String {\n return this.details.auxiliaryCoordinateSystemId;\n }\n\n /** Set or clear the AuxiliaryCoordinateSystem for this ViewDefinition.\n * @param acsId The Id of the new AuxiliaryCoordinateSystem. If `Id64.invalid` is passed, then no AuxiliaryCoordinateSystem will be used.\n */\n public setAuxiliaryCoordinateSystemId(acsId: Id64String) {\n this.details.auxiliaryCoordinateSystemId = acsId;\n }\n\n /** Create a Code for a ViewDefinition given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel to contain the ViewDefinition and provides the scope for its name.\n * @param codeValue The ViewDefinition name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.viewDefinition);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Defines a view of one or more 3d models.\n * @public\n */\nexport abstract class ViewDefinition3d extends ViewDefinition {\n private readonly _details: ViewDetails3d;\n public static override get className(): string { return \"ViewDefinition3d\"; }\n /** If true, camera is used. Otherwise, use an orthographic projection. */\n public cameraOn: boolean;\n /** The lower left back corner of the view frustum. */\n public origin: Point3d;\n /** The extent (size) of the view frustum, in meters, along its x,y,z axes. */\n public extents: Vector3d;\n /** Rotation from world coordinates to view coordinates. */\n public angles: YawPitchRollAngles;\n /** The camera used for this view, if `cameraOn` is true. */\n public camera: Camera;\n\n protected constructor(props: ViewDefinition3dProps, iModel: IModelDb) {\n super(props, iModel);\n this.cameraOn = JsonUtils.asBool(props.cameraOn);\n this.origin = Point3d.fromJSON(props.origin);\n this.extents = Vector3d.fromJSON(props.extents);\n this.angles = YawPitchRollAngles.fromJSON(props.angles);\n this.camera = new Camera(props.camera);\n this._details = new ViewDetails3d(this.jsonProperties);\n }\n\n public override toJSON(): ViewDefinition3dProps {\n const val = super.toJSON() as ViewDefinition3dProps;\n val.cameraOn = this.cameraOn;\n val.origin = this.origin;\n val.extents = this.extents;\n val.angles = this.angles;\n val.camera = this.camera;\n return val;\n }\n\n /** Provides access to optional detail settings for this view. */\n public get details(): ViewDetails3d { return this._details; }\n\n /** Load this view's DisplayStyle3d from the IModelDb. */\n public loadDisplayStyle3d(): DisplayStyle3d { return this.iModel.elements.getElement<DisplayStyle3d>(this.displayStyleId); }\n}\n\n/** Defines a view of one or more SpatialModels.\n * The list of viewed models is stored by the ModelSelector.\n *\n * This is how a SpatialViewDefinition selects the elements to display:\n *\n * SpatialViewDefinition\n * * ModelSelector\n * * ModelIds -------> SpatialModels <----------GeometricElement3d.Model\n * * CategorySelector\n * * CategoryIds -----> SpatialCategories <----------GeometricElement3d.Category\n * @public\n */\nexport class SpatialViewDefinition extends ViewDefinition3d {\n public static override get className(): string { return \"SpatialViewDefinition\"; }\n /** The Id of the [[ModelSelector]] for this SpatialViewDefinition. */\n public modelSelectorId: Id64String;\n\n protected constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) {\n super(props, iModel);\n this.modelSelectorId = Id64.fromJSON(props.modelSelectorId);\n if (!Id64.isValid(this.modelSelectorId))\n throw new IModelError(IModelStatus.BadArg, `modelSelectorId is invalid`);\n }\n\n /** Construct a SpatialViewDefinition from its JSON representation. */\n public static fromJSON(props: Omit<SpatialViewDefinitionProps, \"classFullName\">, iModel: IModelDb) {\n return new SpatialViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\n }\n\n public override toJSON(): SpatialViewDefinitionProps {\n const json = super.toJSON() as SpatialViewDefinitionProps;\n json.modelSelectorId = this.modelSelectorId;\n return json;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.modelSelectorId);\n }\n\n /** @beta */\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"modelSelectorId\"];\n\n /** @alpha */\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n ...super.requiredReferenceKeyTypeMap,\n modelSelectorId: ConcreteEntityTypes.Element,\n };\n\n /** Load this view's ModelSelector from the IModelDb. */\n public loadModelSelector(): ModelSelector { return this.iModel.elements.getElement<ModelSelector>(this.modelSelectorId); }\n /**\n * Create a SpatialViewDefinition with the camera turned on.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @param cameraAngle Camera angle in radians.\n * @returns The newly constructed SpatialViewDefinition element\n * @throws [[IModelError]] if there is a problem creating the view\n */\n public static createWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): SpatialViewDefinition {\n const rotation = Matrix3d.createStandardWorldToView(standardView);\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n const cameraDistance = 2 * (rotatedRange.diagonal().magnitudeXY() / 2.0) / Math.tan(cameraAngle / 2.0);\n const cameraLocation = rotatedRange.diagonalFractionToPoint(.5); // Start at center.\n cameraLocation.z += cameraDistance; // Back up by camera distance.\n rotation.multiplyTransposeVectorInPlace(cameraLocation);\n\n const viewDefinitionProps: SpatialViewDefinitionProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n modelSelectorId,\n categorySelectorId,\n displayStyleId,\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\n extents: rotatedRange.diagonal(),\n angles,\n cameraOn: true,\n camera: { lens: { radians: cameraAngle }, focusDist: cameraDistance, eye: cameraLocation },\n };\n\n return new SpatialViewDefinition(viewDefinitionProps, iModelDb);\n }\n /**\n * Insert an SpatialViewDefinition with the camera turned on.\n * @see [[createWithCamera]] for details.\n * @returns The Id of the newly inserted SpatialViewDefinition element\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insertWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): Id64String {\n const viewDefinition = this.createWithCamera(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView, cameraAngle);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n}\n\n/** Defines a spatial view that displays geometry on the image plane using a parallel orthographic projection.\n * See [how to create a OrthographicViewDefinition]$(docs/learning/backend/CreateElements.md#OrthographicViewDefinition).\n * @public\n */\nexport class OrthographicViewDefinition extends SpatialViewDefinition {\n public static override get className(): string { return \"OrthographicViewDefinition\"; }\n\n constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) { super(props, iModel); }\n\n /**\n * Create an OrthographicViewDefinition\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @returns The newly constructed OrthographicViewDefinition element\n * @throws [[IModelError]] if there is a problem creating the view\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): OrthographicViewDefinition {\n const rotation = Matrix3d.createStandardWorldToView(standardView);\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n const viewDefinitionProps: SpatialViewDefinitionProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n modelSelectorId,\n categorySelectorId,\n displayStyleId,\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\n extents: rotatedRange.diagonal(),\n angles,\n cameraOn: false,\n camera: new Camera(), // not used when cameraOn === false\n };\n return new OrthographicViewDefinition(viewDefinitionProps, iModelDb);\n }\n\n /**\n * Insert an OrthographicViewDefinition\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new OrthographicViewDefinition into this DefinitionModel\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @returns The Id of the newly inserted OrthographicViewDefinition element\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): Id64String {\n const viewDefinition = this.create(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n\n /** Set a new viewed range without changing the rotation or any other properties. */\n public setRange(range: Range3d): void {\n const rotation = this.angles.toMatrix3d();\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n this.origin = Point3d.createFrom(rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z));\n this.extents = rotatedRange.diagonal();\n }\n}\n\n/** Defines a view of a single 2d model. Each 2d model has its own coordinate system, so only one may appear per view.\n * @public\n */\nexport class ViewDefinition2d extends ViewDefinition {\n private readonly _details: ViewDetails;\n\n public static override get className(): string { return \"ViewDefinition2d\"; }\n /** The Id of the Model displayed by this view. */\n public baseModelId: Id64String;\n /** The lower-left corner of this view in Model coordinates. */\n public origin: Point2d;\n /** The delta (size) of this view, in meters, aligned with view x,y. */\n public delta: Point2d;\n /** The rotation of this view. */\n public angle: Angle;\n\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\n super(props, iModel);\n this.baseModelId = Id64.fromJSON(props.baseModelId);\n this.origin = Point2d.fromJSON(props.origin);\n this.delta = Point2d.fromJSON(props.delta);\n this.angle = Angle.fromJSON(props.angle);\n this._details = new ViewDetails(this.jsonProperties);\n }\n\n public override toJSON(): ViewDefinition2dProps {\n const val = super.toJSON() as ViewDefinition2dProps;\n val.baseModelId = this.baseModelId;\n val.origin = this.origin;\n val.delta = this.delta;\n val.angle = this.angle;\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.baseModelId);\n }\n\n /** Provides access to optional detail settings for this view. */\n public get details(): ViewDetails { return this._details; }\n\n /** Load this view's DisplayStyle2d from the IModelDb. */\n public loadDisplayStyle2d(): DisplayStyle2d { return this.iModel.elements.getElement<DisplayStyle2d>(this.displayStyleId); }\n}\n\n/** Defines a view of a [[DrawingModel]].\n * @public\n */\nexport class DrawingViewDefinition extends ViewDefinition2d {\n public static override get className(): string { return \"DrawingViewDefinition\"; }\n\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\n super(props, iModel);\n }\n\n /** Create a DrawingViewDefinition\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param baseModelId The base [[DrawingModel]]\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\n * @param range Defines the view origin and extents\n * @throws [[IModelError]] if there is a problem creating the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): DrawingViewDefinition {\n const viewDefinitionProps: ViewDefinition2dProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n baseModelId,\n categorySelectorId,\n displayStyleId,\n origin: { x: range.low.x, y: range.low.y },\n delta: range.diagonal(),\n angle: 0,\n };\n return new DrawingViewDefinition(viewDefinitionProps, iModelDb);\n }\n\n /** Construct a DrawingViewDefinition from its JSON representation. */\n public static fromJSON(props: Omit<ViewDefinition2dProps, \"classFullName\">, iModel: IModelDb) {\n return new DrawingViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\n }\n\n /** Insert a DrawingViewDefinition\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new DrawingViewDefinition into this [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param baseModelId The base [[DrawingModel]]\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\n * @param range Defines the view origin and extents\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): Id64String {\n const viewDefinition = this.create(iModelDb, definitionModelId, name, baseModelId, categorySelectorId, displayStyleId, range);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n}\n\n/** Defines a view of a [[SheetModel]].\n * @public\n */\nexport class SheetViewDefinition extends ViewDefinition2d {\n public static override get className(): string { return \"SheetViewDefinition\"; }\n}\n\n/** A ViewDefinition used to display a 2d template model.\n * @internal\n */\nexport class TemplateViewDefinition2d extends ViewDefinition2d {\n public static override get className(): string { return \"TemplateViewDefinition2d\"; }\n}\n\n/** A ViewDefinition used to display a 3d template model.\n * @internal\n */\nexport class TemplateViewDefinition3d extends ViewDefinition3d {\n public static override get className(): string { return \"TemplateViewDefinition3d\"; }\n}\n\n/** An auxiliary coordinate system element. Auxiliary coordinate systems can be used by views to show\n * coordinate information in different units and/or orientations.\n * @public\n */\nexport abstract class AuxCoordSystem extends DefinitionElement {\n public static override get className(): string { return \"AuxCoordSystem\"; }\n public type!: number;\n public description?: string;\n public constructor(props: AuxCoordSystemProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A 2d auxiliary coordinate system.\n * @public\n */\nexport class AuxCoordSystem2d extends AuxCoordSystem {\n public static override get className(): string { return \"AuxCoordSystem2d\"; }\n public origin?: Point2d;\n public angle!: number;\n public constructor(props: AuxCoordSystem2dProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a AuxCoordSystem2d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem2d element and provides the scope for its name.\n * @param codeValue The AuxCoordSystem2d name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem2d);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A 3d auxiliary coordinate system.\n * @public\n */\nexport class AuxCoordSystem3d extends AuxCoordSystem {\n public static override get className(): string { return \"AuxCoordSystem3d\"; }\n public origin?: Point3d;\n public yaw!: number;\n public pitch!: number;\n public roll!: number;\n public constructor(props: AuxCoordSystem3dProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a AuxCoordSystem3d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem3d element and provides the scope for its name.\n * @param codeValue The AuxCoordSystem3d name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem3d);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A spatial auxiliary coordinate system.\n * @public\n */\nexport class AuxCoordSystemSpatial extends AuxCoordSystem3d {\n public static override get className(): string { return \"AuxCoordSystemSpatial\"; }\n /** Create a Code for a AuxCoordSystemSpatial element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystemSpatial element and provides the scope for its name.\n * @param codeValue The AuxCoordSystemSpatial name\n */\n public static override createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystemSpatial);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Represents an *attachment* of a [[ViewDefinition]] to a [[Sheet]].\n * @public\n */\nexport class ViewAttachment extends GraphicalElement2d {\n public static override get className(): string { return \"ViewAttachment\"; }\n public view: RelatedElement;\n public constructor(props: ViewAttachmentProps, iModel: IModelDb) {\n super(props, iModel);\n this.view = new RelatedElement(props.view);\n // ###NOTE: scale, displayPriority, and clipping vectors are stored in ViewAttachmentProps.jsonProperties.\n }\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.view.id);\n }\n}\n\n/** The position in space of a Light.\n * @internal\n */\nexport class LightLocation extends SpatialLocationElement {\n public static override get className(): string { return \"LightLocation\"; }\n /** Whether this light is currently turned on. */\n public enabled!: boolean;\n\n protected constructor(props: LightLocationProps, iModel: IModelDb) { super(props, iModel); }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewStateHydrator.js","sourceRoot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GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,kBAAkB,CAAC,CAAC;oBAChG,OAAO,IAAI,CAAC;gBACd,CAAC;gBAAC,MAAM,CAAC;oBACP,OAAO,SAAS,CAAC;gBACnB,CAAC;YACH,CAAC,CAAC;YAEF,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC5B,CAAC;QACD,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC1C,QAAQ,CAAC,cAAc,GAAG,KAAK,CAAC;QAChC,QAAQ,CAAC,wBAAwB,GAAG,eAAe,CAAC;QAEpD,OAAO;IACT,CAAC;CAEF;AAtGD,8CAsGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"ViewStateHydrator.js","sourceRoot":"","sources":["../../src/ViewStateHydrator.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,sDAA0F;AAE1F,mEAAgE;AAGhE,gBAAgB;AAChB,MAAa,iBAAiB;IAE5B,YAAmB,MAAgB;QACjC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAEM,KAAK,CAAC,uBAAuB,CAAC,OAAqC;QACxE,MAAM,QAAQ,GAAkC,EAAE,CAAC;QACnD,MAAM,QAAQ,GAAG,EAAE,CAAC;QACpB,IAAI,OAAO,CAAC,KAAK;YACf,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;QAC3D,IAAI,OAAO,CAAC,sBAAsB;YAChC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,4BAA4B,CAAC,QAAQ,EAAE,OAAO,CAAC,sBAAsB,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC;QACzH,mDAAmD;QACnD,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EO,KAAK,CAAC,4BAA4B,CAAC,QAAuC,EAAE,sBAAyC,EAAE,kBAAuC;QACpK,MAAM,eAAe,GAAG,gCAAiB,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC;QAChF,MAAM,eAAe,GAA0B,EAAE,CAAC;QAClD,KAAK,MAAM,EAAE,IAAI,eAAe,EAAE,CAAC;YACjC,IAAI,CAAC;gBACH,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,EAAE,EAAE,CAAC,CAAE,CAAC;YACtE,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;YACjB,CAAC;QACH,CAAC;QAED,MAAM,QAAQ,GAAG,EAAE,CAAC;QACpB,KAAK,MAAM,UAAU,IAAI,eAAe,EAAE,CAAC;YACzC,MAAM,QAAQ,GAAG,KAAK,IAAI,EAAE;gBAC1B,IAAI,CAAC;oBACH,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,kBAAkB,CAAC,CAAC;oBAChG,OAAO,IAAI,CAAC;gBACd,CAAC;gBAAC,MAAM,CAAC;oBACP,OAAO,SAAS,CAAC;gBACnB,CAAC;YACH,CAAC,CAAC;YAEF,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC5B,CAAC;QACD,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC1C,QAAQ,CAAC,cAAc,GAAG,KAAK,CAAC;QAChC,QAAQ,CAAC,wBAAwB,GAAG,eAAe,CAAC;QAEpD,OAAO;IACT,CAAC;CAEF;AAtGD,8CAsGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { BentleyError, CompressedId64Set, Id64String, Logger } from \"@itwin/core-bentley\";\nimport { HydrateViewStateRequestProps, HydrateViewStateResponseProps, ModelProps, SubCategoryResultRow, ViewAttachmentProps, ViewStateLoadProps } from \"@itwin/core-common\";\nimport { BackendLoggerCategory } from \"./BackendLoggerCategory\";\nimport { IModelDb } from \"./IModelDb\";\n\n/** @internal */\nexport class ViewStateHydrator {\n private _imodel: IModelDb;\n public constructor(iModel: IModelDb) {\n this._imodel = iModel;\n }\n\n public async getHydrateResponseProps(options: HydrateViewStateRequestProps): Promise<HydrateViewStateResponseProps> {\n const response: HydrateViewStateResponseProps = {};\n const promises = [];\n if (options.acsId)\n promises.push(this.handleAcsId(response, options.acsId));\n if (options.sheetViewAttachmentIds)\n promises.push(this.handleSheetViewAttachmentIds(response, options.sheetViewAttachmentIds, options.viewStateLoadProps));\n // eslint-disable-next-line deprecation/deprecation\n if (options.notLoadedCategoryIds) {\n // eslint-disable-next-line deprecation/deprecation\n promises.push(this.handleCategoryIds(response, options.notLoadedCategoryIds));\n }\n if (options.spatialViewId)\n promises.push(this.handleSpatialViewId(response, options.spatialViewId, options.viewStateLoadProps));\n if (options.notLoadedModelSelectorStateModels)\n promises.push(this.handleModelSelectorStateModels(response, options.notLoadedModelSelectorStateModels));\n if (options.baseModelId)\n promises.push(this.handleBaseModelId(response, options.baseModelId));\n await Promise.all(promises);\n return response;\n }\n\n private async handleCategoryIds(response: HydrateViewStateResponseProps, categoryIds: CompressedId64Set) {\n const decompressedIds = CompressedId64Set.decompressArray(categoryIds);\n const results: SubCategoryResultRow[] = await this._imodel.querySubCategories(decompressedIds);\n\n // eslint-disable-next-line deprecation/deprecation\n response.categoryIdsResult = results;\n }\n\n private async handleBaseModelId(response: HydrateViewStateResponseProps, baseModelId: Id64String) {\n let modelProps;\n try {\n modelProps = this._imodel.models.getModelJson({ id: baseModelId });\n } catch (err) {\n Logger.logError(BackendLoggerCategory.ViewStateHydrator, `Error getting modelProps for baseModelId: ${baseModelId}`, () => ({error: BentleyError.getErrorProps(err)}));\n }\n response.baseModelProps = modelProps;\n }\n\n private async handleModelSelectorStateModels(response: HydrateViewStateResponseProps, models: CompressedId64Set) {\n const decompressedModelIds = CompressedId64Set.decompressSet(models);\n\n const modelJsonArray: ModelProps[] = [];\n for (const id of decompressedModelIds) {\n try {\n const modelProps = this._imodel.models.getModelJson({ id });\n modelJsonArray.push(modelProps);\n } catch (error) {\n }\n }\n\n response.modelSelectorStateModels = modelJsonArray;\n }\n\n private async handleSpatialViewId(response: HydrateViewStateResponseProps, spatialViewId: Id64String, viewStateLoadProps?: ViewStateLoadProps) {\n response.spatialViewProps = await this._imodel.views.getViewStateProps(spatialViewId, viewStateLoadProps);\n }\n\n private async handleAcsId(response: HydrateViewStateResponseProps, acsId: string) {\n try {\n const props = this._imodel.elements.getElementProps(acsId);\n response.acsElementProps = props;\n } catch { }\n }\n\n private async handleSheetViewAttachmentIds(response: HydrateViewStateResponseProps, sheetViewAttachmentIds: CompressedId64Set, viewStateLoadProps?: ViewStateLoadProps) {\n const decompressedIds = CompressedId64Set.decompressSet(sheetViewAttachmentIds);\n const attachmentProps: ViewAttachmentProps[] = [];\n for (const id of decompressedIds) {\n try {\n attachmentProps.push(this._imodel.elements.getElementJson({ id }) );\n } catch (error) {\n }\n }\n\n const promises = [];\n for (const attachment of attachmentProps) {\n const loadView = async () => {\n try {\n const view = await this._imodel.views.getViewStateProps(attachment.view.id, viewStateLoadProps);\n return view;\n } catch {\n return undefined;\n }\n };\n\n promises.push(loadView());\n }\n const views = await Promise.all(promises);\n response.sheetViewViews = views;\n response.sheetViewAttachmentProps = attachmentProps;\n\n return;\n }\n\n}\n"]}
|