@itwin/core-common 5.1.0-dev.3 → 5.1.0-dev.32
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 +32 -1
- package/lib/cjs/AmbientOcclusion.js.map +1 -1
- package/lib/cjs/AnalysisStyle.js.map +1 -1
- package/lib/cjs/Atmosphere.js.map +1 -1
- package/lib/cjs/AuthorizationClient.js.map +1 -1
- package/lib/cjs/BackgroundMapProvider.js.map +1 -1
- package/lib/cjs/BackgroundMapSettings.js.map +1 -1
- package/lib/cjs/Base64EncodedString.js.map +1 -1
- package/lib/cjs/BlobReader.js.map +1 -1
- package/lib/cjs/BriefcaseTypes.js.map +1 -1
- package/lib/cjs/Camera.js.map +1 -1
- package/lib/cjs/CatalogIModel.js.map +1 -1
- package/lib/cjs/CesiumIonAssets.js.map +1 -1
- package/lib/cjs/ChangedElements.js.map +1 -1
- package/lib/cjs/ChangedEntities.js.map +1 -1
- package/lib/cjs/ChangesetProps.js.map +1 -1
- package/lib/cjs/ClipStyle.js.map +1 -1
- package/lib/cjs/Code.js.map +1 -1
- package/lib/cjs/ColorByName.js.map +1 -1
- package/lib/cjs/ColorDef.js.map +1 -1
- package/lib/cjs/CommonLoggerCategory.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/ContextRealityModel.js.map +1 -1
- package/lib/cjs/ContourDisplay.js.map +1 -1
- package/lib/cjs/DisplayStyleSettings.js.map +1 -1
- package/lib/cjs/ECSchemaProps.js.map +1 -1
- package/lib/cjs/ECSqlReader.js.map +1 -1
- package/lib/cjs/ECSqlTypes.js.map +1 -1
- package/lib/cjs/ElementMesh.js.map +1 -1
- package/lib/cjs/ElementProps.d.ts +42 -42
- package/lib/cjs/ElementProps.js +6 -6
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
- package/lib/cjs/EntityProps.d.ts +4 -4
- package/lib/cjs/EntityProps.js.map +1 -1
- package/lib/cjs/EntityReference.js.map +1 -1
- package/lib/cjs/Environment.js.map +1 -1
- package/lib/cjs/FeatureIndex.js.map +1 -1
- package/lib/cjs/FeatureSymbology.js.map +1 -1
- package/lib/cjs/FeatureTable.js.map +1 -1
- package/lib/cjs/Fonts.js.map +1 -1
- package/lib/cjs/Frustum.js.map +1 -1
- package/lib/cjs/GenericInstanceFilter.js.map +1 -1
- package/lib/cjs/GeoCoordinateServices.js.map +1 -1
- package/lib/cjs/GeometryContainment.js.map +1 -1
- package/lib/cjs/GeometryParams.d.ts +3 -1
- package/lib/cjs/GeometryParams.d.ts.map +1 -1
- package/lib/cjs/GeometryParams.js +3 -1
- package/lib/cjs/GeometryParams.js.map +1 -1
- package/lib/cjs/GeometrySummary.js.map +1 -1
- package/lib/cjs/Gradient.js.map +1 -1
- package/lib/cjs/GraphicParams.d.ts +1 -0
- package/lib/cjs/GraphicParams.d.ts.map +1 -1
- package/lib/cjs/GraphicParams.js +1 -0
- package/lib/cjs/GraphicParams.js.map +1 -1
- package/lib/cjs/GroundPlane.js.map +1 -1
- package/lib/cjs/HSLColor.js.map +1 -1
- package/lib/cjs/HSVColor.js.map +1 -1
- package/lib/cjs/HiddenLine.js.map +1 -1
- package/lib/cjs/Hilite.js.map +1 -1
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/IModelError.js.map +1 -1
- package/lib/cjs/IModelVersion.js.map +1 -1
- package/lib/cjs/ITwinCoreErrors.d.ts +1 -1
- package/lib/cjs/ITwinCoreErrors.d.ts.map +1 -1
- package/lib/cjs/ITwinCoreErrors.js.map +1 -1
- package/lib/cjs/Image.js.map +1 -1
- package/lib/cjs/IpcAppProps.js.map +1 -1
- package/lib/cjs/LightSettings.js.map +1 -1
- package/lib/cjs/LinePixels.js.map +1 -1
- package/lib/cjs/Localization.js.map +1 -1
- package/lib/cjs/MapImagerySettings.js.map +1 -1
- package/lib/cjs/MapLayerSettings.js.map +1 -1
- package/lib/cjs/MassProperties.js.map +1 -1
- package/lib/cjs/MaterialProps.js.map +1 -1
- package/lib/cjs/ModelClipGroup.js.map +1 -1
- package/lib/cjs/ModelGeometryChanges.js.map +1 -1
- package/lib/cjs/ModelProps.js.map +1 -1
- package/lib/cjs/NativeAppProps.js.map +1 -1
- package/lib/cjs/OctEncodedNormal.js.map +1 -1
- package/lib/cjs/PlanProjectionSettings.js.map +1 -1
- package/lib/cjs/PlanarClipMask.js.map +1 -1
- package/lib/cjs/QPoint.js.map +1 -1
- package/lib/cjs/RealityDataAccessProps.js.map +1 -1
- package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
- package/lib/cjs/RenderMaterial.js.map +1 -1
- package/lib/cjs/RenderPolyline.js.map +1 -1
- package/lib/cjs/RenderSchedule.d.ts +5 -0
- package/lib/cjs/RenderSchedule.d.ts.map +1 -1
- package/lib/cjs/RenderSchedule.js +14 -0
- package/lib/cjs/RenderSchedule.js.map +1 -1
- package/lib/cjs/RenderTexture.js.map +1 -1
- package/lib/cjs/RgbColor.js.map +1 -1
- package/lib/cjs/RpcInterface.js.map +1 -1
- package/lib/cjs/RpcManager.js.map +1 -1
- package/lib/cjs/SessionProps.js.map +1 -1
- package/lib/cjs/SkyBox.js.map +1 -1
- package/lib/cjs/SolarCalculate.js.map +1 -1
- package/lib/cjs/SolarShadows.js.map +1 -1
- package/lib/cjs/SpatialClassification.js.map +1 -1
- package/lib/cjs/SubCategoryAppearance.js.map +1 -1
- package/lib/cjs/SubCategoryOverride.js.map +1 -1
- package/lib/cjs/TerrainSettings.js.map +1 -1
- package/lib/cjs/TextureMapping.js.map +1 -1
- package/lib/cjs/TextureProps.js.map +1 -1
- package/lib/cjs/ThematicDisplay.js.map +1 -1
- package/lib/cjs/Thumbnail.js.map +1 -1
- package/lib/cjs/TileProps.js.map +1 -1
- package/lib/cjs/Tween.js.map +1 -1
- package/lib/cjs/TxnAction.js.map +1 -1
- package/lib/cjs/ViewDetails.js.map +1 -1
- package/lib/cjs/ViewFlags.js.map +1 -1
- package/lib/cjs/ViewProps.js.map +1 -1
- package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/cjs/annotation/TextAnnotation.d.ts +33 -1
- package/lib/cjs/annotation/TextAnnotation.d.ts.map +1 -1
- package/lib/cjs/annotation/TextAnnotation.js +18 -4
- package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
- package/lib/cjs/annotation/TextBlock.js.map +1 -1
- package/lib/cjs/annotation/TextBlockGeometryProps.d.ts +1 -1
- package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/cjs/annotation/TextStyle.js.map +1 -1
- package/lib/cjs/core-common.js.map +1 -1
- package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
- package/lib/cjs/domains/GenericElementProps.js.map +1 -1
- package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
- package/lib/cjs/geometry/AreaPattern.js.map +1 -1
- package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
- package/lib/cjs/geometry/Cartographic.js.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.d.ts +1 -1
- package/lib/cjs/geometry/ElementGeometry.d.ts.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.js +2 -2
- package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
- package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
- package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/cjs/geometry/GeometryStream.js.map +1 -1
- package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
- package/lib/cjs/geometry/LineStyle.js.map +1 -1
- package/lib/cjs/geometry/Placement.js.map +1 -1
- package/lib/cjs/geometry/Projection.js.map +1 -1
- package/lib/cjs/geometry/TextString.js.map +1 -1
- package/lib/cjs/internal/BackendTypes.js.map +1 -1
- package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
- package/lib/cjs/internal/RenderMaterialParams.js.map +1 -1
- package/lib/cjs/internal/RenderMesh.js.map +1 -1
- package/lib/cjs/internal/RenderTextureParams.js.map +1 -1
- package/lib/cjs/internal/Snapping.js.map +1 -1
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/ipc/IpcSession.js.map +1 -1
- package/lib/cjs/ipc/IpcSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
- package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
- package/lib/cjs/tile/ElementGraphics.js.map +1 -1
- package/lib/cjs/tile/GltfTileIO.js.map +1 -1
- package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
- package/lib/cjs/tile/IModelTileIO.js +2 -2
- package/lib/cjs/tile/IModelTileIO.js.map +1 -1
- package/lib/cjs/tile/PntsTileIO.js.map +1 -1
- package/lib/cjs/tile/TileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.d.ts +5 -1
- package/lib/cjs/tile/TileMetadata.d.ts.map +1 -1
- package/lib/cjs/tile/TileMetadata.js +9 -3
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
- package/lib/esm/AmbientOcclusion.js.map +1 -1
- package/lib/esm/AnalysisStyle.js.map +1 -1
- package/lib/esm/Atmosphere.js.map +1 -1
- package/lib/esm/AuthorizationClient.js.map +1 -1
- package/lib/esm/BackgroundMapProvider.js.map +1 -1
- package/lib/esm/BackgroundMapSettings.js.map +1 -1
- package/lib/esm/Base64EncodedString.js.map +1 -1
- package/lib/esm/BlobReader.js.map +1 -1
- package/lib/esm/BriefcaseTypes.js.map +1 -1
- package/lib/esm/Camera.js.map +1 -1
- package/lib/esm/CatalogIModel.js.map +1 -1
- package/lib/esm/CesiumIonAssets.js.map +1 -1
- package/lib/esm/ChangedElements.js.map +1 -1
- package/lib/esm/ChangedEntities.js.map +1 -1
- package/lib/esm/ChangesetProps.js.map +1 -1
- package/lib/esm/ClipStyle.js.map +1 -1
- package/lib/esm/Code.js.map +1 -1
- package/lib/esm/ColorByName.js.map +1 -1
- package/lib/esm/ColorDef.js.map +1 -1
- package/lib/esm/CommonLoggerCategory.js.map +1 -1
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/ContextRealityModel.js.map +1 -1
- package/lib/esm/ContourDisplay.js.map +1 -1
- package/lib/esm/DisplayStyleSettings.js.map +1 -1
- package/lib/esm/ECSchemaProps.js.map +1 -1
- package/lib/esm/ECSqlReader.js.map +1 -1
- package/lib/esm/ECSqlTypes.js.map +1 -1
- package/lib/esm/ElementMesh.js.map +1 -1
- package/lib/esm/ElementProps.d.ts +42 -42
- package/lib/esm/ElementProps.js +6 -6
- package/lib/esm/ElementProps.js.map +1 -1
- package/lib/esm/EmphasizeElementsProps.js.map +1 -1
- package/lib/esm/EntityProps.d.ts +4 -4
- package/lib/esm/EntityProps.js.map +1 -1
- package/lib/esm/EntityReference.js.map +1 -1
- package/lib/esm/Environment.js.map +1 -1
- package/lib/esm/FeatureIndex.js.map +1 -1
- package/lib/esm/FeatureSymbology.js.map +1 -1
- package/lib/esm/FeatureTable.js.map +1 -1
- package/lib/esm/Fonts.js.map +1 -1
- package/lib/esm/Frustum.js.map +1 -1
- package/lib/esm/GenericInstanceFilter.js.map +1 -1
- package/lib/esm/GeoCoordinateServices.js.map +1 -1
- package/lib/esm/GeometryContainment.js.map +1 -1
- package/lib/esm/GeometryParams.d.ts +3 -1
- package/lib/esm/GeometryParams.d.ts.map +1 -1
- package/lib/esm/GeometryParams.js +3 -1
- package/lib/esm/GeometryParams.js.map +1 -1
- package/lib/esm/GeometrySummary.js.map +1 -1
- package/lib/esm/Gradient.js.map +1 -1
- package/lib/esm/GraphicParams.d.ts +1 -0
- package/lib/esm/GraphicParams.d.ts.map +1 -1
- package/lib/esm/GraphicParams.js +1 -0
- package/lib/esm/GraphicParams.js.map +1 -1
- package/lib/esm/GroundPlane.js.map +1 -1
- package/lib/esm/HSLColor.js.map +1 -1
- package/lib/esm/HSVColor.js.map +1 -1
- package/lib/esm/HiddenLine.js.map +1 -1
- package/lib/esm/Hilite.js.map +1 -1
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/IModelError.js.map +1 -1
- package/lib/esm/IModelVersion.js.map +1 -1
- package/lib/esm/ITwinCoreErrors.d.ts +1 -1
- package/lib/esm/ITwinCoreErrors.d.ts.map +1 -1
- package/lib/esm/ITwinCoreErrors.js.map +1 -1
- package/lib/esm/Image.js.map +1 -1
- package/lib/esm/IpcAppProps.js.map +1 -1
- package/lib/esm/LightSettings.js.map +1 -1
- package/lib/esm/LinePixels.js.map +1 -1
- package/lib/esm/Localization.js.map +1 -1
- package/lib/esm/MapImagerySettings.js.map +1 -1
- package/lib/esm/MapLayerSettings.js.map +1 -1
- package/lib/esm/MassProperties.js.map +1 -1
- package/lib/esm/MaterialProps.js.map +1 -1
- package/lib/esm/ModelClipGroup.js.map +1 -1
- package/lib/esm/ModelGeometryChanges.js.map +1 -1
- package/lib/esm/ModelProps.js.map +1 -1
- package/lib/esm/NativeAppProps.js.map +1 -1
- package/lib/esm/OctEncodedNormal.js.map +1 -1
- package/lib/esm/PlanProjectionSettings.js.map +1 -1
- package/lib/esm/PlanarClipMask.js.map +1 -1
- package/lib/esm/QPoint.js.map +1 -1
- package/lib/esm/RealityDataAccessProps.js.map +1 -1
- package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
- package/lib/esm/RenderMaterial.js.map +1 -1
- package/lib/esm/RenderPolyline.js.map +1 -1
- package/lib/esm/RenderSchedule.d.ts +5 -0
- package/lib/esm/RenderSchedule.d.ts.map +1 -1
- package/lib/esm/RenderSchedule.js +14 -0
- package/lib/esm/RenderSchedule.js.map +1 -1
- package/lib/esm/RenderTexture.js.map +1 -1
- package/lib/esm/RgbColor.js.map +1 -1
- package/lib/esm/RpcInterface.js.map +1 -1
- package/lib/esm/RpcManager.js.map +1 -1
- package/lib/esm/SessionProps.js.map +1 -1
- package/lib/esm/SkyBox.js.map +1 -1
- package/lib/esm/SolarCalculate.js.map +1 -1
- package/lib/esm/SolarShadows.js.map +1 -1
- package/lib/esm/SpatialClassification.js.map +1 -1
- package/lib/esm/SubCategoryAppearance.js.map +1 -1
- package/lib/esm/SubCategoryOverride.js.map +1 -1
- package/lib/esm/TerrainSettings.js.map +1 -1
- package/lib/esm/TextureMapping.js.map +1 -1
- package/lib/esm/TextureProps.js.map +1 -1
- package/lib/esm/ThematicDisplay.js.map +1 -1
- package/lib/esm/Thumbnail.js.map +1 -1
- package/lib/esm/TileProps.js.map +1 -1
- package/lib/esm/Tween.js.map +1 -1
- package/lib/esm/TxnAction.js.map +1 -1
- package/lib/esm/ViewDetails.js.map +1 -1
- package/lib/esm/ViewFlags.js.map +1 -1
- package/lib/esm/ViewProps.js.map +1 -1
- package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/esm/annotation/TextAnnotation.d.ts +33 -1
- package/lib/esm/annotation/TextAnnotation.d.ts.map +1 -1
- package/lib/esm/annotation/TextAnnotation.js +18 -4
- package/lib/esm/annotation/TextAnnotation.js.map +1 -1
- package/lib/esm/annotation/TextBlock.js.map +1 -1
- package/lib/esm/annotation/TextBlockGeometryProps.d.ts +1 -1
- package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/esm/annotation/TextStyle.js.map +1 -1
- package/lib/esm/core-common.js.map +1 -1
- package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
- package/lib/esm/domains/GenericElementProps.js.map +1 -1
- package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
- package/lib/esm/geometry/AreaPattern.js.map +1 -1
- package/lib/esm/geometry/BoundingSphere.js.map +1 -1
- package/lib/esm/geometry/Cartographic.js.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/esm/geometry/ElementGeometry.d.ts +1 -1
- package/lib/esm/geometry/ElementGeometry.d.ts.map +1 -1
- package/lib/esm/geometry/ElementGeometry.js +2 -2
- package/lib/esm/geometry/ElementGeometry.js.map +1 -1
- package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
- package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
- package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/esm/geometry/GeometryStream.js.map +1 -1
- package/lib/esm/geometry/ImageGraphic.js.map +1 -1
- package/lib/esm/geometry/LineStyle.js.map +1 -1
- package/lib/esm/geometry/Placement.js.map +1 -1
- package/lib/esm/geometry/Projection.js.map +1 -1
- package/lib/esm/geometry/TextString.js.map +1 -1
- package/lib/esm/internal/BackendTypes.js.map +1 -1
- package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
- package/lib/esm/internal/RenderMaterialParams.js.map +1 -1
- package/lib/esm/internal/RenderMesh.js.map +1 -1
- package/lib/esm/internal/RenderTextureParams.js.map +1 -1
- package/lib/esm/internal/Snapping.js.map +1 -1
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/ipc/IpcSession.js.map +1 -1
- package/lib/esm/ipc/IpcSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/esm/rpc/TestRpcManager.js.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
- package/lib/esm/rpc/core/RpcControl.js.map +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
- package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/esm/rpc/core/RpcPush.js.map +1 -1
- package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/esm/tile/B3dmTileIO.js.map +1 -1
- package/lib/esm/tile/CompositeTileIO.js.map +1 -1
- package/lib/esm/tile/ElementGraphics.js.map +1 -1
- package/lib/esm/tile/GltfTileIO.js.map +1 -1
- package/lib/esm/tile/I3dmTileIO.js.map +1 -1
- package/lib/esm/tile/IModelTileIO.d.ts +2 -2
- package/lib/esm/tile/IModelTileIO.js +2 -2
- package/lib/esm/tile/IModelTileIO.js.map +1 -1
- package/lib/esm/tile/PntsTileIO.js.map +1 -1
- package/lib/esm/tile/TileIO.js.map +1 -1
- package/lib/esm/tile/TileMetadata.d.ts +5 -1
- package/lib/esm/tile/TileMetadata.d.ts.map +1 -1
- package/lib/esm/tile/TileMetadata.js +9 -3
- package/lib/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GAAG,UAAU,GAAG,CAAC,EAAE,CAAC;YACvC,EAAE,IAAI,CAAC,YAAY,CAAC;QACtB,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;YACvB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;YACtB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;QACrB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,OAAO;QAClB,MAAM,IAAI,GAAG,EAAE,CAAC;QAChB,OAAO,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;YACzB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC;QACrC,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACI,CAAC,MAAM,CAAC,aAAa,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,IAAI;QACf,IAAI,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;YACtB,OAAO;gBACL,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,IAAI,CAAC,OAAO;aACpB,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO;gBACL,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE,IAAI,CAAC,OAAO;aACpB,CAAC;QACJ,CAAC;IACH,CAAC;;AAxVH,kCAyVC","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 iModels\n */\nimport { Base64EncodedString } from \"./Base64EncodedString\";\nimport {\n DbQueryError, DbQueryRequest, DbQueryResponse, DbRequestExecutor, DbRequestKind, DbResponseStatus, DbValueFormat, QueryBinder, QueryOptions, QueryOptionsBuilder,\n QueryPropertyMetaData, QueryRowFormat,\n} from \"./ConcurrentQuery\";\n\n/** @public */\nexport class PropertyMetaDataMap implements Iterable<QueryPropertyMetaData> {\n private _byPropName = new Map<string, number>();\n private _byJsonName = new Map<string, number>();\n private _byNoCase = new Map<string, number>();\n\n public constructor(public readonly properties: QueryPropertyMetaData[]) {\n for (const property of this.properties) {\n property.extendType = property.extendedType !== undefined ? property.extendedType : \"\"; // eslint-disable-line @typescript-eslint/no-deprecated\n property.extendedType = property.extendedType === \"\" ? undefined : property.extendedType;\n this._byPropName.set(property.name, property.index);\n this._byJsonName.set(property.jsonName, property.index);\n this._byNoCase.set(property.name.toLowerCase(), property.index);\n this._byNoCase.set(property.jsonName.toLowerCase(), property.index);\n }\n }\n\n public get length(): number {\n return this.properties.length;\n }\n\n public [Symbol.iterator](): Iterator<QueryPropertyMetaData, any, undefined> {\n return this.properties[Symbol.iterator]();\n }\n\n public findByName(name: string): QueryPropertyMetaData | undefined {\n const index = this._byPropName.get(name);\n if (typeof index === \"number\") {\n return this.properties[index];\n }\n return undefined;\n }\n\n public findByJsonName(name: string): QueryPropertyMetaData | undefined {\n const index = this._byJsonName.get(name);\n if (typeof index === \"number\") {\n return this.properties[index];\n }\n return undefined;\n }\n\n public findByNoCase(name: string): QueryPropertyMetaData | undefined {\n const index = this._byNoCase.get(name.toLowerCase());\n if (typeof index === \"number\") {\n return this.properties[index];\n }\n return undefined;\n }\n}\n\n/**\n * The format for rows returned by [[ECSqlReader]].\n * @public\n */\nexport type QueryValueType = any;\n\n/**\n * Methods and ways of accessing values from rows returned by [[ECSqlReader]].\n * @public\n */\nexport interface QueryRowProxy {\n /**\n * Get the current row as a JavaScript `object`.\n *\n * @returns The current row as a JavaScript `object`.\n */\n toRow(): any;\n\n /**\n * Get all remaining rows from the query result.\n * If called on the current row ([[ECSqlReader.current]]), only that row is returned.\n *\n * @returns All remaining rows from the query result.\n */\n toArray(): QueryValueType[];\n\n /**\n * Get the metadata for each column in the query result.\n *\n * @returns The metadata for each column in the query result.\n */\n getMetaData(): QueryPropertyMetaData[];\n\n /**\n * Access a property using its name.\n *\n * @returns The value from the row whose key (ECSQL column name) is `propertyName`.\n *\n * @example\n * The following lines will all return the same result:\n * ```ts\n * reader.current.ECInstanceId;\n * reader.current.ecinstanceid;\n * reader.current.[\"ECInstanceId\"];\n * ```\n */\n [propertyName: string]: QueryValueType;\n\n /**\n * Access a property using its index.\n * The index is relative to the order of the columns returned by the query that produced the row.\n *\n * @returns The value from the column at `propertyIndex`.\n *\n * @example reader.current[0]\n */\n [propertyIndex: number]: QueryValueType;\n}\n\n/**\n * Performance-related statistics for [[ECSqlReader]].\n * @public\n */\nexport interface QueryStats {\n /** Time spent running the query; not including time spent queued. Time is in microseconds */\n backendCpuTime: number;\n /** Total time it took the backend to run the query. Time is in milliseconds. */\n backendTotalTime: number;\n /** Estimated memory used for the query. */\n backendMemUsed: number;\n /** Total number of rows returned by the backend. */\n backendRowsReturned: number;\n /** The total round trip time from the client's perspective. Time is in milliseconds. */\n totalTime: number;\n /** The number of retries attempted to execute the query. */\n retryCount: number;\n /** Total time in millisecond to prepare ECSQL or grabing it from cache and binding parameters */\n prepareTime: number;\n}\n\n/**\n * Execute ECSQL statements and read the results.\n *\n * The query results are returned one row at a time. The format of the row is dictated by the\n * [[QueryOptions.rowFormat]] specified in the `options` parameter of the constructed ECSqlReader object. Defaults to\n * [[QueryRowFormat.UseECSqlPropertyIndexes]] when no `rowFormat` is defined.\n *\n * There are three primary ways to interact with and read the results:\n * - Stream them using ECSqlReader as an asynchronous iterator.\n * - Iterator over them manually using [[ECSqlReader.step]].\n * - Capture all of the results at once in an array using [[QueryRowProxy.toArray]].\n *\n * @see\n * - [ECSQL Overview]($docs/learning/backend/ExecutingECSQL)\n * - [ECSQL Row Formats]($docs/learning/ECSQLRowFormat) for more details on how rows are formatted.\n * - [ECSQL Code Examples]($docs/learning/ECSQLCodeExamples#iterating-over-query-results) for examples of each\n * of the above ways of interacting with ECSqlReader.\n *\n * @note When iterating over the results, the current row will be a [[QueryRowProxy]] object. To get the row as a basic\n * JavaScript object, call [[QueryRowProxy.toRow]] on it.\n * @public\n */\nexport class ECSqlReader implements AsyncIterableIterator<QueryRowProxy> {\n private static readonly _maxRetryCount = 10;\n\n private _localRows: any[] = [];\n private _localOffset: number = 0;\n private _globalOffset: number = -1;\n private _globalCount: number = -1;\n private _done: boolean = false;\n private _globalDone: boolean = false;\n private _props = new PropertyMetaDataMap([]);\n private _param = new QueryBinder().serialize();\n private _lockArgs: boolean = false;\n private _stats = { backendCpuTime: 0, backendTotalTime: 0, backendMemUsed: 0, backendRowsReturned: 0, totalTime: 0, retryCount: 0, prepareTime: 0 };\n private _options: QueryOptions = new QueryOptionsBuilder().getOptions();\n\n private _rowProxy = new Proxy<ECSqlReader>(this, {\n get: (target: ECSqlReader, key: string | symbol) => {\n if (typeof key === \"string\") {\n const idx = Number.parseInt(key, 10);\n if (!Number.isNaN(idx)) {\n return target.getRowInternal()[idx];\n }\n const prop = target._props.findByNoCase(key);\n if (prop) {\n return target.getRowInternal()[prop.index];\n }\n if (key === \"getMetaData\") {\n return () => target._props.properties;\n }\n if (key === \"toRow\") {\n return () => target.formatCurrentRow(true);\n }\n if (key === \"toArray\") {\n return () => this.getRowInternal();\n }\n }\n return undefined;\n },\n has: (target: ECSqlReader, p: string | symbol) => {\n return !target._props.findByNoCase(p as string);\n },\n ownKeys: (target: ECSqlReader) => {\n const keys = [];\n for (const prop of target._props) {\n keys.push(prop.name);\n }\n return keys;\n },\n });\n\n /**\n * @internal\n */\n public constructor(private _executor: DbRequestExecutor<DbQueryRequest, DbQueryResponse>, public readonly query: string, param?: QueryBinder, options?: QueryOptions) {\n if (query.trim().length === 0) {\n throw new Error(\"expecting non-empty ecsql statement\");\n }\n if (param) {\n this._param = param.serialize();\n }\n this.reset(options);\n }\n\n private static replaceBase64WithUint8Array(row: any) {\n for (const key of Object.keys(row)) {\n const val = row[key];\n if (typeof val === \"string\") {\n if (Base64EncodedString.hasPrefix(val)) {\n row[key] = Base64EncodedString.toUint8Array(val);\n }\n } else if (typeof val === \"object\" && val !== null) {\n this.replaceBase64WithUint8Array(val);\n }\n }\n }\n\n public setParams(param: QueryBinder) {\n if (this._lockArgs) {\n throw new Error(\"call resetBindings() before setting or changing parameters\");\n }\n this._param = param.serialize();\n }\n\n public reset(options?: QueryOptions) {\n if (options) {\n this._options = options;\n }\n this._props = new PropertyMetaDataMap([]);\n this._localRows = [];\n this._globalDone = false;\n this._globalOffset = 0;\n this._globalCount = -1;\n if (typeof this._options.rowFormat === \"undefined\")\n this._options.rowFormat = QueryRowFormat.UseECSqlPropertyIndexes;\n if (this._options.limit) {\n if (typeof this._options.limit.offset === \"number\" && this._options.limit.offset > 0)\n this._globalOffset = this._options.limit.offset;\n if (typeof this._options.limit.count === \"number\" && this._options.limit.count > 0)\n this._globalCount = this._options.limit.count;\n }\n this._done = false;\n }\n\n /**\n * Get the current row from the query result. The current row is the one most recently stepped-to\n * (by step() or during iteration).\n *\n * Each value from the row can be accessed by index or by name.\n *\n * The format of the row is dictated by the [[QueryOptions.rowFormat]] specified in the `options` parameter of the\n * constructed ECSqlReader object.\n *\n * @see\n * - [[QueryRowFormat]]\n * - [ECSQL Row Formats]($docs/learning/ECSQLRowFormat)\n *\n * @note The current row is be a [[QueryRowProxy]] object. To get the row as a basic JavaScript object, call\n * [[QueryRowProxy.toRow]] on it.\n *\n * @example\n * ```ts\n * const reader = iModel.createQueryReader(\"SELECT ECInstanceId FROM bis.Element\");\n * while (await reader.step()) {\n * // Both lines below print the same value\n * console.log(reader.current[0]);\n * console.log(reader.current.ecinstanceid);\n * }\n * ```\n *\n * @return The current row as a [[QueryRowProxy]].\n */\n public get current(): QueryRowProxy {\n return this._rowProxy as any;\n }\n\n /**\n * Clear all bindings.\n */\n public resetBindings() {\n this._param = new QueryBinder().serialize();\n this._lockArgs = false;\n }\n\n /**\n * Returns if there are more rows available.\n *\n * @returns `true` if all rows have been stepped through already.<br/>\n * `false` if there are any yet unaccessed rows.\n */\n public get done(): boolean {\n return this._done;\n }\n\n /**\n * @internal\n */\n public getRowInternal(): any[] {\n if (this._localRows.length <= this._localOffset)\n throw new Error(\"no current row\");\n return this._localRows[this._localOffset] as any[];\n }\n\n /**\n * Get performance-related statistics for the current query.\n */\n public get stats(): QueryStats {\n return this._stats;\n }\n\n /**\n *\n */\n private async readRows(): Promise<any[]> {\n if (this._globalDone) {\n return [];\n }\n this._lockArgs = true;\n this._globalOffset += this._localRows.length;\n this._globalCount -= this._localRows.length;\n if (this._globalCount === 0) {\n return [];\n }\n const valueFormat = this._options.rowFormat === QueryRowFormat.UseJsPropertyNames ? DbValueFormat.JsNames : DbValueFormat.ECSqlNames;\n const request: DbQueryRequest = {\n ... this._options,\n kind: DbRequestKind.ECSql,\n valueFormat,\n query: this.query,\n args: this._param,\n };\n request.includeMetaData = this._props.length > 0 ? false : true;\n request.limit = { offset: this._globalOffset, count: this._globalCount < 1 ? -1 : this._globalCount };\n const resp = await this.runWithRetry(request);\n this._globalDone = resp.status === DbResponseStatus.Done;\n if (this._props.length === 0 && resp.meta.length > 0) {\n this._props = new PropertyMetaDataMap(resp.meta);\n }\n for (const row of resp.data) {\n ECSqlReader.replaceBase64WithUint8Array(row);\n }\n return resp.data;\n }\n\n /**\n * @internal\n */\n protected async runWithRetry(request: DbQueryRequest) {\n const needRetry = (rs: DbQueryResponse) => (rs.status === DbResponseStatus.Partial || rs.status === DbResponseStatus.QueueFull || rs.status === DbResponseStatus.Timeout || rs.status === DbResponseStatus.ShuttingDown) && (rs.data === undefined || rs.data.length === 0);\n const updateStats = (rs: DbQueryResponse) => {\n this._stats.backendCpuTime += rs.stats.cpuTime;\n this._stats.backendTotalTime += rs.stats.totalTime;\n this._stats.backendMemUsed += rs.stats.memUsed;\n this._stats.prepareTime += rs.stats.prepareTime;\n this._stats.backendRowsReturned += (rs.data === undefined) ? 0 : rs.data.length;\n };\n const execQuery = async (req: DbQueryRequest) => {\n const startTime = Date.now();\n const rs = await this._executor.execute(req);\n this.stats.totalTime += (Date.now() - startTime);\n return rs;\n };\n let retry = ECSqlReader._maxRetryCount;\n let resp = await execQuery(request);\n DbQueryError.throwIfError(resp, request);\n while (--retry > 0 && needRetry(resp)) {\n resp = await execQuery(request);\n this._stats.retryCount += 1;\n if (needRetry(resp)) {\n updateStats(resp);\n }\n }\n if (retry === 0 && needRetry(resp)) {\n throw new Error(\"query too long to execute or server is too busy\");\n }\n updateStats(resp);\n return resp;\n }\n\n /**\n * @internal\n */\n public formatCurrentRow(onlyReturnObject: boolean = false): any[] | object {\n if (!onlyReturnObject && this._options.rowFormat === QueryRowFormat.UseECSqlPropertyIndexes) {\n return this.getRowInternal();\n }\n const formattedRow = {};\n for (const prop of this._props) {\n const propName = this._options.rowFormat === QueryRowFormat.UseJsPropertyNames ? prop.jsonName : prop.name;\n const val = this.getRowInternal()[prop.index];\n if (typeof val !== \"undefined\" && val !== null) {\n Object.defineProperty(formattedRow, propName, {\n value: val,\n enumerable: true,\n });\n }\n }\n return formattedRow;\n }\n\n /**\n * Get the metadata for each column in the query result.\n *\n * @returns An array of [[QueryPropertyMetaData]].\n */\n public async getMetaData(): Promise<QueryPropertyMetaData[]> {\n if (this._props.length === 0) {\n await this.fetchRows();\n }\n return this._props.properties;\n }\n\n /**\n *\n */\n private async fetchRows() {\n this._localOffset = -1;\n this._localRows = await this.readRows();\n if (this._localRows.length === 0) {\n this._done = true;\n }\n }\n\n /**\n * Step to the next row of the query result.\n *\n * @returns `true` if a row can be read from `current`.<br/>\n * `false` if there are no more rows; i.e., all rows have been stepped through already.\n */\n public async step(): Promise<boolean> {\n if (this._done) {\n return false;\n }\n const cachedRows = this._localRows.length;\n if (this._localOffset < cachedRows - 1) {\n ++this._localOffset;\n } else {\n await this.fetchRows();\n this._localOffset = 0;\n return !this._done;\n }\n return true;\n }\n\n /**\n * Get all remaining rows from the query result.\n *\n * @returns An array of all remaining rows from the query result.\n */\n public async toArray(): Promise<any[]> {\n const rows = [];\n while (await this.step()) {\n rows.push(this.formatCurrentRow());\n }\n return rows;\n }\n\n /**\n * Accessor for using ECSqlReader as an asynchronous iterator.\n *\n * @returns An asynchronous iterator over the rows returned by the executed ECSQL query.\n */\n public [Symbol.asyncIterator](): AsyncIterableIterator<QueryRowProxy> {\n return this;\n }\n\n /**\n * Calls step when called as an iterator.\n *\n * Returns the row alongside a `done` boolean to indicate if there are any more rows for an iterator to step to.\n *\n * @returns An object with the keys: `value` which contains the row and `done` which contains a boolean.\n */\n public async next(): Promise<IteratorResult<QueryRowProxy, any>> {\n if (await this.step()) {\n return {\n done: false,\n value: this.current,\n };\n } else {\n return {\n done: true,\n value: this.current,\n };\n }\n }\n}\n\n"]}
|
|
1
|
+
{"version":3,"file":"ECSqlReader.js","sourceRoot":"","sources":["../../src/ECSqlReader.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,+DAA4D;AAC5D,uDAG2B;AAE3B,cAAc;AACd,MAAa,mBAAmB;IAKK;IAJ3B,WAAW,GAAG,IAAI,GAAG,EAAkB,CAAC;IACxC,WAAW,GAAG,IAAI,GAAG,EAAkB,CAAC;IACxC,SAAS,GAAG,IAAI,GAAG,EAAkB,CAAC;IAE9C,YAAmC,UAAmC;QAAnC,eAAU,GAAV,UAAU,CAAyB;QACpE,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACvC,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAG,uDAAuD;YACjJ,QAAQ,CAAC,YAAY,GAAG,QAAQ,CAAC,YAAY,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC;YACzF,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;Y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VH,kCAyVC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\nimport { Base64EncodedString } from \"./Base64EncodedString\";\r\nimport {\r\n DbQueryError, DbQueryRequest, DbQueryResponse, DbRequestExecutor, DbRequestKind, DbResponseStatus, DbValueFormat, QueryBinder, QueryOptions, QueryOptionsBuilder,\r\n QueryPropertyMetaData, QueryRowFormat,\r\n} from \"./ConcurrentQuery\";\r\n\r\n/** @public */\r\nexport class PropertyMetaDataMap implements Iterable<QueryPropertyMetaData> {\r\n private _byPropName = new Map<string, number>();\r\n private _byJsonName = new Map<string, number>();\r\n private _byNoCase = new Map<string, number>();\r\n\r\n public constructor(public readonly properties: QueryPropertyMetaData[]) {\r\n for (const property of this.properties) {\r\n property.extendType = property.extendedType !== undefined ? property.extendedType : \"\"; // eslint-disable-line @typescript-eslint/no-deprecated\r\n property.extendedType = property.extendedType === \"\" ? undefined : property.extendedType;\r\n this._byPropName.set(property.name, property.index);\r\n this._byJsonName.set(property.jsonName, property.index);\r\n this._byNoCase.set(property.name.toLowerCase(), property.index);\r\n this._byNoCase.set(property.jsonName.toLowerCase(), property.index);\r\n }\r\n }\r\n\r\n public get length(): number {\r\n return this.properties.length;\r\n }\r\n\r\n public [Symbol.iterator](): Iterator<QueryPropertyMetaData, any, undefined> {\r\n return this.properties[Symbol.iterator]();\r\n }\r\n\r\n public findByName(name: string): QueryPropertyMetaData | undefined {\r\n const index = this._byPropName.get(name);\r\n if (typeof index === \"number\") {\r\n return this.properties[index];\r\n }\r\n return undefined;\r\n }\r\n\r\n public findByJsonName(name: string): QueryPropertyMetaData | undefined {\r\n const index = this._byJsonName.get(name);\r\n if (typeof index === \"number\") {\r\n return this.properties[index];\r\n }\r\n return undefined;\r\n }\r\n\r\n public findByNoCase(name: string): QueryPropertyMetaData | undefined {\r\n const index = this._byNoCase.get(name.toLowerCase());\r\n if (typeof index === \"number\") {\r\n return this.properties[index];\r\n }\r\n return undefined;\r\n }\r\n}\r\n\r\n/**\r\n * The format for rows returned by [[ECSqlReader]].\r\n * @public\r\n */\r\nexport type QueryValueType = any;\r\n\r\n/**\r\n * Methods and ways of accessing values from rows returned by [[ECSqlReader]].\r\n * @public\r\n */\r\nexport interface QueryRowProxy {\r\n /**\r\n * Get the current row as a JavaScript `object`.\r\n *\r\n * @returns The current row as a JavaScript `object`.\r\n */\r\n toRow(): any;\r\n\r\n /**\r\n * Get all remaining rows from the query result.\r\n * If called on the current row ([[ECSqlReader.current]]), only that row is returned.\r\n *\r\n * @returns All remaining rows from the query result.\r\n */\r\n toArray(): QueryValueType[];\r\n\r\n /**\r\n * Get the metadata for each column in the query result.\r\n *\r\n * @returns The metadata for each column in the query result.\r\n */\r\n getMetaData(): QueryPropertyMetaData[];\r\n\r\n /**\r\n * Access a property using its name.\r\n *\r\n * @returns The value from the row whose key (ECSQL column name) is `propertyName`.\r\n *\r\n * @example\r\n * The following lines will all return the same result:\r\n * ```ts\r\n * reader.current.ECInstanceId;\r\n * reader.current.ecinstanceid;\r\n * reader.current.[\"ECInstanceId\"];\r\n * ```\r\n */\r\n [propertyName: string]: QueryValueType;\r\n\r\n /**\r\n * Access a property using its index.\r\n * The index is relative to the order of the columns returned by the query that produced the row.\r\n *\r\n * @returns The value from the column at `propertyIndex`.\r\n *\r\n * @example reader.current[0]\r\n */\r\n [propertyIndex: number]: QueryValueType;\r\n}\r\n\r\n/**\r\n * Performance-related statistics for [[ECSqlReader]].\r\n * @public\r\n */\r\nexport interface QueryStats {\r\n /** Time spent running the query; not including time spent queued. Time is in microseconds */\r\n backendCpuTime: number;\r\n /** Total time it took the backend to run the query. Time is in milliseconds. */\r\n backendTotalTime: number;\r\n /** Estimated memory used for the query. */\r\n backendMemUsed: number;\r\n /** Total number of rows returned by the backend. */\r\n backendRowsReturned: number;\r\n /** The total round trip time from the client's perspective. Time is in milliseconds. */\r\n totalTime: number;\r\n /** The number of retries attempted to execute the query. */\r\n retryCount: number;\r\n /** Total time in millisecond to prepare ECSQL or grabing it from cache and binding parameters */\r\n prepareTime: number;\r\n}\r\n\r\n/**\r\n * Execute ECSQL statements and read the results.\r\n *\r\n * The query results are returned one row at a time. The format of the row is dictated by the\r\n * [[QueryOptions.rowFormat]] specified in the `options` parameter of the constructed ECSqlReader object. Defaults to\r\n * [[QueryRowFormat.UseECSqlPropertyIndexes]] when no `rowFormat` is defined.\r\n *\r\n * There are three primary ways to interact with and read the results:\r\n * - Stream them using ECSqlReader as an asynchronous iterator.\r\n * - Iterator over them manually using [[ECSqlReader.step]].\r\n * - Capture all of the results at once in an array using [[QueryRowProxy.toArray]].\r\n *\r\n * @see\r\n * - [ECSQL Overview]($docs/learning/backend/ExecutingECSQL)\r\n * - [ECSQL Row Formats]($docs/learning/ECSQLRowFormat) for more details on how rows are formatted.\r\n * - [ECSQL Code Examples]($docs/learning/ECSQLCodeExamples#iterating-over-query-results) for examples of each\r\n * of the above ways of interacting with ECSqlReader.\r\n *\r\n * @note When iterating over the results, the current row will be a [[QueryRowProxy]] object. To get the row as a basic\r\n * JavaScript object, call [[QueryRowProxy.toRow]] on it.\r\n * @public\r\n */\r\nexport class ECSqlReader implements AsyncIterableIterator<QueryRowProxy> {\r\n private static readonly _maxRetryCount = 10;\r\n\r\n private _localRows: any[] = [];\r\n private _localOffset: number = 0;\r\n private _globalOffset: number = -1;\r\n private _globalCount: number = -1;\r\n private _done: boolean = false;\r\n private _globalDone: boolean = false;\r\n private _props = new PropertyMetaDataMap([]);\r\n private _param = new QueryBinder().serialize();\r\n private _lockArgs: boolean = false;\r\n private _stats = { backendCpuTime: 0, backendTotalTime: 0, backendMemUsed: 0, backendRowsReturned: 0, totalTime: 0, retryCount: 0, prepareTime: 0 };\r\n private _options: QueryOptions = new QueryOptionsBuilder().getOptions();\r\n\r\n private _rowProxy = new Proxy<ECSqlReader>(this, {\r\n get: (target: ECSqlReader, key: string | symbol) => {\r\n if (typeof key === \"string\") {\r\n const idx = Number.parseInt(key, 10);\r\n if (!Number.isNaN(idx)) {\r\n return target.getRowInternal()[idx];\r\n }\r\n const prop = target._props.findByNoCase(key);\r\n if (prop) {\r\n return target.getRowInternal()[prop.index];\r\n }\r\n if (key === \"getMetaData\") {\r\n return () => target._props.properties;\r\n }\r\n if (key === \"toRow\") {\r\n return () => target.formatCurrentRow(true);\r\n }\r\n if (key === \"toArray\") {\r\n return () => this.getRowInternal();\r\n }\r\n }\r\n return undefined;\r\n },\r\n has: (target: ECSqlReader, p: string | symbol) => {\r\n return !target._props.findByNoCase(p as string);\r\n },\r\n ownKeys: (target: ECSqlReader) => {\r\n const keys = [];\r\n for (const prop of target._props) {\r\n keys.push(prop.name);\r\n }\r\n return keys;\r\n },\r\n });\r\n\r\n /**\r\n * @internal\r\n */\r\n public constructor(private _executor: DbRequestExecutor<DbQueryRequest, DbQueryResponse>, public readonly query: string, param?: QueryBinder, options?: QueryOptions) {\r\n if (query.trim().length === 0) {\r\n throw new Error(\"expecting non-empty ecsql statement\");\r\n }\r\n if (param) {\r\n this._param = param.serialize();\r\n }\r\n this.reset(options);\r\n }\r\n\r\n private static replaceBase64WithUint8Array(row: any) {\r\n for (const key of Object.keys(row)) {\r\n const val = row[key];\r\n if (typeof val === \"string\") {\r\n if (Base64EncodedString.hasPrefix(val)) {\r\n row[key] = Base64EncodedString.toUint8Array(val);\r\n }\r\n } else if (typeof val === \"object\" && val !== null) {\r\n this.replaceBase64WithUint8Array(val);\r\n }\r\n }\r\n }\r\n\r\n public setParams(param: QueryBinder) {\r\n if (this._lockArgs) {\r\n throw new Error(\"call resetBindings() before setting or changing parameters\");\r\n }\r\n this._param = param.serialize();\r\n }\r\n\r\n public reset(options?: QueryOptions) {\r\n if (options) {\r\n this._options = options;\r\n }\r\n this._props = new PropertyMetaDataMap([]);\r\n this._localRows = [];\r\n this._globalDone = false;\r\n this._globalOffset = 0;\r\n this._globalCount = -1;\r\n if (typeof this._options.rowFormat === \"undefined\")\r\n this._options.rowFormat = QueryRowFormat.UseECSqlPropertyIndexes;\r\n if (this._options.limit) {\r\n if (typeof this._options.limit.offset === \"number\" && this._options.limit.offset > 0)\r\n this._globalOffset = this._options.limit.offset;\r\n if (typeof this._options.limit.count === \"number\" && this._options.limit.count > 0)\r\n this._globalCount = this._options.limit.count;\r\n }\r\n this._done = false;\r\n }\r\n\r\n /**\r\n * Get the current row from the query result. The current row is the one most recently stepped-to\r\n * (by step() or during iteration).\r\n *\r\n * Each value from the row can be accessed by index or by name.\r\n *\r\n * The format of the row is dictated by the [[QueryOptions.rowFormat]] specified in the `options` parameter of the\r\n * constructed ECSqlReader object.\r\n *\r\n * @see\r\n * - [[QueryRowFormat]]\r\n * - [ECSQL Row Formats]($docs/learning/ECSQLRowFormat)\r\n *\r\n * @note The current row is be a [[QueryRowProxy]] object. To get the row as a basic JavaScript object, call\r\n * [[QueryRowProxy.toRow]] on it.\r\n *\r\n * @example\r\n * ```ts\r\n * const reader = iModel.createQueryReader(\"SELECT ECInstanceId FROM bis.Element\");\r\n * while (await reader.step()) {\r\n * // Both lines below print the same value\r\n * console.log(reader.current[0]);\r\n * console.log(reader.current.ecinstanceid);\r\n * }\r\n * ```\r\n *\r\n * @return The current row as a [[QueryRowProxy]].\r\n */\r\n public get current(): QueryRowProxy {\r\n return this._rowProxy as any;\r\n }\r\n\r\n /**\r\n * Clear all bindings.\r\n */\r\n public resetBindings() {\r\n this._param = new QueryBinder().serialize();\r\n this._lockArgs = false;\r\n }\r\n\r\n /**\r\n * Returns if there are more rows available.\r\n *\r\n * @returns `true` if all rows have been stepped through already.<br/>\r\n * `false` if there are any yet unaccessed rows.\r\n */\r\n public get done(): boolean {\r\n return this._done;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public getRowInternal(): any[] {\r\n if (this._localRows.length <= this._localOffset)\r\n throw new Error(\"no current row\");\r\n return this._localRows[this._localOffset] as any[];\r\n }\r\n\r\n /**\r\n * Get performance-related statistics for the current query.\r\n */\r\n public get stats(): QueryStats {\r\n return this._stats;\r\n }\r\n\r\n /**\r\n *\r\n */\r\n private async readRows(): Promise<any[]> {\r\n if (this._globalDone) {\r\n return [];\r\n }\r\n this._lockArgs = true;\r\n this._globalOffset += this._localRows.length;\r\n this._globalCount -= this._localRows.length;\r\n if (this._globalCount === 0) {\r\n return [];\r\n }\r\n const valueFormat = this._options.rowFormat === QueryRowFormat.UseJsPropertyNames ? DbValueFormat.JsNames : DbValueFormat.ECSqlNames;\r\n const request: DbQueryRequest = {\r\n ... this._options,\r\n kind: DbRequestKind.ECSql,\r\n valueFormat,\r\n query: this.query,\r\n args: this._param,\r\n };\r\n request.includeMetaData = this._props.length > 0 ? false : true;\r\n request.limit = { offset: this._globalOffset, count: this._globalCount < 1 ? -1 : this._globalCount };\r\n const resp = await this.runWithRetry(request);\r\n this._globalDone = resp.status === DbResponseStatus.Done;\r\n if (this._props.length === 0 && resp.meta.length > 0) {\r\n this._props = new PropertyMetaDataMap(resp.meta);\r\n }\r\n for (const row of resp.data) {\r\n ECSqlReader.replaceBase64WithUint8Array(row);\r\n }\r\n return resp.data;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected async runWithRetry(request: DbQueryRequest) {\r\n const needRetry = (rs: DbQueryResponse) => (rs.status === DbResponseStatus.Partial || rs.status === DbResponseStatus.QueueFull || rs.status === DbResponseStatus.Timeout || rs.status === DbResponseStatus.ShuttingDown) && (rs.data === undefined || rs.data.length === 0);\r\n const updateStats = (rs: DbQueryResponse) => {\r\n this._stats.backendCpuTime += rs.stats.cpuTime;\r\n this._stats.backendTotalTime += rs.stats.totalTime;\r\n this._stats.backendMemUsed += rs.stats.memUsed;\r\n this._stats.prepareTime += rs.stats.prepareTime;\r\n this._stats.backendRowsReturned += (rs.data === undefined) ? 0 : rs.data.length;\r\n };\r\n const execQuery = async (req: DbQueryRequest) => {\r\n const startTime = Date.now();\r\n const rs = await this._executor.execute(req);\r\n this.stats.totalTime += (Date.now() - startTime);\r\n return rs;\r\n };\r\n let retry = ECSqlReader._maxRetryCount;\r\n let resp = await execQuery(request);\r\n DbQueryError.throwIfError(resp, request);\r\n while (--retry > 0 && needRetry(resp)) {\r\n resp = await execQuery(request);\r\n this._stats.retryCount += 1;\r\n if (needRetry(resp)) {\r\n updateStats(resp);\r\n }\r\n }\r\n if (retry === 0 && needRetry(resp)) {\r\n throw new Error(\"query too long to execute or server is too busy\");\r\n }\r\n updateStats(resp);\r\n return resp;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public formatCurrentRow(onlyReturnObject: boolean = false): any[] | object {\r\n if (!onlyReturnObject && this._options.rowFormat === QueryRowFormat.UseECSqlPropertyIndexes) {\r\n return this.getRowInternal();\r\n }\r\n const formattedRow = {};\r\n for (const prop of this._props) {\r\n const propName = this._options.rowFormat === QueryRowFormat.UseJsPropertyNames ? prop.jsonName : prop.name;\r\n const val = this.getRowInternal()[prop.index];\r\n if (typeof val !== \"undefined\" && val !== null) {\r\n Object.defineProperty(formattedRow, propName, {\r\n value: val,\r\n enumerable: true,\r\n });\r\n }\r\n }\r\n return formattedRow;\r\n }\r\n\r\n /**\r\n * Get the metadata for each column in the query result.\r\n *\r\n * @returns An array of [[QueryPropertyMetaData]].\r\n */\r\n public async getMetaData(): Promise<QueryPropertyMetaData[]> {\r\n if (this._props.length === 0) {\r\n await this.fetchRows();\r\n }\r\n return this._props.properties;\r\n }\r\n\r\n /**\r\n *\r\n */\r\n private async fetchRows() {\r\n this._localOffset = -1;\r\n this._localRows = await this.readRows();\r\n if (this._localRows.length === 0) {\r\n this._done = true;\r\n }\r\n }\r\n\r\n /**\r\n * Step to the next row of the query result.\r\n *\r\n * @returns `true` if a row can be read from `current`.<br/>\r\n * `false` if there are no more rows; i.e., all rows have been stepped through already.\r\n */\r\n public async step(): Promise<boolean> {\r\n if (this._done) {\r\n return false;\r\n }\r\n const cachedRows = this._localRows.length;\r\n if (this._localOffset < cachedRows - 1) {\r\n ++this._localOffset;\r\n } else {\r\n await this.fetchRows();\r\n this._localOffset = 0;\r\n return !this._done;\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * Get all remaining rows from the query result.\r\n *\r\n * @returns An array of all remaining rows from the query result.\r\n */\r\n public async toArray(): Promise<any[]> {\r\n const rows = [];\r\n while (await this.step()) {\r\n rows.push(this.formatCurrentRow());\r\n }\r\n return rows;\r\n }\r\n\r\n /**\r\n * Accessor for using ECSqlReader as an asynchronous iterator.\r\n *\r\n * @returns An asynchronous iterator over the rows returned by the executed ECSQL query.\r\n */\r\n public [Symbol.asyncIterator](): AsyncIterableIterator<QueryRowProxy> {\r\n return this;\r\n }\r\n\r\n /**\r\n * Calls step when called as an iterator.\r\n *\r\n * Returns the row alongside a `done` boolean to indicate if there are any more rows for an iterator to step to.\r\n *\r\n * @returns An object with the keys: `value` which contains the row and `done` which contains a boolean.\r\n */\r\n public async next(): Promise<IteratorResult<QueryRowProxy, any>> {\r\n if (await this.step()) {\r\n return {\r\n done: false,\r\n value: this.current,\r\n };\r\n } else {\r\n return {\r\n done: true,\r\n value: this.current,\r\n };\r\n }\r\n }\r\n}\r\n\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ECSqlTypes.js","sourceRoot":"","sources":["../../src/ECSqlTypes.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyD;AAEzD;;;;GAIG;AACH,IAAY,cAkBX;AAlBD,WAAY,cAAc;IACxB,qFAAqF;IACrF,mDAAQ,CAAA;IACR,yDAAW,CAAA;IACX,2DAAY,CAAA;IACZ,uDAAU,CAAA;IACV,2DAAY,CAAA;IACZ,+CAAM,CAAA;IACN,iDAAO,CAAA;IACP,qDAAS,CAAA;IACT,yDAAW,CAAA;IACX,0DAAY,CAAA;IACZ,wDAAW,CAAA;IACX,gEAAe,CAAA;IACf,wDAAW,CAAA;IACX,wEAAmB,CAA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,mBAAmB,CAAC,eAAe;gBACtC,OAAO,iBAAiB,CAAC;YAC3B,KAAK,mBAAmB,CAAC,oBAAoB;gBAC3C,OAAO,cAAc,CAAC;YACxB,KAAK,mBAAmB,CAAC,MAAM;gBAC7B,OAAO,GAAG,CAAC;YACb,KAAK,mBAAmB,CAAC,MAAM;gBAC7B,OAAO,GAAG,CAAC;YACb,KAAK,mBAAmB,CAAC,MAAM;gBAC7B,OAAO,GAAG,CAAC;YACb;gBACE,MAAM,IAAI,KAAK,CAAC,0CAA0C,kBAAkB,GAAG,CAAC,CAAC;QACrF,CAAC;IACH,CAAC;IAEO,MAAM,CAAC,cAAc,CAAC,IAAY,IAAY,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC1G;AAjHD,8BAiHC","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 ECSQL\n */\n\nimport { assert, Id64String } from \"@itwin/core-bentley\";\n\n/** Describes the different data types an ECSQL value can be of.\n * See also [ECSQL]($docs/learning/ECSQL).\n * @public\n * @extensions\n */\nexport enum ECSqlValueType {\n // do not change the values of the enum as it must match its counterpart in the addon\n Blob = 1,\n Boolean = 2,\n DateTime = 3,\n Double = 4,\n Geometry = 5,\n Id = 6,\n Int = 7,\n Int64 = 8,\n Point2d = 9,\n Point3d = 10,\n String = 11,\n Navigation = 12,\n Struct = 13,\n PrimitiveArray = 14,\n StructArray = 15,\n Guid = 16,\n}\n\n/** An ECSQL Navigation value.\n * It is returned from ECSQL SELECT statements for navigation properties.\n * See also [ECSQL]($docs/learning/ECSQL).\n * @public\n * @extensions\n */\nexport interface NavigationValue {\n /** ECInstanceId of the related instance */\n id: Id64String;\n /** Fully qualified class name of the relationship backing the Navigation property */\n relClassName?: string;\n}\n\n/** An ECSQL Navigation value which can be bound to a navigation property ECSQL parameter\n * See also [ECSQL]($docs/learning/ECSQL).\n * @public\n * @extensions\n */\nexport interface NavigationBindingValue {\n /** ECInstanceId of the related instance */\n id: Id64String;\n /** Fully qualified class name of the relationship backing the Navigation property */\n relClassName?: string;\n /** Table space where the relationship's schema is persisted. This is only required\n * if other ECDb files are attached to the primary one. In case a schema exists in more than one of the files,\n * pass the table space to disambiguate.\n */\n relClassTableSpace?: string;\n}\n\n/** Equivalent of the ECEnumeration OpCode in the **ECDbChange** ECSchema.\n * The enum can be used when programmatically binding values to the InstanceChange.OpCode property of\n * the ECDbChange ECSchema.\n *\n * See also\n * - [ChangeSummary Overview]($docs/learning/ChangeSummaries)\n * @public\n * @extensions\n */\nexport enum ChangeOpCode {\n Insert = 1,\n Update = 2,\n Delete = 4,\n}\n\n/** The enum represents the values for the ChangedValueState argument of the ECSQL function **Changes**.\n * The enum can be used when programmatically binding values to the ChangedValueState argument\n * in an ECSQL using the **Changes** ECSQL function.\n *\n * See also\n * - [ChangeSummary Overview]($docs/learning/ChangeSummaries)\n * @public\n * @extensions\n */\nexport enum ChangedValueState {\n AfterInsert = 1,\n BeforeUpdate = 2,\n AfterUpdate = 3,\n BeforeDelete = 4,\n}\n\n/** Defines the ECSQL system properties.\n * See also [ECSQL]($docs/learning/ECSQL).\n * @public\n * @extensions\n */\nexport enum ECSqlSystemProperty {\n ECInstanceId,\n ECClassId,\n SourceECInstanceId,\n SourceECClassId,\n TargetECInstanceId,\n TargetECClassId,\n NavigationId,\n NavigationRelClassId,\n PointX,\n PointY,\n PointZ,\n}\n\n/** Utility to format ECProperty names according to the iTwin.js formatting rules.\n * See also [ECSQL Row Format]($docs/learning/ECSQLRowFormat).\n * @public\n */\nexport class ECJsNames {\n\n /** Formats the specified ECProperty name according to the iTwin.js formatting rules.\n *\n * See [ECSQL Row Format]($docs/learning/ECSQLRowFormat) which describes the formatting rules.\n *\n * @param ecProperty Property name as defined in the ECSchema for regular ECProperties\n * or the name of an ECSQL system properties\n * @param isSystemProperty if omitted, the method will try to find out whether the given property\n * is a system property or not. If true is specified, the method will throw if the property name\n * is not a known system property. If false is specified, the method will not attempt to recognize\n * the property name as system property.\n */\n public static toJsName(propName: string, isSystemProperty?: boolean) {\n assert(propName !== undefined, \"propName must not be undefined\");\n\n const propTypeUnknown: boolean = isSystemProperty === undefined || isSystemProperty === null;\n\n const accessStringTokens: string[] = propName.split(\".\");\n const tokenCount: number = accessStringTokens.length;\n assert(tokenCount > 0);\n\n if (tokenCount === 1) {\n if (propTypeUnknown || isSystemProperty!) {\n if (propName === \"ECInstanceId\")\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.ECInstanceId);\n\n if (propName === \"ECClassId\")\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.ECClassId);\n\n if (propName === \"SourceECInstanceId\")\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.SourceECInstanceId);\n\n if (propName === \"TargetECInstanceId\")\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.TargetECInstanceId);\n\n if (propName === \"SourceECClassId\")\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.SourceECClassId);\n\n if (propName === \"TargetECClassId\")\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.TargetECClassId);\n\n return ECJsNames.lowerFirstChar(propName);\n }\n\n return ECJsNames.lowerFirstChar(propName);\n }\n\n // parse access string and convert the leaf tokens if they are system props\n // The first char of the access string is lowered.\n let jsName: string = ECJsNames.lowerFirstChar(`${accessStringTokens[0]}.`);\n for (let j = 1; j < tokenCount - 1; j++) {\n jsName += `${accessStringTokens[j]}.`;\n }\n\n const leafToken: string = accessStringTokens[tokenCount - 1];\n\n if (propTypeUnknown || isSystemProperty!) {\n if (leafToken === \"Id\")\n jsName += ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.NavigationId);\n else if (leafToken === \"RelECClassId\")\n jsName += ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.NavigationRelClassId);\n else if (leafToken === \"X\")\n jsName += ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.PointX);\n else if (leafToken === \"Y\")\n jsName += ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.PointY);\n else if (leafToken === \"Z\")\n jsName += ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.PointZ);\n else if (propTypeUnknown)\n jsName += ECJsNames.lowerFirstChar(leafToken);\n else\n throw new Error(`Property ${leafToken} of access string ${propName} is no ECSQL system property.`);\n } else\n jsName += leafToken;\n\n return jsName;\n }\n\n /** Returns the name of the specified ECSQL system property according to the\n * iTwin.js formatting rules.\n *\n * See [ECSQL Row Format]($docs/learning/ECSQLRowFormat) which describes the formatting rules.\n * @param systemPropertyType System property type\n */\n public static systemPropertyToJsName(systemPropertyType: ECSqlSystemProperty): string {\n switch (systemPropertyType) {\n case ECSqlSystemProperty.ECInstanceId:\n case ECSqlSystemProperty.NavigationId:\n return \"id\";\n case ECSqlSystemProperty.ECClassId:\n return \"className\";\n case ECSqlSystemProperty.SourceECInstanceId:\n return \"sourceId\";\n case ECSqlSystemProperty.SourceECClassId:\n return \"sourceClassName\";\n case ECSqlSystemProperty.TargetECInstanceId:\n return \"targetId\";\n case ECSqlSystemProperty.TargetECClassId:\n return \"targetClassName\";\n case ECSqlSystemProperty.NavigationRelClassId:\n return \"relClassName\";\n case ECSqlSystemProperty.PointX:\n return \"x\";\n case ECSqlSystemProperty.PointY:\n return \"y\";\n case ECSqlSystemProperty.PointZ:\n return \"z\";\n default:\n throw new Error(`Unknown ECSqlSystemProperty enum value ${systemPropertyType}.`);\n }\n }\n\n private static lowerFirstChar(name: string): string { return name[0].toLowerCase() + name.substring(1); }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ECSqlTypes.js","sourceRoot":"","sources":["../../src/ECSqlTypes.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyD;AAEzD;;;;G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,CAAC;YACtC,KAAK,mBAAmB,CAAC,YAAY;gBACnC,OAAO,IAAI,CAAC;YACd,KAAK,mBAAmB,CAAC,SAAS;gBAChC,OAAO,WAAW,CAAC;YACrB,KAAK,mBAAmB,CAAC,kBAAkB;gBACzC,OAAO,UAAU,CAAC;YACpB,KAAK,mBAAmB,CAAC,eAAe;gBACtC,OAAO,iBAAiB,CAAC;YAC3B,KAAK,mBAAmB,CAAC,kBAAkB;gBACzC,OAAO,UAAU,CAAC;YACpB,KAAK,mBAAmB,CAAC,eAAe;gBACtC,OAAO,iBAAiB,CAAC;YAC3B,KAAK,mBAAmB,CAAC,oBAAoB;gBAC3C,OAAO,cAAc,CAAC;YACxB,KAAK,mBAAmB,CAAC,MAAM;gBAC7B,OAAO,GAAG,CAAC;YACb,KAAK,mBAAmB,CAAC,MAAM;gBAC7B,OAAO,GAAG,CAAC;YACb,KAAK,mBAAmB,CAAC,MAAM;gBAC7B,OAAO,GAAG,CAAC;YACb;gBACE,MAAM,IAAI,KAAK,CAAC,0CAA0C,kBAAkB,GAAG,CAAC,CAAC;QACrF,CAAC;IACH,CAAC;IAEO,MAAM,CAAC,cAAc,CAAC,IAAY,IAAY,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC1G;AAjHD,8BAiHC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ECSQL\r\n */\r\n\r\nimport { assert, Id64String } from \"@itwin/core-bentley\";\r\n\r\n/** Describes the different data types an ECSQL value can be of.\r\n * See also [ECSQL]($docs/learning/ECSQL).\r\n * @public\r\n * @extensions\r\n */\r\nexport enum ECSqlValueType {\r\n // do not change the values of the enum as it must match its counterpart in the addon\r\n Blob = 1,\r\n Boolean = 2,\r\n DateTime = 3,\r\n Double = 4,\r\n Geometry = 5,\r\n Id = 6,\r\n Int = 7,\r\n Int64 = 8,\r\n Point2d = 9,\r\n Point3d = 10,\r\n String = 11,\r\n Navigation = 12,\r\n Struct = 13,\r\n PrimitiveArray = 14,\r\n StructArray = 15,\r\n Guid = 16,\r\n}\r\n\r\n/** An ECSQL Navigation value.\r\n * It is returned from ECSQL SELECT statements for navigation properties.\r\n * See also [ECSQL]($docs/learning/ECSQL).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface NavigationValue {\r\n /** ECInstanceId of the related instance */\r\n id: Id64String;\r\n /** Fully qualified class name of the relationship backing the Navigation property */\r\n relClassName?: string;\r\n}\r\n\r\n/** An ECSQL Navigation value which can be bound to a navigation property ECSQL parameter\r\n * See also [ECSQL]($docs/learning/ECSQL).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface NavigationBindingValue {\r\n /** ECInstanceId of the related instance */\r\n id: Id64String;\r\n /** Fully qualified class name of the relationship backing the Navigation property */\r\n relClassName?: string;\r\n /** Table space where the relationship's schema is persisted. This is only required\r\n * if other ECDb files are attached to the primary one. In case a schema exists in more than one of the files,\r\n * pass the table space to disambiguate.\r\n */\r\n relClassTableSpace?: string;\r\n}\r\n\r\n/** Equivalent of the ECEnumeration OpCode in the **ECDbChange** ECSchema.\r\n * The enum can be used when programmatically binding values to the InstanceChange.OpCode property of\r\n * the ECDbChange ECSchema.\r\n *\r\n * See also\r\n * - [ChangeSummary Overview]($docs/learning/ChangeSummaries)\r\n * @public\r\n * @extensions\r\n */\r\nexport enum ChangeOpCode {\r\n Insert = 1,\r\n Update = 2,\r\n Delete = 4,\r\n}\r\n\r\n/** The enum represents the values for the ChangedValueState argument of the ECSQL function **Changes**.\r\n * The enum can be used when programmatically binding values to the ChangedValueState argument\r\n * in an ECSQL using the **Changes** ECSQL function.\r\n *\r\n * See also\r\n * - [ChangeSummary Overview]($docs/learning/ChangeSummaries)\r\n * @public\r\n * @extensions\r\n */\r\nexport enum ChangedValueState {\r\n AfterInsert = 1,\r\n BeforeUpdate = 2,\r\n AfterUpdate = 3,\r\n BeforeDelete = 4,\r\n}\r\n\r\n/** Defines the ECSQL system properties.\r\n * See also [ECSQL]($docs/learning/ECSQL).\r\n * @public\r\n * @extensions\r\n */\r\nexport enum ECSqlSystemProperty {\r\n ECInstanceId,\r\n ECClassId,\r\n SourceECInstanceId,\r\n SourceECClassId,\r\n TargetECInstanceId,\r\n TargetECClassId,\r\n NavigationId,\r\n NavigationRelClassId,\r\n PointX,\r\n PointY,\r\n PointZ,\r\n}\r\n\r\n/** Utility to format ECProperty names according to the iTwin.js formatting rules.\r\n * See also [ECSQL Row Format]($docs/learning/ECSQLRowFormat).\r\n * @public\r\n */\r\nexport class ECJsNames {\r\n\r\n /** Formats the specified ECProperty name according to the iTwin.js formatting rules.\r\n *\r\n * See [ECSQL Row Format]($docs/learning/ECSQLRowFormat) which describes the formatting rules.\r\n *\r\n * @param ecProperty Property name as defined in the ECSchema for regular ECProperties\r\n * or the name of an ECSQL system properties\r\n * @param isSystemProperty if omitted, the method will try to find out whether the given property\r\n * is a system property or not. If true is specified, the method will throw if the property name\r\n * is not a known system property. If false is specified, the method will not attempt to recognize\r\n * the property name as system property.\r\n */\r\n public static toJsName(propName: string, isSystemProperty?: boolean) {\r\n assert(propName !== undefined, \"propName must not be undefined\");\r\n\r\n const propTypeUnknown: boolean = isSystemProperty === undefined || isSystemProperty === null;\r\n\r\n const accessStringTokens: string[] = propName.split(\".\");\r\n const tokenCount: number = accessStringTokens.length;\r\n assert(tokenCount > 0);\r\n\r\n if (tokenCount === 1) {\r\n if (propTypeUnknown || isSystemProperty!) {\r\n if (propName === \"ECInstanceId\")\r\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.ECInstanceId);\r\n\r\n if (propName === \"ECClassId\")\r\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.ECClassId);\r\n\r\n if (propName === \"SourceECInstanceId\")\r\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.SourceECInstanceId);\r\n\r\n if (propName === \"TargetECInstanceId\")\r\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.TargetECInstanceId);\r\n\r\n if (propName === \"SourceECClassId\")\r\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.SourceECClassId);\r\n\r\n if (propName === \"TargetECClassId\")\r\n return ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.TargetECClassId);\r\n\r\n return ECJsNames.lowerFirstChar(propName);\r\n }\r\n\r\n return ECJsNames.lowerFirstChar(propName);\r\n }\r\n\r\n // parse access string and convert the leaf tokens if they are system props\r\n // The first char of the access string is lowered.\r\n let jsName: string = ECJsNames.lowerFirstChar(`${accessStringTokens[0]}.`);\r\n for (let j = 1; j < tokenCount - 1; j++) {\r\n jsName += `${accessStringTokens[j]}.`;\r\n }\r\n\r\n const leafToken: string = accessStringTokens[tokenCount - 1];\r\n\r\n if (propTypeUnknown || isSystemProperty!) {\r\n if (leafToken === \"Id\")\r\n jsName += ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.NavigationId);\r\n else if (leafToken === \"RelECClassId\")\r\n jsName += ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.NavigationRelClassId);\r\n else if (leafToken === \"X\")\r\n jsName += ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.PointX);\r\n else if (leafToken === \"Y\")\r\n jsName += ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.PointY);\r\n else if (leafToken === \"Z\")\r\n jsName += ECJsNames.systemPropertyToJsName(ECSqlSystemProperty.PointZ);\r\n else if (propTypeUnknown)\r\n jsName += ECJsNames.lowerFirstChar(leafToken);\r\n else\r\n throw new Error(`Property ${leafToken} of access string ${propName} is no ECSQL system property.`);\r\n } else\r\n jsName += leafToken;\r\n\r\n return jsName;\r\n }\r\n\r\n /** Returns the name of the specified ECSQL system property according to the\r\n * iTwin.js formatting rules.\r\n *\r\n * See [ECSQL Row Format]($docs/learning/ECSQLRowFormat) which describes the formatting rules.\r\n * @param systemPropertyType System property type\r\n */\r\n public static systemPropertyToJsName(systemPropertyType: ECSqlSystemProperty): string {\r\n switch (systemPropertyType) {\r\n case ECSqlSystemProperty.ECInstanceId:\r\n case ECSqlSystemProperty.NavigationId:\r\n return \"id\";\r\n case ECSqlSystemProperty.ECClassId:\r\n return \"className\";\r\n case ECSqlSystemProperty.SourceECInstanceId:\r\n return \"sourceId\";\r\n case ECSqlSystemProperty.SourceECClassId:\r\n return \"sourceClassName\";\r\n case ECSqlSystemProperty.TargetECInstanceId:\r\n return \"targetId\";\r\n case ECSqlSystemProperty.TargetECClassId:\r\n return \"targetClassName\";\r\n case ECSqlSystemProperty.NavigationRelClassId:\r\n return \"relClassName\";\r\n case ECSqlSystemProperty.PointX:\r\n return \"x\";\r\n case ECSqlSystemProperty.PointY:\r\n return \"y\";\r\n case ECSqlSystemProperty.PointZ:\r\n return \"z\";\r\n default:\r\n throw new Error(`Unknown ECSqlSystemProperty enum value ${systemPropertyType}.`);\r\n }\r\n }\r\n\r\n private static lowerFirstChar(name: string): string { return name[0].toLowerCase() + name.substring(1); }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElementMesh.js","sourceRoot":"","sources":["../../src/ElementMesh.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAkEH,8CAuBC;AAvFD,sDAA6D;AAC7D,wDAAkF;AAsClF,SAAS,SAAS,CAAC,MAAkB;IACnC,IAAI,MAAM,CAAC,eAAe,GAAG,CAAC,EAAE,CAAC;QAC/B,2BAA2B;QAC3B,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC9B,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,6DAA6D;IAC7D,MAAM,KAAK,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,MAAM,CAAC,SAAS,EAAE,EAAE,MAAM,CAAC,SAAS,EAA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AED,OAAO,SAAS,CAAC;AACnB,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/** @packageDocumentation\n * @module Geometry\n */\n\nimport { ByteStream, Id64String } from \"@itwin/core-bentley\";\nimport { BentleyGeometryFlatBuffer, IndexedPolyface } from \"@itwin/core-geometry\";\n\n/** Options used to control how [Polyface]($core-geometry)s are produced from elements by [IModelConnection.generateElementMeshes]($frontend).\n * @beta\n */\nexport interface ElementMeshOptions {\n /** Maximum distance from a face to the original geometry.\n * If not supplied, defaults to zero and [[angleTolerance]] will control the quality of the resulting mesh instead.\n * @see [StrokeOptions.chordTol]($core-geometry).\n */\n chordTolerance?: number;\n /** Maximum angle difference in radians for an approximated face.\n * If not supplied, defaults to PI/12 (15 degrees).\n * @see [StrokeOptions.angleTol]($core-geometry).\n */\n angleTolerance?: number;\n /** BRep features with bounding boxes smaller than this size will not generate graphics.\n * This option can be used to ignore expensive details from [BRepEntity.DataProps]($core-common)\n * like screws and screw holes.\n */\n minBRepFeatureSize?: number;\n // ###TODO? decimationTolerance?: number;\n}\n\n/** Describes a request to generate [Polyface]($core-geometry)s from an element.\n * @see [IModelConnection.generateElementMeshes]($frontend).\n * @beta\n */\nexport interface ElementMeshRequestProps extends ElementMeshOptions {\n /** The Id of the [GeometricElement]($backend) from which to obtain meshes. */\n source: Id64String;\n}\n\ninterface Chunk {\n type: string;\n data?: Uint8Array;\n}\n\nfunction nextChunk(stream: ByteStream): Chunk | undefined {\n if (stream.remainingLength < 8) {\n // Consume remaining bytes.\n stream.curPos = stream.length;\n return undefined;\n }\n\n // Type codes are a sequence of four uppercase ASCII letters.\n const chars = [stream.readUint8(), stream.readUint8(), stream.readUint8(), stream.readUint8()];\n if (chars.some((c) => c < 65 || c > 90))\n return undefined;\n\n const dataLength = stream.readUint32();\n const data = dataLength > 0 ? stream.nextBytes(dataLength) : undefined;\n return {\n type: String.fromCharCode(...chars),\n data,\n };\n}\n\n/** Convert the output of [IModelConnection.generateElementMeshes]($frontend) into an array of [Polyface]($core-geometry)s.\n * @param data Encoded polyfaces obtained from [IModelConnection.generateElementMeshes]($frontend).\n * @returns a list of decoded polyfaces.\n * @beta\n */\nexport function readElementMeshes(data: Uint8Array): IndexedPolyface[] {\n const polyfaces: IndexedPolyface[] = [];\n\n const stream = ByteStream.fromUint8Array(data);\n const firstChunk = nextChunk(stream);\n if (!firstChunk || \"LMSH\" !== firstChunk.type)\n return polyfaces;\n\n while (stream.remainingLength > 0) {\n const chunk = nextChunk(stream);\n if (!chunk || chunk.type !== \"PLFC\" || !chunk.data)\n continue;\n\n try {\n const geom = BentleyGeometryFlatBuffer.bytesToGeometry(chunk.data, true);\n if (geom instanceof IndexedPolyface)\n polyfaces.push(geom);\n } catch {\n //\n }\n }\n\n return polyfaces;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ElementMesh.js","sourceRoot":"","sources":["../../src/ElementMesh.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAkEH,8CAuBC;AAvFD,sDAA6D;AAC7D,wDAAkF;AAsClF,SAAS,SAAS,CAAC,MAAkB;IACnC,IAAI,MAAM,CAAC,eAAe,GAAG,CAAC,EAAE,CAAC;QAC/B,2BAA2B;QAC3B,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC9B,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,6DAA6D;IAC7D,MAAM,KAAK,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,MAAM,CAAC,SAAS,EAAE,EAAE,MAAM,CAAC,SAAS,EAAE,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;IAC/F,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;QACrC,OAAO,SAAS,CAAC;IAEnB,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;IACvC,MAAM,IAAI,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACvE,OAAO;QACL,IAAI,EAAE,MAAM,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC;QACnC,IAAI;KACL,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,IAAgB;IAChD,MAAM,SAAS,GAAsB,EAAE,CAAC;IAExC,MAAM,MAAM,GAAG,yBAAU,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,UAAU,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;IACrC,IAAI,CAAC,UAAU,IAAI,MAAM,KAAK,UAAU,CAAC,IAAI;QAC3C,OAAO,SAAS,CAAC;IAEnB,OAAO,MAAM,CAAC,eAAe,GAAG,CAAC,EAAE,CAAC;QAClC,MAAM,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI;YAChD,SAAS;QAEX,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,yCAAyB,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACzE,IAAI,IAAI,YAAY,+BAAe;gBACjC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC;QAAC,MAAM,CAAC;YACP,EAAE;QACJ,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Geometry\r\n */\r\n\r\nimport { ByteStream, Id64String } from \"@itwin/core-bentley\";\r\nimport { BentleyGeometryFlatBuffer, IndexedPolyface } from \"@itwin/core-geometry\";\r\n\r\n/** Options used to control how [Polyface]($core-geometry)s are produced from elements by [IModelConnection.generateElementMeshes]($frontend).\r\n * @beta\r\n */\r\nexport interface ElementMeshOptions {\r\n /** Maximum distance from a face to the original geometry.\r\n * If not supplied, defaults to zero and [[angleTolerance]] will control the quality of the resulting mesh instead.\r\n * @see [StrokeOptions.chordTol]($core-geometry).\r\n */\r\n chordTolerance?: number;\r\n /** Maximum angle difference in radians for an approximated face.\r\n * If not supplied, defaults to PI/12 (15 degrees).\r\n * @see [StrokeOptions.angleTol]($core-geometry).\r\n */\r\n angleTolerance?: number;\r\n /** BRep features with bounding boxes smaller than this size will not generate graphics.\r\n * This option can be used to ignore expensive details from [BRepEntity.DataProps]($core-common)\r\n * like screws and screw holes.\r\n */\r\n minBRepFeatureSize?: number;\r\n // ###TODO? decimationTolerance?: number;\r\n}\r\n\r\n/** Describes a request to generate [Polyface]($core-geometry)s from an element.\r\n * @see [IModelConnection.generateElementMeshes]($frontend).\r\n * @beta\r\n */\r\nexport interface ElementMeshRequestProps extends ElementMeshOptions {\r\n /** The Id of the [GeometricElement]($backend) from which to obtain meshes. */\r\n source: Id64String;\r\n}\r\n\r\ninterface Chunk {\r\n type: string;\r\n data?: Uint8Array;\r\n}\r\n\r\nfunction nextChunk(stream: ByteStream): Chunk | undefined {\r\n if (stream.remainingLength < 8) {\r\n // Consume remaining bytes.\r\n stream.curPos = stream.length;\r\n return undefined;\r\n }\r\n\r\n // Type codes are a sequence of four uppercase ASCII letters.\r\n const chars = [stream.readUint8(), stream.readUint8(), stream.readUint8(), stream.readUint8()];\r\n if (chars.some((c) => c < 65 || c > 90))\r\n return undefined;\r\n\r\n const dataLength = stream.readUint32();\r\n const data = dataLength > 0 ? stream.nextBytes(dataLength) : undefined;\r\n return {\r\n type: String.fromCharCode(...chars),\r\n data,\r\n };\r\n}\r\n\r\n/** Convert the output of [IModelConnection.generateElementMeshes]($frontend) into an array of [Polyface]($core-geometry)s.\r\n * @param data Encoded polyfaces obtained from [IModelConnection.generateElementMeshes]($frontend).\r\n * @returns a list of decoded polyfaces.\r\n * @beta\r\n */\r\nexport function readElementMeshes(data: Uint8Array): IndexedPolyface[] {\r\n const polyfaces: IndexedPolyface[] = [];\r\n\r\n const stream = ByteStream.fromUint8Array(data);\r\n const firstChunk = nextChunk(stream);\r\n if (!firstChunk || \"LMSH\" !== firstChunk.type)\r\n return polyfaces;\r\n\r\n while (stream.remainingLength > 0) {\r\n const chunk = nextChunk(stream);\r\n if (!chunk || chunk.type !== \"PLFC\" || !chunk.data)\r\n continue;\r\n\r\n try {\r\n const geom = BentleyGeometryFlatBuffer.bytesToGeometry(chunk.data, true);\r\n if (geom instanceof IndexedPolyface)\r\n polyfaces.push(geom);\r\n } catch {\r\n //\r\n }\r\n }\r\n\r\n return polyfaces;\r\n}\r\n"]}
|
|
@@ -10,7 +10,7 @@ import { GeometryStreamProps } from "./geometry/GeometryStream";
|
|
|
10
10
|
import { SubCategoryAppearance } from "./SubCategoryAppearance";
|
|
11
11
|
import { TextAnnotationProps } from "./annotation/TextAnnotation";
|
|
12
12
|
/** Properties of a NavigationProperty.
|
|
13
|
-
* @public
|
|
13
|
+
* @public @preview
|
|
14
14
|
* @extensions
|
|
15
15
|
*/
|
|
16
16
|
export interface RelatedElementProps {
|
|
@@ -20,7 +20,7 @@ export interface RelatedElementProps {
|
|
|
20
20
|
relClassName?: string;
|
|
21
21
|
}
|
|
22
22
|
/** Properties of an [Element]($docs/bis/guide/fundamentals/element-fundamentals)
|
|
23
|
-
* @public
|
|
23
|
+
* @public @preview
|
|
24
24
|
* @extensions
|
|
25
25
|
*/
|
|
26
26
|
export interface ElementProps extends EntityProps {
|
|
@@ -41,7 +41,7 @@ export interface ElementProps extends EntityProps {
|
|
|
41
41
|
jsonProperties?: any;
|
|
42
42
|
}
|
|
43
43
|
/** The Id and relationship class of an Element that is somehow related to another Element
|
|
44
|
-
* @public
|
|
44
|
+
* @public @preview
|
|
45
45
|
*/
|
|
46
46
|
export declare class RelatedElement implements RelatedElementProps {
|
|
47
47
|
/** The Id of the element to which this element is related. */
|
|
@@ -57,12 +57,12 @@ export declare class RelatedElement implements RelatedElementProps {
|
|
|
57
57
|
toJSON(): RelatedElementProps;
|
|
58
58
|
}
|
|
59
59
|
/** A [RelatedElement]($common) relationship that describes the [TypeDefinitionElement]($backend) of an element.
|
|
60
|
-
* @public
|
|
60
|
+
* @public @preview
|
|
61
61
|
*/
|
|
62
62
|
export declare class TypeDefinition extends RelatedElement {
|
|
63
63
|
}
|
|
64
64
|
/** Properties of a [GeometricElement]($backend)
|
|
65
|
-
* @public
|
|
65
|
+
* @public @preview
|
|
66
66
|
* @extensions
|
|
67
67
|
*/
|
|
68
68
|
export interface GeometricElementProps extends ElementProps {
|
|
@@ -78,7 +78,7 @@ export interface GeometricElementProps extends ElementProps {
|
|
|
78
78
|
placement?: PlacementProps;
|
|
79
79
|
}
|
|
80
80
|
/** Properties of a [[Placement3d]]
|
|
81
|
-
* @public
|
|
81
|
+
* @public @preview
|
|
82
82
|
* @extensions
|
|
83
83
|
*/
|
|
84
84
|
export interface Placement3dProps {
|
|
@@ -87,7 +87,7 @@ export interface Placement3dProps {
|
|
|
87
87
|
bbox?: LowAndHighXYZProps;
|
|
88
88
|
}
|
|
89
89
|
/** Properties of a [[Placement2d]]
|
|
90
|
-
* @public
|
|
90
|
+
* @public @preview
|
|
91
91
|
* @extensions
|
|
92
92
|
*/
|
|
93
93
|
export interface Placement2dProps {
|
|
@@ -96,20 +96,20 @@ export interface Placement2dProps {
|
|
|
96
96
|
bbox?: LowAndHighXYProps;
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
|
-
* @public
|
|
99
|
+
* @public @preview
|
|
100
100
|
* @extensions
|
|
101
101
|
*/
|
|
102
102
|
export type PlacementProps = Placement2dProps | Placement3dProps;
|
|
103
103
|
/** determine if this is Placement2dProps
|
|
104
|
-
* @public
|
|
104
|
+
* @public @preview
|
|
105
105
|
*/
|
|
106
106
|
export declare function isPlacement2dProps(props: PlacementProps): props is Placement2dProps;
|
|
107
107
|
/** determine if this is Placement3dProps
|
|
108
|
-
* @public
|
|
108
|
+
* @public @preview
|
|
109
109
|
*/
|
|
110
110
|
export declare function isPlacement3dProps(props: PlacementProps): props is Placement3dProps;
|
|
111
111
|
/** Properties that define a [GeometricElement3d]($backend)
|
|
112
|
-
* @public
|
|
112
|
+
* @public @preview
|
|
113
113
|
* @extensions
|
|
114
114
|
*/
|
|
115
115
|
export interface GeometricElement3dProps extends GeometricElementProps {
|
|
@@ -117,7 +117,7 @@ export interface GeometricElement3dProps extends GeometricElementProps {
|
|
|
117
117
|
typeDefinition?: RelatedElementProps;
|
|
118
118
|
}
|
|
119
119
|
/** JSON representation of a [TextAnnotation3d]($backend).
|
|
120
|
-
* @public
|
|
120
|
+
* @public @preview
|
|
121
121
|
* @extensions
|
|
122
122
|
*/
|
|
123
123
|
export interface TextAnnotation3dProps extends GeometricElement3dProps {
|
|
@@ -128,14 +128,14 @@ export interface TextAnnotation3dProps extends GeometricElement3dProps {
|
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
/** Properties that define a [PhysicalElement]($backend)
|
|
131
|
-
* @public
|
|
131
|
+
* @public @preview
|
|
132
132
|
* @extensions
|
|
133
133
|
*/
|
|
134
134
|
export interface PhysicalElementProps extends GeometricElement3dProps {
|
|
135
135
|
physicalMaterial?: RelatedElementProps;
|
|
136
136
|
}
|
|
137
137
|
/** An enumeration of the different types of [SectionDrawing]($backend)s.
|
|
138
|
-
* @public
|
|
138
|
+
* @public @preview
|
|
139
139
|
* @extensions
|
|
140
140
|
*/
|
|
141
141
|
export declare enum SectionType {
|
|
@@ -145,7 +145,7 @@ export declare enum SectionType {
|
|
|
145
145
|
Plan = 6
|
|
146
146
|
}
|
|
147
147
|
/** Properties that define a [Drawing]($backend).
|
|
148
|
-
* @public
|
|
148
|
+
* @public @preview
|
|
149
149
|
* @extensions
|
|
150
150
|
*/
|
|
151
151
|
export interface DrawingProps extends ElementProps {
|
|
@@ -153,12 +153,12 @@ export interface DrawingProps extends ElementProps {
|
|
|
153
153
|
* size of the [ViewAttachment]($backend) created when attaching the [Drawing]($backend) to a [Sheet]($backend).
|
|
154
154
|
* Default: 1.
|
|
155
155
|
* @note The scale factor **must** be greater than zero.
|
|
156
|
-
* @public
|
|
156
|
+
* @public @preview
|
|
157
157
|
*/
|
|
158
158
|
scaleFactor?: number;
|
|
159
159
|
}
|
|
160
160
|
/** Properties that define a [SectionDrawing]($backend).
|
|
161
|
-
* @public
|
|
161
|
+
* @public @preview
|
|
162
162
|
* @extensions
|
|
163
163
|
*/
|
|
164
164
|
export interface SectionDrawingProps extends DrawingProps {
|
|
@@ -181,7 +181,7 @@ export interface SectionDrawingProps extends DrawingProps {
|
|
|
181
181
|
};
|
|
182
182
|
}
|
|
183
183
|
/** Properties that define a [SectionDrawingLocation]($backend)
|
|
184
|
-
* @public
|
|
184
|
+
* @public @preview
|
|
185
185
|
* @extensions
|
|
186
186
|
*/
|
|
187
187
|
export interface SectionDrawingLocationProps extends GeometricElement3dProps {
|
|
@@ -189,7 +189,7 @@ export interface SectionDrawingLocationProps extends GeometricElement3dProps {
|
|
|
189
189
|
sectionView?: RelatedElementProps;
|
|
190
190
|
}
|
|
191
191
|
/** Properties that define a [GeometricElement2d]($backend)
|
|
192
|
-
* @public
|
|
192
|
+
* @public @preview
|
|
193
193
|
* @extensions
|
|
194
194
|
*/
|
|
195
195
|
export interface GeometricElement2dProps extends GeometricElementProps {
|
|
@@ -197,7 +197,7 @@ export interface GeometricElement2dProps extends GeometricElementProps {
|
|
|
197
197
|
typeDefinition?: RelatedElementProps;
|
|
198
198
|
}
|
|
199
199
|
/** JSON representation of a [TextAnnotation2d]($backend).
|
|
200
|
-
* @public
|
|
200
|
+
* @public @preview
|
|
201
201
|
* @extensions
|
|
202
202
|
*/
|
|
203
203
|
export interface TextAnnotation2dProps extends GeometricElement2dProps {
|
|
@@ -208,7 +208,7 @@ export interface TextAnnotation2dProps extends GeometricElement2dProps {
|
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
210
|
/** Properties of a [GeometryPart]($backend)
|
|
211
|
-
* @public
|
|
211
|
+
* @public @preview
|
|
212
212
|
* @extensions
|
|
213
213
|
*/
|
|
214
214
|
export interface GeometryPartProps extends ElementProps {
|
|
@@ -220,7 +220,7 @@ export interface GeometryPartProps extends ElementProps {
|
|
|
220
220
|
bbox?: LowAndHighXYZProps;
|
|
221
221
|
}
|
|
222
222
|
/** Properties for a [ViewAttachment]($backend)
|
|
223
|
-
* @public
|
|
223
|
+
* @public @preview
|
|
224
224
|
* @extensions
|
|
225
225
|
*/
|
|
226
226
|
export interface ViewAttachmentProps extends GeometricElement2dProps {
|
|
@@ -242,7 +242,7 @@ export interface ViewAttachmentProps extends GeometricElement2dProps {
|
|
|
242
242
|
};
|
|
243
243
|
}
|
|
244
244
|
/** Properties of a [Subject]($backend)
|
|
245
|
-
* @public
|
|
245
|
+
* @public @preview
|
|
246
246
|
* @extensions
|
|
247
247
|
*/
|
|
248
248
|
export interface SubjectProps extends ElementProps {
|
|
@@ -264,7 +264,7 @@ export interface SheetTemplateProps extends ElementProps {
|
|
|
264
264
|
border?: Id64String;
|
|
265
265
|
}
|
|
266
266
|
/** Properties of a [Sheet]($backend).
|
|
267
|
-
* @public
|
|
267
|
+
* @public @preview
|
|
268
268
|
* @extensions
|
|
269
269
|
*/
|
|
270
270
|
export interface SheetProps extends ElementProps {
|
|
@@ -275,21 +275,21 @@ export interface SheetProps extends ElementProps {
|
|
|
275
275
|
attachments?: Id64String[];
|
|
276
276
|
}
|
|
277
277
|
/** Properties of a [DefinitionElement]($backend)
|
|
278
|
-
* @public
|
|
278
|
+
* @public @preview
|
|
279
279
|
* @extensions
|
|
280
280
|
*/
|
|
281
281
|
export interface DefinitionElementProps extends ElementProps {
|
|
282
282
|
isPrivate?: boolean;
|
|
283
283
|
}
|
|
284
284
|
/** Properties of a [TypeDefinitionElement]($backend)
|
|
285
|
-
* @public
|
|
285
|
+
* @public @preview
|
|
286
286
|
* @extensions
|
|
287
287
|
*/
|
|
288
288
|
export interface TypeDefinitionElementProps extends DefinitionElementProps {
|
|
289
289
|
recipe?: RelatedElementProps;
|
|
290
290
|
}
|
|
291
291
|
/** Properties of a [PhysicalType]($backend)
|
|
292
|
-
* @public
|
|
292
|
+
* @public @preview
|
|
293
293
|
* @extensions
|
|
294
294
|
*/
|
|
295
295
|
export interface PhysicalTypeProps extends TypeDefinitionElementProps {
|
|
@@ -297,7 +297,7 @@ export interface PhysicalTypeProps extends TypeDefinitionElementProps {
|
|
|
297
297
|
physicalMaterial?: RelatedElementProps;
|
|
298
298
|
}
|
|
299
299
|
/** Properties of a [InformationPartitionElement]($backend)
|
|
300
|
-
* @public
|
|
300
|
+
* @public @preview
|
|
301
301
|
* @extensions
|
|
302
302
|
*/
|
|
303
303
|
export interface InformationPartitionElementProps extends ElementProps {
|
|
@@ -305,7 +305,7 @@ export interface InformationPartitionElementProps extends ElementProps {
|
|
|
305
305
|
}
|
|
306
306
|
/** Options controlling which properties are included or excluded when querying [[DisplayStyleProps]].
|
|
307
307
|
* @see [[ViewStateLoadProps]] and [[ElementLoadOptions]].
|
|
308
|
-
* @public
|
|
308
|
+
* @public @preview
|
|
309
309
|
* @extensions
|
|
310
310
|
*/
|
|
311
311
|
export interface DisplayStyleLoadProps {
|
|
@@ -320,7 +320,7 @@ export interface DisplayStyleLoadProps {
|
|
|
320
320
|
}
|
|
321
321
|
/** Options controlling which properties are included or excluded when querying [[RenderTimelineProps]].
|
|
322
322
|
* @see [[ElementLoadOptions.renderTimeline]].
|
|
323
|
-
* @public
|
|
323
|
+
* @public @preview
|
|
324
324
|
* @extensions
|
|
325
325
|
*/
|
|
326
326
|
export interface RenderTimelineLoadProps {
|
|
@@ -331,7 +331,7 @@ export interface RenderTimelineLoadProps {
|
|
|
331
331
|
}
|
|
332
332
|
/** Options used to specify properties to include or exclude when querying [[ElementProps]] with functions like
|
|
333
333
|
* [IModelDb.Elements.getElementProps]($backend) and [IModelConnection.Elements.loadProps]($frontend).
|
|
334
|
-
* @public
|
|
334
|
+
* @public @preview
|
|
335
335
|
* @extensions
|
|
336
336
|
*/
|
|
337
337
|
export interface ElementLoadOptions {
|
|
@@ -352,7 +352,7 @@ export interface ElementLoadOptions {
|
|
|
352
352
|
renderTimeline?: RenderTimelineLoadProps;
|
|
353
353
|
}
|
|
354
354
|
/** Parameters to specify what element to load for functions like [IModelDb.Elements.getElementProps]($backend).
|
|
355
|
-
* @public
|
|
355
|
+
* @public @preview
|
|
356
356
|
* @extensions
|
|
357
357
|
*/
|
|
358
358
|
export interface ElementLoadProps extends ElementLoadOptions {
|
|
@@ -365,14 +365,14 @@ export interface ElementLoadProps extends ElementLoadOptions {
|
|
|
365
365
|
federationGuid?: GuidString;
|
|
366
366
|
}
|
|
367
367
|
/** Properties of an [ElementAspect]($backend)
|
|
368
|
-
* @public
|
|
368
|
+
* @public @preview
|
|
369
369
|
* @extensions
|
|
370
370
|
*/
|
|
371
371
|
export interface ElementAspectProps extends EntityProps {
|
|
372
372
|
element: RelatedElementProps;
|
|
373
373
|
}
|
|
374
374
|
/** Properties of an [ExternalSourceAspect]($backend) that stores synchronization information for an element originating from an external source.
|
|
375
|
-
* @public
|
|
375
|
+
* @public @preview
|
|
376
376
|
* @extensions
|
|
377
377
|
*/
|
|
378
378
|
export interface ExternalSourceAspectProps extends ElementAspectProps {
|
|
@@ -431,7 +431,7 @@ export interface ExternalSourceAttachmentProps extends ElementProps {
|
|
|
431
431
|
scale?: XYZProps;
|
|
432
432
|
}
|
|
433
433
|
/** Properties of an [ChannelRootAspect]($backend) that identifies an Element as the root of a *channel* which is a subset of the overall iModel hierarchy that is independently maintained.
|
|
434
|
-
* @public
|
|
434
|
+
* @public @preview
|
|
435
435
|
* @extensions
|
|
436
436
|
*/
|
|
437
437
|
export interface ChannelRootAspectProps extends ElementAspectProps {
|
|
@@ -439,7 +439,7 @@ export interface ChannelRootAspectProps extends ElementAspectProps {
|
|
|
439
439
|
owner: string;
|
|
440
440
|
}
|
|
441
441
|
/** Properties of a [LineStyle]($backend)
|
|
442
|
-
* @public
|
|
442
|
+
* @public @preview
|
|
443
443
|
* @extensions
|
|
444
444
|
*/
|
|
445
445
|
export interface LineStyleProps extends DefinitionElementProps {
|
|
@@ -454,7 +454,7 @@ export interface LightLocationProps extends GeometricElement3dProps {
|
|
|
454
454
|
enabled?: boolean;
|
|
455
455
|
}
|
|
456
456
|
/** The *rank* for a Category
|
|
457
|
-
* @public
|
|
457
|
+
* @public @preview
|
|
458
458
|
* @extensions
|
|
459
459
|
*/
|
|
460
460
|
export declare enum Rank {
|
|
@@ -468,7 +468,7 @@ export declare enum Rank {
|
|
|
468
468
|
User = 3
|
|
469
469
|
}
|
|
470
470
|
/** Parameters of a [Category]($backend)
|
|
471
|
-
* @public
|
|
471
|
+
* @public @preview
|
|
472
472
|
* @extensions
|
|
473
473
|
*/
|
|
474
474
|
export interface CategoryProps extends DefinitionElementProps {
|
|
@@ -476,7 +476,7 @@ export interface CategoryProps extends DefinitionElementProps {
|
|
|
476
476
|
description?: string;
|
|
477
477
|
}
|
|
478
478
|
/** Parameters of a [SubCategory]($backend)
|
|
479
|
-
* @public
|
|
479
|
+
* @public @preview
|
|
480
480
|
* @extensions
|
|
481
481
|
*/
|
|
482
482
|
export interface SubCategoryProps extends DefinitionElementProps {
|
|
@@ -484,7 +484,7 @@ export interface SubCategoryProps extends DefinitionElementProps {
|
|
|
484
484
|
description?: string;
|
|
485
485
|
}
|
|
486
486
|
/** Parameters of a [UrlLink]($backend)
|
|
487
|
-
* @public
|
|
487
|
+
* @public @preview
|
|
488
488
|
* @extensions
|
|
489
489
|
*/
|
|
490
490
|
export interface UrlLinkProps extends ElementProps {
|
|
@@ -492,7 +492,7 @@ export interface UrlLinkProps extends ElementProps {
|
|
|
492
492
|
url?: string;
|
|
493
493
|
}
|
|
494
494
|
/** Parameters of a [RepositoryLink]($backend)
|
|
495
|
-
* @public
|
|
495
|
+
* @public @preview
|
|
496
496
|
* @extensions
|
|
497
497
|
*/
|
|
498
498
|
export interface RepositoryLinkProps extends UrlLinkProps {
|
|
@@ -506,7 +506,7 @@ export interface SynchronizationConfigLinkProps extends UrlLinkProps {
|
|
|
506
506
|
lastSuccessfulRun?: string;
|
|
507
507
|
}
|
|
508
508
|
/** Wire format describing a [RenderTimeline]($backend).
|
|
509
|
-
* @public
|
|
509
|
+
* @public @preview
|
|
510
510
|
* @extensions
|
|
511
511
|
*/
|
|
512
512
|
export interface RenderTimelineProps extends ElementProps {
|
package/lib/cjs/ElementProps.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.isPlacement3dProps = isPlacement3dProps;
|
|
|
13
13
|
const core_bentley_1 = require("@itwin/core-bentley");
|
|
14
14
|
const IModelError_1 = require("./IModelError");
|
|
15
15
|
/** The Id and relationship class of an Element that is somehow related to another Element
|
|
16
|
-
* @public
|
|
16
|
+
* @public @preview
|
|
17
17
|
*/
|
|
18
18
|
class RelatedElement {
|
|
19
19
|
/** The Id of the element to which this element is related. */
|
|
@@ -48,25 +48,25 @@ class RelatedElement {
|
|
|
48
48
|
}
|
|
49
49
|
exports.RelatedElement = RelatedElement;
|
|
50
50
|
/** A [RelatedElement]($common) relationship that describes the [TypeDefinitionElement]($backend) of an element.
|
|
51
|
-
* @public
|
|
51
|
+
* @public @preview
|
|
52
52
|
*/
|
|
53
53
|
class TypeDefinition extends RelatedElement {
|
|
54
54
|
}
|
|
55
55
|
exports.TypeDefinition = TypeDefinition;
|
|
56
56
|
/** determine if this is Placement2dProps
|
|
57
|
-
* @public
|
|
57
|
+
* @public @preview
|
|
58
58
|
*/
|
|
59
59
|
function isPlacement2dProps(props) {
|
|
60
60
|
return props.angle !== undefined;
|
|
61
61
|
}
|
|
62
62
|
/** determine if this is Placement3dProps
|
|
63
|
-
* @public
|
|
63
|
+
* @public @preview
|
|
64
64
|
*/
|
|
65
65
|
function isPlacement3dProps(props) {
|
|
66
66
|
return !isPlacement2dProps(props);
|
|
67
67
|
}
|
|
68
68
|
/** An enumeration of the different types of [SectionDrawing]($backend)s.
|
|
69
|
-
* @public
|
|
69
|
+
* @public @preview
|
|
70
70
|
* @extensions
|
|
71
71
|
*/
|
|
72
72
|
var SectionType;
|
|
@@ -87,7 +87,7 @@ var ExternalSourceAttachmentRole;
|
|
|
87
87
|
ExternalSourceAttachmentRole[ExternalSourceAttachmentRole["SpecifyPart"] = 1] = "SpecifyPart";
|
|
88
88
|
})(ExternalSourceAttachmentRole || (exports.ExternalSourceAttachmentRole = ExternalSourceAttachmentRole = {}));
|
|
89
89
|
/** The *rank* for a Category
|
|
90
|
-
* @public
|
|
90
|
+
* @public @preview
|
|
91
91
|
* @extensions
|
|
92
92
|
*/
|
|
93
93
|
var Rank;
|