@itwin/core-common 4.10.0-dev.31 → 4.10.0-dev.33
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/lib/cjs/BackendTypes.d.ts +0 -2
- package/lib/cjs/BackendTypes.d.ts.map +1 -1
- package/lib/cjs/BackgroundMapProvider.js +1 -1
- package/lib/cjs/BackgroundMapProvider.js.map +1 -1
- package/lib/cjs/BackgroundMapSettings.js +2 -2
- package/lib/cjs/BackgroundMapSettings.js.map +1 -1
- package/lib/cjs/BriefcaseTypes.js.map +1 -1
- package/lib/cjs/ColorDef.d.ts.map +1 -1
- package/lib/cjs/ColorDef.js +0 -3
- package/lib/cjs/ColorDef.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
- package/lib/cjs/DisplayStyleSettings.d.ts.map +1 -1
- package/lib/cjs/ECSqlReader.js.map +1 -1
- package/lib/cjs/ElementMesh.js +2 -3
- package/lib/cjs/ElementMesh.js.map +1 -1
- package/lib/cjs/ElementProps.js +3 -3
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/GeoCoordinateServices.js +2 -2
- package/lib/cjs/GeoCoordinateServices.js.map +1 -1
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/Image.js +4 -4
- package/lib/cjs/Image.js.map +1 -1
- package/lib/cjs/MapLayerSettings.d.ts.map +1 -1
- package/lib/cjs/MapLayerSettings.js +0 -1
- package/lib/cjs/MapLayerSettings.js.map +1 -1
- package/lib/cjs/QPoint.d.ts +1 -1
- package/lib/cjs/RenderMaterial.js +4 -4
- package/lib/cjs/RenderMaterial.js.map +1 -1
- package/lib/cjs/RenderTexture.js.map +1 -1
- package/lib/cjs/RpcInterface.js +1 -1
- package/lib/cjs/RpcInterface.js.map +1 -1
- package/lib/cjs/RpcManager.d.ts.map +1 -1
- package/lib/cjs/RpcManager.js.map +1 -1
- package/lib/cjs/SolarCalculate.js +4 -5
- package/lib/cjs/SolarCalculate.js.map +1 -1
- package/lib/cjs/SpatialClassification.js.map +1 -1
- package/lib/cjs/SubCategoryAppearance.js.map +1 -1
- package/lib/cjs/TextureMapping.js.map +1 -1
- package/lib/cjs/TileProps.js +2 -2
- package/lib/cjs/TileProps.js.map +1 -1
- package/lib/cjs/Tween.d.ts.map +1 -1
- package/lib/cjs/Tween.js +0 -1
- package/lib/cjs/Tween.js.map +1 -1
- package/lib/cjs/ViewProps.d.ts +1 -1
- package/lib/cjs/ViewProps.d.ts.map +1 -1
- package/lib/cjs/ViewProps.js.map +1 -1
- package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
- package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js +12 -12
- package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelTileRpcInterface.js +1 -1
- package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/TestRpcManager.d.ts.map +1 -1
- package/lib/cjs/rpc/TestRpcManager.js +0 -1
- package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
- package/lib/cjs/rpc/WipRpcInterface.js +1 -1
- package/lib/cjs/rpc/WipRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.js +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConstants.d.ts +1 -1
- package/lib/cjs/rpc/core/RpcConstants.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcConstants.js +1 -1
- package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
- package/lib/cjs/rpc/core/RpcControl.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcControl.js +0 -1
- package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.js +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/cjs/rpc/core/RpcOperation.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcOperation.js +0 -1
- package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPendingQueue.js +1 -1
- package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPush.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRegistry.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcRegistry.js +0 -2
- package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.js +1 -2
- package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequestContext.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.js +0 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/cjs/rpc/core/RpcSessionInvocation.js +1 -1
- package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.d.ts.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +0 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.d.ts.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.js +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +0 -2
- package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js +0 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/cjs/tile/TileIO.js +4 -4
- package/lib/cjs/tile/TileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.js +13 -13
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/esm/BackendTypes.d.ts +0 -2
- package/lib/esm/BackendTypes.d.ts.map +1 -1
- package/lib/esm/BackgroundMapProvider.js +1 -1
- package/lib/esm/BackgroundMapProvider.js.map +1 -1
- package/lib/esm/BackgroundMapSettings.js +2 -2
- package/lib/esm/BackgroundMapSettings.js.map +1 -1
- package/lib/esm/BriefcaseTypes.js.map +1 -1
- package/lib/esm/ColorDef.d.ts.map +1 -1
- package/lib/esm/ColorDef.js +0 -3
- package/lib/esm/ColorDef.js.map +1 -1
- package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
- package/lib/esm/DisplayStyleSettings.d.ts.map +1 -1
- package/lib/esm/ECSqlReader.js.map +1 -1
- package/lib/esm/ElementMesh.js +1 -1
- package/lib/esm/ElementMesh.js.map +1 -1
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/MapLayerSettings.d.ts.map +1 -1
- package/lib/esm/MapLayerSettings.js +0 -1
- package/lib/esm/MapLayerSettings.js.map +1 -1
- package/lib/esm/QPoint.d.ts +1 -1
- package/lib/esm/RenderMaterial.js +4 -4
- package/lib/esm/RenderMaterial.js.map +1 -1
- package/lib/esm/RenderTexture.js.map +1 -1
- package/lib/esm/RpcInterface.js +1 -1
- package/lib/esm/RpcInterface.js.map +1 -1
- package/lib/esm/RpcManager.d.ts.map +1 -1
- package/lib/esm/RpcManager.js.map +1 -1
- package/lib/esm/SpatialClassification.js.map +1 -1
- package/lib/esm/SubCategoryAppearance.js.map +1 -1
- package/lib/esm/TextureMapping.js.map +1 -1
- package/lib/esm/Tween.d.ts.map +1 -1
- package/lib/esm/Tween.js +0 -1
- package/lib/esm/Tween.js.map +1 -1
- package/lib/esm/ViewProps.d.ts +1 -1
- package/lib/esm/ViewProps.d.ts.map +1 -1
- package/lib/esm/ViewProps.js.map +1 -1
- package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
- package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js +12 -12
- package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelTileRpcInterface.js +1 -1
- package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/esm/rpc/TestRpcManager.d.ts.map +1 -1
- package/lib/esm/rpc/TestRpcManager.js +0 -1
- package/lib/esm/rpc/TestRpcManager.js.map +1 -1
- package/lib/esm/rpc/WipRpcInterface.js +1 -1
- package/lib/esm/rpc/WipRpcInterface.js.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.js +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/esm/rpc/core/RpcConstants.d.ts +1 -1
- package/lib/esm/rpc/core/RpcConstants.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcConstants.js +1 -1
- package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
- package/lib/esm/rpc/core/RpcControl.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcControl.js +0 -1
- package/lib/esm/rpc/core/RpcControl.js.map +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.js +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/esm/rpc/core/RpcOperation.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcOperation.js +0 -1
- package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
- package/lib/esm/rpc/core/RpcPendingQueue.js +1 -1
- package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/esm/rpc/core/RpcPush.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcPush.js.map +1 -1
- package/lib/esm/rpc/core/RpcRegistry.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcRegistry.js +0 -2
- package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.js +1 -2
- package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequestContext.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/esm/rpc/core/RpcRoutingToken.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcRoutingToken.js +0 -1
- package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/esm/rpc/core/RpcSessionInvocation.js +1 -1
- package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.d.ts.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +0 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.d.ts.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.js +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +0 -2
- package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.js +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.js +0 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/esm/tile/TileMetadata.js +1 -1
- package/lib/esm/tile/TileMetadata.js.map +1 -1
- package/package.json +10 -10
package/lib/cjs/ViewProps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewProps.js","sourceRoot":"","sources":["../../src/ViewProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAgPH;;;GAGG;AACH,IAAiB,YAAY,CA0W5B;AA1WD,WAAiB,YAAY;IAE3B;;;;OAIG;IACU,oBAAO,GAAG,OAAgB,CAAC;IAkCxC,qGAAqG;IACxF,0BAAa,GAAG,CAAC,EAAiB,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;AAgUnF,CAAC,EA1WgB,YAAY,4BAAZ,YAAY,QA0W5B","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 Views\r\n */\r\n\r\nimport { CompressedId64Set, Id64Array, Id64String } from \"@itwin/core-bentley\";\r\nimport { AngleProps, Range3dProps, TransformProps, XYProps, XYZProps, YawPitchRollProps } from \"@itwin/core-geometry\";\r\nimport { CameraProps } from \"./Camera\";\r\nimport { DisplayStyleProps, DisplayStyleSettingsProps } from \"./DisplayStyleSettings\";\r\nimport { DefinitionElementProps, DisplayStyleLoadProps, ElementProps, RenderTimelineProps, SheetProps, ViewAttachmentProps } from \"./ElementProps\";\r\nimport { EntityQueryParams } from \"./EntityProps\";\r\nimport { ModelProps } from \"./ModelProps\";\r\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\r\nimport { ViewDetails3dProps, ViewDetailsProps } from \"./ViewDetails\";\r\nimport { ThumbnailProps } from \"./Thumbnail\";\r\nimport { RenderSchedule } from \"./RenderSchedule\";\r\n\r\n/** The id of either an element or an entry in a ViewStore.\r\n * @public\r\n */\r\nexport type ViewIdString = Id64String; // should also include ViewStoreRpc.IdString when that's @public\r\n\r\n/** As part of a [[ViewStateProps]], describes the [[SpatialViewDefinition]] from which a [SectionDrawing]($backend) was generated.\r\n * @see [[SectionDrawingProps]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SectionDrawingViewProps {\r\n /** The Id of the spatial view from which the SectionDrawing was generated. */\r\n spatialView: Id64String;\r\n /** If true, the spatial view should be displayed in the context of the drawing view. */\r\n displaySpatialView: boolean;\r\n /** Transform from drawing coordinates to spatial coordinates. If undefined, use identity transform. */\r\n drawingToSpatialTransform?: TransformProps;\r\n}\r\n\r\n/** The response props from the getCustomViewState3dData RPC endpoint\r\n * @internal\r\n */\r\nexport interface CustomViewState3dProps {\r\n modelIds: CompressedId64Set;\r\n modelExtents: Range3dProps;\r\n categoryIds: CompressedId64Set;\r\n}\r\n\r\n/**\r\n * The options passed to the getCustomViewState3dData RPC endpoint.\r\n * @internal\r\n */\r\nexport interface CustomViewState3dCreatorOptions {\r\n modelIds?: CompressedId64Set;\r\n}\r\n\r\n/**\r\n * A result row from querying for subcategories\r\n * @internal\r\n */\r\nexport interface SubCategoryResultRow {\r\n parentId: Id64String;\r\n id: Id64String;\r\n appearance: SubCategoryAppearance.Props;\r\n}\r\n\r\n/**\r\n * Request props for the hydrateViewState RPC endpoint.\r\n * @internal\r\n */\r\nexport interface HydrateViewStateRequestProps {\r\n acsId?: string;\r\n notLoadedModelSelectorStateModels?: CompressedId64Set;\r\n /** @deprecated in 3.x. If loading categoryIds is necessary, see [IModelConnection.SubCategoriesCache.load]($frontend)*/\r\n notLoadedCategoryIds?: CompressedId64Set;\r\n sheetViewAttachmentIds?: CompressedId64Set;\r\n viewStateLoadProps?: ViewStateLoadProps;\r\n baseModelId?: Id64String;\r\n spatialViewId?: Id64String;\r\n}\r\n\r\n/** Response props from the hydrateViewState RPC endpoint.\r\n * @internal\r\n */\r\nexport interface HydrateViewStateResponseProps {\r\n acsElementProps?: ElementProps;\r\n modelSelectorStateModels?: ModelProps[];\r\n // cast this to viewAttachmentInfo[] on the frontend.\r\n sheetViewAttachmentProps?: ViewAttachmentProps[];\r\n sheetViewViews?: (ViewStateProps | undefined)[];\r\n baseModelProps?: ModelProps;\r\n spatialViewProps?: ViewStateProps;\r\n /** @deprecated in 3.x. If loading categoryIds is necessary, see [IModelConnection.SubCategoriesCache.load]($frontend)*/\r\n categoryIdsResult?: SubCategoryResultRow[];\r\n}\r\n\r\n/** Returned from [IModelDb.Views.getViewStateData]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewStateProps {\r\n viewDefinitionProps: ViewDefinitionProps;\r\n categorySelectorProps: CategorySelectorProps;\r\n modelSelectorProps?: ModelSelectorProps;\r\n displayStyleProps: DisplayStyleProps;\r\n /** Sheet-specific properties, if this is a view of a [SheetModel]($backend). */\r\n sheetProps?: SheetProps;\r\n /** The Ids of the [ViewAttachment]($backend)s contained within the [SheetModel]($backend), if this is a sheet view. */\r\n sheetAttachments?: Id64Array;\r\n /** For a [DrawingViewState]($frontend), the extents of the [DrawingModel]($backend), used for determining the upper limits of the view's extents. */\r\n modelExtents?: Range3dProps;\r\n /** Information about the [SectionDrawing]($backend) relevant to displaying a drawing view. */\r\n sectionDrawing?: SectionDrawingViewProps;\r\n}\r\n\r\n/** Options for loading a [[ViewStateProps]] via [IModelConnection.Views.load]($frontend) or [IModelDb.Views.getViewStateData]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewStateLoadProps {\r\n /** Options for loading the view's [[DisplayStyleProps]]. */\r\n displayStyle?: DisplayStyleLoadProps;\r\n\r\n /**\r\n * bindings for query-based selectors\r\n * @beta\r\n */\r\n queryBindings?: {\r\n modelSelector?: ViewStoreRpc.QueryBindings;\r\n categorySelector?: ViewStoreRpc.QueryBindings;\r\n };\r\n}\r\n\r\n/** Properties that define a ModelSelector\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelSelectorProps extends DefinitionElementProps {\r\n models: Id64Array;\r\n}\r\n\r\n/** Properties that define a CategorySelector\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CategorySelectorProps extends DefinitionElementProps {\r\n categories: Id64Array;\r\n}\r\n\r\n/** Parameters for performing a query on [ViewDefinition]($backend) classes.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewQueryParams extends EntityQueryParams {\r\n wantPrivate?: boolean;\r\n}\r\n\r\n/** Parameters used to construct a ViewDefinition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinitionProps extends DefinitionElementProps {\r\n categorySelectorId: ViewIdString;\r\n displayStyleId: ViewIdString;\r\n description?: string;\r\n jsonProperties?: {\r\n /** Additional properties of the view. */\r\n viewDetails?: ViewDetailsProps;\r\n };\r\n}\r\n\r\n/** Parameters to construct a ViewDefinition3d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinition3dProps extends ViewDefinitionProps {\r\n /** if true, camera is valid. */\r\n cameraOn: boolean;\r\n /** The lower left back corner of the view frustum. */\r\n origin: XYZProps;\r\n /** The extent of the view frustum. */\r\n extents: XYZProps;\r\n /** Rotation of the view frustum (could be undefined if going Matrix3d -> YawPitchRoll). */\r\n angles?: YawPitchRollProps;\r\n /** The camera used for this view. */\r\n camera: CameraProps;\r\n jsonProperties?: {\r\n /** Additional properties of the view. */\r\n viewDetails?: ViewDetails3dProps;\r\n };\r\n}\r\n\r\n/** Parameters to construct a SpatialViewDefinition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SpatialViewDefinitionProps extends ViewDefinition3dProps {\r\n modelSelectorId: ViewIdString;\r\n}\r\n\r\n/** Parameters used to construct a ViewDefinition2d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinition2dProps extends ViewDefinitionProps {\r\n baseModelId: Id64String;\r\n origin: XYProps;\r\n delta: XYProps;\r\n angle: AngleProps;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystemProps extends ElementProps {\r\n type?: number;\r\n description?: string;\r\n}\r\n\r\n/** Properties of AuxCoordSystem2d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystem2dProps extends AuxCoordSystemProps {\r\n /** Origin of the AuxCoordSystem2d */\r\n origin?: XYProps;\r\n /** Rotation angle */\r\n angle?: AngleProps;\r\n}\r\n\r\n/** Properties of AuxCoordSystem3d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystem3dProps extends AuxCoordSystemProps {\r\n /** Origin of the AuxCoordSystem3d */\r\n origin?: XYZProps;\r\n /** Yaw angle */\r\n yaw?: AngleProps;\r\n /** Pitch angle */\r\n pitch?: AngleProps;\r\n /** Roll angle */\r\n roll?: AngleProps;\r\n}\r\n\r\n/**\r\n * Access to a ViewStore from the frontend.\r\n * @beta\r\n */\r\nexport namespace ViewStoreRpc {\r\n\r\n /**\r\n * Version of the Rpc interface. If any methods or interfaces of this API change, this number should\r\n * be incremented according to the rules of semantic versioning. See .\\rpc\\README-RpcInterfaceVersioning.md for more information.\r\n * @internal\r\n */\r\n export const version = \"4.0.0\" as const;\r\n\r\n /** an Id of a View, DisplayStyle, ModelSelector, CategorySelector, or Timeline in a ViewStore.\r\n * Will be a base-36 number with a leading \"@\".\r\n * @public\r\n */\r\n export type IdString = string;\r\n\r\n /**\r\n * A string identifying a group. This may either be a \"group name path\" or the RowString of a group (e.g. either \"group1/design/issues\" or \"@4e3\")\r\n * The syntax is not ambiguous because ViewStoreIdStrings always start with \"@\" and Group names can never contain \"@\".\r\n */\r\n export type ViewGroupSpec = IdString | ViewGroupPath;\r\n\r\n /** The name for a view. */\r\n export type ViewName = string;\r\n\r\n /** The name for a Tag. */\r\n export type TagName = string;\r\n\r\n /** The name of an \"owner\". Should come from the authentication system, so it will be guaranteed unique.\r\n * This name should be chosen by the user rather than their email address.\r\n */\r\n export type OwnerName = string;\r\n\r\n /** The path name of a view group (e.g. \"group1/design/issues\"). Does not include the \"root\" group. */\r\n export type ViewGroupPath = string;\r\n\r\n /** The name for a view group. */\r\n export type ViewGroupName = string;\r\n\r\n /** The name for a view group. */\r\n export type ClassFullName = string;\r\n\r\n /** Determine if a string is an Id of an entry in a ViewStore (base-36 integer with a leading \"@\") */\r\n export const isViewStoreId = (id?: ViewIdString) => true === id?.startsWith(\"@\");\r\n\r\n /** Parameters for querying for views in a ViewStore. */\r\n export interface QueryParams {\r\n /** a list of classFullNames to accept. If not present, all classes are returned. */\r\n readonly classNames?: ClassFullName[];\r\n /** Optional \"LIMIT\" clause to limit the number of views returned. */\r\n readonly limit?: number;\r\n /** Optional \"OFFSET\" clause. Only valid if Limit is also present. */\r\n readonly offset?: number;\r\n /** A string to filter view names. May include wildcards if the `nameCompare` uses LIKE or GLOB (see SQLite documentation for LIKE and GLOB). */\r\n readonly nameSearch?: string;\r\n /** The comparison operator for `nameSearch`. Default is `=` */\r\n readonly nameCompare?: \"GLOB\" | \"LIKE\" | \"NOT GLOB\" | \"NOT LIKE\" | \"=\" | \"<\" | \">\";\r\n /* the Id of the view group to query. If not present, the root group is used. There is no way to query for views from multiple view groups in one request. */\r\n readonly group?: IdString;\r\n /** A list of tags to filter views. If present, only views that have one or more of the tags will be returned. */\r\n readonly tags?: TagName[];\r\n /* The name of an owner for private views. If present, private views owned by the owner will also be returned. Shared views are always returned. */\r\n readonly owner?: OwnerName;\r\n }\r\n\r\n /** Parameters for specifying a Query to select Categories or Models. */\r\n export interface SelectorQuery {\r\n /**\r\n * The full ClassName from which to select. If this SelectorQuery is for Categories, this must be or derive from \"BisCore:Category\".\r\n * If this SelectorQuery is for Models, this must be or derive from \"BisCore:Model\".\r\n */\r\n from: ClassFullName;\r\n /** If true, only return instances of `from`. Otherwise, return instances of `from` and any subclasses of `from`. */\r\n only?: boolean;\r\n /**\r\n * filter for query. If present, only instances of `from` that satisfy the filter will be returned.\r\n * If not supplied, all instances of `from` are returned.\r\n * @note\r\n * This value is used into the ECQuery:`SELECT ECInstanceId FROM ${query.from} WHERE ${query.where}`.\r\n */\r\n where?: string;\r\n /** List of Model or Category ids to add to the query results.\r\n * @note This is only valid if there is a `where` clause. Otherwise all instances of `from` will be returned so there is no value in adding ids.\r\n */\r\n adds?: Id64Array | CompressedId64Set;\r\n /** List of Model or Category Ids to remove from the query results. */\r\n removes?: Id64Array | CompressedId64Set;\r\n }\r\n\r\n /** A Model or Category selector may either be a query or a list of Ids. */\r\n export type SelectorProps = { query: SelectorQuery, ids?: never } | { query?: never, ids: Id64Array | CompressedId64Set };\r\n\r\n /** Information about a View in a ViewStore. */\r\n export interface ViewInfo {\r\n /** The Id of the view. */\r\n id: IdString;\r\n /** The name of the view. */\r\n name?: ViewName;\r\n /** The name of the owner of the view. */\r\n owner?: OwnerName;\r\n /** The className of the view. */\r\n className: ClassFullName;\r\n /** The Id of the view group containing the view. */\r\n groupId: IdString;\r\n /** If true, the view is private (unshared) and will only be returned by queries that specify the owner's name. */\r\n isPrivate: boolean;\r\n /** The Id of a ModelSelector, if the view has one. */\r\n modelSelectorId?: IdString;\r\n /** The Id of the CategorySelector for this view. */\r\n categorySelectorId: IdString;\r\n /** The Id of a DisplayStyle for the view. */\r\n displayStyleId: IdString;\r\n /** a list of tags for the view. */\r\n tags?: TagName[];\r\n }\r\n\r\n /** Information about a ViewGroup in a ViewStore. */\r\n export interface ViewGroupInfo {\r\n /** The Id of this view group. */\r\n id: IdString;\r\n /** The name of this view group. */\r\n name: ViewGroupName;\r\n /** The Id of the parent of this view group. If undefined, this is the root group. */\r\n parent?: IdString;\r\n /** The Id of the default view for this view group. */\r\n defaultView?: IdString;\r\n }\r\n\r\n /** Arguments for adding a new view to a ViewStore. */\r\n export interface AddViewArgs {\r\n /** the properties of the ViewDefinition for the new view. */\r\n readonly viewDefinition: ViewDefinitionProps;\r\n\r\n /**\r\n * The properties of a category selector for the new view.\r\n * @note This value is only used, and should only be present if `viewDefinition.categorySelectorId` **not** a valid\r\n * `IdString`. In that case, a new category selector will be created with these properties and its Id will be used.\r\n * Otherwise, the categorySelectorId from the ViewDefinition is used. If it does not represent a valid category\r\n * selector, an error is thrown.\r\n */\r\n readonly categorySelectorProps?: CategorySelectorProps;\r\n\r\n /** The properties of a model selector for the new view.\r\n * @note This value is only used, and should only be present if `viewDefinition.modelSelectorId` **not** a valid\r\n * `IdString`. In that case, a new model selector will be created with these properties and its Id will be used.\r\n * Otherwise, the modelSelectorId from the ViewDefinition is used. If it does not represent a valid model selector,\r\n * an error is thrown.\r\n */\r\n readonly modelSelectorProps?: ModelSelectorProps;\r\n\r\n /** The properties of a display style for the new view.\r\n * @note This value is only used, and should only be present if `viewDefinition.displayStyleId` **not** a valid\r\n * `IdString`. In that case, a new display style will be created with these properties and its Id will be used.\r\n * Otherwise, the displayStyleId from the ViewDefinition is used. If it does not represent a valid display style, an\r\n * error is thrown.\r\n */\r\n readonly displayStyleProps?: DisplayStyleProps;\r\n\r\n /* the owner of the view. Must be present if isPrivate is true. */\r\n readonly owner?: OwnerName;\r\n\r\n /* the Id of the view group for the view. If not present, the view is added to the root group. */\r\n readonly group?: IdString;\r\n\r\n /* if true, the view is private (unshared). */\r\n readonly isPrivate?: boolean;\r\n\r\n /* an optional list of tags for the view. */\r\n readonly tags?: TagName[];\r\n\r\n /** optional thumbnail for the view. */\r\n readonly thumbnail?: ThumbnailProps;\r\n }\r\n\r\n /** Argument for finding a category selector, model selector, display style, or timeline by name or Id. */\r\n export type NameOrId = { name: string, id?: never } | { id: IdString, name?: never };\r\n\r\n /** Bindings for parameterized values in where clause of SelectorQuery\r\n * @see[[ECSqlStatement.bindValues]]\r\n */\r\n export interface QueryBindings {\r\n bindings?: any[] | object;\r\n }\r\n\r\n /**\r\n * Methods for reading from a ViewStore via Rpc from a frontend via `IModelConnection.views.viewsStoreReader`. These\r\n * methods use the *current* ViewStore for the iModel, and attempt to load the default ViewStore if no ViewStore is\r\n * currently loaded. They will throw exceptions if the request cannot be fulfilled.\r\n * @note The user's accessToken is validated against the ViewStore for every request. For each of these methods, the\r\n * user only needs read permission to the ViewStore.\r\n */\r\n export interface Reader {\r\n /** Find all views owned by the supplied owner name. */\r\n findViewsByOwner(args: { owner: OwnerName }): Promise<ViewInfo[]>;\r\n\r\n /** Get a category selector by Id. Throws if it does not exist. */\r\n getCategorySelector(args: NameOrId & QueryBindings): Promise<CategorySelectorProps>;\r\n\r\n /** Get a display style by Id. Throws if it does not exist. */\r\n getDisplayStyle(args: NameOrId & { opts?: DisplayStyleLoadProps }): Promise<DisplayStyleProps>;\r\n\r\n /** Get a model selector by Id. Throws if it does not exist. */\r\n getModelSelector(args: NameOrId & QueryBindings): Promise<ModelSelectorProps>;\r\n\r\n /** Get a thumbnail for a view. */\r\n getThumbnail(args: { viewId: IdString }): Promise<ThumbnailProps | undefined>;\r\n\r\n /** Get a render timeline by Id. Throws if it does not exist. */\r\n getTimeline(args: NameOrId): Promise<RenderTimelineProps>;\r\n\r\n /** Get a view by name. The name can include the *view group path*, if no `groupId` is supplied. */\r\n getViewByName(arg: { name: ViewName, groupId?: IdString }): Promise<ViewInfo | undefined>;\r\n\r\n /** Get a view definition by viewId. Throws if it does not exist. */\r\n getViewDefinition(args: { viewId: IdString }): Promise<ViewDefinitionProps>;\r\n\r\n /** get the properties of a ViewGroup by id. This will include the defaultViewId, if one exists. */\r\n getViewGroupInfo(args: { groupId?: IdString }): Promise<ViewGroupInfo | undefined>;\r\n\r\n /** Get a list of ViewGroups that are children of the supplied parent. If no parent is supplied, the root group is used.\r\n * Each entry in the list includes the id and name of the ViewGroup.\r\n */\r\n getViewGroups(args: { parent?: ViewGroupSpec }): Promise<{ id: IdString, name: string }[]>;\r\n\r\n /** Get the ViewInfo for a view by Id. Returns undefined if the view does not exist. */\r\n getViewInfo(args: { viewId: IdString }): Promise<ViewInfo | undefined>;\r\n\r\n /** Query for a list of ViewInfos for views that match the supplied [[QueryParams]].\r\n * @note The array will be sorted by name, ascending. To limit the size of the array, supply `limit` and `offset` in the QueryParams.\r\n */\r\n queryViews(queryParams: QueryParams): Promise<ViewInfo[]>;\r\n }\r\n\r\n /**\r\n * Methods for writing to a ViewStore via Rpc from a frontend via `IModelConnection.views.viewsStoreWriter`. These\r\n * methods use the *current* ViewStore for the iModel, and attempt to load the default ViewStore if no ViewStore is\r\n * currently loaded. They will throw exceptions if the request cannot be fulfilled.\r\n * @note The user's accessToken is validated against the ViewStore for every request. For each of these methods, the\r\n * user must have write permission to the ViewStore.\r\n */\r\n export interface Writer {\r\n /**\r\n * Add a category selector to a ViewStore.\r\n * @returns The IdString of the new category selector.\r\n */\r\n addCategorySelector(args: { name?: string, selector: SelectorProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /** Add a display style to a ViewStore.\r\n * @returns The IdString of the new display style.\r\n */\r\n addDisplayStyle(args: { name?: string, className: string, settings: DisplayStyleSettingsProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /**\r\n * Add a model selector to a ViewStore.\r\n * @returns The IdString of the new model selector.\r\n */\r\n addModelSelector(args: { name?: string, selector: SelectorProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /**\r\n * Add a thumbnail for a view. If the view already has a thumbnail, it is replaced.\r\n * If a view is deleted, its thumbnail is also deleted.\r\n * @note The thumbnail must be a valid image in PNG or JPEG format.\r\n */\r\n addOrReplaceThumbnail(args: { viewId: IdString, thumbnail: ThumbnailProps }): Promise<void>;\r\n\r\n /** Add tags to a view. If the view already has tags, the new tags are appended to the existing tags. */\r\n addTagsToView(args: { viewId: IdString, tags: TagName[] }): Promise<void>;\r\n\r\n /** Add a render timeline to a ViewStore.\r\n * @returns The IdString of the new timeline.\r\n */\r\n addTimeline(args: { name?: string, timeline: RenderSchedule.ScriptProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /** Add a view to a ViewStore. If no group is supplied, the new view is added to the root view group.\r\n * @returns The IdString of the new view\r\n */\r\n addView(args: AddViewArgs): Promise<IdString>;\r\n\r\n /** Add a view group to a ViewStore. If no parent is supplied, the new group is added to the root view group.\r\n * @returns the IdString of new view group\r\n */\r\n addViewGroup(args: { name: string, parentId?: IdString, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /** Change the default view for a view group. If no group is supplied, this changes the default view for the root view group. */\r\n changeDefaultViewId(args: { defaultView: IdString, group?: ViewGroupSpec }): Promise<void>;\r\n\r\n /** Delete the thumbnail for a view. */\r\n deleteThumbnail(args: { viewId: IdString }): Promise<void>;\r\n\r\n /**\r\n * Delete a view from a ViewStore. If this is the default view for a view group, it cannot be deleted until another\r\n * view is set as the default.\r\n * @note If this view references a category selector, model selector, or display style that is not referenced by any\r\n * other view, *and do not have a name*, they will each also be deleted. If the view has a thumbnail, it is also\r\n * deleted.\r\n */\r\n deleteView(args: { viewId: IdString }): Promise<void>;\r\n\r\n /** Delete a view group from a ViewStore. This will also delete all views in the group. */\r\n deleteViewGroup(args: { name: ViewGroupSpec }): Promise<void>;\r\n\r\n /** Delete a display style from a ViewStore. If the display style is referenced by any view, it cannot be deleted\r\n * and an exception will be thrown.\r\n */\r\n deleteDisplayStyle(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a model selector from a ViewStore. If the model selector is referenced by any view, it cannot be deleted\r\n * and an exception will be thrown. */\r\n deleteModelSelector(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a category selector from a ViewStore. If the category selector is referenced by any view, it cannot be\r\n * deleted and an exception will be thrown.\r\n */\r\n deleteCategorySelector(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a render timeline from a ViewStore. */\r\n deleteTimeline(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a tag. This removes it from all views where it was used. */\r\n deleteTag(args: { name: TagName }): Promise<void>;\r\n\r\n /** remove a tag from a view. */\r\n removeTagFromView(args: { viewId: IdString, tag: TagName }): Promise<void>;\r\n\r\n /** Update the properties of a category selector. */\r\n updateCategorySelector(args: NameOrId & { selector: SelectorProps }): Promise<void>;\r\n\r\n /** Update the properties of a display style. */\r\n updateDisplayStyle(args: NameOrId & { className: string, settings: DisplayStyleSettingsProps }): Promise<void>;\r\n\r\n /** Update the properties of a model selector. */\r\n updateModelSelector(args: NameOrId & { selector: SelectorProps }): Promise<void>;\r\n\r\n /** Update the properties of a render timeline. */\r\n updateTimeline(args: NameOrId & { timeline: RenderSchedule.ScriptProps }): Promise<void>;\r\n\r\n /** Update the properties of a view definition. */\r\n updateViewDefinition(args: { viewId: IdString, viewDefinition: ViewDefinitionProps }): Promise<void>;\r\n\r\n /** Change a view from shared to private, or vice versa. If changing to private, the owner must be supplied. */\r\n updateViewShared(arg: { viewId: IdString, isShared: boolean, owner?: string }): Promise<void>;\r\n\r\n /** Set the name of a category selector. */\r\n renameCategorySelector(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a display style. */\r\n renameDisplayStyle(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a model selector. */\r\n renameModelSelector(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a render timeline. */\r\n renameTimeline(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a view. */\r\n renameView(args: { viewId: IdString, name: string }): Promise<void>;\r\n\r\n /** Set the name of a view group. */\r\n renameViewGroup(args: { groupId: IdString, name: string }): Promise<void>;\r\n\r\n /** rename an existing tag. */\r\n renameTag(args: { oldName: TagName, newName: TagName }): Promise<void>;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ViewProps.js","sourceRoot":"","sources":["../../src/ViewProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAgPH;;;GAGG;AACH,IAAiB,YAAY,CA0W5B;AA1WD,WAAiB,YAAY;IAE3B;;;;OAIG;IACU,oBAAO,GAAG,OAAO,CAAC;IAkC/B,qGAAqG;IACxF,0BAAa,GAAG,CAAC,EAAiB,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;AAgUnF,CAAC,EA1WgB,YAAY,4BAAZ,YAAY,QA0W5B","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 Views\r\n */\r\n\r\nimport { CompressedId64Set, Id64Array, Id64String } from \"@itwin/core-bentley\";\r\nimport { AngleProps, Range3dProps, TransformProps, XYProps, XYZProps, YawPitchRollProps } from \"@itwin/core-geometry\";\r\nimport { CameraProps } from \"./Camera\";\r\nimport { DisplayStyleProps, DisplayStyleSettingsProps } from \"./DisplayStyleSettings\";\r\nimport { DefinitionElementProps, DisplayStyleLoadProps, ElementProps, RenderTimelineProps, SheetProps, ViewAttachmentProps } from \"./ElementProps\";\r\nimport { EntityQueryParams } from \"./EntityProps\";\r\nimport { ModelProps } from \"./ModelProps\";\r\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\r\nimport { ViewDetails3dProps, ViewDetailsProps } from \"./ViewDetails\";\r\nimport { ThumbnailProps } from \"./Thumbnail\";\r\nimport { RenderSchedule } from \"./RenderSchedule\";\r\n\r\n/** The id of either an element or an entry in a ViewStore.\r\n * @public\r\n */\r\nexport type ViewIdString = Id64String; // should also include ViewStoreRpc.IdString when that's @public\r\n\r\n/** As part of a [[ViewStateProps]], describes the [[SpatialViewDefinition]] from which a [SectionDrawing]($backend) was generated.\r\n * @see [[SectionDrawingProps]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SectionDrawingViewProps {\r\n /** The Id of the spatial view from which the SectionDrawing was generated. */\r\n spatialView: Id64String;\r\n /** If true, the spatial view should be displayed in the context of the drawing view. */\r\n displaySpatialView: boolean;\r\n /** Transform from drawing coordinates to spatial coordinates. If undefined, use identity transform. */\r\n drawingToSpatialTransform?: TransformProps;\r\n}\r\n\r\n/** The response props from the getCustomViewState3dData RPC endpoint\r\n * @internal\r\n */\r\nexport interface CustomViewState3dProps {\r\n modelIds: CompressedId64Set;\r\n modelExtents: Range3dProps;\r\n categoryIds: CompressedId64Set;\r\n}\r\n\r\n/**\r\n * The options passed to the getCustomViewState3dData RPC endpoint.\r\n * @internal\r\n */\r\nexport interface CustomViewState3dCreatorOptions {\r\n modelIds?: CompressedId64Set;\r\n}\r\n\r\n/**\r\n * A result row from querying for subcategories\r\n * @internal\r\n */\r\nexport interface SubCategoryResultRow {\r\n parentId: Id64String;\r\n id: Id64String;\r\n appearance: SubCategoryAppearance.Props;\r\n}\r\n\r\n/**\r\n * Request props for the hydrateViewState RPC endpoint.\r\n * @internal\r\n */\r\nexport interface HydrateViewStateRequestProps {\r\n acsId?: string;\r\n notLoadedModelSelectorStateModels?: CompressedId64Set;\r\n /** @deprecated in 3.x. If loading categoryIds is necessary, see [IModelConnection.SubCategoriesCache.load]($frontend)*/\r\n notLoadedCategoryIds?: CompressedId64Set;\r\n sheetViewAttachmentIds?: CompressedId64Set;\r\n viewStateLoadProps?: ViewStateLoadProps;\r\n baseModelId?: Id64String;\r\n spatialViewId?: Id64String;\r\n}\r\n\r\n/** Response props from the hydrateViewState RPC endpoint.\r\n * @internal\r\n */\r\nexport interface HydrateViewStateResponseProps {\r\n acsElementProps?: ElementProps;\r\n modelSelectorStateModels?: ModelProps[];\r\n // cast this to viewAttachmentInfo[] on the frontend.\r\n sheetViewAttachmentProps?: ViewAttachmentProps[];\r\n sheetViewViews?: (ViewStateProps | undefined)[];\r\n baseModelProps?: ModelProps;\r\n spatialViewProps?: ViewStateProps;\r\n /** @deprecated in 3.x. If loading categoryIds is necessary, see [IModelConnection.SubCategoriesCache.load]($frontend)*/\r\n categoryIdsResult?: SubCategoryResultRow[];\r\n}\r\n\r\n/** Returned from [IModelDb.Views.getViewStateData]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewStateProps {\r\n viewDefinitionProps: ViewDefinitionProps;\r\n categorySelectorProps: CategorySelectorProps;\r\n modelSelectorProps?: ModelSelectorProps;\r\n displayStyleProps: DisplayStyleProps;\r\n /** Sheet-specific properties, if this is a view of a [SheetModel]($backend). */\r\n sheetProps?: SheetProps;\r\n /** The Ids of the [ViewAttachment]($backend)s contained within the [SheetModel]($backend), if this is a sheet view. */\r\n sheetAttachments?: Id64Array;\r\n /** For a [DrawingViewState]($frontend), the extents of the [DrawingModel]($backend), used for determining the upper limits of the view's extents. */\r\n modelExtents?: Range3dProps;\r\n /** Information about the [SectionDrawing]($backend) relevant to displaying a drawing view. */\r\n sectionDrawing?: SectionDrawingViewProps;\r\n}\r\n\r\n/** Options for loading a [[ViewStateProps]] via [IModelConnection.Views.load]($frontend) or [IModelDb.Views.getViewStateData]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewStateLoadProps {\r\n /** Options for loading the view's [[DisplayStyleProps]]. */\r\n displayStyle?: DisplayStyleLoadProps;\r\n\r\n /**\r\n * bindings for query-based selectors\r\n * @beta\r\n */\r\n queryBindings?: {\r\n modelSelector?: ViewStoreRpc.QueryBindings;\r\n categorySelector?: ViewStoreRpc.QueryBindings;\r\n };\r\n}\r\n\r\n/** Properties that define a ModelSelector\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelSelectorProps extends DefinitionElementProps {\r\n models: Id64Array;\r\n}\r\n\r\n/** Properties that define a CategorySelector\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CategorySelectorProps extends DefinitionElementProps {\r\n categories: Id64Array;\r\n}\r\n\r\n/** Parameters for performing a query on [ViewDefinition]($backend) classes.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewQueryParams extends EntityQueryParams {\r\n wantPrivate?: boolean;\r\n}\r\n\r\n/** Parameters used to construct a ViewDefinition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinitionProps extends DefinitionElementProps {\r\n categorySelectorId: ViewIdString;\r\n displayStyleId: ViewIdString;\r\n description?: string;\r\n jsonProperties?: {\r\n /** Additional properties of the view. */\r\n viewDetails?: ViewDetailsProps;\r\n };\r\n}\r\n\r\n/** Parameters to construct a ViewDefinition3d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinition3dProps extends ViewDefinitionProps {\r\n /** if true, camera is valid. */\r\n cameraOn: boolean;\r\n /** The lower left back corner of the view frustum. */\r\n origin: XYZProps;\r\n /** The extent of the view frustum. */\r\n extents: XYZProps;\r\n /** Rotation of the view frustum (could be undefined if going Matrix3d -> YawPitchRoll). */\r\n angles?: YawPitchRollProps;\r\n /** The camera used for this view. */\r\n camera: CameraProps;\r\n jsonProperties?: {\r\n /** Additional properties of the view. */\r\n viewDetails?: ViewDetails3dProps;\r\n };\r\n}\r\n\r\n/** Parameters to construct a SpatialViewDefinition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SpatialViewDefinitionProps extends ViewDefinition3dProps {\r\n modelSelectorId: ViewIdString;\r\n}\r\n\r\n/** Parameters used to construct a ViewDefinition2d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinition2dProps extends ViewDefinitionProps {\r\n baseModelId: Id64String;\r\n origin: XYProps;\r\n delta: XYProps;\r\n angle: AngleProps;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystemProps extends ElementProps {\r\n type?: number;\r\n description?: string;\r\n}\r\n\r\n/** Properties of AuxCoordSystem2d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystem2dProps extends AuxCoordSystemProps {\r\n /** Origin of the AuxCoordSystem2d */\r\n origin?: XYProps;\r\n /** Rotation angle */\r\n angle?: AngleProps;\r\n}\r\n\r\n/** Properties of AuxCoordSystem3d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystem3dProps extends AuxCoordSystemProps {\r\n /** Origin of the AuxCoordSystem3d */\r\n origin?: XYZProps;\r\n /** Yaw angle */\r\n yaw?: AngleProps;\r\n /** Pitch angle */\r\n pitch?: AngleProps;\r\n /** Roll angle */\r\n roll?: AngleProps;\r\n}\r\n\r\n/**\r\n * Access to a ViewStore from the frontend.\r\n * @beta\r\n */\r\nexport namespace ViewStoreRpc {\r\n\r\n /**\r\n * Version of the Rpc interface. If any methods or interfaces of this API change, this number should\r\n * be incremented according to the rules of semantic versioning. See .\\rpc\\README-RpcInterfaceVersioning.md for more information.\r\n * @internal\r\n */\r\n export const version = \"4.0.0\";\r\n\r\n /** an Id of a View, DisplayStyle, ModelSelector, CategorySelector, or Timeline in a ViewStore.\r\n * Will be a base-36 number with a leading \"@\".\r\n * @public\r\n */\r\n export type IdString = string;\r\n\r\n /**\r\n * A string identifying a group. This may either be a \"group name path\" or the RowString of a group (e.g. either \"group1/design/issues\" or \"@4e3\")\r\n * The syntax is not ambiguous because ViewStoreIdStrings always start with \"@\" and Group names can never contain \"@\".\r\n */\r\n export type ViewGroupSpec = IdString | ViewGroupPath;\r\n\r\n /** The name for a view. */\r\n export type ViewName = string;\r\n\r\n /** The name for a Tag. */\r\n export type TagName = string;\r\n\r\n /** The name of an \"owner\". Should come from the authentication system, so it will be guaranteed unique.\r\n * This name should be chosen by the user rather than their email address.\r\n */\r\n export type OwnerName = string;\r\n\r\n /** The path name of a view group (e.g. \"group1/design/issues\"). Does not include the \"root\" group. */\r\n export type ViewGroupPath = string;\r\n\r\n /** The name for a view group. */\r\n export type ViewGroupName = string;\r\n\r\n /** The name for a view group. */\r\n export type ClassFullName = string;\r\n\r\n /** Determine if a string is an Id of an entry in a ViewStore (base-36 integer with a leading \"@\") */\r\n export const isViewStoreId = (id?: ViewIdString) => true === id?.startsWith(\"@\");\r\n\r\n /** Parameters for querying for views in a ViewStore. */\r\n export interface QueryParams {\r\n /** a list of classFullNames to accept. If not present, all classes are returned. */\r\n readonly classNames?: ClassFullName[];\r\n /** Optional \"LIMIT\" clause to limit the number of views returned. */\r\n readonly limit?: number;\r\n /** Optional \"OFFSET\" clause. Only valid if Limit is also present. */\r\n readonly offset?: number;\r\n /** A string to filter view names. May include wildcards if the `nameCompare` uses LIKE or GLOB (see SQLite documentation for LIKE and GLOB). */\r\n readonly nameSearch?: string;\r\n /** The comparison operator for `nameSearch`. Default is `=` */\r\n readonly nameCompare?: \"GLOB\" | \"LIKE\" | \"NOT GLOB\" | \"NOT LIKE\" | \"=\" | \"<\" | \">\";\r\n /* the Id of the view group to query. If not present, the root group is used. There is no way to query for views from multiple view groups in one request. */\r\n readonly group?: IdString;\r\n /** A list of tags to filter views. If present, only views that have one or more of the tags will be returned. */\r\n readonly tags?: TagName[];\r\n /* The name of an owner for private views. If present, private views owned by the owner will also be returned. Shared views are always returned. */\r\n readonly owner?: OwnerName;\r\n }\r\n\r\n /** Parameters for specifying a Query to select Categories or Models. */\r\n export interface SelectorQuery {\r\n /**\r\n * The full ClassName from which to select. If this SelectorQuery is for Categories, this must be or derive from \"BisCore:Category\".\r\n * If this SelectorQuery is for Models, this must be or derive from \"BisCore:Model\".\r\n */\r\n from: ClassFullName;\r\n /** If true, only return instances of `from`. Otherwise, return instances of `from` and any subclasses of `from`. */\r\n only?: boolean;\r\n /**\r\n * filter for query. If present, only instances of `from` that satisfy the filter will be returned.\r\n * If not supplied, all instances of `from` are returned.\r\n * @note\r\n * This value is used into the ECQuery:`SELECT ECInstanceId FROM ${query.from} WHERE ${query.where}`.\r\n */\r\n where?: string;\r\n /** List of Model or Category ids to add to the query results.\r\n * @note This is only valid if there is a `where` clause. Otherwise all instances of `from` will be returned so there is no value in adding ids.\r\n */\r\n adds?: Id64Array | CompressedId64Set;\r\n /** List of Model or Category Ids to remove from the query results. */\r\n removes?: Id64Array | CompressedId64Set;\r\n }\r\n\r\n /** A Model or Category selector may either be a query or a list of Ids. */\r\n export type SelectorProps = { query: SelectorQuery, ids?: never } | { query?: never, ids: Id64Array | CompressedId64Set };\r\n\r\n /** Information about a View in a ViewStore. */\r\n export interface ViewInfo {\r\n /** The Id of the view. */\r\n id: IdString;\r\n /** The name of the view. */\r\n name?: ViewName;\r\n /** The name of the owner of the view. */\r\n owner?: OwnerName;\r\n /** The className of the view. */\r\n className: ClassFullName;\r\n /** The Id of the view group containing the view. */\r\n groupId: IdString;\r\n /** If true, the view is private (unshared) and will only be returned by queries that specify the owner's name. */\r\n isPrivate: boolean;\r\n /** The Id of a ModelSelector, if the view has one. */\r\n modelSelectorId?: IdString;\r\n /** The Id of the CategorySelector for this view. */\r\n categorySelectorId: IdString;\r\n /** The Id of a DisplayStyle for the view. */\r\n displayStyleId: IdString;\r\n /** a list of tags for the view. */\r\n tags?: TagName[];\r\n }\r\n\r\n /** Information about a ViewGroup in a ViewStore. */\r\n export interface ViewGroupInfo {\r\n /** The Id of this view group. */\r\n id: IdString;\r\n /** The name of this view group. */\r\n name: ViewGroupName;\r\n /** The Id of the parent of this view group. If undefined, this is the root group. */\r\n parent?: IdString;\r\n /** The Id of the default view for this view group. */\r\n defaultView?: IdString;\r\n }\r\n\r\n /** Arguments for adding a new view to a ViewStore. */\r\n export interface AddViewArgs {\r\n /** the properties of the ViewDefinition for the new view. */\r\n readonly viewDefinition: ViewDefinitionProps;\r\n\r\n /**\r\n * The properties of a category selector for the new view.\r\n * @note This value is only used, and should only be present if `viewDefinition.categorySelectorId` **not** a valid\r\n * `IdString`. In that case, a new category selector will be created with these properties and its Id will be used.\r\n * Otherwise, the categorySelectorId from the ViewDefinition is used. If it does not represent a valid category\r\n * selector, an error is thrown.\r\n */\r\n readonly categorySelectorProps?: CategorySelectorProps;\r\n\r\n /** The properties of a model selector for the new view.\r\n * @note This value is only used, and should only be present if `viewDefinition.modelSelectorId` **not** a valid\r\n * `IdString`. In that case, a new model selector will be created with these properties and its Id will be used.\r\n * Otherwise, the modelSelectorId from the ViewDefinition is used. If it does not represent a valid model selector,\r\n * an error is thrown.\r\n */\r\n readonly modelSelectorProps?: ModelSelectorProps;\r\n\r\n /** The properties of a display style for the new view.\r\n * @note This value is only used, and should only be present if `viewDefinition.displayStyleId` **not** a valid\r\n * `IdString`. In that case, a new display style will be created with these properties and its Id will be used.\r\n * Otherwise, the displayStyleId from the ViewDefinition is used. If it does not represent a valid display style, an\r\n * error is thrown.\r\n */\r\n readonly displayStyleProps?: DisplayStyleProps;\r\n\r\n /* the owner of the view. Must be present if isPrivate is true. */\r\n readonly owner?: OwnerName;\r\n\r\n /* the Id of the view group for the view. If not present, the view is added to the root group. */\r\n readonly group?: IdString;\r\n\r\n /* if true, the view is private (unshared). */\r\n readonly isPrivate?: boolean;\r\n\r\n /* an optional list of tags for the view. */\r\n readonly tags?: TagName[];\r\n\r\n /** optional thumbnail for the view. */\r\n readonly thumbnail?: ThumbnailProps;\r\n }\r\n\r\n /** Argument for finding a category selector, model selector, display style, or timeline by name or Id. */\r\n export type NameOrId = { name: string, id?: never } | { id: IdString, name?: never };\r\n\r\n /** Bindings for parameterized values in where clause of SelectorQuery\r\n * @see[[ECSqlStatement.bindValues]]\r\n */\r\n export interface QueryBindings {\r\n bindings?: any[] | object;\r\n }\r\n\r\n /**\r\n * Methods for reading from a ViewStore via Rpc from a frontend via `IModelConnection.views.viewsStoreReader`. These\r\n * methods use the *current* ViewStore for the iModel, and attempt to load the default ViewStore if no ViewStore is\r\n * currently loaded. They will throw exceptions if the request cannot be fulfilled.\r\n * @note The user's accessToken is validated against the ViewStore for every request. For each of these methods, the\r\n * user only needs read permission to the ViewStore.\r\n */\r\n export interface Reader {\r\n /** Find all views owned by the supplied owner name. */\r\n findViewsByOwner(args: { owner: OwnerName }): Promise<ViewInfo[]>;\r\n\r\n /** Get a category selector by Id. Throws if it does not exist. */\r\n getCategorySelector(args: NameOrId & QueryBindings): Promise<CategorySelectorProps>;\r\n\r\n /** Get a display style by Id. Throws if it does not exist. */\r\n getDisplayStyle(args: NameOrId & { opts?: DisplayStyleLoadProps }): Promise<DisplayStyleProps>;\r\n\r\n /** Get a model selector by Id. Throws if it does not exist. */\r\n getModelSelector(args: NameOrId & QueryBindings): Promise<ModelSelectorProps>;\r\n\r\n /** Get a thumbnail for a view. */\r\n getThumbnail(args: { viewId: IdString }): Promise<ThumbnailProps | undefined>;\r\n\r\n /** Get a render timeline by Id. Throws if it does not exist. */\r\n getTimeline(args: NameOrId): Promise<RenderTimelineProps>;\r\n\r\n /** Get a view by name. The name can include the *view group path*, if no `groupId` is supplied. */\r\n getViewByName(arg: { name: ViewName, groupId?: IdString }): Promise<ViewInfo | undefined>;\r\n\r\n /** Get a view definition by viewId. Throws if it does not exist. */\r\n getViewDefinition(args: { viewId: IdString }): Promise<ViewDefinitionProps>;\r\n\r\n /** get the properties of a ViewGroup by id. This will include the defaultViewId, if one exists. */\r\n getViewGroupInfo(args: { groupId?: IdString }): Promise<ViewGroupInfo | undefined>;\r\n\r\n /** Get a list of ViewGroups that are children of the supplied parent. If no parent is supplied, the root group is used.\r\n * Each entry in the list includes the id and name of the ViewGroup.\r\n */\r\n getViewGroups(args: { parent?: ViewGroupSpec }): Promise<{ id: IdString, name: string }[]>;\r\n\r\n /** Get the ViewInfo for a view by Id. Returns undefined if the view does not exist. */\r\n getViewInfo(args: { viewId: IdString }): Promise<ViewInfo | undefined>;\r\n\r\n /** Query for a list of ViewInfos for views that match the supplied [[QueryParams]].\r\n * @note The array will be sorted by name, ascending. To limit the size of the array, supply `limit` and `offset` in the QueryParams.\r\n */\r\n queryViews(queryParams: QueryParams): Promise<ViewInfo[]>;\r\n }\r\n\r\n /**\r\n * Methods for writing to a ViewStore via Rpc from a frontend via `IModelConnection.views.viewsStoreWriter`. These\r\n * methods use the *current* ViewStore for the iModel, and attempt to load the default ViewStore if no ViewStore is\r\n * currently loaded. They will throw exceptions if the request cannot be fulfilled.\r\n * @note The user's accessToken is validated against the ViewStore for every request. For each of these methods, the\r\n * user must have write permission to the ViewStore.\r\n */\r\n export interface Writer {\r\n /**\r\n * Add a category selector to a ViewStore.\r\n * @returns The IdString of the new category selector.\r\n */\r\n addCategorySelector(args: { name?: string, selector: SelectorProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /** Add a display style to a ViewStore.\r\n * @returns The IdString of the new display style.\r\n */\r\n addDisplayStyle(args: { name?: string, className: string, settings: DisplayStyleSettingsProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /**\r\n * Add a model selector to a ViewStore.\r\n * @returns The IdString of the new model selector.\r\n */\r\n addModelSelector(args: { name?: string, selector: SelectorProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /**\r\n * Add a thumbnail for a view. If the view already has a thumbnail, it is replaced.\r\n * If a view is deleted, its thumbnail is also deleted.\r\n * @note The thumbnail must be a valid image in PNG or JPEG format.\r\n */\r\n addOrReplaceThumbnail(args: { viewId: IdString, thumbnail: ThumbnailProps }): Promise<void>;\r\n\r\n /** Add tags to a view. If the view already has tags, the new tags are appended to the existing tags. */\r\n addTagsToView(args: { viewId: IdString, tags: TagName[] }): Promise<void>;\r\n\r\n /** Add a render timeline to a ViewStore.\r\n * @returns The IdString of the new timeline.\r\n */\r\n addTimeline(args: { name?: string, timeline: RenderSchedule.ScriptProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /** Add a view to a ViewStore. If no group is supplied, the new view is added to the root view group.\r\n * @returns The IdString of the new view\r\n */\r\n addView(args: AddViewArgs): Promise<IdString>;\r\n\r\n /** Add a view group to a ViewStore. If no parent is supplied, the new group is added to the root view group.\r\n * @returns the IdString of new view group\r\n */\r\n addViewGroup(args: { name: string, parentId?: IdString, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /** Change the default view for a view group. If no group is supplied, this changes the default view for the root view group. */\r\n changeDefaultViewId(args: { defaultView: IdString, group?: ViewGroupSpec }): Promise<void>;\r\n\r\n /** Delete the thumbnail for a view. */\r\n deleteThumbnail(args: { viewId: IdString }): Promise<void>;\r\n\r\n /**\r\n * Delete a view from a ViewStore. If this is the default view for a view group, it cannot be deleted until another\r\n * view is set as the default.\r\n * @note If this view references a category selector, model selector, or display style that is not referenced by any\r\n * other view, *and do not have a name*, they will each also be deleted. If the view has a thumbnail, it is also\r\n * deleted.\r\n */\r\n deleteView(args: { viewId: IdString }): Promise<void>;\r\n\r\n /** Delete a view group from a ViewStore. This will also delete all views in the group. */\r\n deleteViewGroup(args: { name: ViewGroupSpec }): Promise<void>;\r\n\r\n /** Delete a display style from a ViewStore. If the display style is referenced by any view, it cannot be deleted\r\n * and an exception will be thrown.\r\n */\r\n deleteDisplayStyle(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a model selector from a ViewStore. If the model selector is referenced by any view, it cannot be deleted\r\n * and an exception will be thrown. */\r\n deleteModelSelector(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a category selector from a ViewStore. If the category selector is referenced by any view, it cannot be\r\n * deleted and an exception will be thrown.\r\n */\r\n deleteCategorySelector(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a render timeline from a ViewStore. */\r\n deleteTimeline(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a tag. This removes it from all views where it was used. */\r\n deleteTag(args: { name: TagName }): Promise<void>;\r\n\r\n /** remove a tag from a view. */\r\n removeTagFromView(args: { viewId: IdString, tag: TagName }): Promise<void>;\r\n\r\n /** Update the properties of a category selector. */\r\n updateCategorySelector(args: NameOrId & { selector: SelectorProps }): Promise<void>;\r\n\r\n /** Update the properties of a display style. */\r\n updateDisplayStyle(args: NameOrId & { className: string, settings: DisplayStyleSettingsProps }): Promise<void>;\r\n\r\n /** Update the properties of a model selector. */\r\n updateModelSelector(args: NameOrId & { selector: SelectorProps }): Promise<void>;\r\n\r\n /** Update the properties of a render timeline. */\r\n updateTimeline(args: NameOrId & { timeline: RenderSchedule.ScriptProps }): Promise<void>;\r\n\r\n /** Update the properties of a view definition. */\r\n updateViewDefinition(args: { viewId: IdString, viewDefinition: ViewDefinitionProps }): Promise<void>;\r\n\r\n /** Change a view from shared to private, or vice versa. If changing to private, the owner must be supplied. */\r\n updateViewShared(arg: { viewId: IdString, isShared: boolean, owner?: string }): Promise<void>;\r\n\r\n /** Set the name of a category selector. */\r\n renameCategorySelector(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a display style. */\r\n renameDisplayStyle(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a model selector. */\r\n renameModelSelector(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a render timeline. */\r\n renameTimeline(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a view. */\r\n renameView(args: { viewId: IdString, name: string }): Promise<void>;\r\n\r\n /** Set the name of a view group. */\r\n renameViewGroup(args: { groupId: IdString, name: string }): Promise<void>;\r\n\r\n /** rename an existing tag. */\r\n renameTag(args: { oldName: TagName, newName: TagName }): Promise<void>;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrustumPlanes.js","sourceRoot":"","sources":["../../../src/geometry/FrustumPlanes.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AA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C,MAAM,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAClC,IAAI,GAAG,KAAK,EAAE,EAAE,CAAC;gBACf,uEAAuE;gBACvE,IAAI,EAAE,GAAG,GAAG,EAAE,CAAC;oBACb,OAAO,KAAK,CAAC;gBACf,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,MAAM,WAAW,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC;gBAC7B,IAAI,EAAE,GAAG,GAAG,EAAE,CAAC;oBACb,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBACrC,CAAC;qBAAM,CAAC;oBACN,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;gBACvC,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,KAAK,IAAI,IAAI,CAAC;IACvB,CAAC;CACF;AAxJD,sCAwJC;AAED,0BAA0B;AAC1B,WAAiB,aAAa;IAC5B;;OAEG;IACH,IAAY,WAOX;IAPD,WAAY,WAAW;QACrB,sFAAsF;QACtF,mDAAW,CAAA;QACX,4GAA4G;QAC5G,mDAAW,CAAA;QACX,qFAAqF;QACrF,iDAAU,CAAA;IACZ,CAAC,EAPW,WAAW,GAAX,yBAAW,KAAX,yBAAW,QAOtB;AACH,CAAC,EAZgB,aAAa,6BAAb,aAAa,QAY7B","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 Geometry\r\n */\r\n\r\nimport { ClipPlane, Point3d, Vector3d } from \"@itwin/core-geometry\";\r\nimport { Frustum } from \"../Frustum\";\r\nimport { BoundingSphere } from \"./BoundingSphere\";\r\n\r\n/*\r\nThe following visualizes the contents of frustum.points, which is sent to computeFrustumPlanes().\r\nThe below numbers are the indices into that array.\r\n\r\n 2----------3\r\n /| /|\r\n / 0--------/-1\r\n6----------7 /\r\n| / | /\r\n|/ |/\r\n4__________5\r\n\r\n0 = left bottom rear\r\n1 = right bottom rear\r\n2 = left top right\r\n3 = right top rear\r\n4 = left bottom front\r\n5 = right bottom front\r\n6 = left top front\r\n7 = right top front\r\n*/\r\n\r\n// Ordering of sub-arrays is: [origin, a, b]\r\nconst planePointIndices = [\r\n [1, 5, 3], // right\r\n [0, 2, 4], // left\r\n [2, 3, 6], // top\r\n [0, 4, 1], // bottom\r\n [0, 1, 2], // back\r\n // Skip front plane because it can be too small. Instead derive it from back plane.\r\n // Otherwise, it would be: [4, 6, 5]\r\n];\r\n\r\nfunction computeFrustumPlanes(frustum: Frustum): ClipPlane[] {\r\n const planes = [];\r\n const points = frustum.points;\r\n const expandPlaneDistance = 1e-6;\r\n\r\n let normal: Vector3d | undefined;\r\n for (const indices of planePointIndices) {\r\n const i0 = indices[0], i1 = indices[1], i2 = indices[2];\r\n normal = Vector3d.createCrossProductToPoints(points[i0], points[i1], points[i2]);\r\n normal.normalizeInPlace();\r\n\r\n const plane = ClipPlane.createNormalAndDistance(normal, normal.dotProduct(points[i0]) - expandPlaneDistance);\r\n if (!plane)\r\n return [];\r\n\r\n planes.push(plane);\r\n }\r\n\r\n // Derive front plane from back plane due to fact that front plane can become very tiny and cause precision issues, resulting in zero frustum planes. Deriving the front plane from the rear rect resolves this problem.\r\n // The back plane was the last plane processed above, so we can just consult the current value of `normal`.\r\n if (undefined !== normal) {\r\n normal.negate(normal); // negate the back plane\r\n // NB: Below, we make sure we calculate the distance based on a point on the front rect, not the rear rect!\r\n const plane = ClipPlane.createNormalAndDistance(normal, normal.dotProduct(points[4]) - expandPlaneDistance);\r\n if (!plane)\r\n return [];\r\n\r\n planes.push(plane);\r\n } else\r\n return [];\r\n\r\n return planes;\r\n}\r\n\r\n// Scratch variable used by FrustumPlanes.computeContainment.\r\nconst planesContainingSphere = [false, false, false, false, false, false];\r\n\r\n/** Represents a the planes of a [[Frustum]] for testing containment and intersection.\r\n * A valid frustum produces six planes. A degenerate frustum produces zero planes.\r\n * @public\r\n * @extensions\r\n */\r\nexport class FrustumPlanes {\r\n private _planes: ClipPlane[];\r\n\r\n private constructor(planes: ClipPlane[]) {\r\n this._planes = planes;\r\n }\r\n\r\n /** Compute the six planes of the specified frustum.\r\n * If the frustum is degenerate - that is, its points do not represent a truncated pyramid - then the returned `FrustumPlanes` will contain zero planes.\r\n * @note This method assumes that the front plane is parallel to the back plane.\r\n * @see [[isValid]] to test this condition.\r\n */\r\n public static fromFrustum(frustum: Frustum): FrustumPlanes {\r\n const planes = computeFrustumPlanes(frustum);\r\n return new FrustumPlanes(planes);\r\n }\r\n\r\n /** Create an empty set of frustum planes. [[isValid]] will be `true`. This can be useful when you want to create a `FrustumPlanes` object and initialize it later via [[init]] -\r\n * for example, if you intend to use the same object repeatedly with different [[Frustum]]s.\r\n */\r\n public static createEmpty(): FrustumPlanes {\r\n return new FrustumPlanes([]);\r\n }\r\n\r\n /** Returns true if [[planes]] consists of six planes. This may return `false` if a degenerate [[Frustum]] was supplied to [[fromFrustum]], or if this object was created\r\n * via [[createEmpty]] - in either case, [[planes]] will be an empty array.\r\n */\r\n public get isValid(): boolean {\r\n return this._planes.length === 6;\r\n }\r\n\r\n /** Obtain the list of planes defining the frustum. If [[isValid]] is `true`, it will have a length of six, with the planes ordered as\r\n * right, left, top, bottom, back, front. Otherwise, it will be empty.\r\n */\r\n public get planes(): ClipPlane[] {\r\n return this._planes;\r\n }\r\n\r\n /** Recompute the planes from the specified frustum.\r\n * @returns true upon success, or false if the input frustum was degenerate, in which case [[isValid]] will be `false`.\r\n * @note This method assumes that the front plane is parallel to the back plane.\r\n */\r\n public init(frustum: Frustum): boolean {\r\n this._planes = computeFrustumPlanes(frustum);\r\n return this.isValid;\r\n }\r\n\r\n /** Compute to what degree a [[Frustum]] is contained with these frustum planes.\r\n * @param box The frustum to test for containment.\r\n * @param sphere An optional spherical bounding volume fully containing `box`. If supplied, this can reduce the amount of computation required.\r\n * @returns the degree to which `box` is contained within the clipping planes.\r\n */\r\n public computeFrustumContainment(box: Frustum, sphere?: BoundingSphere): FrustumPlanes.Containment {\r\n return this.computeContainment(box.points, sphere);\r\n }\r\n\r\n /** Determines whether a [[Frustum]] intersects with or is fully contained within these frustum planes.\r\n * @param box The frustum to test for containment.\r\n * @param sphere An optional spherical bounding volume fully containing `box`. If supplied, this can reduce the amount of computation required.\r\n * @returns true if `box` is not entirely outside of the clipping planes.\r\n */\r\n public intersectsFrustum(box: Frustum, sphere?: BoundingSphere): boolean {\r\n return FrustumPlanes.Containment.Outside !== this.computeFrustumContainment(box, sphere);\r\n }\r\n\r\n /** Determines whether a point is contained within these frustum planes.\r\n * @param point The point to test for containment.\r\n * @param tolerance The maximum distance from the interior of the frustum planes that will still be considered \"contained\".\r\n * @returns true if `point` is no further than `tolerance` meters outside of the clipping planes.\r\n */\r\n public containsPoint(point: Point3d, tolerance: number = 1.0e-8): boolean {\r\n return FrustumPlanes.Containment.Outside !== this.computeContainment([point], undefined, tolerance);\r\n }\r\n\r\n /** Compute the degree to which a set of points is contained within these frustum planes.\r\n * @param points The points to test for containment.\r\n * @param sphere An optional spherical bounding volume fully containing all of the points. If supplied, this can reduce the amount of computation required.\r\n * @param tolerance The maximum distance from the interior of the frustum planes a point must be to be considered \"contained\".\r\n * @returns the degree to which all of the points are contained within the clipping planes.\r\n */\r\n public computeContainment(points: Point3d[], sphere?: BoundingSphere, tolerance: number = 1.0e-8): FrustumPlanes.Containment {\r\n if (undefined === this._planes)\r\n return FrustumPlanes.Containment.Outside;\r\n\r\n // Do the cheap test against bounding sphere first.\r\n if (sphere) {\r\n for (let i = 0; i < this._planes.length; i++) {\r\n const plane = this._planes[i];\r\n const centerDistance = plane.altitude(sphere.center);\r\n const tolerancePlusRadius = tolerance + sphere.radius;\r\n if (centerDistance < -tolerancePlusRadius)\r\n return FrustumPlanes.Containment.Outside;\r\n\r\n planesContainingSphere[i] = centerDistance > tolerancePlusRadius;\r\n }\r\n }\r\n\r\n // Test against points.\r\n let allInside = true;\r\n for (let i = 0; i < this._planes.length; i++) {\r\n if (sphere && planesContainingSphere[i])\r\n continue;\r\n\r\n const plane = this._planes[i];\r\n let nOutside = 0;\r\n for (const point of points) {\r\n if (plane.altitude(point) + tolerance < 0) {\r\n ++nOutside;\r\n allInside = false;\r\n }\r\n }\r\n\r\n if (nOutside === points.length)\r\n return FrustumPlanes.Containment.Outside;\r\n }\r\n\r\n return allInside ? FrustumPlanes.Containment.Inside : FrustumPlanes.Containment.Partial;\r\n }\r\n\r\n /** Computes whether a ray intersects these clipping planes.\r\n * @param origin The origin of the ray.\r\n * @param direction The direction of the ray.\r\n * @returns true if the ray extending from `origin` in the specified `direction` intersects at least one of the clipping planes.\r\n */\r\n public intersectsRay(origin: Point3d, direction: Vector3d): boolean {\r\n if (undefined === this._planes) {\r\n return false;\r\n }\r\n\r\n let tFar = 1e37;\r\n let tNear = -tFar;\r\n\r\n for (const plane of this._planes) {\r\n const vD = plane.velocity(direction);\r\n const vN = plane.altitude(origin);\r\n if (0.0 === vD) {\r\n // ray is parallel... no need to continue testing if outside halfspace.\r\n if (vN < 0.0) {\r\n return false;\r\n }\r\n } else {\r\n const rayDistance = -vN / vD;\r\n if (vD < 0.0) {\r\n tFar = Math.min(rayDistance, tFar);\r\n } else {\r\n tNear = Math.max(rayDistance, tNear);\r\n }\r\n }\r\n }\r\n\r\n return tNear <= tFar;\r\n }\r\n}\r\n\r\n/** @public @extensions */\r\nexport namespace FrustumPlanes { // eslint-disable-line no-redeclare\r\n /** Describes the degree to which an object is contained within the planes of a [[Frustum]].\r\n * @see [[FrustumPlanes.computeContainment]], for example.\r\n */\r\n export enum Containment {\r\n /** The object is entirely outside of the frustum, intersecting none of its planes. */\r\n Outside = 0,\r\n /** The object intersects at least one of the frustum planes. placing it partially inside of the frustum. */\r\n Partial = 1,\r\n /** The object is entirely inside of the frustum, intersecting none of its planes. */\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C,IAAI,CAAC;QAElB,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjC,MAAM,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;YACrC,MAAM,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAClC,IAAI,GAAG,KAAK,EAAE,EAAE,CAAC;gBACf,uEAAuE;gBACvE,IAAI,EAAE,GAAG,GAAG,EAAE,CAAC;oBACb,OAAO,KAAK,CAAC;gBACf,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,MAAM,WAAW,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC;gBAC7B,IAAI,EAAE,GAAG,GAAG,EAAE,CAAC;oBACb,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBACrC,CAAC;qBAAM,CAAC;oBACN,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;gBACvC,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,KAAK,IAAI,IAAI,CAAC;IACvB,CAAC;CACF;AAxJD,sCAwJC;AAED,0BAA0B;AAC1B,WAAiB,aAAa;IAC5B;;OAEG;IACH,IAAY,WAOX;IAPD,WAAY,WAAW;QACrB,sFAAsF;QACtF,mDAAW,CAAA;QACX,4GAA4G;QAC5G,mDAAW,CAAA;QACX,qFAAqF;QACrF,iDAAU,CAAA;IACZ,CAAC,EAPW,WAAW,GAAX,yBAAW,KAAX,yBAAW,QAOtB;AACH,CAAC,EAZgB,aAAa,6BAAb,aAAa,QAY7B","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 Geometry\r\n */\r\n\r\nimport { ClipPlane, Point3d, Vector3d } from \"@itwin/core-geometry\";\r\nimport { Frustum } from \"../Frustum\";\r\nimport { BoundingSphere } from \"./BoundingSphere\";\r\n\r\n/*\r\nThe following visualizes the contents of frustum.points, which is sent to computeFrustumPlanes().\r\nThe below numbers are the indices into that array.\r\n\r\n 2----------3\r\n /| /|\r\n / 0--------/-1\r\n6----------7 /\r\n| / | /\r\n|/ |/\r\n4__________5\r\n\r\n0 = left bottom rear\r\n1 = right bottom rear\r\n2 = left top right\r\n3 = right top rear\r\n4 = left bottom front\r\n5 = right bottom front\r\n6 = left top front\r\n7 = right top front\r\n*/\r\n\r\n// Ordering of sub-arrays is: [origin, a, b]\r\nconst planePointIndices = [\r\n [1, 5, 3], // right\r\n [0, 2, 4], // left\r\n [2, 3, 6], // top\r\n [0, 4, 1], // bottom\r\n [0, 1, 2], // back\r\n // Skip front plane because it can be too small. Instead derive it from back plane.\r\n // Otherwise, it would be: [4, 6, 5]\r\n];\r\n\r\nfunction computeFrustumPlanes(frustum: Frustum): ClipPlane[] {\r\n const planes = [];\r\n const points = frustum.points;\r\n const expandPlaneDistance = 1e-6;\r\n\r\n let normal: Vector3d | undefined;\r\n for (const indices of planePointIndices) {\r\n const i0 = indices[0], i1 = indices[1], i2 = indices[2];\r\n normal = Vector3d.createCrossProductToPoints(points[i0], points[i1], points[i2]);\r\n normal.normalizeInPlace();\r\n\r\n const plane = ClipPlane.createNormalAndDistance(normal, normal.dotProduct(points[i0]) - expandPlaneDistance);\r\n if (!plane)\r\n return [];\r\n\r\n planes.push(plane);\r\n }\r\n\r\n // Derive front plane from back plane due to fact that front plane can become very tiny and cause precision issues, resulting in zero frustum planes. Deriving the front plane from the rear rect resolves this problem.\r\n // The back plane was the last plane processed above, so we can just consult the current value of `normal`.\r\n if (undefined !== normal) {\r\n normal.negate(normal); // negate the back plane\r\n // NB: Below, we make sure we calculate the distance based on a point on the front rect, not the rear rect!\r\n const plane = ClipPlane.createNormalAndDistance(normal, normal.dotProduct(points[4]) - expandPlaneDistance);\r\n if (!plane)\r\n return [];\r\n\r\n planes.push(plane);\r\n } else\r\n return [];\r\n\r\n return planes;\r\n}\r\n\r\n// Scratch variable used by FrustumPlanes.computeContainment.\r\nconst planesContainingSphere = [false, false, false, false, false, false];\r\n\r\n/** Represents a the planes of a [[Frustum]] for testing containment and intersection.\r\n * A valid frustum produces six planes. A degenerate frustum produces zero planes.\r\n * @public\r\n * @extensions\r\n */\r\nexport class FrustumPlanes {\r\n private _planes: ClipPlane[];\r\n\r\n private constructor(planes: ClipPlane[]) {\r\n this._planes = planes;\r\n }\r\n\r\n /** Compute the six planes of the specified frustum.\r\n * If the frustum is degenerate - that is, its points do not represent a truncated pyramid - then the returned `FrustumPlanes` will contain zero planes.\r\n * @note This method assumes that the front plane is parallel to the back plane.\r\n * @see [[isValid]] to test this condition.\r\n */\r\n public static fromFrustum(frustum: Frustum): FrustumPlanes {\r\n const planes = computeFrustumPlanes(frustum);\r\n return new FrustumPlanes(planes);\r\n }\r\n\r\n /** Create an empty set of frustum planes. [[isValid]] will be `true`. This can be useful when you want to create a `FrustumPlanes` object and initialize it later via [[init]] -\r\n * for example, if you intend to use the same object repeatedly with different [[Frustum]]s.\r\n */\r\n public static createEmpty(): FrustumPlanes {\r\n return new FrustumPlanes([]);\r\n }\r\n\r\n /** Returns true if [[planes]] consists of six planes. This may return `false` if a degenerate [[Frustum]] was supplied to [[fromFrustum]], or if this object was created\r\n * via [[createEmpty]] - in either case, [[planes]] will be an empty array.\r\n */\r\n public get isValid(): boolean {\r\n return this._planes.length === 6;\r\n }\r\n\r\n /** Obtain the list of planes defining the frustum. If [[isValid]] is `true`, it will have a length of six, with the planes ordered as\r\n * right, left, top, bottom, back, front. Otherwise, it will be empty.\r\n */\r\n public get planes(): ClipPlane[] {\r\n return this._planes;\r\n }\r\n\r\n /** Recompute the planes from the specified frustum.\r\n * @returns true upon success, or false if the input frustum was degenerate, in which case [[isValid]] will be `false`.\r\n * @note This method assumes that the front plane is parallel to the back plane.\r\n */\r\n public init(frustum: Frustum): boolean {\r\n this._planes = computeFrustumPlanes(frustum);\r\n return this.isValid;\r\n }\r\n\r\n /** Compute to what degree a [[Frustum]] is contained with these frustum planes.\r\n * @param box The frustum to test for containment.\r\n * @param sphere An optional spherical bounding volume fully containing `box`. If supplied, this can reduce the amount of computation required.\r\n * @returns the degree to which `box` is contained within the clipping planes.\r\n */\r\n public computeFrustumContainment(box: Frustum, sphere?: BoundingSphere): FrustumPlanes.Containment {\r\n return this.computeContainment(box.points, sphere);\r\n }\r\n\r\n /** Determines whether a [[Frustum]] intersects with or is fully contained within these frustum planes.\r\n * @param box The frustum to test for containment.\r\n * @param sphere An optional spherical bounding volume fully containing `box`. If supplied, this can reduce the amount of computation required.\r\n * @returns true if `box` is not entirely outside of the clipping planes.\r\n */\r\n public intersectsFrustum(box: Frustum, sphere?: BoundingSphere): boolean {\r\n return FrustumPlanes.Containment.Outside !== this.computeFrustumContainment(box, sphere);\r\n }\r\n\r\n /** Determines whether a point is contained within these frustum planes.\r\n * @param point The point to test for containment.\r\n * @param tolerance The maximum distance from the interior of the frustum planes that will still be considered \"contained\".\r\n * @returns true if `point` is no further than `tolerance` meters outside of the clipping planes.\r\n */\r\n public containsPoint(point: Point3d, tolerance: number = 1.0e-8): boolean {\r\n return FrustumPlanes.Containment.Outside !== this.computeContainment([point], undefined, tolerance);\r\n }\r\n\r\n /** Compute the degree to which a set of points is contained within these frustum planes.\r\n * @param points The points to test for containment.\r\n * @param sphere An optional spherical bounding volume fully containing all of the points. If supplied, this can reduce the amount of computation required.\r\n * @param tolerance The maximum distance from the interior of the frustum planes a point must be to be considered \"contained\".\r\n * @returns the degree to which all of the points are contained within the clipping planes.\r\n */\r\n public computeContainment(points: Point3d[], sphere?: BoundingSphere, tolerance: number = 1.0e-8): FrustumPlanes.Containment {\r\n if (undefined === this._planes)\r\n return FrustumPlanes.Containment.Outside;\r\n\r\n // Do the cheap test against bounding sphere first.\r\n if (sphere) {\r\n for (let i = 0; i < this._planes.length; i++) {\r\n const plane = this._planes[i];\r\n const centerDistance = plane.altitude(sphere.center);\r\n const tolerancePlusRadius = tolerance + sphere.radius;\r\n if (centerDistance < -tolerancePlusRadius)\r\n return FrustumPlanes.Containment.Outside;\r\n\r\n planesContainingSphere[i] = centerDistance > tolerancePlusRadius;\r\n }\r\n }\r\n\r\n // Test against points.\r\n let allInside = true;\r\n for (let i = 0; i < this._planes.length; i++) {\r\n if (sphere && planesContainingSphere[i])\r\n continue;\r\n\r\n const plane = this._planes[i];\r\n let nOutside = 0;\r\n for (const point of points) {\r\n if (plane.altitude(point) + tolerance < 0) {\r\n ++nOutside;\r\n allInside = false;\r\n }\r\n }\r\n\r\n if (nOutside === points.length)\r\n return FrustumPlanes.Containment.Outside;\r\n }\r\n\r\n return allInside ? FrustumPlanes.Containment.Inside : FrustumPlanes.Containment.Partial;\r\n }\r\n\r\n /** Computes whether a ray intersects these clipping planes.\r\n * @param origin The origin of the ray.\r\n * @param direction The direction of the ray.\r\n * @returns true if the ray extending from `origin` in the specified `direction` intersects at least one of the clipping planes.\r\n */\r\n public intersectsRay(origin: Point3d, direction: Vector3d): boolean {\r\n if (undefined === this._planes) {\r\n return false;\r\n }\r\n\r\n let tFar = 1e37;\r\n let tNear = -tFar;\r\n\r\n for (const plane of this._planes) {\r\n const vD = plane.velocity(direction);\r\n const vN = plane.altitude(origin);\r\n if (0.0 === vD) {\r\n // ray is parallel... no need to continue testing if outside halfspace.\r\n if (vN < 0.0) {\r\n return false;\r\n }\r\n } else {\r\n const rayDistance = -vN / vD;\r\n if (vD < 0.0) {\r\n tFar = Math.min(rayDistance, tFar);\r\n } else {\r\n tNear = Math.max(rayDistance, tNear);\r\n }\r\n }\r\n }\r\n\r\n return tNear <= tFar;\r\n }\r\n}\r\n\r\n/** @public @extensions */\r\nexport namespace FrustumPlanes {\r\n /** Describes the degree to which an object is contained within the planes of a [[Frustum]].\r\n * @see [[FrustumPlanes.computeContainment]], for example.\r\n */\r\n export enum Containment {\r\n /** The object is entirely outside of the frustum, intersecting none of its planes. */\r\n Outside = 0,\r\n /** The object intersects at least one of the frustum planes. placing it partially inside of the frustum. */\r\n Partial = 1,\r\n /** The object is entirely inside of the frustum, intersecting none of its planes. */\r\n Inside = 2,\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IpcWebSocket.js","sourceRoot":"","sources":["../../../src/ipc/IpcWebSocket.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH,gBAAgB;AAChB,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,qEAAI,CAAA;IACJ,qEAAI,CAAA;IACJ,yEAAM,CAAA;IACN,6EAAQ,CAAA;IACR,6EAAQ,CAAA;IACR,+EAAS,CAAA;AACX,CAAC,EAPW,uBAAuB,uCAAvB,uBAAuB,QAOlC;AAaD,gBAAgB;AAChB,IAAiB,mBAAmB,CAYnC;AAZD,WAAiB,mBAAmB;IAClC,SAAgB,QAAQ;QACtB,OAAO,EAAE,IAAI,EAAE,uBAAuB,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC;IACpG,CAAC;IAFe,4BAAQ,WAEvB,CAAA;IAED,SAAgB,SAAS;QACvB,OAAO,EAAE,IAAI,EAAE,uBAAuB,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC;IACrG,CAAC;IAFe,6BAAS,YAExB,CAAA;IAED,SAAgB,IAAI,CAAC,OAA4B;QAC/C,OAAO,OAAO,CAAC,IAAI,KAAK,uBAAuB,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,KAAK,uBAAuB,CAAC,SAAS,CAAC;IACjH,CAAC;IAFe,wBAAI,OAEnB,CAAA;AACH,CAAC,EAZgB,mBAAmB,mCAAnB,mBAAmB,QAYnC;AAED,gBAAgB;AAChB,MAAsB,YAAY;IA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,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,QAAQ,CAAC,IAAW,EAAE,OAA4B;QAC9D,IAAI,OAAO,CAAC,IAAI,KAAK,uBAAuB,CAAC,MAAM;YACjD,OAAO;QAET,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpC,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;IAC/B,CAAC;IAEO,KAAK,CAAC,eAAe;QAC3B,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC;YAClC,OAAO;QACT,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;QAC9C,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YAC9B,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACpD,IAAI,OAAO,EAAE,CAAC;gBACZ,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;gBACxB,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,WAAW;oBAC/B,IAAI,GAAG,EAAE,CAAC;gBAEZ,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,EAAS,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;gBAEnE,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC;oBAC1B,IAAI,EAAE,uBAAuB,CAAC,QAAQ;oBACtC,OAAO,EAAE,OAAO,CAAC,OAAO;oBACxB,QAAQ,EAAE,OAAO,CAAC,OAAO;oBACzB,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,CAAC,CAAC;iBACb,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;IAC/B,CAAC;CACF;AAzDD,kDAyDC","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 IpcSocket\r\n */\r\n\r\nimport { IpcListener, IpcSocket, IpcSocketBackend, IpcSocketFrontend, RemoveFunction } from \"./IpcSocket\";\r\nimport { IpcWebSocketTransport } from \"./IpcWebSocketTransport\";\r\n\r\n/** @internal */\r\nexport enum IpcWebSocketMessageType {\r\n Send,\r\n Push,\r\n Invoke,\r\n Response,\r\n Internal,\r\n Duplicate\r\n}\r\n\r\n/** @internal */\r\nexport interface IpcWebSocketMessage {\r\n type: IpcWebSocketMessageType;\r\n request?: number;\r\n response?: number;\r\n channel: string;\r\n method?: string;\r\n data?: any[];\r\n sequence: number;\r\n}\r\n\r\n/** @internal */\r\nexport namespace IpcWebSocketMessage {\r\n export function internal(): IpcWebSocketMessage {\r\n return { type: IpcWebSocketMessageType.Internal, channel: \"\", sequence: Number.MIN_SAFE_INTEGER };\r\n }\r\n\r\n export function duplicate(): IpcWebSocketMessage {\r\n return { type: IpcWebSocketMessageType.Duplicate, channel: \"\", sequence: Number.MIN_SAFE_INTEGER };\r\n }\r\n\r\n export function skip(message: IpcWebSocketMessage): boolean {\r\n return message.type === IpcWebSocketMessageType.Internal || message.type === IpcWebSocketMessageType.Duplicate;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport abstract class IpcWebSocket implements IpcSocket {\r\n public static transport: IpcWebSocketTransport;\r\n public static receivers: Set<(evt: Event, message: IpcWebSocketMessage) => void> = new Set();\r\n\r\n protected _channels = new Map<string, Set<IpcListener>>();\r\n\r\n public constructor() {\r\n IpcWebSocket.receivers.add(async (e, m) => this.broadcast(e, m));\r\n }\r\n\r\n public abstract send(channel: string, ...data: any[]): void;\r\n\r\n public addListener(channel: string, listener: IpcListener): RemoveFunction {\r\n let listeners = this._channels.get(channel);\r\n if (!listeners) {\r\n listeners = new Set();\r\n this._channels.set(channel, listeners);\r\n }\r\n\r\n if (!listeners.has(listener))\r\n listeners.add(listener);\r\n\r\n return () => listeners!.delete(listener);\r\n }\r\n\r\n public removeListener(channel: string, listener: IpcListener) {\r\n this._channels.get(channel)?.delete(listener);\r\n }\r\n\r\n private async broadcast(evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Send && message.type !== IpcWebSocketMessageType.Push)\r\n return;\r\n\r\n const handlers = this._channels.get(message.channel);\r\n if (!handlers)\r\n return;\r\n\r\n let arg = message.data;\r\n if (typeof (arg) === \"undefined\")\r\n arg = [];\r\n\r\n for (const handler of handlers)\r\n handler(evt, ...arg);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class IpcWebSocketFrontend extends IpcWebSocket implements IpcSocketFrontend {\r\n private _nextRequest = 0;\r\n private _pendingRequests = new Map<number, (response: any) => void>();\r\n\r\n public constructor() {\r\n super();\r\n IpcWebSocket.receivers.add(async (e, m) => this.dispatch(e, m));\r\n }\r\n\r\n public send(channel: string, ...data: any[]): void {\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Send, channel, data, sequence: -1 });\r\n }\r\n\r\n public async invoke(channel: string, methodName: string, ...args: any[]): Promise<any> {\r\n const requestId = ++this._nextRequest;\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Invoke, channel, method: methodName, data: args, request: requestId, sequence: -1 });\r\n\r\n return new Promise((resolve) => {\r\n this._pendingRequests.set(requestId, resolve);\r\n });\r\n }\r\n\r\n private async dispatch(_evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Response || !message.response)\r\n return;\r\n\r\n const pendingHandler = this._pendingRequests.get(message.response);\r\n if (!pendingHandler)\r\n return;\r\n\r\n this._pendingRequests.delete(message.response);\r\n pendingHandler(message.data);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class IpcWebSocketBackend extends IpcWebSocket implements IpcSocketBackend {\r\n private _handlers = new Map<string, (event: Event, methodName: string, ...args: any[]) => Promise<any>>();\r\n private _processingQueue: IpcWebSocketMessage[] = [];\r\n\r\n public constructor() {\r\n super();\r\n IpcWebSocket.receivers.add(async (e, m) => this.dispatch(e, m));\r\n }\r\n\r\n public send(channel: string, ...data: any[]): void {\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Push, channel, data, sequence: -1 });\r\n }\r\n\r\n public handle(channel: string, handler: (event: Event, methodName: string, ...args: any[]) => Promise<any>): RemoveFunction {\r\n this._handlers.set(channel, handler);\r\n\r\n return () => {\r\n if (this._handlers.get(channel) === handler)\r\n this._handlers.delete(channel);\r\n };\r\n }\r\n\r\n private async dispatch(_evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Invoke)\r\n return;\r\n\r\n this._processingQueue.push(message);\r\n await this.processMessages();\r\n }\r\n\r\n private async processMessages() {\r\n if (!this._processingQueue.length) {\r\n return;\r\n }\r\n\r\n const message = this._processingQueue.shift();\r\n if (message && message.method) {\r\n const handler = this._handlers.get(message.channel);\r\n if (handler) {\r\n let args = message.data;\r\n if (typeof (args) === \"undefined\")\r\n args = [];\r\n\r\n const response = await handler({} as any, message.method, ...args);\r\n\r\n IpcWebSocket.transport.send({\r\n type: IpcWebSocketMessageType.Response,\r\n channel: message.channel,\r\n response: message.request,\r\n data: response,\r\n sequence: -1,\r\n });\r\n }\r\n }\r\n\r\n await this.processMessages();\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"IpcWebSocket.js","sourceRoot":"","sources":["../../../src/ipc/IpcWebSocket.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH,gBAAgB;AAChB,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,qEAAI,CAAA;IACJ,qEAAI,CAAA;IACJ,yEAAM,CAAA;IACN,6EAAQ,CAAA;IACR,6EAAQ,CAAA;IACR,+EAAS,CAAA;AACX,CAAC,EAPW,uBAAuB,uCAAvB,uBAAuB,QAOlC;AAaD,gBAAgB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AAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACpD,IAAI,OAAO,EAAE,CAAC;gBACZ,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;gBACxB,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,WAAW;oBAC/B,IAAI,GAAG,EAAE,CAAC;gBAEZ,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,EAAS,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;gBAEnE,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC;oBAC1B,IAAI,EAAE,uBAAuB,CAAC,QAAQ;oBACtC,OAAO,EAAE,OAAO,CAAC,OAAO;oBACxB,QAAQ,EAAE,OAAO,CAAC,OAAO;oBACzB,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,CAAC,CAAC;iBACb,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;IAC/B,CAAC;CACF;AAzDD,kDAyDC","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 IpcSocket\r\n */\r\n\r\nimport { IpcListener, IpcSocket, IpcSocketBackend, IpcSocketFrontend, RemoveFunction } from \"./IpcSocket\";\r\nimport { IpcWebSocketTransport } from \"./IpcWebSocketTransport\";\r\n\r\n/** @internal */\r\nexport enum IpcWebSocketMessageType {\r\n Send,\r\n Push,\r\n Invoke,\r\n Response,\r\n Internal,\r\n Duplicate\r\n}\r\n\r\n/** @internal */\r\nexport interface IpcWebSocketMessage {\r\n type: IpcWebSocketMessageType;\r\n request?: number;\r\n response?: number;\r\n channel: string;\r\n method?: string;\r\n data?: any[];\r\n sequence: number;\r\n}\r\n\r\n/** @internal */\r\nexport namespace IpcWebSocketMessage {\r\n export function internal(): IpcWebSocketMessage {\r\n return { type: IpcWebSocketMessageType.Internal, channel: \"\", sequence: Number.MIN_SAFE_INTEGER };\r\n }\r\n\r\n export function duplicate(): IpcWebSocketMessage {\r\n return { type: IpcWebSocketMessageType.Duplicate, channel: \"\", sequence: Number.MIN_SAFE_INTEGER };\r\n }\r\n\r\n export function skip(message: IpcWebSocketMessage): boolean {\r\n return message.type === IpcWebSocketMessageType.Internal || message.type === IpcWebSocketMessageType.Duplicate;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport abstract class IpcWebSocket implements IpcSocket {\r\n public static transport: IpcWebSocketTransport;\r\n public static receivers: Set<(evt: Event, message: IpcWebSocketMessage) => void> = new Set();\r\n\r\n protected _channels = new Map<string, Set<IpcListener>>();\r\n\r\n public constructor() {\r\n IpcWebSocket.receivers.add(async (e, m) => this.broadcast(e, m));\r\n }\r\n\r\n public abstract send(channel: string, ...data: any[]): void;\r\n\r\n public addListener(channel: string, listener: IpcListener): RemoveFunction {\r\n let listeners = this._channels.get(channel);\r\n if (!listeners) {\r\n listeners = new Set();\r\n this._channels.set(channel, listeners);\r\n }\r\n\r\n if (!listeners.has(listener))\r\n listeners.add(listener);\r\n\r\n return () => listeners.delete(listener);\r\n }\r\n\r\n public removeListener(channel: string, listener: IpcListener) {\r\n this._channels.get(channel)?.delete(listener);\r\n }\r\n\r\n private async broadcast(evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Send && message.type !== IpcWebSocketMessageType.Push)\r\n return;\r\n\r\n const handlers = this._channels.get(message.channel);\r\n if (!handlers)\r\n return;\r\n\r\n let arg = message.data;\r\n if (typeof (arg) === \"undefined\")\r\n arg = [];\r\n\r\n for (const handler of handlers)\r\n handler(evt, ...arg);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class IpcWebSocketFrontend extends IpcWebSocket implements IpcSocketFrontend {\r\n private _nextRequest = 0;\r\n private _pendingRequests = new Map<number, (response: any) => void>();\r\n\r\n public constructor() {\r\n super();\r\n IpcWebSocket.receivers.add(async (e, m) => this.dispatch(e, m));\r\n }\r\n\r\n public send(channel: string, ...data: any[]): void {\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Send, channel, data, sequence: -1 });\r\n }\r\n\r\n public async invoke(channel: string, methodName: string, ...args: any[]): Promise<any> {\r\n const requestId = ++this._nextRequest;\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Invoke, channel, method: methodName, data: args, request: requestId, sequence: -1 });\r\n\r\n return new Promise((resolve) => {\r\n this._pendingRequests.set(requestId, resolve);\r\n });\r\n }\r\n\r\n private async dispatch(_evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Response || !message.response)\r\n return;\r\n\r\n const pendingHandler = this._pendingRequests.get(message.response);\r\n if (!pendingHandler)\r\n return;\r\n\r\n this._pendingRequests.delete(message.response);\r\n pendingHandler(message.data);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class IpcWebSocketBackend extends IpcWebSocket implements IpcSocketBackend {\r\n private _handlers = new Map<string, (event: Event, methodName: string, ...args: any[]) => Promise<any>>();\r\n private _processingQueue: IpcWebSocketMessage[] = [];\r\n\r\n public constructor() {\r\n super();\r\n IpcWebSocket.receivers.add(async (e, m) => this.dispatch(e, m));\r\n }\r\n\r\n public send(channel: string, ...data: any[]): void {\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Push, channel, data, sequence: -1 });\r\n }\r\n\r\n public handle(channel: string, handler: (event: Event, methodName: string, ...args: any[]) => Promise<any>): RemoveFunction {\r\n this._handlers.set(channel, handler);\r\n\r\n return () => {\r\n if (this._handlers.get(channel) === handler)\r\n this._handlers.delete(channel);\r\n };\r\n }\r\n\r\n private async dispatch(_evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Invoke)\r\n return;\r\n\r\n this._processingQueue.push(message);\r\n await this.processMessages();\r\n }\r\n\r\n private async processMessages() {\r\n if (!this._processingQueue.length) {\r\n return;\r\n }\r\n\r\n const message = this._processingQueue.shift();\r\n if (message && message.method) {\r\n const handler = this._handlers.get(message.channel);\r\n if (handler) {\r\n let args = message.data;\r\n if (typeof (args) === \"undefined\")\r\n args = [];\r\n\r\n const response = await handler({} as any, message.method, ...args);\r\n\r\n IpcWebSocket.transport.send({\r\n type: IpcWebSocketMessageType.Response,\r\n channel: message.channel,\r\n response: message.request,\r\n data: response,\r\n sequence: -1,\r\n });\r\n }\r\n }\r\n\r\n await this.processMessages();\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevToolsRpcInterface.js","sourceRoot":"","sources":["../../../src/rpc/DevToolsRpcInterface.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH,kDAA+C;AAC/C,8CAA2C;AAE3C;;GAEG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,+DAAQ,CAAA;IAER,oFAAoF;IACpF,6EAAe,CAAA;AACjB,CAAC,EALW,oBAAoB,oCAApB,oBAAoB,QAK/B;AAED;;;GAGG;AACH,MAAsB,oBAAqB,SAAQ,2BAAY;IAC7D,oEAAoE;IAC7D,MAAM,CAAC,SAAS,KAA2B,OAAO,uBAAU,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAUlH;;;gGAG4F;IAC5F,iEAAiE;IAC1D,KAAK,CAAC,IAAI,CAAC,YAA4B,IAAsB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAErG,qEAAqE;IAC9D,KAAK,CAAC,KAAK,CAAC,YAA4B,EAAE,QAA8B,IAAkB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAElI,uEAAuE;IAChE,KAAK,CAAC,QAAQ,CAAC,YAA4B;QAChD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACrD,QAAQ,CAAC,aAAa,GAAG,MAAM,uBAAU,CAAC,0BAA0B,EAAE,CAAC;QACvE,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,gFAAgF;IACzE,KAAK,CAAC,WAAW,CAAC,YAA4B,EAAE,eAAuB,EAAE,SAAmB,IAAmC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;;AA9BzK,oDA+BC;AA3BC,2CAA2C;AACpB,kCAAa,GAAG,sBAAsB,CAAC;AAE9D;;GAEG;AACW,qCAAgB,GAAG,OAAO,CAAC","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 RpcInterface\r\n */\r\n\r\nimport { LogLevel } from \"@itwin/core-bentley\";\r\nimport { IModelRpcProps } from \"../IModel\";\r\nimport { RpcInterface } from \"../RpcInterface\";\r\nimport { RpcManager } from \"../RpcManager\";\r\n\r\n/** Options to get the backend statistics\r\n * @internal\r\n */\r\nexport enum DevToolsStatsOptions {\r\n None = 0,\r\n\r\n /** All unitized values are setup as formatted strings with the appropriate units */\r\n FormatUnits = 1,\r\n}\r\n\r\n/** The purpose of this class is to house RPC methods for developer tools.\r\n * Note that this should NOT be used in production environments.\r\n * @internal\r\n */\r\nexport abstract class DevToolsRpcInterface extends RpcInterface {
|
|
1
|
+
{"version":3,"file":"DevToolsRpcInterface.js","sourceRoot":"","sources":["../../../src/rpc/DevToolsRpcInterface.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH,kDAA+C;AAC/C,8CAA2C;AAE3C;;GAEG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,+DAAQ,CAAA;IAER,oFAAoF;IACpF,6EAAe,CAAA;AACjB,CAAC,EALW,oBAAoB,oCAApB,oBAAoB,QAK/B;AAED;;;GAGG;AACH,MAAsB,oBAAqB,SAAQ,2BAAY;IAC7D,oEAAoE;IAC7D,MAAM,CAAC,SAAS,KAA2B,OAAO,uBAAU,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAUlH;;;gGAG4F;IAC5F,iEAAiE;IAC1D,KAAK,CAAC,IAAI,CAAC,YAA4B,IAAsB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAErG,qEAAqE;IAC9D,KAAK,CAAC,KAAK,CAAC,YAA4B,EAAE,QAA8B,IAAkB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAElI,uEAAuE;IAChE,KAAK,CAAC,QAAQ,CAAC,YAA4B;QAChD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACrD,QAAQ,CAAC,aAAa,GAAG,MAAM,uBAAU,CAAC,0BAA0B,EAAE,CAAC;QACvE,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,gFAAgF;IACzE,KAAK,CAAC,WAAW,CAAC,YAA4B,EAAE,eAAuB,EAAE,SAAmB,IAAmC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;;AA9BzK,oDA+BC;AA3BC,2CAA2C;AACpB,kCAAa,GAAG,sBAAsB,CAAC;AAE9D;;GAEG;AACW,qCAAgB,GAAG,OAAO,CAAC","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 RpcInterface\r\n */\r\n\r\nimport { LogLevel } from \"@itwin/core-bentley\";\r\nimport { IModelRpcProps } from \"../IModel\";\r\nimport { RpcInterface } from \"../RpcInterface\";\r\nimport { RpcManager } from \"../RpcManager\";\r\n\r\n/** Options to get the backend statistics\r\n * @internal\r\n */\r\nexport enum DevToolsStatsOptions {\r\n None = 0,\r\n\r\n /** All unitized values are setup as formatted strings with the appropriate units */\r\n FormatUnits = 1,\r\n}\r\n\r\n/** The purpose of this class is to house RPC methods for developer tools.\r\n * Note that this should NOT be used in production environments.\r\n * @internal\r\n */\r\nexport abstract class DevToolsRpcInterface extends RpcInterface {\r\n /** Returns the IModelReadRpcInterface instance for the frontend. */\r\n public static getClient(): DevToolsRpcInterface { return RpcManager.getClientForInterface(DevToolsRpcInterface); }\r\n\r\n /** The immutable name of the interface. */\r\n public static readonly interfaceName = \"DevToolsRpcInterface\";\r\n\r\n /** The semantic version of the interface.\r\n * @note The DevToolsRpcInterface will remain at 0.x since it is for testing only and not intended for production.\r\n */\r\n public static interfaceVersion = \"0.7.0\";\r\n\r\n /*===========================================================================================\r\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\r\n NOTE: Please consult the README in this folder for the semantic versioning rules.\r\n ==========================================================================================*/\r\n // Sends a ping and returns true if the backend received the ping\r\n public async ping(_iModelToken: IModelRpcProps): Promise<boolean> { return this.forward(arguments); }\r\n\r\n // Returns JSON object with backend performance and memory statistics\r\n public async stats(_iModelToken: IModelRpcProps, _options: DevToolsStatsOptions): Promise<any> { return this.forward(arguments); }\r\n\r\n // Returns JSON object with backend versions (application and iModelJs)\r\n public async versions(_iModelToken: IModelRpcProps): Promise<any> {\r\n const versions = await this.forward(arguments) || {};\r\n versions.availableRpcs = await RpcManager.describeAvailableEndpoints();\r\n return versions;\r\n }\r\n\r\n // Sets a new log level for the specified category and returns the old log level\r\n public async setLogLevel(_iModelToken: IModelRpcProps, _loggerCategory: string, _logLevel: LogLevel): Promise<LogLevel | undefined> { return this.forward(arguments); }\r\n}\r\n"]}
|
|
@@ -91,39 +91,39 @@ IModelReadRpcInterface.interfaceName = "IModelReadRpcInterface";
|
|
|
91
91
|
/** The semantic version of the interface. */
|
|
92
92
|
IModelReadRpcInterface.interfaceVersion = "3.7.0";
|
|
93
93
|
__decorate([
|
|
94
|
-
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
94
|
+
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
95
95
|
], IModelReadRpcInterface.prototype, "getConnectionProps", null);
|
|
96
96
|
__decorate([
|
|
97
|
-
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
97
|
+
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
98
98
|
], IModelReadRpcInterface.prototype, "querySubCategories", null);
|
|
99
99
|
__decorate([
|
|
100
|
-
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
100
|
+
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
101
101
|
], IModelReadRpcInterface.prototype, "queryAllUsedSpatialSubCategories", null);
|
|
102
102
|
__decorate([
|
|
103
|
-
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
103
|
+
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
104
104
|
], IModelReadRpcInterface.prototype, "getModelProps", null);
|
|
105
105
|
__decorate([
|
|
106
|
-
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
106
|
+
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
107
107
|
], IModelReadRpcInterface.prototype, "queryModelRanges", null);
|
|
108
108
|
__decorate([
|
|
109
|
-
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
109
|
+
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
110
110
|
], IModelReadRpcInterface.prototype, "queryModelExtents", null);
|
|
111
111
|
__decorate([
|
|
112
|
-
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
112
|
+
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
113
113
|
], IModelReadRpcInterface.prototype, "getClassHierarchy", null);
|
|
114
114
|
__decorate([
|
|
115
|
-
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
115
|
+
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
116
116
|
], IModelReadRpcInterface.prototype, "getViewStateData", null);
|
|
117
117
|
__decorate([
|
|
118
|
-
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
118
|
+
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
119
119
|
], IModelReadRpcInterface.prototype, "getDefaultViewId", null);
|
|
120
120
|
__decorate([
|
|
121
|
-
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
121
|
+
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
122
122
|
], IModelReadRpcInterface.prototype, "getCustomViewState3dData", null);
|
|
123
123
|
__decorate([
|
|
124
|
-
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
124
|
+
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
125
125
|
], IModelReadRpcInterface.prototype, "hydrateViewState", null);
|
|
126
126
|
__decorate([
|
|
127
|
-
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
127
|
+
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
128
128
|
], IModelReadRpcInterface.prototype, "getGeoCoordinatesFromIModelCoordinates", null);
|
|
129
129
|
//# sourceMappingURL=IModelReadRpcInterface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelReadRpcInterface.js","sourceRoot":"","sources":["../../../src/rpc/IModelReadRpcInterface.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;AAoBH,kDAA+C;AAC/C,8CAA2C;AAO3C,sDAA8D;AAC9D,kDAAwD;AACxD,sDAAmD;AAGnD;;;GAGG;AACH,MAAa,sBAAuB,SAAQ,gCAAmB;IAA/D;;QACS,6BAAwB,GAAY,IAAI,CAAC;QAChC,YAAO,GAAG,kBAAkB,CAAC;IAC/C,CAAC;CAAA;AAHD,wDAGC;AAwBD;;;;GAIG;AACH,MAAsB,sBAAuB,SAAQ,2BAAY;IAC/D,oEAAoE;IAC7D,MAAM,CAAC,SAAS,KAA6B,OAAO,uBAAU,CAAC,qBAAqB,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAEtH,0FAA0F;IACnF,MAAM,CAAC,mBAAmB,CAAC,KAAsB,IAA4B,OAAO,uBAAU,CAAC,qBAAqB,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAQ7J;;;iGAG6F;IAEhF,AAAN,KAAK,CAAC,kBAAkB,CAAC,YAAgC,IAAoC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAC9H,KAAK,CAAC,SAAS,CAAC,YAA4B,EAAE,QAAwB,IAA8B,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAE/H,AAAN,KAAK,CAAC,kBAAkB,CAAC,YAA4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AY,CAAC,oBAAoB,CAAC,sCAAuB,CAAC,SAAS,CAAC,CAAC,8CAA8C;oFAC2E","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 RpcInterface\r\n */\r\n\r\nimport { CompressedId64Set, GuidString, Id64String, IModelStatus } from \"@itwin/core-bentley\";\r\nimport { Range3dProps } from \"@itwin/core-geometry\";\r\nimport { CodeProps } from \"../Code\";\r\nimport { DbBlobRequest, DbBlobResponse, DbQueryRequest, DbQueryResponse } from \"../ConcurrentQuery\";\r\nimport { ElementMeshRequestProps } from \"../ElementMesh\";\r\nimport { ElementLoadOptions, ElementProps } from \"../ElementProps\";\r\nimport { EntityQueryParams } from \"../EntityProps\";\r\nimport { FontMapProps } from \"../Fonts\";\r\nimport {\r\n GeoCoordinatesRequestProps, GeoCoordinatesResponseProps, IModelCoordinatesRequestProps, IModelCoordinatesResponseProps,\r\n} from \"../GeoCoordinateServices\";\r\nimport { GeometryContainmentRequestProps, GeometryContainmentResponseProps } from \"../GeometryContainment\";\r\nimport { GeometrySummaryRequestProps } from \"../GeometrySummary\";\r\nimport { IModelConnectionProps, IModelRpcOpenProps, IModelRpcProps } from \"../IModel\";\r\nimport {\r\n MassPropertiesPerCandidateRequestProps, MassPropertiesPerCandidateResponseProps, MassPropertiesRequestProps, MassPropertiesResponseProps,\r\n} from \"../MassProperties\";\r\nimport { ModelProps } from \"../ModelProps\";\r\nimport { RpcInterface } from \"../RpcInterface\";\r\nimport { RpcManager } from \"../RpcManager\";\r\nimport { SnapRequestProps, SnapResponseProps } from \"../internal/Snapping\";\r\nimport { TextureData, TextureLoadProps } from \"../TextureProps\";\r\nimport {\r\n CustomViewState3dCreatorOptions, CustomViewState3dProps, HydrateViewStateRequestProps, HydrateViewStateResponseProps, SubCategoryResultRow,\r\n ViewStateLoadProps, ViewStateProps,\r\n} from \"../ViewProps\";\r\nimport { RpcResponseCacheControl } from \"./core/RpcConstants\";\r\nimport { RpcNotFoundResponse } from \"./core/RpcControl\";\r\nimport { RpcOperation } from \"./core/RpcOperation\";\r\nimport { RpcRoutingToken } from \"./core/RpcRoutingToken\";\r\n\r\n/** Response if the IModelDb was not found at the backend\r\n * (if the service has moved)\r\n * @public\r\n */\r\nexport class IModelNotFoundResponse extends RpcNotFoundResponse { // eslint-disable-line deprecation/deprecation\r\n public isIModelNotFoundResponse: boolean = true;\r\n public override message = \"iModel not found\";\r\n}\r\n\r\n/** Describes the volume of geometry contained with a [GeometricModel]($backend) as returned by\r\n * [IModelConnection.Models.queryExtents]($frontend) and [IModelDb.Models.queryExtents]($backend).\r\n * @public\r\n */\r\nexport interface ModelExtentsProps {\r\n /** The Id of the model, or [Id64.invalid]($bentley) if the input model Id was not a well-formed [Id64String]($bentley). */\r\n id: Id64String;\r\n /** The volume of geometry contained within the model.\r\n * This range will be null (@see [Range3d.isNull]($geometry)) if [[status]] is not [IModelStatus.Success]($bentley) or the model contains no geometry.\r\n */\r\n extents: Range3dProps;\r\n /** A status code indicating what if any error occurred obtaining the model's extents. For example:\r\n * - [IModelStatus.InvalidId]($bentley) if the input model Id was not a well-formed [Id64String]($bentley);\r\n * - [IModelStatus.NotFound]($bentley) if no model with the specified Id exists in the [[IModel]];\r\n * - [IModelStatus.WrongModel]($bentley) if the specified model is not a [GeometricModel]($backend); or\r\n * - [IModelStatus.Success]($bentley) if the extents were successfully obtained.\r\n *\r\n * If `status` is anything other than [IModelStatus.Success]($bentley), [[extents]] will be a null range.\r\n */\r\n status: IModelStatus;\r\n}\r\n\r\n/** The RPC interface for reading from an iModel.\r\n * All operations only require read-only access.\r\n * This interface is not normally used directly. See IModelConnection for higher-level and more convenient API for accessing iModels from a frontend.\r\n * @internal\r\n */\r\nexport abstract class IModelReadRpcInterface extends RpcInterface { // eslint-disable-line deprecation/deprecation\r\n /** Returns the IModelReadRpcInterface instance for the frontend. */\r\n public static getClient(): IModelReadRpcInterface { return RpcManager.getClientForInterface(IModelReadRpcInterface); }\r\n\r\n /** Returns the IModelReadRpcInterface instance for a custom RPC routing configuration. */\r\n public static getClientForRouting(token: RpcRoutingToken): IModelReadRpcInterface { return RpcManager.getClientForInterface(IModelReadRpcInterface, token); }\r\n\r\n /** The immutable name of the interface. */\r\n public static readonly interfaceName = \"IModelReadRpcInterface\";\r\n\r\n /** The semantic version of the interface. */\r\n public static interfaceVersion = \"3.7.0\";\r\n\r\n /*===========================================================================================\r\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\r\n NOTE: Please consult the README in this folder for the semantic versioning rules.\r\n ===========================================================================================*/\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async getConnectionProps(_iModelToken: IModelRpcOpenProps): Promise<IModelConnectionProps> { return this.forward(arguments); }\r\n public async queryRows(_iModelToken: IModelRpcProps, _request: DbQueryRequest): Promise<DbQueryResponse> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async querySubCategories(_iModelToken: IModelRpcProps, _categoryIds: CompressedId64Set): Promise<SubCategoryResultRow[]> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async queryAllUsedSpatialSubCategories(_iModelToken: IModelRpcProps): Promise<SubCategoryResultRow[]> { return this.forward(arguments); }\r\n public async queryBlob(_iModelToken: IModelRpcProps, _request: DbBlobRequest): Promise<DbBlobResponse> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async getModelProps(_iModelToken: IModelRpcProps, _modelIds: Id64String[]): Promise<ModelProps[]> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async queryModelRanges(_iModelToken: IModelRpcProps, _modelIds: Id64String[]): Promise<Range3dProps[]> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async queryModelExtents(_iModelToken: IModelRpcProps, _modelIds: Id64String[]): Promise<ModelExtentsProps[]> { return this.forward(arguments); }\r\n public async queryModelProps(_iModelToken: IModelRpcProps, _params: EntityQueryParams): Promise<ModelProps[]> { return this.forward(arguments); }\r\n public async getElementProps(_iModelToken: IModelRpcProps, _elementIds: Id64String[]): Promise<ElementProps[]> { return this.forward(arguments); }\r\n public async queryElementProps(_iModelToken: IModelRpcProps, _params: EntityQueryParams): Promise<ElementProps[]> { return this.forward(arguments); }\r\n public async queryEntityIds(_iModelToken: IModelRpcProps, _params: EntityQueryParams): Promise<Id64String[]> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async getClassHierarchy(_iModelToken: IModelRpcProps, _startClassName: string): Promise<string[]> { return this.forward(arguments); }\r\n public async getAllCodeSpecs(_iModelToken: IModelRpcProps): Promise<any[]> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async getViewStateData(_iModelToken: IModelRpcProps, _viewDefinitionId: string, _options?: ViewStateLoadProps): Promise<ViewStateProps> { return this.forward(arguments); }\r\n public async readFontJson(_iModelToken: IModelRpcProps): Promise<FontMapProps> { return this.forward(arguments); }\r\n public async getToolTipMessage(_iModelToken: IModelRpcProps, _elementId: string): Promise<string[]> { return this.forward(arguments); }\r\n /** @deprecated in 3.x use ViewStore apis. */\r\n public async getViewThumbnail(_iModelToken: IModelRpcProps, _viewId: string): Promise<Uint8Array> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async getDefaultViewId(_iModelToken: IModelRpcProps): Promise<Id64String> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async getCustomViewState3dData(_iModelToken: IModelRpcProps, _options: CustomViewState3dCreatorOptions): Promise<CustomViewState3dProps> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async hydrateViewState(_iModelToken: IModelRpcProps, _options: HydrateViewStateRequestProps): Promise<HydrateViewStateResponseProps> { return this.forward(arguments); }\r\n public async requestSnap(_iModelToken: IModelRpcProps, _sessionId: string, _props: SnapRequestProps): Promise<SnapResponseProps> { return this.forward(arguments); }\r\n public async cancelSnap(_iModelToken: IModelRpcProps, _sessionId: string): Promise<void> { return this.forward(arguments); }\r\n public async getGeometryContainment(_iModelToken: IModelRpcProps, _props: GeometryContainmentRequestProps): Promise<GeometryContainmentResponseProps> { return this.forward(arguments); }\r\n public async getMassProperties(_iModelToken: IModelRpcProps, _props: MassPropertiesRequestProps): Promise<MassPropertiesResponseProps> { return this.forward(arguments); }\r\n public async getMassPropertiesPerCandidate(_iModelToken: IModelRpcProps, _props: MassPropertiesPerCandidateRequestProps): Promise<MassPropertiesPerCandidateResponseProps[]> { return this.forward(arguments); }\r\n public async getIModelCoordinatesFromGeoCoordinates(_iModelToken: IModelRpcProps, _props: IModelCoordinatesRequestProps): Promise<IModelCoordinatesResponseProps> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async getGeoCoordinatesFromIModelCoordinates(_iModelToken: IModelRpcProps, _props: GeoCoordinatesRequestProps): Promise<GeoCoordinatesResponseProps> { return this.forward(arguments); }\r\n public async getGeometrySummary(_iModelToken: IModelRpcProps, _props: GeometrySummaryRequestProps): Promise<string> { return this.forward(arguments); }\r\n public async queryTextureData(_iModelToken: IModelRpcProps, _textureLoadProps: TextureLoadProps): Promise<TextureData | undefined> { return this.forward(arguments); }\r\n public async loadElementProps(_iModelToken: IModelRpcProps, _elementIdentifier: Id64String | GuidString | CodeProps, _options?: ElementLoadOptions): Promise<ElementProps | undefined> {\r\n return this.forward(arguments);\r\n }\r\n public async generateElementMeshes(_iModelToken: IModelRpcProps, _props: ElementMeshRequestProps): Promise<Uint8Array> {\r\n return this.forward(arguments);\r\n }\r\n /** @internal */\r\n public async callViewStore(_iModelToken: IModelRpcProps, _version: string, _forWrite: boolean, _methodName: string, ..._args: any[]): Promise<any> { return this.forward(arguments); }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"IModelReadRpcInterface.js","sourceRoot":"","sources":["../../../src/rpc/IModelReadRpcInterface.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;AAoBH,kDAA+C;AAC/C,8CAA2C;AAO3C,sDAA8D;AAC9D,kDAAwD;AACxD,sDAAmD;AAGnD;;;GAGG;AACH,MAAa,sBAAuB,SAAQ,gCAAmB;IAA/D;;QACS,6BAAwB,GAAY,IAAI,CAAC;QAChC,YAAO,GAAG,kBAAkB,CAAC;IAC/C,CAAC;CAAA;AAHD,wDAGC;AAwBD;;;;GAIG;AACH,MAAsB,sBAAuB,SAAQ,2BAAY;IAC/D,oEAAoE;IAC7D,MAAM,CAAC,SAAS,KAA6B,OAAO,uBAAU,CAAC,qBAAqB,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAEtH,0FAA0F;IACnF,MAAM,CAAC,mBAAmB,CAAC,KAAsB,IAA4B,OAAO,uBAAU,CAAC,qBAAqB,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAQ7J;;;iGAG6F;IAEhF,AAAN,KAAK,CAAC,kBAAkB,CAAC,YAAgC,IAAoC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAC9H,KAAK,CAAC,SAA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B,CAAC,sCAAuB,CAAC,SAAS,CAAC;oFAC0H","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 RpcInterface\r\n */\r\n\r\nimport { CompressedId64Set, GuidString, Id64String, IModelStatus } from \"@itwin/core-bentley\";\r\nimport { Range3dProps } from \"@itwin/core-geometry\";\r\nimport { CodeProps } from \"../Code\";\r\nimport { DbBlobRequest, DbBlobResponse, DbQueryRequest, DbQueryResponse } from \"../ConcurrentQuery\";\r\nimport { ElementMeshRequestProps } from \"../ElementMesh\";\r\nimport { ElementLoadOptions, ElementProps } from \"../ElementProps\";\r\nimport { EntityQueryParams } from \"../EntityProps\";\r\nimport { FontMapProps } from \"../Fonts\";\r\nimport {\r\n GeoCoordinatesRequestProps, GeoCoordinatesResponseProps, IModelCoordinatesRequestProps, IModelCoordinatesResponseProps,\r\n} from \"../GeoCoordinateServices\";\r\nimport { GeometryContainmentRequestProps, GeometryContainmentResponseProps } from \"../GeometryContainment\";\r\nimport { GeometrySummaryRequestProps } from \"../GeometrySummary\";\r\nimport { IModelConnectionProps, IModelRpcOpenProps, IModelRpcProps } from \"../IModel\";\r\nimport {\r\n MassPropertiesPerCandidateRequestProps, MassPropertiesPerCandidateResponseProps, MassPropertiesRequestProps, MassPropertiesResponseProps,\r\n} from \"../MassProperties\";\r\nimport { ModelProps } from \"../ModelProps\";\r\nimport { RpcInterface } from \"../RpcInterface\";\r\nimport { RpcManager } from \"../RpcManager\";\r\nimport { SnapRequestProps, SnapResponseProps } from \"../internal/Snapping\";\r\nimport { TextureData, TextureLoadProps } from \"../TextureProps\";\r\nimport {\r\n CustomViewState3dCreatorOptions, CustomViewState3dProps, HydrateViewStateRequestProps, HydrateViewStateResponseProps, SubCategoryResultRow,\r\n ViewStateLoadProps, ViewStateProps,\r\n} from \"../ViewProps\";\r\nimport { RpcResponseCacheControl } from \"./core/RpcConstants\";\r\nimport { RpcNotFoundResponse } from \"./core/RpcControl\";\r\nimport { RpcOperation } from \"./core/RpcOperation\";\r\nimport { RpcRoutingToken } from \"./core/RpcRoutingToken\";\r\n\r\n/** Response if the IModelDb was not found at the backend\r\n * (if the service has moved)\r\n * @public\r\n */\r\nexport class IModelNotFoundResponse extends RpcNotFoundResponse {\r\n public isIModelNotFoundResponse: boolean = true;\r\n public override message = \"iModel not found\";\r\n}\r\n\r\n/** Describes the volume of geometry contained with a [GeometricModel]($backend) as returned by\r\n * [IModelConnection.Models.queryExtents]($frontend) and [IModelDb.Models.queryExtents]($backend).\r\n * @public\r\n */\r\nexport interface ModelExtentsProps {\r\n /** The Id of the model, or [Id64.invalid]($bentley) if the input model Id was not a well-formed [Id64String]($bentley). */\r\n id: Id64String;\r\n /** The volume of geometry contained within the model.\r\n * This range will be null (@see [Range3d.isNull]($geometry)) if [[status]] is not [IModelStatus.Success]($bentley) or the model contains no geometry.\r\n */\r\n extents: Range3dProps;\r\n /** A status code indicating what if any error occurred obtaining the model's extents. For example:\r\n * - [IModelStatus.InvalidId]($bentley) if the input model Id was not a well-formed [Id64String]($bentley);\r\n * - [IModelStatus.NotFound]($bentley) if no model with the specified Id exists in the [[IModel]];\r\n * - [IModelStatus.WrongModel]($bentley) if the specified model is not a [GeometricModel]($backend); or\r\n * - [IModelStatus.Success]($bentley) if the extents were successfully obtained.\r\n *\r\n * If `status` is anything other than [IModelStatus.Success]($bentley), [[extents]] will be a null range.\r\n */\r\n status: IModelStatus;\r\n}\r\n\r\n/** The RPC interface for reading from an iModel.\r\n * All operations only require read-only access.\r\n * This interface is not normally used directly. See IModelConnection for higher-level and more convenient API for accessing iModels from a frontend.\r\n * @internal\r\n */\r\nexport abstract class IModelReadRpcInterface extends RpcInterface {\r\n /** Returns the IModelReadRpcInterface instance for the frontend. */\r\n public static getClient(): IModelReadRpcInterface { return RpcManager.getClientForInterface(IModelReadRpcInterface); }\r\n\r\n /** Returns the IModelReadRpcInterface instance for a custom RPC routing configuration. */\r\n public static getClientForRouting(token: RpcRoutingToken): IModelReadRpcInterface { return RpcManager.getClientForInterface(IModelReadRpcInterface, token); }\r\n\r\n /** The immutable name of the interface. */\r\n public static readonly interfaceName = \"IModelReadRpcInterface\";\r\n\r\n /** The semantic version of the interface. */\r\n public static interfaceVersion = \"3.7.0\";\r\n\r\n /*===========================================================================================\r\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\r\n NOTE: Please consult the README in this folder for the semantic versioning rules.\r\n ===========================================================================================*/\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async getConnectionProps(_iModelToken: IModelRpcOpenProps): Promise<IModelConnectionProps> { return this.forward(arguments); }\r\n public async queryRows(_iModelToken: IModelRpcProps, _request: DbQueryRequest): Promise<DbQueryResponse> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async querySubCategories(_iModelToken: IModelRpcProps, _categoryIds: CompressedId64Set): Promise<SubCategoryResultRow[]> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async queryAllUsedSpatialSubCategories(_iModelToken: IModelRpcProps): Promise<SubCategoryResultRow[]> { return this.forward(arguments); }\r\n public async queryBlob(_iModelToken: IModelRpcProps, _request: DbBlobRequest): Promise<DbBlobResponse> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async getModelProps(_iModelToken: IModelRpcProps, _modelIds: Id64String[]): Promise<ModelProps[]> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async queryModelRanges(_iModelToken: IModelRpcProps, _modelIds: Id64String[]): Promise<Range3dProps[]> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async queryModelExtents(_iModelToken: IModelRpcProps, _modelIds: Id64String[]): Promise<ModelExtentsProps[]> { return this.forward(arguments); }\r\n public async queryModelProps(_iModelToken: IModelRpcProps, _params: EntityQueryParams): Promise<ModelProps[]> { return this.forward(arguments); }\r\n public async getElementProps(_iModelToken: IModelRpcProps, _elementIds: Id64String[]): Promise<ElementProps[]> { return this.forward(arguments); }\r\n public async queryElementProps(_iModelToken: IModelRpcProps, _params: EntityQueryParams): Promise<ElementProps[]> { return this.forward(arguments); }\r\n public async queryEntityIds(_iModelToken: IModelRpcProps, _params: EntityQueryParams): Promise<Id64String[]> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async getClassHierarchy(_iModelToken: IModelRpcProps, _startClassName: string): Promise<string[]> { return this.forward(arguments); }\r\n public async getAllCodeSpecs(_iModelToken: IModelRpcProps): Promise<any[]> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async getViewStateData(_iModelToken: IModelRpcProps, _viewDefinitionId: string, _options?: ViewStateLoadProps): Promise<ViewStateProps> { return this.forward(arguments); }\r\n public async readFontJson(_iModelToken: IModelRpcProps): Promise<FontMapProps> { return this.forward(arguments); }\r\n public async getToolTipMessage(_iModelToken: IModelRpcProps, _elementId: string): Promise<string[]> { return this.forward(arguments); }\r\n /** @deprecated in 3.x use ViewStore apis. */\r\n public async getViewThumbnail(_iModelToken: IModelRpcProps, _viewId: string): Promise<Uint8Array> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async getDefaultViewId(_iModelToken: IModelRpcProps): Promise<Id64String> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async getCustomViewState3dData(_iModelToken: IModelRpcProps, _options: CustomViewState3dCreatorOptions): Promise<CustomViewState3dProps> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async hydrateViewState(_iModelToken: IModelRpcProps, _options: HydrateViewStateRequestProps): Promise<HydrateViewStateResponseProps> { return this.forward(arguments); }\r\n public async requestSnap(_iModelToken: IModelRpcProps, _sessionId: string, _props: SnapRequestProps): Promise<SnapResponseProps> { return this.forward(arguments); }\r\n public async cancelSnap(_iModelToken: IModelRpcProps, _sessionId: string): Promise<void> { return this.forward(arguments); }\r\n public async getGeometryContainment(_iModelToken: IModelRpcProps, _props: GeometryContainmentRequestProps): Promise<GeometryContainmentResponseProps> { return this.forward(arguments); }\r\n public async getMassProperties(_iModelToken: IModelRpcProps, _props: MassPropertiesRequestProps): Promise<MassPropertiesResponseProps> { return this.forward(arguments); }\r\n public async getMassPropertiesPerCandidate(_iModelToken: IModelRpcProps, _props: MassPropertiesPerCandidateRequestProps): Promise<MassPropertiesPerCandidateResponseProps[]> { return this.forward(arguments); }\r\n public async getIModelCoordinatesFromGeoCoordinates(_iModelToken: IModelRpcProps, _props: IModelCoordinatesRequestProps): Promise<IModelCoordinatesResponseProps> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async getGeoCoordinatesFromIModelCoordinates(_iModelToken: IModelRpcProps, _props: GeoCoordinatesRequestProps): Promise<GeoCoordinatesResponseProps> { return this.forward(arguments); }\r\n public async getGeometrySummary(_iModelToken: IModelRpcProps, _props: GeometrySummaryRequestProps): Promise<string> { return this.forward(arguments); }\r\n public async queryTextureData(_iModelToken: IModelRpcProps, _textureLoadProps: TextureLoadProps): Promise<TextureData | undefined> { return this.forward(arguments); }\r\n public async loadElementProps(_iModelToken: IModelRpcProps, _elementIdentifier: Id64String | GuidString | CodeProps, _options?: ElementLoadOptions): Promise<ElementProps | undefined> {\r\n return this.forward(arguments);\r\n }\r\n public async generateElementMeshes(_iModelToken: IModelRpcProps, _props: ElementMeshRequestProps): Promise<Uint8Array> {\r\n return this.forward(arguments);\r\n }\r\n /** @internal */\r\n public async callViewStore(_iModelToken: IModelRpcProps, _version: string, _forWrite: boolean, _methodName: string, ..._args: any[]): Promise<any> { return this.forward(arguments); }\r\n}\r\n"]}
|
|
@@ -75,6 +75,6 @@ IModelTileRpcInterface.interfaceName = "IModelTileRpcInterface";
|
|
|
75
75
|
/** The semantic version of the interface. */
|
|
76
76
|
IModelTileRpcInterface.interfaceVersion = "3.2.0";
|
|
77
77
|
__decorate([
|
|
78
|
-
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
78
|
+
RpcOperation_1.RpcOperation.allowResponseCaching(RpcConstants_1.RpcResponseCacheControl.Immutable)
|
|
79
79
|
], IModelTileRpcInterface.prototype, "requestTileTreeProps", null);
|
|
80
80
|
//# sourceMappingURL=IModelTileRpcInterface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelTileRpcInterface.js","sourceRoot":"","sources":["../../../src/rpc/IModelTileRpcInterface.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;AAIH,sDAA8D;AAC9D,sDAAmD;AAEnD,kDAA+C;AAC/C,8CAA2C;AAI3C,cAAc;AACd,MAAsB,sBAAuB,SAAQ,2BAAY;IACxD,MAAM,CAAC,SAAS,KAA6B,OAAO,uBAAU,CAAC,qBAAqB,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAQtH;;;iGAG6F;IAE7F;;;OAGG;IACI,KAAK,CAAC,kBAAkB,CAAC,WAA2B;QACzD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC/C,OAAO,QAAQ,IAAI,EAAE,GAAG,QAAQ,EAAE,UAAU,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;IAChF,CAAC;IAED,gBAAgB;IAEH,AAAN,KAAK,CAAC,oBAAoB,CAAC,WAA2B,EAAE,GAAW,IAAkC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,C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AS,CAAC;kEACwE","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 RpcInterface\r\n */\r\n\r\nimport type { TransferConfig } from \"@itwin/object-storage-core/lib/common\";\r\nimport { Id64Array } from \"@itwin/core-bentley\";\r\nimport { RpcResponseCacheControl } from \"./core/RpcConstants\";\r\nimport { RpcOperation } from \"./core/RpcOperation\";\r\nimport { IModelRpcProps } from \"../IModel\";\r\nimport { RpcInterface } from \"../RpcInterface\";\r\nimport { RpcManager } from \"../RpcManager\";\r\nimport { ElementGraphicsRequestProps } from \"../tile/ElementGraphics\";\r\nimport { IModelTileTreeProps, TileContentIdentifier, TileContentSource, TileVersionInfo } from \"../TileProps\";\r\n\r\n/** @public */\r\nexport abstract class IModelTileRpcInterface extends RpcInterface {\r\n public static getClient(): IModelTileRpcInterface { return RpcManager.getClientForInterface(IModelTileRpcInterface); }\r\n\r\n /** The immutable name of the interface. */\r\n public static readonly interfaceName = \"IModelTileRpcInterface\";\r\n\r\n /** The semantic version of the interface. */\r\n public static interfaceVersion = \"3.2.0\";\r\n\r\n /*===========================================================================================\r\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\r\n NOTE: Please consult the README in this folder for the semantic versioning rules.\r\n ===========================================================================================*/\r\n\r\n /** Get storage config required to download tiles from the tile cache.\r\n * @returns undefined if the backend does not support caching. In that case, tiles must be requested using [[generateTileContent]].\r\n * @beta\r\n */\r\n public async getTileCacheConfig(_tokenProps: IModelRpcProps): Promise<TransferConfig | undefined> {\r\n const response = await this.forward(arguments);\r\n return response && { ...response, expiration: new Date(response.expiration) };\r\n }\r\n\r\n /** @internal */\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async requestTileTreeProps(_tokenProps: IModelRpcProps, _id: string): Promise<IModelTileTreeProps> { return this.forward(arguments); }\r\n\r\n /** Ask the backend to generate content for the specified tile. This function, unlike the deprecated `requestTileContent`, does not check the cloud storage tile cache -\r\n * Use `CloudStorageTileCache.retrieve` for that.\r\n * @returns TileContentSource - if Backend, use retrieveTileContent. If ExternalCache, use TileAdmin.requestCachedTileContent\r\n * @internal\r\n */\r\n public async generateTileContent(_rpcProps: IModelRpcProps, _treeId: string, _contentId: string, _guid: string | undefined): Promise<TileContentSource> {\r\n return this.forward(arguments);\r\n }\r\n\r\n /** Retrieves tile content from the backend once it's generated by generateTileContent.\r\n * @internal\r\n */\r\n public async retrieveTileContent(_rpcProps: IModelRpcProps, _key: TileContentIdentifier): Promise<Uint8Array> {\r\n return this.forward(arguments);\r\n }\r\n\r\n /** @internal */\r\n public async queryVersionInfo(): Promise<TileVersionInfo> {\r\n return this.forward(arguments);\r\n }\r\n\r\n /** This is a temporary workaround for folks developing authoring applications, to be removed when proper support for such applications is introduced.\r\n * Given a set of model Ids, it purges any associated tile tree state on the back-end so that the next request for the tile tree or content will recreate that state.\r\n * Invoked after a modification is made to the model(s).\r\n * If no array of model Ids is supplied, it purges *all* tile trees, which can be quite inefficient.\r\n * @internal\r\n */\r\n public async purgeTileTrees(_tokenProps: IModelRpcProps, _modelIds: Id64Array | undefined): Promise<void> { return this.forward(arguments); }\r\n\r\n /** Requests graphics for a single element in \"iMdl\" format.\r\n * @returns graphics in iMdl format, or `undefined` if the element's geometry produced no graphics or the request was canceled before completion.\r\n * @throws IModelError on bad request (nonexistent element, duplicate request Id, etc).\r\n * @internal\r\n */\r\n public async requestElementGraphics(_rpcProps: IModelRpcProps, _request: ElementGraphicsRequestProps): Promise<Uint8Array | undefined> {\r\n return this.forward(arguments);\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnapshotIModelRpcInterface.js","sourceRoot":"","sources":["../../../src/rpc/SnapshotIModelRpcInterface.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;AAGH,kDAA+C;AAC/C,8CAA2C;AAC3C,sDAAmD;AAInD,MAAM,eAAe,GAA8B,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAEhH;;;GAGG;AACH,MAAsB,0BAA2B,SAAQ,2BAAY;IACnE,+EAA+E;IACxE,MAAM,CAAC,SAAS,KAAiC,OAAO,uBAAU,CAAC,qBAAqB,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC;IAE9H,qGAAqG;IAC9F,MAAM,CAAC,mBAAmB,CAAC,KAAsB,IAAgC,OAAO,uBAAU,CAAC,qBAAqB,CAAC,0BAA0B,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAQrK;;;iGAG6F;IAGhF,AAAN,KAAK,CAAC,QAAQ,CAAC,SAAiB,EAAE,KAA2B,IAAoC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAEzI;;OAEG;IAEU,AAAN,KAAK,CAAC,UAAU,CAAC,IAAY,EAAE,KAA2B,IAAoC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAE/H,KAAK,CAAC,KAAK,CAAC,eAA+B,IAAsB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;;AA3B3G,gEA4BC;AArBC,2CAA2C;AACpB,wCAAa,GAAG,4BAA4B,CAAC;AAEpE,oCAAoC;AACtB,2CAAgB,GAAG,OAAO,CAAC;AAQ5B;IADZ,2BAAY,CAAC,eAAe,CAAC,eAAe,CAAC;0DAC2F;AAM5H;IADZ,2BAAY,CAAC,eAAe,CAAC,eAAe,CAAC;4DACwF","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 RpcInterface\r\n */\r\n\r\nimport { IModelConnectionProps, IModelRpcProps, SnapshotOpenOptions } from \"../IModel\";\r\nimport { RpcInterface } from \"../RpcInterface\";\r\nimport { RpcManager } from \"../RpcManager\";\r\nimport { RpcOperation } from \"./core/RpcOperation\";\r\nimport { RpcRequestTokenSupplier_T } from \"./core/RpcRequest\";\r\nimport { RpcRoutingToken } from \"./core/RpcRoutingToken\";\r\n\r\nconst unknownIModelId: RpcRequestTokenSupplier_T = (req) => ({ iModelId: \"undefined\", key: req.parameters[0] });\r\n\r\n/** The RPC interface for working with *snapshot* iModels.\r\n * This interface is intended for desktop and mobile products. Web products are discouraged from registering this interface.\r\n * @internal\r\n */\r\nexport abstract class SnapshotIModelRpcInterface extends RpcInterface {
|
|
1
|
+
{"version":3,"file":"SnapshotIModelRpcInterface.js","sourceRoot":"","sources":["../../../src/rpc/SnapshotIModelRpcInterface.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;AAGH,kDAA+C;AAC/C,8CAA2C;AAC3C,sDAAmD;AAInD,MAAM,eAAe,GAA8B,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAEhH;;;GAGG;AACH,MAAsB,0BAA2B,SAAQ,2BAAY;IACnE,+EAA+E;IACxE,MAAM,CAAC,SAAS,KAAiC,OAAO,uBAAU,CAAC,qBAAqB,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC;IAE9H,qGAAqG;IAC9F,MAAM,CAAC,mBAAmB,CAAC,KAAsB,IAAgC,OAAO,uBAAU,CAAC,qBAAqB,CAAC,0BAA0B,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAQrK;;;iGAG6F;IAGhF,AAAN,KAAK,CAAC,QAAQ,CAAC,SAAiB,EAAE,KAA2B,IAAoC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAEzI;;OAEG;IAEU,AAAN,KAAK,CAAC,UAAU,CAAC,IAAY,EAAE,KAA2B,IAAoC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAE/H,KAAK,CAAC,KAAK,CAAC,eAA+B,IAAsB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;;AA3B3G,gEA4BC;AArBC,2CAA2C;AACpB,wCAAa,GAAG,4BAA4B,CAAC;AAEpE,oCAAoC;AACtB,2CAAgB,GAAG,OAAO,CAAC;AAQ5B;IADZ,2BAAY,CAAC,eAAe,CAAC,eAAe,CAAC;0DAC2F;AAM5H;IADZ,2BAAY,CAAC,eAAe,CAAC,eAAe,CAAC;4DACwF","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 RpcInterface\r\n */\r\n\r\nimport { IModelConnectionProps, IModelRpcProps, SnapshotOpenOptions } from \"../IModel\";\r\nimport { RpcInterface } from \"../RpcInterface\";\r\nimport { RpcManager } from \"../RpcManager\";\r\nimport { RpcOperation } from \"./core/RpcOperation\";\r\nimport { RpcRequestTokenSupplier_T } from \"./core/RpcRequest\";\r\nimport { RpcRoutingToken } from \"./core/RpcRoutingToken\";\r\n\r\nconst unknownIModelId: RpcRequestTokenSupplier_T = (req) => ({ iModelId: \"undefined\", key: req.parameters[0] });\r\n\r\n/** The RPC interface for working with *snapshot* iModels.\r\n * This interface is intended for desktop and mobile products. Web products are discouraged from registering this interface.\r\n * @internal\r\n */\r\nexport abstract class SnapshotIModelRpcInterface extends RpcInterface {\r\n /** Returns the SnapshotIModelRpcInterface client instance for the frontend. */\r\n public static getClient(): SnapshotIModelRpcInterface { return RpcManager.getClientForInterface(SnapshotIModelRpcInterface); }\r\n\r\n /** Returns the SnapshotIModelRpcInterface client instance for a custom RPC routing configuration. */\r\n public static getClientForRouting(token: RpcRoutingToken): SnapshotIModelRpcInterface { return RpcManager.getClientForInterface(SnapshotIModelRpcInterface, token); }\r\n\r\n /** The immutable name of the interface. */\r\n public static readonly interfaceName = \"SnapshotIModelRpcInterface\";\r\n\r\n /** The version of the interface. */\r\n public static interfaceVersion = \"2.0.0\";\r\n\r\n /*===========================================================================================\r\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\r\n NOTE: Please consult the README in this folder for the semantic versioning rules.\r\n ===========================================================================================*/\r\n\r\n @RpcOperation.setRoutingProps(unknownIModelId)\r\n public async openFile(_filePath: string, _opts?: SnapshotOpenOptions): Promise<IModelConnectionProps> { return this.forward(arguments); }\r\n\r\n /**\r\n * @deprecated in 4.10. Use [[CheckpointConnection.openRemote]].\r\n */\r\n @RpcOperation.setRoutingProps(unknownIModelId)\r\n public async openRemote(_key: string, _opts?: SnapshotOpenOptions): Promise<IModelConnectionProps> { return this.forward(arguments); }\r\n\r\n public async close(_iModelRpcProps: IModelRpcProps): Promise<boolean> { return this.forward(arguments); }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestRpcManager.d.ts","sourceRoot":"","sources":["../../../src/rpc/TestRpcManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"TestRpcManager.d.ts","sourceRoot":"","sources":["../../../src/rpc/TestRpcManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAGzD;;;;;;;;;;;;GAYG;AACH,qBAAa,cAAc;WACX,UAAU,CAAC,UAAU,EAAE,sBAAsB,EAAE;CAW9D"}
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.TestRpcManager = void 0;
|
|
11
11
|
const RpcConfiguration_1 = require("./core/RpcConfiguration");
|
|
12
|
-
/* eslint-disable deprecation/deprecation */
|
|
13
12
|
/** An RpcManager that uses RpcDefaultConfiguration/RpcDirectProtocol to make client stubs invoke
|
|
14
13
|
* registered server impls as direct method calls within the same JavaScript context. In other words,
|
|
15
14
|
* TestRpcManager sets up a protocol that uses our remoting mechanism but cuts out the communication
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestRpcManager.js","sourceRoot":"","sources":["../../../src/rpc/TestRpcManager.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,8DAAoF;AAEpF
|
|
1
|
+
{"version":3,"file":"TestRpcManager.js","sourceRoot":"","sources":["../../../src/rpc/TestRpcManager.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,8DAAoF;AAEpF;;;;;;;;;;;;GAYG;AACH,MAAa,cAAc;IAClB,MAAM,CAAC,UAAU,CAAC,UAAoC;QAC3D,MAAM,MAAM,GAAG,KAAM,SAAQ,0CAAuB;YAArC;;gBACG,eAAU,GAAQ,GAAG,EAAE,CAAC,UAAU,CAAC;YACrD,CAAC;SAAA,CAAC;QAEF,KAAK,MAAM,GAAG,IAAI,UAAU;YAC1B,mCAAgB,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,0CAAuB,CAAC,CAAC;QAE9D,MAAM,QAAQ,GAAG,mCAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACjD,mCAAgB,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IAClD,CAAC;CACF;AAZD,wCAYC","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 RpcInterface\r\n */\r\n\r\nimport { RpcInterfaceDefinition } from \"../RpcInterface\";\r\nimport { RpcConfiguration, RpcDefaultConfiguration } from \"./core/RpcConfiguration\";\r\n\r\n/** An RpcManager that uses RpcDefaultConfiguration/RpcDirectProtocol to make client stubs invoke\r\n * registered server impls as direct method calls within the same JavaScript context. In other words,\r\n * TestRpcManager sets up a protocol that uses our remoting mechanism but cuts out the communication\r\n * part of it. (No IPC or XHR is used or required.)\r\n * Nevertheless, all of the rest of the call marshalling and operation monitoring mechanism is used.\r\n * That makes TestRpcManager a way to write simple, single-process integration tests for frontends\r\n * and backends that actually use RpcInterfaces. Note that to write such a single-process integration\r\n * test, you must make *both* client and server use TestRpcManager to configure their RpcInterfaces.\r\n * It will not work if one side uses TestRpcManager and the other uses some other protocol (say, cloud).\r\n * That means that you must actually program the backend to know when it is running in direct test\r\n * mode and to employ TestRpcManager in that case.\r\n * @internal\r\n */\r\nexport class TestRpcManager {\r\n public static initialize(interfaces: RpcInterfaceDefinition[]) {\r\n const config = class extends RpcDefaultConfiguration {\r\n public override interfaces: any = () => interfaces;\r\n };\r\n\r\n for (const def of interfaces)\r\n RpcConfiguration.assign(def, () => RpcDefaultConfiguration);\r\n\r\n const instance = RpcConfiguration.obtain(config);\r\n RpcConfiguration.initializeInterfaces(instance);\r\n }\r\n}\r\n"]}
|
|
@@ -21,7 +21,7 @@ const RpcManager_1 = require("../RpcManager");
|
|
|
21
21
|
*/
|
|
22
22
|
class WipRpcInterface extends RpcInterface_1.RpcInterface {
|
|
23
23
|
/** Returns the IModelReadRpcInterface instance for the frontend. */
|
|
24
|
-
static getClient() { return RpcManager_1.RpcManager.getClientForInterface(WipRpcInterface); } // eslint-disable-line
|
|
24
|
+
static getClient() { return RpcManager_1.RpcManager.getClientForInterface(WipRpcInterface); } // eslint-disable-line @typescript-eslint/no-deprecated
|
|
25
25
|
/*===========================================================================================
|
|
26
26
|
NOTE: Any add/remove/change to the methods below requires an update of the interface version.
|
|
27
27
|
NOTE: Please consult the README in this folder for the semantic versioning rules.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WipRpcInterface.js","sourceRoot":"","sources":["../../../src/rpc/WipRpcInterface.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH,kDAA+C;AAC/C,8CAA2C;AAE3C;;;;;;;;GAQG;AACH,MAAsB,eAAgB,SAAQ,2BAAY;IACxD,oEAAoE;IAC7D,MAAM,CAAC,SAAS,KAAsB,OAAO,uBAAU,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"WipRpcInterface.js","sourceRoot":"","sources":["../../../src/rpc/WipRpcInterface.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH,kDAA+C;AAC/C,8CAA2C;AAE3C;;;;;;;;GAQG;AACH,MAAsB,eAAgB,SAAQ,2BAAY;IACxD,oEAAoE;IAC7D,MAAM,CAAC,SAAS,KAAsB,OAAO,uBAAU,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,uDAAuD;IAUhK;;;gGAG4F;IACrF,KAAK,CAAC,WAAW,CAAC,YAA4B,IAAqB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,2DAA2D;IAChK,KAAK,CAAC,qBAAqB,CAAC,YAA4B,IAAsB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAC/G,KAAK,CAAC,iBAAiB,CAAC,YAA4B,IAAmB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACxG,KAAK,CAAC,kBAAkB,CAAC,YAA4B,EAAE,iBAAyB,EAAE,eAAuB,IAA0C,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACpL,KAAK,CAAC,oBAAoB,CAAC,YAA4B,EAAE,YAAoB,IAAsB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;;AApB7I,0CAqBC;AAjBC,2CAA2C;AACpB,6BAAa,GAAG,iBAAiB,CAAC;AAEzD;;GAEG;AACW,gCAAgB,GAAG,OAAO,CAAC","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 RpcInterface\r\n */\r\n\r\nimport { ChangedElements } from \"../ChangedElements\";\r\nimport { IModelRpcProps } from \"../IModel\";\r\nimport { RpcInterface } from \"../RpcInterface\";\r\nimport { RpcManager } from \"../RpcManager\";\r\n\r\n/** The purpose of this class is to house WIP RPC methods. For example:\r\n * - WIP methods where signatures or behavior is still changing\r\n * - Experimental methods that we may decide are a bad idea and never release\r\n * The idea is to house these WIP RPC methods away from other RpcInterfaces that have stated compatibility goals.\r\n * Once stable, the goal is to move methods out to their rightful home.\r\n * Apps/services should understand the *flux* implied by registering this RpcInterface and should be in control of both the client and server before even considering using it.\r\n * @internal\r\n * @deprecated in 4.10. If any of these methods are needed in the frontend, they should be rewritten using IPC or HTTP protocol.\r\n */\r\nexport abstract class WipRpcInterface extends RpcInterface {\r\n /** Returns the IModelReadRpcInterface instance for the frontend. */\r\n public static getClient(): WipRpcInterface { return RpcManager.getClientForInterface(WipRpcInterface); } // eslint-disable-line @typescript-eslint/no-deprecated\r\n\r\n /** The immutable name of the interface. */\r\n public static readonly interfaceName = \"WipRpcInterface\";\r\n\r\n /** The semantic version of the interface.\r\n * @note The WipRpcInterface will never progress to 1.0 since it is never intended to be public.\r\n */\r\n public static interfaceVersion = \"0.5.0\";\r\n\r\n /*===========================================================================================\r\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\r\n NOTE: Please consult the README in this folder for the semantic versioning rules.\r\n ==========================================================================================*/\r\n public async placeholder(_iModelToken: IModelRpcProps): Promise<string> { return this.forward(arguments); } // here to test that WipRpcInterface is configured properly\r\n public async isChangeCacheAttached(_iModelToken: IModelRpcProps): Promise<boolean> { return this.forward(arguments); }\r\n public async attachChangeCache(_iModelToken: IModelRpcProps): Promise<void> { return this.forward(arguments); }\r\n public async getChangedElements(_iModelToken: IModelRpcProps, _startChangesetId: string, _endChangesetId: string): Promise<ChangedElements | undefined> { return this.forward(arguments); }\r\n public async isChangesetProcessed(_iModelToken: IModelRpcProps, _changesetId: string): Promise<boolean> { return this.forward(arguments); }\r\n}\r\n"]}
|