@itwin/core-common 4.10.0-dev.8 → 5.0.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -1
- package/lib/cjs/BackendTypes.d.ts +0 -2
- package/lib/cjs/BackendTypes.d.ts.map +1 -1
- package/lib/cjs/BackgroundMapProvider.js +1 -1
- package/lib/cjs/BackgroundMapProvider.js.map +1 -1
- package/lib/cjs/BackgroundMapSettings.js +2 -2
- package/lib/cjs/BackgroundMapSettings.js.map +1 -1
- package/lib/cjs/BriefcaseTypes.js.map +1 -1
- package/lib/cjs/Code.d.ts +8 -0
- package/lib/cjs/Code.d.ts.map +1 -1
- package/lib/cjs/Code.js +8 -0
- package/lib/cjs/Code.js.map +1 -1
- package/lib/cjs/ColorDef.d.ts.map +1 -1
- package/lib/cjs/ColorDef.js +0 -3
- package/lib/cjs/ColorDef.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
- package/lib/cjs/ContourDisplay.d.ts +216 -0
- package/lib/cjs/ContourDisplay.d.ts.map +1 -0
- package/lib/cjs/ContourDisplay.js +300 -0
- package/lib/cjs/ContourDisplay.js.map +1 -0
- package/lib/cjs/DisplayStyleSettings.d.ts +9 -0
- package/lib/cjs/DisplayStyleSettings.d.ts.map +1 -1
- package/lib/cjs/DisplayStyleSettings.js +16 -0
- package/lib/cjs/DisplayStyleSettings.js.map +1 -1
- package/lib/cjs/ECSqlReader.d.ts.map +1 -1
- package/lib/cjs/ECSqlReader.js +1 -10
- package/lib/cjs/ECSqlReader.js.map +1 -1
- package/lib/cjs/ElementMesh.js +2 -3
- package/lib/cjs/ElementMesh.js.map +1 -1
- package/lib/cjs/ElementProps.d.ts +25 -0
- package/lib/cjs/ElementProps.d.ts.map +1 -1
- package/lib/cjs/ElementProps.js +3 -3
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/FeatureSymbology.d.ts +36 -5
- package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
- package/lib/cjs/FeatureSymbology.js +127 -40
- package/lib/cjs/FeatureSymbology.js.map +1 -1
- package/lib/cjs/GeoCoordinateServices.js +2 -2
- package/lib/cjs/GeoCoordinateServices.js.map +1 -1
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/IModelError.d.ts +5 -3
- package/lib/cjs/IModelError.d.ts.map +1 -1
- package/lib/cjs/IModelError.js +5 -2
- package/lib/cjs/IModelError.js.map +1 -1
- package/lib/cjs/ITwinError.d.ts +72 -0
- package/lib/cjs/ITwinError.d.ts.map +1 -0
- package/lib/cjs/ITwinError.js +55 -0
- package/lib/cjs/ITwinError.js.map +1 -0
- package/lib/cjs/Image.js +4 -4
- package/lib/cjs/Image.js.map +1 -1
- package/lib/cjs/MapLayerSettings.d.ts.map +1 -1
- package/lib/cjs/MapLayerSettings.js +0 -1
- package/lib/cjs/MapLayerSettings.js.map +1 -1
- package/lib/cjs/QPoint.d.ts +1 -1
- package/lib/cjs/RenderMaterial.js +4 -4
- package/lib/cjs/RenderMaterial.js.map +1 -1
- package/lib/cjs/RenderTexture.js.map +1 -1
- package/lib/cjs/RpcInterface.js +1 -1
- package/lib/cjs/RpcInterface.js.map +1 -1
- package/lib/cjs/RpcManager.d.ts.map +1 -1
- package/lib/cjs/RpcManager.js.map +1 -1
- package/lib/cjs/SolarCalculate.js +4 -5
- package/lib/cjs/SolarCalculate.js.map +1 -1
- package/lib/cjs/SpatialClassification.js.map +1 -1
- package/lib/cjs/SubCategoryAppearance.js.map +1 -1
- package/lib/cjs/TextureMapping.js.map +1 -1
- package/lib/cjs/TileProps.js +2 -2
- package/lib/cjs/TileProps.js.map +1 -1
- package/lib/cjs/Tween.d.ts.map +1 -1
- package/lib/cjs/Tween.js +0 -1
- package/lib/cjs/Tween.js.map +1 -1
- package/lib/cjs/ViewProps.d.ts +1 -1
- package/lib/cjs/ViewProps.d.ts.map +1 -1
- package/lib/cjs/ViewProps.js.map +1 -1
- package/lib/cjs/core-common.d.ts +2 -0
- package/lib/cjs/core-common.d.ts.map +1 -1
- package/lib/cjs/core-common.js +2 -0
- package/lib/cjs/core-common.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.js +3 -3
- package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
- package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
- package/lib/cjs/geometry/GeometryStream.js +2 -2
- package/lib/cjs/geometry/GeometryStream.js.map +1 -1
- package/lib/cjs/geometry/Placement.d.ts +3 -0
- package/lib/cjs/geometry/Placement.d.ts.map +1 -1
- package/lib/cjs/geometry/Placement.js +3 -0
- package/lib/cjs/geometry/Placement.js.map +1 -1
- package/lib/cjs/internal/Snapping.d.ts +7 -1
- package/lib/cjs/internal/Snapping.d.ts.map +1 -1
- package/lib/cjs/internal/Snapping.js.map +1 -1
- package/lib/cjs/ipc/IpcSocket.d.ts +15 -2
- package/lib/cjs/ipc/IpcSocket.d.ts.map +1 -1
- package/lib/cjs/ipc/IpcSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
- package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js +12 -12
- package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelTileRpcInterface.js +1 -1
- package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.d.ts +3 -0
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.d.ts.map +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +3 -0
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/TestRpcManager.d.ts.map +1 -1
- package/lib/cjs/rpc/TestRpcManager.js +0 -1
- package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
- package/lib/cjs/rpc/WipRpcInterface.d.ts +1 -0
- package/lib/cjs/rpc/WipRpcInterface.d.ts.map +1 -1
- package/lib/cjs/rpc/WipRpcInterface.js +2 -1
- package/lib/cjs/rpc/WipRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.js +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConstants.d.ts +1 -1
- package/lib/cjs/rpc/core/RpcConstants.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcConstants.js +1 -1
- package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
- package/lib/cjs/rpc/core/RpcControl.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcControl.js +0 -1
- package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.js +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/cjs/rpc/core/RpcOperation.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcOperation.js +0 -1
- package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPendingQueue.js +1 -1
- package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPush.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRegistry.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcRegistry.js +0 -2
- package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.js +1 -2
- package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequestContext.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.js +0 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/cjs/rpc/core/RpcSessionInvocation.js +1 -1
- package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.d.ts.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +0 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.d.ts.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.js +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +0 -2
- package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js +0 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/cjs/tile/TileIO.js +4 -4
- package/lib/cjs/tile/TileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.js +13 -13
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/esm/BackendTypes.d.ts +0 -2
- package/lib/esm/BackendTypes.d.ts.map +1 -1
- package/lib/esm/BackgroundMapProvider.js +1 -1
- package/lib/esm/BackgroundMapProvider.js.map +1 -1
- package/lib/esm/BackgroundMapSettings.js +2 -2
- package/lib/esm/BackgroundMapSettings.js.map +1 -1
- package/lib/esm/BriefcaseTypes.js.map +1 -1
- package/lib/esm/Code.d.ts +8 -0
- package/lib/esm/Code.d.ts.map +1 -1
- package/lib/esm/Code.js +8 -0
- package/lib/esm/Code.js.map +1 -1
- package/lib/esm/ColorDef.d.ts.map +1 -1
- package/lib/esm/ColorDef.js +0 -3
- package/lib/esm/ColorDef.js.map +1 -1
- package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
- package/lib/esm/ContourDisplay.d.ts +216 -0
- package/lib/esm/ContourDisplay.d.ts.map +1 -0
- package/lib/esm/ContourDisplay.js +293 -0
- package/lib/esm/ContourDisplay.js.map +1 -0
- package/lib/esm/DisplayStyleSettings.d.ts +9 -0
- package/lib/esm/DisplayStyleSettings.d.ts.map +1 -1
- package/lib/esm/DisplayStyleSettings.js +16 -0
- package/lib/esm/DisplayStyleSettings.js.map +1 -1
- package/lib/esm/ECSqlReader.d.ts.map +1 -1
- package/lib/esm/ECSqlReader.js +1 -10
- package/lib/esm/ECSqlReader.js.map +1 -1
- package/lib/esm/ElementMesh.js +1 -1
- package/lib/esm/ElementMesh.js.map +1 -1
- package/lib/esm/ElementProps.d.ts +25 -0
- package/lib/esm/ElementProps.d.ts.map +1 -1
- package/lib/esm/ElementProps.js.map +1 -1
- package/lib/esm/FeatureSymbology.d.ts +36 -5
- package/lib/esm/FeatureSymbology.d.ts.map +1 -1
- package/lib/esm/FeatureSymbology.js +127 -40
- package/lib/esm/FeatureSymbology.js.map +1 -1
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/IModelError.d.ts +5 -3
- package/lib/esm/IModelError.d.ts.map +1 -1
- package/lib/esm/IModelError.js +5 -2
- package/lib/esm/IModelError.js.map +1 -1
- package/lib/esm/ITwinError.d.ts +72 -0
- package/lib/esm/ITwinError.d.ts.map +1 -0
- package/lib/esm/ITwinError.js +52 -0
- package/lib/esm/ITwinError.js.map +1 -0
- package/lib/esm/MapLayerSettings.d.ts.map +1 -1
- package/lib/esm/MapLayerSettings.js +0 -1
- package/lib/esm/MapLayerSettings.js.map +1 -1
- package/lib/esm/QPoint.d.ts +1 -1
- package/lib/esm/RenderMaterial.js +4 -4
- package/lib/esm/RenderMaterial.js.map +1 -1
- package/lib/esm/RenderTexture.js.map +1 -1
- package/lib/esm/RpcInterface.js +1 -1
- package/lib/esm/RpcInterface.js.map +1 -1
- package/lib/esm/RpcManager.d.ts.map +1 -1
- package/lib/esm/RpcManager.js.map +1 -1
- package/lib/esm/SpatialClassification.js.map +1 -1
- package/lib/esm/SubCategoryAppearance.js.map +1 -1
- package/lib/esm/TextureMapping.js.map +1 -1
- package/lib/esm/Tween.d.ts.map +1 -1
- package/lib/esm/Tween.js +0 -1
- package/lib/esm/Tween.js.map +1 -1
- package/lib/esm/ViewProps.d.ts +1 -1
- package/lib/esm/ViewProps.d.ts.map +1 -1
- package/lib/esm/ViewProps.js.map +1 -1
- package/lib/esm/core-common.d.ts +2 -0
- package/lib/esm/core-common.d.ts.map +1 -1
- package/lib/esm/core-common.js +2 -0
- package/lib/esm/core-common.js.map +1 -1
- package/lib/esm/geometry/ElementGeometry.js +3 -3
- package/lib/esm/geometry/ElementGeometry.js.map +1 -1
- package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
- package/lib/esm/geometry/GeometryStream.js +2 -2
- package/lib/esm/geometry/GeometryStream.js.map +1 -1
- package/lib/esm/geometry/Placement.d.ts +3 -0
- package/lib/esm/geometry/Placement.d.ts.map +1 -1
- package/lib/esm/geometry/Placement.js +3 -0
- package/lib/esm/geometry/Placement.js.map +1 -1
- package/lib/esm/internal/Snapping.d.ts +7 -1
- package/lib/esm/internal/Snapping.d.ts.map +1 -1
- package/lib/esm/internal/Snapping.js.map +1 -1
- package/lib/esm/ipc/IpcSocket.d.ts +15 -2
- package/lib/esm/ipc/IpcSocket.d.ts.map +1 -1
- package/lib/esm/ipc/IpcSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
- package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js +12 -12
- package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelTileRpcInterface.js +1 -1
- package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/esm/rpc/SnapshotIModelRpcInterface.d.ts +3 -0
- package/lib/esm/rpc/SnapshotIModelRpcInterface.d.ts.map +1 -1
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js +3 -0
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/esm/rpc/TestRpcManager.d.ts.map +1 -1
- package/lib/esm/rpc/TestRpcManager.js +0 -1
- package/lib/esm/rpc/TestRpcManager.js.map +1 -1
- package/lib/esm/rpc/WipRpcInterface.d.ts +1 -0
- package/lib/esm/rpc/WipRpcInterface.d.ts.map +1 -1
- package/lib/esm/rpc/WipRpcInterface.js +2 -1
- package/lib/esm/rpc/WipRpcInterface.js.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.js +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/esm/rpc/core/RpcConstants.d.ts +1 -1
- package/lib/esm/rpc/core/RpcConstants.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcConstants.js +1 -1
- package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
- package/lib/esm/rpc/core/RpcControl.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcControl.js +0 -1
- package/lib/esm/rpc/core/RpcControl.js.map +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.js +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/esm/rpc/core/RpcOperation.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcOperation.js +0 -1
- package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
- package/lib/esm/rpc/core/RpcPendingQueue.js +1 -1
- package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/esm/rpc/core/RpcPush.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcPush.js.map +1 -1
- package/lib/esm/rpc/core/RpcRegistry.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcRegistry.js +0 -2
- package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.js +1 -2
- package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequestContext.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/esm/rpc/core/RpcRoutingToken.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcRoutingToken.js +0 -1
- package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/esm/rpc/core/RpcSessionInvocation.js +1 -1
- package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.d.ts.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +0 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.d.ts.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.js +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +0 -2
- package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.js +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.js +0 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/esm/tile/TileMetadata.js +1 -1
- package/lib/esm/tile/TileMetadata.js.map +1 -1
- package/package.json +14 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
# Change Log - @itwin/core-common
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 22 Oct 2024 20:03:09 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 4.9.5
|
|
6
|
+
Tue, 22 Oct 2024 20:01:40 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
9
|
+
|
|
10
|
+
## 4.9.4
|
|
11
|
+
Wed, 09 Oct 2024 20:22:04 GMT
|
|
12
|
+
|
|
13
|
+
### Updates
|
|
14
|
+
|
|
15
|
+
- fix regression related to classid
|
|
16
|
+
|
|
17
|
+
## 4.9.3
|
|
18
|
+
Thu, 03 Oct 2024 19:15:45 GMT
|
|
19
|
+
|
|
20
|
+
_Version update only_
|
|
21
|
+
|
|
22
|
+
## 4.9.2
|
|
23
|
+
Wed, 02 Oct 2024 15:14:43 GMT
|
|
24
|
+
|
|
25
|
+
_Version update only_
|
|
4
26
|
|
|
5
27
|
## 4.9.1
|
|
6
28
|
Wed, 25 Sep 2024 20:10:58 GMT
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Utils
|
|
3
3
|
*/
|
|
4
|
-
/// <reference types="node" />
|
|
5
|
-
/// <reference types="node" />
|
|
6
4
|
import type { Readable, Writable } from "stream";
|
|
7
5
|
import type { Buffer } from "buffer";
|
|
8
6
|
/** @public @deprecated in 3.x. This type was mistakenly made public in the common scope. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackendTypes.d.ts","sourceRoot":"","sources":["../../src/BackendTypes.ts"],"names":[],"mappings":"AAIA;;GAEG
|
|
1
|
+
{"version":3,"file":"BackendTypes.d.ts","sourceRoot":"","sources":["../../src/BackendTypes.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AASrC,4FAA4F;AAC5F,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;AAEvC,4FAA4F;AAC5F,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;AAEvC,8FAA8F;AAC9F,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC"}
|
|
@@ -47,7 +47,7 @@ class BackgroundMapProvider {
|
|
|
47
47
|
}
|
|
48
48
|
/** @internal */
|
|
49
49
|
static fromBackgroundMapProps(props) {
|
|
50
|
-
// eslint-disable-next-line
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
51
51
|
return this.fromJSON({ name: props.providerName, type: props.providerData?.mapType });
|
|
52
52
|
}
|
|
53
53
|
/** Return true if this provider is equivalent to `other`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackgroundMapProvider.js","sourceRoot":"","sources":["../../src/BackgroundMapProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH;;;G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C,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC;IAC9D,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,YAAwC;QACnD,OAAO,qBAAqB,CAAC,QAAQ,CAAC;YACpC,GAAG,IAAI,CAAC,MAAM,EAAE;YAChB,GAAG,YAAY;SAChB,CAAC,CAAC;IACL,CAAC;CACF;AArDD,sDAqDC","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 { DeprecatedBackgroundMapProps } from \"./BackgroundMapSettings\";\r\n\r\n/** Enumerates the types of map imagery that can be supplied by a [[BackgroundMapProvider]].\r\n * @public\r\n * @extensions\r\n */\r\nexport enum BackgroundMapType {\r\n Street = 1,\r\n Aerial = 2,\r\n Hybrid = 3,\r\n}\r\n\r\n/** Enumerates a set of supported [[BackgroundMapProvider]]s that can provide map imagery.\r\n * @note To access imagery from such a provider, an API key must be supplied via [IModelAppOptions.mapLayerOptions]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport type BackgroundMapProviderName = \"BingProvider\" | \"MapBoxProvider\";\r\n\r\n/** JSON representation of a [[BackgroundMapProvider]].\r\n * @see [[BaseMapLayerProps.provider]].\r\n * @public\r\n */\r\nexport interface BackgroundMapProviderProps {\r\n /** The name of the provider. Default: \"BingProvider\" */\r\n name?: BackgroundMapProviderName;\r\n /** The type of imagery to display. Default: Hybrid. */\r\n type?: BackgroundMapType;\r\n}\r\n\r\n/** Describes one of a small set of standard, known suppliers of background map imagery as part of a [[BaseMapLayerSettings]].\r\n * @public\r\n */\r\nexport class BackgroundMapProvider {\r\n /** The name of the provider. */\r\n public readonly name: BackgroundMapProviderName;\r\n /** The type of map imagery provided. */\r\n public readonly type: BackgroundMapType;\r\n\r\n private constructor(name: BackgroundMapProviderName, type: BackgroundMapType) {\r\n this.name = name;\r\n this.type = type;\r\n }\r\n\r\n /** Create a provider from its JSON representation. */\r\n public static fromJSON(props: BackgroundMapProviderProps): BackgroundMapProvider {\r\n const name: BackgroundMapProviderName = props.name === \"MapBoxProvider\" ? props.name : \"BingProvider\";\r\n let type;\r\n switch (props.type) {\r\n case BackgroundMapType.Street:\r\n case BackgroundMapType.Aerial:\r\n type = props.type;\r\n break;\r\n default:\r\n type = BackgroundMapType.Hybrid;\r\n break;\r\n }\r\n\r\n return new BackgroundMapProvider(name, type);\r\n }\r\n\r\n /** Convert this provider to its JSON representation. */\r\n public toJSON(): BackgroundMapProviderProps {\r\n return { name: this.name, type: this.type };\r\n }\r\n\r\n /** @internal */\r\n public static fromBackgroundMapProps(props: DeprecatedBackgroundMapProps): BackgroundMapProvider {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return this.fromJSON({ name: props.providerName as BackgroundMapProviderName, type: props.providerData?.mapType });\r\n }\r\n\r\n /** Return true if this provider is equivalent to `other`. */\r\n public equals(other: BackgroundMapProvider): boolean {\r\n return this.name === other.name && this.type === other.type;\r\n }\r\n\r\n /** Produce a copy of this provider with identical properties except for those explicitly specified by `changedProps`.\r\n * Any properties explicitly set to `undefined` in `changedProps` will be reset to their default values.\r\n */\r\n public clone(changedProps: BackgroundMapProviderProps): BackgroundMapProvider {\r\n return BackgroundMapProvider.fromJSON({\r\n ...this.toJSON(),\r\n ...changedProps,\r\n });\r\n }\r\n}\r\n"]}
|
|
@@ -109,9 +109,9 @@ class BackgroundMapSettings {
|
|
|
109
109
|
const props = this.toJSON();
|
|
110
110
|
// Preserve deprecated imagery provider properties.
|
|
111
111
|
if ("BingProvider" !== this._provider.name)
|
|
112
|
-
props.providerName = this._provider.name; // eslint-disable-line
|
|
112
|
+
props.providerName = this._provider.name; // eslint-disable-line @typescript-eslint/no-deprecated
|
|
113
113
|
if (BackgroundMapProvider_1.BackgroundMapType.Hybrid !== this._provider.type)
|
|
114
|
-
props.providerData = { mapType: this._provider.type }; // eslint-disable-line
|
|
114
|
+
props.providerData = { mapType: this._provider.type }; // eslint-disable-line @typescript-eslint/no-deprecated
|
|
115
115
|
return props;
|
|
116
116
|
}
|
|
117
117
|
/** Returns true if these settings are equivalent to the supplied JSON settings. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackgroundMapSettings.js","sourceRoot":"","sources":["../../src/BackgroundMapSettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,mEAAmF;AACnF,qDAA+E;AAC/E,uDAAkE;AAElE;;;;;GAKG;AACH,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,oCAAoC;IACpC,mDAAa,CAAA;IACb,8BAA8B;IAC9B,2CAAS,CAAA;AACX,CAAC,EALW,SAAS,yBAAT,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,MAAa,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,KAAK,IAAI,CAAC,YAAY,CAAC,CAAC,C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Y,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;AAvJD,sDAuJC","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 deprecation/deprecation\r\n if (BackgroundMapType.Hybrid !== this._provider.type)\r\n props.providerData = { mapType: this._provider.type }; // eslint-disable-line deprecation/deprecation\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,mEAAmF;AACnF,qDAA+E;AAC/E,uDAAkE;AAElE;;;;;GAKG;AACH,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,oCAAoC;IACpC,mDAAa,CAAA;IACb,8BAA8B;IAC9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AAC,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;AAvJD,sDAuJC","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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BriefcaseTypes.js","sourceRoot":"","sources":["../../src/BriefcaseTypes.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAaH;;;GAGG;AACH,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,gCAAhB,gBAAgB,QAyB3B;AAED;;;GAGG;AACH,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,mIAAmI;IACnI,uDAAgB,CAAA;IAChB,0FAA0F;IAC1F,qDAAe,CAAA;IACf,qJAAqJ;IACrJ,+CAAY,CAAA;AACd,CAAC,EAPW,QAAQ,wBAAR,QAAQ,QAOnB;AAwID;;GAEG;AACH,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,6BAAb,aAAa,QAYxB;AAED;;GAEG;AACH,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,0GAA0G;IAC1G,mDAAQ,CAAA;IAER,qDAAqD;IACrD,yDAAW,CAAA;AACb,CAAC,EANW,cAAc,8BAAd,cAAc,QAMzB;AAgBD;;;;GAIG;AACH,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,2BAAX,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 deprecation/deprecation\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,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,gCAAhB,gBAAgB,QAyB3B;AAED;;;GAGG;AACH,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,mIAAmI;IACnI,uDAAgB,CAAA;IAChB,0FAA0F;IAC1F,qDAAe,CAAA;IACf,qJAAqJ;IACrJ,+CAAY,CAAA;AACd,CAAC,EAPW,QAAQ,wBAAR,QAAQ,QAOnB;AAwID;;GAEG;AACH,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,6BAAb,aAAa,QAYxB;AAED;;GAEG;AACH,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,0GAA0G;IAC1G,mDAAQ,CAAA;IAER,qDAAqD;IACrD,yDAAW,CAAA;AACb,CAAC,EANW,cAAc,8BAAd,cAAc,QAMzB;AAgBD;;;;GAIG;AACH,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,2BAAX,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"]}
|
package/lib/cjs/Code.d.ts
CHANGED
|
@@ -148,6 +148,14 @@ export declare enum BisCodeSpec {
|
|
|
148
148
|
* @see [Sheet.createCode]($backend)
|
|
149
149
|
*/
|
|
150
150
|
sheet = "bis:Sheet",
|
|
151
|
+
/** The name of the standard [[CodeSpec]] used when creating codes for [SheetIndex]($backend) elements.
|
|
152
|
+
* @see [SheetIndex.createCode]($backend)
|
|
153
|
+
*/
|
|
154
|
+
sheetIndex = "bis:SheetIndex",
|
|
155
|
+
/** The name of the standard [[CodeSpec]] used when creating codes for [SheetIndexEntry]($backend) elements.
|
|
156
|
+
* @see [SheetIndexEntry.createCode]($backend)
|
|
157
|
+
*/
|
|
158
|
+
sheetIndexEntry = "bis:SheetIndexEntry",
|
|
151
159
|
/** The name of the standard [[CodeSpec]] used when creating codes for [SpatialCategory]($backend) elements.
|
|
152
160
|
* @see [SpatialCategory.createCode]($backend)
|
|
153
161
|
*/
|
package/lib/cjs/Code.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Code.d.ts","sourceRoot":"","sources":["../../src/Code.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAQ,UAAU,EAAa,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,UAAU,CAAC;AAErD;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,mGAAmG;IACnG,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC;IAC1B,uGAAuG;IACvG,KAAK,EAAE,cAAc,CAAC;IACtB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,qBAAa,IAAK,YAAW,SAAS;IACpC,8FAA8F;IACvF,IAAI,EAAE,UAAU,CAAC;IACxB,+FAA+F;IACxF,KAAK,EAAE,UAAU,CAAC;IACzB;;OAEG;IACH,IAAW,KAAK,IACM,MAAM,CADoB;IAChD,IAAW,KAAK,CAAC,GAAG,EAAE,MAAM,EAAgC;IAC5D,OAAO,CAAC,MAAM,CAAC,CAAS;gBAEZ,SAAS,EAAE,SAAS;IAMhC,gEAAgE;WAClD,WAAW,IAAI,IAAI;WAKnB,QAAQ,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI;IACjC,MAAM,IAAI,SAAS;IACnB,MAAM,CAAC,KAAK,EAAE,IAAI,GAAG,OAAO;IACnC,gBA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ACjC,MAAM,EAAE,MAAM,CAAC;IACtB,+BAA+B;IACxB,EAAE,EAAE,UAAU,CAAC;IACtB,iCAAiC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACI,UAAU,EAAE,kBAAkB,CAAC;IAEtC,OAAO;IAOP;;;OAGG;WACW,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,aAAa,CAAC,gBAAgB,GAAG,QAAQ;IAQtI;;OAEG;WACW,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,kBAAkB,GAAG,QAAQ;IAIrH,wDAAwD;IACxD,IAAW,OAAO,IAAI,OAAO,CAAkC;IAC/D,IAAW,UAAU,IAAI,OAAO,CAE/B;IAED,uCAAuC;IACvC,IAAW,SAAS,IAAI,aAAa,CAAC,IAAI,CAA2C;IACrF,IAAW,SAAS,CAAC,SAAS,EAAE,aAAa,CAAC,IAAI,EAAiD;IAEnG;;OAEG;IACH,IAAW,QAAQ,IAAI,aAAa,CAAC,gBAAgB,CAEpD;IACD,IAAW,QAAQ,CAAC,GAAG,EAAE,aAAa,CAAC,gBAAgB,EAKtD;IAED;;OAEG;IACH,IAAW,mBAAmB,IAAI,OAAO,CAExC;IACD,IAAW,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAK5C;CACF"}
|
package/lib/cjs/Code.js
CHANGED
|
@@ -141,6 +141,14 @@ var BisCodeSpec;
|
|
|
141
141
|
* @see [Sheet.createCode]($backend)
|
|
142
142
|
*/
|
|
143
143
|
BisCodeSpec["sheet"] = "bis:Sheet";
|
|
144
|
+
/** The name of the standard [[CodeSpec]] used when creating codes for [SheetIndex]($backend) elements.
|
|
145
|
+
* @see [SheetIndex.createCode]($backend)
|
|
146
|
+
*/
|
|
147
|
+
BisCodeSpec["sheetIndex"] = "bis:SheetIndex";
|
|
148
|
+
/** The name of the standard [[CodeSpec]] used when creating codes for [SheetIndexEntry]($backend) elements.
|
|
149
|
+
* @see [SheetIndexEntry.createCode]($backend)
|
|
150
|
+
*/
|
|
151
|
+
BisCodeSpec["sheetIndexEntry"] = "bis:SheetIndexEntry";
|
|
144
152
|
/** The name of the standard [[CodeSpec]] used when creating codes for [SpatialCategory]($backend) elements.
|
|
145
153
|
* @see [SpatialCategory.createCode]($backend)
|
|
146
154
|
*/
|
package/lib/cjs/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,sDAA8E;AAwB9E;;;GAGG;AACH,MAAa,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,mBAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC,KAAK,GAAG,wBAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACjD,IAAI,CAAC,KAAK,GAAG,wBAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC;IAED,gEAAgE;IACzD,MAAM,CAAC,WAAW;QACvB,MAAM,EAAE,GAAG,mBAAI,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC/C,OAAO,IAAI,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IAC3C,C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IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;IAClD,CAAC;CACF;AA1ED,4BA0EC","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 [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,sDAA8E;AAwB9E;;;GAGG;AACH,MAAa,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,mBAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC,KAAK,GAAG,wBAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACjD,IAAI,CAAC,KAAK,GAAG,wBAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC;IAED,gEAAgE;IACzD,MAAM,CAAC,WAAW;QACvB,MAAM,EAAE,GAAG,mBAAI,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC/C,OAAO,IAAI,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IAC3C,CAAC;IAEM,MAAM,CAAC,QAAQ,CAAC,IAAU,IAAU,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IACxF,MAAM,KAAgB,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,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AAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/D,IAAW,UAAU;QACnB,OAAO,IAAI,KAAK,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,aAAa,CAAC;IAC1D,CAAC;IAED,uCAAuC;IACvC,IAAW,SAAS,KAAyB,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACrF,IAAW,SAAS,CAAC,SAA6B,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC;IAEnG;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,gBAAgB,CAAC,cAAc,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;AA1ED,4BA0EC","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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorDef.d.ts","sourceRoot":"","sources":["../../src/ColorDef.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAgB,MAAM,YAAY,CAAC;AASpD;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAE/B,OAAO;IAKP;;;;;OAKG;WACW,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,aAAa;IAIjD;;OAEG;WACW,WAAW,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,aAAa,GAAG,aAAa;IAWtE,iFAAiF;IAC1E,MAAM,IAAI,aAAa;IAE9B,wHAAwH;WAC1G,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,GAAG,QAAQ;IAItD,iHAAiH;WACnG,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ;IAI7F,0JAA0J;WAC5I,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,aAAa;IAQvH,4DAA4D;WAC9C,QAAQ,CAAC,IAAI,EAAE,aAAa,GAAG,QAAQ;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MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,YAAY,SAAI,GAAG,QAAQ;IAIlF,qGAAqG;WACvF,kBAAkB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,YAAY,SAAI,GAAG,aAAa;IAuClG,gDAAgD;IACzC,KAAK,IAAI,QAAQ;IAoCxB,gDAAgD;IACzC,KAAK,IAAI,QAAQ;IA8CxB,yCAAyC;WAC3B,OAAO,CAAC,GAAG,EAAE,QAAQ,EAAE,YAAY,SAAI,GAAG,QAAQ;IAoChE,OAAO,CAAC,eAAe;IAUvB;;;;;OAKG;IACI,mBAAmB,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ;IA6BrE,0EAA0E;IACnE,MAAM,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO;IAIvC,iBAAiB;IACjB,gBAAuB,KAAK,WAAmC;IAC/D,iBAAiB;IACjB,gBAAuB,KAAK,WAAmC;IAC/D,eAAe;IACf,gBAAuB,GAAG,WAAiC;IAC3D,iBAAiB;IACjB,gBAAuB,KAAK,WAAmC;IAC/D,gBAAgB;IAChB,gBAAuB,IAAI,WAAkC;CAC9D"}
|
package/lib/cjs/ColorDef.js
CHANGED
|
@@ -178,7 +178,6 @@ class ColorDef {
|
|
|
178
178
|
}
|
|
179
179
|
break;
|
|
180
180
|
}
|
|
181
|
-
// eslint-disable-next-line no-cond-assign
|
|
182
181
|
}
|
|
183
182
|
else if (m = /^\#([a-f0-9]+)$/.exec(val)) { // hex color
|
|
184
183
|
const hex = m[1];
|
|
@@ -488,7 +487,6 @@ class ColorDef {
|
|
|
488
487
|
const v = 0xff & Math.floor(dvalue * 255 + 0.5);
|
|
489
488
|
let r = 0, b = 0, g = 0;
|
|
490
489
|
switch (hueIntpart) {
|
|
491
|
-
/* eslint-disable max-statements-per-line */
|
|
492
490
|
case 0:
|
|
493
491
|
r = v;
|
|
494
492
|
g = t;
|
|
@@ -514,7 +512,6 @@ class ColorDef {
|
|
|
514
512
|
r = v, g = p;
|
|
515
513
|
b = q;
|
|
516
514
|
break; // magenta-ish
|
|
517
|
-
/* eslint-enable max-statements-per-line */
|
|
518
515
|
}
|
|
519
516
|
return ColorDef.from(r, g, b, transparency);
|
|
520
517
|
}
|