@itwin/core-common 5.0.0-dev.7 → 5.0.0-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/AmbientOcclusion.js.map +1 -1
- package/lib/cjs/AnalysisStyle.js.map +1 -1
- package/lib/cjs/Atmosphere.js.map +1 -1
- package/lib/cjs/AuthorizationClient.js.map +1 -1
- package/lib/cjs/BackendTypes.js.map +1 -1
- package/lib/cjs/BackgroundMapProvider.js.map +1 -1
- package/lib/cjs/BackgroundMapSettings.js.map +1 -1
- package/lib/cjs/Base64EncodedString.js.map +1 -1
- package/lib/cjs/BlobReader.js.map +1 -1
- package/lib/cjs/BriefcaseTypes.js.map +1 -1
- package/lib/cjs/Camera.js.map +1 -1
- package/lib/cjs/ChangedElements.js.map +1 -1
- package/lib/cjs/ChangedEntities.js.map +1 -1
- package/lib/cjs/ChangesetProps.js.map +1 -1
- package/lib/cjs/ClipStyle.js.map +1 -1
- package/lib/cjs/Code.js.map +1 -1
- package/lib/cjs/ColorByName.js.map +1 -1
- package/lib/cjs/ColorDef.js.map +1 -1
- package/lib/cjs/CommonLoggerCategory.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/ContextRealityModel.js.map +1 -1
- package/lib/cjs/ContourDisplay.js.map +1 -1
- package/lib/cjs/DisplayStyleSettings.js.map +1 -1
- package/lib/cjs/ECSchemaProps.js.map +1 -1
- package/lib/cjs/ECSqlReader.js.map +1 -1
- package/lib/cjs/ECSqlTypes.js.map +1 -1
- package/lib/cjs/ElementMesh.js.map +1 -1
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
- package/lib/cjs/EntityProps.js.map +1 -1
- package/lib/cjs/EntityReference.js.map +1 -1
- package/lib/cjs/Environment.js.map +1 -1
- package/lib/cjs/FeatureIndex.js.map +1 -1
- package/lib/cjs/FeatureSymbology.js.map +1 -1
- package/lib/cjs/FeatureTable.js.map +1 -1
- package/lib/cjs/Fonts.d.ts +1 -1
- package/lib/cjs/Fonts.d.ts.map +1 -1
- package/lib/cjs/Fonts.js +2 -2
- package/lib/cjs/Fonts.js.map +1 -1
- package/lib/cjs/Frustum.js.map +1 -1
- package/lib/cjs/GenericInstanceFilter.js.map +1 -1
- package/lib/cjs/GeoCoordinateServices.js.map +1 -1
- package/lib/cjs/GeometryContainment.js.map +1 -1
- package/lib/cjs/GeometryParams.js.map +1 -1
- package/lib/cjs/GeometrySummary.js.map +1 -1
- package/lib/cjs/Gradient.js.map +1 -1
- package/lib/cjs/GraphicParams.js.map +1 -1
- package/lib/cjs/GroundPlane.js.map +1 -1
- package/lib/cjs/HSLColor.js.map +1 -1
- package/lib/cjs/HSVColor.js.map +1 -1
- package/lib/cjs/HiddenLine.js.map +1 -1
- package/lib/cjs/Hilite.js.map +1 -1
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/IModelError.js.map +1 -1
- package/lib/cjs/IModelVersion.js.map +1 -1
- package/lib/cjs/ITwinError.js.map +1 -1
- package/lib/cjs/Image.js.map +1 -1
- package/lib/cjs/IpcAppProps.js.map +1 -1
- package/lib/cjs/LightSettings.js.map +1 -1
- package/lib/cjs/LinePixels.js.map +1 -1
- package/lib/cjs/Localization.js.map +1 -1
- package/lib/cjs/MapImagerySettings.js.map +1 -1
- package/lib/cjs/MapLayerSettings.js.map +1 -1
- package/lib/cjs/MassProperties.js.map +1 -1
- package/lib/cjs/MaterialProps.js.map +1 -1
- package/lib/cjs/ModelClipGroup.js.map +1 -1
- package/lib/cjs/ModelGeometryChanges.js.map +1 -1
- package/lib/cjs/ModelProps.js.map +1 -1
- package/lib/cjs/NativeAppProps.js.map +1 -1
- package/lib/cjs/OctEncodedNormal.js.map +1 -1
- package/lib/cjs/PlanProjectionSettings.js.map +1 -1
- package/lib/cjs/PlanarClipMask.js.map +1 -1
- package/lib/cjs/QPoint.js.map +1 -1
- package/lib/cjs/RealityDataAccessProps.js.map +1 -1
- package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
- package/lib/cjs/Render.js.map +1 -1
- package/lib/cjs/RenderMaterial.js.map +1 -1
- package/lib/cjs/RenderTexture.js.map +1 -1
- package/lib/cjs/RgbColor.js.map +1 -1
- package/lib/cjs/RpcInterface.js.map +1 -1
- package/lib/cjs/RpcManager.js.map +1 -1
- package/lib/cjs/SessionProps.js.map +1 -1
- package/lib/cjs/SkyBox.js.map +1 -1
- package/lib/cjs/SolarCalculate.js.map +1 -1
- package/lib/cjs/SolarShadows.js.map +1 -1
- package/lib/cjs/SpatialClassification.js.map +1 -1
- package/lib/cjs/SubCategoryAppearance.js.map +1 -1
- package/lib/cjs/SubCategoryOverride.js.map +1 -1
- package/lib/cjs/TerrainSettings.js.map +1 -1
- package/lib/cjs/TextureMapping.js.map +1 -1
- package/lib/cjs/TextureProps.js.map +1 -1
- package/lib/cjs/ThematicDisplay.js.map +1 -1
- package/lib/cjs/Thumbnail.js.map +1 -1
- package/lib/cjs/TileProps.js.map +1 -1
- package/lib/cjs/Tween.js.map +1 -1
- package/lib/cjs/TxnAction.js.map +1 -1
- package/lib/cjs/ViewDetails.js.map +1 -1
- package/lib/cjs/ViewFlags.js.map +1 -1
- package/lib/cjs/ViewProps.js.map +1 -1
- package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
- package/lib/cjs/annotation/TextBlock.js.map +1 -1
- package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/cjs/annotation/TextStyle.js.map +1 -1
- package/lib/cjs/core-common.js.map +1 -1
- package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
- package/lib/cjs/domains/GenericElementProps.js.map +1 -1
- package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
- package/lib/cjs/geometry/AreaPattern.js.map +1 -1
- package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
- package/lib/cjs/geometry/Cartographic.js.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
- package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
- package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/cjs/geometry/GeometryStream.js.map +1 -1
- package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
- package/lib/cjs/geometry/LineStyle.js.map +1 -1
- package/lib/cjs/geometry/Placement.js.map +1 -1
- package/lib/cjs/geometry/Projection.js.map +1 -1
- package/lib/cjs/geometry/TextString.js.map +1 -1
- package/lib/cjs/internal/Snapping.js.map +1 -1
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/ipc/IpcSession.js.map +1 -1
- package/lib/cjs/ipc/IpcSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
- package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
- package/lib/cjs/tile/ElementGraphics.js.map +1 -1
- package/lib/cjs/tile/GltfTileIO.js.map +1 -1
- package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/IModelTileIO.js.map +1 -1
- package/lib/cjs/tile/PntsTileIO.js.map +1 -1
- package/lib/cjs/tile/TileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
- package/lib/esm/AmbientOcclusion.js.map +1 -1
- package/lib/esm/AnalysisStyle.js.map +1 -1
- package/lib/esm/Atmosphere.js.map +1 -1
- package/lib/esm/AuthorizationClient.js.map +1 -1
- package/lib/esm/BackendTypes.js.map +1 -1
- package/lib/esm/BackgroundMapProvider.js.map +1 -1
- package/lib/esm/BackgroundMapSettings.js.map +1 -1
- package/lib/esm/Base64EncodedString.js.map +1 -1
- package/lib/esm/BlobReader.js.map +1 -1
- package/lib/esm/BriefcaseTypes.js.map +1 -1
- package/lib/esm/Camera.js.map +1 -1
- package/lib/esm/ChangedElements.js.map +1 -1
- package/lib/esm/ChangedEntities.js.map +1 -1
- package/lib/esm/ChangesetProps.js.map +1 -1
- package/lib/esm/ClipStyle.js.map +1 -1
- package/lib/esm/Code.js.map +1 -1
- package/lib/esm/ColorByName.js.map +1 -1
- package/lib/esm/ColorDef.js.map +1 -1
- package/lib/esm/CommonLoggerCategory.js.map +1 -1
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/ContextRealityModel.js.map +1 -1
- package/lib/esm/ContourDisplay.js.map +1 -1
- package/lib/esm/DisplayStyleSettings.js.map +1 -1
- package/lib/esm/ECSchemaProps.js.map +1 -1
- package/lib/esm/ECSqlReader.js.map +1 -1
- package/lib/esm/ECSqlTypes.js.map +1 -1
- package/lib/esm/ElementMesh.js.map +1 -1
- package/lib/esm/ElementProps.js.map +1 -1
- package/lib/esm/EmphasizeElementsProps.js.map +1 -1
- package/lib/esm/EntityProps.js.map +1 -1
- package/lib/esm/EntityReference.js.map +1 -1
- package/lib/esm/Environment.js.map +1 -1
- package/lib/esm/FeatureIndex.js.map +1 -1
- package/lib/esm/FeatureSymbology.js.map +1 -1
- package/lib/esm/FeatureTable.js.map +1 -1
- package/lib/esm/Fonts.d.ts +1 -1
- package/lib/esm/Fonts.d.ts.map +1 -1
- package/lib/esm/Fonts.js +2 -2
- package/lib/esm/Fonts.js.map +1 -1
- package/lib/esm/Frustum.js.map +1 -1
- package/lib/esm/GenericInstanceFilter.js.map +1 -1
- package/lib/esm/GeoCoordinateServices.js.map +1 -1
- package/lib/esm/GeometryContainment.js.map +1 -1
- package/lib/esm/GeometryParams.js.map +1 -1
- package/lib/esm/GeometrySummary.js.map +1 -1
- package/lib/esm/Gradient.js.map +1 -1
- package/lib/esm/GraphicParams.js.map +1 -1
- package/lib/esm/GroundPlane.js.map +1 -1
- package/lib/esm/HSLColor.js.map +1 -1
- package/lib/esm/HSVColor.js.map +1 -1
- package/lib/esm/HiddenLine.js.map +1 -1
- package/lib/esm/Hilite.js.map +1 -1
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/IModelError.js.map +1 -1
- package/lib/esm/IModelVersion.js.map +1 -1
- package/lib/esm/ITwinError.js.map +1 -1
- package/lib/esm/Image.js.map +1 -1
- package/lib/esm/IpcAppProps.js.map +1 -1
- package/lib/esm/LightSettings.js.map +1 -1
- package/lib/esm/LinePixels.js.map +1 -1
- package/lib/esm/Localization.js.map +1 -1
- package/lib/esm/MapImagerySettings.js.map +1 -1
- package/lib/esm/MapLayerSettings.js.map +1 -1
- package/lib/esm/MassProperties.js.map +1 -1
- package/lib/esm/MaterialProps.js.map +1 -1
- package/lib/esm/ModelClipGroup.js.map +1 -1
- package/lib/esm/ModelGeometryChanges.js.map +1 -1
- package/lib/esm/ModelProps.js.map +1 -1
- package/lib/esm/NativeAppProps.js.map +1 -1
- package/lib/esm/OctEncodedNormal.js.map +1 -1
- package/lib/esm/PlanProjectionSettings.js.map +1 -1
- package/lib/esm/PlanarClipMask.js.map +1 -1
- package/lib/esm/QPoint.js.map +1 -1
- package/lib/esm/RealityDataAccessProps.js.map +1 -1
- package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
- package/lib/esm/Render.js.map +1 -1
- package/lib/esm/RenderMaterial.js.map +1 -1
- package/lib/esm/RenderTexture.js.map +1 -1
- package/lib/esm/RgbColor.js.map +1 -1
- package/lib/esm/RpcInterface.js.map +1 -1
- package/lib/esm/RpcManager.js.map +1 -1
- package/lib/esm/SessionProps.js.map +1 -1
- package/lib/esm/SkyBox.js.map +1 -1
- package/lib/esm/SolarCalculate.js.map +1 -1
- package/lib/esm/SolarShadows.js.map +1 -1
- package/lib/esm/SpatialClassification.js.map +1 -1
- package/lib/esm/SubCategoryAppearance.js.map +1 -1
- package/lib/esm/SubCategoryOverride.js.map +1 -1
- package/lib/esm/TerrainSettings.js.map +1 -1
- package/lib/esm/TextureMapping.js.map +1 -1
- package/lib/esm/TextureProps.js.map +1 -1
- package/lib/esm/ThematicDisplay.js.map +1 -1
- package/lib/esm/Thumbnail.js.map +1 -1
- package/lib/esm/TileProps.js.map +1 -1
- package/lib/esm/Tween.js.map +1 -1
- package/lib/esm/TxnAction.js.map +1 -1
- package/lib/esm/ViewDetails.js.map +1 -1
- package/lib/esm/ViewFlags.js.map +1 -1
- package/lib/esm/ViewProps.js.map +1 -1
- package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/esm/annotation/TextAnnotation.js.map +1 -1
- package/lib/esm/annotation/TextBlock.js.map +1 -1
- package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/esm/annotation/TextStyle.js.map +1 -1
- package/lib/esm/core-common.js.map +1 -1
- package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
- package/lib/esm/domains/GenericElementProps.js.map +1 -1
- package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
- package/lib/esm/geometry/AreaPattern.js.map +1 -1
- package/lib/esm/geometry/BoundingSphere.js.map +1 -1
- package/lib/esm/geometry/Cartographic.js.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/esm/geometry/ElementGeometry.js.map +1 -1
- package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
- package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
- package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/esm/geometry/GeometryStream.js.map +1 -1
- package/lib/esm/geometry/ImageGraphic.js.map +1 -1
- package/lib/esm/geometry/LineStyle.js.map +1 -1
- package/lib/esm/geometry/Placement.js.map +1 -1
- package/lib/esm/geometry/Projection.js.map +1 -1
- package/lib/esm/geometry/TextString.js.map +1 -1
- package/lib/esm/internal/Snapping.js.map +1 -1
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/ipc/IpcSession.js.map +1 -1
- package/lib/esm/ipc/IpcSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/esm/rpc/TestRpcManager.js.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
- package/lib/esm/rpc/core/RpcControl.js.map +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
- package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/esm/rpc/core/RpcPush.js.map +1 -1
- package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/esm/tile/B3dmTileIO.js.map +1 -1
- package/lib/esm/tile/CompositeTileIO.js.map +1 -1
- package/lib/esm/tile/ElementGraphics.js.map +1 -1
- package/lib/esm/tile/GltfTileIO.js.map +1 -1
- package/lib/esm/tile/I3dmTileIO.js.map +1 -1
- package/lib/esm/tile/IModelTileIO.js.map +1 -1
- package/lib/esm/tile/PntsTileIO.js.map +1 -1
- package/lib/esm/tile/TileIO.js.map +1 -1
- package/lib/esm/tile/TileMetadata.js.map +1 -1
- package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackgroundMapSettings.js","sourceRoot":"","sources":["../../src/BackgroundMapSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAuB,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAgB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAElE;;;;;GAKG;AACH,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,oCAAoC;IACpC,mDAAa,CAAA;IACb,8BAA8B;IAC9B,2CAAS,CAAA;AACX,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AAgED,SAAS,kBAAkB,CAAC,IAAgB;IAC1C,OAAO,SAAS,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC;AAC/D,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAsB;IACnD,IAAI,QAAQ,KAAK,OAAO,KAAK;QAC3B,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAEzC,OAAO,KAAK,CAA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AAS,CAAC,IAAI,CAAC;IACpG,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,YAAiC;QAC5C,IAAI,SAAS,KAAK,YAAY;YAC5B,OAAO,IAAI,CAAC;QAEd,MAAM,KAAK,GAAG;YACZ,UAAU,EAAE,YAAY,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU;YACtD,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,cAAc,EAAE,YAAY,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc;YAClE,SAAS,EAAE,YAAY,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS;YACnD,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,UAAU;YAC3D,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,eAAe,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE;YACjJ,cAAc,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE;YAC5I,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI;YACjC,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;SAC/C,CAAC;QAEF,OAAO,qBAAqB,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC;CACF","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 DisplayStyles\r\n */\r\n\r\nimport { BackgroundMapProvider, BackgroundMapType } from \"./BackgroundMapProvider\";\r\nimport { PlanarClipMaskProps, PlanarClipMaskSettings } from \"./PlanarClipMask\";\r\nimport { TerrainProps, TerrainSettings } from \"./TerrainSettings\";\r\n\r\n/** Describes the projection of the background map\r\n * @see [[BackgroundMapProps]]\r\n * @see [[DisplayStyleSettingsProps]]\r\n * @public\r\n * @extensions\r\n */\r\nexport enum GlobeMode {\r\n /** Display Earth as 3d ellipsoid */\r\n Ellipsoid = 0,\r\n /** Display Earth as plane. */\r\n Plane = 1,\r\n}\r\n\r\n/** In-memory JSON representation of a [[BackgroundMapSettings]].\r\n * @see [[PersistentBackgroundMapProps]] for the persistent JSON representation.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface BackgroundMapProps {\r\n /** The elevation of the map in meters relative the WGS84 ellipsoid. Default value: 0. */\r\n groundBias?: number;\r\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden.\r\n * Default value: false.\r\n */\r\n transparency?: number | false;\r\n /** If set to true, the map tiles will be rendered with depth, allowing them to obscure other geometry. Otherwise, they are always rendered behind all other geometry. Default value: false. */\r\n useDepthBuffer?: boolean;\r\n /** If true, terrain heights will be applied to the map; otherwise the map will be rendered as a plane. */\r\n applyTerrain?: boolean;\r\n /** Properties associated with terrain display. */\r\n terrainSettings?: TerrainProps;\r\n /** Globe Mode. Default value: GlobeMode.Ellipsoid */\r\n globeMode?: GlobeMode;\r\n /** If true, the map will be treated as non-locatable - i.e., tools will not interact with it. This is particularly useful when the map is transparent - it\r\n * allows the user to select elements that are behind the map.\r\n */\r\n nonLocatable?: boolean;\r\n /** A planar mask applied to the map geometry\r\n * @beta\r\n */\r\n planarClipMask?: PlanarClipMaskProps;\r\n\r\n /** See [[DeprecatedBackgroundMapProps.providerName]]. */\r\n providerName?: never;\r\n /** See [[DeprecatedBackgroundMapProps.providerData]]. */\r\n providerData?: never;\r\n}\r\n\r\n/** Properties of [[PersistentBackgroundMapProps]] that have been deprecated, but are retained for backwards compatibility.\r\n * These properties are omitted from [[BackgroundMapProps]] as they are no longer part of the API, but are included in\r\n * [[PersistentBackgroundMapProps]] because they remain part of the persistence format.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DeprecatedBackgroundMapProps {\r\n /** Identifies the source of the map tiles. Currently supported providers are \"BingProvider\" and \"MapBoxProvider\".\r\n * Default value: \"BingProvider\"\r\n * @deprecated in 3.x. use MapImageryProps.backgroundBase.\r\n */\r\n providerName?: string;\r\n /** Options for customizing the tiles supplied by the provider. If undefined, default values of all members are used.\r\n * @deprecated in 3.x. use MapImageryProps.backgroundBase\r\n */\r\n providerData?: {\r\n /** The type of map graphics to request. Default value: BackgroundMapType.Hybrid. */\r\n mapType?: BackgroundMapType;\r\n };\r\n}\r\n\r\n/** Persistent JSON representation of a [[BackgroundMapSettings]].\r\n * @public\r\n * @extensions\r\n */\r\nexport type PersistentBackgroundMapProps = Omit<BackgroundMapProps, keyof DeprecatedBackgroundMapProps> & DeprecatedBackgroundMapProps;\r\n\r\nfunction normalizeGlobeMode(mode?: GlobeMode): GlobeMode {\r\n return GlobeMode.Plane === mode ? mode : GlobeMode.Ellipsoid;\r\n}\r\n\r\nfunction normalizeTransparency(trans?: number | false): number | false {\r\n if (\"number\" === typeof trans)\r\n return Math.min(1, Math.max(0, trans));\r\n\r\n return false;\r\n}\r\n\r\n/** As part of a [[DisplayStyleSettings]], controls aspects of how the background map is displayed.\r\n * @see [[DisplayStyleSettings.backgroundMap]] to query or change these settings for a display style.\r\n * @see [[MapImagerySettings]] to control the type of imagery applied to the background map.\r\n * @public\r\n */\r\nexport class BackgroundMapSettings {\r\n /** Retained strictly for persistence. */\r\n private readonly _provider: BackgroundMapProvider;\r\n\r\n /** Elevation in meters, relative to WGS84 Ellipsoid.. */\r\n public readonly groundBias: number;\r\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden. Default value: false. */\r\n public readonly transparency: number | false;\r\n /** If set to true, the map tiles will be rendered with depth, allowing them to obscure other geometry. Otherwise, they are always rendered behind all other geometry. Default value: false. */\r\n public readonly useDepthBuffer: boolean;\r\n /** If true, terrain heights will be applied to the map; otherwise the map will be rendered as a plane. */\r\n public readonly applyTerrain: boolean;\r\n /** Settings associated with terrain display. */\r\n public readonly terrainSettings: TerrainSettings;\r\n /** Globe display mode. */\r\n public readonly globeMode: GlobeMode;\r\n /** Planar Mask - used to mask the background map to avoid overlapping with other geometry\r\n * @beta\r\n */\r\n public readonly planarClipMask: PlanarClipMaskSettings;\r\n private readonly _locatable: boolean;\r\n /** If false, the map will be treated as non-locatable - i.e., tools will not interact with it. This is particularly useful when the map is transparent - it\r\n * allows the user to select elements that are behind the map.\r\n */\r\n public get locatable(): boolean {\r\n // Handle legacy TerrainProps.nonLocatable:\r\n // - If TerrainProps.nonLocatable=true and terrain is on, terrain is not locatable.\r\n // - Otherwise, use BackgroundMapProps.nonLocatable.\r\n if (this.applyTerrain && this.terrainSettings.nonLocatable)\r\n return false;\r\n\r\n return this._locatable;\r\n }\r\n\r\n /** If transparency is overridden, the transparency to apply; otherwise, undefined. */\r\n public get transparencyOverride(): number | undefined { return false !== this.transparency ? this.transparency : undefined; }\r\n\r\n private constructor(props: BackgroundMapProps | PersistentBackgroundMapProps) {\r\n this.groundBias = props.groundBias ?? 0;\r\n this.transparency = normalizeTransparency(props.transparency);\r\n this.useDepthBuffer = props.useDepthBuffer ?? false;\r\n this.applyTerrain = props.applyTerrain ?? false;\r\n this.terrainSettings = TerrainSettings.fromJSON(props.terrainSettings);\r\n this.globeMode = normalizeGlobeMode(props.globeMode);\r\n this._locatable = true !== props.nonLocatable;\r\n this.planarClipMask = PlanarClipMaskSettings.fromJSON(props.planarClipMask);\r\n this._provider = BackgroundMapProvider.fromBackgroundMapProps(props);\r\n }\r\n\r\n /** Create settings from their persistent representation. In general, this method should only be used when reading the settings directly from\r\n * the iModel - otherwise, prefer [[fromJSON]].\r\n */\r\n public static fromPersistentJSON(json?: PersistentBackgroundMapProps): BackgroundMapSettings {\r\n return new this(json ?? {});\r\n }\r\n\r\n /** Construct from JSON, performing validation and applying default values for undefined fields.\r\n * @see [[fromPersistentJSON]] if you are reading the settings directly from the iModel.\r\n */\r\n public static fromJSON(json?: BackgroundMapProps): BackgroundMapSettings {\r\n return new BackgroundMapSettings(json ?? {});\r\n }\r\n\r\n /** Convert these settings to their in-memory JSON representation.\r\n * @see [[toPersistentJSON]] if you intend to write the JSON directly to an iModel.\r\n */\r\n public toJSON(): BackgroundMapProps {\r\n const props: BackgroundMapProps = {};\r\n if (0 !== this.groundBias)\r\n props.groundBias = this.groundBias;\r\n if (this.applyTerrain)\r\n props.applyTerrain = true;\r\n if (false !== this.transparency)\r\n props.transparency = this.transparency;\r\n if (GlobeMode.Ellipsoid !== this.globeMode)\r\n props.globeMode = this.globeMode;\r\n if (this.useDepthBuffer)\r\n props.useDepthBuffer = true;\r\n if (!this._locatable)\r\n props.nonLocatable = true;\r\n\r\n const terrainSettings = this.terrainSettings.toJSON();\r\n for (const prop of Object.values(terrainSettings)) {\r\n if (undefined !== prop) {\r\n props.terrainSettings = terrainSettings;\r\n break;\r\n }\r\n }\r\n\r\n if (this.planarClipMask.isValid)\r\n props.planarClipMask = this.planarClipMask.toJSON();\r\n\r\n return props;\r\n }\r\n\r\n /** Convert these settings to their persistent representation. In general, this method should only be used when writing the settings directly to\r\n * the iModel - otherwise, prefer [[toJSON]].\r\n */\r\n public toPersistentJSON(): PersistentBackgroundMapProps {\r\n const props = this.toJSON() as PersistentBackgroundMapProps;\r\n\r\n // Preserve deprecated imagery provider properties.\r\n if (\"BingProvider\" !== this._provider.name)\r\n props.providerName = this._provider.name; // eslint-disable-line @typescript-eslint/no-deprecated\r\n if (BackgroundMapType.Hybrid !== this._provider.type)\r\n props.providerData = { mapType: this._provider.type }; // eslint-disable-line @typescript-eslint/no-deprecated\r\n\r\n return props;\r\n }\r\n\r\n /** Returns true if these settings are equivalent to the supplied JSON settings. */\r\n public equalsJSON(json?: BackgroundMapProps): boolean {\r\n return this.equals(BackgroundMapSettings.fromJSON(json));\r\n }\r\n\r\n /** Returns true if the persistent representation of these settings is equivalent to `json`. */\r\n public equalsPersistentJSON(json?: PersistentBackgroundMapProps): boolean {\r\n return this.equals(BackgroundMapSettings.fromPersistentJSON(json));\r\n }\r\n\r\n /** Returns true if these settings are equivalent to `other`. */\r\n public equals(other: BackgroundMapSettings): boolean {\r\n return this.groundBias === other.groundBias && this.useDepthBuffer === other.useDepthBuffer && this.transparency === other.transparency\r\n && this.globeMode === other.globeMode && this._locatable === other._locatable && this.applyTerrain === other.applyTerrain\r\n && this.terrainSettings.equals(other.terrainSettings) && this.planarClipMask.equals(other.planarClipMask)\r\n && this._provider.name === other._provider.name && this._provider.type === other._provider.type;\r\n }\r\n\r\n /** Create a copy of this BackgroundMapSettings, optionally modifying some of its properties.\r\n * @param changedProps JSON representation of the properties to change.\r\n * @returns A BackgroundMapSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\r\n */\r\n public clone(changedProps?: BackgroundMapProps): BackgroundMapSettings {\r\n if (undefined === changedProps)\r\n return this;\r\n\r\n const props = {\r\n groundBias: changedProps.groundBias ?? this.groundBias,\r\n transparency: changedProps.transparency ?? this.transparency,\r\n useDepthBuffer: changedProps.useDepthBuffer ?? this.useDepthBuffer,\r\n globeMode: changedProps.globeMode ?? this.globeMode,\r\n nonLocatable: changedProps.nonLocatable ?? !this._locatable,\r\n applyTerrain: changedProps.applyTerrain ?? this.applyTerrain,\r\n terrainSettings: changedProps.terrainSettings ? this.terrainSettings.clone(changedProps.terrainSettings).toJSON() : this.terrainSettings.toJSON(),\r\n planarClipMask: changedProps.planarClipMask ? this.planarClipMask.clone(changedProps.planarClipMask).toJSON() : this.planarClipMask.toJSON(),\r\n providerName: this._provider.name,\r\n providerData: { mapType: this._provider.type },\r\n };\r\n\r\n return BackgroundMapSettings.fromPersistentJSON(props);\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"BackgroundMapSettings.js","sourceRoot":"","sources":["../../src/BackgroundMapSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAuB,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAgB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAElE;;;;;GAKG;AACH,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,oCAAoC;IACpC,mDAAa,CAAA;IACb,8BAA8B;IAC9B,2CAAS,CAAA;AACX,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AAgED,SAAS,kBAAkB,CAAC,IAAgB;IAC1C,OAAO,SAAS,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC;AAC/D,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAsB;IACnD,IAAI,QAAQ,KAAK,OAAO,KAAK;QAC3B,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAEzC,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,MAAM,OAAO,qBAAqB;IAqBhC;;OAEG;IACH,IAAW,SAAS;QAClB,2CAA2C;QAC3C,mFAAmF;QACnF,oDAAoD;QACpD,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,eAAe,CAAC,YAAY;YACxD,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,sFAAsF;IACtF,IAAW,oBAAoB,KAAyB,OAAO,KAAK,K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CAAC,cAAc;YAClE,SAAS,EAAE,YAAY,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS;YACnD,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,UAAU;YAC3D,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,eAAe,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE;YACjJ,cAAc,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE;YAC5I,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI;YACjC,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;SAC/C,CAAC;QAEF,OAAO,qBAAqB,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module DisplayStyles\n */\n\nimport { BackgroundMapProvider, BackgroundMapType } from \"./BackgroundMapProvider\";\nimport { PlanarClipMaskProps, PlanarClipMaskSettings } from \"./PlanarClipMask\";\nimport { TerrainProps, TerrainSettings } from \"./TerrainSettings\";\n\n/** Describes the projection of the background map\n * @see [[BackgroundMapProps]]\n * @see [[DisplayStyleSettingsProps]]\n * @public\n * @extensions\n */\nexport enum GlobeMode {\n /** Display Earth as 3d ellipsoid */\n Ellipsoid = 0,\n /** Display Earth as plane. */\n Plane = 1,\n}\n\n/** In-memory JSON representation of a [[BackgroundMapSettings]].\n * @see [[PersistentBackgroundMapProps]] for the persistent JSON representation.\n * @public\n * @extensions\n */\nexport interface BackgroundMapProps {\n /** The elevation of the map in meters relative the WGS84 ellipsoid. Default value: 0. */\n groundBias?: number;\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden.\n * Default value: false.\n */\n transparency?: number | false;\n /** If set to true, the map tiles will be rendered with depth, allowing them to obscure other geometry. Otherwise, they are always rendered behind all other geometry. Default value: false. */\n useDepthBuffer?: boolean;\n /** If true, terrain heights will be applied to the map; otherwise the map will be rendered as a plane. */\n applyTerrain?: boolean;\n /** Properties associated with terrain display. */\n terrainSettings?: TerrainProps;\n /** Globe Mode. Default value: GlobeMode.Ellipsoid */\n globeMode?: GlobeMode;\n /** If true, the map will be treated as non-locatable - i.e., tools will not interact with it. This is particularly useful when the map is transparent - it\n * allows the user to select elements that are behind the map.\n */\n nonLocatable?: boolean;\n /** A planar mask applied to the map geometry\n * @beta\n */\n planarClipMask?: PlanarClipMaskProps;\n\n /** See [[DeprecatedBackgroundMapProps.providerName]]. */\n providerName?: never;\n /** See [[DeprecatedBackgroundMapProps.providerData]]. */\n providerData?: never;\n}\n\n/** Properties of [[PersistentBackgroundMapProps]] that have been deprecated, but are retained for backwards compatibility.\n * These properties are omitted from [[BackgroundMapProps]] as they are no longer part of the API, but are included in\n * [[PersistentBackgroundMapProps]] because they remain part of the persistence format.\n * @public\n * @extensions\n */\nexport interface DeprecatedBackgroundMapProps {\n /** Identifies the source of the map tiles. Currently supported providers are \"BingProvider\" and \"MapBoxProvider\".\n * Default value: \"BingProvider\"\n * @deprecated in 3.x. use MapImageryProps.backgroundBase.\n */\n providerName?: string;\n /** Options for customizing the tiles supplied by the provider. If undefined, default values of all members are used.\n * @deprecated in 3.x. use MapImageryProps.backgroundBase\n */\n providerData?: {\n /** The type of map graphics to request. Default value: BackgroundMapType.Hybrid. */\n mapType?: BackgroundMapType;\n };\n}\n\n/** Persistent JSON representation of a [[BackgroundMapSettings]].\n * @public\n * @extensions\n */\nexport type PersistentBackgroundMapProps = Omit<BackgroundMapProps, keyof DeprecatedBackgroundMapProps> & DeprecatedBackgroundMapProps;\n\nfunction normalizeGlobeMode(mode?: GlobeMode): GlobeMode {\n return GlobeMode.Plane === mode ? mode : GlobeMode.Ellipsoid;\n}\n\nfunction normalizeTransparency(trans?: number | false): number | false {\n if (\"number\" === typeof trans)\n return Math.min(1, Math.max(0, trans));\n\n return false;\n}\n\n/** As part of a [[DisplayStyleSettings]], controls aspects of how the background map is displayed.\n * @see [[DisplayStyleSettings.backgroundMap]] to query or change these settings for a display style.\n * @see [[MapImagerySettings]] to control the type of imagery applied to the background map.\n * @public\n */\nexport class BackgroundMapSettings {\n /** Retained strictly for persistence. */\n private readonly _provider: BackgroundMapProvider;\n\n /** Elevation in meters, relative to WGS84 Ellipsoid.. */\n public readonly groundBias: number;\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden. Default value: false. */\n public readonly transparency: number | false;\n /** If set to true, the map tiles will be rendered with depth, allowing them to obscure other geometry. Otherwise, they are always rendered behind all other geometry. Default value: false. */\n public readonly useDepthBuffer: boolean;\n /** If true, terrain heights will be applied to the map; otherwise the map will be rendered as a plane. */\n public readonly applyTerrain: boolean;\n /** Settings associated with terrain display. */\n public readonly terrainSettings: TerrainSettings;\n /** Globe display mode. */\n public readonly globeMode: GlobeMode;\n /** Planar Mask - used to mask the background map to avoid overlapping with other geometry\n * @beta\n */\n public readonly planarClipMask: PlanarClipMaskSettings;\n private readonly _locatable: boolean;\n /** If false, the map will be treated as non-locatable - i.e., tools will not interact with it. This is particularly useful when the map is transparent - it\n * allows the user to select elements that are behind the map.\n */\n public get locatable(): boolean {\n // Handle legacy TerrainProps.nonLocatable:\n // - If TerrainProps.nonLocatable=true and terrain is on, terrain is not locatable.\n // - Otherwise, use BackgroundMapProps.nonLocatable.\n if (this.applyTerrain && this.terrainSettings.nonLocatable)\n return false;\n\n return this._locatable;\n }\n\n /** If transparency is overridden, the transparency to apply; otherwise, undefined. */\n public get transparencyOverride(): number | undefined { return false !== this.transparency ? this.transparency : undefined; }\n\n private constructor(props: BackgroundMapProps | PersistentBackgroundMapProps) {\n this.groundBias = props.groundBias ?? 0;\n this.transparency = normalizeTransparency(props.transparency);\n this.useDepthBuffer = props.useDepthBuffer ?? false;\n this.applyTerrain = props.applyTerrain ?? false;\n this.terrainSettings = TerrainSettings.fromJSON(props.terrainSettings);\n this.globeMode = normalizeGlobeMode(props.globeMode);\n this._locatable = true !== props.nonLocatable;\n this.planarClipMask = PlanarClipMaskSettings.fromJSON(props.planarClipMask);\n this._provider = BackgroundMapProvider.fromBackgroundMapProps(props);\n }\n\n /** Create settings from their persistent representation. In general, this method should only be used when reading the settings directly from\n * the iModel - otherwise, prefer [[fromJSON]].\n */\n public static fromPersistentJSON(json?: PersistentBackgroundMapProps): BackgroundMapSettings {\n return new this(json ?? {});\n }\n\n /** Construct from JSON, performing validation and applying default values for undefined fields.\n * @see [[fromPersistentJSON]] if you are reading the settings directly from the iModel.\n */\n public static fromJSON(json?: BackgroundMapProps): BackgroundMapSettings {\n return new BackgroundMapSettings(json ?? {});\n }\n\n /** Convert these settings to their in-memory JSON representation.\n * @see [[toPersistentJSON]] if you intend to write the JSON directly to an iModel.\n */\n public toJSON(): BackgroundMapProps {\n const props: BackgroundMapProps = {};\n if (0 !== this.groundBias)\n props.groundBias = this.groundBias;\n if (this.applyTerrain)\n props.applyTerrain = true;\n if (false !== this.transparency)\n props.transparency = this.transparency;\n if (GlobeMode.Ellipsoid !== this.globeMode)\n props.globeMode = this.globeMode;\n if (this.useDepthBuffer)\n props.useDepthBuffer = true;\n if (!this._locatable)\n props.nonLocatable = true;\n\n const terrainSettings = this.terrainSettings.toJSON();\n for (const prop of Object.values(terrainSettings)) {\n if (undefined !== prop) {\n props.terrainSettings = terrainSettings;\n break;\n }\n }\n\n if (this.planarClipMask.isValid)\n props.planarClipMask = this.planarClipMask.toJSON();\n\n return props;\n }\n\n /** Convert these settings to their persistent representation. In general, this method should only be used when writing the settings directly to\n * the iModel - otherwise, prefer [[toJSON]].\n */\n public toPersistentJSON(): PersistentBackgroundMapProps {\n const props = this.toJSON() as PersistentBackgroundMapProps;\n\n // Preserve deprecated imagery provider properties.\n if (\"BingProvider\" !== this._provider.name)\n props.providerName = this._provider.name; // eslint-disable-line @typescript-eslint/no-deprecated\n if (BackgroundMapType.Hybrid !== this._provider.type)\n props.providerData = { mapType: this._provider.type }; // eslint-disable-line @typescript-eslint/no-deprecated\n\n return props;\n }\n\n /** Returns true if these settings are equivalent to the supplied JSON settings. */\n public equalsJSON(json?: BackgroundMapProps): boolean {\n return this.equals(BackgroundMapSettings.fromJSON(json));\n }\n\n /** Returns true if the persistent representation of these settings is equivalent to `json`. */\n public equalsPersistentJSON(json?: PersistentBackgroundMapProps): boolean {\n return this.equals(BackgroundMapSettings.fromPersistentJSON(json));\n }\n\n /** Returns true if these settings are equivalent to `other`. */\n public equals(other: BackgroundMapSettings): boolean {\n return this.groundBias === other.groundBias && this.useDepthBuffer === other.useDepthBuffer && this.transparency === other.transparency\n && this.globeMode === other.globeMode && this._locatable === other._locatable && this.applyTerrain === other.applyTerrain\n && this.terrainSettings.equals(other.terrainSettings) && this.planarClipMask.equals(other.planarClipMask)\n && this._provider.name === other._provider.name && this._provider.type === other._provider.type;\n }\n\n /** Create a copy of this BackgroundMapSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A BackgroundMapSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps?: BackgroundMapProps): BackgroundMapSettings {\n if (undefined === changedProps)\n return this;\n\n const props = {\n groundBias: changedProps.groundBias ?? this.groundBias,\n transparency: changedProps.transparency ?? this.transparency,\n useDepthBuffer: changedProps.useDepthBuffer ?? this.useDepthBuffer,\n globeMode: changedProps.globeMode ?? this.globeMode,\n nonLocatable: changedProps.nonLocatable ?? !this._locatable,\n applyTerrain: changedProps.applyTerrain ?? this.applyTerrain,\n terrainSettings: changedProps.terrainSettings ? this.terrainSettings.clone(changedProps.terrainSettings).toJSON() : this.terrainSettings.toJSON(),\n planarClipMask: changedProps.planarClipMask ? this.planarClipMask.clone(changedProps.planarClipMask).toJSON() : this.planarClipMask.toJSON(),\n providerName: this._provider.name,\n providerData: { mapType: this._provider.type },\n };\n\n return BackgroundMapSettings.fromPersistentJSON(props);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Base64EncodedString.js","sourceRoot":"","sources":["../../src/Base64EncodedString.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AASnC;;GAEG;AACH,MAAM,KAAW,mBAAmB,CAsDnC;AAtDD,WAAiB,mBAAmB;IAClC,4EAA4E;IAC/D,0BAAM,GAAG,kBAAkB,CAAC;IAEzC,2DAA2D;IAC3D,SAAgB,cAAc,CAAC,KAAiB;QAC9C,OAAO,GAAG,oBAAA,MAAM,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;IACpD,CAAC;IAFe,kCAAc,iBAE7B,CAAA;IAED,2DAA2D;IAC3D,SAAgB,YAAY,CAAC,MAA2B;QACtD,OAAO,MAAM,CAAC,YAAY,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;IAClD,CAAC;IAFe,gCAAY,eAE3B,CAAA;IAED,+HAA+H;IAC/H,SAAgB,SAAS,CAAC,GAAW;QACnC,OAAO,GAAG,CAAC,UAAU,CAAC,oBAAA,MAAM,CAAC,CAAC;IAChC,CAAC;IAFe,6BAAS,YAExB,CAAA;IAED,6FAA6F;IAC7F,SAAgB,YAAY,CAAC,MAAc;QACzC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,oBAAA,MAAM,GAAG,MAAM,EAAE,CAAC;IAC3D,CAAC;IAFe,gCAAY,eAE3B,CAAA;IAED,4EAA4E;IAC5E,SAAgB,WAAW,CAAC,MAA2B;QACrD,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,oBAAA,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACtE,CAAC;IAFe,+BAAW,cAE1B,CAAA;IAED,uGAAuG;IAC1F,2BAAO,GAAG,CAAC,KAAa,EAAE,KAAU,EAAO,EAAE;QACxD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,KAAK,CAAC;YAC/C,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;QAE9B,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAEF,4GAA4G;IAC/F,4BAAQ,GAAG,CAAC,KAAa,EAAE,KAAU,EAAO,EAAE;QACzD,IAAI,KAAK,IAAI,KAAK,CAAC,WAAW,KAAK,UAAU;YAC3C,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;QAEhC,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAEF,iDAAiD;IACjD,SAAgB,MAAM,CAAC,GAAW,EAAE,OAAiB;QACnD,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;IAFe,0BAAM,SAErB,CAAA;IAED,iDAAiD;IACjD,SAAgB,MAAM,CAAC,GAAW;QAChC,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IAFe,0BAAM,SAErB,CAAA;AACH,CAAC,EAtDgB,mBAAmB,KAAnB,mBAAmB,QAsDnC","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"Base64EncodedString.js","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,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,KAAK,CAAC;YAC/C,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;QAE9B,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAEF,4GAA4G;IAC/F,4BAAQ,GAAG,CAAC,KAAa,EAAE,KAAU,EAAO,EAAE;QACzD,IAAI,KAAK,IAAI,KAAK,CAAC,WAAW,KAAK,UAAU;YAC3C,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;QAEhC,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAEF,iDAAiD;IACjD,SAAgB,MAAM,CAAC,GAAW,EAAE,OAAiB;QACnD,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;IAFe,0BAAM,SAErB,CAAA;IAED,iDAAiD;IACjD,SAAgB,MAAM,CAAC,GAAW;QAChC,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IAFe,0BAAM,SAErB,CAAA;AACH,CAAC,EAtDgB,mBAAmB,KAAnB,mBAAmB,QAsDnC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Entities\n */\n\nimport { Base64 } from \"js-base64\";\n\n/** Represents an array of bytes encoded in base-64 with a prefix indicating the encoding, as required when converting EC properties of `binary` type to and from JSON.\n * @see [[TextureProps.data]] and [[BRepEntity.DataProps.data]] for examples of properties of this type.\n * @public\n * @extensions\n */\nexport type Base64EncodedString = string;\n\n/** Represents an array of bytes encoded in base-64 with a prefix indicating the encoding, as persisted in an [ECDb]($backend) for properties of `binary` type.\n * @public\n */\nexport namespace Base64EncodedString { // eslint-disable-line @typescript-eslint/no-redeclare\n /** The prefix prepended to the string identifying it as base-64-encoded. */\n export const prefix = \"encoding=base64;\";\n\n /** Encode an array of bytes into a Base64EncodedString. */\n export function fromUint8Array(bytes: Uint8Array): Base64EncodedString {\n return `${prefix}${Base64.fromUint8Array(bytes)}`;\n }\n\n /** Decode a Base64EncodedString into an array of bytes. */\n export function toUint8Array(base64: Base64EncodedString): Uint8Array {\n return Base64.toUint8Array(stripPrefix(base64));\n }\n\n /** Returns true if the input starts with [[Base64EncodedString.prefix]] indicating it is a well-formed Base64EncodedString. */\n export function hasPrefix(str: string): boolean {\n return str.startsWith(prefix);\n }\n\n /** Ensure that the base-64-encoded string starts with the [[Base64EncodedString.prefix]]. */\n export function ensurePrefix(base64: string): Base64EncodedString {\n return hasPrefix(base64) ? base64 : `${prefix}${base64}`;\n }\n\n /** Remove the [[Base64EncodedString.prefix]] from the string if present. */\n export function stripPrefix(base64: Base64EncodedString): string {\n return hasPrefix(base64) ? base64.substring(prefix.length) : base64;\n }\n\n /** A function suitable for use with `JSON.parse` to revive a Base64EncodedString into a Uint8Array. */\n export const reviver = (_name: string, value: any): any => {\n if (typeof value === \"string\" && hasPrefix(value))\n value = toUint8Array(value);\n\n return value;\n };\n\n /** A function suitable for use with `JSON.stringify` to serialize a Uint8Array as a Base64EncodedString. */\n export const replacer = (_name: string, value: any): any => {\n if (value && value.constructor === Uint8Array)\n value = fromUint8Array(value);\n\n return value;\n };\n\n /* Encode a string into a Base64EncodedString. */\n export function encode(src: string, urlSafe?: boolean): Base64EncodedString {\n return Base64.encode(src, urlSafe);\n }\n\n /* Decode a Base64EncodedString into a string. */\n export function decode(src: string): Base64EncodedString {\n return Base64.decode(src);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlobReader.js","sourceRoot":"","sources":["../../src/BlobReader.ts"],"names":[],"mappings":"AAQA,OAAO,EACQ,kBAAkB,EAA4C,YAAY,EAAqB,aAAa,GAC1H,MAAM,mBAAmB,CAAC;AAE3B,YAAY;AACZ,MAAM,OAAO,WAAW;IAAxB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C9B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,WAAW,CAAC;QACxC,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACM,KAAK,CAAC,SAAS;QACpB,OAAO,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;IAChC,CAAC;IACD,IAAW,OAAO;QAChB,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;IACD,IAAW,MAAM,KAAkB,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;CAC1D","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"BlobReader.js","sourceRoot":"","sources":["../../src/BlobReader.ts"],"names":[],"mappings":"AAQA,OAAO,EACQ,kBAAkB,EAA4C,YAAY,EAAqB,aAAa,GAC1H,MAAM,mBAAmB,CAAC;AAE3B,YAAY;AACZ,MAAM,OAAO,WAAW;IAAxB;QACU,YAAO,GAAiB,EAAE,CAAC;IAmBrC,CAAC;IAlBQ,MAAM,CAAC,KAAiB;QAC7B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IACM,EAAE,CAAC,GAAW,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACpD,I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AAO,IAAI,CAAC;IACd,CAAC;IACM,KAAK,CAAC,SAAS;QACpB,OAAO,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;IAChC,CAAC;IACD,IAAW,OAAO;QAChB,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;IACD,IAAW,MAAM,KAAkB,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;CAC1D","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module iModels\n */\nimport { Id64String } from \"@itwin/core-bentley\";\nimport {\n BlobOptions, BlobOptionsBuilder, BlobRange, DbBlobRequest, DbBlobResponse, DbQueryError, DbRequestExecutor, DbRequestKind,\n} from \"./ConcurrentQuery\";\n\n/** @beta */\nexport class Uint8Chunks implements Iterable<Uint8Array> {\n private _chunks: Uint8Array[] = [];\n public append(chunk: Uint8Array) {\n this._chunks.push(chunk);\n }\n public at(idx: number) { return this._chunks[idx]; }\n public get length() { return this._chunks.length; }\n public [Symbol.iterator](): Iterator<Uint8Array, any, undefined> {\n return (this._chunks as any)[Symbol.iterator];\n }\n public combine(): Uint8Array {\n const totalChunkLength = this._chunks.reduce((acc, v) => acc + v.length, 0);\n const combineChunk = new Uint8Array(totalChunkLength);\n let offset = 0;\n for (const array of this._chunks) {\n combineChunk.set(array, offset);\n offset += array.length;\n }\n return combineChunk;\n }\n}\n/** @beta */\nexport class BlobReader {\n private _chunks = new Uint8Chunks();\n private _lengthToRead: number = -1;\n private _options = new BlobOptionsBuilder().getOptions();\n public constructor(private _executor: DbRequestExecutor<DbBlobRequest, DbBlobResponse>,\n public readonly className: string,\n public readonly accessString: string,\n public readonly instanceId: Id64String,\n options?: BlobOptions) {\n this.reset(options);\n }\n public reset(options?: BlobOptions) {\n if (options) {\n this._options = options;\n }\n this._chunks = new Uint8Chunks();\n this._lengthToRead = this.range.count!;\n }\n public get range(): BlobRange { return this._options.range!; }\n public async step(): Promise<boolean> {\n if (this._lengthToRead === this._chunks.length) {\n return false;\n }\n const request: DbBlobRequest = {\n kind: DbRequestKind.BlobIO,\n className: this.className,\n accessString: this.accessString,\n instanceId: this.instanceId,\n ...this._options,\n };\n request.range = {offset: this._chunks.length, count: this.range ? this._lengthToRead - this._chunks.length : 0};\n const resp = await this._executor.execute(request);\n DbQueryError.throwIfError(resp, request);\n\n if (this._lengthToRead === -1) {\n this._lengthToRead = resp.rawBlobSize;\n }\n if (resp.data && resp.data.length > 0) {\n this._chunks.append(resp.data);\n }\n return true;\n }\n public async readToEnd(): Promise<Uint8Array> {\n while (await this.step()) { }\n return this._chunks.combine();\n }\n public get current(): Uint8Array {\n if (this._chunks.length === 0) {\n throw new Error(\"there is no current buffer\");\n }\n return this._chunks.at(this._chunks.length);\n }\n public get chunks(): Uint8Chunks { return this._chunks; }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BriefcaseTypes.js","sourceRoot":"","sources":["../../src/BriefcaseTypes.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAaH;;;GAGG;AACH,MAAM,CAAN,IAAY,gBAyBX;AAzBD,WAAY,gBAAgB;IAC1B,+CAA+C;IAC/C,sEAAoB,CAAA;IAEpB,gDAAgD;IAChD,4DAAa,CAAA;IAEb,gFAAgF;IAChF,mEAAc,CAAA;IAEd,+EAA+E;IAC/E,wEAAqC,CAAA;IAErC;;;;;;;;;;OAUG;IACH,mEAAc,CAAA;AAChB,CAAC,EAzBW,gBAAgB,KAAhB,gBAAgB,QAyB3B;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,mIAAmI;IACnI,uDAAgB,CAAA;IAChB,0FAA0F;IAC1F,qDAAe,CAAA;IACf,qJAAqJ;IACrJ,+CAAY,CAAA;AACd,CAAC,EAPW,QAAQ,KAAR,QAAQ,QAOnB;AAwID;;GAEG;AACH,MAAM,CAAN,IAAY,aAYX;AAZD,WAAY,aAAa;IACvB,qJAAqJ;IACrJ,mFAAyB,CAAA;IAEzB,iKAAiK;IACjK,yFAA4B,CAAA;IAE5B,sMAAsM;IACtM,uDAAW,CAAA;IAEX,qFAAqF;IACrF,2DAAa,CAAA;AACf,CAAC,EAZW,aAAa,KAAb,aAAa,QAYxB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,0GAA0G;IAC1G,mDAAQ,CAAA;IAER,qDAAqD;IACrD,yDAAW,CAAA;AACb,CAAC,EANW,cAAc,KAAd,cAAc,QAMzB;AAgBD;;;;GAIG;AACH,MAAM,CAAN,IAAY,WAkBX;AAlBD,WAAY,WAAW;IACrB,sIAAsI;IACtI,qDAAQ,CAAA;IAER;;;OAGG;IACH,mEAAe,CAAA;IAEf,4IAA4I;IAC5I,yEAAkB,CAAA;IAElB,oIAAoI;IACpI,iDAAM,CAAA;IAEN,4FAA4F;IAC5F,iDAAM,CAAA;AACR,CAAC,EAlBW,WAAW,KAAX,WAAW,QAkBtB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\nimport { GuidString } from \"@itwin/core-bentley\";\r\nimport { ChangesetIdWithIndex, ChangesetIndexOrId, LocalFileName } from \"./ChangesetProps\";\r\nimport { IModelEncryptionProps, OpenDbKey } from \"./IModel\";\r\nimport { IModelVersionProps } from \"./IModelVersion\";\r\n\r\n/** The Id assigned to a briefcase by iModelHub, or [[BriefcaseIdValue.Unassigned]] .\r\n * @public\r\n * @extensions\r\n */\r\nexport type BriefcaseId = number;\r\n\r\n/** Values of [[BriefcaseId]] that have special meaning.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum BriefcaseIdValue {\r\n /** Indicates an invalid/illegal BriefcaseId */\r\n Illegal = 0xffffffff,\r\n\r\n /** BriefcaseIds must be less than this value */\r\n Max = 1 << 24,\r\n\r\n /** All valid iModelHub issued BriefcaseIds will be equal or higher than this */\r\n FirstValid = 2,\r\n\r\n /** All valid iModelHub issued BriefcaseIds will be equal or lower than this */\r\n LastValid = BriefcaseIdValue.Max - 11,\r\n\r\n /**\r\n * The briefcase has not been assigned a unique Id by iModelHub. Only briefcases that have been assigned a unique BriefcaseId may create changesets,\r\n * because BriefcaseId is used to create unique ElementIds for new elements.\r\n *\r\n * The `Unassigned` briefcaseId is used for several purposes:\r\n * - **Snapshots**. Snapshot files are immutable copies of an iModel for archival or data exchange purposes. They can neither generate nor accept new changesets.\r\n * - **Checkpoints**. Checkpoints are Snapshots that represent a specific version on an iModel's timeline.\r\n * - **PullOnly**. A local briefcase file that may be used to \"slide\" along a timeline by applying incoming changesets.\r\n * They are always opened readonly except to apply changesets.\r\n * - **Standalone**. Standalone iModels are local files that are not connected to iModelHub, and therefore cannot accept or create changesets.\r\n */\r\n Unassigned = 0,\r\n}\r\n\r\n/** Whether a briefcase is editable or may only accept incoming changesets from iModelHub\r\n * @public\r\n * @extensions\r\n */\r\nexport enum SyncMode {\r\n /** Use a fixed version (i.e. a checkpoint). See [CheckpointManager]($backend) for preferred approach to using checkpoint files. */\r\n FixedVersion = 1,\r\n /** A briefcase that can be edited. A unique briefcaseId must be assigned by iModelHub. */\r\n PullAndPush = 2,\r\n /** use [BriefcaseIdValue.Unassigned](%backend). This makes a briefcase that can accept changesets from iModelHub but can never create changesets. */\r\n PullOnly = 3,\r\n}\r\n\r\n/**\r\n * Options to open a previously downloaded briefcase\r\n * @public\r\n */\r\nexport interface OpenBriefcaseOptions {\r\n /** open briefcase Readonly */\r\n readonly openAsReadOnly?: boolean;\r\n}\r\n\r\n/**\r\n * Properties that specify a briefcase within the local briefcase cache.\r\n * @see BriefcaseManager.getFileName\r\n * @public\r\n */\r\nexport interface BriefcaseProps {\r\n /** Id of the iModel */\r\n readonly iModelId: GuidString;\r\n\r\n /** BriefcaseId of the briefcase */\r\n readonly briefcaseId: BriefcaseId;\r\n}\r\n\r\n/** Properties for opening a local briefcase file via [BriefcaseDb.open]($backend)\r\n * @public\r\n */\r\nexport interface OpenBriefcaseProps extends IModelEncryptionProps, OpenDbKey { // eslint-disable-line @typescript-eslint/no-deprecated\r\n /** the full path to the briefcase file */\r\n readonly fileName: LocalFileName;\r\n /**\r\n * If true, open the briefcase readonly.\r\n * @note Readonly connections always hold a read transaction against the briefcase. That can cause the WAL file size to grow\r\n * unbounded if changes happen while they're open (see [Checkpoint starvation](https://www.sqlite.org/wal.html#avoiding_excessively_large_wal_files))\r\n * It is a good idea to close the readonly connection *before* closing the writeable connection so the WAL file will be deleted.\r\n */\r\n readonly readonly?: boolean;\r\n /** If true, open the briefcase readonly and monitor it for changes originating from another connection.\r\n * When such changes are detected, the default txn will be restarted.\r\n * The restart occurs only after the next iteration of the backend event loop, and will generate events that reflect the changes from the other connection.\r\n * This can be useful in contexts where the read-only connection is displaying a view of the contents of the briefcase while another, non-interactive program\r\n * is adding txns to the briefcase. It may not be reliable if the writable connection is undoing or redoing txns.\r\n * @note This cannot be used with cloud-based briefcases.\r\n */\r\n readonly watchForChanges?: boolean;\r\n}\r\n\r\n/** Properties of a local briefcase file, returned by [BriefcaseManager.getCachedBriefcases]($backend) and [BriefcaseManager.downloadBriefcase]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport interface LocalBriefcaseProps {\r\n /** Full path of local file. */\r\n readonly fileName: LocalFileName;\r\n\r\n /** The iTwin containing the iModel. */\r\n readonly iTwinId: GuidString;\r\n\r\n /** The iModelId. */\r\n readonly iModelId: GuidString;\r\n\r\n /** The briefcaseId. */\r\n readonly briefcaseId: BriefcaseId;\r\n\r\n /** The current changesetId.\r\n * @note ChangeSet Ids are string hash values based on the ChangeSet's content and parent.\r\n */\r\n readonly changeset: ChangesetIdWithIndex;\r\n\r\n /** Size of the briefcase file in bytes */\r\n readonly fileSize: number;\r\n}\r\n\r\n/** Properties for downloading a briefcase to a local file, from iModelHub.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RequestNewBriefcaseProps {\r\n /** iTwin that the iModel belongs to. */\r\n readonly iTwinId: GuidString;\r\n\r\n /** The iModelId for the new briefcase. */\r\n readonly iModelId: GuidString;\r\n\r\n /** Full path of local file to store the briefcase. If undefined, a file will be created in the briefcase cache, and this member will be filled with the full path to the file.\r\n * Callers can use this to open the briefcase after the download completes.\r\n * @note this member is both an input and an output.\r\n */\r\n readonly fileName?: LocalFileName;\r\n\r\n /**\r\n * The BriefcaseId for the new briefcase. If undefined, a new BriefcaseId will be acquired from iModelHub before the download, and is returned in this member.\r\n * @note To download a briefcase that can accept but not create new changesets (sometimes referred to as \"pull only\" briefcases), set this value to [[BriefcaseIdValue.Unassigned]].\r\n * After downloading, you can merely delete unassigned briefcase files when they are no longer needed. Assigned BriefcaseIds should be released (via [BriefcaseManager.releaseBriefcase]($backend) )\r\n * when you are done with them.\r\n * @note this member is both an input and an output.\r\n *\r\n */\r\n briefcaseId?: BriefcaseId;\r\n\r\n /** Id of the change set of the new briefcase. If undefined, use latest. */\r\n asOf?: IModelVersionProps;\r\n}\r\n\r\n/**\r\n * Arguments to open a Checkpoint directly from its cloud container\r\n * @beta\r\n */\r\nexport interface OpenCheckpointArgs {\r\n readonly iTwinId: GuidString;\r\n\r\n /** Id of the iModel */\r\n readonly iModelId: GuidString;\r\n\r\n /** changeset for the checkpoint. If undefined, attempt to open the checkpoint for the latest changeset. */\r\n readonly changeset?: ChangesetIndexOrId;\r\n}\r\n\r\n/**\r\n * Manages the download of a briefcase\r\n * @public\r\n */\r\nexport interface BriefcaseDownloader {\r\n /** Id of the briefcase being downloaded */\r\n readonly briefcaseId: BriefcaseId;\r\n\r\n /** the name of the local file for the briefcase */\r\n readonly fileName: LocalFileName;\r\n\r\n /** Promise that resolves when the download completes. await this to complete the download */\r\n readonly downloadPromise: Promise<void>;\r\n\r\n /** Request cancellation of the download */\r\n readonly requestCancel: () => Promise<boolean>;\r\n}\r\n\r\n/** Option to control the validation and upgrade of domain schemas in the Db\r\n * @beta\r\n */\r\nexport enum DomainOptions {\r\n /** Domain schemas will be validated for any required upgrades. Any errors will be reported back, and cause the application to fail opening the Db */\r\n CheckRequiredUpgrades = 0,\r\n\r\n /** Domain schemas will be validated for any required or optional upgrades. Any errors will be reported back, and cause the application to fail opening the Db */\r\n CheckRecommendedUpgrades = 1,\r\n\r\n /** Domain schemas will be upgraded if necessary. However, only compatible schema upgrades will be allowed - these are typically additions of classes, properties, and changes to custom attributes */\r\n Upgrade = 2,\r\n\r\n /** Domain schemas will neither be validated nor be upgraded. Used only internally */\r\n SkipCheck = 3,\r\n}\r\n\r\n/** Options that control whether a profile upgrade should be performed when opening a Db\r\n * @beta\r\n */\r\nexport enum ProfileOptions {\r\n /** No profile upgrade will be performed. If a profile upgrade was required, opening the file will fail */\r\n None = 0,\r\n\r\n /** Profile upgrade will be performed if necessary */\r\n Upgrade = 1,\r\n}\r\n\r\n/** Arguments to validate and update the profile and domain schemas when opening a Db\r\n * @beta\r\n */\r\nexport interface UpgradeOptions {\r\n /** Option to control the validation and upgrade of domain schemas in the Db */\r\n readonly domain?: DomainOptions;\r\n\r\n /** Options that control whether a profile upgrade should be performed when opening a file */\r\n readonly profile?: ProfileOptions;\r\n\r\n /** Options that will allow data transform during Profile/Domain schema upgrade */\r\n readonly schemaLockHeld?: boolean;\r\n}\r\n\r\n/**\r\n * The state of the schemas in the Db compared with what the current version of the software expects\r\n * Note: The state may vary depending on whether the Db is to be opened ReadOnly or ReadWrite.\r\n * @public\r\n */\r\nexport enum SchemaState {\r\n /** The schemas in the Db are up-to-date, and do not need to be upgraded before opening it with the current version of the software */\r\n UpToDate,\r\n\r\n /** It's required that the schemas in the Db be upgraded before it can be opened with the current version of the software.\r\n * This may happen in read-write scenarios where the application requires a newer version of the schemas to be in place before\r\n * it can write data based on that new schema.\r\n */\r\n UpgradeRequired,\r\n\r\n /** It's recommended, but not necessary that the schemas in the Db be upgraded before opening it with the current version of the software */\r\n UpgradeRecommended,\r\n\r\n /** The schemas in the Db are too old to be opened by the current version of the software. Upgrade using the API is not possible. */\r\n TooOld,\r\n\r\n /** The schemas in the Db are too new to be opened by the current version of the software */\r\n TooNew,\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"BriefcaseTypes.js","sourceRoot":"","sources":["../../src/BriefcaseTypes.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAaH;;;GAGG;AACH,MAAM,CAAN,IAAY,gBAyBX;AAzBD,WAAY,gBAAgB;IAC1B,+CAA+C;IAC/C,sEAAoB,CAAA;IAEpB,gDAAgD;IAChD,4DAAa,CAAA;IAEb,gFAAgF;IAChF,mEAAc,CAAA;IAEd,+EAA+E;IAC/E,wEAAqC,CAAA;IAErC;;;;;;;;;;OAUG;IACH,mEAAc,CAAA;AAChB,CAAC,EAzBW,gBAAgB,KAAhB,gBAAgB,QAyB3B;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,mIAAmI;IACnI,uDAAgB,CAAA;IAChB,0FAA0F;IAC1F,qDAAe,CAAA;IACf,qJAAqJ;IACrJ,+CAAY,CAAA;AACd,CAAC,EAPW,QAAQ,KAAR,QAAQ,QAOnB;AAwID;;GAEG;AACH,MAAM,CAAN,IAAY,aAYX;AAZD,WAAY,aAAa;IACvB,qJAAqJ;IACrJ,mFAAyB,CAAA;IAEzB,iKAAiK;IACjK,yFAA4B,CAAA;IAE5B,sMAAsM;IACtM,uDAAW,CAAA;IAEX,qFAAqF;IACrF,2DAAa,CAAA;AACf,CAAC,EAZW,aAAa,KAAb,aAAa,QAYxB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,0GAA0G;IAC1G,mDAAQ,CAAA;IAER,qDAAqD;IACrD,yDAAW,CAAA;AACb,CAAC,EANW,cAAc,KAAd,cAAc,QAMzB;AAgBD;;;;GAIG;AACH,MAAM,CAAN,IAAY,WAkBX;AAlBD,WAAY,WAAW;IACrB,sIAAsI;IACtI,qDAAQ,CAAA;IAER;;;OAGG;IACH,mEAAe,CAAA;IAEf,4IAA4I;IAC5I,yEAAkB,CAAA;IAElB,oIAAoI;IACpI,iDAAM,CAAA;IAEN,4FAA4F;IAC5F,iDAAM,CAAA;AACR,CAAC,EAlBW,WAAW,KAAX,WAAW,QAkBtB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module iModels\n */\n\nimport { GuidString } from \"@itwin/core-bentley\";\nimport { ChangesetIdWithIndex, ChangesetIndexOrId, LocalFileName } from \"./ChangesetProps\";\nimport { IModelEncryptionProps, OpenDbKey } from \"./IModel\";\nimport { IModelVersionProps } from \"./IModelVersion\";\n\n/** The Id assigned to a briefcase by iModelHub, or [[BriefcaseIdValue.Unassigned]] .\n * @public\n * @extensions\n */\nexport type BriefcaseId = number;\n\n/** Values of [[BriefcaseId]] that have special meaning.\n * @public\n * @extensions\n */\nexport enum BriefcaseIdValue {\n /** Indicates an invalid/illegal BriefcaseId */\n Illegal = 0xffffffff,\n\n /** BriefcaseIds must be less than this value */\n Max = 1 << 24,\n\n /** All valid iModelHub issued BriefcaseIds will be equal or higher than this */\n FirstValid = 2,\n\n /** All valid iModelHub issued BriefcaseIds will be equal or lower than this */\n LastValid = BriefcaseIdValue.Max - 11,\n\n /**\n * The briefcase has not been assigned a unique Id by iModelHub. Only briefcases that have been assigned a unique BriefcaseId may create changesets,\n * because BriefcaseId is used to create unique ElementIds for new elements.\n *\n * The `Unassigned` briefcaseId is used for several purposes:\n * - **Snapshots**. Snapshot files are immutable copies of an iModel for archival or data exchange purposes. They can neither generate nor accept new changesets.\n * - **Checkpoints**. Checkpoints are Snapshots that represent a specific version on an iModel's timeline.\n * - **PullOnly**. A local briefcase file that may be used to \"slide\" along a timeline by applying incoming changesets.\n * They are always opened readonly except to apply changesets.\n * - **Standalone**. Standalone iModels are local files that are not connected to iModelHub, and therefore cannot accept or create changesets.\n */\n Unassigned = 0,\n}\n\n/** Whether a briefcase is editable or may only accept incoming changesets from iModelHub\n * @public\n * @extensions\n */\nexport enum SyncMode {\n /** Use a fixed version (i.e. a checkpoint). See [CheckpointManager]($backend) for preferred approach to using checkpoint files. */\n FixedVersion = 1,\n /** A briefcase that can be edited. A unique briefcaseId must be assigned by iModelHub. */\n PullAndPush = 2,\n /** use [BriefcaseIdValue.Unassigned](%backend). This makes a briefcase that can accept changesets from iModelHub but can never create changesets. */\n PullOnly = 3,\n}\n\n/**\n * Options to open a previously downloaded briefcase\n * @public\n */\nexport interface OpenBriefcaseOptions {\n /** open briefcase Readonly */\n readonly openAsReadOnly?: boolean;\n}\n\n/**\n * Properties that specify a briefcase within the local briefcase cache.\n * @see BriefcaseManager.getFileName\n * @public\n */\nexport interface BriefcaseProps {\n /** Id of the iModel */\n readonly iModelId: GuidString;\n\n /** BriefcaseId of the briefcase */\n readonly briefcaseId: BriefcaseId;\n}\n\n/** Properties for opening a local briefcase file via [BriefcaseDb.open]($backend)\n * @public\n */\nexport interface OpenBriefcaseProps extends IModelEncryptionProps, OpenDbKey { // eslint-disable-line @typescript-eslint/no-deprecated\n /** the full path to the briefcase file */\n readonly fileName: LocalFileName;\n /**\n * If true, open the briefcase readonly.\n * @note Readonly connections always hold a read transaction against the briefcase. That can cause the WAL file size to grow\n * unbounded if changes happen while they're open (see [Checkpoint starvation](https://www.sqlite.org/wal.html#avoiding_excessively_large_wal_files))\n * It is a good idea to close the readonly connection *before* closing the writeable connection so the WAL file will be deleted.\n */\n readonly readonly?: boolean;\n /** If true, open the briefcase readonly and monitor it for changes originating from another connection.\n * When such changes are detected, the default txn will be restarted.\n * The restart occurs only after the next iteration of the backend event loop, and will generate events that reflect the changes from the other connection.\n * This can be useful in contexts where the read-only connection is displaying a view of the contents of the briefcase while another, non-interactive program\n * is adding txns to the briefcase. It may not be reliable if the writable connection is undoing or redoing txns.\n * @note This cannot be used with cloud-based briefcases.\n */\n readonly watchForChanges?: boolean;\n}\n\n/** Properties of a local briefcase file, returned by [BriefcaseManager.getCachedBriefcases]($backend) and [BriefcaseManager.downloadBriefcase]($backend)\n * @public\n * @extensions\n */\nexport interface LocalBriefcaseProps {\n /** Full path of local file. */\n readonly fileName: LocalFileName;\n\n /** The iTwin containing the iModel. */\n readonly iTwinId: GuidString;\n\n /** The iModelId. */\n readonly iModelId: GuidString;\n\n /** The briefcaseId. */\n readonly briefcaseId: BriefcaseId;\n\n /** The current changesetId.\n * @note ChangeSet Ids are string hash values based on the ChangeSet's content and parent.\n */\n readonly changeset: ChangesetIdWithIndex;\n\n /** Size of the briefcase file in bytes */\n readonly fileSize: number;\n}\n\n/** Properties for downloading a briefcase to a local file, from iModelHub.\n * @public\n * @extensions\n */\nexport interface RequestNewBriefcaseProps {\n /** iTwin that the iModel belongs to. */\n readonly iTwinId: GuidString;\n\n /** The iModelId for the new briefcase. */\n readonly iModelId: GuidString;\n\n /** Full path of local file to store the briefcase. If undefined, a file will be created in the briefcase cache, and this member will be filled with the full path to the file.\n * Callers can use this to open the briefcase after the download completes.\n * @note this member is both an input and an output.\n */\n readonly fileName?: LocalFileName;\n\n /**\n * The BriefcaseId for the new briefcase. If undefined, a new BriefcaseId will be acquired from iModelHub before the download, and is returned in this member.\n * @note To download a briefcase that can accept but not create new changesets (sometimes referred to as \"pull only\" briefcases), set this value to [[BriefcaseIdValue.Unassigned]].\n * After downloading, you can merely delete unassigned briefcase files when they are no longer needed. Assigned BriefcaseIds should be released (via [BriefcaseManager.releaseBriefcase]($backend) )\n * when you are done with them.\n * @note this member is both an input and an output.\n *\n */\n briefcaseId?: BriefcaseId;\n\n /** Id of the change set of the new briefcase. If undefined, use latest. */\n asOf?: IModelVersionProps;\n}\n\n/**\n * Arguments to open a Checkpoint directly from its cloud container\n * @beta\n */\nexport interface OpenCheckpointArgs {\n readonly iTwinId: GuidString;\n\n /** Id of the iModel */\n readonly iModelId: GuidString;\n\n /** changeset for the checkpoint. If undefined, attempt to open the checkpoint for the latest changeset. */\n readonly changeset?: ChangesetIndexOrId;\n}\n\n/**\n * Manages the download of a briefcase\n * @public\n */\nexport interface BriefcaseDownloader {\n /** Id of the briefcase being downloaded */\n readonly briefcaseId: BriefcaseId;\n\n /** the name of the local file for the briefcase */\n readonly fileName: LocalFileName;\n\n /** Promise that resolves when the download completes. await this to complete the download */\n readonly downloadPromise: Promise<void>;\n\n /** Request cancellation of the download */\n readonly requestCancel: () => Promise<boolean>;\n}\n\n/** Option to control the validation and upgrade of domain schemas in the Db\n * @beta\n */\nexport enum DomainOptions {\n /** Domain schemas will be validated for any required upgrades. Any errors will be reported back, and cause the application to fail opening the Db */\n CheckRequiredUpgrades = 0,\n\n /** Domain schemas will be validated for any required or optional upgrades. Any errors will be reported back, and cause the application to fail opening the Db */\n CheckRecommendedUpgrades = 1,\n\n /** Domain schemas will be upgraded if necessary. However, only compatible schema upgrades will be allowed - these are typically additions of classes, properties, and changes to custom attributes */\n Upgrade = 2,\n\n /** Domain schemas will neither be validated nor be upgraded. Used only internally */\n SkipCheck = 3,\n}\n\n/** Options that control whether a profile upgrade should be performed when opening a Db\n * @beta\n */\nexport enum ProfileOptions {\n /** No profile upgrade will be performed. If a profile upgrade was required, opening the file will fail */\n None = 0,\n\n /** Profile upgrade will be performed if necessary */\n Upgrade = 1,\n}\n\n/** Arguments to validate and update the profile and domain schemas when opening a Db\n * @beta\n */\nexport interface UpgradeOptions {\n /** Option to control the validation and upgrade of domain schemas in the Db */\n readonly domain?: DomainOptions;\n\n /** Options that control whether a profile upgrade should be performed when opening a file */\n readonly profile?: ProfileOptions;\n\n /** Options that will allow data transform during Profile/Domain schema upgrade */\n readonly schemaLockHeld?: boolean;\n}\n\n/**\n * The state of the schemas in the Db compared with what the current version of the software expects\n * Note: The state may vary depending on whether the Db is to be opened ReadOnly or ReadWrite.\n * @public\n */\nexport enum SchemaState {\n /** The schemas in the Db are up-to-date, and do not need to be upgraded before opening it with the current version of the software */\n UpToDate,\n\n /** It's required that the schemas in the Db be upgraded before it can be opened with the current version of the software.\n * This may happen in read-write scenarios where the application requires a newer version of the schemas to be in place before\n * it can write data based on that new schema.\n */\n UpgradeRequired,\n\n /** It's recommended, but not necessary that the schemas in the Db be upgraded before opening it with the current version of the software */\n UpgradeRecommended,\n\n /** The schemas in the Db are too old to be opened by the current version of the software. Upgrade using the API is not possible. */\n TooOld,\n\n /** The schemas in the Db are too new to be opened by the current version of the software */\n TooNew,\n}\n"]}
|
package/lib/esm/Camera.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Camera.js","sourceRoot":"","sources":["../../src/Camera.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAc,OAAO,EAAoB,MAAM,sBAAsB,CAAC;AAYpF;;;GAGG;AACH,MAAM,OAAO,MAAM;IAKV,MAAM,CAAC,gBAAgB,CAAC,GAAU;QACvC,OAAO,GAAG,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,IAAI,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC;IAChE,CAAC;IAEM,MAAM,CAAC,iBAAiB,C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GAAG,CAAC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;YAC/C,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IACM,KAAK,KAAK,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpC,OAAO,CAAC,GAAW;QACxB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;QAC/B,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,YAAmB,KAAmB;QACpC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACvC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YACrD,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACvC,OAAO;QACT,CAAC;QACD,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC;QAC/C,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,GAAG,GAAG,IAAI,OAAO,EAAE,CAAC;IAC3B,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"Camera.js","sourceRoot":"","sources":["../../src/Camera.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,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C,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,GAAG,GAAG,IAAI,OAAO,EAAE,CAAC;IAC3B,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Views\n */\n\nimport { JsonUtils } from \"@itwin/core-bentley\";\nimport { Angle, AngleProps, Point3d, XYAndZ, XYZProps } from \"@itwin/core-geometry\";\n\n/** JSON representation of a [[Camera]].\n * @public\n * @extensions\n */\nexport interface CameraProps {\n lens: AngleProps;\n focusDist: number; // NOTE: this is abbreviated, do not change!\n eye: XYZProps;\n}\n\n/** The current position (eyepoint), lens angle, and focus distance of a camera.\n * @see [Views]($docs/learning/frontend/Views.md)\n * @public\n */\nexport class Camera implements CameraProps {\n public readonly lens: Angle;\n public focusDist: number;\n public readonly eye: Point3d;\n\n public static isValidLensAngle(val: Angle) {\n return val.radians > (Math.PI / 8.0) && val.radians < Math.PI;\n }\n\n public static validateLensAngle(val: Angle) {\n if (!this.isValidLensAngle(val))\n val.setRadians(Math.PI / 2.0);\n }\n\n public invalidateFocus() { this.focusDist = 0.0; }\n public get isFocusValid() { return this.focusDist > 0.0 && this.focusDist < 1.0e14; }\n public getFocusDistance() { return this.focusDist; }\n public setFocusDistance(dist: number) { this.focusDist = dist; }\n public get isLensValid() { return Camera.isValidLensAngle(this.lens); }\n public validateLens() { Camera.validateLensAngle(this.lens); }\n public getLensAngle() { return this.lens; }\n public setLensAngle(angle: Angle) { this.lens.setFrom(angle); }\n public getEyePoint() { return this.eye; }\n public setEyePoint(pt: XYAndZ) { this.eye.setFrom(pt); }\n public get isValid() { return this.isLensValid && this.isFocusValid; }\n public equals(other: Camera) {\n return Math.abs(this.lens.radians - other.lens.radians) < .01 &&\n Math.abs(this.focusDist - other.focusDist) < .1 &&\n this.eye.isAlmostEqual(other.eye);\n }\n public clone() { return new Camera(this); }\n public setFrom(rhs: Camera) {\n this.lens.setFrom(rhs.lens);\n this.focusDist = rhs.focusDist;\n this.eye.setFrom(rhs.eye);\n }\n\n /** Construct a Camera\n * @param props The properties of the new camera. If undefined, create a camera with eye at {0,0,0}, 90 degree lens, 1 meter focus distance.\n */\n public constructor(props?: CameraProps) {\n if (props !== undefined) {\n this.lens = Angle.fromJSON(props.lens);\n this.focusDist = JsonUtils.asDouble(props.focusDist);\n this.eye = Point3d.fromJSON(props.eye);\n return;\n }\n this.lens = Angle.createRadians(Math.PI / 2.0);\n this.focusDist = 1;\n this.eye = new Point3d();\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChangedElements.js","sourceRoot":"","sources":["../../src/ChangedElements.ts"],"names":[],"mappings":"AAWA,uBAAuB;AAEvB;;;GAGG;AACH,MAAM,CAAN,IAAY,YAeX;AAfD,WAAY,YAAY;IACtB,kCAAkC;IAClC,uDAAY,CAAA;IACZ,wCAAwC;IACxC,uDAAc,CAAA;IACd,oEAAoE;IACpE,uDAAe,CAAA;IACf,kEAAkE;IAClE,yDAAiB,CAAA;IACjB,qEAAqE;IACrE,uDAAiB,CAAA;IACjB,+CAA+C;IAC/C,oDAAgB,CAAA;IAChB,qDAAqD;IACrD,oDAAiB,CAAA;AACnB,CAAC,EAfW,YAAY,KAAZ,YAAY,QAevB","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"ChangedElements.js","sourceRoot":"","sources":["../../src/ChangedElements.ts"],"names":[],"mappings":"AAWA,uBAAuB;AAEvB;;;GAGG;AACH,MAAM,CAAN,IAAY,YAeX;AAfD,WAAY,YAAY;IACtB,kCAAkC;IAClC,uDAAY,CAAA;IACZ,wCAAwC;IACxC,uDAAc,CAAA;IACd,oEAAoE;IACpE,uDAAe,CAAA;IACf,kEAAkE;IAClE,yDAAiB,CAAA;IACjB,qEAAqE;IACrE,uDAAiB,CAAA;IACjB,+CAA+C;IAC/C,oDAAgB,CAAA;IAChB,qDAAqD;IACrD,oDAAiB,CAAA;AACnB,CAAC,EAfW,YAAY,KAAZ,YAAY,QAevB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/**\n * @packageDocumentation\n * @module Entities\n */\nimport { DbOpcode, Id64String } from \"@itwin/core-bentley\";\nimport { AxisAlignedBox3dProps } from \"./geometry/Placement\";\n\n// cspell:ignore bboxes\n\n/** Bitflags describing which aspects of an [Element]($backend) changed as part of a [[ChangedElements]].\n * @public\n * @extensions\n */\nexport enum TypeOfChange {\n /** Element contains no changes */\n NoChange = 0,\n /** A property in the element changed */\n Property = 0b1,\n /** The geometry stream of a [GeometricElement]($backend) changed */\n Geometry = 0b10,\n /** The [[Placement]] of a [GeometricElement]($backend) changed */\n Placement = 0b100,\n /** Indirect change occurred to this element by a related instance */\n Indirect = 0b1000,\n /** Hidden properties of the element changed */\n Hidden = 0b10000,\n /** The top-most parent of the element has changed */\n Parent = 0b100000,\n}\n\n/** Changed elements found in a changeset or between a range of changesets.\n * All arrays in this object will have the same number of items.\n * Each index for those arrays refer to the same element, e.g. to get the class Id of\n * the element given by element Id changedElements.elements[index], you can use changedElements.classIds[index].\n * @public\n * @extensions\n */\nexport interface ChangedElements {\n /** Ids of elements that changed */\n elements: Id64String[];\n /** ECClass Ids of elements that changed */\n classIds: Id64String[];\n /** Operation that occurred on the element. Whether the element was inserted, updated or deleted.\n * See [DbOpcode]($core-bentley)\n */\n opcodes: DbOpcode[];\n /** Type of change bitflags, see [[TypeOfChange]] */\n type: TypeOfChange[];\n /** Model Ids of the changed elements\n * This may be undefined if the agent that did the processing job did not export model Ids\n */\n modelIds?: Id64String[];\n /** Property accessor strings of properties that changed, if any, for each changed element\n * This may be undefined if the agent that did the processing job did not export properties\n */\n properties?: string[][];\n /** Before state checksums of the property value\n * Useful to determine if property values have changed\n * between the versions being inspected\n * This may be undefined if the agent that did the processing job did not export checksums\n */\n oldChecksums?: number[][];\n /** After state checksums of the property value\n * Useful to determine if property values have changed\n * between the versions being inspected\n * This may be undefined if the agent that did the processing job did not export checksums\n */\n newChecksums?: number[][];\n /**\n * Parent ids of the changed elements\n * Will be \"0\" if the element has no parent\n * This may be undefined if the agent that did the processing job did not export parent information\n */\n parentIds?: Id64String[];\n /**\n * Parent ECClass Ids of the changed elements\n * Will be \"0\" if the element has no parent\n * This may be undefined if the agent that did the processing job did not export parent information\n */\n parentClassIds?: Id64String[];\n}\n\n/** @internal */\nexport interface ChangedModels {\n modelIds: Id64String[];\n bboxes: AxisAlignedBox3dProps[];\n}\n\n/** @internal */\nexport interface ChangeData {\n changedElements: ChangedElements;\n changedModels: ChangedModels;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChangedEntities.js","sourceRoot":"","sources":["../../src/ChangedEntities.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"ChangedEntities.js","sourceRoot":"","sources":["../../src/ChangedEntities.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module NativeApp\n */\n\nimport { CompressedId64Set, Id64String } from \"@itwin/core-bentley\";\n\n/** Describes an [Entity]($backend) and its [ECClass]($docs/bis/guide/references/glossary/#ecclass) by Id.\n * @public\n * @extensions\n */\nexport interface EntityIdAndClassId {\n /** The entity's Id. */\n id: Id64String;\n /** The Id of the entity's ECClass. */\n classId: Id64String;\n}\n\n/** JSON representation of the set of [Element]($backend)s or [Model]($backend)s that were changed by a [Txn]($docs/learning/InteractiveEditing.md).\n * @see [TxnManager.onElementsChanged]($backend) and [TxnManager.onModelsChanged]($backend).\n * @see [BriefcaseTxns.onElementsChanged]($frontend) and [BriefcaseTxns.onModelsChanged]($frontend).\n * @public\n * @extensions\n */\nexport interface ChangedEntities {\n /** The ids of entities that were inserted during the Txn. */\n inserted?: CompressedId64Set;\n /** The ids of entities that were deleted during the Txn. */\n deleted?: CompressedId64Set;\n /** The ids of entities that were modified during the Txn, including any [Element]($backend)s for which one of their [ElementAspect]($backend)s was changed. */\n updated?: CompressedId64Set;\n}\n\n/** A collection of [[EntityIdAndClassId]]s, as used by [TxnChangedEntities]($backend).\n * For efficiency, the iterator supplied by this iterable returns **the same `EntityIdAndClassId` object** on each iteration. Therefore the objects must be copied if you\n * intend to store references to them. For example, to populate an array from the iterable:\n * ```ts\n * function arrayFromIterable(entities: EntityIdAndClassIdIterable): EntityIdAndClassId[] {\n * // NO! return Array.from(entities);\n * const array = [];\n * for (const entity of entities)\n * array.push({...entity});\n *\n * return array;\n * }\n * ```\n * @public\n * @extensions\n */\nexport type EntityIdAndClassIdIterable = Iterable<Readonly<EntityIdAndClassId>>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChangesetProps.js","sourceRoot":"","sources":["../../src/ChangesetProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;;GAGG;AAuCH;;;GAGG;AACH,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,mDAAmD;IACnD,uDAAW,CAAA;IACX,+CAA+C;IAC/C,qDAAU,CAAA;IACV,gEAAgE;IAChE,8DAAwB,CAAA;AAC1B,CAAC,EAPW,aAAa,KAAb,aAAa,QAOxB","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"ChangesetProps.js","sourceRoot":"","sources":["../../src/ChangesetProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;;GAGG;AAuCH;;;GAGG;AACH,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,mDAAmD;IACnD,uDAAW,CAAA;IACX,+CAA+C;IAC/C,qDAAU,CAAA;IACV,gEAAgE;IAChE,8DAAwB,CAAA;AAC1B,CAAC,EAPW,aAAa,KAAb,aAAa,QAOxB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/**\n * @packageDocumentation\n * @module iModels\n */\n\n/** @public */\nexport type LocalFileName = string;\n/** @public */\nexport type LocalDirName = string;\n\n/** A string that identifies a changeset.\n * @note this string is *not* a Guid. It is generated internally based on the content of the changeset.\n * @public\n * @extensions\n */\nexport type ChangesetId = string;\n\n/** The index of a changeset, assigned by iModelHub.\n * @note 0 means \"before the first changeset.\" Values less than 0 are invalid.\n * @public\n * @extensions\n */\nexport type ChangesetIndex = number;\n\n/** Both the index and Id of a changeset\n * @public\n * @extensions\n */\nexport interface ChangesetIndexAndId { readonly index: ChangesetIndex, readonly id: ChangesetId }\n\n/** The Id and optionally the index of a changeset\n * @public\n * @extensions\n */\nexport interface ChangesetIdWithIndex { readonly index?: ChangesetIndex, readonly id: ChangesetId }\n\n/** either changeset index, id, or both\n* @public\n * @extensions\n*/\nexport type ChangesetIndexOrId = ChangesetIndexAndId | { readonly index: ChangesetIndex, readonly id?: never } | { readonly id: ChangesetId, readonly index?: never };\n\n/** Value to indicate whether a changeset contains schema changes or not\n * @public\n * @extensions\n */\nexport enum ChangesetType {\n /** changeset does *not* contain schema changes. */\n Regular = 0,\n /** changeset *does* contain schema changes. */\n Schema = 1,\n /** Schema changeset pushed by iModel with SchemaSync enabled */\n SchemaSync = Schema | 64,\n}\n\n/** Properties of a changeset\n * @public\n */\nexport interface ChangesetProps {\n /** The index (sequence number) from IModelHub for this changeset. Larger index values were pushed later. */\n index: ChangesetIndex;\n /** the ChangesetId */\n id: ChangesetId;\n /** the ChangeSetId of the parent changeset of this changeset */\n parentId: ChangesetId;\n /** The type of changeset */\n changesType: ChangesetType;\n /** The user-supplied description of the work this changeset holds */\n description: string;\n /** The BriefcaseId of the briefcase that created this changeset */\n briefcaseId: number;\n /** The date this changeset was uploaded to the hub */\n pushDate: string;\n /** The identity of the user that created this changeset */\n userCreated: string;\n /** The size, in bytes, of this changeset */\n size: number;\n}\n\n/** Properties of a changeset file\n * @internal\n */\nexport interface ChangesetFileProps extends ChangesetProps {\n /** The full pathname of the local file holding this changeset. */\n pathname: LocalFileName;\n}\n\n/**\n * A range of changesets\n * @public\n * @extensions\n */\nexport interface ChangesetRange {\n /** index of the first changeset */\n first: ChangesetIndex;\n /** index of last changeset. If undefined, all changesets after first are returned. */\n end?: ChangesetIndex;\n}\n"]}
|
package/lib/esm/ClipStyle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClipStyle.js","sourceRoot":"","sources":["../../src/ClipStyle.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAA0B,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAgBtC;;;GAGG;AACH,MAAM,OAAO,QAAQ;IAWnB,YAAoB,SAAuC,EAAE,UAAgC,EAAE,UAA8B;QAC3H,IAAI,CAAC,SAAS,GAAG,SAAS,IAAI,EAAE,CAAC;QACjC,IAAI,UAAU,IAAI,CAAC,UAAU,CAAC,eAAe;YAC3C,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAE/B,IAAI,UAAU,IAAI,CAAC,UAAU,CAAC,eAAe;YAC3C,IAAI,CA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,IAAI,CAAC,QAAQ,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC;IACvK,CAAC;;AA7FD,sEAAsE;AAC/C,kBAAQ,GAAG,IAAI,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Views\r\n */\r\n\r\nimport { assert, JsonUtils } from \"@itwin/core-bentley\";\r\nimport { ViewFlagOverrides } from \"./ViewFlags\";\r\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\r\nimport { HiddenLine } from \"./HiddenLine\";\r\nimport { FeatureAppearance, FeatureAppearanceProps } from \"./FeatureSymbology\";\r\nimport { ColorDef } from \"./ColorDef\";\r\n\r\n/** Wire format describing a [[CutStyle]] applied to section-cut geometry produced at intersections with a view's [ClipVector]($core-geometry).\r\n * @see [[ClipStyleProps.cutStyle]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CutStyleProps {\r\n /** If defined, overrides aspects of the view's [[ViewFlags]] when drawing the cut geometry. */\r\n viewflags?: ViewFlagOverrides;\r\n /** If defined, overrides the view's [[HiddenLine.Settings]] when drawing the cut geometry. */\r\n hiddenLine?: HiddenLine.SettingsProps;\r\n /** If defined, overrides aspects of the cut geometry's symbology. */\r\n appearance?: FeatureAppearanceProps;\r\n}\r\n\r\n/** As part of a [[ClipStyle]], describes how section-cut graphics should be displayed.\r\n * @note Section-cut graphics are only produced if [[ClipStyle.produceCutGeometry]] is `true`.\r\n * @public\r\n */\r\nexport class CutStyle {\r\n /** Selectively overrides some of the view's [[ViewFlags]] when drawing the section-cut graphics. */\r\n public readonly viewflags: Readonly<ViewFlagOverrides>;\r\n /** If defined, overrides the settings the view uses to draw the edges of the section-cut graphics. */\r\n public readonly hiddenLine?: HiddenLine.Settings;\r\n /** If defined, overrides aspects of the symbology of the section-cut graphics. */\r\n public readonly appearance?: FeatureAppearance;\r\n\r\n /** The default CutStyle, configured to draw the section-cut graphics using the view's settings, with no overrides. */\r\n public static readonly defaults = new CutStyle();\r\n\r\n private constructor(viewflags?: Readonly<ViewFlagOverrides>, hiddenLine?: HiddenLine.Settings, appearance?: FeatureAppearance) {\r\n this.viewflags = viewflags ?? {};\r\n if (hiddenLine && !hiddenLine.matchesDefaults)\r\n this.hiddenLine = hiddenLine;\r\n\r\n if (appearance && !appearance.matchesDefaults)\r\n this.appearance = appearance;\r\n }\r\n\r\n /** Create a CutStyle from its components. */\r\n public static create(viewflags?: Readonly<ViewFlagOverrides>, hiddenLine?: HiddenLine.Settings, appearance?: FeatureAppearance): CutStyle {\r\n if ((viewflags && JsonUtils.isNonEmptyObject(viewflags)) || (hiddenLine && !hiddenLine.matchesDefaults) || (appearance && !appearance.matchesDefaults))\r\n return new CutStyle(viewflags, hiddenLine, appearance);\r\n\r\n return this.defaults;\r\n }\r\n\r\n public static fromJSON(props?: CutStyleProps): CutStyle {\r\n if (JsonUtils.isNonEmptyObject(props)) {\r\n const viewflags = { ...props?.viewflags };\r\n const hiddenLine = props?.hiddenLine ? HiddenLine.Settings.fromJSON(props.hiddenLine) : undefined;\r\n const appearance = props?.appearance ? FeatureAppearance.fromJSON(props.appearance) : undefined;\r\n\r\n return this.create(viewflags, hiddenLine, appearance);\r\n } else {\r\n return this.defaults;\r\n }\r\n }\r\n\r\n /** Return JSON representation. The representation is `undefined` if this style matches the default style. */\r\n public toJSON(): CutStyleProps | undefined {\r\n if (this.matchesDefaults)\r\n return undefined;\r\n\r\n const props: CutStyleProps = {};\r\n if (JsonUtils.isNonEmptyObject(this.viewflags))\r\n props.viewflags = this.viewflags;\r\n\r\n if (this.hiddenLine && !this.hiddenLine.matchesDefaults)\r\n props.hiddenLine = this.hiddenLine?.toJSON();\r\n\r\n if (this.appearance && !this.appearance.matchesDefaults)\r\n props.appearance = this.appearance.toJSON();\r\n\r\n return props;\r\n }\r\n\r\n /** Returns true if this style matches the default style - that is, it overrides none of the view's settings. */\r\n public get matchesDefaults(): boolean {\r\n if (this === CutStyle.defaults)\r\n return true;\r\n\r\n return !JsonUtils.isNonEmptyObject(this.viewflags) && (!this.hiddenLine || this.hiddenLine.matchesDefaults) && (!this.appearance || this.appearance.matchesDefaults);\r\n }\r\n}\r\n\r\n/** Wire format describing a [[ClipIntersectionStyle]].\r\n * @see [[ClipStyleProps.ClipIntersectionStyle]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ClipIntersectionStyleProps {\r\n /** Color to apply to intersection of geometry and clip planes, default white */\r\n color?: RgbColorProps;\r\n /** Number of pixels to be considered intersecting the clip plane, default 1 */\r\n width?: number;\r\n}\r\n\r\n/** As part of a [[ClipStyle]], describes how to colorize geometry intersecting the clip planes.\r\n * @note Edges are highlighted only if [[ClipStyle.ClipIntersectionStyle]] is `true`.\r\n * @public\r\n * @extensions\r\n */\r\nexport class ClipIntersectionStyle {\r\n /** Color to apply to intersection of geometry and clip planes, default white */\r\n public readonly color: RgbColor;\r\n /** Number of pixels to be considered intersecting the clip plane, default 1 */\r\n public readonly width: number;\r\n\r\n private constructor(color: RgbColor = RgbColor.fromColorDef(ColorDef.white), width: number = 1) {\r\n this.color = color;\r\n this.width = width;\r\n }\r\n /** Create a highlight from its components. */\r\n public static create(color?: RgbColor, width?: number): ClipIntersectionStyle {\r\n if (!color && !width)\r\n return this.defaults;\r\n\r\n return new ClipIntersectionStyle(color, width);\r\n }\r\n\r\n public static readonly defaults = new ClipIntersectionStyle();\r\n\r\n public static fromJSON(props?: ClipIntersectionStyleProps): ClipIntersectionStyle {\r\n if (props === undefined) {\r\n return ClipIntersectionStyle.defaults;\r\n }\r\n\r\n const color = props.color ? RgbColor.fromJSON(props.color) : RgbColor.fromColorDef(ColorDef.white);\r\n const width = props.width ? props.width : 1;\r\n return new ClipIntersectionStyle(color, width);\r\n }\r\n\r\n /** The JSON representation of this style. It is `undefined` if this style matches the defaults. */\r\n public toJSON(): ClipIntersectionStyleProps | undefined {\r\n const props: ClipIntersectionStyleProps = {};\r\n\r\n if (this.matchesDefaults) {\r\n return undefined;\r\n }\r\n\r\n if (this.color)\r\n props.color = this.color.toJSON();\r\n\r\n if (this.width)\r\n props.width = this.width;\r\n\r\n return props;\r\n }\r\n\r\n public get matchesDefaults(): boolean {\r\n if (this === ClipIntersectionStyle.defaults)\r\n return true;\r\n\r\n return !this.color && !this.width;\r\n }\r\n}\r\n\r\n/** Arguments supplied to [[ClipStyle.create]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ClipStyleCreateArgs {\r\n /** If `true`, geometry will be produced at the clip planes in a 3d view.\r\n * - Solids (closed volumes) will produce facets on the clip planes.\r\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\r\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\r\n */\r\n produceCutGeometry?: boolean;\r\n /** If `true`, intersection of geometry and clip planes will be colorized */\r\n colorizeIntersection?: boolean;\r\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\r\n cutStyle?: CutStyle;\r\n /** If defined, geometry inside the clip planes will be drawn in this color. */\r\n insideColor?: RgbColor;\r\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\r\n outsideColor?: RgbColor;\r\n /** Controls the style of the intersection of geometry and clip planes */\r\n intersectionStyle?: ClipIntersectionStyle;\r\n}\r\n\r\n/** Wire format describing a [[ClipStyle]].\r\n * @see [[DisplayStyleSettingsProps.clipStyle]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ClipStyleProps {\r\n /** If `true`, geometry will be produced at the clip planes in a 3d view.\r\n * - Solids (closed volumes) will produce facets on the clip planes.\r\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\r\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\r\n */\r\n produceCutGeometry?: boolean;\r\n /** If 'true', intersection of geometry and clip planes will be colorized */\r\n colorizeIntersection?: boolean;\r\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\r\n cutStyle?: CutStyleProps;\r\n /** If defined, geometry inside the clip planes will be drawn in this color. */\r\n insideColor?: RgbColorProps;\r\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\r\n outsideColor?: RgbColorProps;\r\n /** Controls the style of the intersection of geometry and clip planes */\r\n intersectionStyle?: ClipIntersectionStyleProps;\r\n}\r\n\r\n/** Describes symbology and behavior applied to a [ClipVector]($core-geometry) when applied to a [ViewState]($frontend) or [[ModelClipGroup]].\r\n * @see [[DisplayStyleSettings.clipStyle]].\r\n * @public\r\n */\r\nexport class ClipStyle {\r\n /** If `true`, geometry will be produced at the clip planes.\r\n * - Solids (closed volumes) will produce facets on the clip planes.\r\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\r\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\r\n */\r\n public readonly produceCutGeometry: boolean;\r\n /** If 'true', intersection of geometry and clip planes will be colorized */\r\n public readonly colorizeIntersection: boolean;\r\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\r\n public readonly cutStyle: CutStyle;\r\n /** If defined, geometry inside the clip planes will be drawn in this color. */\r\n public readonly insideColor?: RgbColor;\r\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\r\n public readonly outsideColor?: RgbColor;\r\n /** Controls the style of the intersection of geometry and clip planes */\r\n public readonly intersectionStyle?: ClipIntersectionStyle;\r\n\r\n /** The default style, which overrides none of the view's settings. */\r\n public static readonly defaults = new ClipStyle(false, false, CutStyle.defaults, undefined, undefined, undefined);\r\n\r\n private constructor(produceCutGeometry: boolean, colorizeIntersection: boolean, cutStyle: CutStyle, inside: RgbColor | undefined, outside: RgbColor | undefined, intersectionStyle: ClipIntersectionStyle | undefined) {\r\n this.produceCutGeometry = produceCutGeometry;\r\n this.colorizeIntersection = colorizeIntersection;\r\n this.cutStyle = cutStyle;\r\n this.insideColor = inside;\r\n this.outsideColor = outside;\r\n this.intersectionStyle = intersectionStyle;\r\n }\r\n\r\n /** @deprecated in 4.x. Use [[create(style: ClipStyleCreateArgs]] */\r\n public static create(produceCutGeometry: boolean, cutStyle: CutStyle, insideColor?: RgbColor, outsideColor?: RgbColor): ClipStyle;\r\n\r\n /** Create a style from its components. */\r\n public static create(style: ClipStyleCreateArgs): ClipStyle;\r\n\r\n /** @internal */\r\n public static create(styleOrProduceCutGeometry: ClipStyleCreateArgs | boolean, cutStyle?: CutStyle, insideColor?: RgbColor, outsideColor?: RgbColor): ClipStyle {\r\n\r\n if (typeof styleOrProduceCutGeometry === \"boolean\") {\r\n cutStyle = cutStyle === undefined ? CutStyle.defaults : cutStyle;\r\n\r\n if (!styleOrProduceCutGeometry && cutStyle.matchesDefaults && !insideColor && !outsideColor) {\r\n return this.defaults;\r\n }\r\n\r\n return new ClipStyle(styleOrProduceCutGeometry, false, cutStyle, insideColor, outsideColor, undefined);\r\n }\r\n\r\n const style = styleOrProduceCutGeometry;\r\n if (!style.produceCutGeometry && !style.colorizeIntersection && (!style.cutStyle || style.cutStyle.matchesDefaults) && !style.insideColor && !style.outsideColor && !style.intersectionStyle)\r\n return this.defaults;\r\n\r\n const produceCutGeometry = style.produceCutGeometry ? true : false;\r\n const colorizeIntersection = style.colorizeIntersection ? true : false;\r\n cutStyle = style.cutStyle === undefined ? CutStyle.defaults : style.cutStyle;\r\n\r\n return new ClipStyle(produceCutGeometry, colorizeIntersection, cutStyle, style.insideColor, style.outsideColor, style.intersectionStyle);\r\n }\r\n\r\n public static fromJSON(props?: ClipStyleProps): ClipStyle {\r\n if (JsonUtils.isNonEmptyObject(props)) {\r\n const produceCutGeometry = props.produceCutGeometry ?? false;\r\n const colorizeIntersection = props.colorizeIntersection ? true : false;\r\n const cutStyle = CutStyle.fromJSON(props.cutStyle);\r\n const insideColor = props.insideColor ? RgbColor.fromJSON(props.insideColor) : undefined;\r\n const outsideColor = props.outsideColor ? RgbColor.fromJSON(props.outsideColor) : undefined;\r\n const intersectionStyle = props.intersectionStyle ? ClipIntersectionStyle.fromJSON(props.intersectionStyle) : undefined;\r\n\r\n return this.create({produceCutGeometry, colorizeIntersection, cutStyle, insideColor, outsideColor, intersectionStyle});\r\n }\r\n\r\n return this.defaults;\r\n }\r\n\r\n /** The JSON representation of this style. It is `undefined` if this style matches the defaults. */\r\n public toJSON(): ClipStyleProps | undefined {\r\n if (this.matchesDefaults)\r\n return undefined;\r\n\r\n const props: ClipStyleProps = {};\r\n if (this.produceCutGeometry)\r\n props.produceCutGeometry = true;\r\n\r\n if (this.colorizeIntersection)\r\n props.colorizeIntersection = true;\r\n\r\n const cutStyle = this.cutStyle.toJSON();\r\n if (cutStyle) {\r\n assert(!this.cutStyle.matchesDefaults);\r\n props.cutStyle = cutStyle;\r\n }\r\n\r\n if (this.insideColor)\r\n props.insideColor = this.insideColor.toJSON();\r\n\r\n if (this.outsideColor)\r\n props.outsideColor = this.outsideColor.toJSON();\r\n\r\n if (this.intersectionStyle)\r\n props.intersectionStyle = this.intersectionStyle.toJSON();\r\n\r\n return props;\r\n }\r\n\r\n /** Returns true if this style matches the [[ClipStyle.defaults]] - that is, it overrides no settings from the view. */\r\n public get matchesDefaults(): boolean {\r\n if (this === ClipStyle.defaults)\r\n return true;\r\n\r\n return !this.produceCutGeometry && !this.colorizeIntersection && !this.insideColor && !this.outsideColor && this.cutStyle.matchesDefaults && !this.intersectionStyle;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ClipStyle.js","sourceRoot":"","sources":["../../src/ClipStyle.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,C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YAAY;YACnB,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;QAElD,IAAI,IAAI,CAAC,iBAAiB;YACxB,KAAK,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,CAAC;QAE5D,OAAO,KAAK,CAAC;IACf,CAAC;IAED,uHAAuH;IACvH,IAAW,eAAe;QACxB,IAAI,IAAI,KAAK,SAAS,CAAC,QAAQ;YAC7B,OAAO,IAAI,CAAC;QAEd,OAAO,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,oBAAoB,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,QAAQ,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC;IACvK,CAAC;;AA7FD,sEAAsE;AAC/C,kBAAQ,GAAG,IAAI,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Views\n */\n\nimport { assert, JsonUtils } from \"@itwin/core-bentley\";\nimport { ViewFlagOverrides } from \"./ViewFlags\";\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\nimport { HiddenLine } from \"./HiddenLine\";\nimport { FeatureAppearance, FeatureAppearanceProps } from \"./FeatureSymbology\";\nimport { ColorDef } from \"./ColorDef\";\n\n/** Wire format describing a [[CutStyle]] applied to section-cut geometry produced at intersections with a view's [ClipVector]($core-geometry).\n * @see [[ClipStyleProps.cutStyle]].\n * @public\n * @extensions\n */\nexport interface CutStyleProps {\n /** If defined, overrides aspects of the view's [[ViewFlags]] when drawing the cut geometry. */\n viewflags?: ViewFlagOverrides;\n /** If defined, overrides the view's [[HiddenLine.Settings]] when drawing the cut geometry. */\n hiddenLine?: HiddenLine.SettingsProps;\n /** If defined, overrides aspects of the cut geometry's symbology. */\n appearance?: FeatureAppearanceProps;\n}\n\n/** As part of a [[ClipStyle]], describes how section-cut graphics should be displayed.\n * @note Section-cut graphics are only produced if [[ClipStyle.produceCutGeometry]] is `true`.\n * @public\n */\nexport class CutStyle {\n /** Selectively overrides some of the view's [[ViewFlags]] when drawing the section-cut graphics. */\n public readonly viewflags: Readonly<ViewFlagOverrides>;\n /** If defined, overrides the settings the view uses to draw the edges of the section-cut graphics. */\n public readonly hiddenLine?: HiddenLine.Settings;\n /** If defined, overrides aspects of the symbology of the section-cut graphics. */\n public readonly appearance?: FeatureAppearance;\n\n /** The default CutStyle, configured to draw the section-cut graphics using the view's settings, with no overrides. */\n public static readonly defaults = new CutStyle();\n\n private constructor(viewflags?: Readonly<ViewFlagOverrides>, hiddenLine?: HiddenLine.Settings, appearance?: FeatureAppearance) {\n this.viewflags = viewflags ?? {};\n if (hiddenLine && !hiddenLine.matchesDefaults)\n this.hiddenLine = hiddenLine;\n\n if (appearance && !appearance.matchesDefaults)\n this.appearance = appearance;\n }\n\n /** Create a CutStyle from its components. */\n public static create(viewflags?: Readonly<ViewFlagOverrides>, hiddenLine?: HiddenLine.Settings, appearance?: FeatureAppearance): CutStyle {\n if ((viewflags && JsonUtils.isNonEmptyObject(viewflags)) || (hiddenLine && !hiddenLine.matchesDefaults) || (appearance && !appearance.matchesDefaults))\n return new CutStyle(viewflags, hiddenLine, appearance);\n\n return this.defaults;\n }\n\n public static fromJSON(props?: CutStyleProps): CutStyle {\n if (JsonUtils.isNonEmptyObject(props)) {\n const viewflags = { ...props?.viewflags };\n const hiddenLine = props?.hiddenLine ? HiddenLine.Settings.fromJSON(props.hiddenLine) : undefined;\n const appearance = props?.appearance ? FeatureAppearance.fromJSON(props.appearance) : undefined;\n\n return this.create(viewflags, hiddenLine, appearance);\n } else {\n return this.defaults;\n }\n }\n\n /** Return JSON representation. The representation is `undefined` if this style matches the default style. */\n public toJSON(): CutStyleProps | undefined {\n if (this.matchesDefaults)\n return undefined;\n\n const props: CutStyleProps = {};\n if (JsonUtils.isNonEmptyObject(this.viewflags))\n props.viewflags = this.viewflags;\n\n if (this.hiddenLine && !this.hiddenLine.matchesDefaults)\n props.hiddenLine = this.hiddenLine?.toJSON();\n\n if (this.appearance && !this.appearance.matchesDefaults)\n props.appearance = this.appearance.toJSON();\n\n return props;\n }\n\n /** Returns true if this style matches the default style - that is, it overrides none of the view's settings. */\n public get matchesDefaults(): boolean {\n if (this === CutStyle.defaults)\n return true;\n\n return !JsonUtils.isNonEmptyObject(this.viewflags) && (!this.hiddenLine || this.hiddenLine.matchesDefaults) && (!this.appearance || this.appearance.matchesDefaults);\n }\n}\n\n/** Wire format describing a [[ClipIntersectionStyle]].\n * @see [[ClipStyleProps.ClipIntersectionStyle]].\n * @public\n * @extensions\n */\nexport interface ClipIntersectionStyleProps {\n /** Color to apply to intersection of geometry and clip planes, default white */\n color?: RgbColorProps;\n /** Number of pixels to be considered intersecting the clip plane, default 1 */\n width?: number;\n}\n\n/** As part of a [[ClipStyle]], describes how to colorize geometry intersecting the clip planes.\n * @note Edges are highlighted only if [[ClipStyle.ClipIntersectionStyle]] is `true`.\n * @public\n * @extensions\n */\nexport class ClipIntersectionStyle {\n /** Color to apply to intersection of geometry and clip planes, default white */\n public readonly color: RgbColor;\n /** Number of pixels to be considered intersecting the clip plane, default 1 */\n public readonly width: number;\n\n private constructor(color: RgbColor = RgbColor.fromColorDef(ColorDef.white), width: number = 1) {\n this.color = color;\n this.width = width;\n }\n /** Create a highlight from its components. */\n public static create(color?: RgbColor, width?: number): ClipIntersectionStyle {\n if (!color && !width)\n return this.defaults;\n\n return new ClipIntersectionStyle(color, width);\n }\n\n public static readonly defaults = new ClipIntersectionStyle();\n\n public static fromJSON(props?: ClipIntersectionStyleProps): ClipIntersectionStyle {\n if (props === undefined) {\n return ClipIntersectionStyle.defaults;\n }\n\n const color = props.color ? RgbColor.fromJSON(props.color) : RgbColor.fromColorDef(ColorDef.white);\n const width = props.width ? props.width : 1;\n return new ClipIntersectionStyle(color, width);\n }\n\n /** The JSON representation of this style. It is `undefined` if this style matches the defaults. */\n public toJSON(): ClipIntersectionStyleProps | undefined {\n const props: ClipIntersectionStyleProps = {};\n\n if (this.matchesDefaults) {\n return undefined;\n }\n\n if (this.color)\n props.color = this.color.toJSON();\n\n if (this.width)\n props.width = this.width;\n\n return props;\n }\n\n public get matchesDefaults(): boolean {\n if (this === ClipIntersectionStyle.defaults)\n return true;\n\n return !this.color && !this.width;\n }\n}\n\n/** Arguments supplied to [[ClipStyle.create]].\n * @public\n * @extensions\n */\nexport interface ClipStyleCreateArgs {\n /** If `true`, geometry will be produced at the clip planes in a 3d view.\n * - Solids (closed volumes) will produce facets on the clip planes.\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\n */\n produceCutGeometry?: boolean;\n /** If `true`, intersection of geometry and clip planes will be colorized */\n colorizeIntersection?: boolean;\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\n cutStyle?: CutStyle;\n /** If defined, geometry inside the clip planes will be drawn in this color. */\n insideColor?: RgbColor;\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\n outsideColor?: RgbColor;\n /** Controls the style of the intersection of geometry and clip planes */\n intersectionStyle?: ClipIntersectionStyle;\n}\n\n/** Wire format describing a [[ClipStyle]].\n * @see [[DisplayStyleSettingsProps.clipStyle]].\n * @public\n * @extensions\n */\nexport interface ClipStyleProps {\n /** If `true`, geometry will be produced at the clip planes in a 3d view.\n * - Solids (closed volumes) will produce facets on the clip planes.\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\n */\n produceCutGeometry?: boolean;\n /** If 'true', intersection of geometry and clip planes will be colorized */\n colorizeIntersection?: boolean;\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\n cutStyle?: CutStyleProps;\n /** If defined, geometry inside the clip planes will be drawn in this color. */\n insideColor?: RgbColorProps;\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\n outsideColor?: RgbColorProps;\n /** Controls the style of the intersection of geometry and clip planes */\n intersectionStyle?: ClipIntersectionStyleProps;\n}\n\n/** Describes symbology and behavior applied to a [ClipVector]($core-geometry) when applied to a [ViewState]($frontend) or [[ModelClipGroup]].\n * @see [[DisplayStyleSettings.clipStyle]].\n * @public\n */\nexport class ClipStyle {\n /** If `true`, geometry will be produced at the clip planes.\n * - Solids (closed volumes) will produce facets on the clip planes.\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\n */\n public readonly produceCutGeometry: boolean;\n /** If 'true', intersection of geometry and clip planes will be colorized */\n public readonly colorizeIntersection: boolean;\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\n public readonly cutStyle: CutStyle;\n /** If defined, geometry inside the clip planes will be drawn in this color. */\n public readonly insideColor?: RgbColor;\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\n public readonly outsideColor?: RgbColor;\n /** Controls the style of the intersection of geometry and clip planes */\n public readonly intersectionStyle?: ClipIntersectionStyle;\n\n /** The default style, which overrides none of the view's settings. */\n public static readonly defaults = new ClipStyle(false, false, CutStyle.defaults, undefined, undefined, undefined);\n\n private constructor(produceCutGeometry: boolean, colorizeIntersection: boolean, cutStyle: CutStyle, inside: RgbColor | undefined, outside: RgbColor | undefined, intersectionStyle: ClipIntersectionStyle | undefined) {\n this.produceCutGeometry = produceCutGeometry;\n this.colorizeIntersection = colorizeIntersection;\n this.cutStyle = cutStyle;\n this.insideColor = inside;\n this.outsideColor = outside;\n this.intersectionStyle = intersectionStyle;\n }\n\n /** @deprecated in 4.x. Use [[create(style: ClipStyleCreateArgs]] */\n public static create(produceCutGeometry: boolean, cutStyle: CutStyle, insideColor?: RgbColor, outsideColor?: RgbColor): ClipStyle;\n\n /** Create a style from its components. */\n public static create(style: ClipStyleCreateArgs): ClipStyle;\n\n /** @internal */\n public static create(styleOrProduceCutGeometry: ClipStyleCreateArgs | boolean, cutStyle?: CutStyle, insideColor?: RgbColor, outsideColor?: RgbColor): ClipStyle {\n\n if (typeof styleOrProduceCutGeometry === \"boolean\") {\n cutStyle = cutStyle === undefined ? CutStyle.defaults : cutStyle;\n\n if (!styleOrProduceCutGeometry && cutStyle.matchesDefaults && !insideColor && !outsideColor) {\n return this.defaults;\n }\n\n return new ClipStyle(styleOrProduceCutGeometry, false, cutStyle, insideColor, outsideColor, undefined);\n }\n\n const style = styleOrProduceCutGeometry;\n if (!style.produceCutGeometry && !style.colorizeIntersection && (!style.cutStyle || style.cutStyle.matchesDefaults) && !style.insideColor && !style.outsideColor && !style.intersectionStyle)\n return this.defaults;\n\n const produceCutGeometry = style.produceCutGeometry ? true : false;\n const colorizeIntersection = style.colorizeIntersection ? true : false;\n cutStyle = style.cutStyle === undefined ? CutStyle.defaults : style.cutStyle;\n\n return new ClipStyle(produceCutGeometry, colorizeIntersection, cutStyle, style.insideColor, style.outsideColor, style.intersectionStyle);\n }\n\n public static fromJSON(props?: ClipStyleProps): ClipStyle {\n if (JsonUtils.isNonEmptyObject(props)) {\n const produceCutGeometry = props.produceCutGeometry ?? false;\n const colorizeIntersection = props.colorizeIntersection ? true : false;\n const cutStyle = CutStyle.fromJSON(props.cutStyle);\n const insideColor = props.insideColor ? RgbColor.fromJSON(props.insideColor) : undefined;\n const outsideColor = props.outsideColor ? RgbColor.fromJSON(props.outsideColor) : undefined;\n const intersectionStyle = props.intersectionStyle ? ClipIntersectionStyle.fromJSON(props.intersectionStyle) : undefined;\n\n return this.create({produceCutGeometry, colorizeIntersection, cutStyle, insideColor, outsideColor, intersectionStyle});\n }\n\n return this.defaults;\n }\n\n /** The JSON representation of this style. It is `undefined` if this style matches the defaults. */\n public toJSON(): ClipStyleProps | undefined {\n if (this.matchesDefaults)\n return undefined;\n\n const props: ClipStyleProps = {};\n if (this.produceCutGeometry)\n props.produceCutGeometry = true;\n\n if (this.colorizeIntersection)\n props.colorizeIntersection = true;\n\n const cutStyle = this.cutStyle.toJSON();\n if (cutStyle) {\n assert(!this.cutStyle.matchesDefaults);\n props.cutStyle = cutStyle;\n }\n\n if (this.insideColor)\n props.insideColor = this.insideColor.toJSON();\n\n if (this.outsideColor)\n props.outsideColor = this.outsideColor.toJSON();\n\n if (this.intersectionStyle)\n props.intersectionStyle = this.intersectionStyle.toJSON();\n\n return props;\n }\n\n /** Returns true if this style matches the [[ClipStyle.defaults]] - that is, it overrides no settings from the view. */\n public get matchesDefaults(): boolean {\n if (this === ClipStyle.defaults)\n return true;\n\n return !this.produceCutGeometry && !this.colorizeIntersection && !this.insideColor && !this.outsideColor && this.cutStyle.matchesDefaults && !this.intersectionStyle;\n }\n}\n"]}
|
package/lib/esm/Code.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Code.js","sourceRoot":"","sources":["../../src/Code.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAc,IAAI,EAAc,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAwB9E;;;GAGG;AACH,MAAM,OAAO,IAAI;IAKf;;OAEG;IACH,IAAW,KAAK,KAAK,OAAO,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC;IAChD,IAAW,KAAK,CAAC,GAAW,IAAI,IAAI,CAAC,MAAM,GAAG,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAG5D,YAAY,SAAoB;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC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aAAa,CAAC,gBAAgB,CAAC,cAAc,KAAK,GAAG;YACvD,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC;;YAE/C,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,aAAa,GAAG,SAAS,CAAC;IACxD,CAAC;IAED;;OAEG;IACH,IAAW,mBAAmB;QAC5B,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,kBAAkB,IAAI,IAAI,CAAC;IAC1D,CAAC;IACD,IAAW,mBAAmB,CAAC,KAAc;QAC3C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI;YACvB,IAAI,CAAC,UAAU,CAAC,IAAI,GAAG,EAAE,CAAC;QAE5B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;IAClD,CAAC;CACF","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 Codes\r\n */\r\n\r\nimport { GuidString, Id64, Id64String, JsonUtils } from \"@itwin/core-bentley\";\r\nimport { IModel } from \"./IModel\";\r\n\r\n/**\r\n * The ElementId of the element that defines the scope for a Code value.\r\n * @note For insert or update, you may supply the FederationGuid of the scope element and it will be converted to the ElementId of that element.\r\n * @public\r\n * @extensions\r\n */\r\nexport type CodeScopeProps = Id64String | GuidString;\r\n\r\n/** The parameters that define a Code\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CodeProps {\r\n /** Either the stringified 64-bit Id of the CodeSpec for this code, or the name of the CodeSpec. */\r\n spec: Id64String | string;\r\n /** Either the ElementId or the FederationGuid of the element that provides the scope for this code. */\r\n scope: CodeScopeProps;\r\n /** the value of this code. May be undefined. */\r\n value?: string;\r\n}\r\n\r\n/**\r\n * A three-part structure containing information about the [Code]($docs/bis/guide/fundamentals/codes) of an Element\r\n * @public\r\n */\r\nexport class Code implements CodeProps {\r\n /** The id of the [CodeSpec]($docs/bis/guide/fundamentals/codes.md#codespec) of the Element */\r\n public spec: Id64String;\r\n /** The [CodeScope]($docs/bis/guide/fundamentals/codes.md#codescope-property) of the Element */\r\n public scope: Id64String;\r\n /** The [CodeValue]($docs/bis/guide/fundamentals/codes.md#codevalue-property) of the Element\r\n * @note Leading and trailing whitespace is invalid so is automatically trimmed.\r\n */\r\n public get value() { return this._value ?? \"\"; }\r\n public set value(val: string) { this._value = val?.trim(); }\r\n private _value?: string;\r\n\r\n constructor(codeProps: CodeProps) {\r\n this.spec = Id64.fromJSON(codeProps.spec);\r\n this.scope = JsonUtils.asString(codeProps.scope);\r\n this.value = JsonUtils.asString(codeProps.value);\r\n }\r\n\r\n /** Create an empty, non-unique code with no special meaning. */\r\n public static createEmpty(): Code {\r\n const id = Id64.fromLocalAndBriefcaseIds(1, 0);\r\n return new Code({ spec: id, scope: id });\r\n }\r\n\r\n public static fromJSON(json?: any): Code { return json ? new Code(json) : Code.createEmpty(); }\r\n public toJSON(): CodeProps { return { spec: this.spec, scope: this.scope, value: this.value }; }\r\n public equals(other: Code): boolean { return Code.equalCodes(this, other); }\r\n /** @internal */\r\n public static equalCodes(c1: CodeProps, c2: CodeProps): boolean {\r\n return c1.spec === c2.spec && c1.scope === c2.scope && c1.value === c2.value;\r\n }\r\n /** Determine whether this Code is valid. */\r\n public static isValid(c: CodeProps): boolean { return Id64.isValidId64(c.spec); }\r\n /** Determine if this code is valid but not otherwise meaningful (and therefore not necessarily unique) */\r\n public static isEmpty(c: CodeProps): boolean { return this.isValid(c) && (c.value === undefined || c.value === \"\"); }\r\n\r\n public toString(): string { return `[Code: ${this.spec}, ${this.scope}, ${this.value}]`; }\r\n}\r\n\r\n/** Names of the internal BIS CodeSpecs. These names match those specified by the native library.\r\n * For other domains, the best practice is to include the domain name or alias as part of the CodeSpec name to ensure global uniqueness.\r\n * @public\r\n* @extensions\r\n* @see [CodeSpec]($docs/bis/guide/fundamentals/codes.md#codespec)\r\n */\r\nexport enum BisCodeSpec {\r\n /** The name of the standard [[CodeSpec]] used when creating *empty* codes.\r\n * @see [[Code.createEmpty]]\r\n */\r\n nullCodeSpec = \"bis:NullCodeSpec\",\r\n /** @internal */\r\n annotationFrameStyle = \"bis:AnnotationFrameStyle\",\r\n /** @internal */\r\n annotationLeaderStyle = \"bis:AnnotationLeaderStyle\",\r\n /** @internal */\r\n annotationTextStyle = \"bis:AnnotationTextStyle\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [AuxCoordSystem2d]($backend) elements.\r\n * @see [AuxCoordSystem2d.createCode]($backend)\r\n */\r\n auxCoordSystem2d = \"bis:AuxCoordSystem2d\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [AuxCoordSystem3d]($backend) elements.\r\n * @see [AuxCoordSystem3d.createCode]($backend)\r\n */\r\n auxCoordSystem3d = \"bis:AuxCoordSystem3d\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [AuxCoordSystemSpatial]($backend) elements.\r\n * @see [AuxCoordSystemSpatial.createCode]($backend)\r\n */\r\n auxCoordSystemSpatial = \"bis:AuxCoordSystemSpatial\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [CategorySelector]($backend) elements.\r\n * @see [CategorySelector.createCode]($backend)\r\n */\r\n categorySelector = \"bis:CategorySelector\",\r\n /** @internal */\r\n colorBook = \"bis:ColorBook\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [DisplayStyle]($backend) elements.\r\n * @see [DisplayStyle.createCode]($backend)\r\n */\r\n displayStyle = \"bis:DisplayStyle\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [Drawing]($backend) elements.\r\n * @see [Drawing.createCode]($backend)\r\n */\r\n drawing = \"bis:Drawing\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [DrawingCategory]($backend) elements.\r\n * @see [DrawingCategory.createCode]($backend)\r\n */\r\n drawingCategory = \"bis:DrawingCategory\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [ExternalSource]($backend) elements.\r\n * @note This CodeSpec is not automatically created, so use [ExternalSource.ensureCodeSpec]($backend) to make sure that it exists.\r\n * @see [ExternalSource.createCode]($backend)\r\n */\r\n externalSource = \"bis:ExternalSource\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [ExternalSourceAttachment]($backend) elements.\r\n * @note This CodeSpec is not automatically created, so use [ExternalSourceAttachment.ensureCodeSpec]($backend) to make sure that it exists.\r\n * @see [ExternalSource.createCode]($backend)\r\n */\r\n externalSourceAttachment = \"bis:ExternalSourceAttachment\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [GeometryPart]($backend) elements.\r\n * @see [GeometryPart.createCode]($backend)\r\n */\r\n geometryPart = \"bis:GeometryPart\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [GraphicalType2d]($backend) elements.\r\n * @see [GraphicalType2d.createCode]($backend)\r\n */\r\n graphicalType2d = \"bis:GraphicalType2d\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [LineStyle]($backend) elements.\r\n * @see [LineStyle.createCode]($backend)\r\n */\r\n lineStyle = \"bis:LineStyle\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [LinkElement]($backend) elements.\r\n * @see [LinkElement.createCode]($backend)\r\n */\r\n linkElement = \"bis:LinkElement\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [ModelSelector]($backend) elements.\r\n * @see [ModelSelector.createCode]($backend)\r\n */\r\n modelSelector = \"bis:ModelSelector\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [PhysicalMaterial]($backend) elements.\r\n * @see [PhysicalMaterial.createCode]($backend)\r\n */\r\n physicalMaterial = \"bis:PhysicalMaterial\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [PhysicalType]($backend) elements.\r\n * @see [PhysicalType.createCode]($backend)\r\n */\r\n physicalType = \"bis:PhysicalType\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [InformationPartitionElement]($backend) elements.\r\n * @see [InformationPartitionElement.createCode]($backend)\r\n */\r\n informationPartitionElement = \"bis:InformationPartitionElement\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [RenderMaterialElement]($backend) elements.\r\n * @see [RenderMaterialElement.createCode]($backend)\r\n */\r\n renderMaterial = \"bis:RenderMaterial\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [Sheet]($backend) elements.\r\n * @see [Sheet.createCode]($backend)\r\n */\r\n sheet = \"bis:Sheet\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [SheetIndex]($backend) elements.\r\n * @see [SheetIndex.createCode]($backend)\r\n */\r\n sheetIndex = \"bis:SheetIndex\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [SheetIndexEntry]($backend) elements.\r\n * @see [SheetIndexEntry.createCode]($backend)\r\n */\r\n sheetIndexEntry = \"bis:SheetIndexEntry\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [SpatialCategory]($backend) elements.\r\n * @see [SpatialCategory.createCode]($backend)\r\n */\r\n spatialCategory = \"bis:SpatialCategory\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [SpatialLocationType]($backend) elements.\r\n * @see [SpatialLocationType.createCode]($backend)\r\n */\r\n spatialLocationType = \"bis:SpatialLocationType\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [SubCategory]($backend) elements.\r\n * @see [SubCategory.createCode]($backend)\r\n */\r\n subCategory = \"bis:SubCategory\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [Subject]($backend) elements.\r\n * @see [Subject.createCode]($backend)\r\n */\r\n subject = \"bis:Subject\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [TemplateRecipe2d]($backend) elements.\r\n * @see [TemplateRecipe2d.createCode]($backend)\r\n */\r\n templateRecipe2d = \"bis:TemplateRecipe2d\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [TemplateRecipe3d]($backend) elements.\r\n * @see [TemplateRecipe3d.createCode]($backend)\r\n */\r\n templateRecipe3d = \"bis:TemplateRecipe3d\",\r\n /** @internal */\r\n textAnnotationSeed = \"bis:TextAnnotationSeed\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [Texture]($backend) elements.\r\n * @see [Texture.createCode]($backend)\r\n */\r\n texture = \"bis:Texture\",\r\n /** The name of the standard [[CodeSpec]] used when creating codes for [ViewDefinition]($backend) elements.\r\n * @see [ViewDefinition.createCode]($backend)\r\n */\r\n viewDefinition = \"bis:ViewDefinition\",\r\n}\r\n\r\n/** The scope of the Code.\r\n * @public\r\n */\r\nexport namespace CodeScopeSpec {\r\n /** The standard ways the CodeScope can be specified.\r\n * @public\r\n */\r\n export enum Type {\r\n /** The Code value must be unique within (at least) the iModel repository */\r\n Repository = 1,\r\n /** The Code value must be unique within the scope of the Model */\r\n Model = 2,\r\n /** The Code value must be unique among other children of the same parent element */\r\n ParentElement = 3,\r\n /** The Code value must be unique among other elements also scoped by the same element */\r\n RelatedElement = 4,\r\n }\r\n\r\n /**\r\n * Requirements for how the CodeScope Element is identified.\r\n * @public\r\n */\r\n export enum ScopeRequirement {\r\n /** The ElementId of CodeScope element identifies its scope. Used for Codes that are unique only within a single iModel. */\r\n ElementId = 1,\r\n /** The FederationGuid of the CodeScope element identifies its scope. Used for Codes that are globally unique. */\r\n FederationGuid = 2,\r\n }\r\n}\r\n\r\n/**\r\n * The JSON properties of a CodeSpec\r\n * @public\r\n */\r\nexport interface CodeSpecProperties {\r\n scopeSpec: {\r\n /** the type of CodeSpec */\r\n type: CodeScopeSpec.Type;\r\n /** If true, the federationGuid of the scope element identifies the scope, for Codes that are globally unique.\r\n * Otherwise, the ElementId of the scopeElement is used, for Codes that are scoped only within a single iModel.\r\n */\r\n fGuidRequired?: boolean;\r\n /** The relationship className (in the form \"schema:class\"), when `type` is `CodeScopeSpec.Type.RelatedElement` */\r\n relationship?: string;\r\n };\r\n spec?: {\r\n isManagedWithDgnDb?: boolean;\r\n };\r\n version?: string;\r\n}\r\n\r\n/** A [Code Specification]($docs/bis/guide/references/glossary#codespec) captures the rules for encoding and decoding significant business information into\r\n * and from a Code (string). This specification is used to generate and validate Codes.\r\n *\r\n * A CodeSpec defines the format of a Code for a certain type of Element in an IModel.\r\n * A CodeSpec can identify an external system that maintains and/or assigns Codes.\r\n * @public\r\n */\r\nexport class CodeSpec {\r\n /** The iModel holding this CodeSpec. */\r\n public iModel: IModel;\r\n /** The id of this CodeSpec. */\r\n public id: Id64String;\r\n /** The name of this CodeSpec. */\r\n public name: string;\r\n /** The JSON properties for this CodeSpec.\r\n * @note Use the getters and setters instead of accessing this directly.\r\n * @internal\r\n */\r\n public properties: CodeSpecProperties;\r\n\r\n private constructor(iModel: IModel, id: Id64String, name: string, properties?: CodeSpecProperties) {\r\n this.iModel = iModel;\r\n this.id = id;\r\n this.name = name;\r\n this.properties = properties ?? { scopeSpec: { type: CodeScopeSpec.Type.Repository } };\r\n }\r\n\r\n /** Create a new CodeSpec from the specified parameters\r\n * > Note: CodeSpec.id will not be valid until inserted\r\n * @see [CodeSpecs.insert]($backend)\r\n */\r\n public static create(iModel: IModel, name: string, scopeType: CodeScopeSpec.Type, scopeReq?: CodeScopeSpec.ScopeRequirement): CodeSpec {\r\n const props: CodeSpecProperties = { scopeSpec: { type: scopeType } };\r\n if (scopeReq)\r\n props.scopeSpec.fGuidRequired = scopeReq === CodeScopeSpec.ScopeRequirement.FederationGuid;\r\n\r\n return new CodeSpec(iModel, Id64.invalid, name, props);\r\n }\r\n\r\n /** Create a new CodeSpec directly from JSON. Used internally by the CodeSpecs.load function.\r\n * @internal\r\n */\r\n public static createFromJson(iModel: IModel, id: Id64String, name: string, properties?: CodeSpecProperties): CodeSpec {\r\n return new CodeSpec(iModel, id, name, properties);\r\n }\r\n\r\n /** Will be true if the id of this CodeSpec is valid. */\r\n public get isValid(): boolean { return Id64.isValid(this.id); }\r\n public get isExternal(): boolean {\r\n return true === this.properties.scopeSpec.fGuidRequired;\r\n }\r\n\r\n /** The scope type of this CodeSpec. */\r\n public get scopeType(): CodeScopeSpec.Type { return this.properties.scopeSpec.type; }\r\n public set scopeType(scopeType: CodeScopeSpec.Type) { this.properties.scopeSpec.type = scopeType; }\r\n\r\n /** Will be `CodeScopeSpec.ScopeRequirement.FederationGuid` if the scoping element is required to have a FederationGuid or\r\n * CodeScopeSpec.ScopeRequirement.ElementId` otherwise (the default).\r\n */\r\n public get scopeReq(): CodeScopeSpec.ScopeRequirement {\r\n return this.properties.scopeSpec.fGuidRequired ? CodeScopeSpec.ScopeRequirement.FederationGuid : CodeScopeSpec.ScopeRequirement.ElementId;\r\n }\r\n public set scopeReq(req: CodeScopeSpec.ScopeRequirement) {\r\n if (CodeScopeSpec.ScopeRequirement.FederationGuid === req)\r\n this.properties.scopeSpec.fGuidRequired = true;\r\n else\r\n this.properties.scopeSpec.fGuidRequired = undefined;\r\n }\r\n\r\n /** Will be true if the codes associated with this CodeSpec are managed along with the iModel and false if the codes are managed by an external service.\r\n * @deprecated in 3.6 Use scopeReq instead.\r\n */\r\n public get isManagedWithIModel(): boolean {\r\n return this.properties.spec?.isManagedWithDgnDb ?? true;\r\n }\r\n public set isManagedWithIModel(value: boolean) {\r\n if (!this.properties.spec)\r\n this.properties.spec = {};\r\n\r\n this.properties.spec.isManagedWithDgnDb = value;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Code.js","sourceRoot":"","sources":["../../src/Code.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAc,IAAI,EAAc,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAwB9E;;;GAGG;AACH,MAAM,OAAO,IAAI;IAKf;;OAEG;IACH,IAAW,KAAK,KAAK,OAAO,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC;IAChD,IAAW,KAAK,CAAC,GAAW,IAAI,IAAI,CAAC,MAAM,GAAG,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAG5D,Y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Ac,CAAC,CAAC,CAAC,aAAa,CAAC,gBAAgB,CAAC,SAAS,CAAC;IAC5I,CAAC;IACD,IAAW,QAAQ,CAAC,GAAmC;QACrD,IAAI,aAAa,CAAC,gBAAgB,CAAC,cAAc,KAAK,GAAG;YACvD,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC;;YAE/C,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,aAAa,GAAG,SAAS,CAAC;IACxD,CAAC;IAED;;OAEG;IACH,IAAW,mBAAmB;QAC5B,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,kBAAkB,IAAI,IAAI,CAAC;IAC1D,CAAC;IACD,IAAW,mBAAmB,CAAC,KAAc;QAC3C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI;YACvB,IAAI,CAAC,UAAU,CAAC,IAAI,GAAG,EAAE,CAAC;QAE5B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;IAClD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Codes\n */\n\nimport { GuidString, Id64, Id64String, JsonUtils } from \"@itwin/core-bentley\";\nimport { IModel } from \"./IModel\";\n\n/**\n * The ElementId of the element that defines the scope for a Code value.\n * @note For insert or update, you may supply the FederationGuid of the scope element and it will be converted to the ElementId of that element.\n * @public\n * @extensions\n */\nexport type CodeScopeProps = Id64String | GuidString;\n\n/** The parameters that define a Code\n * @public\n * @extensions\n */\nexport interface CodeProps {\n /** Either the stringified 64-bit Id of the CodeSpec for this code, or the name of the CodeSpec. */\n spec: Id64String | string;\n /** Either the ElementId or the FederationGuid of the element that provides the scope for this code. */\n scope: CodeScopeProps;\n /** the value of this code. May be undefined. */\n value?: string;\n}\n\n/**\n * A three-part structure containing information about the [Code]($docs/bis/guide/fundamentals/codes) of an Element\n * @public\n */\nexport class Code implements CodeProps {\n /** The id of the [CodeSpec]($docs/bis/guide/fundamentals/codes.md#codespec) of the Element */\n public spec: Id64String;\n /** The [CodeScope]($docs/bis/guide/fundamentals/codes.md#codescope-property) of the Element */\n public scope: Id64String;\n /** The [CodeValue]($docs/bis/guide/fundamentals/codes.md#codevalue-property) of the Element\n * @note Leading and trailing whitespace is invalid so is automatically trimmed.\n */\n public get value() { return this._value ?? \"\"; }\n public set value(val: string) { this._value = val?.trim(); }\n private _value?: string;\n\n constructor(codeProps: CodeProps) {\n this.spec = Id64.fromJSON(codeProps.spec);\n this.scope = JsonUtils.asString(codeProps.scope);\n this.value = JsonUtils.asString(codeProps.value);\n }\n\n /** Create an empty, non-unique code with no special meaning. */\n public static createEmpty(): Code {\n const id = Id64.fromLocalAndBriefcaseIds(1, 0);\n return new Code({ spec: id, scope: id });\n }\n\n public static fromJSON(json?: any): Code { return json ? new Code(json) : Code.createEmpty(); }\n public toJSON(): CodeProps { return { spec: this.spec, scope: this.scope, value: this.value }; }\n public equals(other: Code): boolean { return Code.equalCodes(this, other); }\n /** @internal */\n public static equalCodes(c1: CodeProps, c2: CodeProps): boolean {\n return c1.spec === c2.spec && c1.scope === c2.scope && c1.value === c2.value;\n }\n /** Determine whether this Code is valid. */\n public static isValid(c: CodeProps): boolean { return Id64.isValidId64(c.spec); }\n /** Determine if this code is valid but not otherwise meaningful (and therefore not necessarily unique) */\n public static isEmpty(c: CodeProps): boolean { return this.isValid(c) && (c.value === undefined || c.value === \"\"); }\n\n public toString(): string { return `[Code: ${this.spec}, ${this.scope}, ${this.value}]`; }\n}\n\n/** Names of the internal BIS CodeSpecs. These names match those specified by the native library.\n * For other domains, the best practice is to include the domain name or alias as part of the CodeSpec name to ensure global uniqueness.\n * @public\n* @extensions\n* @see [CodeSpec]($docs/bis/guide/fundamentals/codes.md#codespec)\n */\nexport enum BisCodeSpec {\n /** The name of the standard [[CodeSpec]] used when creating *empty* codes.\n * @see [[Code.createEmpty]]\n */\n nullCodeSpec = \"bis:NullCodeSpec\",\n /** @internal */\n annotationFrameStyle = \"bis:AnnotationFrameStyle\",\n /** @internal */\n annotationLeaderStyle = \"bis:AnnotationLeaderStyle\",\n /** @internal */\n annotationTextStyle = \"bis:AnnotationTextStyle\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [AuxCoordSystem2d]($backend) elements.\n * @see [AuxCoordSystem2d.createCode]($backend)\n */\n auxCoordSystem2d = \"bis:AuxCoordSystem2d\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [AuxCoordSystem3d]($backend) elements.\n * @see [AuxCoordSystem3d.createCode]($backend)\n */\n auxCoordSystem3d = \"bis:AuxCoordSystem3d\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [AuxCoordSystemSpatial]($backend) elements.\n * @see [AuxCoordSystemSpatial.createCode]($backend)\n */\n auxCoordSystemSpatial = \"bis:AuxCoordSystemSpatial\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [CategorySelector]($backend) elements.\n * @see [CategorySelector.createCode]($backend)\n */\n categorySelector = \"bis:CategorySelector\",\n /** @internal */\n colorBook = \"bis:ColorBook\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [DisplayStyle]($backend) elements.\n * @see [DisplayStyle.createCode]($backend)\n */\n displayStyle = \"bis:DisplayStyle\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [Drawing]($backend) elements.\n * @see [Drawing.createCode]($backend)\n */\n drawing = \"bis:Drawing\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [DrawingCategory]($backend) elements.\n * @see [DrawingCategory.createCode]($backend)\n */\n drawingCategory = \"bis:DrawingCategory\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [ExternalSource]($backend) elements.\n * @note This CodeSpec is not automatically created, so use [ExternalSource.ensureCodeSpec]($backend) to make sure that it exists.\n * @see [ExternalSource.createCode]($backend)\n */\n externalSource = \"bis:ExternalSource\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [ExternalSourceAttachment]($backend) elements.\n * @note This CodeSpec is not automatically created, so use [ExternalSourceAttachment.ensureCodeSpec]($backend) to make sure that it exists.\n * @see [ExternalSource.createCode]($backend)\n */\n externalSourceAttachment = \"bis:ExternalSourceAttachment\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [GeometryPart]($backend) elements.\n * @see [GeometryPart.createCode]($backend)\n */\n geometryPart = \"bis:GeometryPart\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [GraphicalType2d]($backend) elements.\n * @see [GraphicalType2d.createCode]($backend)\n */\n graphicalType2d = \"bis:GraphicalType2d\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [LineStyle]($backend) elements.\n * @see [LineStyle.createCode]($backend)\n */\n lineStyle = \"bis:LineStyle\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [LinkElement]($backend) elements.\n * @see [LinkElement.createCode]($backend)\n */\n linkElement = \"bis:LinkElement\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [ModelSelector]($backend) elements.\n * @see [ModelSelector.createCode]($backend)\n */\n modelSelector = \"bis:ModelSelector\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [PhysicalMaterial]($backend) elements.\n * @see [PhysicalMaterial.createCode]($backend)\n */\n physicalMaterial = \"bis:PhysicalMaterial\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [PhysicalType]($backend) elements.\n * @see [PhysicalType.createCode]($backend)\n */\n physicalType = \"bis:PhysicalType\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [InformationPartitionElement]($backend) elements.\n * @see [InformationPartitionElement.createCode]($backend)\n */\n informationPartitionElement = \"bis:InformationPartitionElement\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [RenderMaterialElement]($backend) elements.\n * @see [RenderMaterialElement.createCode]($backend)\n */\n renderMaterial = \"bis:RenderMaterial\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [Sheet]($backend) elements.\n * @see [Sheet.createCode]($backend)\n */\n sheet = \"bis:Sheet\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [SheetIndex]($backend) elements.\n * @see [SheetIndex.createCode]($backend)\n */\n sheetIndex = \"bis:SheetIndex\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [SheetIndexEntry]($backend) elements.\n * @see [SheetIndexEntry.createCode]($backend)\n */\n sheetIndexEntry = \"bis:SheetIndexEntry\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [SpatialCategory]($backend) elements.\n * @see [SpatialCategory.createCode]($backend)\n */\n spatialCategory = \"bis:SpatialCategory\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [SpatialLocationType]($backend) elements.\n * @see [SpatialLocationType.createCode]($backend)\n */\n spatialLocationType = \"bis:SpatialLocationType\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [SubCategory]($backend) elements.\n * @see [SubCategory.createCode]($backend)\n */\n subCategory = \"bis:SubCategory\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [Subject]($backend) elements.\n * @see [Subject.createCode]($backend)\n */\n subject = \"bis:Subject\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [TemplateRecipe2d]($backend) elements.\n * @see [TemplateRecipe2d.createCode]($backend)\n */\n templateRecipe2d = \"bis:TemplateRecipe2d\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [TemplateRecipe3d]($backend) elements.\n * @see [TemplateRecipe3d.createCode]($backend)\n */\n templateRecipe3d = \"bis:TemplateRecipe3d\",\n /** @internal */\n textAnnotationSeed = \"bis:TextAnnotationSeed\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [Texture]($backend) elements.\n * @see [Texture.createCode]($backend)\n */\n texture = \"bis:Texture\",\n /** The name of the standard [[CodeSpec]] used when creating codes for [ViewDefinition]($backend) elements.\n * @see [ViewDefinition.createCode]($backend)\n */\n viewDefinition = \"bis:ViewDefinition\",\n}\n\n/** The scope of the Code.\n * @public\n */\nexport namespace CodeScopeSpec {\n /** The standard ways the CodeScope can be specified.\n * @public\n */\n export enum Type {\n /** The Code value must be unique within (at least) the iModel repository */\n Repository = 1,\n /** The Code value must be unique within the scope of the Model */\n Model = 2,\n /** The Code value must be unique among other children of the same parent element */\n ParentElement = 3,\n /** The Code value must be unique among other elements also scoped by the same element */\n RelatedElement = 4,\n }\n\n /**\n * Requirements for how the CodeScope Element is identified.\n * @public\n */\n export enum ScopeRequirement {\n /** The ElementId of CodeScope element identifies its scope. Used for Codes that are unique only within a single iModel. */\n ElementId = 1,\n /** The FederationGuid of the CodeScope element identifies its scope. Used for Codes that are globally unique. */\n FederationGuid = 2,\n }\n}\n\n/**\n * The JSON properties of a CodeSpec\n * @public\n */\nexport interface CodeSpecProperties {\n scopeSpec: {\n /** the type of CodeSpec */\n type: CodeScopeSpec.Type;\n /** If true, the federationGuid of the scope element identifies the scope, for Codes that are globally unique.\n * Otherwise, the ElementId of the scopeElement is used, for Codes that are scoped only within a single iModel.\n */\n fGuidRequired?: boolean;\n /** The relationship className (in the form \"schema:class\"), when `type` is `CodeScopeSpec.Type.RelatedElement` */\n relationship?: string;\n };\n spec?: {\n isManagedWithDgnDb?: boolean;\n };\n version?: string;\n}\n\n/** A [Code Specification]($docs/bis/guide/references/glossary#codespec) captures the rules for encoding and decoding significant business information into\n * and from a Code (string). This specification is used to generate and validate Codes.\n *\n * A CodeSpec defines the format of a Code for a certain type of Element in an IModel.\n * A CodeSpec can identify an external system that maintains and/or assigns Codes.\n * @public\n */\nexport class CodeSpec {\n /** The iModel holding this CodeSpec. */\n public iModel: IModel;\n /** The id of this CodeSpec. */\n public id: Id64String;\n /** The name of this CodeSpec. */\n public name: string;\n /** The JSON properties for this CodeSpec.\n * @note Use the getters and setters instead of accessing this directly.\n * @internal\n */\n public properties: CodeSpecProperties;\n\n private constructor(iModel: IModel, id: Id64String, name: string, properties?: CodeSpecProperties) {\n this.iModel = iModel;\n this.id = id;\n this.name = name;\n this.properties = properties ?? { scopeSpec: { type: CodeScopeSpec.Type.Repository } };\n }\n\n /** Create a new CodeSpec from the specified parameters\n * > Note: CodeSpec.id will not be valid until inserted\n * @see [CodeSpecs.insert]($backend)\n */\n public static create(iModel: IModel, name: string, scopeType: CodeScopeSpec.Type, scopeReq?: CodeScopeSpec.ScopeRequirement): CodeSpec {\n const props: CodeSpecProperties = { scopeSpec: { type: scopeType } };\n if (scopeReq)\n props.scopeSpec.fGuidRequired = scopeReq === CodeScopeSpec.ScopeRequirement.FederationGuid;\n\n return new CodeSpec(iModel, Id64.invalid, name, props);\n }\n\n /** Create a new CodeSpec directly from JSON. Used internally by the CodeSpecs.load function.\n * @internal\n */\n public static createFromJson(iModel: IModel, id: Id64String, name: string, properties?: CodeSpecProperties): CodeSpec {\n return new CodeSpec(iModel, id, name, properties);\n }\n\n /** Will be true if the id of this CodeSpec is valid. */\n public get isValid(): boolean { return Id64.isValid(this.id); }\n public get isExternal(): boolean {\n return true === this.properties.scopeSpec.fGuidRequired;\n }\n\n /** The scope type of this CodeSpec. */\n public get scopeType(): CodeScopeSpec.Type { return this.properties.scopeSpec.type; }\n public set scopeType(scopeType: CodeScopeSpec.Type) { this.properties.scopeSpec.type = scopeType; }\n\n /** Will be `CodeScopeSpec.ScopeRequirement.FederationGuid` if the scoping element is required to have a FederationGuid or\n * CodeScopeSpec.ScopeRequirement.ElementId` otherwise (the default).\n */\n public get scopeReq(): CodeScopeSpec.ScopeRequirement {\n return this.properties.scopeSpec.fGuidRequired ? CodeScopeSpec.ScopeRequirement.FederationGuid : CodeScopeSpec.ScopeRequirement.ElementId;\n }\n public set scopeReq(req: CodeScopeSpec.ScopeRequirement) {\n if (CodeScopeSpec.ScopeRequirement.FederationGuid === req)\n this.properties.scopeSpec.fGuidRequired = true;\n else\n this.properties.scopeSpec.fGuidRequired = undefined;\n }\n\n /** Will be true if the codes associated with this CodeSpec are managed along with the iModel and false if the codes are managed by an external service.\n * @deprecated in 3.6 Use scopeReq instead.\n */\n public get isManagedWithIModel(): boolean {\n return this.properties.spec?.isManagedWithDgnDb ?? true;\n }\n public set isManagedWithIModel(value: boolean) {\n if (!this.properties.spec)\n this.properties.spec = {};\n\n this.properties.spec.isManagedWithDgnDb = value;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorByName.js","sourceRoot":"","sources":["../../src/ColorByName.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,yBAAyB;AACzB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,QAAQ;IACf,YAAY,EAAE,QAAQ;IACtB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,QAAQ;IACf,cAAc,EAAE,QAAQ;IACxB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,QAAQ;IACf,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,QAAQ;IACf,cAAc,EAAE,QAAQ;IACxB,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,QAAQ;IACjB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,QAAQ;IACnB,QAAQ,EAAE,QAAQ;IAClB,aAAa,EAAE,QAAQ;IACvB,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,QAAQ;IACnB,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,QAAQ;IACnB,WAAW,EAAE,QAAQ;IACrB,cAAc,EAAE,QAAQ;IACxB,UAAU,EAAE,QAAQ;IACpB,UAAU,EAAE,QAAQ;IACpB,OAAO,EAAE,QAAQ;IACjB,UAAU,EAAE,QAAQ;IACpB,YAAY,EAAE,QAAQ;I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AAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,QAAQ;IACrB,SAAS,EAAE,QAAQ;IACnB,GAAG,EAAE,QAAQ;IACb,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,QAAQ;IACnB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,UAAU,EAAE,QAAQ;IACpB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,QAAQ;CACtB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"ColorByName.js","sourceRoot":"","sources":["../../src/ColorByName.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,yBAAyB;AACzB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,QAAQ;IACf,YAAY,EAAE,QAAQ;IACtB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,QAAQ;IACf,cAAc,EAAE,QAAQ;IACxB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,QAAQ;IACf,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,QAAQ;IACf,cAAc,EAAE,QAAQ;IACxB,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,QAAQ;IACjB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,QAAQ;IACnB,QAAQ,EAAE,QAAQ;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,EAAE,QAAQ;IACb,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,WAAW,EAAE,QAAQ;IACrB,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,QAAQ;IACjB,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,QAAQ;IACrB,SAAS,EAAE,QAAQ;IACnB,GAAG,EAAE,QAAQ;IACb,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,QAAQ;IACnB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,UAAU,EAAE,QAAQ;IACpB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,QAAQ;CACtB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\n// spell-checker: disable\n/** A set of known colors by [HTML color name](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value), as a 32-bit integer in the form 0xBBGGRR (red is the low byte).\n * This is different than color values in #RRGGBB format for HTML pages (red and blue are swapped).\n * @note If your colors don't look right, likely you're using 0xRRGGBB where ColorDef expects 0xBBGGRR.\n * @public\n * @extensions\n */\nexport const ColorByName = { // eslint-disable-line @typescript-eslint/naming-convention\n aliceBlue: 0xFFF8F0,\n amber: 0x00BFFF,\n antiqueWhite: 0xD7EBFA,\n aqua: 0xFFFF00,\n aquamarine: 0xD4FF7F,\n azure: 0xFFFFF0,\n beige: 0xDCF5F5,\n bisque: 0xC4E4FF,\n black: 0x000000,\n blanchedAlmond: 0xCDEBFF,\n blue: 0xFF0000,\n blueViolet: 0xE22B8A,\n brown: 0x2A2AA5,\n burlyWood: 0x87B8DE,\n cadetBlue: 0xA09E5F,\n chartreuse: 0x00FF7F,\n chocolate: 0x1E69D2,\n coral: 0x507FFF,\n cornflowerBlue: 0xED9564,\n cornSilk: 0xDCF8FF,\n crimson: 0x3C14DC,\n cyan: 0xFFFF00,\n darkBlue: 0x8B0000,\n darkBrown: 0x214365,\n darkCyan: 0x8B8B00,\n darkGoldenrod: 0x0B86B8,\n darkGray: 0xA9A9A9,\n darkGreen: 0x006400,\n darkGrey: 0xA9A9A9,\n darkKhaki: 0x6BB7BD,\n darkMagenta: 0x8B008B,\n darkOliveGreen: 0x2F6B55,\n darkOrange: 0x008CFF,\n darkOrchid: 0xCC3299,\n darkRed: 0x00008B,\n darkSalmon: 0x7A96E9,\n darkSeagreen: 0x8FBC8F,\n darkSlateBlue: 0x8B3D48,\n darkSlateGray: 0x4F4F2F,\n darkSlateGrey: 0x4F4F2F,\n darkTurquoise: 0xD1CE00,\n darkViolet: 0xD30094,\n deepPink: 0x9314FF,\n deepSkyBlue: 0xFFBF00,\n dimGray: 0x696969,\n dimGrey: 0x696969,\n dodgerBlue: 0xFF901E,\n fireBrick: 0x2222B2,\n floralWhite: 0xF0FAFF,\n forestGreen: 0x228B22,\n fuchsia: 0xFF00FF,\n gainsboro: 0xDCDCDC,\n ghostWhite: 0xFFF8F8,\n gold: 0x00D7FF,\n goldenrod: 0x20A5DA,\n gray: 0x808080,\n green: 0x008000,\n greenYellow: 0x2FFFAD,\n grey: 0x808080,\n honeydew: 0xF0FFF0,\n hotPink: 0xB469FF,\n indianRed: 0x5C5CCD,\n indigo: 0x82004B,\n ivory: 0xF0FFFF,\n khaki: 0x8CE6F0,\n lavender: 0xFAE6E6,\n lavenderBlush: 0xF5F0FF,\n lawnGreen: 0x00FC7C,\n lemonChiffon: 0xCDFAFF,\n lightBlue: 0xE6D8AD,\n lightCoral: 0x8080F0,\n lightCyan: 0xFFFFE0,\n lightGoldenrodYellow: 0xD2FAFA,\n lightGray: 0xD3D3D3,\n lightGreen: 0x90EE90,\n lightGrey: 0xD3D3D3,\n lightPink: 0xC1B6FF,\n lightSalmon: 0x7AA0FF,\n lightSeagreen: 0xAAB220,\n lightSkyBlue: 0xFACE87,\n lightSlateGray: 0x998877,\n lightSlateGrey: 0x998877,\n lightSteelBlue: 0xDEC4B0,\n lightyellow: 0xE0FFFF,\n lime: 0x00FF00,\n limeGreen: 0x32CD32,\n linen: 0xE6F0FA,\n magenta: 0xFF00FF,\n maroon: 0x000080,\n mediumAquamarine: 0xAACD66,\n mediumBlue: 0xCD0000,\n mediumOrchid: 0xD355BA,\n mediumPurple: 0xDB7093,\n mediumSeaGreen: 0x71B33C,\n mediumSlateBlue: 0xEE687B,\n mediumSpringGreen: 0x9AFA00,\n mediumTurquoise: 0xCCD148,\n mediumVioletRed: 0x8515C7,\n midnightBlue: 0x701919,\n mintCream: 0xFAFFF5,\n mistyRose: 0xE1E4FF,\n moccasin: 0xB5E4FF,\n navajoWhite: 0xADDEFF,\n navy: 0x800000,\n oldLace: 0xE6F5FD,\n olive: 0x008080,\n oliveDrab: 0x238E6B,\n orange: 0x00A5FF,\n orangeRed: 0x0045FF,\n orchid: 0xD670DA,\n paleGoldenrod: 0xAAE8EE,\n paleGreen: 0x98FB98,\n paleTurquoise: 0xEEEEAF,\n paleVioletRed: 0x9370DB,\n papayaWhip: 0xD5EFFF,\n peachPuff: 0xB9DAFF,\n peru: 0x3F85CD,\n pink: 0xCBC0FF,\n plum: 0xDDA0DD,\n powderBlue: 0xE6E0B0,\n purple: 0x800080,\n rebeccaPurple: 0x993366,\n red: 0x0000FF,\n rosyBrown: 0x8F8FBC,\n royalBlue: 0xE16941,\n saddleBrown: 0x13458B,\n salmon: 0x7280FA,\n sandyBrown: 0x60A4F4,\n seaGreen: 0x578B2E,\n seaShell: 0xEEF5FF,\n sienna: 0x2D52A0,\n silver: 0xC0C0C0,\n skyBlue: 0xEBCE87,\n slateBlue: 0xCD5A6A,\n slateGray: 0x908070,\n slateGrey: 0x908070,\n snow: 0xFAFAFF,\n springGreen: 0x7FFF00,\n steelBlue: 0xB48246,\n tan: 0x8CB4D2,\n teal: 0x808000,\n thistle: 0xD8BFD8,\n tomato: 0x4763FF,\n turquoise: 0xD0E040,\n violet: 0xEE82EE,\n wheat: 0xB3DEF5,\n white: 0xFFFFFF,\n whiteSmoke: 0xF5F5F5,\n yellow: 0x00FFFF,\n yellowGreen: 0x32CD9A,\n};\n"]}
|