@itwin/core-common 4.6.0-dev.9 → 4.7.0-dev.3
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 +11 -1
- package/lib/cjs/AmbientOcclusion.js +1 -1
- package/lib/cjs/AmbientOcclusion.js.map +1 -1
- package/lib/cjs/AnalysisStyle.js +1 -1
- package/lib/cjs/AnalysisStyle.js.map +1 -1
- package/lib/cjs/Atmosphere.js +12 -12
- package/lib/cjs/Atmosphere.js.map +1 -1
- package/lib/cjs/BackgroundMapProvider.js +1 -1
- package/lib/cjs/BackgroundMapProvider.js.map +1 -1
- package/lib/cjs/BackgroundMapSettings.js +1 -1
- package/lib/cjs/BackgroundMapSettings.js.map +1 -1
- package/lib/cjs/Base64EncodedString.js +1 -1
- package/lib/cjs/Base64EncodedString.js.map +1 -1
- package/lib/cjs/BlobReader.js.map +1 -1
- package/lib/cjs/BriefcaseTypes.js +5 -5
- package/lib/cjs/BriefcaseTypes.js.map +1 -1
- package/lib/cjs/Camera.js.map +1 -1
- package/lib/cjs/ChangedElements.js +1 -1
- package/lib/cjs/ChangedElements.js.map +1 -1
- package/lib/cjs/ChangesetProps.js +1 -1
- package/lib/cjs/ChangesetProps.js.map +1 -1
- package/lib/cjs/ClipStyle.js +3 -3
- package/lib/cjs/ClipStyle.js.map +1 -1
- package/lib/cjs/Code.d.ts +1 -0
- package/lib/cjs/Code.d.ts.map +1 -1
- package/lib/cjs/Code.js +3 -2
- package/lib/cjs/Code.js.map +1 -1
- package/lib/cjs/ColorDef.js +1 -1
- package/lib/cjs/ColorDef.js.map +1 -1
- package/lib/cjs/CommonLoggerCategory.js +1 -1
- package/lib/cjs/CommonLoggerCategory.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.d.ts +11 -11
- package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
- package/lib/cjs/ConcurrentQuery.js +6 -6
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/ContextRealityModel.js +5 -5
- package/lib/cjs/ContextRealityModel.js.map +1 -1
- package/lib/cjs/DisplayStyleSettings.js +1 -1
- package/lib/cjs/DisplayStyleSettings.js.map +1 -1
- package/lib/cjs/ECSqlReader.js +1 -1
- package/lib/cjs/ECSqlReader.js.map +1 -1
- package/lib/cjs/ECSqlTypes.js +4 -4
- package/lib/cjs/ECSqlTypes.js.map +1 -1
- package/lib/cjs/ElementMesh.js.map +1 -1
- package/lib/cjs/ElementProps.d.ts +23 -0
- package/lib/cjs/ElementProps.d.ts.map +1 -1
- package/lib/cjs/ElementProps.js +4 -4
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/EmphasizeElementsProps.js +1 -1
- package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
- package/lib/cjs/EntityProps.d.ts +5 -2
- package/lib/cjs/EntityProps.d.ts.map +1 -1
- package/lib/cjs/EntityProps.js +2 -1
- package/lib/cjs/EntityProps.js.map +1 -1
- package/lib/cjs/EntityReference.js +2 -2
- package/lib/cjs/EntityReference.js.map +1 -1
- package/lib/cjs/Environment.js +1 -1
- package/lib/cjs/Environment.js.map +1 -1
- package/lib/cjs/FeatureIndex.js +1 -1
- package/lib/cjs/FeatureIndex.js.map +1 -1
- package/lib/cjs/FeatureSymbology.d.ts +1 -1
- package/lib/cjs/FeatureSymbology.js +3 -3
- package/lib/cjs/FeatureSymbology.js.map +1 -1
- package/lib/cjs/FeatureTable.js +3 -3
- package/lib/cjs/FeatureTable.js.map +1 -1
- package/lib/cjs/Fonts.js +1 -1
- package/lib/cjs/Fonts.js.map +1 -1
- package/lib/cjs/Frustum.d.ts.map +1 -1
- package/lib/cjs/Frustum.js +3 -1
- package/lib/cjs/Frustum.js.map +1 -1
- package/lib/cjs/GenericInstanceFilter.js +2 -2
- package/lib/cjs/GenericInstanceFilter.js.map +1 -1
- package/lib/cjs/GeoCoordinateServices.js +1 -1
- package/lib/cjs/GeoCoordinateServices.js.map +1 -1
- package/lib/cjs/GeometryParams.js +3 -3
- package/lib/cjs/GeometryParams.js.map +1 -1
- package/lib/cjs/GeometrySummary.js +1 -1
- package/lib/cjs/GeometrySummary.js.map +1 -1
- package/lib/cjs/Gradient.js +5 -5
- package/lib/cjs/Gradient.js.map +1 -1
- package/lib/cjs/GraphicParams.js +1 -1
- package/lib/cjs/GraphicParams.js.map +1 -1
- package/lib/cjs/GroundPlane.js +1 -1
- package/lib/cjs/GroundPlane.js.map +1 -1
- package/lib/cjs/HSVColor.js +1 -1
- package/lib/cjs/HSVColor.js.map +1 -1
- package/lib/cjs/HiddenLine.js +1 -1
- package/lib/cjs/HiddenLine.js.map +1 -1
- package/lib/cjs/Hilite.js +1 -1
- package/lib/cjs/Hilite.js.map +1 -1
- package/lib/cjs/IModel.js +1 -1
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/IModelVersion.js.map +1 -1
- package/lib/cjs/Image.js +2 -2
- package/lib/cjs/Image.js.map +1 -1
- package/lib/cjs/IpcAppProps.d.ts +24 -2
- package/lib/cjs/IpcAppProps.d.ts.map +1 -1
- package/lib/cjs/IpcAppProps.js.map +1 -1
- package/lib/cjs/LightSettings.js +1 -1
- package/lib/cjs/LightSettings.js.map +1 -1
- package/lib/cjs/LinePixels.js +1 -1
- package/lib/cjs/LinePixels.js.map +1 -1
- package/lib/cjs/Localization.js.map +1 -1
- package/lib/cjs/MapImagerySettings.js +1 -1
- package/lib/cjs/MapImagerySettings.js.map +1 -1
- package/lib/cjs/MapLayerSettings.js.map +1 -1
- package/lib/cjs/MassProperties.js +1 -1
- package/lib/cjs/MassProperties.js.map +1 -1
- package/lib/cjs/MaterialProps.js +2 -2
- package/lib/cjs/MaterialProps.js.map +1 -1
- package/lib/cjs/ModelGeometryChanges.js +2 -2
- package/lib/cjs/ModelGeometryChanges.js.map +1 -1
- package/lib/cjs/NativeAppProps.js +2 -2
- package/lib/cjs/NativeAppProps.js.map +1 -1
- package/lib/cjs/OctEncodedNormal.js.map +1 -1
- package/lib/cjs/PlanarClipMask.js +3 -3
- package/lib/cjs/PlanarClipMask.js.map +1 -1
- package/lib/cjs/QPoint.d.ts +4 -3
- package/lib/cjs/QPoint.d.ts.map +1 -1
- package/lib/cjs/QPoint.js +5 -4
- package/lib/cjs/QPoint.js.map +1 -1
- package/lib/cjs/RealityDataAccessProps.d.ts +4 -4
- package/lib/cjs/RealityDataAccessProps.d.ts.map +1 -1
- package/lib/cjs/RealityDataAccessProps.js +1 -1
- package/lib/cjs/RealityDataAccessProps.js.map +1 -1
- package/lib/cjs/RealityModelDisplaySettings.js +2 -2
- package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
- package/lib/cjs/Render.d.ts +2 -2
- package/lib/cjs/Render.d.ts.map +1 -1
- package/lib/cjs/Render.js +1 -1
- package/lib/cjs/Render.js.map +1 -1
- package/lib/cjs/RenderMaterial.js +1 -1
- package/lib/cjs/RenderMaterial.js.map +1 -1
- package/lib/cjs/RenderSchedule.js +1 -1
- package/lib/cjs/RenderSchedule.js.map +1 -1
- package/lib/cjs/RenderTexture.js +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/SkyBox.js +3 -3
- package/lib/cjs/SkyBox.js.map +1 -1
- package/lib/cjs/SolarCalculate.js.map +1 -1
- package/lib/cjs/SolarShadows.js +1 -1
- package/lib/cjs/SolarShadows.js.map +1 -1
- package/lib/cjs/SpatialClassification.js +2 -2
- package/lib/cjs/SpatialClassification.js.map +1 -1
- package/lib/cjs/SubCategoryAppearance.js +1 -1
- package/lib/cjs/SubCategoryAppearance.js.map +1 -1
- package/lib/cjs/SubCategoryOverride.js +1 -1
- package/lib/cjs/SubCategoryOverride.js.map +1 -1
- package/lib/cjs/TerrainSettings.js +2 -2
- package/lib/cjs/TerrainSettings.js.map +1 -1
- package/lib/cjs/TextureMapping.js +1 -1
- package/lib/cjs/TextureMapping.js.map +1 -1
- package/lib/cjs/TextureProps.js +1 -1
- package/lib/cjs/TextureProps.js.map +1 -1
- package/lib/cjs/ThematicDisplay.js +5 -5
- package/lib/cjs/ThematicDisplay.js.map +1 -1
- package/lib/cjs/TileProps.js +1 -1
- package/lib/cjs/TileProps.js.map +1 -1
- package/lib/cjs/Tween.js.map +1 -1
- package/lib/cjs/TxnAction.js +1 -1
- package/lib/cjs/TxnAction.js.map +1 -1
- package/lib/cjs/ViewDetails.js +2 -2
- package/lib/cjs/ViewDetails.js.map +1 -1
- package/lib/cjs/ViewFlags.js +2 -2
- package/lib/cjs/ViewFlags.js.map +1 -1
- package/lib/cjs/ViewProps.js +1 -1
- package/lib/cjs/ViewProps.js.map +1 -1
- package/lib/cjs/WhiteOnWhiteReversalSettings.js +1 -1
- package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/cjs/annotation/TextAnnotation.d.ts +107 -0
- package/lib/cjs/annotation/TextAnnotation.d.ts.map +1 -0
- package/lib/cjs/annotation/TextAnnotation.js +118 -0
- package/lib/cjs/annotation/TextAnnotation.js.map +1 -0
- package/lib/cjs/annotation/TextBlock.d.ts +276 -0
- package/lib/cjs/annotation/TextBlock.d.ts.map +1 -0
- package/lib/cjs/annotation/TextBlock.js +324 -0
- package/lib/cjs/annotation/TextBlock.js.map +1 -0
- package/lib/cjs/annotation/TextBlockGeometryProps.d.ts +40 -0
- package/lib/cjs/annotation/TextBlockGeometryProps.d.ts.map +1 -0
- package/lib/cjs/annotation/TextBlockGeometryProps.js +10 -0
- package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -0
- package/lib/cjs/annotation/TextStyle.d.ts +173 -0
- package/lib/cjs/annotation/TextStyle.d.ts.map +1 -0
- package/lib/cjs/annotation/TextStyle.js +106 -0
- package/lib/cjs/annotation/TextStyle.js.map +1 -0
- package/lib/cjs/core-common.d.ts +8 -0
- package/lib/cjs/core-common.d.ts.map +1 -1
- package/lib/cjs/core-common.js +8 -0
- package/lib/cjs/core-common.js.map +1 -1
- package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
- package/lib/cjs/geometry/AreaPattern.js +1 -1
- package/lib/cjs/geometry/AreaPattern.js.map +1 -1
- package/lib/cjs/geometry/Cartographic.js +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 +5 -0
- package/lib/cjs/geometry/ElementGeometry.d.ts.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.js +28 -3
- package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometryFB.js +1 -1
- package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/cjs/geometry/FrustumPlanes.js +5 -5
- 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.d.ts +5 -0
- package/lib/cjs/geometry/GeometryStream.d.ts.map +1 -1
- package/lib/cjs/geometry/GeometryStream.js +35 -9
- package/lib/cjs/geometry/GeometryStream.js.map +1 -1
- package/lib/cjs/geometry/LineStyle.js +1 -1
- package/lib/cjs/geometry/LineStyle.js.map +1 -1
- package/lib/cjs/geometry/Projection.js.map +1 -1
- package/lib/cjs/geometry/TextString.d.ts.map +1 -1
- package/lib/cjs/geometry/TextString.js +16 -13
- package/lib/cjs/geometry/TextString.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.js +3 -3
- package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/cjs/rpc/DevToolsRpcInterface.js +2 -2
- package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelTileRpcInterface.js +1 -1
- package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/WipRpcInterface.js +1 -1
- package/lib/cjs/rpc/WipRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.js +6 -6
- package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConstants.js +7 -7
- package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
- package/lib/cjs/rpc/core/RpcControl.js +1 -1
- package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js +3 -3
- package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.js +2 -2
- package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/cjs/rpc/core/RpcOperation.js +2 -3
- 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 +3 -3
- package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPush.js +2 -2
- 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 +1 -1
- package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.js +1 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcManager.js +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/RpcMultipart.js +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.js +8 -8
- 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 +3 -3
- 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/GltfTileIO.js +2 -2
- package/lib/cjs/tile/GltfTileIO.js.map +1 -1
- package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/IModelTileIO.js +3 -3
- package/lib/cjs/tile/IModelTileIO.js.map +1 -1
- package/lib/cjs/tile/TileIO.d.ts +6 -6
- package/lib/cjs/tile/TileIO.d.ts.map +1 -1
- package/lib/cjs/tile/TileIO.js +2 -2
- package/lib/cjs/tile/TileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.d.ts +3 -3
- package/lib/cjs/tile/TileMetadata.d.ts.map +1 -1
- package/lib/cjs/tile/TileMetadata.js +3 -3
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/cjs/tile/Tileset3dSchema.d.ts.map +1 -1
- package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
- package/lib/esm/AnalysisStyle.js +1 -2
- package/lib/esm/AnalysisStyle.js.map +1 -1
- package/lib/esm/Atmosphere.js +11 -11
- package/lib/esm/Atmosphere.js.map +1 -1
- package/lib/esm/BackgroundMapProvider.js.map +1 -1
- package/lib/esm/BackgroundMapSettings.js.map +1 -1
- package/lib/esm/BlobReader.js.map +1 -1
- package/lib/esm/Camera.js.map +1 -1
- package/lib/esm/ClipStyle.js +3 -6
- package/lib/esm/ClipStyle.js.map +1 -1
- package/lib/esm/Code.d.ts +1 -0
- package/lib/esm/Code.d.ts.map +1 -1
- package/lib/esm/Code.js +1 -0
- package/lib/esm/Code.js.map +1 -1
- package/lib/esm/ColorDef.js +1 -2
- package/lib/esm/ColorDef.js.map +1 -1
- package/lib/esm/ConcurrentQuery.d.ts +11 -11
- package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/ContextRealityModel.js.map +1 -1
- package/lib/esm/DisplayStyleSettings.js.map +1 -1
- package/lib/esm/ECSqlReader.js +1 -2
- 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 +23 -0
- package/lib/esm/ElementProps.d.ts.map +1 -1
- package/lib/esm/ElementProps.js +1 -2
- package/lib/esm/ElementProps.js.map +1 -1
- package/lib/esm/EntityProps.d.ts +5 -2
- package/lib/esm/EntityProps.d.ts.map +1 -1
- package/lib/esm/EntityProps.js +1 -0
- package/lib/esm/EntityProps.js.map +1 -1
- package/lib/esm/Environment.js +1 -2
- package/lib/esm/Environment.js.map +1 -1
- package/lib/esm/FeatureSymbology.d.ts +1 -1
- package/lib/esm/FeatureSymbology.js +2 -4
- package/lib/esm/FeatureSymbology.js.map +1 -1
- package/lib/esm/FeatureTable.js.map +1 -1
- package/lib/esm/Frustum.d.ts.map +1 -1
- package/lib/esm/Frustum.js +2 -0
- package/lib/esm/Frustum.js.map +1 -1
- package/lib/esm/GeoCoordinateServices.js.map +1 -1
- package/lib/esm/GeometryParams.js.map +1 -1
- package/lib/esm/Gradient.js +4 -4
- package/lib/esm/Gradient.js.map +1 -1
- package/lib/esm/GroundPlane.js +1 -2
- package/lib/esm/GroundPlane.js.map +1 -1
- package/lib/esm/HSVColor.js.map +1 -1
- package/lib/esm/HiddenLine.js.map +1 -1
- package/lib/esm/IModel.js +1 -2
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/IModelVersion.js.map +1 -1
- package/lib/esm/Image.js.map +1 -1
- package/lib/esm/IpcAppProps.d.ts +24 -2
- package/lib/esm/IpcAppProps.d.ts.map +1 -1
- package/lib/esm/IpcAppProps.js.map +1 -1
- package/lib/esm/LightSettings.js +1 -2
- package/lib/esm/LightSettings.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/ModelGeometryChanges.js.map +1 -1
- package/lib/esm/OctEncodedNormal.js.map +1 -1
- package/lib/esm/PlanarClipMask.js +1 -2
- package/lib/esm/PlanarClipMask.js.map +1 -1
- package/lib/esm/QPoint.d.ts +4 -3
- package/lib/esm/QPoint.d.ts.map +1 -1
- package/lib/esm/QPoint.js +2 -1
- package/lib/esm/QPoint.js.map +1 -1
- package/lib/esm/RealityDataAccessProps.d.ts +4 -4
- package/lib/esm/RealityDataAccessProps.d.ts.map +1 -1
- package/lib/esm/RealityModelDisplaySettings.js +2 -4
- package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
- package/lib/esm/Render.d.ts +2 -2
- package/lib/esm/Render.d.ts.map +1 -1
- package/lib/esm/Render.js.map +1 -1
- package/lib/esm/RenderSchedule.js.map +1 -1
- package/lib/esm/RgbColor.js.map +1 -1
- package/lib/esm/RpcInterface.js.map +1 -1
- package/lib/esm/SkyBox.js +2 -4
- package/lib/esm/SkyBox.js.map +1 -1
- package/lib/esm/SolarCalculate.js.map +1 -1
- package/lib/esm/SolarShadows.js +1 -2
- package/lib/esm/SolarShadows.js.map +1 -1
- package/lib/esm/SpatialClassification.js.map +1 -1
- package/lib/esm/SubCategoryAppearance.js +1 -2
- package/lib/esm/SubCategoryAppearance.js.map +1 -1
- package/lib/esm/SubCategoryOverride.js +1 -2
- 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/ThematicDisplay.js +1 -2
- package/lib/esm/ThematicDisplay.js.map +1 -1
- package/lib/esm/Tween.js.map +1 -1
- package/lib/esm/ViewDetails.js +1 -2
- package/lib/esm/ViewDetails.js.map +1 -1
- package/lib/esm/ViewFlags.js +1 -2
- package/lib/esm/ViewFlags.js.map +1 -1
- package/lib/esm/WhiteOnWhiteReversalSettings.js +1 -2
- package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/esm/annotation/TextAnnotation.d.ts +107 -0
- package/lib/esm/annotation/TextAnnotation.d.ts.map +1 -0
- package/lib/esm/annotation/TextAnnotation.js +114 -0
- package/lib/esm/annotation/TextAnnotation.js.map +1 -0
- package/lib/esm/annotation/TextBlock.d.ts +276 -0
- package/lib/esm/annotation/TextBlock.d.ts.map +1 -0
- package/lib/esm/annotation/TextBlock.js +315 -0
- package/lib/esm/annotation/TextBlock.js.map +1 -0
- package/lib/esm/annotation/TextBlockGeometryProps.d.ts +40 -0
- package/lib/esm/annotation/TextBlockGeometryProps.d.ts.map +1 -0
- package/lib/esm/annotation/TextBlockGeometryProps.js +9 -0
- package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -0
- package/lib/esm/annotation/TextStyle.d.ts +173 -0
- package/lib/esm/annotation/TextStyle.d.ts.map +1 -0
- package/lib/esm/annotation/TextStyle.js +101 -0
- package/lib/esm/annotation/TextStyle.js.map +1 -0
- package/lib/esm/core-common.d.ts +8 -0
- package/lib/esm/core-common.d.ts.map +1 -1
- package/lib/esm/core-common.js +8 -0
- package/lib/esm/core-common.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/Cartographic.js +1 -2
- 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 +5 -0
- package/lib/esm/geometry/ElementGeometry.d.ts.map +1 -1
- package/lib/esm/geometry/ElementGeometry.js +26 -1
- package/lib/esm/geometry/ElementGeometry.js.map +1 -1
- package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/esm/geometry/FrustumPlanes.js +4 -4
- 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.d.ts +5 -0
- package/lib/esm/geometry/GeometryStream.d.ts.map +1 -1
- package/lib/esm/geometry/GeometryStream.js +34 -8
- package/lib/esm/geometry/GeometryStream.js.map +1 -1
- package/lib/esm/geometry/LineStyle.js.map +1 -1
- package/lib/esm/geometry/Projection.js.map +1 -1
- package/lib/esm/geometry/TextString.d.ts.map +1 -1
- package/lib/esm/geometry/TextString.js +16 -13
- package/lib/esm/geometry/TextString.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.js +1 -2
- package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/esm/rpc/DevToolsRpcInterface.js +1 -2
- package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js +1 -2
- package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelTileRpcInterface.js +1 -2
- package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js +1 -2
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/esm/rpc/WipRpcInterface.js +1 -2
- package/lib/esm/rpc/WipRpcInterface.js.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.js +5 -6
- package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/esm/rpc/core/RpcControl.js +1 -2
- package/lib/esm/rpc/core/RpcControl.js.map +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js +3 -4
- 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 +1 -2
- 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 +1 -2
- package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/esm/rpc/core/RpcPush.js +2 -4
- 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 +1 -2
- package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
- package/lib/esm/rpc/core/RpcRoutingToken.js +1 -2
- package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcManager.js +1 -2
- 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/RpcMultipart.js +1 -2
- package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.js +8 -8
- 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 +3 -4
- 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/GltfTileIO.js.map +1 -1
- package/lib/esm/tile/I3dmTileIO.js.map +1 -1
- package/lib/esm/tile/IModelTileIO.js +1 -2
- package/lib/esm/tile/IModelTileIO.js.map +1 -1
- package/lib/esm/tile/TileIO.d.ts +6 -6
- package/lib/esm/tile/TileIO.d.ts.map +1 -1
- package/lib/esm/tile/TileIO.js.map +1 -1
- package/lib/esm/tile/TileMetadata.d.ts +3 -3
- package/lib/esm/tile/TileMetadata.d.ts.map +1 -1
- package/lib/esm/tile/TileMetadata.js.map +1 -1
- package/lib/esm/tile/Tileset3dSchema.d.ts.map +1 -1
- package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
- package/package.json +9 -9
package/lib/cjs/ECSqlTypes.js
CHANGED
|
@@ -33,7 +33,7 @@ var ECSqlValueType;
|
|
|
33
33
|
ECSqlValueType[ECSqlValueType["PrimitiveArray"] = 14] = "PrimitiveArray";
|
|
34
34
|
ECSqlValueType[ECSqlValueType["StructArray"] = 15] = "StructArray";
|
|
35
35
|
ECSqlValueType[ECSqlValueType["Guid"] = 16] = "Guid";
|
|
36
|
-
})(ECSqlValueType
|
|
36
|
+
})(ECSqlValueType || (exports.ECSqlValueType = ECSqlValueType = {}));
|
|
37
37
|
/** Equivalent of the ECEnumeration OpCode in the **ECDbChange** ECSchema.
|
|
38
38
|
* The enum can be used when programmatically binding values to the InstanceChange.OpCode property of
|
|
39
39
|
* the ECDbChange ECSchema.
|
|
@@ -48,7 +48,7 @@ var ChangeOpCode;
|
|
|
48
48
|
ChangeOpCode[ChangeOpCode["Insert"] = 1] = "Insert";
|
|
49
49
|
ChangeOpCode[ChangeOpCode["Update"] = 2] = "Update";
|
|
50
50
|
ChangeOpCode[ChangeOpCode["Delete"] = 4] = "Delete";
|
|
51
|
-
})(ChangeOpCode
|
|
51
|
+
})(ChangeOpCode || (exports.ChangeOpCode = ChangeOpCode = {}));
|
|
52
52
|
/** The enum represents the values for the ChangedValueState argument of the ECSQL function **Changes**.
|
|
53
53
|
* The enum can be used when programmatically binding values to the ChangedValueState argument
|
|
54
54
|
* in an ECSQL using the **Changes** ECSQL function.
|
|
@@ -64,7 +64,7 @@ var ChangedValueState;
|
|
|
64
64
|
ChangedValueState[ChangedValueState["BeforeUpdate"] = 2] = "BeforeUpdate";
|
|
65
65
|
ChangedValueState[ChangedValueState["AfterUpdate"] = 3] = "AfterUpdate";
|
|
66
66
|
ChangedValueState[ChangedValueState["BeforeDelete"] = 4] = "BeforeDelete";
|
|
67
|
-
})(ChangedValueState
|
|
67
|
+
})(ChangedValueState || (exports.ChangedValueState = ChangedValueState = {}));
|
|
68
68
|
/** Defines the ECSQL system properties.
|
|
69
69
|
* See also [ECSQL]($docs/learning/ECSQL).
|
|
70
70
|
* @public
|
|
@@ -83,7 +83,7 @@ var ECSqlSystemProperty;
|
|
|
83
83
|
ECSqlSystemProperty[ECSqlSystemProperty["PointX"] = 8] = "PointX";
|
|
84
84
|
ECSqlSystemProperty[ECSqlSystemProperty["PointY"] = 9] = "PointY";
|
|
85
85
|
ECSqlSystemProperty[ECSqlSystemProperty["PointZ"] = 10] = "PointZ";
|
|
86
|
-
})(ECSqlSystemProperty
|
|
86
|
+
})(ECSqlSystemProperty || (exports.ECSqlSystemProperty = ECSqlSystemProperty = {}));
|
|
87
87
|
/** Utility to format ECProperty names according to the iTwin.js formatting rules.
|
|
88
88
|
* See also [ECSQL Row Format]($docs/learning/ECSQLRowFormat).
|
|
89
89
|
* @public
|
|
@@ -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,CAAA;IACnB,kEAAgB,CAAA;IAChB,oDAAS,CAAA;AACX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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;SACpF;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
|
+
{"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,CAAA;IACnB,kEAAgB,CAAA;IAChB,oDAAS,CAAA;AACX,CAAC,EAlBW,cAAc,8BAAd,cAAc,QAkBzB;AAgCD;;;;;;;;GAQG;AACH,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;AACZ,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB;AAED;;;;;;;;GAQG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,uEAAe,CAAA;IACf,yEAAgB,CAAA;IAChB,uEAAe,CAAA;IACf,yEAAgB,CAAA;AAClB,CAAC,EALW,iBAAiB,i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C,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;;;AAEH,sDAA6D;AAC7D,wDAAkF;AAsClF,SAAS,SAAS,CAAC,MAAkB;IACnC,IAAI,MAAM,CAAC,eAAe,GAAG,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"ElementMesh.js","sourceRoot":"","sources":["../../src/ElementMesh.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,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,OAAO,CAAC,EAAE,CAAC;YACX,EAAE;QACJ,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAvBD,8CAuBC","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"]}
|
|
@@ -8,6 +8,7 @@ import { EntityProps } from "./EntityProps";
|
|
|
8
8
|
import { ElementGeometryBuilderParams, ElementGeometryBuilderParamsForPart } from "./geometry/ElementGeometry";
|
|
9
9
|
import { GeometryStreamProps } from "./geometry/GeometryStream";
|
|
10
10
|
import { SubCategoryAppearance } from "./SubCategoryAppearance";
|
|
11
|
+
import { TextAnnotationProps } from "./annotation/TextAnnotation";
|
|
11
12
|
/** Properties of a NavigationProperty.
|
|
12
13
|
* @public
|
|
13
14
|
* @extensions
|
|
@@ -115,6 +116,17 @@ export interface GeometricElement3dProps extends GeometricElementProps {
|
|
|
115
116
|
placement?: Placement3dProps;
|
|
116
117
|
typeDefinition?: RelatedElementProps;
|
|
117
118
|
}
|
|
119
|
+
/** JSON representation of a [TextAnnotation3d]($backend).
|
|
120
|
+
* @public
|
|
121
|
+
* @extensions
|
|
122
|
+
*/
|
|
123
|
+
export interface TextAnnotation3dProps extends GeometricElement3dProps {
|
|
124
|
+
jsonProperties?: {
|
|
125
|
+
[key: string]: any;
|
|
126
|
+
/** @beta */
|
|
127
|
+
annotation?: TextAnnotationProps;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
118
130
|
/** Properties that define a [PhysicalElement]($backend)
|
|
119
131
|
* @public
|
|
120
132
|
* @extensions
|
|
@@ -171,6 +183,17 @@ export interface GeometricElement2dProps extends GeometricElementProps {
|
|
|
171
183
|
placement?: Placement2dProps;
|
|
172
184
|
typeDefinition?: RelatedElementProps;
|
|
173
185
|
}
|
|
186
|
+
/** JSON representation of a [TextAnnotation2d]($backend).
|
|
187
|
+
* @public
|
|
188
|
+
* @extensions
|
|
189
|
+
*/
|
|
190
|
+
export interface TextAnnotation2dProps extends GeometricElement2dProps {
|
|
191
|
+
jsonProperties?: {
|
|
192
|
+
[key: string]: any;
|
|
193
|
+
/** @beta */
|
|
194
|
+
annotation?: TextAnnotationProps;
|
|
195
|
+
};
|
|
196
|
+
}
|
|
174
197
|
/** Properties of a [GeometryPart]($backend)
|
|
175
198
|
* @public
|
|
176
199
|
* @extensions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElementProps.d.ts","sourceRoot":"","sources":["../../src/ElementProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAQ,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EACL,UAAU,EAAE,eAAe,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EACzH,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,4BAA4B,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAC;AAC/G,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"ElementProps.d.ts","sourceRoot":"","sources":["../../src/ElementProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAQ,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EACL,UAAU,EAAE,eAAe,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,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I;IACV,6HAA6H;IAC7H,WAAW,IAAI;IACf,mIAAmI;IACnI,IAAI,IAAI;CACT;AAED;;;GAGG;AACH,MAAM,WAAW,aAAc,SAAQ,sBAAsB;IAC3D,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAiB,SAAQ,sBAAsB;IAC9D,UAAU,CAAC,EAAE,qBAAqB,CAAC,KAAK,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAa,SAAQ,YAAY;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACvD,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,8BAA+B,SAAQ,YAAY;IAClE,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACvD,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
package/lib/cjs/ElementProps.js
CHANGED
|
@@ -38,9 +38,9 @@ class RelatedElement {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
+
exports.RelatedElement = RelatedElement;
|
|
41
42
|
/** Used to *null out* an existing navigation relationship. */
|
|
42
43
|
RelatedElement.none = new RelatedElement({ id: core_bentley_1.Id64.invalid });
|
|
43
|
-
exports.RelatedElement = RelatedElement;
|
|
44
44
|
/** A [RelatedElement]($common) relationship that describes the [TypeDefinitionElement]($backend) of an element.
|
|
45
45
|
* @public
|
|
46
46
|
*/
|
|
@@ -71,7 +71,7 @@ var SectionType;
|
|
|
71
71
|
SectionType[SectionType["Detail"] = 4] = "Detail";
|
|
72
72
|
SectionType[SectionType["Elevation"] = 5] = "Elevation";
|
|
73
73
|
SectionType[SectionType["Plan"] = 6] = "Plan";
|
|
74
|
-
})(SectionType
|
|
74
|
+
})(SectionType || (exports.SectionType = SectionType = {}));
|
|
75
75
|
/** The role that an attached [ExternalSource]($backend) plays.
|
|
76
76
|
* @beta
|
|
77
77
|
*/
|
|
@@ -81,7 +81,7 @@ var ExternalSourceAttachmentRole;
|
|
|
81
81
|
ExternalSourceAttachmentRole[ExternalSourceAttachmentRole["SpecifyContext"] = 0] = "SpecifyContext";
|
|
82
82
|
/** The attached [ExternalSource]($backend) models a part of the whole. */
|
|
83
83
|
ExternalSourceAttachmentRole[ExternalSourceAttachmentRole["SpecifyPart"] = 1] = "SpecifyPart";
|
|
84
|
-
})(ExternalSourceAttachmentRole
|
|
84
|
+
})(ExternalSourceAttachmentRole || (exports.ExternalSourceAttachmentRole = ExternalSourceAttachmentRole = {}));
|
|
85
85
|
/** The *rank* for a Category
|
|
86
86
|
* @public
|
|
87
87
|
* @extensions
|
|
@@ -96,5 +96,5 @@ var Rank;
|
|
|
96
96
|
Rank[Rank["Application"] = 2] = "Application";
|
|
97
97
|
/** This category is defined by a user. Elements in this category are not recognized by system, schema, and application classes. */
|
|
98
98
|
Rank[Rank["User"] = 3] = "User";
|
|
99
|
-
})(Rank
|
|
99
|
+
})(Rank || (exports.Rank = Rank = {}));
|
|
100
100
|
//# sourceMappingURL=ElementProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElementProps.js","sourceRoot":"","sources":["../../src/ElementProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAmE;AAQnE,+CAA0D;AAoC1D;;GAEG;AACH,MAAa,cAAc;IAOzB,YAAY,KAA0B;QACpC,IAAI,CAAC,EAAE,GAAG,mBAAI,CAAC,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DAEC;AAmBD;;;GAGG;AACH,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,mDAAW,CAAA;IACX,iDAAU,CAAA;IACV,uDAAa,CAAA;IACb,6CAAQ,CAAA;AACV,CAAC,EALW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAKtB;AAuQD;;GAEG;AACH,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACtC,gEAAgE;IAChE,mGAAkB,CAAA;IAClB,0EAA0E;IAC1E,6FAAe,CAAA;AACjB,CAAC,EALW,4BAA4B,GAA5B,oCAA4B,KAA5B,oCAA4B,QAKvC;AAyCD;;;GAGG;AACH,IAAY,IASX;AATD,WAAY,IAAI;IACd,gDAAgD;IAChD,mCAAU,CAAA;IACV,4GAA4G;IAC5G,mCAAU,CAAA;IACV,6HAA6H;IAC7H,6CAAe,CAAA;IACf,mIAAmI;IACnI,+BAAQ,CAAA;AACV,CAAC,EATW,IAAI,GAAJ,YAAI,KAAJ,YAAI,QASf","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 Entities\r\n */\r\n\r\nimport { GuidString, Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n AngleProps, ClipVectorProps, LowAndHighXYProps, LowAndHighXYZProps, TransformProps, XYProps, XYZProps, YawPitchRollProps,\r\n} from \"@itwin/core-geometry\";\r\nimport { CodeProps } from \"./Code\";\r\nimport { EntityProps } from \"./EntityProps\";\r\nimport { ElementGeometryBuilderParams, ElementGeometryBuilderParamsForPart } from \"./geometry/ElementGeometry\";\r\nimport { GeometryStreamProps } from \"./geometry/GeometryStream\";\r\nimport { IModelError, IModelStatus } from \"./IModelError\";\r\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\r\n\r\n/** Properties of a NavigationProperty.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RelatedElementProps {\r\n /** The Id of the element to which this element is related. */\r\n id: Id64String;\r\n /** The full className of the relationship class. */\r\n relClassName?: string;\r\n}\r\n\r\n/** Properties of an [Element]($docs/bis/guide/fundamentals/element-fundamentals)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementProps extends EntityProps {\r\n /** The Id of the [Model]($docs/bis/guide/fundamentals/model-fundamentals.md) containing this element */\r\n model: Id64String;\r\n /** The [Code]($docs/bis/guide/fundamentals/codes.md) for this element */\r\n code: CodeProps;\r\n /** The Parent of this element, if defined. */\r\n parent?: RelatedElementProps;\r\n /** A [FederationGuid]($docs/bis/guide/fundamentals/element-fundamentals.md#federationguid) assigned to this element.\r\n * @note On insert, if this is a valid Guid, the value is preserved. If it is `undefined`, a new Guid is created. If it is an invalid Guid (e.g. Guid.empty), the\r\n * resultant element will have a `null` federationGuid. For update, `undefined` means \"don't change.\"\r\n */\r\n federationGuid?: GuidString;\r\n /** A [user-assigned label]($docs/bis/guide/fundamentals/element-fundamentals.md#userlabel) for this element. */\r\n userLabel?: string;\r\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this element. */\r\n jsonProperties?: any;\r\n}\r\n\r\n/** The Id and relationship class of an Element that is somehow related to another Element\r\n * @public\r\n */\r\nexport class RelatedElement implements RelatedElementProps {\r\n /** The Id of the element to which this element is related. */\r\n public readonly id: Id64String;\r\n\r\n /** The full className of the relationship class. */\r\n public readonly relClassName?: string;\r\n\r\n constructor(props: RelatedElementProps) {\r\n this.id = Id64.fromJSON(props.id);\r\n this.relClassName = props.relClassName;\r\n }\r\n\r\n public static fromJSON(json?: RelatedElementProps): RelatedElement | undefined {\r\n return json ? new RelatedElement(json) : undefined;\r\n }\r\n\r\n /** Used to *null out* an existing navigation relationship. */\r\n public static readonly none = new RelatedElement({ id: Id64.invalid });\r\n\r\n /** Accept the value of a navigation property that might be in the shortened format of just an id or might be in the full RelatedElement format. */\r\n public static idFromJson(json: any): Id64String {\r\n if ((typeof json === \"object\") && (\"id\" in json)) {\r\n const r = RelatedElement.fromJSON(json);\r\n if (r === undefined)\r\n throw new IModelError(IModelStatus.BadArg, \"Problem parsing Id64 from json\");\r\n return r.id;\r\n }\r\n return Id64.fromJSON(json);\r\n }\r\n\r\n public toJSON(): RelatedElementProps {\r\n return {\r\n id: this.id,\r\n relClassName: this.relClassName,\r\n };\r\n }\r\n}\r\n\r\n/** A [RelatedElement]($common) relationship that describes the [TypeDefinitionElement]($backend) of an element.\r\n * @public\r\n */\r\nexport class TypeDefinition extends RelatedElement {\r\n}\r\n\r\n/** Properties of a [GeometricElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricElementProps extends ElementProps {\r\n /** The id of the category for this geometric element. */\r\n category: Id64String;\r\n /** The geometry stream properties */\r\n geom?: GeometryStreamProps;\r\n /** How to build the element's GeometryStream. This is used for insert and update only. It is not a persistent property. It will be undefined in the properties returned by functions that read a persistent element. It may be specified as an alternative to `geom` when inserting or updating an element.\r\n * @beta\r\n */\r\n elementGeometryBuilderParams?: ElementGeometryBuilderParams;\r\n /** The placement properties */\r\n placement?: PlacementProps;\r\n}\r\n\r\n/** Properties of a [[Placement3d]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Placement3dProps {\r\n origin: XYZProps;\r\n angles: YawPitchRollProps;\r\n bbox?: LowAndHighXYZProps;\r\n}\r\n\r\n/** Properties of a [[Placement2d]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Placement2dProps {\r\n origin: XYProps;\r\n angle: AngleProps;\r\n bbox?: LowAndHighXYProps;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport type PlacementProps = Placement2dProps | Placement3dProps;\r\n\r\n/** determine if this is Placement2dProps\r\n * @public\r\n */\r\nexport function isPlacement2dProps(props: PlacementProps): props is Placement2dProps {\r\n return (props as Placement2dProps).angle !== undefined;\r\n}\r\n\r\n/** determine if this is Placement3dProps\r\n * @public\r\n */\r\nexport function isPlacement3dProps(props: PlacementProps): props is Placement3dProps {\r\n return !isPlacement2dProps(props);\r\n}\r\n\r\n/** Properties that define a [GeometricElement3d]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricElement3dProps extends GeometricElementProps {\r\n placement?: Placement3dProps;\r\n typeDefinition?: RelatedElementProps;\r\n}\r\n\r\n/** Properties that define a [PhysicalElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PhysicalElementProps extends GeometricElement3dProps {\r\n physicalMaterial?: RelatedElementProps;\r\n}\r\n\r\n/** An enumeration of the different types of [SectionDrawing]($backend)s.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum SectionType {\r\n Section = 3,\r\n Detail = 4,\r\n Elevation = 5,\r\n Plan = 6,\r\n}\r\n\r\n/** Properties that define a [SectionDrawing]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SectionDrawingProps extends ElementProps {\r\n /** The type of section used to generate the drawing. Default: Section. */\r\n sectionType?: SectionType;\r\n /** The spatial view from which the section was generated. */\r\n spatialView?: RelatedElementProps;\r\n jsonProperties?: {\r\n /** A transform from the section drawing model's coordinates to spatial coordinates. */\r\n drawingToSpatialTransform?: TransformProps;\r\n /** If the section drawing is placed onto a [Sheet]($backend) via a [ViewAttachment]($backend), a transform from the sheet's coordinates to spatial coordinates. */\r\n sheetToSpatialTransform?: TransformProps;\r\n /** If the section drawing is placed onto a [Sheet]($backend) via a [ViewAttachment]($backend), JSON representation of a [ClipVector]($geometry) to apply to\r\n * the sheet graphics when drawn in the context of the spatial view.\r\n * The ClipVector is in spatial coordinates.\r\n */\r\n drawingBoundaryClip?: ClipVectorProps;\r\n /** If true, when displaying the section drawing as a [DrawingViewState]($frontend), the [[spatialView]] will also be displayed. */\r\n displaySpatialView?: true;\r\n };\r\n}\r\n\r\n/** Properties that define a [SectionDrawingLocation]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SectionDrawingLocationProps extends GeometricElement3dProps {\r\n /** The [ViewDefinition]($backend) to which this location refers. */\r\n sectionView?: RelatedElementProps;\r\n}\r\n\r\n/** Properties that define a [GeometricElement2d]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricElement2dProps extends GeometricElementProps {\r\n placement?: Placement2dProps;\r\n typeDefinition?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of a [GeometryPart]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometryPartProps extends ElementProps {\r\n geom?: GeometryStreamProps;\r\n /** How to build the part's GeometryStream. This is used for insert and update only. It is not a persistent property. It will be undefined in the properties returned by functions that read a persistent element. It may be specified as an alternative to `geom` when inserting or updating an element.\r\n * @beta\r\n */\r\n elementGeometryBuilderParams?: ElementGeometryBuilderParamsForPart;\r\n bbox?: LowAndHighXYZProps;\r\n}\r\n\r\n/** Properties for a [ViewAttachment]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewAttachmentProps extends GeometricElement2dProps {\r\n view: RelatedElementProps;\r\n jsonProperties?: {\r\n /** Integer priority in [-500,500]. Where two attachments overlap, the one with the higher priority draws in front of the other. Default: 0. */\r\n displayPriority?: number;\r\n /** JSON representation of a [ClipVector]($core-geometry] in sheet coordinate space, used to clip the attachment's graphics on the sheet. */\r\n clip?: ClipVectorProps;\r\n /** Options for customizing how the view attachment is displayed on the sheet. */\r\n displayOptions?: {\r\n /** If true, the view attachment is always drawn as a raster image. By default, only 3d perspective views are drawn this way (they always *must* be). Default: false. */\r\n drawAsRaster?: boolean;\r\n /** If true, and the view attachment is drawn as a raster image, the background color of the view will be preserved. By default the background color of the\r\n * sheet is used and any background pixels become transparent, allowing the contents of the sheet to show through. Default: false.\r\n */\r\n preserveBackground?: boolean;\r\n };\r\n };\r\n}\r\n\r\n/** Properties of a [Subject]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SubjectProps extends ElementProps {\r\n description?: string;\r\n}\r\n\r\n/** Properties of a [SheetBorderTemplate]($backend)\r\n * @beta\r\n */\r\nexport interface SheetBorderTemplateProps extends ElementProps {\r\n height?: number;\r\n width?: number;\r\n}\r\n\r\n/** Properties of a [SheetTemplate]($backend)\r\n * @beta\r\n */\r\nexport interface SheetTemplateProps extends ElementProps {\r\n height?: number;\r\n width?: number;\r\n border?: Id64String;\r\n}\r\n\r\n/** Properties of a [Sheet]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SheetProps extends ElementProps {\r\n width?: number;\r\n height?: number;\r\n scale?: number;\r\n sheetTemplate?: Id64String;\r\n attachments?: Id64String[];\r\n}\r\n\r\n/** Properties of a [DefinitionElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DefinitionElementProps extends ElementProps {\r\n isPrivate?: boolean;\r\n}\r\n\r\n/** Properties of a [TypeDefinitionElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TypeDefinitionElementProps extends DefinitionElementProps {\r\n recipe?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of a [PhysicalType]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PhysicalTypeProps extends TypeDefinitionElementProps {\r\n /** The [PhysicalMaterial]($backend) that makes up this physical type. */\r\n physicalMaterial?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of a [InformationPartitionElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface InformationPartitionElementProps extends ElementProps {\r\n description?: string;\r\n}\r\n\r\n/** Options controlling which properties are included or excluded when querying [[DisplayStyleProps]].\r\n * @see [[ViewStateLoadProps]] and [[ElementLoadOptions]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DisplayStyleLoadProps {\r\n /** If true, the lists of element Ids in the display style's schedule script will be empty.\r\n * The element Ids are not required on the frontend for display and can be quite large.\r\n */\r\n omitScheduleScriptElementIds?: boolean;\r\n /** If true, [[DisplayStyleSettingsProps.excludedElements]] will be compressed into a single compact string; otherwise they will be expanded into an array of strings.\r\n * The number of Ids may be quite large, so the compressed format is preferred, especially when communicating between the backend and frontend.\r\n */\r\n compressExcludedElementIds?: boolean;\r\n}\r\n\r\n/** Options controlling which properties are included or excluded when querying [[RenderTimelineProps]].\r\n * @see [[ElementLoadOptions.renderTimeline]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RenderTimelineLoadProps {\r\n /** If true, the lists of element Ids in the schedule script will be empty.\r\n * The element Ids can be extremely numerous and are not required on the frontend for display, so they are omitted by default by [DisplayStyleState.load]($frontend).\r\n */\r\n omitScriptElementIds?: boolean;\r\n}\r\n\r\n/** Options used to specify properties to include or exclude when querying [[ElementProps]] with functions like\r\n * [IModelDb.Elements.getElementProps]($backend) and [IModelConnection.Elements.loadProps]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementLoadOptions {\r\n /** if true, only load the members of [[ElementProps]], and no members from subclasses */\r\n onlyBaseProperties?: boolean;\r\n /** If true, include the [[GeometryStreamProps]] for [[GeometricElementProps]] and [[GeometryPartProps]].\r\n * Geometry streams can consist of many megabytes worth of JSON, so they are omitted by default.\r\n */\r\n wantGeometry?: boolean;\r\n /** When including a geometry stream containing brep entries, whether to return the raw brep data or proxy geometry, false when undefined */\r\n /** If true, include [[BRepEntity.DataProps.data]] in the [[GeometryStreamProps]] for [[GeometricElementProps]] and [[GeometryPartProps]].\r\n * The data is a potentially large base-64-encoded opaque binary blob that cannot be directly inspected or manipulated on the frontend, so it is omitted by default.\r\n */\r\n wantBRepData?: boolean;\r\n /** Options controlling which properties of [[DisplayStyleProps]] to include or exclude. */\r\n displayStyle?: DisplayStyleLoadProps;\r\n /** Options controlling which properties of [[RenderTimelineProps]] to include or exclude. */\r\n renderTimeline?: RenderTimelineLoadProps;\r\n}\r\n\r\n/** Parameters to specify what element to load for functions like [IModelDb.Elements.getElementProps]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementLoadProps extends ElementLoadOptions {\r\n id?: Id64String;\r\n /** The properties of the Code of the element to load.\r\n * @note the Value member is required even though it is not declared so here. If no value is supplied, no element will ever be loaded.\r\n * TODO: change to Required<CodeProps> in Version 4.0\r\n */\r\n code?: CodeProps;\r\n federationGuid?: GuidString;\r\n}\r\n\r\n/** Properties of an [ElementAspect]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementAspectProps extends EntityProps {\r\n element: RelatedElementProps;\r\n}\r\n\r\n/** Properties of an [ExternalSourceAspect]($backend) that stores synchronization information for an element originating from an external source.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ExternalSourceAspectProps extends ElementAspectProps {\r\n /** An element that scopes the combination of `kind` and `identifier` to uniquely identify the object from the external source.\r\n * @note Warning: in a future major release the `scope` property will be optional, since the scope is intended to be potentially invalid.\r\n * all references should treat it as potentially undefined, but we cannot change the type yet since that is a breaking change.\r\n */\r\n scope: RelatedElementProps;\r\n /** The identifier of the object in the source repository. */\r\n identifier: string;\r\n /** The kind of object within the source repository. */\r\n kind: string;\r\n /** An optional value that is typically a version number or a pseudo version number like last modified time.\r\n * It will be used by the synchronization process to detect that a source object is unchanged so that computing a cryptographic hash can be avoided.\r\n * If present, this value must be guaranteed to change when any of the source object's content changes.\r\n */\r\n version?: string;\r\n /** The optional cryptographic hash (any algorithm) of the source object's content. If defined, it must be guaranteed to change when the source object's content changes. */\r\n checksum?: string;\r\n /** A place where additional JSON properties can be stored. For example, provenance information or properties relating to the synchronization process.\r\n * @note Warning: if defined, jsonProperties must be a *string*, specifically a valid JSON string.\r\n * @note Warning: in a future major release, the type of `jsonProperties` will be changed to object, and itwin.js will automatically stringify it when writing to the iModel.\r\n * This will be a breaking change, since application code will have to change from supplying a string to supplying an object.\r\n */\r\n jsonProperties?: any;\r\n /** The source of the imported/synchronized object. Should point to an instance of [ExternalSource]($backend). */\r\n source?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of an [ExternalSource]($backend)\r\n * @beta\r\n */\r\nexport interface ExternalSourceProps extends ElementProps {\r\n repository?: RelatedElementProps;\r\n connectorName?: string;\r\n connectorVersion?: string;\r\n}\r\n\r\n/** The role that an attached [ExternalSource]($backend) plays.\r\n * @beta\r\n */\r\nexport enum ExternalSourceAttachmentRole {\r\n /** The attached [ExternalSource]($backend) provides context. */\r\n SpecifyContext = 0,\r\n /** The attached [ExternalSource]($backend) models a part of the whole. */\r\n SpecifyPart = 1,\r\n}\r\n\r\n/** Properties of an [ExternalSourceAttachment]($backend)\r\n * @beta\r\n */\r\nexport interface ExternalSourceAttachmentProps extends ElementProps {\r\n attaches?: RelatedElementProps;\r\n role?: ExternalSourceAttachmentRole;\r\n translation?: XYZProps;\r\n yaw?: number;\r\n pitch?: number;\r\n roll?: number;\r\n scale?: XYZProps;\r\n}\r\n\r\n/** 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.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ChannelRootAspectProps extends ElementAspectProps {\r\n /** The owner of the channel */\r\n owner: string;\r\n}\r\n\r\n/** Properties of a [LineStyle]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface LineStyleProps extends DefinitionElementProps {\r\n description?: string;\r\n /** The JSON string line style definition element data [LineStyleDefinition.StyleProps]($backend) */\r\n data: string;\r\n}\r\n\r\n/** Properties of a [LightLocation]($backend)\r\n * @internal\r\n */\r\nexport interface LightLocationProps extends GeometricElement3dProps {\r\n enabled?: boolean;\r\n}\r\n\r\n/** The *rank* for a Category\r\n * @public\r\n * @extensions\r\n */\r\nexport enum Rank {\r\n /** This category is predefined by the system */\r\n System = 0,\r\n /** This category is defined by a schema. Elements in this category are not recognized by system classes. */\r\n Domain = 1,\r\n /** This category is defined by an application. Elements in this category are not recognized by system and schema classes. */\r\n Application = 2,\r\n /** This category is defined by a user. Elements in this category are not recognized by system, schema, and application classes. */\r\n User = 3,\r\n}\r\n\r\n/** Parameters of a [Category]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CategoryProps extends DefinitionElementProps {\r\n rank?: Rank;\r\n description?: string;\r\n}\r\n\r\n/** Parameters of a [SubCategory]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SubCategoryProps extends DefinitionElementProps {\r\n appearance?: SubCategoryAppearance.Props;\r\n description?: string;\r\n}\r\n\r\n/** Parameters of a [UrlLink]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface UrlLinkProps extends ElementProps {\r\n description?: string;\r\n url?: string;\r\n}\r\n\r\n/** Parameters of a [RepositoryLink]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RepositoryLinkProps extends UrlLinkProps {\r\n repositoryGuid?: GuidString;\r\n format?: string;\r\n}\r\n\r\n/** The properties of a [SynchronizationConfigLink]($backend)\r\n * @beta\r\n */\r\nexport interface SynchronizationConfigLinkProps extends UrlLinkProps {\r\n lastSuccessfulRun?: string;\r\n}\r\n\r\n/** Wire format describing a [RenderTimeline]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RenderTimelineProps extends ElementProps {\r\n /** An optional human-readable description of the timeline. */\r\n description?: string;\r\n /** The stringified JSON representation of the instructions for visualizing change over time.\r\n * @see [[RenderSchedule.ScriptProps]] for the JSON interface.\r\n */\r\n script: string;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ElementProps.js","sourceRoot":"","sources":["../../src/ElementProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAmE;AAQnE,+CAA0D;AAqC1D;;GAEG;AACH,MAAa,cAAc;IAOzB,YAAY,KAA0B;QACpC,IAAI,CAAC,EAAE,GAAG,mBAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAClC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;IACzC,CAAC;IAEM,MAAM,CAAC,QAAQ,CAAC,IAA0B;QAC/C,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACrD,CAAC;IAKD,mJAAmJ;IAC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EAA0E;IAC1E,6FAAe,CAAA;AACjB,CAAC,EALW,4BAA4B,4CAA5B,4BAA4B,QAKvC;AAyCD;;;GAGG;AACH,IAAY,IASX;AATD,WAAY,IAAI;IACd,gDAAgD;IAChD,mCAAU,CAAA;IACV,4GAA4G;IAC5G,mCAAU,CAAA;IACV,6HAA6H;IAC7H,6CAAe,CAAA;IACf,mIAAmI;IACnI,+BAAQ,CAAA;AACV,CAAC,EATW,IAAI,oBAAJ,IAAI,QASf","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 Entities\r\n */\r\n\r\nimport { GuidString, Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n AngleProps, ClipVectorProps, LowAndHighXYProps, LowAndHighXYZProps, TransformProps, XYProps, XYZProps, YawPitchRollProps,\r\n} from \"@itwin/core-geometry\";\r\nimport { CodeProps } from \"./Code\";\r\nimport { EntityProps } from \"./EntityProps\";\r\nimport { ElementGeometryBuilderParams, ElementGeometryBuilderParamsForPart } from \"./geometry/ElementGeometry\";\r\nimport { GeometryStreamProps } from \"./geometry/GeometryStream\";\r\nimport { IModelError, IModelStatus } from \"./IModelError\";\r\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\r\nimport { TextAnnotationProps } from \"./annotation/TextAnnotation\";\r\n\r\n/** Properties of a NavigationProperty.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RelatedElementProps {\r\n /** The Id of the element to which this element is related. */\r\n id: Id64String;\r\n /** The full className of the relationship class. */\r\n relClassName?: string;\r\n}\r\n\r\n/** Properties of an [Element]($docs/bis/guide/fundamentals/element-fundamentals)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementProps extends EntityProps {\r\n /** The Id of the [Model]($docs/bis/guide/fundamentals/model-fundamentals.md) containing this element */\r\n model: Id64String;\r\n /** The [Code]($docs/bis/guide/fundamentals/codes.md) for this element */\r\n code: CodeProps;\r\n /** The Parent of this element, if defined. */\r\n parent?: RelatedElementProps;\r\n /** A [FederationGuid]($docs/bis/guide/fundamentals/element-fundamentals.md#federationguid) assigned to this element.\r\n * @note On insert, if this is a valid Guid, the value is preserved. If it is `undefined`, a new Guid is created. If it is an invalid Guid (e.g. Guid.empty), the\r\n * resultant element will have a `null` federationGuid. For update, `undefined` means \"don't change.\"\r\n */\r\n federationGuid?: GuidString;\r\n /** A [user-assigned label]($docs/bis/guide/fundamentals/element-fundamentals.md#userlabel) for this element. */\r\n userLabel?: string;\r\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this element. */\r\n jsonProperties?: any;\r\n}\r\n\r\n/** The Id and relationship class of an Element that is somehow related to another Element\r\n * @public\r\n */\r\nexport class RelatedElement implements RelatedElementProps {\r\n /** The Id of the element to which this element is related. */\r\n public readonly id: Id64String;\r\n\r\n /** The full className of the relationship class. */\r\n public readonly relClassName?: string;\r\n\r\n constructor(props: RelatedElementProps) {\r\n this.id = Id64.fromJSON(props.id);\r\n this.relClassName = props.relClassName;\r\n }\r\n\r\n public static fromJSON(json?: RelatedElementProps): RelatedElement | undefined {\r\n return json ? new RelatedElement(json) : undefined;\r\n }\r\n\r\n /** Used to *null out* an existing navigation relationship. */\r\n public static readonly none = new RelatedElement({ id: Id64.invalid });\r\n\r\n /** Accept the value of a navigation property that might be in the shortened format of just an id or might be in the full RelatedElement format. */\r\n public static idFromJson(json: any): Id64String {\r\n if ((typeof json === \"object\") && (\"id\" in json)) {\r\n const r = RelatedElement.fromJSON(json);\r\n if (r === undefined)\r\n throw new IModelError(IModelStatus.BadArg, \"Problem parsing Id64 from json\");\r\n return r.id;\r\n }\r\n return Id64.fromJSON(json);\r\n }\r\n\r\n public toJSON(): RelatedElementProps {\r\n return {\r\n id: this.id,\r\n relClassName: this.relClassName,\r\n };\r\n }\r\n}\r\n\r\n/** A [RelatedElement]($common) relationship that describes the [TypeDefinitionElement]($backend) of an element.\r\n * @public\r\n */\r\nexport class TypeDefinition extends RelatedElement {\r\n}\r\n\r\n/** Properties of a [GeometricElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricElementProps extends ElementProps {\r\n /** The id of the category for this geometric element. */\r\n category: Id64String;\r\n /** The geometry stream properties */\r\n geom?: GeometryStreamProps;\r\n /** How to build the element's GeometryStream. This is used for insert and update only. It is not a persistent property. It will be undefined in the properties returned by functions that read a persistent element. It may be specified as an alternative to `geom` when inserting or updating an element.\r\n * @beta\r\n */\r\n elementGeometryBuilderParams?: ElementGeometryBuilderParams;\r\n /** The placement properties */\r\n placement?: PlacementProps;\r\n}\r\n\r\n/** Properties of a [[Placement3d]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Placement3dProps {\r\n origin: XYZProps;\r\n angles: YawPitchRollProps;\r\n bbox?: LowAndHighXYZProps;\r\n}\r\n\r\n/** Properties of a [[Placement2d]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Placement2dProps {\r\n origin: XYProps;\r\n angle: AngleProps;\r\n bbox?: LowAndHighXYProps;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport type PlacementProps = Placement2dProps | Placement3dProps;\r\n\r\n/** determine if this is Placement2dProps\r\n * @public\r\n */\r\nexport function isPlacement2dProps(props: PlacementProps): props is Placement2dProps {\r\n return (props as Placement2dProps).angle !== undefined;\r\n}\r\n\r\n/** determine if this is Placement3dProps\r\n * @public\r\n */\r\nexport function isPlacement3dProps(props: PlacementProps): props is Placement3dProps {\r\n return !isPlacement2dProps(props);\r\n}\r\n\r\n/** Properties that define a [GeometricElement3d]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricElement3dProps extends GeometricElementProps {\r\n placement?: Placement3dProps;\r\n typeDefinition?: RelatedElementProps;\r\n}\r\n\r\n/** JSON representation of a [TextAnnotation3d]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TextAnnotation3dProps extends GeometricElement3dProps {\r\n jsonProperties?: {\r\n [key: string]: any;\r\n /** @beta */\r\n annotation?: TextAnnotationProps;\r\n };\r\n}\r\n\r\n/** Properties that define a [PhysicalElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PhysicalElementProps extends GeometricElement3dProps {\r\n physicalMaterial?: RelatedElementProps;\r\n}\r\n\r\n/** An enumeration of the different types of [SectionDrawing]($backend)s.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum SectionType {\r\n Section = 3,\r\n Detail = 4,\r\n Elevation = 5,\r\n Plan = 6,\r\n}\r\n\r\n/** Properties that define a [SectionDrawing]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SectionDrawingProps extends ElementProps {\r\n /** The type of section used to generate the drawing. Default: Section. */\r\n sectionType?: SectionType;\r\n /** The spatial view from which the section was generated. */\r\n spatialView?: RelatedElementProps;\r\n jsonProperties?: {\r\n /** A transform from the section drawing model's coordinates to spatial coordinates. */\r\n drawingToSpatialTransform?: TransformProps;\r\n /** If the section drawing is placed onto a [Sheet]($backend) via a [ViewAttachment]($backend), a transform from the sheet's coordinates to spatial coordinates. */\r\n sheetToSpatialTransform?: TransformProps;\r\n /** If the section drawing is placed onto a [Sheet]($backend) via a [ViewAttachment]($backend), JSON representation of a [ClipVector]($geometry) to apply to\r\n * the sheet graphics when drawn in the context of the spatial view.\r\n * The ClipVector is in spatial coordinates.\r\n */\r\n drawingBoundaryClip?: ClipVectorProps;\r\n /** If true, when displaying the section drawing as a [DrawingViewState]($frontend), the [[spatialView]] will also be displayed. */\r\n displaySpatialView?: true;\r\n };\r\n}\r\n\r\n/** Properties that define a [SectionDrawingLocation]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SectionDrawingLocationProps extends GeometricElement3dProps {\r\n /** The [ViewDefinition]($backend) to which this location refers. */\r\n sectionView?: RelatedElementProps;\r\n}\r\n\r\n/** Properties that define a [GeometricElement2d]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometricElement2dProps extends GeometricElementProps {\r\n placement?: Placement2dProps;\r\n typeDefinition?: RelatedElementProps;\r\n}\r\n\r\n/** JSON representation of a [TextAnnotation2d]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TextAnnotation2dProps extends GeometricElement2dProps {\r\n jsonProperties?: {\r\n [key: string]: any;\r\n /** @beta */\r\n annotation?: TextAnnotationProps;\r\n };\r\n}\r\n\r\n/** Properties of a [GeometryPart]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometryPartProps extends ElementProps {\r\n geom?: GeometryStreamProps;\r\n /** How to build the part's GeometryStream. This is used for insert and update only. It is not a persistent property. It will be undefined in the properties returned by functions that read a persistent element. It may be specified as an alternative to `geom` when inserting or updating an element.\r\n * @beta\r\n */\r\n elementGeometryBuilderParams?: ElementGeometryBuilderParamsForPart;\r\n bbox?: LowAndHighXYZProps;\r\n}\r\n\r\n/** Properties for a [ViewAttachment]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewAttachmentProps extends GeometricElement2dProps {\r\n view: RelatedElementProps;\r\n jsonProperties?: {\r\n /** Integer priority in [-500,500]. Where two attachments overlap, the one with the higher priority draws in front of the other. Default: 0. */\r\n displayPriority?: number;\r\n /** JSON representation of a [ClipVector]($core-geometry] in sheet coordinate space, used to clip the attachment's graphics on the sheet. */\r\n clip?: ClipVectorProps;\r\n /** Options for customizing how the view attachment is displayed on the sheet. */\r\n displayOptions?: {\r\n /** If true, the view attachment is always drawn as a raster image. By default, only 3d perspective views are drawn this way (they always *must* be). Default: false. */\r\n drawAsRaster?: boolean;\r\n /** If true, and the view attachment is drawn as a raster image, the background color of the view will be preserved. By default the background color of the\r\n * sheet is used and any background pixels become transparent, allowing the contents of the sheet to show through. Default: false.\r\n */\r\n preserveBackground?: boolean;\r\n };\r\n };\r\n}\r\n\r\n/** Properties of a [Subject]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SubjectProps extends ElementProps {\r\n description?: string;\r\n}\r\n\r\n/** Properties of a [SheetBorderTemplate]($backend)\r\n * @beta\r\n */\r\nexport interface SheetBorderTemplateProps extends ElementProps {\r\n height?: number;\r\n width?: number;\r\n}\r\n\r\n/** Properties of a [SheetTemplate]($backend)\r\n * @beta\r\n */\r\nexport interface SheetTemplateProps extends ElementProps {\r\n height?: number;\r\n width?: number;\r\n border?: Id64String;\r\n}\r\n\r\n/** Properties of a [Sheet]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SheetProps extends ElementProps {\r\n width?: number;\r\n height?: number;\r\n scale?: number;\r\n sheetTemplate?: Id64String;\r\n attachments?: Id64String[];\r\n}\r\n\r\n/** Properties of a [DefinitionElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DefinitionElementProps extends ElementProps {\r\n isPrivate?: boolean;\r\n}\r\n\r\n/** Properties of a [TypeDefinitionElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TypeDefinitionElementProps extends DefinitionElementProps {\r\n recipe?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of a [PhysicalType]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PhysicalTypeProps extends TypeDefinitionElementProps {\r\n /** The [PhysicalMaterial]($backend) that makes up this physical type. */\r\n physicalMaterial?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of a [InformationPartitionElement]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface InformationPartitionElementProps extends ElementProps {\r\n description?: string;\r\n}\r\n\r\n/** Options controlling which properties are included or excluded when querying [[DisplayStyleProps]].\r\n * @see [[ViewStateLoadProps]] and [[ElementLoadOptions]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DisplayStyleLoadProps {\r\n /** If true, the lists of element Ids in the display style's schedule script will be empty.\r\n * The element Ids are not required on the frontend for display and can be quite large.\r\n */\r\n omitScheduleScriptElementIds?: boolean;\r\n /** If true, [[DisplayStyleSettingsProps.excludedElements]] will be compressed into a single compact string; otherwise they will be expanded into an array of strings.\r\n * The number of Ids may be quite large, so the compressed format is preferred, especially when communicating between the backend and frontend.\r\n */\r\n compressExcludedElementIds?: boolean;\r\n}\r\n\r\n/** Options controlling which properties are included or excluded when querying [[RenderTimelineProps]].\r\n * @see [[ElementLoadOptions.renderTimeline]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RenderTimelineLoadProps {\r\n /** If true, the lists of element Ids in the schedule script will be empty.\r\n * The element Ids can be extremely numerous and are not required on the frontend for display, so they are omitted by default by [DisplayStyleState.load]($frontend).\r\n */\r\n omitScriptElementIds?: boolean;\r\n}\r\n\r\n/** Options used to specify properties to include or exclude when querying [[ElementProps]] with functions like\r\n * [IModelDb.Elements.getElementProps]($backend) and [IModelConnection.Elements.loadProps]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementLoadOptions {\r\n /** if true, only load the members of [[ElementProps]], and no members from subclasses */\r\n onlyBaseProperties?: boolean;\r\n /** If true, include the [[GeometryStreamProps]] for [[GeometricElementProps]] and [[GeometryPartProps]].\r\n * Geometry streams can consist of many megabytes worth of JSON, so they are omitted by default.\r\n */\r\n wantGeometry?: boolean;\r\n /** When including a geometry stream containing brep entries, whether to return the raw brep data or proxy geometry, false when undefined */\r\n /** If true, include [[BRepEntity.DataProps.data]] in the [[GeometryStreamProps]] for [[GeometricElementProps]] and [[GeometryPartProps]].\r\n * The data is a potentially large base-64-encoded opaque binary blob that cannot be directly inspected or manipulated on the frontend, so it is omitted by default.\r\n */\r\n wantBRepData?: boolean;\r\n /** Options controlling which properties of [[DisplayStyleProps]] to include or exclude. */\r\n displayStyle?: DisplayStyleLoadProps;\r\n /** Options controlling which properties of [[RenderTimelineProps]] to include or exclude. */\r\n renderTimeline?: RenderTimelineLoadProps;\r\n}\r\n\r\n/** Parameters to specify what element to load for functions like [IModelDb.Elements.getElementProps]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementLoadProps extends ElementLoadOptions {\r\n id?: Id64String;\r\n /** The properties of the Code of the element to load.\r\n * @note the Value member is required even though it is not declared so here. If no value is supplied, no element will ever be loaded.\r\n * TODO: change to Required<CodeProps> in Version 4.0\r\n */\r\n code?: CodeProps;\r\n federationGuid?: GuidString;\r\n}\r\n\r\n/** Properties of an [ElementAspect]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ElementAspectProps extends EntityProps {\r\n element: RelatedElementProps;\r\n}\r\n\r\n/** Properties of an [ExternalSourceAspect]($backend) that stores synchronization information for an element originating from an external source.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ExternalSourceAspectProps extends ElementAspectProps {\r\n /** An element that scopes the combination of `kind` and `identifier` to uniquely identify the object from the external source.\r\n * @note Warning: in a future major release the `scope` property will be optional, since the scope is intended to be potentially invalid.\r\n * all references should treat it as potentially undefined, but we cannot change the type yet since that is a breaking change.\r\n */\r\n scope: RelatedElementProps;\r\n /** The identifier of the object in the source repository. */\r\n identifier: string;\r\n /** The kind of object within the source repository. */\r\n kind: string;\r\n /** An optional value that is typically a version number or a pseudo version number like last modified time.\r\n * It will be used by the synchronization process to detect that a source object is unchanged so that computing a cryptographic hash can be avoided.\r\n * If present, this value must be guaranteed to change when any of the source object's content changes.\r\n */\r\n version?: string;\r\n /** The optional cryptographic hash (any algorithm) of the source object's content. If defined, it must be guaranteed to change when the source object's content changes. */\r\n checksum?: string;\r\n /** A place where additional JSON properties can be stored. For example, provenance information or properties relating to the synchronization process.\r\n * @note Warning: if defined, jsonProperties must be a *string*, specifically a valid JSON string.\r\n * @note Warning: in a future major release, the type of `jsonProperties` will be changed to object, and itwin.js will automatically stringify it when writing to the iModel.\r\n * This will be a breaking change, since application code will have to change from supplying a string to supplying an object.\r\n */\r\n jsonProperties?: any;\r\n /** The source of the imported/synchronized object. Should point to an instance of [ExternalSource]($backend). */\r\n source?: RelatedElementProps;\r\n}\r\n\r\n/** Properties of an [ExternalSource]($backend)\r\n * @beta\r\n */\r\nexport interface ExternalSourceProps extends ElementProps {\r\n repository?: RelatedElementProps;\r\n connectorName?: string;\r\n connectorVersion?: string;\r\n}\r\n\r\n/** The role that an attached [ExternalSource]($backend) plays.\r\n * @beta\r\n */\r\nexport enum ExternalSourceAttachmentRole {\r\n /** The attached [ExternalSource]($backend) provides context. */\r\n SpecifyContext = 0,\r\n /** The attached [ExternalSource]($backend) models a part of the whole. */\r\n SpecifyPart = 1,\r\n}\r\n\r\n/** Properties of an [ExternalSourceAttachment]($backend)\r\n * @beta\r\n */\r\nexport interface ExternalSourceAttachmentProps extends ElementProps {\r\n attaches?: RelatedElementProps;\r\n role?: ExternalSourceAttachmentRole;\r\n translation?: XYZProps;\r\n yaw?: number;\r\n pitch?: number;\r\n roll?: number;\r\n scale?: XYZProps;\r\n}\r\n\r\n/** 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.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ChannelRootAspectProps extends ElementAspectProps {\r\n /** The owner of the channel */\r\n owner: string;\r\n}\r\n\r\n/** Properties of a [LineStyle]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface LineStyleProps extends DefinitionElementProps {\r\n description?: string;\r\n /** The JSON string line style definition element data [LineStyleDefinition.StyleProps]($backend) */\r\n data: string;\r\n}\r\n\r\n/** Properties of a [LightLocation]($backend)\r\n * @internal\r\n */\r\nexport interface LightLocationProps extends GeometricElement3dProps {\r\n enabled?: boolean;\r\n}\r\n\r\n/** The *rank* for a Category\r\n * @public\r\n * @extensions\r\n */\r\nexport enum Rank {\r\n /** This category is predefined by the system */\r\n System = 0,\r\n /** This category is defined by a schema. Elements in this category are not recognized by system classes. */\r\n Domain = 1,\r\n /** This category is defined by an application. Elements in this category are not recognized by system and schema classes. */\r\n Application = 2,\r\n /** This category is defined by a user. Elements in this category are not recognized by system, schema, and application classes. */\r\n User = 3,\r\n}\r\n\r\n/** Parameters of a [Category]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CategoryProps extends DefinitionElementProps {\r\n rank?: Rank;\r\n description?: string;\r\n}\r\n\r\n/** Parameters of a [SubCategory]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SubCategoryProps extends DefinitionElementProps {\r\n appearance?: SubCategoryAppearance.Props;\r\n description?: string;\r\n}\r\n\r\n/** Parameters of a [UrlLink]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface UrlLinkProps extends ElementProps {\r\n description?: string;\r\n url?: string;\r\n}\r\n\r\n/** Parameters of a [RepositoryLink]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RepositoryLinkProps extends UrlLinkProps {\r\n repositoryGuid?: GuidString;\r\n format?: string;\r\n}\r\n\r\n/** The properties of a [SynchronizationConfigLink]($backend)\r\n * @beta\r\n */\r\nexport interface SynchronizationConfigLinkProps extends UrlLinkProps {\r\n lastSuccessfulRun?: string;\r\n}\r\n\r\n/** Wire format describing a [RenderTimeline]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RenderTimelineProps extends ElementProps {\r\n /** An optional human-readable description of the timeline. */\r\n description?: string;\r\n /** The stringified JSON representation of the instructions for visualizing change over time.\r\n * @see [[RenderSchedule.ScriptProps]] for the JSON interface.\r\n */\r\n script: string;\r\n}\r\n"]}
|
|
@@ -22,5 +22,5 @@ var FeatureOverrideType;
|
|
|
22
22
|
FeatureOverrideType[FeatureOverrideType["AlphaOnly"] = 1] = "AlphaOnly";
|
|
23
23
|
/** Override both color and alpha. */
|
|
24
24
|
FeatureOverrideType[FeatureOverrideType["ColorAndAlpha"] = 2] = "ColorAndAlpha";
|
|
25
|
-
})(FeatureOverrideType
|
|
25
|
+
})(FeatureOverrideType || (exports.FeatureOverrideType = FeatureOverrideType = {}));
|
|
26
26
|
//# sourceMappingURL=EmphasizeElementsProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmphasizeElementsProps.js","sourceRoot":"","sources":["../../src/EmphasizeElementsProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAMH;;;;;GAKG;AACH,IAAY,mBAOX;AAPD,WAAY,mBAAmB;IAC7B,2BAA2B;IAC3B,uEAAS,CAAA;IACT,2BAA2B;IAC3B,uEAAS,CAAA;IACT,qCAAqC;IACrC,+EAAa,CAAA;AACf,CAAC,EAPW,mBAAmB,
|
|
1
|
+
{"version":3,"file":"EmphasizeElementsProps.js","sourceRoot":"","sources":["../../src/EmphasizeElementsProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAMH;;;;;GAKG;AACH,IAAY,mBAOX;AAPD,WAAY,mBAAmB;IAC7B,2BAA2B;IAC3B,uEAAS,CAAA;IACT,2BAA2B;IAC3B,uEAAS,CAAA;IACT,qCAAqC;IACrC,+EAAa,CAAA;AACf,CAAC,EAPW,mBAAmB,mCAAnB,mBAAmB,QAO9B","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 Rendering\r\n */\r\n\r\nimport { Id64Array } from \"@itwin/core-bentley\";\r\nimport { ColorDefProps } from \"./ColorDef\";\r\nimport { FeatureAppearanceProps } from \"./FeatureSymbology\";\r\n\r\n/** Options for overriding element appearance.\r\n * @see [EmphasizeElements]($frontend)\r\n * @see [[AppearanceOverrideProps]]\r\n * @public\r\n * @extensions\r\n */\r\nexport enum FeatureOverrideType {\r\n /** Override color only. */\r\n ColorOnly,\r\n /** Override alpha only. */\r\n AlphaOnly,\r\n /** Override both color and alpha. */\r\n ColorAndAlpha,\r\n}\r\n\r\n/** JSON representation of an appearance override in an [[EmphasizeElementsProps]].\r\n * @see [EmphasizeElements]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AppearanceOverrideProps {\r\n /** Whether to override color, transparency, or both. */\r\n overrideType?: FeatureOverrideType;\r\n /** The 0xTTBBGGRR format color/transparency value. */\r\n color?: ColorDefProps;\r\n /** The element IDs to display with the specified override. */\r\n ids?: Id64Array;\r\n}\r\n\r\n/** JSON representation of an [EmphasizeElements]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface EmphasizeElementsProps {\r\n /** See [EmphasizeElements.getNeverDrawnElements]($frontend) */\r\n neverDrawn?: Id64Array;\r\n /** See [EmphasizeElements.getAlwaysDrawnElements]($frontend) */\r\n alwaysDrawn?: Id64Array;\r\n /** See [EmphasizeElements.getIsolatedElements]($frontend) */\r\n isAlwaysDrawnExclusive?: boolean;\r\n /** See [EmphasizeElements.getEmphasizedIsolatedElements]($frontend) */\r\n alwaysDrawnExclusiveEmphasized?: Id64Array;\r\n /** See [EmphasizeElements.defaultAppearance]($frontend) */\r\n defaultAppearance?: FeatureAppearanceProps;\r\n /** See [EmphasizeElements.getOverriddenElementsByKey]($frontend) */\r\n appearanceOverride?: AppearanceOverrideProps[];\r\n /** See [EmphasizeElements.wantEmphasis]($frontend) */\r\n wantEmphasis?: boolean;\r\n /** See [EmphasizeElements.unanimatedAppearance]($frontend) */\r\n unanimatedAppearance?: FeatureAppearanceProps;\r\n}\r\n"]}
|
package/lib/cjs/EntityProps.d.ts
CHANGED
|
@@ -70,8 +70,8 @@ export declare enum PrimitiveTypeCode {
|
|
|
70
70
|
Double = 1025,
|
|
71
71
|
Integer = 1281,
|
|
72
72
|
Long = 1537,
|
|
73
|
-
Point2d = 1793
|
|
74
|
-
Point3d = 2049
|
|
73
|
+
Point2d = 1793,// eslint-disable-line @typescript-eslint/no-shadow
|
|
74
|
+
Point3d = 2049,// eslint-disable-line @typescript-eslint/no-shadow
|
|
75
75
|
String = 2305,
|
|
76
76
|
IGeometry = 2561
|
|
77
77
|
}
|
|
@@ -143,6 +143,7 @@ export declare class PropertyMetaData implements PropertyMetaDataProps {
|
|
|
143
143
|
}
|
|
144
144
|
/** @beta */
|
|
145
145
|
export interface EntityMetaDataProps {
|
|
146
|
+
classId: Id64String;
|
|
146
147
|
ecclass: string;
|
|
147
148
|
description?: string;
|
|
148
149
|
modifier?: string;
|
|
@@ -160,6 +161,8 @@ export interface EntityMetaDataProps {
|
|
|
160
161
|
* @beta
|
|
161
162
|
*/
|
|
162
163
|
export declare class EntityMetaData implements EntityMetaDataProps {
|
|
164
|
+
/** The Id of the class in the [[IModelDb]] from which the metadata was obtained. */
|
|
165
|
+
readonly classId: Id64String;
|
|
163
166
|
/** The Entity name */
|
|
164
167
|
readonly ecclass: string;
|
|
165
168
|
readonly description?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityProps.d.ts","sourceRoot":"","sources":["../../src/EntityProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAQ,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAIvD;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,KAAK,CAAC;IACpC,mIAAmI;IACnI,aAAa,EAAE,MAAM,CAAC;IACtB,+FAA+F;IAC/F,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB,sHAAsH;IACtH,cAAc,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CACzC;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,UAAU,CAAC;IACrB,QAAQ,EAAE,UAAU,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,WAAW,EAAE,eAAe;CACtE;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,iFAAiF;IACjF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,8FAA8F;IAC9F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+FAA+F;I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AC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gKAAgK;IAChK,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IACrC,qFAAqF;IACrF,UAAU,EAAE;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAAA;KAAE,CAAC;CACtD;AAED;;GAEG;AACH,qBAAa,cAAe,YAAW,mBAAmB;IACxD,oFAAoF;IACpF,SAAgB,OAAO,EAAE,UAAU,CAAC;IACpC,sBAAsB;IACtB,SAAgB,OAAO,EAAE,MAAM,CAAC;IAChC,SAAgB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrC,SAAgB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClC,SAAgB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtC,uIAAuI;IACvI,SAAgB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtC,2CAA2C;IAC3C,SAAgB,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IACrD,qFAAqF;IACrF,SAAgB,UAAU,EAAE;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAAA;KAAE,CAAC;gBAElD,OAAO,EAAE,mBAAmB;CAchD"}
|
package/lib/cjs/EntityProps.js
CHANGED
|
@@ -27,7 +27,7 @@ var PrimitiveTypeCode;
|
|
|
27
27
|
PrimitiveTypeCode[PrimitiveTypeCode["Point3d"] = 2049] = "Point3d";
|
|
28
28
|
PrimitiveTypeCode[PrimitiveTypeCode["String"] = 2305] = "String";
|
|
29
29
|
PrimitiveTypeCode[PrimitiveTypeCode["IGeometry"] = 2561] = "IGeometry";
|
|
30
|
-
})(PrimitiveTypeCode
|
|
30
|
+
})(PrimitiveTypeCode || (exports.PrimitiveTypeCode = PrimitiveTypeCode = {}));
|
|
31
31
|
/** Metadata for a property.
|
|
32
32
|
* @beta
|
|
33
33
|
*/
|
|
@@ -98,6 +98,7 @@ exports.PropertyMetaData = PropertyMetaData;
|
|
|
98
98
|
*/
|
|
99
99
|
class EntityMetaData {
|
|
100
100
|
constructor(jsonObj) {
|
|
101
|
+
this.classId = jsonObj.classId;
|
|
101
102
|
this.ecclass = jsonObj.ecclass;
|
|
102
103
|
this.description = jsonObj.description;
|
|
103
104
|
this.modifier = jsonObj.modifier;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityProps.js","sourceRoot":"","sources":["../../src/EntityProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AACvD,wDAAwD;AACxD,iDAAgD;AA6DhD;;GAEG;AACH,IAAY,iBAYX;AAZD,WAAY,iBAAiB;IAC3B,2EAAoB,CAAA;IACpB,+DAAc,CAAA;IACd,iEAAe,CAAA;IACf,mEAAgB,CAAA;IAChB,gEAAc,CAAA;IACd,kEAAe,CAAA;IACf,4DAAY,CAAA;IACZ,kEAAe,CAAA;IACf,kEAAe,CAAA;IACf,gEAAc,CAAA;IACd,sEAAiB,CAAA;AACnB,CAAC,EAZW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAY5B;AAyCD;;GAEG;AACH,MAAa,gBAAgB;IAoB3B,YAAmB,OAA8B;QAC/C,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;QAC3C,IAAI,OAAO,CAAC,UAAU;YACpB,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACvC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACzC,IAAI,SAAS,KAAK,OAAO,CAAC,YAAY;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AAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;QACjD,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QAErB,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,UAAU,EAAE,EAAE,mCAAmC;YAC9E,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,IAAI,gBAAgB,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;SAChF;IACH,CAAC;CACF;AA1BD,wCA0BC","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 Entities\r\n */\r\n\r\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport { Point2d, Point3d } from \"@itwin/core-geometry\";\r\nimport { RelatedElement } from \"./ElementProps\";\r\n\r\n/** The persistent format of an [Entity]($backend), also used as the \"wire format\" when transmitting information about entities\r\n * between the backend and frontend.\r\n * EntityProps and all of its sub-types like [[ElementProps]] are \"plain old Javascript objects\" - that is, objects containing\r\n * no methods and no properties of `class` type.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface EntityProps {\r\n /** A non-existent property used to discriminate between [[EntityProps]] and [Entity]($backend).\r\n * @see [Entity.isInstanceOfEntity]($backend).\r\n */\r\n readonly isInstanceOfEntity?: never;\r\n /** The full name of the [ECClass]($docs/bis/guide/references/glossary/#ecclass) for this entity, in the form \"Schema:ClassName\" */\r\n classFullName: string;\r\n /** The Id of the entity. Must be present for SELECT, UPDATE, or DELETE, ignored for INSERT. */\r\n id?: Id64String;\r\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this Entity. */\r\n jsonProperties?: { [key: string]: any };\r\n}\r\n\r\n/** Specifies the source and target elements of a [[Relationship]] instance.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SourceAndTarget {\r\n sourceId: Id64String;\r\n targetId: Id64String;\r\n}\r\n\r\n/** Properties that are common to all types of link table ECRelationships\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RelationshipProps extends EntityProps, SourceAndTarget {\r\n}\r\n\r\n/** Parameters for performing a query on [Entity]($backend) classes.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface EntityQueryParams {\r\n /** The sql className, in the form \"Schema.ClassName\", of the class to search. */\r\n from?: string;\r\n /** Set to true to limit results to *not* include sub-classes of \"from\" class */\r\n only?: boolean;\r\n /** Optional \"WHERE\" clause to filter entities. Note: do *not* include the \"WHERE\" keyword. */\r\n where?: string;\r\n /** Optional \"ORDERBY\" clause to sort results. Note: do *not* include the \"ORDERBY\" keyword. */\r\n orderBy?: string;\r\n /** Optional \"LIMIT\" clause to limit the number of rows returned. */\r\n limit?: number;\r\n /** Optional \"OFFSET\" clause. Only valid if Limit is also present. */\r\n offset?: number;\r\n /** Bindings for parameterized values.\r\n * @see [[ECSqlStatement.bindValues]]\r\n */\r\n bindings?: any[] | object;\r\n}\r\n\r\n/** The primitive types of an Entity property.\r\n * @beta\r\n */\r\nexport enum PrimitiveTypeCode {\r\n Uninitialized = 0x00,\r\n Binary = 0x101,\r\n Boolean = 0x201,\r\n DateTime = 0x301,\r\n Double = 0x401,\r\n Integer = 0x501,\r\n Long = 0x601,\r\n Point2d = 0x701, // eslint-disable-line @typescript-eslint/no-shadow\r\n Point3d = 0x801, // eslint-disable-line @typescript-eslint/no-shadow\r\n String = 0x901,\r\n IGeometry = 0xa01, // Used for Bentley.Geometry.Common.IGeometry types\r\n}\r\n\r\n/** A callback function to process properties of an Entity\r\n * @beta\r\n */\r\nexport type PropertyCallback = (name: string, meta: PropertyMetaData) => void;\r\n\r\n/** A custom attribute instance\r\n * @beta\r\n */\r\nexport interface CustomAttribute {\r\n /** The class of the CustomAttribute */\r\n ecclass: string;\r\n /** An object whose properties correspond by name to the properties of this custom attribute instance. */\r\n properties: { [propName: string]: any };\r\n}\r\n\r\ntype FactoryFunc = (jsonObj: any) => any;\r\n\r\n/** @beta */\r\nexport interface PropertyMetaDataProps {\r\n primitiveType?: number;\r\n structName?: string;\r\n extendedType?: string;\r\n description?: string;\r\n displayLabel?: string;\r\n minimumValue?: any;\r\n maximumValue?: any;\r\n minimumLength?: number;\r\n maximumLength?: number;\r\n readOnly?: boolean;\r\n kindOfQuantity?: string;\r\n isCustomHandled?: boolean;\r\n isCustomHandledOrphan?: boolean;\r\n minOccurs?: number;\r\n maxOccurs?: number;\r\n direction?: string;\r\n relationshipClass?: string;\r\n customAttributes?: CustomAttribute[];\r\n}\r\n\r\n/** Metadata for a property.\r\n * @beta\r\n */\r\nexport class PropertyMetaData implements PropertyMetaDataProps {\r\n public primitiveType?: PrimitiveTypeCode;\r\n public structName?: string;\r\n public extendedType?: string;\r\n public description?: string;\r\n public displayLabel?: string;\r\n public minimumValue?: any;\r\n public maximumValue?: any;\r\n public minimumLength?: number;\r\n public maximumLength?: number;\r\n public readOnly?: boolean;\r\n public kindOfQuantity?: string;\r\n public isCustomHandled?: boolean;\r\n public isCustomHandledOrphan?: boolean;\r\n public minOccurs?: number;\r\n public maxOccurs?: number;\r\n public direction?: string;\r\n public relationshipClass?: string;\r\n public customAttributes?: CustomAttribute[];\r\n\r\n public constructor(jsonObj: PropertyMetaDataProps) {\r\n this.primitiveType = jsonObj.primitiveType;\r\n if (jsonObj.structName)\r\n this.structName = jsonObj.structName;\r\n this.extendedType = jsonObj.extendedType;\r\n this.description = jsonObj.description;\r\n this.displayLabel = jsonObj.displayLabel;\r\n if (undefined !== jsonObj.minimumValue)\r\n this.minimumValue = jsonObj.minimumValue;\r\n if (undefined !== jsonObj.maximumValue)\r\n this.maximumValue = jsonObj.maximumValue;\r\n if (undefined !== jsonObj.minimumLength)\r\n this.minimumLength = jsonObj.minimumLength;\r\n if (undefined !== jsonObj.maximumLength)\r\n this.maximumLength = jsonObj.maximumLength;\r\n this.readOnly = jsonObj.readOnly;\r\n this.kindOfQuantity = jsonObj.kindOfQuantity;\r\n this.isCustomHandled = jsonObj.isCustomHandled;\r\n if (undefined !== jsonObj.minOccurs)\r\n this.minOccurs = jsonObj.minOccurs;\r\n if (undefined !== jsonObj.maxOccurs)\r\n this.maxOccurs = jsonObj.maxOccurs;\r\n this.direction = jsonObj.direction;\r\n this.relationshipClass = jsonObj.relationshipClass;\r\n this.customAttributes = jsonObj.customAttributes;\r\n }\r\n\r\n /** Create a typed value, or array of values, from a factory and an input object */\r\n private createValueOrArray(func: FactoryFunc, jsonObj: any) {\r\n if (undefined === this.minOccurs)\r\n return func(jsonObj); // not an array\r\n\r\n const val: any = [];\r\n jsonObj.forEach((element: any) => val.push(func(element)));\r\n return val;\r\n }\r\n\r\n /** construct a single property from an input object according to this metadata */\r\n public createProperty(jsonObj: any): any {\r\n if (jsonObj === undefined)\r\n return undefined;\r\n\r\n if (undefined !== this.primitiveType) {\r\n switch (this.primitiveType) {\r\n case PrimitiveTypeCode.Boolean:\r\n case PrimitiveTypeCode.Double:\r\n case PrimitiveTypeCode.Integer:\r\n case PrimitiveTypeCode.String:\r\n return jsonObj; // this works even for arrays or strings that are JSON because the parsed JSON is already the right type\r\n\r\n case PrimitiveTypeCode.Point2d:\r\n return this.createValueOrArray((obj) => Point2d.fromJSON(obj), jsonObj);\r\n\r\n case PrimitiveTypeCode.Point3d:\r\n return this.createValueOrArray((obj) => Point3d.fromJSON(obj), jsonObj);\r\n }\r\n }\r\n if (this.isNavigation)\r\n return jsonObj.id !== undefined ? new RelatedElement(jsonObj) : Id64.fromJSON(jsonObj);\r\n\r\n return jsonObj;\r\n }\r\n\r\n /** Return `true` if this property is a NavigationProperty. */\r\n public get isNavigation(): boolean {\r\n return (this.direction !== undefined); // the presence of `direction` means it is a navigation property\r\n }\r\n}\r\n\r\n/** @beta */\r\nexport interface EntityMetaDataProps {\r\n ecclass: string;\r\n description?: string;\r\n modifier?: string;\r\n displayLabel?: string;\r\n /** The base classes from which this class derives. If more than one, the first is the super class and the others are [mixins]($docs/bis/ec/ec-mixin-class). */\r\n baseClasses: string[];\r\n /** The Custom Attributes for this class */\r\n customAttributes?: CustomAttribute[];\r\n /** An object whose properties correspond by name to the properties of this class. */\r\n properties: { [propName: string]: PropertyMetaData };\r\n}\r\n\r\n/** Metadata for an Entity.\r\n * @beta\r\n */\r\nexport class EntityMetaData implements EntityMetaDataProps {\r\n /** The Entity name */\r\n public readonly ecclass: string;\r\n public readonly description?: string;\r\n public readonly modifier?: string;\r\n public readonly displayLabel?: string;\r\n /** The base class that this class is derives from. If more than one, the first is the actual base class and the others are mixins. */\r\n public readonly baseClasses: string[];\r\n /** The Custom Attributes for this class */\r\n public readonly customAttributes?: CustomAttribute[];\r\n /** An object whose properties correspond by name to the properties of this class. */\r\n public readonly properties: { [propName: string]: PropertyMetaData };\r\n\r\n public constructor(jsonObj: EntityMetaDataProps) {\r\n this.ecclass = jsonObj.ecclass;\r\n this.description = jsonObj.description;\r\n this.modifier = jsonObj.modifier;\r\n this.displayLabel = jsonObj.displayLabel;\r\n this.baseClasses = jsonObj.baseClasses;\r\n this.customAttributes = jsonObj.customAttributes;\r\n this.properties = {};\r\n\r\n for (const propName in jsonObj.properties) { // eslint-disable-line guard-for-in\r\n this.properties[propName] = new PropertyMetaData(jsonObj.properties[propName]);\r\n }\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"EntityProps.js","sourceRoot":"","sources":["../../src/EntityProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AACvD,wDAAwD;AACxD,iDAAgD;AA6DhD;;GAEG;AACH,IAAY,iBAYX;AAZD,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,CAAC,CAAC;QACjF,CAAC;IACH,CAAC;CACF;AA7BD,wCA6BC","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 Entities\r\n */\r\n\r\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport { Point2d, Point3d } from \"@itwin/core-geometry\";\r\nimport { RelatedElement } from \"./ElementProps\";\r\n\r\n/** The persistent format of an [Entity]($backend), also used as the \"wire format\" when transmitting information about entities\r\n * between the backend and frontend.\r\n * EntityProps and all of its sub-types like [[ElementProps]] are \"plain old Javascript objects\" - that is, objects containing\r\n * no methods and no properties of `class` type.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface EntityProps {\r\n /** A non-existent property used to discriminate between [[EntityProps]] and [Entity]($backend).\r\n * @see [Entity.isInstanceOfEntity]($backend).\r\n */\r\n readonly isInstanceOfEntity?: never;\r\n /** The full name of the [ECClass]($docs/bis/guide/references/glossary/#ecclass) for this entity, in the form \"Schema:ClassName\" */\r\n classFullName: string;\r\n /** The Id of the entity. Must be present for SELECT, UPDATE, or DELETE, ignored for INSERT. */\r\n id?: Id64String;\r\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this Entity. */\r\n jsonProperties?: { [key: string]: any };\r\n}\r\n\r\n/** Specifies the source and target elements of a [[Relationship]] instance.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SourceAndTarget {\r\n sourceId: Id64String;\r\n targetId: Id64String;\r\n}\r\n\r\n/** Properties that are common to all types of link table ECRelationships\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RelationshipProps extends EntityProps, SourceAndTarget {\r\n}\r\n\r\n/** Parameters for performing a query on [Entity]($backend) classes.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface EntityQueryParams {\r\n /** The sql className, in the form \"Schema.ClassName\", of the class to search. */\r\n from?: string;\r\n /** Set to true to limit results to *not* include sub-classes of \"from\" class */\r\n only?: boolean;\r\n /** Optional \"WHERE\" clause to filter entities. Note: do *not* include the \"WHERE\" keyword. */\r\n where?: string;\r\n /** Optional \"ORDERBY\" clause to sort results. Note: do *not* include the \"ORDERBY\" keyword. */\r\n orderBy?: string;\r\n /** Optional \"LIMIT\" clause to limit the number of rows returned. */\r\n limit?: number;\r\n /** Optional \"OFFSET\" clause. Only valid if Limit is also present. */\r\n offset?: number;\r\n /** Bindings for parameterized values.\r\n * @see [[ECSqlStatement.bindValues]]\r\n */\r\n bindings?: any[] | object;\r\n}\r\n\r\n/** The primitive types of an Entity property.\r\n * @beta\r\n */\r\nexport enum PrimitiveTypeCode {\r\n Uninitialized = 0x00,\r\n Binary = 0x101,\r\n Boolean = 0x201,\r\n DateTime = 0x301,\r\n Double = 0x401,\r\n Integer = 0x501,\r\n Long = 0x601,\r\n Point2d = 0x701, // eslint-disable-line @typescript-eslint/no-shadow\r\n Point3d = 0x801, // eslint-disable-line @typescript-eslint/no-shadow\r\n String = 0x901,\r\n IGeometry = 0xa01, // Used for Bentley.Geometry.Common.IGeometry types\r\n}\r\n\r\n/** A callback function to process properties of an Entity\r\n * @beta\r\n */\r\nexport type PropertyCallback = (name: string, meta: PropertyMetaData) => void;\r\n\r\n/** A custom attribute instance\r\n * @beta\r\n */\r\nexport interface CustomAttribute {\r\n /** The class of the CustomAttribute */\r\n ecclass: string;\r\n /** An object whose properties correspond by name to the properties of this custom attribute instance. */\r\n properties: { [propName: string]: any };\r\n}\r\n\r\ntype FactoryFunc = (jsonObj: any) => any;\r\n\r\n/** @beta */\r\nexport interface PropertyMetaDataProps {\r\n primitiveType?: number;\r\n structName?: string;\r\n extendedType?: string;\r\n description?: string;\r\n displayLabel?: string;\r\n minimumValue?: any;\r\n maximumValue?: any;\r\n minimumLength?: number;\r\n maximumLength?: number;\r\n readOnly?: boolean;\r\n kindOfQuantity?: string;\r\n isCustomHandled?: boolean;\r\n isCustomHandledOrphan?: boolean;\r\n minOccurs?: number;\r\n maxOccurs?: number;\r\n direction?: string;\r\n relationshipClass?: string;\r\n customAttributes?: CustomAttribute[];\r\n}\r\n\r\n/** Metadata for a property.\r\n * @beta\r\n */\r\nexport class PropertyMetaData implements PropertyMetaDataProps {\r\n public primitiveType?: PrimitiveTypeCode;\r\n public structName?: string;\r\n public extendedType?: string;\r\n public description?: string;\r\n public displayLabel?: string;\r\n public minimumValue?: any;\r\n public maximumValue?: any;\r\n public minimumLength?: number;\r\n public maximumLength?: number;\r\n public readOnly?: boolean;\r\n public kindOfQuantity?: string;\r\n public isCustomHandled?: boolean;\r\n public isCustomHandledOrphan?: boolean;\r\n public minOccurs?: number;\r\n public maxOccurs?: number;\r\n public direction?: string;\r\n public relationshipClass?: string;\r\n public customAttributes?: CustomAttribute[];\r\n\r\n public constructor(jsonObj: PropertyMetaDataProps) {\r\n this.primitiveType = jsonObj.primitiveType;\r\n if (jsonObj.structName)\r\n this.structName = jsonObj.structName;\r\n this.extendedType = jsonObj.extendedType;\r\n this.description = jsonObj.description;\r\n this.displayLabel = jsonObj.displayLabel;\r\n if (undefined !== jsonObj.minimumValue)\r\n this.minimumValue = jsonObj.minimumValue;\r\n if (undefined !== jsonObj.maximumValue)\r\n this.maximumValue = jsonObj.maximumValue;\r\n if (undefined !== jsonObj.minimumLength)\r\n this.minimumLength = jsonObj.minimumLength;\r\n if (undefined !== jsonObj.maximumLength)\r\n this.maximumLength = jsonObj.maximumLength;\r\n this.readOnly = jsonObj.readOnly;\r\n this.kindOfQuantity = jsonObj.kindOfQuantity;\r\n this.isCustomHandled = jsonObj.isCustomHandled;\r\n if (undefined !== jsonObj.minOccurs)\r\n this.minOccurs = jsonObj.minOccurs;\r\n if (undefined !== jsonObj.maxOccurs)\r\n this.maxOccurs = jsonObj.maxOccurs;\r\n this.direction = jsonObj.direction;\r\n this.relationshipClass = jsonObj.relationshipClass;\r\n this.customAttributes = jsonObj.customAttributes;\r\n }\r\n\r\n /** Create a typed value, or array of values, from a factory and an input object */\r\n private createValueOrArray(func: FactoryFunc, jsonObj: any) {\r\n if (undefined === this.minOccurs)\r\n return func(jsonObj); // not an array\r\n\r\n const val: any = [];\r\n jsonObj.forEach((element: any) => val.push(func(element)));\r\n return val;\r\n }\r\n\r\n /** construct a single property from an input object according to this metadata */\r\n public createProperty(jsonObj: any): any {\r\n if (jsonObj === undefined)\r\n return undefined;\r\n\r\n if (undefined !== this.primitiveType) {\r\n switch (this.primitiveType) {\r\n case PrimitiveTypeCode.Boolean:\r\n case PrimitiveTypeCode.Double:\r\n case PrimitiveTypeCode.Integer:\r\n case PrimitiveTypeCode.String:\r\n return jsonObj; // this works even for arrays or strings that are JSON because the parsed JSON is already the right type\r\n\r\n case PrimitiveTypeCode.Point2d:\r\n return this.createValueOrArray((obj) => Point2d.fromJSON(obj), jsonObj);\r\n\r\n case PrimitiveTypeCode.Point3d:\r\n return this.createValueOrArray((obj) => Point3d.fromJSON(obj), jsonObj);\r\n }\r\n }\r\n if (this.isNavigation)\r\n return jsonObj.id !== undefined ? new RelatedElement(jsonObj) : Id64.fromJSON(jsonObj);\r\n\r\n return jsonObj;\r\n }\r\n\r\n /** Return `true` if this property is a NavigationProperty. */\r\n public get isNavigation(): boolean {\r\n return (this.direction !== undefined); // the presence of `direction` means it is a navigation property\r\n }\r\n}\r\n\r\n/** @beta */\r\nexport interface EntityMetaDataProps {\r\n classId: Id64String;\r\n ecclass: string;\r\n description?: string;\r\n modifier?: string;\r\n displayLabel?: string;\r\n /** The base classes from which this class derives. If more than one, the first is the super class and the others are [mixins]($docs/bis/ec/ec-mixin-class). */\r\n baseClasses: string[];\r\n /** The Custom Attributes for this class */\r\n customAttributes?: CustomAttribute[];\r\n /** An object whose properties correspond by name to the properties of this class. */\r\n properties: { [propName: string]: PropertyMetaData };\r\n}\r\n\r\n/** Metadata for an Entity.\r\n * @beta\r\n */\r\nexport class EntityMetaData implements EntityMetaDataProps {\r\n /** The Id of the class in the [[IModelDb]] from which the metadata was obtained. */\r\n public readonly classId: Id64String;\r\n /** The Entity name */\r\n public readonly ecclass: string;\r\n public readonly description?: string;\r\n public readonly modifier?: string;\r\n public readonly displayLabel?: string;\r\n /** The base class that this class is derives from. If more than one, the first is the actual base class and the others are mixins. */\r\n public readonly baseClasses: string[];\r\n /** The Custom Attributes for this class */\r\n public readonly customAttributes?: CustomAttribute[];\r\n /** An object whose properties correspond by name to the properties of this class. */\r\n public readonly properties: { [propName: string]: PropertyMetaData };\r\n\r\n public constructor(jsonObj: EntityMetaDataProps) {\r\n this.classId = jsonObj.classId;\r\n this.ecclass = jsonObj.ecclass;\r\n this.description = jsonObj.description;\r\n this.modifier = jsonObj.modifier;\r\n this.displayLabel = jsonObj.displayLabel;\r\n this.baseClasses = jsonObj.baseClasses;\r\n this.customAttributes = jsonObj.customAttributes;\r\n this.properties = {};\r\n\r\n for (const propName in jsonObj.properties) { // eslint-disable-line guard-for-in\r\n this.properties[propName] = new PropertyMetaData(jsonObj.properties[propName]);\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -24,7 +24,7 @@ var ConcreteEntityTypes;
|
|
|
24
24
|
ConcreteEntityTypes["Element"] = "e";
|
|
25
25
|
ConcreteEntityTypes["ElementAspect"] = "a";
|
|
26
26
|
ConcreteEntityTypes["Relationship"] = "r";
|
|
27
|
-
})(ConcreteEntityTypes
|
|
27
|
+
})(ConcreteEntityTypes || (exports.ConcreteEntityTypes = ConcreteEntityTypes = {}));
|
|
28
28
|
/**
|
|
29
29
|
* Adds some utilities to the [[ConcreteEntityTypes]] enum
|
|
30
30
|
* @alpha
|
|
@@ -43,7 +43,7 @@ var ConcreteEntityTypes;
|
|
|
43
43
|
return toBisCoreRootClassFullNameMap[type];
|
|
44
44
|
}
|
|
45
45
|
ConcreteEntityTypes.toBisCoreRootClassFullName = toBisCoreRootClassFullName;
|
|
46
|
-
})(ConcreteEntityTypes
|
|
46
|
+
})(ConcreteEntityTypes || (exports.ConcreteEntityTypes = ConcreteEntityTypes = {}));
|
|
47
47
|
/** A set of concrete entity ids, with additional functions to more literately add ids where you have the raw id and know what type it is
|
|
48
48
|
* @alpha
|
|
49
49
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityReference.js","sourceRoot":"","sources":["../../src/EntityReference.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH;;;;;;;;;GASG;AACH,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,kCAAW,CAAA;IACX,oCAAa,CAAA;IACb,0CAAmB,CAAA;IACnB,yCAAkB,CAAA;AACpB,CAAC,EALW,mBAAmB,
|
|
1
|
+
{"version":3,"file":"EntityReference.js","sourceRoot":"","sources":["../../src/EntityReference.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH;;;;;;;;;GASG;AACH,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,kCAAW,CAAA;IACX,oCAAa,CAAA;IACb,0CAAmB,CAAA;IACnB,yCAAkB,CAAA;AACpB,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B;AAED;;;GAGG;AACH,WAAiB,mBAAmB;IAClC,MAAM,6BAA6B,GAAG;QACpC,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,eAAe;QAC5C,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAE,iBAAiB;QAChD,CAAC,mBAAmB,CAAC,aAAa,CAAC,EAAE,uBAAuB;QAC5D,CAAC,mBAAmB,CAAC,YAAY,CAAC,EAAE,sBAAsB;KAClD,CAAC;IAEX;;OAEG;IACH,SAAgB,0BAA0B,CAAC,IAAyB;QAClE,OAAO,6BAA6B,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAFe,8CAA0B,6BAEzC,CAAA;AACH,CAAC,EAdgB,mBAAmB,mCAAnB,mBAAmB,QAcnC;AAUD;;GAEG;AACH,MAAa,kBAAmB,SAAQ,GAAoB;IACnD,UAAU,CAAC,EAAc,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAClD,QAAQ,CAAC,EAAc,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAChD,SAAS,CAAC,EAAc,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IACjD,eAAe,CAAC,EAAc,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;CAC/D;AALD,gDAKC","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 Schema\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\n\r\n/**\r\n * Types of concrete entities. Used for storing strings in JavaScript reference-equality containers which encode\r\n * low-level entity information.\r\n * @note the values of this enum are unstable, do not depend upon their values between versions of iTwin.js\r\n * (e.g. do not serialize them and load them in another version of iTwin.js and expect them to work)\r\n * CodeSpecs are excepted since their JavaScript representation does not derive from [Entity]($backend)\r\n * @note the string value of each variant is required/guaranteed to be 1 character\r\n * @see EntityReference\r\n * @alpha\r\n */\r\nexport enum ConcreteEntityTypes {\r\n Model = \"m\",\r\n Element = \"e\",\r\n ElementAspect = \"a\",\r\n Relationship = \"r\",\r\n}\r\n\r\n/**\r\n * Adds some utilities to the [[ConcreteEntityTypes]] enum\r\n * @alpha\r\n */\r\nexport namespace ConcreteEntityTypes {\r\n const toBisCoreRootClassFullNameMap = {\r\n [ConcreteEntityTypes.Model]: \"BisCore:Model\",\r\n [ConcreteEntityTypes.Element]: \"BisCore:Element\",\r\n [ConcreteEntityTypes.ElementAspect]: \"BisCore:ElementAspect\",\r\n [ConcreteEntityTypes.Relationship]: \"BisCore:Relationship\",\r\n } as const;\r\n\r\n /** used by the transformer to figure out where to check for the existence in a db of a concrete element id\r\n * @internal\r\n */\r\n export function toBisCoreRootClassFullName(type: ConcreteEntityTypes): string {\r\n return toBisCoreRootClassFullNameMap[type];\r\n }\r\n}\r\n\r\n/**\r\n * This id format can be used for storing a unique key for an entity in containers like `Map`.\r\n * Elements and non-element entities have different id sequences, they can collide with each other, but not within themselves.\r\n * @note for utilities that require runtime backend classes, see [EntityReferences]($backend)\r\n * @alpha\r\n */\r\nexport type EntityReference = `${ConcreteEntityTypes}${Id64String}`;\r\n\r\n/** A set of concrete entity ids, with additional functions to more literately add ids where you have the raw id and know what type it is\r\n * @alpha\r\n */\r\nexport class EntityReferenceSet extends Set<EntityReference> {\r\n public addElement(id: Id64String) { this.add(`e${id}`); }\r\n public addModel(id: Id64String) { this.add(`m${id}`); }\r\n public addAspect(id: Id64String) { this.add(`a${id}`); }\r\n public addRelationship(id: Id64String) { this.add(`r${id}`); }\r\n}\r\n\r\n/** @internal entity reference type information of a relationship */\r\nexport interface RelTypeInfo {\r\n source: ConcreteEntityTypes;\r\n target: ConcreteEntityTypes;\r\n}\r\n"]}
|
package/lib/cjs/Environment.js
CHANGED
|
@@ -73,7 +73,7 @@ class Environment {
|
|
|
73
73
|
return Environment.create({ ...this, ...changedProps });
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
+
exports.Environment = Environment;
|
|
76
77
|
/** Default settings without a ground plane, sky box, or atmosphere displayed. */
|
|
77
78
|
Environment.defaults = new Environment();
|
|
78
|
-
exports.Environment = Environment;
|
|
79
79
|
//# sourceMappingURL=Environment.js.map
|