@itwin/core-frontend 5.1.0-dev.4 → 5.1.0-dev.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +91 -1
- package/lib/cjs/AccuDraw.d.ts +2 -0
- package/lib/cjs/AccuDraw.d.ts.map +1 -1
- package/lib/cjs/AccuDraw.js +2 -0
- package/lib/cjs/AccuDraw.js.map +1 -1
- package/lib/cjs/AccuSnap.js +2 -2
- package/lib/cjs/AccuSnap.js.map +1 -1
- package/lib/cjs/GraphicalEditingScope.d.ts +1 -1
- package/lib/cjs/GraphicalEditingScope.d.ts.map +1 -1
- package/lib/cjs/GraphicalEditingScope.js +1 -1
- package/lib/cjs/GraphicalEditingScope.js.map +1 -1
- package/lib/cjs/HitDetail.d.ts +1 -1
- package/lib/cjs/HitDetail.d.ts.map +1 -1
- package/lib/cjs/HitDetail.js.map +1 -1
- package/lib/cjs/IModelApp.d.ts +18 -3
- package/lib/cjs/IModelApp.d.ts.map +1 -1
- package/lib/cjs/IModelApp.js +20 -1
- package/lib/cjs/IModelApp.js.map +1 -1
- package/lib/cjs/IModelConnection.d.ts +6 -6
- package/lib/cjs/IModelConnection.js +6 -6
- package/lib/cjs/IModelConnection.js.map +1 -1
- package/lib/cjs/IpcApp.d.ts +2 -1
- package/lib/cjs/IpcApp.d.ts.map +1 -1
- package/lib/cjs/IpcApp.js +4 -2
- package/lib/cjs/IpcApp.js.map +1 -1
- package/lib/cjs/SelectionSet.d.ts +7 -7
- package/lib/cjs/SelectionSet.js +3 -3
- package/lib/cjs/SelectionSet.js.map +1 -1
- package/lib/cjs/SheetViewState.d.ts +2 -0
- package/lib/cjs/SheetViewState.d.ts.map +1 -1
- package/lib/cjs/SheetViewState.js +25 -3
- package/lib/cjs/SheetViewState.js.map +1 -1
- package/lib/cjs/ViewContext.d.ts +4 -1
- package/lib/cjs/ViewContext.d.ts.map +1 -1
- package/lib/cjs/ViewContext.js +10 -5
- package/lib/cjs/ViewContext.js.map +1 -1
- package/lib/cjs/ViewManager.js +2 -2
- package/lib/cjs/ViewManager.js.map +1 -1
- package/lib/cjs/ViewState.d.ts +1 -1
- package/lib/cjs/ViewState.js +1 -1
- package/lib/cjs/ViewState.js.map +1 -1
- package/lib/cjs/Viewport.d.ts +7 -5
- package/lib/cjs/Viewport.d.ts.map +1 -1
- package/lib/cjs/Viewport.js +9 -5
- package/lib/cjs/Viewport.js.map +1 -1
- package/lib/cjs/core-frontend.d.ts +1 -1
- package/lib/cjs/core-frontend.d.ts.map +1 -1
- package/lib/cjs/core-frontend.js.map +1 -1
- package/lib/cjs/extension/ExtensionRuntime.js +15 -2
- package/lib/cjs/extension/ExtensionRuntime.js.map +1 -1
- package/lib/cjs/extension/providers/ExtensionLoadScript.js.map +1 -1
- package/lib/cjs/internal/render/MockRender.d.ts +1 -1
- package/lib/cjs/internal/render/MockRender.d.ts.map +1 -1
- package/lib/cjs/internal/render/MockRender.js +1 -1
- package/lib/cjs/internal/render/MockRender.js.map +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.d.ts +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.js +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.js.map +1 -1
- package/lib/cjs/internal/render/webgl/AttributeBuffers.d.ts +2 -2
- package/lib/cjs/internal/render/webgl/AttributeBuffers.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/AttributeBuffers.js +2 -2
- package/lib/cjs/internal/render/webgl/AttributeBuffers.js.map +1 -1
- package/lib/cjs/internal/render/webgl/ClippingProgram.d.ts +1 -1
- package/lib/cjs/internal/render/webgl/ClippingProgram.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/ClippingProgram.js +1 -1
- package/lib/cjs/internal/render/webgl/ClippingProgram.js.map +1 -1
- package/lib/cjs/internal/render/webgl/RenderCommands.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/RenderCommands.js +2 -3
- package/lib/cjs/internal/render/webgl/RenderCommands.js.map +1 -1
- package/lib/cjs/internal/render/webgl/ShaderProgram.d.ts +2 -2
- package/lib/cjs/internal/render/webgl/ShaderProgram.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/ShaderProgram.js +2 -2
- package/lib/cjs/internal/render/webgl/ShaderProgram.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Target.d.ts +1 -1
- package/lib/cjs/internal/render/webgl/Target.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/Target.js +2 -2
- package/lib/cjs/internal/render/webgl/Target.js.map +1 -1
- package/lib/cjs/internal/render/webgl/TargetGraphics.d.ts +3 -3
- package/lib/cjs/internal/render/webgl/TargetGraphics.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/TargetGraphics.js +10 -7
- package/lib/cjs/internal/render/webgl/TargetGraphics.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Technique.d.ts +3 -3
- package/lib/cjs/internal/render/webgl/Technique.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/Technique.js +3 -3
- package/lib/cjs/internal/render/webgl/Technique.js.map +1 -1
- package/lib/cjs/internal/tile/ClassifierTileTree.js +3 -1
- package/lib/cjs/internal/tile/ClassifierTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/IModelTile.d.ts +1 -0
- package/lib/cjs/internal/tile/IModelTile.d.ts.map +1 -1
- package/lib/cjs/internal/tile/IModelTile.js +4 -0
- package/lib/cjs/internal/tile/IModelTile.js.map +1 -1
- package/lib/cjs/internal/tile/LayerTileTreeReferenceHandler.d.ts.map +1 -1
- package/lib/cjs/internal/tile/LayerTileTreeReferenceHandler.js +8 -0
- package/lib/cjs/internal/tile/LayerTileTreeReferenceHandler.js.map +1 -1
- package/lib/cjs/internal/tile/PrimaryTileTree.d.ts.map +1 -1
- package/lib/cjs/internal/tile/PrimaryTileTree.js +4 -3
- package/lib/cjs/internal/tile/PrimaryTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/RealityModelTileTree.d.ts +15 -1
- package/lib/cjs/internal/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/cjs/internal/tile/RealityModelTileTree.js +25 -11
- package/lib/cjs/internal/tile/RealityModelTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.js +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.d.ts +4 -0
- package/lib/cjs/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js +52 -11
- package/lib/cjs/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/WmtsCapabilities.d.ts +7 -0
- package/lib/cjs/internal/tile/map/WmtsCapabilities.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/WmtsCapabilities.js +17 -0
- package/lib/cjs/internal/tile/map/WmtsCapabilities.js.map +1 -1
- package/lib/cjs/properties/AngleDescription.d.ts +4 -1
- package/lib/cjs/properties/AngleDescription.d.ts.map +1 -1
- package/lib/cjs/properties/AngleDescription.js +10 -2
- package/lib/cjs/properties/AngleDescription.js.map +1 -1
- package/lib/cjs/properties/FormattedQuantityDescription.d.ts +11 -1
- package/lib/cjs/properties/FormattedQuantityDescription.d.ts.map +1 -1
- package/lib/cjs/properties/FormattedQuantityDescription.js +7 -2
- package/lib/cjs/properties/FormattedQuantityDescription.js.map +1 -1
- package/lib/cjs/properties/LengthDescription.d.ts +12 -3
- package/lib/cjs/properties/LengthDescription.d.ts.map +1 -1
- package/lib/cjs/properties/LengthDescription.js +30 -6
- package/lib/cjs/properties/LengthDescription.js.map +1 -1
- package/lib/cjs/quantity-formatting/QuantityFormatter.d.ts +103 -7
- package/lib/cjs/quantity-formatting/QuantityFormatter.d.ts.map +1 -1
- package/lib/cjs/quantity-formatting/QuantityFormatter.js +212 -23
- package/lib/cjs/quantity-formatting/QuantityFormatter.js.map +1 -1
- package/lib/cjs/render/Decorations.d.ts +1 -1
- package/lib/cjs/render/Decorations.d.ts.map +1 -1
- package/lib/cjs/render/Decorations.js +1 -1
- package/lib/cjs/render/Decorations.js.map +1 -1
- package/lib/cjs/render/GraphicBranch.d.ts +1 -1
- package/lib/cjs/render/GraphicBranch.d.ts.map +1 -1
- package/lib/cjs/render/GraphicBranch.js +1 -1
- package/lib/cjs/render/GraphicBranch.js.map +1 -1
- package/lib/cjs/render/RenderGraphic.d.ts +1 -1
- package/lib/cjs/render/RenderGraphic.d.ts.map +1 -1
- package/lib/cjs/render/RenderGraphic.js.map +1 -1
- package/lib/cjs/render/RenderSystem.d.ts +2 -2
- package/lib/cjs/render/RenderSystem.d.ts.map +1 -1
- package/lib/cjs/render/RenderSystem.js.map +1 -1
- package/lib/cjs/render/RenderTarget.d.ts +1 -1
- package/lib/cjs/render/RenderTarget.d.ts.map +1 -1
- package/lib/cjs/render/RenderTarget.js.map +1 -1
- package/lib/cjs/render/ScreenSpaceEffectBuilder.d.ts +1 -1
- package/lib/cjs/render/ScreenSpaceEffectBuilder.js.map +1 -1
- package/lib/cjs/request/Request.d.ts +2 -2
- package/lib/cjs/request/Request.js.map +1 -1
- package/lib/cjs/tile/Tile.d.ts +1 -1
- package/lib/cjs/tile/Tile.d.ts.map +1 -1
- package/lib/cjs/tile/Tile.js +1 -1
- package/lib/cjs/tile/Tile.js.map +1 -1
- package/lib/cjs/tile/TileAdmin.d.ts +10 -0
- package/lib/cjs/tile/TileAdmin.d.ts.map +1 -1
- package/lib/cjs/tile/TileAdmin.js +3 -0
- package/lib/cjs/tile/TileAdmin.js.map +1 -1
- package/lib/cjs/tile/TileTree.d.ts +1 -1
- package/lib/cjs/tile/TileTree.d.ts.map +1 -1
- package/lib/cjs/tile/TileTree.js +1 -1
- package/lib/cjs/tile/TileTree.js.map +1 -1
- package/lib/cjs/tile/TileTreeReference.d.ts +1 -1
- package/lib/cjs/tile/TileTreeReference.d.ts.map +1 -1
- package/lib/cjs/tile/TileTreeReference.js +1 -1
- package/lib/cjs/tile/TileTreeReference.js.map +1 -1
- package/lib/cjs/tile/map/CesiumTerrainProvider.js +1 -1
- package/lib/cjs/tile/map/CesiumTerrainProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryTileTree.d.ts +2 -2
- package/lib/cjs/tile/map/ImageryTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/map/ImageryTileTree.js +2 -2
- package/lib/cjs/tile/map/ImageryTileTree.js.map +1 -1
- package/lib/cjs/tile/map/MapCartoRectangle.d.ts +10 -0
- package/lib/cjs/tile/map/MapCartoRectangle.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapCartoRectangle.js +12 -0
- package/lib/cjs/tile/map/MapCartoRectangle.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts +3 -3
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.js +9 -5
- package/lib/cjs/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.d.ts +1 -1
- package/lib/cjs/tile/map/MapTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.js +1 -1
- package/lib/cjs/tile/map/MapTileTree.js.map +1 -1
- package/lib/cjs/tile/map/QuadId.d.ts +15 -0
- package/lib/cjs/tile/map/QuadId.d.ts.map +1 -1
- package/lib/cjs/tile/map/QuadId.js +12 -0
- package/lib/cjs/tile/map/QuadId.js.map +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.d.ts +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.js +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.js.map +1 -1
- package/lib/cjs/tools/AccuDrawViewportUI.d.ts +7 -0
- package/lib/cjs/tools/AccuDrawViewportUI.d.ts.map +1 -1
- package/lib/cjs/tools/AccuDrawViewportUI.js +14 -0
- package/lib/cjs/tools/AccuDrawViewportUI.js.map +1 -1
- package/lib/cjs/tools/ElementSetTool.d.ts +9 -1
- package/lib/cjs/tools/ElementSetTool.d.ts.map +1 -1
- package/lib/cjs/tools/ElementSetTool.js +128 -7
- package/lib/cjs/tools/ElementSetTool.js.map +1 -1
- package/lib/cjs/tools/MeasureTool.d.ts +9 -0
- package/lib/cjs/tools/MeasureTool.d.ts.map +1 -1
- package/lib/cjs/tools/MeasureTool.js +53 -22
- package/lib/cjs/tools/MeasureTool.js.map +1 -1
- package/lib/cjs/tools/SelectTool.d.ts +2 -2
- package/lib/cjs/tools/SelectTool.d.ts.map +1 -1
- package/lib/cjs/tools/SelectTool.js +26 -97
- package/lib/cjs/tools/SelectTool.js.map +1 -1
- package/lib/cjs/tools/Tool.d.ts +10 -1
- package/lib/cjs/tools/Tool.d.ts.map +1 -1
- package/lib/cjs/tools/Tool.js +27 -4
- package/lib/cjs/tools/Tool.js.map +1 -1
- package/lib/cjs/tools/ToolAdmin.d.ts +1 -0
- package/lib/cjs/tools/ToolAdmin.d.ts.map +1 -1
- package/lib/cjs/tools/ToolAdmin.js +8 -2
- package/lib/cjs/tools/ToolAdmin.js.map +1 -1
- package/lib/cjs/tools/ToolSettings.d.ts +5 -0
- package/lib/cjs/tools/ToolSettings.d.ts.map +1 -1
- package/lib/cjs/tools/ToolSettings.js +5 -0
- package/lib/cjs/tools/ToolSettings.js.map +1 -1
- package/lib/cjs/tools/ViewTool.d.ts +1 -2
- package/lib/cjs/tools/ViewTool.d.ts.map +1 -1
- package/lib/cjs/tools/ViewTool.js +10 -47
- package/lib/cjs/tools/ViewTool.js.map +1 -1
- package/lib/esm/AccuDraw.d.ts +2 -0
- package/lib/esm/AccuDraw.d.ts.map +1 -1
- package/lib/esm/AccuDraw.js +2 -0
- package/lib/esm/AccuDraw.js.map +1 -1
- package/lib/esm/AccuSnap.js +2 -2
- package/lib/esm/AccuSnap.js.map +1 -1
- package/lib/esm/GraphicalEditingScope.d.ts +1 -1
- package/lib/esm/GraphicalEditingScope.d.ts.map +1 -1
- package/lib/esm/GraphicalEditingScope.js +1 -1
- package/lib/esm/GraphicalEditingScope.js.map +1 -1
- package/lib/esm/HitDetail.d.ts +1 -1
- package/lib/esm/HitDetail.d.ts.map +1 -1
- package/lib/esm/HitDetail.js.map +1 -1
- package/lib/esm/IModelApp.d.ts +18 -3
- package/lib/esm/IModelApp.d.ts.map +1 -1
- package/lib/esm/IModelApp.js +21 -2
- package/lib/esm/IModelApp.js.map +1 -1
- package/lib/esm/IModelConnection.d.ts +6 -6
- package/lib/esm/IModelConnection.js +6 -6
- package/lib/esm/IModelConnection.js.map +1 -1
- package/lib/esm/IpcApp.d.ts +2 -1
- package/lib/esm/IpcApp.d.ts.map +1 -1
- package/lib/esm/IpcApp.js +4 -2
- package/lib/esm/IpcApp.js.map +1 -1
- package/lib/esm/SelectionSet.d.ts +7 -7
- package/lib/esm/SelectionSet.js +3 -3
- package/lib/esm/SelectionSet.js.map +1 -1
- package/lib/esm/SheetViewState.d.ts +2 -0
- package/lib/esm/SheetViewState.d.ts.map +1 -1
- package/lib/esm/SheetViewState.js +25 -3
- package/lib/esm/SheetViewState.js.map +1 -1
- package/lib/esm/ViewContext.d.ts +4 -1
- package/lib/esm/ViewContext.d.ts.map +1 -1
- package/lib/esm/ViewContext.js +10 -5
- package/lib/esm/ViewContext.js.map +1 -1
- package/lib/esm/ViewManager.js +2 -2
- package/lib/esm/ViewManager.js.map +1 -1
- package/lib/esm/ViewState.d.ts +1 -1
- package/lib/esm/ViewState.js +1 -1
- package/lib/esm/ViewState.js.map +1 -1
- package/lib/esm/Viewport.d.ts +7 -5
- package/lib/esm/Viewport.d.ts.map +1 -1
- package/lib/esm/Viewport.js +9 -5
- package/lib/esm/Viewport.js.map +1 -1
- package/lib/esm/core-frontend.d.ts +1 -1
- package/lib/esm/core-frontend.d.ts.map +1 -1
- package/lib/esm/core-frontend.js.map +1 -1
- package/lib/esm/extension/ExtensionRuntime.js +15 -2
- package/lib/esm/extension/ExtensionRuntime.js.map +1 -1
- package/lib/esm/extension/providers/ExtensionLoadScript.js +1 -1
- package/lib/esm/extension/providers/ExtensionLoadScript.js.map +1 -1
- package/lib/esm/internal/render/MockRender.d.ts +1 -1
- package/lib/esm/internal/render/MockRender.d.ts.map +1 -1
- package/lib/esm/internal/render/MockRender.js +1 -1
- package/lib/esm/internal/render/MockRender.js.map +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.d.ts +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.js +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.js.map +1 -1
- package/lib/esm/internal/render/webgl/AttributeBuffers.d.ts +2 -2
- package/lib/esm/internal/render/webgl/AttributeBuffers.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/AttributeBuffers.js +2 -2
- package/lib/esm/internal/render/webgl/AttributeBuffers.js.map +1 -1
- package/lib/esm/internal/render/webgl/ClippingProgram.d.ts +1 -1
- package/lib/esm/internal/render/webgl/ClippingProgram.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/ClippingProgram.js +1 -1
- package/lib/esm/internal/render/webgl/ClippingProgram.js.map +1 -1
- package/lib/esm/internal/render/webgl/RenderCommands.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/RenderCommands.js +2 -3
- package/lib/esm/internal/render/webgl/RenderCommands.js.map +1 -1
- package/lib/esm/internal/render/webgl/ShaderProgram.d.ts +2 -2
- package/lib/esm/internal/render/webgl/ShaderProgram.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/ShaderProgram.js +2 -2
- package/lib/esm/internal/render/webgl/ShaderProgram.js.map +1 -1
- package/lib/esm/internal/render/webgl/Target.d.ts +1 -1
- package/lib/esm/internal/render/webgl/Target.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/Target.js +2 -2
- package/lib/esm/internal/render/webgl/Target.js.map +1 -1
- package/lib/esm/internal/render/webgl/TargetGraphics.d.ts +3 -3
- package/lib/esm/internal/render/webgl/TargetGraphics.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/TargetGraphics.js +10 -7
- package/lib/esm/internal/render/webgl/TargetGraphics.js.map +1 -1
- package/lib/esm/internal/render/webgl/Technique.d.ts +3 -3
- package/lib/esm/internal/render/webgl/Technique.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/Technique.js +3 -3
- package/lib/esm/internal/render/webgl/Technique.js.map +1 -1
- package/lib/esm/internal/tile/ClassifierTileTree.js +3 -1
- package/lib/esm/internal/tile/ClassifierTileTree.js.map +1 -1
- package/lib/esm/internal/tile/IModelTile.d.ts +1 -0
- package/lib/esm/internal/tile/IModelTile.d.ts.map +1 -1
- package/lib/esm/internal/tile/IModelTile.js +4 -0
- package/lib/esm/internal/tile/IModelTile.js.map +1 -1
- package/lib/esm/internal/tile/LayerTileTreeReferenceHandler.d.ts.map +1 -1
- package/lib/esm/internal/tile/LayerTileTreeReferenceHandler.js +8 -0
- package/lib/esm/internal/tile/LayerTileTreeReferenceHandler.js.map +1 -1
- package/lib/esm/internal/tile/PrimaryTileTree.d.ts.map +1 -1
- package/lib/esm/internal/tile/PrimaryTileTree.js +4 -3
- package/lib/esm/internal/tile/PrimaryTileTree.js.map +1 -1
- package/lib/esm/internal/tile/RealityModelTileTree.d.ts +15 -1
- package/lib/esm/internal/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/esm/internal/tile/RealityModelTileTree.js +24 -11
- package/lib/esm/internal/tile/RealityModelTileTree.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.js +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.d.ts +4 -0
- package/lib/esm/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js +52 -11
- package/lib/esm/internal/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/WmtsCapabilities.d.ts +7 -0
- package/lib/esm/internal/tile/map/WmtsCapabilities.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/WmtsCapabilities.js +17 -0
- package/lib/esm/internal/tile/map/WmtsCapabilities.js.map +1 -1
- package/lib/esm/properties/AngleDescription.d.ts +4 -1
- package/lib/esm/properties/AngleDescription.d.ts.map +1 -1
- package/lib/esm/properties/AngleDescription.js +10 -2
- package/lib/esm/properties/AngleDescription.js.map +1 -1
- package/lib/esm/properties/FormattedQuantityDescription.d.ts +11 -1
- package/lib/esm/properties/FormattedQuantityDescription.d.ts.map +1 -1
- package/lib/esm/properties/FormattedQuantityDescription.js +7 -2
- package/lib/esm/properties/FormattedQuantityDescription.js.map +1 -1
- package/lib/esm/properties/LengthDescription.d.ts +12 -3
- package/lib/esm/properties/LengthDescription.d.ts.map +1 -1
- package/lib/esm/properties/LengthDescription.js +30 -6
- package/lib/esm/properties/LengthDescription.js.map +1 -1
- package/lib/esm/quantity-formatting/QuantityFormatter.d.ts +103 -7
- package/lib/esm/quantity-formatting/QuantityFormatter.d.ts.map +1 -1
- package/lib/esm/quantity-formatting/QuantityFormatter.js +210 -23
- package/lib/esm/quantity-formatting/QuantityFormatter.js.map +1 -1
- package/lib/esm/render/Decorations.d.ts +1 -1
- package/lib/esm/render/Decorations.d.ts.map +1 -1
- package/lib/esm/render/Decorations.js +1 -1
- package/lib/esm/render/Decorations.js.map +1 -1
- package/lib/esm/render/GraphicBranch.d.ts +1 -1
- package/lib/esm/render/GraphicBranch.d.ts.map +1 -1
- package/lib/esm/render/GraphicBranch.js +1 -1
- package/lib/esm/render/GraphicBranch.js.map +1 -1
- package/lib/esm/render/RenderGraphic.d.ts +1 -1
- package/lib/esm/render/RenderGraphic.d.ts.map +1 -1
- package/lib/esm/render/RenderGraphic.js.map +1 -1
- package/lib/esm/render/RenderSystem.d.ts +2 -2
- package/lib/esm/render/RenderSystem.d.ts.map +1 -1
- package/lib/esm/render/RenderSystem.js.map +1 -1
- package/lib/esm/render/RenderTarget.d.ts +1 -1
- package/lib/esm/render/RenderTarget.d.ts.map +1 -1
- package/lib/esm/render/RenderTarget.js.map +1 -1
- package/lib/esm/render/ScreenSpaceEffectBuilder.d.ts +1 -1
- package/lib/esm/render/ScreenSpaceEffectBuilder.js.map +1 -1
- package/lib/esm/request/Request.d.ts +2 -2
- package/lib/esm/request/Request.js.map +1 -1
- package/lib/esm/tile/Tile.d.ts +1 -1
- package/lib/esm/tile/Tile.d.ts.map +1 -1
- package/lib/esm/tile/Tile.js +1 -1
- package/lib/esm/tile/Tile.js.map +1 -1
- package/lib/esm/tile/TileAdmin.d.ts +10 -0
- package/lib/esm/tile/TileAdmin.d.ts.map +1 -1
- package/lib/esm/tile/TileAdmin.js +3 -0
- package/lib/esm/tile/TileAdmin.js.map +1 -1
- package/lib/esm/tile/TileTree.d.ts +1 -1
- package/lib/esm/tile/TileTree.d.ts.map +1 -1
- package/lib/esm/tile/TileTree.js +1 -1
- package/lib/esm/tile/TileTree.js.map +1 -1
- package/lib/esm/tile/TileTreeReference.d.ts +1 -1
- package/lib/esm/tile/TileTreeReference.d.ts.map +1 -1
- package/lib/esm/tile/TileTreeReference.js +1 -1
- package/lib/esm/tile/TileTreeReference.js.map +1 -1
- package/lib/esm/tile/map/CesiumTerrainProvider.js +1 -1
- package/lib/esm/tile/map/CesiumTerrainProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryTileTree.d.ts +2 -2
- package/lib/esm/tile/map/ImageryTileTree.d.ts.map +1 -1
- package/lib/esm/tile/map/ImageryTileTree.js +2 -2
- package/lib/esm/tile/map/ImageryTileTree.js.map +1 -1
- package/lib/esm/tile/map/MapCartoRectangle.d.ts +10 -0
- package/lib/esm/tile/map/MapCartoRectangle.d.ts.map +1 -1
- package/lib/esm/tile/map/MapCartoRectangle.js +12 -0
- package/lib/esm/tile/map/MapCartoRectangle.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts +3 -3
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.js +9 -5
- package/lib/esm/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/MapTileTree.d.ts +1 -1
- package/lib/esm/tile/map/MapTileTree.d.ts.map +1 -1
- package/lib/esm/tile/map/MapTileTree.js +1 -1
- package/lib/esm/tile/map/MapTileTree.js.map +1 -1
- package/lib/esm/tile/map/QuadId.d.ts +15 -0
- package/lib/esm/tile/map/QuadId.d.ts.map +1 -1
- package/lib/esm/tile/map/QuadId.js +12 -0
- package/lib/esm/tile/map/QuadId.js.map +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.d.ts +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.js +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.js.map +1 -1
- package/lib/esm/tools/AccuDrawViewportUI.d.ts +7 -0
- package/lib/esm/tools/AccuDrawViewportUI.d.ts.map +1 -1
- package/lib/esm/tools/AccuDrawViewportUI.js +14 -0
- package/lib/esm/tools/AccuDrawViewportUI.js.map +1 -1
- package/lib/esm/tools/ElementSetTool.d.ts +9 -1
- package/lib/esm/tools/ElementSetTool.d.ts.map +1 -1
- package/lib/esm/tools/ElementSetTool.js +130 -9
- package/lib/esm/tools/ElementSetTool.js.map +1 -1
- package/lib/esm/tools/MeasureTool.d.ts +9 -0
- package/lib/esm/tools/MeasureTool.d.ts.map +1 -1
- package/lib/esm/tools/MeasureTool.js +53 -22
- package/lib/esm/tools/MeasureTool.js.map +1 -1
- package/lib/esm/tools/SelectTool.d.ts +2 -2
- package/lib/esm/tools/SelectTool.d.ts.map +1 -1
- package/lib/esm/tools/SelectTool.js +26 -97
- package/lib/esm/tools/SelectTool.js.map +1 -1
- package/lib/esm/tools/Tool.d.ts +10 -1
- package/lib/esm/tools/Tool.d.ts.map +1 -1
- package/lib/esm/tools/Tool.js +27 -4
- package/lib/esm/tools/Tool.js.map +1 -1
- package/lib/esm/tools/ToolAdmin.d.ts +1 -0
- package/lib/esm/tools/ToolAdmin.d.ts.map +1 -1
- package/lib/esm/tools/ToolAdmin.js +8 -2
- package/lib/esm/tools/ToolAdmin.js.map +1 -1
- package/lib/esm/tools/ToolSettings.d.ts +5 -0
- package/lib/esm/tools/ToolSettings.d.ts.map +1 -1
- package/lib/esm/tools/ToolSettings.js +5 -0
- package/lib/esm/tools/ToolSettings.js.map +1 -1
- package/lib/esm/tools/ViewTool.d.ts +1 -2
- package/lib/esm/tools/ViewTool.d.ts.map +1 -1
- package/lib/esm/tools/ViewTool.js +10 -47
- package/lib/esm/tools/ViewTool.js.map +1 -1
- package/lib/public/scripts/parse-imdl-worker.js +1 -1
- package/lib/workers/webpack/parse-imdl-worker.js +1 -1
- package/package.json +20 -20
package/lib/cjs/IpcApp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IH,wBAuIC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAsB,mBAAmB;IAIhC,YAAY;QACjB,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,IAAW,EAAE,QAAgB,EAAE,GAAG,IAAW,EAAE,EAAE;YAC5F,MAAM,IAAI,GAAI,IAAY,CAAC,QAAQ,CAAC,CAAC;YACrC,IAAI,OAAO,IAAI,KAAK,UAAU;gBAC5B,MAAM,IAAI,yBAAW,CAAC,2BAAY,CAAC,gBAAgB,EAAE,WAAW,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,QAAQ,8DAA8D,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;YAErL,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,QAAQ;QACpB,OAAQ,IAAK,IAAY,EAA0B,CAAC,YAAY,EAAE,CAAC,CAAC,uFAAuF;IAC7J,CAAC;CACF;AAvBD,kDAuBC;AAED,wCAAwC;AACxC,MAAM,mBAAoB,SAAQ,mBAAmB;IACnD,IAAW,WAAW,KAAK,OAAO,4BAAc,CAAC,SAAS,CAAC,CAAC,CAAC;IACtD,SAAS,KAAK,CAAC;CACvB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module NativeApp\n */\n\nimport { BentleyError, IModelStatus, JsonUtils, PickAsyncMethods } from \"@itwin/core-bentley\";\nimport {\n BackendError, IModelError, ipcAppChannels, IpcAppFunctions, IpcAppNotifications, IpcInvokeReturn, IpcListener, IpcSocketFrontend, iTwinChannel,\n RemoveFunction,\n} from \"@itwin/core-common\";\nimport { _callIpcChannel } from \"./common/internal/Symbols\";\nimport { IModelApp, IModelAppOptions } from \"./IModelApp\";\n\n/**\n * Options for [[IpcApp.startup]]\n * @public\n */\nexport interface IpcAppOptions {\n iModelApp?: IModelAppOptions;\n}\n\n/**\n * The frontend of apps with a dedicated backend that can use [Ipc]($docs/learning/IpcInterface.md).\n * @public\n */\nexport class IpcApp {\n private static _ipc: IpcSocketFrontend | undefined;\n /** Get the implementation of the [[IpcSocketFrontend]] interface. */\n\n private static get ipc(): IpcSocketFrontend { return this._ipc!; }\n\n /** Determine whether Ipc is available for this frontend. This will only be true if [[startup]] has been called on this class. */\n public static get isValid(): boolean { return undefined !== this._ipc; }\n\n /**\n * Establish a message handler function for the supplied channel over Ipc. The handler will be called when messages are sent for\n * the channel via [[BackendIpc.send]].\n * @param channel the name of the channel\n * @param handler the message handler\n * @returns A function to remove the handler\n * @note Ipc is only supported if [[isValid]] is true.\n */\n public static addListener(channel: string, handler: IpcListener): RemoveFunction {\n return this.ipc.addListener(iTwinChannel(channel), handler);\n }\n\n /**\n * Remove a previously registered listener\n * @param channel The name of the channel for the listener previously registered with [[addListener]]\n * @param listener The function passed to [[addListener]]\n */\n public static removeListener(channel: string, listener: IpcListener) {\n this.ipc.removeListener(iTwinChannel(channel), listener);\n }\n\n /**\n * Send a message to the backend via `channel` and expect a result asynchronously. The handler must be established on the backend via [[BackendIpc.handle]]\n * @param channel The name of the channel for the method.\n * @see Electron [ipcRenderer.invoke](https://www.electronjs.org/docs/api/ipc-renderer) documentation for details.\n * Note that this interface may be implemented via Electron for desktop apps, or via\n * [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) for mobile or web-based\n * Ipc connections. In either case, the Electron documentation provides the specifications for how it works.\n * @note `args` are serialized with the [Structured Clone Algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm), so only\n * primitive types and `ArrayBuffers` are allowed.\n */\n public static async invoke(channel: string, ...args: any[]): Promise<any> {\n return this.ipc.invoke(iTwinChannel(channel), ...args);\n }\n\n /**\n * Send a message over the socket.\n * @param channel The name of the channel for the message.\n * @param data The optional data of the message.\n * @note `data` is serialized with the [Structured Clone Algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm), so only\n * primitive types and `ArrayBuffers` are allowed.\n */\n public static send(channel: string, ...data: any[]) {\n return this.ipc.send(iTwinChannel(channel), ...data);\n }\n\n /**\n * Call a method on the backend through an Ipc channel.\n * @param channelName the channel registered by the backend handler.\n * @param methodName the name of a method implemented by the backend handler.\n * @param args arguments to `methodName`\n * @return a Promise with the return value from `methodName`\n * @note If the backend implementation throws an exception, this method will throw an exception with its contents\n * @internal Use [[makeIpcProxy]] for a type-safe interface.\n */\n public static async [_callIpcChannel](channelName: string, methodName: string, ...args: any[]): Promise<any> {\n const retVal = (await this.invoke(channelName, methodName, ...args)) as IpcInvokeReturn;\n\n if (retVal.error === undefined)\n return retVal.result; // method was successful\n\n // backend threw an exception, rethrow one on frontend\n const err = retVal.error;\n if (!JsonUtils.isObject(err)) {\n // Exception wasn't an object?\n throw retVal.error; // eslint-disable-line @typescript-eslint/only-throw-error\n }\n\n // Note: for backwards compatibility, if the exception was from a BentleyError on the backend, throw an exception of type `BackendError`.\n if (!BentleyError.isError(err))\n throw Object.assign(new Error(typeof err.message === \"string\" ? err.message : \"unknown error\"), err);\n\n const trimErr = { ...err } as any;\n delete trimErr.iTwinErrorId // these are methods on BackendError and will cause Object.assign to fail.\n delete trimErr.loggingMetadata;\n throw Object.assign(new BackendError(err.errorNumber, err.iTwinErrorId.key, err.message, err.loggingMetadata), trimErr);\n }\n\n /** @internal\n * @deprecated in 4.8. Use [[makeIpcProxy]] for a type-safe interface.\n */\n public static async callIpcChannel(channelName: string, methodName: string, ...args: any[]): Promise<any> {\n return this[_callIpcChannel](channelName, methodName, ...args);\n }\n\n /** Create a type safe Proxy object to make IPC calls to a registered backend interface.\n * @param channelName the channel registered by the backend handler.\n */\n public static makeIpcProxy<K, C extends string = string>(channelName: C): PickAsyncMethods<K> {\n return new Proxy({} as PickAsyncMethods<K>, {\n get(_target, methodName: string) {\n return async (...args: any[]) =>\n IpcApp[_callIpcChannel](channelName, methodName, ...args);\n },\n });\n }\n\n /** Create a type safe Proxy object to call an IPC function on a of registered backend handler that accepts a \"methodName\" argument followed by optional arguments\n * @param channelName the channel registered by the backend handler.\n * @param functionName the function to call on the handler.\n */\n public static makeIpcFunctionProxy<K>(channelName: string, functionName: string): PickAsyncMethods<K> {\n return new Proxy({} as PickAsyncMethods<K>, {\n get(_target, methodName: string) {\n return async (...args: any[]) =>\n IpcApp[_callIpcChannel](channelName, functionName, methodName, ...args);\n },\n });\n }\n\n /** A Proxy to call one of the [IpcAppFunctions]($common) functions via IPC. */\n public static appFunctionIpc = IpcApp.makeIpcProxy<IpcAppFunctions>(ipcAppChannels.functions);\n\n /** start an IpcApp.\n * @note this should not be called directly. It is called by NativeApp.startup */\n public static async startup(ipc: IpcSocketFrontend, opts?: IpcAppOptions) {\n this._ipc = ipc;\n IpcAppNotifyHandler.register(); // receives notifications from backend\n await IModelApp.startup(opts?.iModelApp);\n }\n\n /** @internal */\n public static async shutdown() {\n this._ipc = undefined;\n await IModelApp.shutdown();\n }\n}\n\n/**\n * Base class for all implementations of an Ipc notification response interface. This class is implemented on your frontend to supply\n * methods to receive notifications from your backend.\n *\n * Create a subclass to implement your Ipc response interface. Your class should be declared like this:\n * ```ts\n * class MyNotificationHandler extends NotificationHandler implements MyNotifications\n * ```\n * to ensure all method names and signatures are correct. Your methods cannot have a return value.\n *\n * Then, call `MyNotificationHandler.register` at startup to connect your class to your channel.\n * @public\n * @extensions\n */\nexport abstract class NotificationHandler {\n /** All subclasses must implement this method to specify their response channel name. */\n public abstract get channelName(): string;\n\n public registerImpl(): RemoveFunction {\n return IpcApp.addListener(this.channelName, (_evt: Event, funcName: string, ...args: any[]) => {\n const func = (this as any)[funcName];\n if (typeof func !== \"function\")\n throw new IModelError(IModelStatus.FunctionNotFound, `Method \"${this.constructor.name}.${funcName}\" not found on NotificationHandler registered for channel: ${this.channelName}`);\n\n func.call(this, ...args);\n });\n }\n\n /**\n * Register this class as the handler for notifications on its channel. This static method creates a new instance\n * that becomes the notification handler and is `this` when its methods are called.\n * @returns A function that can be called to remove the handler.\n * @note this method should only be called once per channel. If it is called multiple times, multiple handlers are established.\n */\n public static register(): RemoveFunction {\n return (new (this as any)() as NotificationHandler).registerImpl(); // create an instance of subclass. \"as any\" is necessary because base class is abstract\n }\n}\n\n/** IpcApp notifications from backend */\nclass IpcAppNotifyHandler extends NotificationHandler implements IpcAppNotifications {\n public get channelName() { return ipcAppChannels.appNotify; }\n public notifyApp() { }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IpcApp.js","sourceRoot":"","sources":["../../src/IpcApp.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA8F;AAC9F,oDAG4B;AAC5B,uDAA4D;AAC5D,2CAA0D;AAU1D;;;GAGG;AACH,MAAa,MAAM;IACT,MAAM,CAAC,IAAI,CAAgC;IAC3C,MAAM,CAAC,gBAAgB,CAA6B;IAC5D,qEAAqE;IAE7D,MAAM,KAAK,GAAG,KAAwB,OAAO,IAAI,CAAC,IAAK,CAAC,CAAC,CAAC;IAElE,iIAAiI;IAC1H,MAAM,KAAK,OAAO,KAAc,OAAO,SAAS,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAExE;;;;;;;OAOG;IACI,MAAM,CAAC,WAAW,CAAC,OAAe,EAAE,OAAoB;QAC7D,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,IAAA,0BAAY,EAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,cAAc,CAAC,OAAe,EAAE,QAAqB;QACjE,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,IAAA,0BAAY,EAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC3D,CAAC;IAED;;;;;;;;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O,4BAAc,CAAC,SAAS,CAAC,CAAC,CAAC;IACtD,SAAS,KAAK,CAAC;CACvB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module NativeApp\n */\n\nimport { BentleyError, IModelStatus, JsonUtils, PickAsyncMethods } from \"@itwin/core-bentley\";\nimport {\n BackendError, IModelError, ipcAppChannels, IpcAppFunctions, IpcAppNotifications, IpcInvokeReturn, IpcListener, IpcSocketFrontend, iTwinChannel,\n RemoveFunction,\n} from \"@itwin/core-common\";\nimport { _callIpcChannel } from \"./common/internal/Symbols\";\nimport { IModelApp, IModelAppOptions } from \"./IModelApp\";\n\n/**\n * Options for [[IpcApp.startup]]\n * @public\n */\nexport interface IpcAppOptions {\n iModelApp?: IModelAppOptions;\n}\n\n/**\n * The frontend of apps with a dedicated backend that can use [Ipc]($docs/learning/IpcInterface.md).\n * @public\n */\nexport class IpcApp {\n private static _ipc: IpcSocketFrontend | undefined;\n private static _removeAppNotify: RemoveFunction | undefined;\n /** Get the implementation of the [[IpcSocketFrontend]] interface. */\n\n private static get ipc(): IpcSocketFrontend { return this._ipc!; }\n\n /** Determine whether Ipc is available for this frontend. This will only be true if [[startup]] has been called on this class. */\n public static get isValid(): boolean { return undefined !== this._ipc; }\n\n /**\n * Establish a message handler function for the supplied channel over Ipc. The handler will be called when messages are sent for\n * the channel via [[BackendIpc.send]].\n * @param channel the name of the channel\n * @param handler the message handler\n * @returns A function to remove the handler\n * @note Ipc is only supported if [[isValid]] is true.\n */\n public static addListener(channel: string, handler: IpcListener): RemoveFunction {\n return this.ipc.addListener(iTwinChannel(channel), handler);\n }\n\n /**\n * Remove a previously registered listener\n * @param channel The name of the channel for the listener previously registered with [[addListener]]\n * @param listener The function passed to [[addListener]]\n */\n public static removeListener(channel: string, listener: IpcListener) {\n this.ipc.removeListener(iTwinChannel(channel), listener);\n }\n\n /**\n * Send a message to the backend via `channel` and expect a result asynchronously. The handler must be established on the backend via [[BackendIpc.handle]]\n * @param channel The name of the channel for the method.\n * @see Electron [ipcRenderer.invoke](https://www.electronjs.org/docs/api/ipc-renderer) documentation for details.\n * Note that this interface may be implemented via Electron for desktop apps, or via\n * [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) for mobile or web-based\n * Ipc connections. In either case, the Electron documentation provides the specifications for how it works.\n * @note `args` are serialized with the [Structured Clone Algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm), so only\n * primitive types and `ArrayBuffers` are allowed.\n */\n public static async invoke(channel: string, ...args: any[]): Promise<any> {\n return this.ipc.invoke(iTwinChannel(channel), ...args);\n }\n\n /**\n * Send a message over the socket.\n * @param channel The name of the channel for the message.\n * @param data The optional data of the message.\n * @note `data` is serialized with the [Structured Clone Algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm), so only\n * primitive types and `ArrayBuffers` are allowed.\n */\n public static send(channel: string, ...data: any[]) {\n return this.ipc.send(iTwinChannel(channel), ...data);\n }\n\n /**\n * Call a method on the backend through an Ipc channel.\n * @param channelName the channel registered by the backend handler.\n * @param methodName the name of a method implemented by the backend handler.\n * @param args arguments to `methodName`\n * @return a Promise with the return value from `methodName`\n * @note If the backend implementation throws an exception, this method will throw an exception with its contents\n * @internal Use [[makeIpcProxy]] for a type-safe interface.\n */\n public static async [_callIpcChannel](channelName: string, methodName: string, ...args: any[]): Promise<any> {\n const retVal = (await this.invoke(channelName, methodName, ...args)) as IpcInvokeReturn;\n\n if (retVal.error === undefined)\n return retVal.result; // method was successful\n\n // backend threw an exception, rethrow one on frontend\n const err = retVal.error;\n if (!JsonUtils.isObject(err)) {\n // Exception wasn't an object?\n throw retVal.error; // eslint-disable-line @typescript-eslint/only-throw-error\n }\n\n // Note: for backwards compatibility, if the exception was from a BentleyError on the backend, throw an exception of type `BackendError`.\n if (!BentleyError.isError(err))\n throw Object.assign(new Error(typeof err.message === \"string\" ? err.message : \"unknown error\"), err);\n\n const trimErr = { ...err } as any;\n delete trimErr.iTwinErrorId // these are methods on BackendError and will cause Object.assign to fail.\n delete trimErr.loggingMetadata;\n throw Object.assign(new BackendError(err.errorNumber, err.iTwinErrorId.key, err.message, err.loggingMetadata), trimErr);\n }\n\n /** @internal\n * @deprecated in 4.8 - will not be removed until after 2026-06-13. Use [[makeIpcProxy]] for a type-safe interface.\n */\n public static async callIpcChannel(channelName: string, methodName: string, ...args: any[]): Promise<any> {\n return this[_callIpcChannel](channelName, methodName, ...args);\n }\n\n /** Create a type safe Proxy object to make IPC calls to a registered backend interface.\n * @param channelName the channel registered by the backend handler.\n */\n public static makeIpcProxy<K, C extends string = string>(channelName: C): PickAsyncMethods<K> {\n return new Proxy({} as PickAsyncMethods<K>, {\n get(_target, methodName: string) {\n return async (...args: any[]) =>\n IpcApp[_callIpcChannel](channelName, methodName, ...args);\n },\n });\n }\n\n /** Create a type safe Proxy object to call an IPC function on a of registered backend handler that accepts a \"methodName\" argument followed by optional arguments\n * @param channelName the channel registered by the backend handler.\n * @param functionName the function to call on the handler.\n */\n public static makeIpcFunctionProxy<K>(channelName: string, functionName: string): PickAsyncMethods<K> {\n return new Proxy({} as PickAsyncMethods<K>, {\n get(_target, methodName: string) {\n return async (...args: any[]) =>\n IpcApp[_callIpcChannel](channelName, functionName, methodName, ...args);\n },\n });\n }\n\n /** A Proxy to call one of the [IpcAppFunctions]($common) functions via IPC. */\n public static appFunctionIpc = IpcApp.makeIpcProxy<IpcAppFunctions>(ipcAppChannels.functions);\n\n /** start an IpcApp.\n * @note this should not be called directly. It is called by NativeApp.startup */\n public static async startup(ipc: IpcSocketFrontend, opts?: IpcAppOptions) {\n this._ipc = ipc;\n this._removeAppNotify = IpcAppNotifyHandler.register(); // receives notifications from backend\n await IModelApp.startup(opts?.iModelApp);\n }\n\n /** @internal */\n public static async shutdown() {\n this._removeAppNotify?.();\n this._ipc = undefined;\n await IModelApp.shutdown();\n }\n}\n\n/**\n * Base class for all implementations of an Ipc notification response interface. This class is implemented on your frontend to supply\n * methods to receive notifications from your backend.\n *\n * Create a subclass to implement your Ipc response interface. Your class should be declared like this:\n * ```ts\n * class MyNotificationHandler extends NotificationHandler implements MyNotifications\n * ```\n * to ensure all method names and signatures are correct. Your methods cannot have a return value.\n *\n * Then, call `MyNotificationHandler.register` at startup to connect your class to your channel.\n * @public\n * @extensions\n */\nexport abstract class NotificationHandler {\n /** All subclasses must implement this method to specify their response channel name. */\n public abstract get channelName(): string;\n\n public registerImpl(): RemoveFunction {\n return IpcApp.addListener(this.channelName, (_evt: Event, funcName: string, ...args: any[]) => {\n const func = (this as any)[funcName];\n if (typeof func !== \"function\")\n throw new IModelError(IModelStatus.FunctionNotFound, `Method \"${this.constructor.name}.${funcName}\" not found on NotificationHandler registered for channel: ${this.channelName}`);\n\n func.call(this, ...args);\n });\n }\n\n /**\n * Register this class as the handler for notifications on its channel. This static method creates a new instance\n * that becomes the notification handler and is `this` when its methods are called.\n * @returns A function that can be called to remove the handler.\n * @note this method should only be called once per channel. If it is called multiple times, multiple handlers are established.\n */\n public static register(): RemoveFunction {\n return (new (this as any)() as NotificationHandler).registerImpl(); // create an instance of subclass. \"as any\" is necessary because base class is abstract\n }\n}\n\n/** IpcApp notifications from backend */\nclass IpcAppNotifyHandler extends NotificationHandler implements IpcAppNotifications {\n public get channelName() { return ipcAppChannels.appNotify; }\n public notifyApp() { }\n}\n"]}
|
|
@@ -25,7 +25,7 @@ export interface SelectAddEvent {
|
|
|
25
25
|
type: SelectionSetEventType.Add;
|
|
26
26
|
/**
|
|
27
27
|
* The Ids of the elements added to the set.
|
|
28
|
-
* @deprecated in 5.0. Use the [[additions]] attribute instead.
|
|
28
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use the [[additions]] attribute instead.
|
|
29
29
|
*/
|
|
30
30
|
added: Id64Arg;
|
|
31
31
|
/** A collection of geometric element, model and subcategory ids that have been added to selection set. */
|
|
@@ -42,7 +42,7 @@ export interface SelectRemoveEvent {
|
|
|
42
42
|
type: SelectionSetEventType.Remove | SelectionSetEventType.Clear;
|
|
43
43
|
/**
|
|
44
44
|
* The element Ids removed from the set.
|
|
45
|
-
* @deprecated in 5.0. Use the [[removals]] attribute instead.
|
|
45
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use the [[removals]] attribute instead.
|
|
46
46
|
*/
|
|
47
47
|
removed: Id64Arg;
|
|
48
48
|
/** A collection of geometric element, model and subcategory ids that have been removed from selection set. */
|
|
@@ -58,14 +58,14 @@ export interface SelectReplaceEvent {
|
|
|
58
58
|
type: SelectionSetEventType.Replace;
|
|
59
59
|
/**
|
|
60
60
|
* The element Ids added to the set.
|
|
61
|
-
* @deprecated in 5.0. Use the [[additions]] attribute instead.
|
|
61
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use the [[additions]] attribute instead.
|
|
62
62
|
*/
|
|
63
63
|
added: Id64Arg;
|
|
64
64
|
/** A collection of geometric element, model and subcategory ids that have been added to selection set. */
|
|
65
65
|
additions: SelectableIds;
|
|
66
66
|
/**
|
|
67
67
|
* The element Ids removed from the set.
|
|
68
|
-
* @deprecated in 5.0. Use the [[removals]] attribute instead.
|
|
68
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use the [[removals]] attribute instead.
|
|
69
69
|
*/
|
|
70
70
|
removed: Id64Arg;
|
|
71
71
|
/** A collection of geometric element, model and subcategory ids that have been removed from selection set. */
|
|
@@ -163,7 +163,7 @@ export declare class HiliteSet {
|
|
|
163
163
|
/** Toggle the hilited state of one or more elements.
|
|
164
164
|
* @param arg the ID(s) of the elements whose state is to be toggled.
|
|
165
165
|
* @param onOff True to add the elements to the hilited set, false to remove them.
|
|
166
|
-
* @deprecated in 5.0. Use [[add]], [[remove]], [[replace]] instead.
|
|
166
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[add]], [[remove]], [[replace]] instead.
|
|
167
167
|
*/
|
|
168
168
|
setHilite(arg: Id64Arg, onOff: boolean): void;
|
|
169
169
|
}
|
|
@@ -203,12 +203,12 @@ export declare class SelectionSet {
|
|
|
203
203
|
get isActive(): boolean;
|
|
204
204
|
/** Return true if elemId is in this `SelectionSet`.
|
|
205
205
|
* @see [[isSelected]]
|
|
206
|
-
* @deprecated in 5.0. Use `SelectionSet.elements.has(elemId)` instead.
|
|
206
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `SelectionSet.elements.has(elemId)` instead.
|
|
207
207
|
*/
|
|
208
208
|
has(elemId?: string): boolean;
|
|
209
209
|
/** Query whether an Id is in the selection set.
|
|
210
210
|
* @see [[has]]
|
|
211
|
-
* @deprecated in 5.0. Use `SelectionSet.elements.has(elemId)` instead.
|
|
211
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `SelectionSet.elements.has(elemId)` instead.
|
|
212
212
|
*/
|
|
213
213
|
isSelected(elemId?: Id64String): boolean;
|
|
214
214
|
/** Clear current selection set.
|
package/lib/cjs/SelectionSet.js
CHANGED
|
@@ -204,7 +204,7 @@ class HiliteSet {
|
|
|
204
204
|
/** Toggle the hilited state of one or more elements.
|
|
205
205
|
* @param arg the ID(s) of the elements whose state is to be toggled.
|
|
206
206
|
* @param onOff True to add the elements to the hilited set, false to remove them.
|
|
207
|
-
* @deprecated in 5.0. Use [[add]], [[remove]], [[replace]] instead.
|
|
207
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[add]], [[remove]], [[replace]] instead.
|
|
208
208
|
*/
|
|
209
209
|
setHilite(arg, onOff) {
|
|
210
210
|
if (onOff) {
|
|
@@ -273,14 +273,14 @@ class SelectionSet {
|
|
|
273
273
|
}
|
|
274
274
|
/** Return true if elemId is in this `SelectionSet`.
|
|
275
275
|
* @see [[isSelected]]
|
|
276
|
-
* @deprecated in 5.0. Use `SelectionSet.elements.has(elemId)` instead.
|
|
276
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `SelectionSet.elements.has(elemId)` instead.
|
|
277
277
|
*/
|
|
278
278
|
has(elemId) {
|
|
279
279
|
return !!elemId && this.elements.has(elemId);
|
|
280
280
|
}
|
|
281
281
|
/** Query whether an Id is in the selection set.
|
|
282
282
|
* @see [[has]]
|
|
283
|
-
* @deprecated in 5.0. Use `SelectionSet.elements.has(elemId)` instead.
|
|
283
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `SelectionSet.elements.has(elemId)` instead.
|
|
284
284
|
*/
|
|
285
285
|
isSelected(elemId) {
|
|
286
286
|
return !!elemId && this.elements.has(elemId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionSet.js","sourceRoot":"","sources":["../../src/SelectionSet.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG;;GAEG;AACH,sDAA6F;AAC7F,2CAAwC;AAGxC;;;GAGG;AACH,IAAY,qBASX;AATD,WAAY,qBAAqB;IAC/B,sCAAsC;IACtC,+DAAG,CAAA;IACH,0CAA0C;IAC1C,qEAAM,CAAA;IACN,wEAAwE;IACxE,uEAAO,CAAA;IACP,8CAA8C;IAC9C,mEAAK,CAAA;AACP,CAAC,EATW,qBAAqB,qCAArB,qBAAqB,QAShC;AA6ED;;;GAGG;AACH,MAAM,UAAW,SAAQ,mBAAI,CAAC,SAAS;IACV;IAA3B,YAA2B,OAAmC;QAC5D,KAAK,EAAE,CAAC;QADiB,YAAO,GAAP,OAAO,CAA4B;IAE9D,CAAC;IAEe,GAAG,CAAC,GAAW,EAAE,IAAY;QAC3C,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;IAC3C,CAAC;IAEe,MAAM,CAAC,GAAW,EAAE,IAAY;QAC9C,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,E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AAE,IAAI,mBAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACpC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;YACjB,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAuE;IACzG,IAAI,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IACvB,KAAK,MAAM,EAAE,IAAI,mBAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACpC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACf,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC;QAC5B,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YACrB,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QACd,CAAC;QACD,IAAI,GAAG,OAAO,CAAC;IACjB,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAAC,EACjB,MAAM,EACN,GAAG,EACH,QAAQ,EACR,UAAU,GAMX;IACC,IAAI,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IACvB,KAAK,MAAM,EAAE,IAAI,mBAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACpC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAClB,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC;QAC5B,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YACrB,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;aAAM,CAAC;YACN,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;QACnB,CAAC;QACD,IAAI,GAAG,OAAO,CAAC;IACjB,CAAC;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module SelectionSet\n */\nimport { BeEvent, Id64, Id64Arg, Id64Array, Id64Set, Id64String } from \"@itwin/core-bentley\";\nimport { IModelApp } from \"./IModelApp\";\nimport { IModelConnection } from \"./IModelConnection\";\n\n/** Identifies the type of changes made to the [[SelectionSet]] to produce a [[SelectionSetEvent]].\n * @public\n * @extensions\n */\nexport enum SelectionSetEventType {\n /** Ids have been added to the set. */\n Add,\n /** Ids have been removed from the set. */\n Remove,\n /** Some ids have been added to the set and others have been removed. */\n Replace,\n /** All ids have been removed from the set. */\n Clear,\n}\n\n/** Passed to [[SelectionSet.onChanged]] event listeners when ids are added to the selection set.\n * @public\n * @extensions\n */\nexport interface SelectAddEvent {\n type: SelectionSetEventType.Add;\n /**\n * The Ids of the elements added to the set.\n * @deprecated in 5.0. Use the [[additions]] attribute instead.\n */\n added: Id64Arg;\n /** A collection of geometric element, model and subcategory ids that have been added to selection set. */\n additions: SelectableIds;\n /** The affected SelectionSet. */\n set: SelectionSet;\n}\n\n/** Passed to [[SelectionSet.onChanged]] event listeners when ids are removed from the selection set.\n * @public\n * @extensions\n */\nexport interface SelectRemoveEvent {\n /** The type of operation that produced this event. */\n type: SelectionSetEventType.Remove | SelectionSetEventType.Clear;\n /**\n * The element Ids removed from the set.\n * @deprecated in 5.0. Use the [[removals]] attribute instead.\n */\n removed: Id64Arg;\n /** A collection of geometric element, model and subcategory ids that have been removed from selection set. */\n removals: SelectableIds;\n /** The affected SelectionSet. */\n set: SelectionSet;\n}\n\n/** Passed to [[SelectionSet.onChanged]] event listeners when ids are simultaneously added to and removed from the selection set.\n * @public\n * @extensions\n */\nexport interface SelectReplaceEvent {\n type: SelectionSetEventType.Replace;\n /**\n * The element Ids added to the set.\n * @deprecated in 5.0. Use the [[additions]] attribute instead.\n */\n added: Id64Arg;\n /** A collection of geometric element, model and subcategory ids that have been added to selection set. */\n additions: SelectableIds;\n /**\n * The element Ids removed from the set.\n * @deprecated in 5.0. Use the [[removals]] attribute instead.\n */\n removed: Id64Arg;\n /** A collection of geometric element, model and subcategory ids that have been removed from selection set. */\n removals: SelectableIds;\n /** The affected SelectionSet. */\n set: SelectionSet;\n}\n\n/** Payload sent to [[SelectionSet.onChanged]] event listeners to describe how the contents of the set have changed.\n * The `type` property of the event serves as a type assertion. For example, the following code will output the added and/or removed Ids:\n * ```ts\n * processSelectionSetEvent(ev: SelectionSetEvent): void {\n * if (SelectionSetEventType.Add === ev.type || SelectionSetEventType.Replace === ev.type)\n * console.log(\"Added \" + (ev.additions.elements?.size ?? 0) + \" elements\");\n *\n * if (SelectionSetEventType.Add !== ev.type)\n * console.log(\"Removed \" + (ev.removals.elements?.size ?? 0) + \" elements\");\n * }\n * ```\n * @public\n * @extensions\n */\nexport type SelectionSetEvent = SelectAddEvent | SelectRemoveEvent | SelectReplaceEvent;\n\n/** Holds a set of hilited entities and makes any changes to the set by passing the change\n * function to given `change` callback.\n * @internal\n */\nclass HilitedIds extends Id64.Uint32Set {\n public constructor(private _change: (func: () => void) => void) {\n super();\n }\n\n public override add(low: number, high: number) {\n this._change(() => super.add(low, high));\n }\n\n public override delete(low: number, high: number) {\n this._change(() => super.delete(low, high));\n }\n\n public override clear() {\n this._change(() => super.clear());\n }\n\n public override addIds(ids: Id64Arg) {\n this._change(() => super.addIds(ids));\n }\n\n public override deleteIds(ids: Id64Arg) {\n this._change(() => super.deleteIds(ids));\n }\n}\n\n/** Describes how the sets of hilited models and subcategories in a [[HiliteSet]] interact.\n * - \"union\" indicates a [Feature]($common) will be hilited if either its model **or** its subcategory is present in the HiliteSet.\n * - \"intersection\" indicates a [Feature]($common) will be hilited only if both its model **and** its subcategory are present in the HiliteSet.\n *\n * @see [[HiliteSet.modelSubCategoryMode]] to change the mode for a HiliteSet.\n * @public\n */\nexport type ModelSubCategoryHiliteMode = \"union\" | \"intersection\";\n\n/** A set of *hilited* elements for an [[IModelConnection]], by element id.\n * Hilited elements are displayed with a customizable hilite effect within a [[Viewport]].\n * The set exposes 3 types of elements in 3 separate collections: [GeometricElement]($backend), [GeometricModel]($backend), and [SubCategory]($backend).\n * The [[models]] and [[subcategories]] can be hilited independently or as an intersection of the two sets, as specified by [[modelSubCategoryMode]].\n *\n * Technically, the hilite effect is applied to [Feature]($common)s, not [Element]($backend)s. An element's geometry stream can contain multiple\n * features belonging to different subcategories.\n *\n * Because Javascript lacks efficient support for 64-bit integers, the Ids are stored as pairs of 32-bit integers via [Id64.Uint32Set]($bentley).\n *\n * @note Typically, elements are hilited by virtue of their presence in the IModelConnection's [[SelectionSet]]. The HiliteSet allows additional\n * elements to be displayed with the hilite effect without adding them to the [[SelectionSet]]. If you add elements to the HiliteSet directly, you\n * are also responsible for removing them as appropriate.\n * @see [[IModelConnection.hilited]] for the HiliteSet associated with an iModel.\n * @see [Hilite.Settings]($common) for customization of the hilite effect.\n * @public\n * @extensions\n */\nexport class HiliteSet {\n #mode: ModelSubCategoryHiliteMode = \"union\";\n #selectionChangesListener?: () => void;\n #changing = false;\n\n /** The set of hilited elements. */\n public readonly elements: Id64.Uint32Set;\n\n /** The set of hilited subcategories.\n * @see [[modelSubCategoryMode]] to control how this set interacts with the set of hilited [[models]].\n * @see [[IModelConnection.Categories]] to obtain the set of subcategories associated with one or more [Category]($backend)'s.\n */\n public readonly subcategories: Id64.Uint32Set;\n\n /** The set of hilited [[GeometricModelState]]s.\n * @see [[modelSubCategoryMode]] to control how this set interacts with the set of hilited [[subcategories]].\n */\n public readonly models: Id64.Uint32Set;\n\n /** Controls how the sets of hilited [[models]] and [[subcategories]] interact with one another.\n * By default they are treated as a union: a [Feature]($common) is hilited if either its model **or** its subcategory is hilited.\n * This can be changed to an intersection such that a [Feature]($common) is hilited only if both its model **and** subcategory are hilited.\n * @note The sets of hilited models and subcategories are independent of the set of hilited [[elements]] - an element whose Id is present in\n * [[elements]] is always hilited regardless of its model or subcategories.\n */\n public get modelSubCategoryMode(): ModelSubCategoryHiliteMode {\n return this.#mode;\n }\n public set modelSubCategoryMode(mode: ModelSubCategoryHiliteMode) {\n if (mode === this.#mode) {\n return;\n }\n this.onModelSubCategoryModeChanged.raiseEvent(mode);\n this.#mode = mode;\n }\n\n /** Event raised just before changing the value of [[modelSubCategoryMode]]. */\n public readonly onModelSubCategoryModeChanged = new BeEvent<(newMode: ModelSubCategoryHiliteMode) => void>();\n\n /** Construct a HiliteSet\n * @param iModel The iModel containing the entities to be hilited.\n * @param syncWithSelectionSet If true, the hilite set contents will be synchronized with those in the `iModel`'s [[SelectionSet]].\n */\n public constructor(public iModel: IModelConnection, syncWithSelectionSet = true) {\n this.elements = new HilitedIds((func) => this.#change(func));\n this.subcategories = new HilitedIds((func) => this.#change(func));\n this.models = new HilitedIds((func) => this.#change(func));\n this.wantSyncWithSelectionSet = syncWithSelectionSet;\n }\n\n /** Control whether the hilite set will be synchronized with the contents of the [[SelectionSet]].\n * By default they are synchronized. Applications that override this take responsibility for managing the set of hilited entities.\n * When turning synchronization off, the contents of the HiliteSet will remain unchanged.\n * When turning synchronization on, the current contents of the HiliteSet will be preserved, and the contents of the selection set will be added to them.\n */\n public get wantSyncWithSelectionSet(): boolean {\n return !!this.#selectionChangesListener;\n }\n public set wantSyncWithSelectionSet(want: boolean) {\n if (want === this.wantSyncWithSelectionSet) {\n return;\n }\n if (want) {\n const set = this.iModel.selectionSet;\n this.#selectionChangesListener = set.onChanged.addListener((ev) => this.#processSelectionSetEvent(ev));\n this.add(set.active);\n } else {\n this.#selectionChangesListener!();\n this.#selectionChangesListener = undefined;\n }\n }\n\n #onChanged() {\n if (!this.#changing) {\n IModelApp.viewManager.onSelectionSetChanged(this.iModel);\n }\n }\n\n #change(func: () => void) {\n const changing = this.#changing;\n this.#changing = true;\n try {\n func();\n } finally {\n this.#changing = changing;\n }\n this.#onChanged();\n }\n\n #processSelectionSetEvent(ev: SelectionSetEvent) {\n switch (ev.type) {\n case SelectionSetEventType.Add:\n return this.add(ev.additions);\n case SelectionSetEventType.Replace:\n return this.#change(() => {\n this.add(ev.additions);\n this.remove(ev.removals);\n });\n case SelectionSetEventType.Remove:\n case SelectionSetEventType.Clear:\n return this.remove(ev.removals);\n }\n }\n\n /** Adds a collection of geometric element, model and subcategory ids to this hilite set. */\n public add(additions: SelectableIds): void {\n this.#change(() => {\n additions.elements && this.elements.addIds(additions.elements);\n additions.models && this.models.addIds(additions.models);\n additions.subcategories && this.subcategories.addIds(additions.subcategories);\n });\n }\n\n /** Removes a collection of geometric element, model and subcategory ids from this hilite set. */\n public remove(removals: SelectableIds): void {\n this.#change(() => {\n removals.elements && this.elements.deleteIds(removals.elements);\n removals.models && this.models.deleteIds(removals.models);\n removals.subcategories && this.subcategories.deleteIds(removals.subcategories);\n });\n }\n\n /** Replaces ids currently in the hilite set with the given collection. */\n public replace(ids: SelectableIds): void {\n this.#change(() => {\n this.clear();\n this.add(ids);\n });\n }\n\n /** Remove all elements from the hilited set. */\n public clear() {\n this.#change(() => {\n this.elements.clear();\n this.models.clear();\n this.subcategories.clear();\n });\n }\n\n /** Returns true if nothing is hilited. */\n public get isEmpty(): boolean {\n return this.elements.isEmpty && this.subcategories.isEmpty && this.models.isEmpty;\n }\n\n /** Toggle the hilited state of one or more elements.\n * @param arg the ID(s) of the elements whose state is to be toggled.\n * @param onOff True to add the elements to the hilited set, false to remove them.\n * @deprecated in 5.0. Use [[add]], [[remove]], [[replace]] instead.\n */\n public setHilite(arg: Id64Arg, onOff: boolean): void {\n if (onOff) {\n this.add({ elements: arg });\n } else {\n this.remove({ elements: arg });\n }\n }\n}\n\n/** A set of *currently selected* geometric elements, models and subcategories for an `IModelConnection`.\n * Generally, selected elements are displayed with a customizable hilite effect within a [[Viewport]], see [[HiliteSet]].\n * @see [Hilite.Settings]($common) for customization of the hilite effect.\n * @public\n * @extensions\n */\nexport class SelectionSet {\n #selection: {\n [P in keyof SelectableIds]-?: Id64Set;\n };\n\n /** The IDs of the selected elements.\n * @note Do not modify this set directly. Instead, use methods like [[SelectionSet.add]].\n */\n public get elements(): Set<Id64String> {\n return this.#selection.elements;\n }\n\n /** The IDs of the selected models.\n * @note Do not modify this set directly. Instead, use methods like [[SelectionSet.add]].\n */\n public get models(): Set<Id64String> {\n return this.#selection.models;\n }\n\n /** The IDs of the selected subcategories.\n * @note Do not modify this set directly. Instead, use methods like [[SelectionSet.add]].\n */\n public get subcategories(): Set<Id64String> {\n return this.#selection.subcategories;\n }\n\n /** Get the active selection as a collection of geometric element, model and subcategory ids.\n * @note Do not modify the sets in returned collection directly. Instead, use methods like [[SelectionSet.add]].\n */\n public get active(): { [P in keyof SelectableIds]-?: Set<Id64String> } {\n return { ...this.#selection };\n }\n\n /** Called whenever ids are added or removed from this `SelectionSet` */\n public readonly onChanged = new BeEvent<(ev: SelectionSetEvent) => void>();\n\n public constructor(public iModel: IModelConnection) {\n this.#selection = {\n elements: new Set(),\n models: new Set(),\n subcategories: new Set(),\n };\n }\n\n #sendChangedEvent(ev: SelectionSetEvent) {\n IModelApp.viewManager.onSelectionSetChanged(this.iModel);\n this.onChanged.raiseEvent(ev);\n }\n\n /** Get the number of entries in this selection set. */\n public get size() {\n return this.elements.size + this.models.size + this.subcategories.size;\n }\n\n /** Check whether there are any ids in this selection set. */\n public get isActive() {\n return this.elements.size > 0 || this.models.size > 0 || this.subcategories.size > 0;\n }\n\n /** Return true if elemId is in this `SelectionSet`.\n * @see [[isSelected]]\n * @deprecated in 5.0. Use `SelectionSet.elements.has(elemId)` instead.\n */\n public has(elemId?: string) {\n return !!elemId && this.elements.has(elemId);\n }\n\n /** Query whether an Id is in the selection set.\n * @see [[has]]\n * @deprecated in 5.0. Use `SelectionSet.elements.has(elemId)` instead.\n */\n public isSelected(elemId?: Id64String): boolean {\n return !!elemId && this.elements.has(elemId);\n }\n\n /** Clear current selection set.\n * @note raises the [[onChanged]] event with [[SelectionSetEventType.Clear]].\n */\n public emptyAll(): void {\n if (!this.isActive) {\n return;\n }\n const removals = this.#selection;\n this.#selection = {\n elements: new Set(),\n models: new Set(),\n subcategories: new Set(),\n };\n this.#sendChangedEvent({ set: this, type: SelectionSetEventType.Clear, removals, removed: removals.elements });\n }\n\n /**\n * Add one or more Ids to the current selection set.\n * @param elem The set of Ids to add.\n * @returns true if any elements were added.\n */\n public add(adds: Id64Arg | SelectableIds): boolean {\n return !!this.#add(adds);\n }\n\n #add(adds: Id64Arg | SelectableIds, sendEvent = true): SelectableIds | undefined {\n const oldSize = this.size;\n const additions: { [P in keyof SelectableIds]: Id64Array } = {};\n forEachSelectableType({\n ids: adds,\n elements: (elementIds) =>\n addIds({\n target: this.#selection.elements,\n ids: elementIds,\n onAdd: (id) => (additions.elements ??= []).push(id),\n }),\n models: (modelIds) =>\n addIds({\n target: this.#selection.models,\n ids: modelIds,\n onAdd: (id) => (additions.models ??= []).push(id),\n }),\n subcategories: (subcategoryIds) =>\n addIds({\n target: this.#selection.subcategories,\n ids: subcategoryIds,\n onAdd: (id) => (additions.subcategories ??= []).push(id),\n }),\n });\n const changed = oldSize !== this.size;\n if (!changed) {\n return undefined;\n }\n if (sendEvent) {\n this.#sendChangedEvent({\n type: SelectionSetEventType.Add,\n set: this,\n additions,\n added: additions.elements ?? [],\n });\n }\n return additions;\n }\n\n /**\n * Remove one or more Ids from the current selection set.\n * @param elem The set of Ids to remove.\n * @returns true if any elements were removed.\n */\n public remove(removes: Id64Arg | SelectableIds): boolean {\n return !!this.#remove(removes);\n }\n\n #remove(removes: Id64Arg | SelectableIds, sendEvent = true): SelectableIds | undefined {\n const oldSize = this.size;\n const removals: { [P in keyof SelectableIds]: Id64Array } = {};\n forEachSelectableType({\n ids: removes,\n elements: (elementIds) =>\n removeIds({\n target: this.#selection.elements,\n ids: elementIds,\n onRemove: (id) => (removals.elements ??= []).push(id),\n }),\n models: (modelIds) =>\n removeIds({\n target: this.#selection.models,\n ids: modelIds,\n onRemove: (id) => (removals.models ??= []).push(id),\n }),\n subcategories: (subcategoryIds) =>\n removeIds({\n target: this.#selection.subcategories,\n ids: subcategoryIds,\n onRemove: (id) => (removals.subcategories ??= []).push(id),\n }),\n });\n const changed = oldSize !== this.size;\n if (!changed) {\n return undefined;\n }\n if (sendEvent) {\n this.#sendChangedEvent({\n type: SelectionSetEventType.Remove,\n set: this,\n removals,\n removed: removals.elements ?? [],\n });\n }\n return removals;\n }\n\n /**\n * Add one set of Ids, and remove another set of Ids. Any Ids that are in both sets are removed.\n * @returns True if any Ids were either added or removed.\n */\n public addAndRemove(adds: Id64Arg | SelectableIds, removes: Id64Arg | SelectableIds): boolean {\n const additions = this.#add(adds, false);\n const removals = this.#remove(removes, false);\n const addedElements = additions?.elements ?? [];\n const removedElements = removals?.elements ?? [];\n if (additions && removals) {\n this.#sendChangedEvent({\n type: SelectionSetEventType.Replace,\n set: this,\n additions,\n added: addedElements,\n removals,\n removed: removedElements,\n });\n } else if (additions) {\n this.#sendChangedEvent({\n type: SelectionSetEventType.Add,\n set: this,\n additions,\n added: addedElements,\n });\n } else if (removals) {\n this.#sendChangedEvent({\n type: SelectionSetEventType.Remove,\n set: this,\n removals,\n removed: removedElements,\n });\n }\n return !!additions || !!removals;\n }\n\n /** Invert the state of a set of Ids in the `SelectionSet` */\n public invert(ids: Id64Arg | SelectableIds): boolean {\n const adds: { [P in keyof SelectableIds]: Id64Set } = {};\n const removes: { [P in keyof SelectableIds]: Id64Set } = {};\n forEachSelectableType({\n ids,\n elements: (elementIds) => {\n for (const id of Id64.iterable(elementIds)) {\n ((this.elements.has(id) ? removes : adds).elements ??= new Set()).add(id);\n }\n },\n models: (modelIds) => {\n for (const id of Id64.iterable(modelIds)) {\n ((this.models.has(id) ? removes : adds).models ??= new Set()).add(id);\n }\n },\n subcategories: (subcategoryIds) => {\n for (const id of Id64.iterable(subcategoryIds)) {\n ((this.subcategories.has(id) ? removes : adds).subcategories ??= new Set()).add(id);\n }\n },\n });\n return this.addAndRemove(adds, removes);\n }\n\n /** Change selection set to be the supplied set of Ids. */\n public replace(ids: Id64Arg | SelectableIds): boolean {\n if (areEqual(this.#selection, ids)) {\n return false;\n }\n\n const previousSelection = this.#selection;\n this.#selection = {\n elements: new Set(),\n models: new Set(),\n subcategories: new Set(),\n };\n this.#add(ids, false);\n\n const additions: { [P in keyof SelectableIds]: Id64Set } = {};\n const removals: { [P in keyof SelectableIds]: Id64Set } = {};\n forEachSelectableType({\n ids: this.#selection,\n elements: (elementIds) => {\n removeIds({\n target: previousSelection.elements,\n ids: elementIds,\n onNotFound: (id) => (additions.elements ??= new Set()).add(id),\n });\n if (previousSelection.elements.size > 0) {\n removals.elements = previousSelection.elements;\n }\n },\n models: (modelIds) => {\n removeIds({\n target: previousSelection.models,\n ids: modelIds,\n onNotFound: (id) => (additions.models ??= new Set()).add(id),\n });\n if (previousSelection.models.size > 0) {\n removals.models = previousSelection.models;\n }\n },\n subcategories: (subcategoryIds) => {\n removeIds({\n target: previousSelection.subcategories,\n ids: subcategoryIds,\n onNotFound: (id) => (additions.subcategories ??= new Set()).add(id),\n });\n if (previousSelection.subcategories.size > 0) {\n removals.subcategories = previousSelection.subcategories;\n }\n },\n });\n\n this.#sendChangedEvent({\n type: SelectionSetEventType.Replace,\n set: this,\n additions,\n added: additions.elements ?? [],\n removals,\n removed: removals.elements ?? [],\n });\n return true;\n }\n}\n\n/**\n * A collection of geometric element, model and subcategory ids that can be added to\n * a [[SelectionSet]] or [[HiliteSet]].\n * @public\n */\nexport interface SelectableIds {\n elements?: Id64Arg;\n models?: Id64Arg;\n subcategories?: Id64Arg;\n}\n\nfunction forEachSelectableType({\n ids,\n elements,\n models,\n subcategories,\n}: {\n ids: Id64Arg | SelectableIds;\n elements: (ids: Id64Arg) => void;\n models: (ids: Id64Arg) => void;\n subcategories: (ids: Id64Arg) => void;\n}): SelectableIds {\n if (typeof ids === \"string\" || Array.isArray(ids) || ids instanceof Set) {\n elements(ids);\n return { elements: ids };\n }\n elements(ids.elements ?? []);\n models(ids.models ?? []);\n subcategories(ids.subcategories ?? []);\n return ids;\n}\n\nfunction areEqual(lhs: { [P in keyof SelectableIds]-?: Id64Set }, rhs: Id64Arg | SelectableIds): boolean {\n let result = true;\n forEachSelectableType({\n ids: rhs,\n elements: (elementIds) => {\n if (result && !areIdsEqual(lhs.elements, elementIds)) {\n result = false;\n }\n },\n models: (modelIds) => {\n if (result && !areIdsEqual(lhs.models, modelIds)) {\n result = false;\n }\n },\n subcategories: (subcategoryIds) => {\n if (result && !areIdsEqual(lhs.subcategories, subcategoryIds)) {\n result = false;\n }\n },\n });\n return result;\n}\n\nfunction areIdsEqual(lhs: Set<Id64String>, rhs: Id64Arg): boolean {\n // Size is unreliable if input can contain duplicates...\n if (Array.isArray(rhs)) {\n rhs = Id64.toIdSet(rhs);\n }\n if (lhs.size !== Id64.sizeOf(rhs)) {\n return false;\n }\n for (const id of Id64.iterable(rhs)) {\n if (!lhs.has(id)) {\n return false;\n }\n }\n return true;\n}\n\nfunction addIds({ target, ids, onAdd }: { target: Id64Set; ids: Id64Arg; onAdd?: (id: Id64String) => void }) {\n let size = target.size;\n for (const id of Id64.iterable(ids)) {\n target.add(id);\n const newSize = target.size;\n if (newSize !== size) {\n onAdd?.(id);\n }\n size = newSize;\n }\n}\n\nfunction removeIds({\n target,\n ids,\n onRemove,\n onNotFound,\n}: {\n target: Id64Set;\n ids: Id64Arg;\n onRemove?: (id: Id64String) => void;\n onNotFound?: (id: Id64String) => void;\n}) {\n let size = target.size;\n for (const id of Id64.iterable(ids)) {\n target.delete(id);\n const newSize = target.size;\n if (newSize !== size) {\n onRemove?.(id);\n } else {\n onNotFound?.(id);\n }\n size = newSize;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SelectionSet.js","sourceRoot":"","sources":["../../src/SelectionSet.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG;;GAEG;AACH,sDAA6F;AAC7F,2CAAwC;AAGxC;;;GAGG;AACH,IAAY,qBASX;AATD,WAAY,qBAAqB;IAC/B,sCAAsC;IACtC,+DAAG,CAAA;IACH,0CAA0C;IAC1C,qEAA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ACN,GAAG,EACH,QAAQ,EACR,UAAU,GAMX;IACC,IAAI,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IACvB,KAAK,MAAM,EAAE,IAAI,mBAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACpC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAClB,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC;QAC5B,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YACrB,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;aAAM,CAAC;YACN,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;QACnB,CAAC;QACD,IAAI,GAAG,OAAO,CAAC;IACjB,CAAC;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module SelectionSet\n */\nimport { BeEvent, Id64, Id64Arg, Id64Array, Id64Set, Id64String } from \"@itwin/core-bentley\";\nimport { IModelApp } from \"./IModelApp\";\nimport { IModelConnection } from \"./IModelConnection\";\n\n/** Identifies the type of changes made to the [[SelectionSet]] to produce a [[SelectionSetEvent]].\n * @public\n * @extensions\n */\nexport enum SelectionSetEventType {\n /** Ids have been added to the set. */\n Add,\n /** Ids have been removed from the set. */\n Remove,\n /** Some ids have been added to the set and others have been removed. */\n Replace,\n /** All ids have been removed from the set. */\n Clear,\n}\n\n/** Passed to [[SelectionSet.onChanged]] event listeners when ids are added to the selection set.\n * @public\n * @extensions\n */\nexport interface SelectAddEvent {\n type: SelectionSetEventType.Add;\n /**\n * The Ids of the elements added to the set.\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use the [[additions]] attribute instead.\n */\n added: Id64Arg;\n /** A collection of geometric element, model and subcategory ids that have been added to selection set. */\n additions: SelectableIds;\n /** The affected SelectionSet. */\n set: SelectionSet;\n}\n\n/** Passed to [[SelectionSet.onChanged]] event listeners when ids are removed from the selection set.\n * @public\n * @extensions\n */\nexport interface SelectRemoveEvent {\n /** The type of operation that produced this event. */\n type: SelectionSetEventType.Remove | SelectionSetEventType.Clear;\n /**\n * The element Ids removed from the set.\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use the [[removals]] attribute instead.\n */\n removed: Id64Arg;\n /** A collection of geometric element, model and subcategory ids that have been removed from selection set. */\n removals: SelectableIds;\n /** The affected SelectionSet. */\n set: SelectionSet;\n}\n\n/** Passed to [[SelectionSet.onChanged]] event listeners when ids are simultaneously added to and removed from the selection set.\n * @public\n * @extensions\n */\nexport interface SelectReplaceEvent {\n type: SelectionSetEventType.Replace;\n /**\n * The element Ids added to the set.\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use the [[additions]] attribute instead.\n */\n added: Id64Arg;\n /** A collection of geometric element, model and subcategory ids that have been added to selection set. */\n additions: SelectableIds;\n /**\n * The element Ids removed from the set.\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use the [[removals]] attribute instead.\n */\n removed: Id64Arg;\n /** A collection of geometric element, model and subcategory ids that have been removed from selection set. */\n removals: SelectableIds;\n /** The affected SelectionSet. */\n set: SelectionSet;\n}\n\n/** Payload sent to [[SelectionSet.onChanged]] event listeners to describe how the contents of the set have changed.\n * The `type` property of the event serves as a type assertion. For example, the following code will output the added and/or removed Ids:\n * ```ts\n * processSelectionSetEvent(ev: SelectionSetEvent): void {\n * if (SelectionSetEventType.Add === ev.type || SelectionSetEventType.Replace === ev.type)\n * console.log(\"Added \" + (ev.additions.elements?.size ?? 0) + \" elements\");\n *\n * if (SelectionSetEventType.Add !== ev.type)\n * console.log(\"Removed \" + (ev.removals.elements?.size ?? 0) + \" elements\");\n * }\n * ```\n * @public\n * @extensions\n */\nexport type SelectionSetEvent = SelectAddEvent | SelectRemoveEvent | SelectReplaceEvent;\n\n/** Holds a set of hilited entities and makes any changes to the set by passing the change\n * function to given `change` callback.\n * @internal\n */\nclass HilitedIds extends Id64.Uint32Set {\n public constructor(private _change: (func: () => void) => void) {\n super();\n }\n\n public override add(low: number, high: number) {\n this._change(() => super.add(low, high));\n }\n\n public override delete(low: number, high: number) {\n this._change(() => super.delete(low, high));\n }\n\n public override clear() {\n this._change(() => super.clear());\n }\n\n public override addIds(ids: Id64Arg) {\n this._change(() => super.addIds(ids));\n }\n\n public override deleteIds(ids: Id64Arg) {\n this._change(() => super.deleteIds(ids));\n }\n}\n\n/** Describes how the sets of hilited models and subcategories in a [[HiliteSet]] interact.\n * - \"union\" indicates a [Feature]($common) will be hilited if either its model **or** its subcategory is present in the HiliteSet.\n * - \"intersection\" indicates a [Feature]($common) will be hilited only if both its model **and** its subcategory are present in the HiliteSet.\n *\n * @see [[HiliteSet.modelSubCategoryMode]] to change the mode for a HiliteSet.\n * @public\n */\nexport type ModelSubCategoryHiliteMode = \"union\" | \"intersection\";\n\n/** A set of *hilited* elements for an [[IModelConnection]], by element id.\n * Hilited elements are displayed with a customizable hilite effect within a [[Viewport]].\n * The set exposes 3 types of elements in 3 separate collections: [GeometricElement]($backend), [GeometricModel]($backend), and [SubCategory]($backend).\n * The [[models]] and [[subcategories]] can be hilited independently or as an intersection of the two sets, as specified by [[modelSubCategoryMode]].\n *\n * Technically, the hilite effect is applied to [Feature]($common)s, not [Element]($backend)s. An element's geometry stream can contain multiple\n * features belonging to different subcategories.\n *\n * Because Javascript lacks efficient support for 64-bit integers, the Ids are stored as pairs of 32-bit integers via [Id64.Uint32Set]($bentley).\n *\n * @note Typically, elements are hilited by virtue of their presence in the IModelConnection's [[SelectionSet]]. The HiliteSet allows additional\n * elements to be displayed with the hilite effect without adding them to the [[SelectionSet]]. If you add elements to the HiliteSet directly, you\n * are also responsible for removing them as appropriate.\n * @see [[IModelConnection.hilited]] for the HiliteSet associated with an iModel.\n * @see [Hilite.Settings]($common) for customization of the hilite effect.\n * @public\n * @extensions\n */\nexport class HiliteSet {\n #mode: ModelSubCategoryHiliteMode = \"union\";\n #selectionChangesListener?: () => void;\n #changing = false;\n\n /** The set of hilited elements. */\n public readonly elements: Id64.Uint32Set;\n\n /** The set of hilited subcategories.\n * @see [[modelSubCategoryMode]] to control how this set interacts with the set of hilited [[models]].\n * @see [[IModelConnection.Categories]] to obtain the set of subcategories associated with one or more [Category]($backend)'s.\n */\n public readonly subcategories: Id64.Uint32Set;\n\n /** The set of hilited [[GeometricModelState]]s.\n * @see [[modelSubCategoryMode]] to control how this set interacts with the set of hilited [[subcategories]].\n */\n public readonly models: Id64.Uint32Set;\n\n /** Controls how the sets of hilited [[models]] and [[subcategories]] interact with one another.\n * By default they are treated as a union: a [Feature]($common) is hilited if either its model **or** its subcategory is hilited.\n * This can be changed to an intersection such that a [Feature]($common) is hilited only if both its model **and** subcategory are hilited.\n * @note The sets of hilited models and subcategories are independent of the set of hilited [[elements]] - an element whose Id is present in\n * [[elements]] is always hilited regardless of its model or subcategories.\n */\n public get modelSubCategoryMode(): ModelSubCategoryHiliteMode {\n return this.#mode;\n }\n public set modelSubCategoryMode(mode: ModelSubCategoryHiliteMode) {\n if (mode === this.#mode) {\n return;\n }\n this.onModelSubCategoryModeChanged.raiseEvent(mode);\n this.#mode = mode;\n }\n\n /** Event raised just before changing the value of [[modelSubCategoryMode]]. */\n public readonly onModelSubCategoryModeChanged = new BeEvent<(newMode: ModelSubCategoryHiliteMode) => void>();\n\n /** Construct a HiliteSet\n * @param iModel The iModel containing the entities to be hilited.\n * @param syncWithSelectionSet If true, the hilite set contents will be synchronized with those in the `iModel`'s [[SelectionSet]].\n */\n public constructor(public iModel: IModelConnection, syncWithSelectionSet = true) {\n this.elements = new HilitedIds((func) => this.#change(func));\n this.subcategories = new HilitedIds((func) => this.#change(func));\n this.models = new HilitedIds((func) => this.#change(func));\n this.wantSyncWithSelectionSet = syncWithSelectionSet;\n }\n\n /** Control whether the hilite set will be synchronized with the contents of the [[SelectionSet]].\n * By default they are synchronized. Applications that override this take responsibility for managing the set of hilited entities.\n * When turning synchronization off, the contents of the HiliteSet will remain unchanged.\n * When turning synchronization on, the current contents of the HiliteSet will be preserved, and the contents of the selection set will be added to them.\n */\n public get wantSyncWithSelectionSet(): boolean {\n return !!this.#selectionChangesListener;\n }\n public set wantSyncWithSelectionSet(want: boolean) {\n if (want === this.wantSyncWithSelectionSet) {\n return;\n }\n if (want) {\n const set = this.iModel.selectionSet;\n this.#selectionChangesListener = set.onChanged.addListener((ev) => this.#processSelectionSetEvent(ev));\n this.add(set.active);\n } else {\n this.#selectionChangesListener!();\n this.#selectionChangesListener = undefined;\n }\n }\n\n #onChanged() {\n if (!this.#changing) {\n IModelApp.viewManager.onSelectionSetChanged(this.iModel);\n }\n }\n\n #change(func: () => void) {\n const changing = this.#changing;\n this.#changing = true;\n try {\n func();\n } finally {\n this.#changing = changing;\n }\n this.#onChanged();\n }\n\n #processSelectionSetEvent(ev: SelectionSetEvent) {\n switch (ev.type) {\n case SelectionSetEventType.Add:\n return this.add(ev.additions);\n case SelectionSetEventType.Replace:\n return this.#change(() => {\n this.add(ev.additions);\n this.remove(ev.removals);\n });\n case SelectionSetEventType.Remove:\n case SelectionSetEventType.Clear:\n return this.remove(ev.removals);\n }\n }\n\n /** Adds a collection of geometric element, model and subcategory ids to this hilite set. */\n public add(additions: SelectableIds): void {\n this.#change(() => {\n additions.elements && this.elements.addIds(additions.elements);\n additions.models && this.models.addIds(additions.models);\n additions.subcategories && this.subcategories.addIds(additions.subcategories);\n });\n }\n\n /** Removes a collection of geometric element, model and subcategory ids from this hilite set. */\n public remove(removals: SelectableIds): void {\n this.#change(() => {\n removals.elements && this.elements.deleteIds(removals.elements);\n removals.models && this.models.deleteIds(removals.models);\n removals.subcategories && this.subcategories.deleteIds(removals.subcategories);\n });\n }\n\n /** Replaces ids currently in the hilite set with the given collection. */\n public replace(ids: SelectableIds): void {\n this.#change(() => {\n this.clear();\n this.add(ids);\n });\n }\n\n /** Remove all elements from the hilited set. */\n public clear() {\n this.#change(() => {\n this.elements.clear();\n this.models.clear();\n this.subcategories.clear();\n });\n }\n\n /** Returns true if nothing is hilited. */\n public get isEmpty(): boolean {\n return this.elements.isEmpty && this.subcategories.isEmpty && this.models.isEmpty;\n }\n\n /** Toggle the hilited state of one or more elements.\n * @param arg the ID(s) of the elements whose state is to be toggled.\n * @param onOff True to add the elements to the hilited set, false to remove them.\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[add]], [[remove]], [[replace]] instead.\n */\n public setHilite(arg: Id64Arg, onOff: boolean): void {\n if (onOff) {\n this.add({ elements: arg });\n } else {\n this.remove({ elements: arg });\n }\n }\n}\n\n/** A set of *currently selected* geometric elements, models and subcategories for an `IModelConnection`.\n * Generally, selected elements are displayed with a customizable hilite effect within a [[Viewport]], see [[HiliteSet]].\n * @see [Hilite.Settings]($common) for customization of the hilite effect.\n * @public\n * @extensions\n */\nexport class SelectionSet {\n #selection: {\n [P in keyof SelectableIds]-?: Id64Set;\n };\n\n /** The IDs of the selected elements.\n * @note Do not modify this set directly. Instead, use methods like [[SelectionSet.add]].\n */\n public get elements(): Set<Id64String> {\n return this.#selection.elements;\n }\n\n /** The IDs of the selected models.\n * @note Do not modify this set directly. Instead, use methods like [[SelectionSet.add]].\n */\n public get models(): Set<Id64String> {\n return this.#selection.models;\n }\n\n /** The IDs of the selected subcategories.\n * @note Do not modify this set directly. Instead, use methods like [[SelectionSet.add]].\n */\n public get subcategories(): Set<Id64String> {\n return this.#selection.subcategories;\n }\n\n /** Get the active selection as a collection of geometric element, model and subcategory ids.\n * @note Do not modify the sets in returned collection directly. Instead, use methods like [[SelectionSet.add]].\n */\n public get active(): { [P in keyof SelectableIds]-?: Set<Id64String> } {\n return { ...this.#selection };\n }\n\n /** Called whenever ids are added or removed from this `SelectionSet` */\n public readonly onChanged = new BeEvent<(ev: SelectionSetEvent) => void>();\n\n public constructor(public iModel: IModelConnection) {\n this.#selection = {\n elements: new Set(),\n models: new Set(),\n subcategories: new Set(),\n };\n }\n\n #sendChangedEvent(ev: SelectionSetEvent) {\n IModelApp.viewManager.onSelectionSetChanged(this.iModel);\n this.onChanged.raiseEvent(ev);\n }\n\n /** Get the number of entries in this selection set. */\n public get size() {\n return this.elements.size + this.models.size + this.subcategories.size;\n }\n\n /** Check whether there are any ids in this selection set. */\n public get isActive() {\n return this.elements.size > 0 || this.models.size > 0 || this.subcategories.size > 0;\n }\n\n /** Return true if elemId is in this `SelectionSet`.\n * @see [[isSelected]]\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `SelectionSet.elements.has(elemId)` instead.\n */\n public has(elemId?: string) {\n return !!elemId && this.elements.has(elemId);\n }\n\n /** Query whether an Id is in the selection set.\n * @see [[has]]\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `SelectionSet.elements.has(elemId)` instead.\n */\n public isSelected(elemId?: Id64String): boolean {\n return !!elemId && this.elements.has(elemId);\n }\n\n /** Clear current selection set.\n * @note raises the [[onChanged]] event with [[SelectionSetEventType.Clear]].\n */\n public emptyAll(): void {\n if (!this.isActive) {\n return;\n }\n const removals = this.#selection;\n this.#selection = {\n elements: new Set(),\n models: new Set(),\n subcategories: new Set(),\n };\n this.#sendChangedEvent({ set: this, type: SelectionSetEventType.Clear, removals, removed: removals.elements });\n }\n\n /**\n * Add one or more Ids to the current selection set.\n * @param elem The set of Ids to add.\n * @returns true if any elements were added.\n */\n public add(adds: Id64Arg | SelectableIds): boolean {\n return !!this.#add(adds);\n }\n\n #add(adds: Id64Arg | SelectableIds, sendEvent = true): SelectableIds | undefined {\n const oldSize = this.size;\n const additions: { [P in keyof SelectableIds]: Id64Array } = {};\n forEachSelectableType({\n ids: adds,\n elements: (elementIds) =>\n addIds({\n target: this.#selection.elements,\n ids: elementIds,\n onAdd: (id) => (additions.elements ??= []).push(id),\n }),\n models: (modelIds) =>\n addIds({\n target: this.#selection.models,\n ids: modelIds,\n onAdd: (id) => (additions.models ??= []).push(id),\n }),\n subcategories: (subcategoryIds) =>\n addIds({\n target: this.#selection.subcategories,\n ids: subcategoryIds,\n onAdd: (id) => (additions.subcategories ??= []).push(id),\n }),\n });\n const changed = oldSize !== this.size;\n if (!changed) {\n return undefined;\n }\n if (sendEvent) {\n this.#sendChangedEvent({\n type: SelectionSetEventType.Add,\n set: this,\n additions,\n added: additions.elements ?? [],\n });\n }\n return additions;\n }\n\n /**\n * Remove one or more Ids from the current selection set.\n * @param elem The set of Ids to remove.\n * @returns true if any elements were removed.\n */\n public remove(removes: Id64Arg | SelectableIds): boolean {\n return !!this.#remove(removes);\n }\n\n #remove(removes: Id64Arg | SelectableIds, sendEvent = true): SelectableIds | undefined {\n const oldSize = this.size;\n const removals: { [P in keyof SelectableIds]: Id64Array } = {};\n forEachSelectableType({\n ids: removes,\n elements: (elementIds) =>\n removeIds({\n target: this.#selection.elements,\n ids: elementIds,\n onRemove: (id) => (removals.elements ??= []).push(id),\n }),\n models: (modelIds) =>\n removeIds({\n target: this.#selection.models,\n ids: modelIds,\n onRemove: (id) => (removals.models ??= []).push(id),\n }),\n subcategories: (subcategoryIds) =>\n removeIds({\n target: this.#selection.subcategories,\n ids: subcategoryIds,\n onRemove: (id) => (removals.subcategories ??= []).push(id),\n }),\n });\n const changed = oldSize !== this.size;\n if (!changed) {\n return undefined;\n }\n if (sendEvent) {\n this.#sendChangedEvent({\n type: SelectionSetEventType.Remove,\n set: this,\n removals,\n removed: removals.elements ?? [],\n });\n }\n return removals;\n }\n\n /**\n * Add one set of Ids, and remove another set of Ids. Any Ids that are in both sets are removed.\n * @returns True if any Ids were either added or removed.\n */\n public addAndRemove(adds: Id64Arg | SelectableIds, removes: Id64Arg | SelectableIds): boolean {\n const additions = this.#add(adds, false);\n const removals = this.#remove(removes, false);\n const addedElements = additions?.elements ?? [];\n const removedElements = removals?.elements ?? [];\n if (additions && removals) {\n this.#sendChangedEvent({\n type: SelectionSetEventType.Replace,\n set: this,\n additions,\n added: addedElements,\n removals,\n removed: removedElements,\n });\n } else if (additions) {\n this.#sendChangedEvent({\n type: SelectionSetEventType.Add,\n set: this,\n additions,\n added: addedElements,\n });\n } else if (removals) {\n this.#sendChangedEvent({\n type: SelectionSetEventType.Remove,\n set: this,\n removals,\n removed: removedElements,\n });\n }\n return !!additions || !!removals;\n }\n\n /** Invert the state of a set of Ids in the `SelectionSet` */\n public invert(ids: Id64Arg | SelectableIds): boolean {\n const adds: { [P in keyof SelectableIds]: Id64Set } = {};\n const removes: { [P in keyof SelectableIds]: Id64Set } = {};\n forEachSelectableType({\n ids,\n elements: (elementIds) => {\n for (const id of Id64.iterable(elementIds)) {\n ((this.elements.has(id) ? removes : adds).elements ??= new Set()).add(id);\n }\n },\n models: (modelIds) => {\n for (const id of Id64.iterable(modelIds)) {\n ((this.models.has(id) ? removes : adds).models ??= new Set()).add(id);\n }\n },\n subcategories: (subcategoryIds) => {\n for (const id of Id64.iterable(subcategoryIds)) {\n ((this.subcategories.has(id) ? removes : adds).subcategories ??= new Set()).add(id);\n }\n },\n });\n return this.addAndRemove(adds, removes);\n }\n\n /** Change selection set to be the supplied set of Ids. */\n public replace(ids: Id64Arg | SelectableIds): boolean {\n if (areEqual(this.#selection, ids)) {\n return false;\n }\n\n const previousSelection = this.#selection;\n this.#selection = {\n elements: new Set(),\n models: new Set(),\n subcategories: new Set(),\n };\n this.#add(ids, false);\n\n const additions: { [P in keyof SelectableIds]: Id64Set } = {};\n const removals: { [P in keyof SelectableIds]: Id64Set } = {};\n forEachSelectableType({\n ids: this.#selection,\n elements: (elementIds) => {\n removeIds({\n target: previousSelection.elements,\n ids: elementIds,\n onNotFound: (id) => (additions.elements ??= new Set()).add(id),\n });\n if (previousSelection.elements.size > 0) {\n removals.elements = previousSelection.elements;\n }\n },\n models: (modelIds) => {\n removeIds({\n target: previousSelection.models,\n ids: modelIds,\n onNotFound: (id) => (additions.models ??= new Set()).add(id),\n });\n if (previousSelection.models.size > 0) {\n removals.models = previousSelection.models;\n }\n },\n subcategories: (subcategoryIds) => {\n removeIds({\n target: previousSelection.subcategories,\n ids: subcategoryIds,\n onNotFound: (id) => (additions.subcategories ??= new Set()).add(id),\n });\n if (previousSelection.subcategories.size > 0) {\n removals.subcategories = previousSelection.subcategories;\n }\n },\n });\n\n this.#sendChangedEvent({\n type: SelectionSetEventType.Replace,\n set: this,\n additions,\n added: additions.elements ?? [],\n removals,\n removed: removals.elements ?? [],\n });\n return true;\n }\n}\n\n/**\n * A collection of geometric element, model and subcategory ids that can be added to\n * a [[SelectionSet]] or [[HiliteSet]].\n * @public\n */\nexport interface SelectableIds {\n elements?: Id64Arg;\n models?: Id64Arg;\n subcategories?: Id64Arg;\n}\n\nfunction forEachSelectableType({\n ids,\n elements,\n models,\n subcategories,\n}: {\n ids: Id64Arg | SelectableIds;\n elements: (ids: Id64Arg) => void;\n models: (ids: Id64Arg) => void;\n subcategories: (ids: Id64Arg) => void;\n}): SelectableIds {\n if (typeof ids === \"string\" || Array.isArray(ids) || ids instanceof Set) {\n elements(ids);\n return { elements: ids };\n }\n elements(ids.elements ?? []);\n models(ids.models ?? []);\n subcategories(ids.subcategories ?? []);\n return ids;\n}\n\nfunction areEqual(lhs: { [P in keyof SelectableIds]-?: Id64Set }, rhs: Id64Arg | SelectableIds): boolean {\n let result = true;\n forEachSelectableType({\n ids: rhs,\n elements: (elementIds) => {\n if (result && !areIdsEqual(lhs.elements, elementIds)) {\n result = false;\n }\n },\n models: (modelIds) => {\n if (result && !areIdsEqual(lhs.models, modelIds)) {\n result = false;\n }\n },\n subcategories: (subcategoryIds) => {\n if (result && !areIdsEqual(lhs.subcategories, subcategoryIds)) {\n result = false;\n }\n },\n });\n return result;\n}\n\nfunction areIdsEqual(lhs: Set<Id64String>, rhs: Id64Arg): boolean {\n // Size is unreliable if input can contain duplicates...\n if (Array.isArray(rhs)) {\n rhs = Id64.toIdSet(rhs);\n }\n if (lhs.size !== Id64.sizeOf(rhs)) {\n return false;\n }\n for (const id of Id64.iterable(rhs)) {\n if (!lhs.has(id)) {\n return false;\n }\n }\n return true;\n}\n\nfunction addIds({ target, ids, onAdd }: { target: Id64Set; ids: Id64Arg; onAdd?: (id: Id64String) => void }) {\n let size = target.size;\n for (const id of Id64.iterable(ids)) {\n target.add(id);\n const newSize = target.size;\n if (newSize !== size) {\n onAdd?.(id);\n }\n size = newSize;\n }\n}\n\nfunction removeIds({\n target,\n ids,\n onRemove,\n onNotFound,\n}: {\n target: Id64Set;\n ids: Id64Arg;\n onRemove?: (id: Id64String) => void;\n onNotFound?: (id: Id64String) => void;\n}) {\n let size = target.size;\n for (const id of Id64.iterable(ids)) {\n target.delete(id);\n const newSize = target.size;\n if (newSize !== size) {\n onRemove?.(id);\n } else {\n onNotFound?.(id);\n }\n size = newSize;\n }\n}\n"]}
|
|
@@ -65,6 +65,8 @@ export declare class SheetViewState extends ViewState2d {
|
|
|
65
65
|
/** See [[ViewState.detachFromViewport]]. */
|
|
66
66
|
detachFromViewport(): void;
|
|
67
67
|
get areAllTileTreesLoaded(): boolean;
|
|
68
|
+
/** @internal Strictly for testing */
|
|
69
|
+
areAllAttachmentsLoaded(): boolean;
|
|
68
70
|
/** Create a sheet border decoration graphic. */
|
|
69
71
|
private createBorder;
|
|
70
72
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SheetViewState.d.ts","sourceRoot":"","sources":["../../src/SheetViewState.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAsC,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAChG,OAAO,EAAoD,OAAO,EAAE,OAAO,EAA4B,OAAO,EAAiB,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACvK,OAAO,EACL,gBAAgB,EAAiF,4BAA4B,EAAE,6BAA6B,EAAmC,UAAU,EACpL,mBAAmB,EAAE,qBAAqB,EAAqB,cAAc,EACnG,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB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e,gBAAgB,IAAI,gBAAgB;IAIpD,gBAAgB;cACG,OAAO,CAAC,cAAc,EAAE,4BAA4B,GAAG,IAAI;IAK9E,gBAAgB;cACS,QAAQ,CAAC,eAAe,EAAE,6BAA6B,GAAG,OAAO,CAAC,IAAI,CAAC;IAOhG,gBAAgB;IACA,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAMxD,gBAAgB;IAChB,IAAoB,kBAAkB,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAgB3D;IAED,gBAAgB;YACF,kBAAkB;IASV,iBAAiB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ3E,0CAA0C;IAC1B,gBAAgB,CAAC,IAAI,EAAE,oBAAoB,GAAG,IAAI;IAMlE,4CAA4C;IAC5B,kBAAkB,IAAI,IAAI;IAK1C,IAAoB,qBAAqB,IAAI,OAAO,CAQnD;IAED,qCAAqC;IAC9B,uBAAuB,IAAI,OAAO;IAOzC,gDAAgD;IAChD,OAAO,CAAC,YAAY;IAOpB,gBAAgB;IACA,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IAQxC,eAAe,IAAI,OAAO;IAO1C,gBAAgB;IACA,qBAAqB,CAAC,IAAI,EAAE,yBAAyB,GAAG,QAAQ,GAAG,SAAS;IAS5F,YAAY;IACI,uBAAuB,CAAC,IAAI,EAAE,2BAA2B,GAAG,SAAS,GAAG,SAAS;CAgBlG"}
|
|
@@ -252,8 +252,18 @@ class ViewAttachments {
|
|
|
252
252
|
get isEmpty() {
|
|
253
253
|
return 0 === this._attachments.length;
|
|
254
254
|
}
|
|
255
|
-
|
|
256
|
-
return this._attachments.every((x) =>
|
|
255
|
+
areAllTileTreesLoaded(displayedExtents) {
|
|
256
|
+
return this._attachments.every((x) => {
|
|
257
|
+
const placement = core_common_1.Placement2d.fromJSON(x.viewAttachmentProps.placement);
|
|
258
|
+
const attachmentRange = placement.calculateRange();
|
|
259
|
+
if (!attachmentRange.intersectsRangeXY(displayedExtents))
|
|
260
|
+
return true;
|
|
261
|
+
return x.areAllTileTreesLoaded;
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
/** Strictly for testing purposes */
|
|
265
|
+
areAllAttachmentsLoaded() {
|
|
266
|
+
return this._attachments.every((attachment) => attachment.areAllTileTreesLoaded);
|
|
257
267
|
}
|
|
258
268
|
discloseTileTrees(trees) {
|
|
259
269
|
for (const attachment of this._attachments)
|
|
@@ -432,7 +442,19 @@ class SheetViewState extends ViewState_1.ViewState2d {
|
|
|
432
442
|
this._attachments = (0, core_bentley_1.dispose)(this._attachments);
|
|
433
443
|
}
|
|
434
444
|
get areAllTileTreesLoaded() {
|
|
435
|
-
|
|
445
|
+
let displayedExtents = this._viewedExtents;
|
|
446
|
+
const frustum = this.calculateFrustum();
|
|
447
|
+
if (frustum) {
|
|
448
|
+
displayedExtents = frustum.toRange();
|
|
449
|
+
}
|
|
450
|
+
return super.areAllTileTreesLoaded && (!this._attachments || this._attachments.areAllTileTreesLoaded(displayedExtents));
|
|
451
|
+
}
|
|
452
|
+
/** @internal Strictly for testing */
|
|
453
|
+
areAllAttachmentsLoaded() {
|
|
454
|
+
if (this._attachments) {
|
|
455
|
+
return this._attachments.areAllAttachmentsLoaded();
|
|
456
|
+
}
|
|
457
|
+
return true;
|
|
436
458
|
}
|
|
437
459
|
/** Create a sheet border decoration graphic. */
|
|
438
460
|
createBorder(width, height, context) {
|