@itwin/core-common 3.6.0-dev.8 → 4.0.0-dev.2

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.
Files changed (355) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/LICENSE.md +1 -1
  3. package/lib/cjs/AuthorizationClient.d.ts +9 -3
  4. package/lib/cjs/AuthorizationClient.d.ts.map +1 -1
  5. package/lib/cjs/AuthorizationClient.js.map +1 -1
  6. package/lib/cjs/BackendTypes.d.ts +3 -3
  7. package/lib/cjs/BackendTypes.d.ts.map +1 -1
  8. package/lib/cjs/BackendTypes.js.map +1 -1
  9. package/lib/cjs/BackgroundMapSettings.d.ts +2 -2
  10. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  11. package/lib/cjs/CloudStorage.d.ts +5 -5
  12. package/lib/cjs/CloudStorage.js +3 -3
  13. package/lib/cjs/CloudStorage.js.map +1 -1
  14. package/lib/cjs/CloudStorageTileCache.d.ts +1 -1
  15. package/lib/cjs/CloudStorageTileCache.js +1 -1
  16. package/lib/cjs/CloudStorageTileCache.js.map +1 -1
  17. package/lib/cjs/Code.d.ts +31 -10
  18. package/lib/cjs/Code.d.ts.map +1 -1
  19. package/lib/cjs/Code.js +17 -29
  20. package/lib/cjs/Code.js.map +1 -1
  21. package/lib/cjs/ContextRealityModel.d.ts +30 -3
  22. package/lib/cjs/ContextRealityModel.d.ts.map +1 -1
  23. package/lib/cjs/ContextRealityModel.js +23 -8
  24. package/lib/cjs/ContextRealityModel.js.map +1 -1
  25. package/lib/cjs/DisplayStyleSettings.d.ts +4 -0
  26. package/lib/cjs/DisplayStyleSettings.d.ts.map +1 -1
  27. package/lib/cjs/DisplayStyleSettings.js +5 -1
  28. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  29. package/lib/cjs/ElementMesh.js +2 -2
  30. package/lib/cjs/ElementMesh.js.map +1 -1
  31. package/lib/cjs/ElementProps.d.ts +5 -1
  32. package/lib/cjs/ElementProps.d.ts.map +1 -1
  33. package/lib/cjs/ElementProps.js.map +1 -1
  34. package/lib/cjs/EntityProps.d.ts +2 -1
  35. package/lib/cjs/EntityProps.d.ts.map +1 -1
  36. package/lib/cjs/EntityProps.js +1 -0
  37. package/lib/cjs/EntityProps.js.map +1 -1
  38. package/lib/cjs/FeatureSymbology.d.ts +3 -3
  39. package/lib/cjs/FeatureSymbology.js +3 -3
  40. package/lib/cjs/FeatureSymbology.js.map +1 -1
  41. package/lib/cjs/IModel.d.ts +1 -1
  42. package/lib/cjs/IModel.js.map +1 -1
  43. package/lib/cjs/IModelError.d.ts +10 -4
  44. package/lib/cjs/IModelError.d.ts.map +1 -1
  45. package/lib/cjs/IModelError.js +3 -4
  46. package/lib/cjs/IModelError.js.map +1 -1
  47. package/lib/cjs/Localization.d.ts +1 -1
  48. package/lib/cjs/Localization.d.ts.map +1 -1
  49. package/lib/cjs/Localization.js +8 -1
  50. package/lib/cjs/Localization.js.map +1 -1
  51. package/lib/cjs/MaterialProps.d.ts +42 -7
  52. package/lib/cjs/MaterialProps.d.ts.map +1 -1
  53. package/lib/cjs/MaterialProps.js +13 -1
  54. package/lib/cjs/MaterialProps.js.map +1 -1
  55. package/lib/cjs/RealityModelDisplaySettings.d.ts +65 -0
  56. package/lib/cjs/RealityModelDisplaySettings.d.ts.map +1 -1
  57. package/lib/cjs/RealityModelDisplaySettings.js +30 -2
  58. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  59. package/lib/cjs/RenderMaterial.d.ts +1 -1
  60. package/lib/cjs/RenderMaterial.d.ts.map +1 -1
  61. package/lib/cjs/RenderMaterial.js +1 -1
  62. package/lib/cjs/RenderMaterial.js.map +1 -1
  63. package/lib/cjs/RenderTexture.d.ts +1 -1
  64. package/lib/cjs/RenderTexture.js +1 -1
  65. package/lib/cjs/RenderTexture.js.map +1 -1
  66. package/lib/cjs/RpcInterface.d.ts.map +1 -1
  67. package/lib/cjs/RpcInterface.js.map +1 -1
  68. package/lib/cjs/RpcManager.d.ts.map +1 -1
  69. package/lib/cjs/RpcManager.js.map +1 -1
  70. package/lib/cjs/TerrainSettings.d.ts +1 -1
  71. package/lib/cjs/TerrainSettings.js.map +1 -1
  72. package/lib/cjs/TextureMapping.d.ts +5 -3
  73. package/lib/cjs/TextureMapping.d.ts.map +1 -1
  74. package/lib/cjs/TextureMapping.js.map +1 -1
  75. package/lib/cjs/ViewFlags.d.ts +2 -6
  76. package/lib/cjs/ViewFlags.d.ts.map +1 -1
  77. package/lib/cjs/ViewFlags.js.map +1 -1
  78. package/lib/cjs/ViewProps.d.ts +2 -2
  79. package/lib/cjs/ViewProps.d.ts.map +1 -1
  80. package/lib/cjs/ViewProps.js.map +1 -1
  81. package/lib/cjs/core-common.d.ts +0 -1
  82. package/lib/cjs/core-common.d.ts.map +1 -1
  83. package/lib/cjs/core-common.js +0 -1
  84. package/lib/cjs/core-common.js.map +1 -1
  85. package/lib/cjs/geometry/BoundingSphere.d.ts +15 -2
  86. package/lib/cjs/geometry/BoundingSphere.d.ts.map +1 -1
  87. package/lib/cjs/geometry/BoundingSphere.js +18 -4
  88. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  89. package/lib/cjs/geometry/FrustumPlanes.d.ts +59 -10
  90. package/lib/cjs/geometry/FrustumPlanes.d.ts.map +1 -1
  91. package/lib/cjs/geometry/FrustumPlanes.js +94 -33
  92. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  93. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  94. package/lib/cjs/rpc/IModelReadRpcInterface.d.ts +1 -1
  95. package/lib/cjs/rpc/IModelReadRpcInterface.d.ts.map +1 -1
  96. package/lib/cjs/rpc/IModelReadRpcInterface.js +12 -12
  97. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  98. package/lib/cjs/rpc/IModelTileRpcInterface.d.ts +2 -2
  99. package/lib/cjs/rpc/IModelTileRpcInterface.js +4 -4
  100. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  101. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  102. package/lib/cjs/rpc/TestRpcManager.d.ts.map +1 -1
  103. package/lib/cjs/rpc/TestRpcManager.js +1 -0
  104. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  105. package/lib/cjs/rpc/WipRpcInterface.js.map +1 -1
  106. package/lib/cjs/rpc/core/RpcConfiguration.d.ts.map +1 -1
  107. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  108. package/lib/cjs/rpc/core/RpcConstants.d.ts +6 -1
  109. package/lib/cjs/rpc/core/RpcConstants.d.ts.map +1 -1
  110. package/lib/cjs/rpc/core/RpcConstants.js +7 -1
  111. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  112. package/lib/cjs/rpc/core/RpcControl.d.ts.map +1 -1
  113. package/lib/cjs/rpc/core/RpcControl.js +1 -0
  114. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  115. package/lib/cjs/rpc/core/RpcInvocation.d.ts.map +1 -1
  116. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  117. package/lib/cjs/rpc/core/RpcOperation.d.ts.map +1 -1
  118. package/lib/cjs/rpc/core/RpcOperation.js +1 -0
  119. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  120. package/lib/cjs/rpc/core/RpcPendingQueue.d.ts.map +1 -1
  121. package/lib/cjs/rpc/core/RpcPendingQueue.js +1 -0
  122. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  123. package/lib/cjs/rpc/core/RpcProtocol.d.ts.map +1 -1
  124. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  125. package/lib/cjs/rpc/core/RpcPush.d.ts.map +1 -1
  126. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  127. package/lib/cjs/rpc/core/RpcRegistry.d.ts.map +1 -1
  128. package/lib/cjs/rpc/core/RpcRegistry.js +1 -0
  129. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  130. package/lib/cjs/rpc/core/RpcRequest.d.ts.map +1 -1
  131. package/lib/cjs/rpc/core/RpcRequest.js +1 -0
  132. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  133. package/lib/cjs/rpc/core/RpcRequestContext.d.ts.map +1 -1
  134. package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
  135. package/lib/cjs/rpc/core/RpcRoutingToken.d.ts.map +1 -1
  136. package/lib/cjs/rpc/core/RpcRoutingToken.js +1 -0
  137. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  138. package/lib/cjs/rpc/core/RpcSessionInvocation.d.ts.map +1 -1
  139. package/lib/cjs/rpc/core/RpcSessionInvocation.js +1 -0
  140. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  141. package/lib/cjs/rpc/web/BentleyCloudRpcManager.d.ts.map +1 -1
  142. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  143. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.d.ts.map +1 -1
  144. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +1 -0
  145. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  146. package/lib/cjs/rpc/web/OpenAPI.d.ts +1 -0
  147. package/lib/cjs/rpc/web/OpenAPI.d.ts.map +1 -1
  148. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  149. package/lib/cjs/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
  150. package/lib/cjs/rpc/web/WebAppRpcLogging.js +1 -0
  151. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  152. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +2 -0
  153. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  154. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  155. package/lib/cjs/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  156. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  157. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  158. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js +1 -0
  159. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  160. package/lib/cjs/tile/B3dmTileIO.js +5 -5
  161. package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
  162. package/lib/cjs/tile/CompositeTileIO.js +2 -2
  163. package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
  164. package/lib/cjs/tile/GltfTileIO.js +5 -5
  165. package/lib/cjs/tile/GltfTileIO.js.map +1 -1
  166. package/lib/cjs/tile/I3dmTileIO.js +6 -6
  167. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  168. package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
  169. package/lib/cjs/tile/IModelTileIO.js +12 -12
  170. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  171. package/lib/cjs/tile/PntsTileIO.js +5 -5
  172. package/lib/cjs/tile/PntsTileIO.js.map +1 -1
  173. package/lib/cjs/tile/TileIO.js +3 -3
  174. package/lib/cjs/tile/TileIO.js.map +1 -1
  175. package/lib/esm/AuthorizationClient.d.ts +9 -3
  176. package/lib/esm/AuthorizationClient.d.ts.map +1 -1
  177. package/lib/esm/AuthorizationClient.js.map +1 -1
  178. package/lib/esm/BackendTypes.d.ts +3 -3
  179. package/lib/esm/BackendTypes.d.ts.map +1 -1
  180. package/lib/esm/BackendTypes.js.map +1 -1
  181. package/lib/esm/BackgroundMapSettings.d.ts +2 -2
  182. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  183. package/lib/esm/CloudStorage.d.ts +5 -5
  184. package/lib/esm/CloudStorage.js +3 -3
  185. package/lib/esm/CloudStorage.js.map +1 -1
  186. package/lib/esm/CloudStorageTileCache.d.ts +1 -1
  187. package/lib/esm/CloudStorageTileCache.js +1 -1
  188. package/lib/esm/CloudStorageTileCache.js.map +1 -1
  189. package/lib/esm/Code.d.ts +31 -10
  190. package/lib/esm/Code.d.ts.map +1 -1
  191. package/lib/esm/Code.js +17 -29
  192. package/lib/esm/Code.js.map +1 -1
  193. package/lib/esm/ContextRealityModel.d.ts +30 -3
  194. package/lib/esm/ContextRealityModel.d.ts.map +1 -1
  195. package/lib/esm/ContextRealityModel.js +23 -8
  196. package/lib/esm/ContextRealityModel.js.map +1 -1
  197. package/lib/esm/DisplayStyleSettings.d.ts +4 -0
  198. package/lib/esm/DisplayStyleSettings.d.ts.map +1 -1
  199. package/lib/esm/DisplayStyleSettings.js +5 -1
  200. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  201. package/lib/esm/ElementMesh.js +2 -2
  202. package/lib/esm/ElementMesh.js.map +1 -1
  203. package/lib/esm/ElementProps.d.ts +5 -1
  204. package/lib/esm/ElementProps.d.ts.map +1 -1
  205. package/lib/esm/ElementProps.js.map +1 -1
  206. package/lib/esm/EntityProps.d.ts +2 -1
  207. package/lib/esm/EntityProps.d.ts.map +1 -1
  208. package/lib/esm/EntityProps.js +1 -0
  209. package/lib/esm/EntityProps.js.map +1 -1
  210. package/lib/esm/FeatureSymbology.d.ts +3 -3
  211. package/lib/esm/FeatureSymbology.js +3 -3
  212. package/lib/esm/FeatureSymbology.js.map +1 -1
  213. package/lib/esm/IModel.d.ts +1 -1
  214. package/lib/esm/IModel.js.map +1 -1
  215. package/lib/esm/IModelError.d.ts +10 -4
  216. package/lib/esm/IModelError.d.ts.map +1 -1
  217. package/lib/esm/IModelError.js +3 -2
  218. package/lib/esm/IModelError.js.map +1 -1
  219. package/lib/esm/Localization.d.ts +1 -1
  220. package/lib/esm/Localization.d.ts.map +1 -1
  221. package/lib/esm/Localization.js +8 -1
  222. package/lib/esm/Localization.js.map +1 -1
  223. package/lib/esm/MaterialProps.d.ts +42 -7
  224. package/lib/esm/MaterialProps.d.ts.map +1 -1
  225. package/lib/esm/MaterialProps.js +12 -0
  226. package/lib/esm/MaterialProps.js.map +1 -1
  227. package/lib/esm/RealityModelDisplaySettings.d.ts +65 -0
  228. package/lib/esm/RealityModelDisplaySettings.d.ts.map +1 -1
  229. package/lib/esm/RealityModelDisplaySettings.js +30 -2
  230. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  231. package/lib/esm/RenderMaterial.d.ts +1 -1
  232. package/lib/esm/RenderMaterial.d.ts.map +1 -1
  233. package/lib/esm/RenderMaterial.js +1 -1
  234. package/lib/esm/RenderMaterial.js.map +1 -1
  235. package/lib/esm/RenderTexture.d.ts +1 -1
  236. package/lib/esm/RenderTexture.js +1 -1
  237. package/lib/esm/RenderTexture.js.map +1 -1
  238. package/lib/esm/RpcInterface.d.ts.map +1 -1
  239. package/lib/esm/RpcInterface.js.map +1 -1
  240. package/lib/esm/RpcManager.d.ts.map +1 -1
  241. package/lib/esm/RpcManager.js.map +1 -1
  242. package/lib/esm/TerrainSettings.d.ts +1 -1
  243. package/lib/esm/TerrainSettings.js.map +1 -1
  244. package/lib/esm/TextureMapping.d.ts +5 -3
  245. package/lib/esm/TextureMapping.d.ts.map +1 -1
  246. package/lib/esm/TextureMapping.js.map +1 -1
  247. package/lib/esm/ViewFlags.d.ts +2 -6
  248. package/lib/esm/ViewFlags.d.ts.map +1 -1
  249. package/lib/esm/ViewFlags.js.map +1 -1
  250. package/lib/esm/ViewProps.d.ts +2 -2
  251. package/lib/esm/ViewProps.d.ts.map +1 -1
  252. package/lib/esm/ViewProps.js.map +1 -1
  253. package/lib/esm/core-common.d.ts +0 -1
  254. package/lib/esm/core-common.d.ts.map +1 -1
  255. package/lib/esm/core-common.js +0 -1
  256. package/lib/esm/core-common.js.map +1 -1
  257. package/lib/esm/geometry/BoundingSphere.d.ts +15 -2
  258. package/lib/esm/geometry/BoundingSphere.d.ts.map +1 -1
  259. package/lib/esm/geometry/BoundingSphere.js +18 -4
  260. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  261. package/lib/esm/geometry/FrustumPlanes.d.ts +59 -10
  262. package/lib/esm/geometry/FrustumPlanes.d.ts.map +1 -1
  263. package/lib/esm/geometry/FrustumPlanes.js +94 -33
  264. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  265. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  266. package/lib/esm/rpc/IModelReadRpcInterface.d.ts +1 -1
  267. package/lib/esm/rpc/IModelReadRpcInterface.d.ts.map +1 -1
  268. package/lib/esm/rpc/IModelReadRpcInterface.js +12 -12
  269. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  270. package/lib/esm/rpc/IModelTileRpcInterface.d.ts +2 -2
  271. package/lib/esm/rpc/IModelTileRpcInterface.js +4 -4
  272. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  273. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  274. package/lib/esm/rpc/TestRpcManager.d.ts.map +1 -1
  275. package/lib/esm/rpc/TestRpcManager.js +1 -0
  276. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  277. package/lib/esm/rpc/WipRpcInterface.js.map +1 -1
  278. package/lib/esm/rpc/core/RpcConfiguration.d.ts.map +1 -1
  279. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  280. package/lib/esm/rpc/core/RpcConstants.d.ts +6 -1
  281. package/lib/esm/rpc/core/RpcConstants.d.ts.map +1 -1
  282. package/lib/esm/rpc/core/RpcConstants.js +7 -1
  283. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  284. package/lib/esm/rpc/core/RpcControl.d.ts.map +1 -1
  285. package/lib/esm/rpc/core/RpcControl.js +1 -0
  286. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  287. package/lib/esm/rpc/core/RpcInvocation.d.ts.map +1 -1
  288. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  289. package/lib/esm/rpc/core/RpcOperation.d.ts.map +1 -1
  290. package/lib/esm/rpc/core/RpcOperation.js +1 -0
  291. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  292. package/lib/esm/rpc/core/RpcPendingQueue.d.ts.map +1 -1
  293. package/lib/esm/rpc/core/RpcPendingQueue.js +1 -0
  294. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  295. package/lib/esm/rpc/core/RpcProtocol.d.ts.map +1 -1
  296. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  297. package/lib/esm/rpc/core/RpcPush.d.ts.map +1 -1
  298. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  299. package/lib/esm/rpc/core/RpcRegistry.d.ts.map +1 -1
  300. package/lib/esm/rpc/core/RpcRegistry.js +1 -0
  301. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  302. package/lib/esm/rpc/core/RpcRequest.d.ts.map +1 -1
  303. package/lib/esm/rpc/core/RpcRequest.js +1 -0
  304. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  305. package/lib/esm/rpc/core/RpcRequestContext.d.ts.map +1 -1
  306. package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
  307. package/lib/esm/rpc/core/RpcRoutingToken.d.ts.map +1 -1
  308. package/lib/esm/rpc/core/RpcRoutingToken.js +1 -0
  309. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  310. package/lib/esm/rpc/core/RpcSessionInvocation.d.ts.map +1 -1
  311. package/lib/esm/rpc/core/RpcSessionInvocation.js +1 -0
  312. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  313. package/lib/esm/rpc/web/BentleyCloudRpcManager.d.ts.map +1 -1
  314. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  315. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.d.ts.map +1 -1
  316. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +1 -0
  317. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  318. package/lib/esm/rpc/web/OpenAPI.d.ts +1 -0
  319. package/lib/esm/rpc/web/OpenAPI.d.ts.map +1 -1
  320. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  321. package/lib/esm/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
  322. package/lib/esm/rpc/web/WebAppRpcLogging.js +1 -0
  323. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  324. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +2 -0
  325. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  326. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  327. package/lib/esm/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  328. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  329. package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  330. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js +1 -0
  331. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  332. package/lib/esm/tile/B3dmTileIO.js +5 -5
  333. package/lib/esm/tile/B3dmTileIO.js.map +1 -1
  334. package/lib/esm/tile/CompositeTileIO.js +2 -2
  335. package/lib/esm/tile/CompositeTileIO.js.map +1 -1
  336. package/lib/esm/tile/GltfTileIO.js +5 -5
  337. package/lib/esm/tile/GltfTileIO.js.map +1 -1
  338. package/lib/esm/tile/I3dmTileIO.js +6 -6
  339. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  340. package/lib/esm/tile/IModelTileIO.d.ts +2 -2
  341. package/lib/esm/tile/IModelTileIO.js +12 -12
  342. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  343. package/lib/esm/tile/PntsTileIO.js +5 -5
  344. package/lib/esm/tile/PntsTileIO.js.map +1 -1
  345. package/lib/esm/tile/TileIO.js +3 -3
  346. package/lib/esm/tile/TileIO.js.map +1 -1
  347. package/package.json +7 -7
  348. package/lib/cjs/FeatureGates.d.ts +0 -32
  349. package/lib/cjs/FeatureGates.d.ts.map +0 -1
  350. package/lib/cjs/FeatureGates.js +0 -56
  351. package/lib/cjs/FeatureGates.js.map +0 -1
  352. package/lib/esm/FeatureGates.d.ts +0 -32
  353. package/lib/esm/FeatureGates.d.ts.map +0 -1
  354. package/lib/esm/FeatureGates.js +0 -52
  355. package/lib/esm/FeatureGates.js.map +0 -1
package/lib/esm/Code.js CHANGED
@@ -190,14 +190,15 @@ export var CodeScopeSpec;
190
190
  /** The Code value must be unique among other elements also scoped by the same element */
191
191
  Type[Type["RelatedElement"] = 4] = "RelatedElement";
192
192
  })(Type = CodeScopeSpec.Type || (CodeScopeSpec.Type = {}));
193
- /** Requirements for how the CodeScope Element is identified.
193
+ /**
194
+ * Requirements for how the CodeScope Element is identified.
194
195
  * @public
195
196
  */
196
197
  let ScopeRequirement;
197
198
  (function (ScopeRequirement) {
198
- /** The Code is required to have a valid ElementId as its scope */
199
+ /** The ElementId of CodeScope element identifies its scope. Used for Codes that are unique only within a single iModel. */
199
200
  ScopeRequirement[ScopeRequirement["ElementId"] = 1] = "ElementId";
200
- /** The Code is required to have a valid FederationGuid as its scope */
201
+ /** The FederationGuid of the CodeScope element identifies its scope. Used for Codes that are globally unique. */
201
202
  ScopeRequirement[ScopeRequirement["FederationGuid"] = 2] = "FederationGuid";
202
203
  })(ScopeRequirement = CodeScopeSpec.ScopeRequirement || (CodeScopeSpec.ScopeRequirement = {}));
203
204
  })(CodeScopeSpec || (CodeScopeSpec = {}));
@@ -209,47 +210,36 @@ export var CodeScopeSpec;
209
210
  * @public
210
211
  */
211
212
  export class CodeSpec {
212
- /** Internal-only constructor. Proper use is to supply `properties` only or `scopeType` and `scopeReq` but not `properties`.
213
- */
214
- constructor(iModel, id, name, scopeType, scopeReq, properties) {
213
+ constructor(iModel, id, name, properties) {
215
214
  this.iModel = iModel;
216
215
  this.id = id;
217
216
  this.name = name;
218
- if (properties) {
219
- this.properties = properties;
220
- if (!this.properties.scopeSpec) {
221
- this.properties.scopeSpec = {};
222
- this.scopeType = CodeScopeSpec.Type.Repository;
223
- }
224
- }
225
- else {
226
- this.properties = { scopeSpec: {} };
227
- this.scopeType = CodeScopeSpec.Type.Repository;
228
- }
229
- if (undefined !== scopeType)
230
- this.scopeType = scopeType;
231
- if (undefined !== scopeReq)
232
- this.scopeReq = scopeReq;
217
+ this.properties = properties !== null && properties !== void 0 ? properties : { scopeSpec: { type: CodeScopeSpec.Type.Repository } };
233
218
  }
234
219
  /** Create a new CodeSpec from the specified parameters
235
220
  * > Note: CodeSpec.id will not be valid until inserted
236
221
  * @see [CodeSpecs.insert]($backend)
237
222
  */
238
223
  static create(iModel, name, scopeType, scopeReq) {
239
- return new CodeSpec(iModel, Id64.invalid, name, scopeType, scopeReq, undefined);
224
+ const props = { scopeSpec: { type: scopeType } };
225
+ if (scopeReq)
226
+ props.scopeSpec.fGuidRequired = scopeReq === CodeScopeSpec.ScopeRequirement.FederationGuid;
227
+ return new CodeSpec(iModel, Id64.invalid, name, props);
240
228
  }
241
229
  /** Create a new CodeSpec directly from JSON. Used internally by the CodeSpecs.load function.
242
230
  * @internal
243
231
  */
244
232
  static createFromJson(iModel, id, name, properties) {
245
- return new CodeSpec(iModel, id, name, undefined, undefined, properties); // eslint-disable-line deprecation/deprecation
233
+ return new CodeSpec(iModel, id, name, properties);
246
234
  }
247
235
  /** Will be true if the id of this CodeSpec is valid. */
248
236
  get isValid() { return Id64.isValid(this.id); }
249
237
  /** The scope type of this CodeSpec. */
250
238
  get scopeType() { return this.properties.scopeSpec.type; }
251
239
  set scopeType(scopeType) { this.properties.scopeSpec.type = scopeType; }
252
- /** Will be `CodeScopeSpec.ScopeRequirement.FederationGuid` if the scoping element is required to have a FederationGuid or `CodeScopeSpec.ScopeRequirement.ElementId` otherwise (which is the default). */
240
+ /** Will be `CodeScopeSpec.ScopeRequirement.FederationGuid` if the scoping element is required to have a FederationGuid or
241
+ * CodeScopeSpec.ScopeRequirement.ElementId` otherwise (the default).
242
+ */
253
243
  get scopeReq() {
254
244
  return this.properties.scopeSpec.fGuidRequired ? CodeScopeSpec.ScopeRequirement.FederationGuid : CodeScopeSpec.ScopeRequirement.ElementId;
255
245
  }
@@ -260,13 +250,11 @@ export class CodeSpec {
260
250
  this.properties.scopeSpec.fGuidRequired = undefined;
261
251
  }
262
252
  /** 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.
263
- * @beta
253
+ * @deprecated in 3.6 Use scopeReq instead.
264
254
  */
265
255
  get isManagedWithIModel() {
266
- if (this.properties.spec && this.properties.spec.isManagedWithDgnDb !== undefined) {
267
- return this.properties.spec.isManagedWithDgnDb;
268
- }
269
- return true;
256
+ var _a, _b;
257
+ return (_b = (_a = this.properties.spec) === null || _a === void 0 ? void 0 : _a.isManagedWithDgnDb) !== null && _b !== void 0 ? _b : true;
270
258
  }
271
259
  set isManagedWithIModel(value) {
272
260
  if (!this.properties.spec)
@@ -1 +1 @@
1
- {"version":3,"file":"Code.js","sourceRoot":"","sources":["../../src/Code.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAc,IAAI,EAAc,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAwB9E;;;GAGG;AACH,MAAM,OAAO,IAAI;IAYf,YAAY,SAAoB;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACjD,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC;IAXD;;OAEG;IACH,IAAW,KAAK,aAAK,OAAO,MAAA,IAAI,CAAC,MAAM,mCAAI,EAAE,CAAC,CAAC,CAAC;IAChD,IAAW,KAAK,CAAC,GAAW,IAAI,IAAI,CAAC,MAAM,GAAG,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAS5D,gEAAgE;IACzD,MAAM,C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a,GAAG,SAAS,CAAC;IACxD,CAAC;IAED;;OAEG;IACH,IAAW,mBAAmB;QAC5B,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,kBAAkB,KAAK,SAAS,EAAE;YACjF,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,kBAAkB,CAAC;SAChD;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAW,mBAAmB,CAAC,KAAc;QAC3C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI;YACvB,IAAI,CAAC,UAAU,CAAC,IAAI,GAAG,EAAE,CAAC;QAE5B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;IAClD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Codes\r\n */\r\n\r\nimport { GuidString, Id64, Id64String, JsonUtils } from \"@itwin/core-bentley\";\r\nimport { IModel } from \"./IModel\";\r\n\r\n/**\r\n * The identity of the element defining the scope for a Code value.\r\n * For query input, may either be an ElementId or a FederationGuid. When returned from a query, it will be an ElementId.\r\n * @public\r\n * @extensions\r\n */\r\nexport type CodeScopeProps = Id64String | GuidString;\r\n\r\n/** The wire format for 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\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 /** Requirements for how the CodeScope Element is identified.\r\n * @public\r\n */\r\n export enum ScopeRequirement {\r\n /** The Code is required to have a valid ElementId as its scope */\r\n ElementId = 1,\r\n /** The Code is required to have a valid FederationGuid as its scope */\r\n FederationGuid = 2,\r\n }\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: any;\r\n\r\n /** Internal-only constructor. Proper use is to supply `properties` only or `scopeType` and `scopeReq` but not `properties`.\r\n */\r\n private constructor(iModel: IModel, id: Id64String, name: string, scopeType?: CodeScopeSpec.Type, scopeReq?: CodeScopeSpec.ScopeRequirement, properties?: any) {\r\n this.iModel = iModel;\r\n this.id = id;\r\n this.name = name;\r\n if (properties) {\r\n this.properties = properties;\r\n if (!this.properties.scopeSpec) {\r\n this.properties.scopeSpec = {};\r\n this.scopeType = CodeScopeSpec.Type.Repository;\r\n }\r\n } else {\r\n this.properties = { scopeSpec: {} };\r\n this.scopeType = CodeScopeSpec.Type.Repository;\r\n }\r\n if (undefined !== scopeType)\r\n this.scopeType = scopeType;\r\n\r\n if (undefined !== scopeReq)\r\n this.scopeReq = scopeReq;\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 return new CodeSpec(iModel, Id64.invalid, name, scopeType, scopeReq, undefined);\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: any): CodeSpec {\r\n return new CodeSpec(iModel, id, name, undefined, undefined, properties); // eslint-disable-line deprecation/deprecation\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\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 `CodeScopeSpec.ScopeRequirement.ElementId` otherwise (which is the default). */\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 * @beta\r\n */\r\n public get isManagedWithIModel(): boolean {\r\n if (this.properties.spec && this.properties.spec.isManagedWithDgnDb !== undefined) {\r\n return this.properties.spec.isManagedWithDgnDb;\r\n }\r\n return true;\r\n }\r\n public set isManagedWithIModel(value: boolean) {\r\n if (!this.properties.spec)\r\n this.properties.spec = {};\r\n\r\n this.properties.spec.isManagedWithDgnDb = value;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Code.js","sourceRoot":"","sources":["../../src/Code.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAc,IAAI,EAAc,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAwB9E;;;GAGG;AACH,MAAM,OAAO,IAAI;IAYf,YAAY,SAAoB;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACjD,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC;IAXD;;OAEG;IACH,IAAW,KAAK,aAAK,OAAO,MAAA,IAAI,CAAC,MAAM,mCAAI,EAAE,CAAC,CAAC,CAAC;IAChD,IAAW,KAAK,CAAC,GAAW,IAAI,IAAI,CAAC,MAAM,GAAG,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAS5D,gEAAgE;IACzD,MAAM,CAAC,WAAW;QACvB,MAAM,EAAE,GAAG,IAAI,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,IAA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IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAE/D,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,MAAA,MAAA,IAAI,CAAC,UAAU,CAAC,IAAI,0CAAE,kBAAkB,mCAAI,IAAI,CAAC;IAC1D,CAAC;IACD,IAAW,mBAAmB,CAAC,KAAc;QAC3C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI;YACvB,IAAI,CAAC,UAAU,CAAC,IAAI,GAAG,EAAE,CAAC;QAE5B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;IAClD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Codes\r\n */\r\n\r\nimport { GuidString, Id64, Id64String, JsonUtils } from \"@itwin/core-bentley\";\r\nimport { IModel } from \"./IModel\";\r\n\r\n/**\r\n * The identity of the element defining the scope for a Code value.\r\n * For query input, may either be an ElementId or a FederationGuid. When returned from a query, it will be an ElementId.\r\n * @public\r\n * @extensions\r\n */\r\nexport type CodeScopeProps = Id64String | GuidString;\r\n\r\n/** The wire format for 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\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\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"]}
@@ -211,6 +211,21 @@ export declare class ContextRealityModel {
211
211
  export interface ContextRealityModelsContainer {
212
212
  /** The list of reality models. */
213
213
  contextRealityModels?: ContextRealityModelProps[];
214
+ /** @internal used for type discrimination with ContextRealityModelsArgs. */
215
+ container?: never;
216
+ }
217
+ /** Arguments supplied to the constructor of [[ContextRealityModels]].
218
+ * @public
219
+ */
220
+ export interface ContextRealityModelsArgs {
221
+ /** The object that holds the JSON representation of the list of context reality models. */
222
+ container: ContextRealityModelsContainer;
223
+ /** Optional function used to instantiate each [[ContextRealityModel]] in the list. */
224
+ createContextRealityModel?: (props: ContextRealityModelProps) => ContextRealityModel;
225
+ /** If true, the list will not be populated by the constructor. Instead, the caller is responsible for calling [[ContextRealityModels.populate]] exactly once after construction.
226
+ * This is chiefly intended for use internally by the [DisplayStyleState]($frontend) constructor.
227
+ */
228
+ deferPopulating?: boolean;
214
229
  }
215
230
  /** A list of [[ContextRealityModel]]s attached to a [[DisplayStyleSettings]]. The list may be presented to the user with the name and description of each model.
216
231
  * The list is automatically synchronized with the underlying JSON representation provided by the input [[ContextRealityModelsContainer]].
@@ -232,13 +247,25 @@ export declare class ContextRealityModels {
232
247
  readonly onDisplaySettingsChanged: BeEvent<(model: ContextRealityModel, newSettings: RealityModelDisplaySettings) => void>;
233
248
  /** Event dispatched when a model is [[add]]ed, [[delete]]d, [[replace]]d, or [[update]]d. */
234
249
  readonly onChanged: BeEvent<(previousModel: ContextRealityModel | undefined, newModel: ContextRealityModel | undefined) => void>;
235
- /** Construct a new list of reality models from its JSON representation. THe list will be initialized from `container.classifiers` and that JSON representation
236
- * will be kept in sync with changes made to the list. The caller should not directly modify `container.classifiers` or its contents as that will cause the list
250
+ /** Construct a new list of reality models from its JSON representation. The list will be initialized from `container.contextRealityModels` and that JSON representation
251
+ * will be kept in sync with changes made to the list. The caller should not directly modify `container.contextRealityModels` or its contents as that will cause the list
237
252
  * to become out of sync with the JSON representation.
238
253
  * @param container The object that holds the JSON representation of the list.
239
- * @param createContextRealityModel Optional function used to instantiate ContextRealityModels added to the list.
254
+ * @param createContextRealityModel Optional function used to instantiate each [[ContextRealityModel]] in the list.
240
255
  */
241
256
  constructor(container: ContextRealityModelsContainer, createContextRealityModel?: (props: ContextRealityModelProps) => ContextRealityModel);
257
+ /** Construct a new list of reality models from its JSON representation. The list will be initialized from `args.container.contextRealityModels` and that JSON representation
258
+ * will be kept in sync with changes made to the list. The caller should not directly modify `container.contextRealityModels` or its contents as that will cause the list
259
+ * to become out of sync with the JSON representation.
260
+ * @param args Specifies the container and optionally customizes how the list of models is populated.
261
+ */
262
+ constructor(args: ContextRealityModelsArgs);
263
+ /** @internal needs to be invoked after DisplayStyleSettings constructor by DisplayStyleState constructor.*/
264
+ /** Populate the list of [[models]] from the container that was supplied to the constructor.
265
+ * This should only be invoked once, and only if [[ContextRealityModelsArgs.deferPopulating]] was specified as `true` when calling the constructor.
266
+ * @public
267
+ */
268
+ populate(): void;
242
269
  /** The read-only list of reality models. */
243
270
  get models(): ReadonlyArray<ContextRealityModel>;
244
271
  /** Append a new reality model to the list.
@@ -1 +1 @@
1
- {"version":3,"file":"ContextRealityModel.d.ts","sourceRoot":"","sources":["../../src/ContextRealityModel.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAsB,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AACnG,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAEtG;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,oBAAY,mBAAmB;IAC7B;;;;;OAKG;IACH,UAAU,eAAe;IACzB;;;;;OAKG;IACH,WAAW,gBAAgB;IAC3B;;;;OAIG;IACH,YAAY,iBAAiB;IAC7B;;OAEG;IAC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CAAC,2BAA2B;IAInC,OAAO,CAAC,gCAAgC;IAIxC,OAAO,CAAC,4BAA4B;CAGrC"}
@@ -215,13 +215,8 @@ export class ContextRealityModel {
215
215
  * @public
216
216
  */
217
217
  export class ContextRealityModels {
218
- /** Construct a new list of reality models from its JSON representation. THe list will be initialized from `container.classifiers` and that JSON representation
219
- * will be kept in sync with changes made to the list. The caller should not directly modify `container.classifiers` or its contents as that will cause the list
220
- * to become out of sync with the JSON representation.
221
- * @param container The object that holds the JSON representation of the list.
222
- * @param createContextRealityModel Optional function used to instantiate ContextRealityModels added to the list.
223
- */
224
- constructor(container, createContextRealityModel) {
218
+ /** @internal */
219
+ constructor(arg0, createContextRealityModel) {
225
220
  this._models = [];
226
221
  /** Event dispatched just before [[ContextRealityModel.planarClipMaskSettings]] is modified for one of the reality models. */
227
222
  this.onPlanarClipMaskChanged = new BeEvent();
@@ -233,9 +228,29 @@ export class ContextRealityModels {
233
228
  this.onDisplaySettingsChanged = new BeEvent();
234
229
  /** Event dispatched when a model is [[add]]ed, [[delete]]d, [[replace]]d, or [[update]]d. */
235
230
  this.onChanged = new BeEvent();
231
+ let container;
232
+ let defer = false;
233
+ if (arg0.container) {
234
+ container = arg0.container;
235
+ createContextRealityModel = arg0.createContextRealityModel;
236
+ defer = true === arg0.deferPopulating;
237
+ }
238
+ else {
239
+ container = arg0;
240
+ }
236
241
  this._container = container;
237
242
  this._createModel = createContextRealityModel !== null && createContextRealityModel !== void 0 ? createContextRealityModel : ((props) => new ContextRealityModel(props));
238
- const models = container.contextRealityModels;
243
+ if (!defer)
244
+ this.populate();
245
+ }
246
+ /** @internal needs to be invoked after DisplayStyleSettings constructor by DisplayStyleState constructor.*/
247
+ /** Populate the list of [[models]] from the container that was supplied to the constructor.
248
+ * This should only be invoked once, and only if [[ContextRealityModelsArgs.deferPopulating]] was specified as `true` when calling the constructor.
249
+ * @public
250
+ */
251
+ populate() {
252
+ assert(this._models.length === 0, "do not call ContextRealityModels.populate more than once");
253
+ const models = this._container.contextRealityModels;
239
254
  if (models)
240
255
  for (const model of models)
241
256
  this._models.push(this.createModel(model));
@@ -1 +1 @@
1
- {"version":3,"file":"ContextRealityModel.js","sourceRoot":"","sources":["../../src/ContextRealityModel.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAA0B,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAuB,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AACnG,OAAO,EAA0B,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAA4B,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAatG;;GAEG;AACH,MAAM,CAAN,IAAY,mBAyBX;AAzBD,WAAY,mBAAmB;IAC7B;;;;;OAKG;IACH,gDAAyB,CAAA;IACzB;;;;;OAKG;IACH,kDAA2B,CAAA;IAC3B;;;;OAIG;IACH,oDAA6B,CAAA;IAC7B;;OAEG;IACH,wDAAiC,CAAA;AACnC,CAAC,EAzBW,mBAAmB,KAAnB,mBAAmB,QAyB9B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,iBASX;AATD,WAAY,iBAAiB;IAC3B;;SAEK;IACL,8CAAyB,CAAA;IACzB;;MAEE;IACF,gCAAW,CAAA;AACb,CAAC,EATW,iBAAiB,KAAjB,iBAAiB,QAS5B;AAED;;GAEG;AACH,WAAiB,iBAAiB;IAChC;;;;OAIG;IACH,SAAgB,OAAO,CAAC,UAAkB;QACxC,IAAI,MAAM,GAAG,iBAAiB,CAAC,UAAU,CAAC;QAC1C,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC;YAC7B,MAAM,GAAG,iBAAiB,CAAC,GAAG,CAAC;QACjC,OAAO,MAAM,CAAC;IAChB,CAAC;IALe,yBAAO,UAKtB,CAAA;AACH,CAAC,EAZgB,iBAA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CAAC,CAAC;IAC3D,CAAC;IAEO,4BAA4B,CAAC,QAAqC,EAAE,KAA0B;QACpG,IAAI,CAAC,wBAAwB,CAAC,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC5D,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\nimport { assert, BeEvent } from \"@itwin/core-bentley\";\r\nimport { FeatureAppearance, FeatureAppearanceProps } from \"./FeatureSymbology\";\r\nimport { PlanarClipMaskMode, PlanarClipMaskProps, PlanarClipMaskSettings } from \"./PlanarClipMask\";\r\nimport { SpatialClassifierProps, SpatialClassifiers } from \"./SpatialClassification\";\r\nimport { RealityModelDisplayProps, RealityModelDisplaySettings } from \"./RealityModelDisplaySettings\";\r\n\r\n/** JSON representation of the blob properties for an OrbitGt property cloud.\r\n * @alpha\r\n */\r\nexport interface OrbitGtBlobProps {\r\n rdsUrl?: string;\r\n containerName: string;\r\n blobFileName: string;\r\n sasToken: string;\r\n accountName: string;\r\n}\r\n\r\n/** Identify the Reality Data service provider\r\n * @beta\r\n */\r\nexport enum RealityDataProvider {\r\n /**\r\n * This is the legacy mode where the access to the 3d tiles is harcoded in ContextRealityModelProps.tilesetUrl property.\r\n * It was use to support RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles\r\n * You should use other mode when possible\r\n * @see [[RealityDataSource.createKeyFromUrl]] that will try to detect provider from an URL\r\n */\r\n TilesetUrl = \"TilesetUrl\",\r\n /**\r\n * This is the legacy mode where the access to the 3d tiles is harcoded in ContextRealityModelProps.OrbitGtBlob property.\r\n * It was use to support OrbitPointCloud (OPC) from other server than ContextShare\r\n * You should use other mode when possible\r\n * @see [[RealityDataSource.createKeyFromOrbitGtBlobProps]] that will try to detect provider from an URL\r\n */\r\n OrbitGtBlob = \"OrbitGtBlob\",\r\n /**\r\n * Will provide access url from realityDataId and iTwinId on contextShare for 3dTile storage format or OPC storage format\r\n * This provider support all type of 3dTile storage fomat and OrbitPointCloud: RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles, OPC\r\n * @see [[RealityDataFormat]].\r\n */\r\n ContextShare = \"ContextShare\",\r\n /**\r\n * Will provide Open Street Map Building (OSM) from Cesium Ion (in 3dTile format)\r\n */\r\n CesiumIonAsset = \"CesiumIonAsset\",\r\n}\r\n\r\n/** Identify the Reality Data storage format\r\n * @beta\r\n */\r\nexport enum RealityDataFormat {\r\n /**\r\n * 3dTile supported formats; RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles\r\n * */\r\n ThreeDTile = \"ThreeDTile\",\r\n /**\r\n * Orbit Point Cloud (OPC) storage format (RealityDataType.OPC)\r\n */\r\n OPC = \"OPC\",\r\n}\r\n\r\n/** Utility function for RealityDataFormat\r\n * @beta\r\n */\r\nexport namespace RealityDataFormat {\r\n /**\r\n * Try to extract the RealityDataFormat from the url\r\n * @param tilesetUrl the reality data attachment url\r\n * @returns the extracted RealityDataFormat or ThreeDTile by default if not found\r\n */\r\n export function fromUrl(tilesetUrl: string): RealityDataFormat {\r\n let format = RealityDataFormat.ThreeDTile;\r\n if (tilesetUrl.includes(\".opc\"))\r\n format = RealityDataFormat.OPC;\r\n return format;\r\n }\r\n}\r\n\r\n/**\r\n * Key used by RealityDataSource to identify provider and reality data format\r\n * This key identify one and only one reality data source on the provider\r\n * @beta\r\n */\r\nexport interface RealityDataSourceKey {\r\n /**\r\n * The provider that supplies the access to reality data source for displaying the reality model\r\n * @see [[RealityDataProvider]] for default supported value;\r\n */\r\n provider: string;\r\n /**\r\n * The format used by the provider to store the reality data\r\n * @see [[RealityDataFormat]] for default supported value;\r\n */\r\n format: string;\r\n /** The reality data id that identify a reality data for the provider */\r\n id: string;\r\n /** The context id that was used when reality data was attached - if none provided, current session iTwinId will be used */\r\n iTwinId?: string;\r\n}\r\n/**\r\n * RealityDataSourceKey utility functions\r\n * @beta */\r\nexport namespace RealityDataSourceKey {\r\n /** Utility function to convert a RealityDataSourceKey into its string representation */\r\n export function convertToString(rdSourceKey: RealityDataSourceKey): string {\r\n return `${rdSourceKey.provider}:${rdSourceKey.format}:${rdSourceKey.id}:${rdSourceKey?.iTwinId}`;\r\n }\r\n /** Utility function to compare two RealityDataSourceKey, we consider it equal even if itwinId is different */\r\n export function isEqual(key1: RealityDataSourceKey, key2: RealityDataSourceKey): boolean {\r\n if ((key1.provider === RealityDataProvider.CesiumIonAsset) && key2.provider === RealityDataProvider.CesiumIonAsset)\r\n return true; // ignore other properties for CesiumIonAsset, id is hidden\r\n if ((key1.provider === key2.provider) && (key1.format === key2.format) && (key1.id === key2.id)) {\r\n // && (key1?.iTwinId === key2?.iTwinId)) -> ignore iTwinId, consider it is the same reality data\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\n\r\n/** JSON representation of the reality data reference attachment properties.\r\n * @beta\r\n*/\r\nexport interface RealityDataSourceProps {\r\n /** The source key that identify a reality data for the provider. */\r\n sourceKey: RealityDataSourceKey;\r\n}\r\n\r\n/** JSON representation of a [[ContextRealityModel]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ContextRealityModelProps {\r\n /** See [[ContextRealityModel.rdSourceKey]].\r\n * @beta\r\n */\r\n rdSourceKey?: RealityDataSourceKey;\r\n /** The URL that supplies the 3d tiles for displaying the reality model. */\r\n tilesetUrl: string;\r\n /** See [[ContextRealityModel.orbitGtBlob]].\r\n * @alpha\r\n */\r\n orbitGtBlob?: OrbitGtBlobProps;\r\n /** See [[ContextRealityModel.realityDataId]]. */\r\n realityDataId?: string;\r\n /** An optional, user-friendly name for the reality model suitable for display in a user interface. */\r\n name?: string;\r\n /** An optional, user-friendly description of the reality model suitable for display in a user interface. */\r\n description?: string;\r\n /** See [[ContextRealityModel.classifiers]]. */\r\n classifiers?: SpatialClassifierProps[];\r\n /** See [[ContextRealityModel.planarClipMask]]. */\r\n planarClipMask?: PlanarClipMaskProps;\r\n /** See [[ContextRealityModel.appearanceOverrides]]. */\r\n appearanceOverrides?: FeatureAppearanceProps;\r\n /** See [[ContextRealityModel.displaySettings]].\r\n * @beta\r\n */\r\n displaySettings?: RealityModelDisplayProps;\r\n}\r\n\r\n/** @public */\r\nexport namespace ContextRealityModelProps {\r\n /** Produce a deep copy of `input`. */\r\n export function clone(input: ContextRealityModelProps) {\r\n // Spread operator is shallow, and includes `undefined` properties and empty strings.\r\n // We want to make deep copies, omit undefined properties and empty strings, and require tilesetUrl to be defined.\r\n const output: ContextRealityModelProps = { tilesetUrl: input.tilesetUrl ?? \"\" };\r\n\r\n if (input.rdSourceKey)\r\n output.rdSourceKey = { ...input.rdSourceKey };\r\n\r\n if (input.name)\r\n output.name = input.name;\r\n\r\n if (input.realityDataId)\r\n output.realityDataId = input.realityDataId;\r\n\r\n if (input.description)\r\n output.description = input.description;\r\n\r\n if (input.orbitGtBlob)\r\n output.orbitGtBlob = { ...input.orbitGtBlob };\r\n\r\n if (input.appearanceOverrides) {\r\n output.appearanceOverrides = { ...input.appearanceOverrides };\r\n if (input.appearanceOverrides.rgb)\r\n output.appearanceOverrides.rgb = { ...input.appearanceOverrides.rgb };\r\n }\r\n\r\n if (input.displaySettings) {\r\n output.displaySettings = { ...input.displaySettings };\r\n if (input.displaySettings.pointCloud)\r\n output.displaySettings.pointCloud = { ...output.displaySettings.pointCloud };\r\n }\r\n\r\n if (input.planarClipMask)\r\n output.planarClipMask = { ...input.planarClipMask };\r\n\r\n if (input.classifiers)\r\n output.classifiers = input.classifiers.map((x) => { return { ...x, flags: { ...x.flags } }; });\r\n\r\n return output;\r\n }\r\n}\r\n\r\n/** A reality model not associated with a [GeometricModel]($backend) but instead defined in a [DisplayStyle]($backend) or [DisplayStyleState]($frontend).\r\n * Such reality models are displayed to provide context to the view and can be freely attached and detached at display time.\r\n * @see [this interactive example](https://www.itwinjs.org/sample-showcase/?group=Viewer&sample=reality-data-sample)\r\n * @see [[DisplayStyleSettings.contextRealityModels]] to define context reality models for a display style.\r\n * @public\r\n */\r\nexport class ContextRealityModel {\r\n /** @internal */\r\n protected readonly _props: ContextRealityModelProps;\r\n /**\r\n * The reality data source key identify the reality data provider and storage format.\r\n * It takes precedence over tilesetUrl and orbitGtBlob when present and can be use to actually replace these properties.\r\n * @beta\r\n */\r\n public readonly rdSourceKey?: RealityDataSourceKey;\r\n /** A name suitable for display in a user interface. By default, an empty string. */\r\n public readonly name: string;\r\n /** The URL that supplies the 3d tiles for displaying the reality model. */\r\n public readonly url: string;\r\n /** A description of the model suitable for display in a user interface. By default, an empty string. */\r\n public readonly description: string;\r\n /** An optional identifier that, if present, can be used to elide a request to the reality data service. */\r\n public readonly realityDataId?: string;\r\n /** A set of [[SpatialClassifier]]s, of which one at any given time can be used to classify the reality model. */\r\n public readonly classifiers?: SpatialClassifiers;\r\n /** @alpha */\r\n public readonly orbitGtBlob?: Readonly<OrbitGtBlobProps>;\r\n protected _appearanceOverrides?: FeatureAppearance;\r\n /** @beta */\r\n protected _displaySettings: RealityModelDisplaySettings;\r\n protected _planarClipMask?: PlanarClipMaskSettings;\r\n /** Event dispatched just before assignment to [[planarClipMaskSettings]]. */\r\n public readonly onPlanarClipMaskChanged = new BeEvent<(newSettings: PlanarClipMaskSettings | undefined, model: ContextRealityModel) => void>();\r\n /** Event dispatched just before assignment to [[appearanceOverrides]]. */\r\n public readonly onAppearanceOverridesChanged = new BeEvent<(newOverrides: FeatureAppearance | undefined, model: ContextRealityModel) => void>();\r\n /** Event dispatched just before assignment to [[displaySettings]].\r\n * @beta\r\n */\r\n public readonly onDisplaySettingsChanged = new BeEvent<(newSettings: RealityModelDisplaySettings, model: ContextRealityModel) => void>();\r\n\r\n /** Construct a new context reality model.\r\n * @param props JSON representation of the reality model, which will be kept in sync with changes made via the ContextRealityModel's methods.\r\n */\r\n public constructor(props: ContextRealityModelProps) {\r\n this._props = props;\r\n this.rdSourceKey = props.rdSourceKey;\r\n this.name = props.name ?? \"\";\r\n this.url = props.tilesetUrl ?? \"\";\r\n this.orbitGtBlob = props.orbitGtBlob;\r\n this.realityDataId = props.realityDataId;\r\n this.description = props.description ?? \"\";\r\n this._appearanceOverrides = props.appearanceOverrides ? FeatureAppearance.fromJSON(props.appearanceOverrides) : undefined;\r\n this._displaySettings = RealityModelDisplaySettings.fromJSON(props.displaySettings);\r\n\r\n if (props.planarClipMask && props.planarClipMask.mode !== PlanarClipMaskMode.None)\r\n this._planarClipMask = PlanarClipMaskSettings.fromJSON(props.planarClipMask);\r\n\r\n if (props.classifiers)\r\n this.classifiers = new SpatialClassifiers(props);\r\n }\r\n\r\n /** Optionally describes how the geometry of the reality model can be masked by other models. */\r\n public get planarClipMaskSettings(): PlanarClipMaskSettings | undefined {\r\n return this._planarClipMask;\r\n }\r\n public set planarClipMaskSettings(settings: PlanarClipMaskSettings | undefined) {\r\n this.onPlanarClipMaskChanged.raiseEvent(settings, this);\r\n if (!settings)\r\n delete this._props.planarClipMask;\r\n else\r\n this._props.planarClipMask = settings.toJSON();\r\n\r\n this._planarClipMask = settings;\r\n }\r\n\r\n /** Overrides applied to the appearance of the reality model. Only the rgb, transparency, nonLocatable, and emphasized properties are applicable - the rest are ignored. */\r\n public get appearanceOverrides(): FeatureAppearance | undefined {\r\n return this._appearanceOverrides;\r\n }\r\n public set appearanceOverrides(overrides: FeatureAppearance | undefined) {\r\n this.onAppearanceOverridesChanged.raiseEvent(overrides, this);\r\n if (!overrides)\r\n delete this._props.appearanceOverrides;\r\n else\r\n this._props.appearanceOverrides = overrides.toJSON();\r\n\r\n this._appearanceOverrides = overrides;\r\n }\r\n\r\n /** Settings controlling how this reality model is displayed in a [Viewport]($frontend).\r\n * @beta\r\n */\r\n public get displaySettings(): RealityModelDisplaySettings {\r\n return this._displaySettings;\r\n }\r\n public set displaySettings(settings: RealityModelDisplaySettings) {\r\n this.onDisplaySettingsChanged.raiseEvent(settings, this);\r\n this._props.displaySettings = settings.toJSON();\r\n this._displaySettings = settings;\r\n }\r\n\r\n /** Convert this model to its JSON representation. */\r\n public toJSON(): ContextRealityModelProps {\r\n return ContextRealityModelProps.clone(this._props);\r\n }\r\n\r\n /** Returns true if [[name]] and [[url]] match the specified name and url. */\r\n public matchesNameAndUrl(name: string, url: string): boolean {\r\n return this.name === name && this.url === url;\r\n }\r\n}\r\n\r\n/** An object that can store the JSON representation of a list of [[ContextRealityModel]]s.\r\n * @see [[ContextRealityModels]].\r\n * @see [[DisplayStyleSettingsProps.contextRealityModels]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ContextRealityModelsContainer {\r\n /** The list of reality models. */\r\n contextRealityModels?: ContextRealityModelProps[];\r\n}\r\n\r\n/** A list of [[ContextRealityModel]]s attached to a [[DisplayStyleSettings]]. The list may be presented to the user with the name and description of each model.\r\n * The list is automatically synchronized with the underlying JSON representation provided by the input [[ContextRealityModelsContainer]].\r\n * @see [this interactive example](https://www.itwinjs.org/sample-showcase/?group=Viewer&sample=reality-data-sample)\r\n * @see [[DisplayStyleSettings.contextRealityModels]].\r\n * @public\r\n */\r\nexport class ContextRealityModels {\r\n private readonly _container: ContextRealityModelsContainer;\r\n private readonly _createModel: (props: ContextRealityModelProps) => ContextRealityModel;\r\n private readonly _models: ContextRealityModel[] = [];\r\n /** Event dispatched just before [[ContextRealityModel.planarClipMaskSettings]] is modified for one of the reality models. */\r\n public readonly onPlanarClipMaskChanged = new BeEvent<(model: ContextRealityModel, newSettings: PlanarClipMaskSettings | undefined) => void>();\r\n /** Event dispatched just before [[ContextRealityModel.appearanceOverrides]] is modified for one of the reality models. */\r\n public readonly onAppearanceOverridesChanged = new BeEvent<(model: ContextRealityModel, newOverrides: FeatureAppearance | undefined) => void>();\r\n /** Event dispatched just before [[ContextRealityModel.displaySettings]] is modified for one of the reality models.\r\n * @beta\r\n */\r\n public readonly onDisplaySettingsChanged = new BeEvent<(model: ContextRealityModel, newSettings: RealityModelDisplaySettings) => void>();\r\n /** Event dispatched when a model is [[add]]ed, [[delete]]d, [[replace]]d, or [[update]]d. */\r\n public readonly onChanged = new BeEvent<(previousModel: ContextRealityModel | undefined, newModel: ContextRealityModel | undefined) => void>();\r\n\r\n /** Construct a new list of reality models from its JSON representation. THe list will be initialized from `container.classifiers` and that JSON representation\r\n * will be kept in sync with changes made to the list. The caller should not directly modify `container.classifiers` or its contents as that will cause the list\r\n * to become out of sync with the JSON representation.\r\n * @param container The object that holds the JSON representation of the list.\r\n * @param createContextRealityModel Optional function used to instantiate ContextRealityModels added to the list.\r\n */\r\n public constructor(container: ContextRealityModelsContainer, createContextRealityModel?: (props: ContextRealityModelProps) => ContextRealityModel) {\r\n this._container = container;\r\n this._createModel = createContextRealityModel ?? ((props) => new ContextRealityModel(props));\r\n\r\n const models = container.contextRealityModels;\r\n if (models)\r\n for (const model of models)\r\n this._models.push(this.createModel(model));\r\n }\r\n\r\n /** The read-only list of reality models. */\r\n public get models(): ReadonlyArray<ContextRealityModel> {\r\n return this._models;\r\n }\r\n\r\n /** Append a new reality model to the list.\r\n * @param The JSON representation of the reality model.\r\n * @returns the newly-added reality model.\r\n */\r\n public add(props: ContextRealityModelProps): ContextRealityModel {\r\n if (!this._container.contextRealityModels)\r\n this._container.contextRealityModels = [];\r\n\r\n props = ContextRealityModelProps.clone(props);\r\n const model = this.createModel(props);\r\n\r\n this.onChanged.raiseEvent(undefined, model);\r\n\r\n this._models.push(model);\r\n this._container.contextRealityModels.push(props);\r\n\r\n return model;\r\n }\r\n\r\n /** Remove the specified reality model from the list.\r\n * @param model The reality model to remove.\r\n * @returns true if the model was removed, or false if the model was not present in the list.\r\n */\r\n public delete(model: ContextRealityModel): boolean {\r\n const index = this._models.indexOf(model);\r\n if (-1 === index)\r\n return false;\r\n\r\n assert(undefined !== this._container.contextRealityModels);\r\n assert(index < this._container.contextRealityModels.length);\r\n\r\n this.dropEventListeners(model);\r\n this.onChanged.raiseEvent(model, undefined);\r\n\r\n this._models.splice(index, 1);\r\n if (this.models.length === 0)\r\n this._container.contextRealityModels = undefined;\r\n else\r\n this._container.contextRealityModels.splice(index, 1);\r\n\r\n return true;\r\n }\r\n\r\n /** Remove all reality models from the list. */\r\n public clear(): void {\r\n for (const model of this.models) {\r\n this.dropEventListeners(model);\r\n this.onChanged.raiseEvent(model, undefined);\r\n }\r\n\r\n this._container.contextRealityModels = undefined;\r\n this._models.length = 0;\r\n }\r\n\r\n /** Replace a reality model in the list.\r\n * @param toReplace The reality model to be replaced.\r\n * @param replaceWith The JSON representation of the replacement reality model.\r\n * @returns the newly-created reality model that replaced `toReplace`.\r\n * @throws Error if `toReplace` is not present in the list\r\n * @note The replacement occupies the same index in the list as `toReplace` did.\r\n */\r\n public replace(toReplace: ContextRealityModel, replaceWith: ContextRealityModelProps): ContextRealityModel {\r\n const index = this._models.indexOf(toReplace);\r\n if (-1 === index)\r\n throw new Error(\"ContextRealityModel not present in list.\");\r\n\r\n assert(undefined !== this._container.contextRealityModels);\r\n assert(index < this._container.contextRealityModels.length);\r\n\r\n replaceWith = ContextRealityModelProps.clone(replaceWith);\r\n const model = this.createModel(replaceWith);\r\n\r\n this.onChanged.raiseEvent(toReplace, model);\r\n this.dropEventListeners(toReplace);\r\n\r\n this._models[index] = model;\r\n this._container.contextRealityModels[index] = replaceWith;\r\n\r\n return model;\r\n }\r\n\r\n /** Change selected properties of a reality model.\r\n * @param toUpdate The reality model whose properties are to be modified.\r\n * @param updateProps The properties to change.\r\n * @returns The updated reality model, identical to `toUpdate` except for properties explicitly supplied by `updateProps`.\r\n * @throws Error if `toUpdate` is not present in the list.\r\n */\r\n public update(toUpdate: ContextRealityModel, updateProps: Partial<ContextRealityModelProps>): ContextRealityModel {\r\n const props = {\r\n ...toUpdate.toJSON(),\r\n ...updateProps,\r\n };\r\n\r\n // Partial<> makes it possible to pass `undefined` for tilesetUrl...preserve previous URL in that case.\r\n if (undefined === props.tilesetUrl)\r\n props.tilesetUrl = toUpdate.url;\r\n\r\n return this.replace(toUpdate, props);\r\n }\r\n\r\n private createModel(props: ContextRealityModelProps): ContextRealityModel {\r\n const model = this._createModel(props);\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n model.onPlanarClipMaskChanged.addListener(this.handlePlanarClipMaskChanged, this);\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n model.onAppearanceOverridesChanged.addListener(this.handleAppearanceOverridesChanged, this);\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n model.onDisplaySettingsChanged.addListener(this.handleDisplaySettingsChanged, this);\r\n return model;\r\n }\r\n\r\n private dropEventListeners(model: ContextRealityModel): void {\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n model.onPlanarClipMaskChanged.removeListener(this.handlePlanarClipMaskChanged, this);\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n model.onAppearanceOverridesChanged.removeListener(this.handleAppearanceOverridesChanged, this);\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n model.onDisplaySettingsChanged.removeListener(this.handleDisplaySettingsChanged, this);\r\n }\r\n\r\n private handlePlanarClipMaskChanged(mask: PlanarClipMaskSettings | undefined, model: ContextRealityModel): void {\r\n this.onPlanarClipMaskChanged.raiseEvent(model, mask);\r\n }\r\n\r\n private handleAppearanceOverridesChanged(app: FeatureAppearance | undefined, model: ContextRealityModel): void {\r\n this.onAppearanceOverridesChanged.raiseEvent(model, app);\r\n }\r\n\r\n private handleDisplaySettingsChanged(settings: RealityModelDisplaySettings, model: ContextRealityModel): void {\r\n this.onDisplaySettingsChanged.raiseEvent(model, settings);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ContextRealityModel.js","sourceRoot":"","sources":["../../src/ContextRealityModel.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAA0B,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAu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AC,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IAEO,gCAAgC,CAAC,GAAkC,EAAE,KAA0B;QACrG,IAAI,CAAC,4BAA4B,CAAC,UAAU,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC3D,CAAC;IAEO,4BAA4B,CAAC,QAAqC,EAAE,KAA0B;QACpG,IAAI,CAAC,wBAAwB,CAAC,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC5D,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\nimport { assert, BeEvent } from \"@itwin/core-bentley\";\r\nimport { FeatureAppearance, FeatureAppearanceProps } from \"./FeatureSymbology\";\r\nimport { PlanarClipMaskMode, PlanarClipMaskProps, PlanarClipMaskSettings } from \"./PlanarClipMask\";\r\nimport { SpatialClassifierProps, SpatialClassifiers } from \"./SpatialClassification\";\r\nimport { RealityModelDisplayProps, RealityModelDisplaySettings } from \"./RealityModelDisplaySettings\";\r\n\r\n/** JSON representation of the blob properties for an OrbitGt property cloud.\r\n * @alpha\r\n */\r\nexport interface OrbitGtBlobProps {\r\n rdsUrl?: string;\r\n containerName: string;\r\n blobFileName: string;\r\n sasToken: string;\r\n accountName: string;\r\n}\r\n\r\n/** Identify the Reality Data service provider\r\n * @beta\r\n */\r\nexport enum RealityDataProvider {\r\n /**\r\n * This is the legacy mode where the access to the 3d tiles is harcoded in ContextRealityModelProps.tilesetUrl property.\r\n * It was use to support RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles\r\n * You should use other mode when possible\r\n * @see [[RealityDataSource.createKeyFromUrl]] that will try to detect provider from an URL\r\n */\r\n TilesetUrl = \"TilesetUrl\",\r\n /**\r\n * This is the legacy mode where the access to the 3d tiles is harcoded in ContextRealityModelProps.OrbitGtBlob property.\r\n * It was use to support OrbitPointCloud (OPC) from other server than ContextShare\r\n * You should use other mode when possible\r\n * @see [[RealityDataSource.createKeyFromOrbitGtBlobProps]] that will try to detect provider from an URL\r\n */\r\n OrbitGtBlob = \"OrbitGtBlob\",\r\n /**\r\n * Will provide access url from realityDataId and iTwinId on contextShare for 3dTile storage format or OPC storage format\r\n * This provider support all type of 3dTile storage fomat and OrbitPointCloud: RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles, OPC\r\n * @see [[RealityDataFormat]].\r\n */\r\n ContextShare = \"ContextShare\",\r\n /**\r\n * Will provide Open Street Map Building (OSM) from Cesium Ion (in 3dTile format)\r\n */\r\n CesiumIonAsset = \"CesiumIonAsset\",\r\n}\r\n\r\n/** Identify the Reality Data storage format\r\n * @beta\r\n */\r\nexport enum RealityDataFormat {\r\n /**\r\n * 3dTile supported formats; RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles\r\n * */\r\n ThreeDTile = \"ThreeDTile\",\r\n /**\r\n * Orbit Point Cloud (OPC) storage format (RealityDataType.OPC)\r\n */\r\n OPC = \"OPC\",\r\n}\r\n\r\n/** Utility function for RealityDataFormat\r\n * @beta\r\n */\r\nexport namespace RealityDataFormat {\r\n /**\r\n * Try to extract the RealityDataFormat from the url\r\n * @param tilesetUrl the reality data attachment url\r\n * @returns the extracted RealityDataFormat or ThreeDTile by default if not found\r\n */\r\n export function fromUrl(tilesetUrl: string): RealityDataFormat {\r\n let format = RealityDataFormat.ThreeDTile;\r\n if (tilesetUrl.includes(\".opc\"))\r\n format = RealityDataFormat.OPC;\r\n return format;\r\n }\r\n}\r\n\r\n/**\r\n * Key used by RealityDataSource to identify provider and reality data format\r\n * This key identify one and only one reality data source on the provider\r\n * @beta\r\n */\r\nexport interface RealityDataSourceKey {\r\n /**\r\n * The provider that supplies the access to reality data source for displaying the reality model\r\n * @see [[RealityDataProvider]] for default supported value;\r\n */\r\n provider: string;\r\n /**\r\n * The format used by the provider to store the reality data\r\n * @see [[RealityDataFormat]] for default supported value;\r\n */\r\n format: string;\r\n /** The reality data id that identify a reality data for the provider */\r\n id: string;\r\n /** The context id that was used when reality data was attached - if none provided, current session iTwinId will be used */\r\n iTwinId?: string;\r\n}\r\n/**\r\n * RealityDataSourceKey utility functions\r\n * @beta */\r\nexport namespace RealityDataSourceKey {\r\n /** Utility function to convert a RealityDataSourceKey into its string representation */\r\n export function convertToString(rdSourceKey: RealityDataSourceKey): string {\r\n return `${rdSourceKey.provider}:${rdSourceKey.format}:${rdSourceKey.id}:${rdSourceKey?.iTwinId}`;\r\n }\r\n /** Utility function to compare two RealityDataSourceKey, we consider it equal even if itwinId is different */\r\n export function isEqual(key1: RealityDataSourceKey, key2: RealityDataSourceKey): boolean {\r\n if ((key1.provider === RealityDataProvider.CesiumIonAsset) && key2.provider === RealityDataProvider.CesiumIonAsset)\r\n return true; // ignore other properties for CesiumIonAsset, id is hidden\r\n if ((key1.provider === key2.provider) && (key1.format === key2.format) && (key1.id === key2.id)) {\r\n // && (key1?.iTwinId === key2?.iTwinId)) -> ignore iTwinId, consider it is the same reality data\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\n\r\n/** JSON representation of the reality data reference attachment properties.\r\n * @beta\r\n*/\r\nexport interface RealityDataSourceProps {\r\n /** The source key that identify a reality data for the provider. */\r\n sourceKey: RealityDataSourceKey;\r\n}\r\n\r\n/** JSON representation of a [[ContextRealityModel]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ContextRealityModelProps {\r\n /** See [[ContextRealityModel.rdSourceKey]].\r\n * @beta\r\n */\r\n rdSourceKey?: RealityDataSourceKey;\r\n /** The URL that supplies the 3d tiles for displaying the reality model. */\r\n tilesetUrl: string;\r\n /** See [[ContextRealityModel.orbitGtBlob]].\r\n * @alpha\r\n */\r\n orbitGtBlob?: OrbitGtBlobProps;\r\n /** See [[ContextRealityModel.realityDataId]]. */\r\n realityDataId?: string;\r\n /** An optional, user-friendly name for the reality model suitable for display in a user interface. */\r\n name?: string;\r\n /** An optional, user-friendly description of the reality model suitable for display in a user interface. */\r\n description?: string;\r\n /** See [[ContextRealityModel.classifiers]]. */\r\n classifiers?: SpatialClassifierProps[];\r\n /** See [[ContextRealityModel.planarClipMask]]. */\r\n planarClipMask?: PlanarClipMaskProps;\r\n /** See [[ContextRealityModel.appearanceOverrides]]. */\r\n appearanceOverrides?: FeatureAppearanceProps;\r\n /** See [[ContextRealityModel.displaySettings]].\r\n * @beta\r\n */\r\n displaySettings?: RealityModelDisplayProps;\r\n}\r\n\r\n/** @public */\r\nexport namespace ContextRealityModelProps {\r\n /** Produce a deep copy of `input`. */\r\n export function clone(input: ContextRealityModelProps) {\r\n // Spread operator is shallow, and includes `undefined` properties and empty strings.\r\n // We want to make deep copies, omit undefined properties and empty strings, and require tilesetUrl to be defined.\r\n const output: ContextRealityModelProps = { tilesetUrl: input.tilesetUrl ?? \"\" };\r\n\r\n if (input.rdSourceKey)\r\n output.rdSourceKey = { ...input.rdSourceKey };\r\n\r\n if (input.name)\r\n output.name = input.name;\r\n\r\n if (input.realityDataId)\r\n output.realityDataId = input.realityDataId;\r\n\r\n if (input.description)\r\n output.description = input.description;\r\n\r\n if (input.orbitGtBlob)\r\n output.orbitGtBlob = { ...input.orbitGtBlob };\r\n\r\n if (input.appearanceOverrides) {\r\n output.appearanceOverrides = { ...input.appearanceOverrides };\r\n if (input.appearanceOverrides.rgb)\r\n output.appearanceOverrides.rgb = { ...input.appearanceOverrides.rgb };\r\n }\r\n\r\n if (input.displaySettings) {\r\n output.displaySettings = { ...input.displaySettings };\r\n if (input.displaySettings.pointCloud)\r\n output.displaySettings.pointCloud = { ...output.displaySettings.pointCloud };\r\n }\r\n\r\n if (input.planarClipMask)\r\n output.planarClipMask = { ...input.planarClipMask };\r\n\r\n if (input.classifiers)\r\n output.classifiers = input.classifiers.map((x) => { return { ...x, flags: { ...x.flags } }; });\r\n\r\n return output;\r\n }\r\n}\r\n\r\n/** A reality model not associated with a [GeometricModel]($backend) but instead defined in a [DisplayStyle]($backend) or [DisplayStyleState]($frontend).\r\n * Such reality models are displayed to provide context to the view and can be freely attached and detached at display time.\r\n * @see [this interactive example](https://www.itwinjs.org/sample-showcase/?group=Viewer&sample=reality-data-sample)\r\n * @see [[DisplayStyleSettings.contextRealityModels]] to define context reality models for a display style.\r\n * @public\r\n */\r\nexport class ContextRealityModel {\r\n /** @internal */\r\n protected readonly _props: ContextRealityModelProps;\r\n /**\r\n * The reality data source key identify the reality data provider and storage format.\r\n * It takes precedence over tilesetUrl and orbitGtBlob when present and can be use to actually replace these properties.\r\n * @beta\r\n */\r\n public readonly rdSourceKey?: RealityDataSourceKey;\r\n /** A name suitable for display in a user interface. By default, an empty string. */\r\n public readonly name: string;\r\n /** The URL that supplies the 3d tiles for displaying the reality model. */\r\n public readonly url: string;\r\n /** A description of the model suitable for display in a user interface. By default, an empty string. */\r\n public readonly description: string;\r\n /** An optional identifier that, if present, can be used to elide a request to the reality data service. */\r\n public readonly realityDataId?: string;\r\n /** A set of [[SpatialClassifier]]s, of which one at any given time can be used to classify the reality model. */\r\n public readonly classifiers?: SpatialClassifiers;\r\n /** @alpha */\r\n public readonly orbitGtBlob?: Readonly<OrbitGtBlobProps>;\r\n protected _appearanceOverrides?: FeatureAppearance;\r\n /** @beta */\r\n protected _displaySettings: RealityModelDisplaySettings;\r\n protected _planarClipMask?: PlanarClipMaskSettings;\r\n /** Event dispatched just before assignment to [[planarClipMaskSettings]]. */\r\n public readonly onPlanarClipMaskChanged = new BeEvent<(newSettings: PlanarClipMaskSettings | undefined, model: ContextRealityModel) => void>();\r\n /** Event dispatched just before assignment to [[appearanceOverrides]]. */\r\n public readonly onAppearanceOverridesChanged = new BeEvent<(newOverrides: FeatureAppearance | undefined, model: ContextRealityModel) => void>();\r\n /** Event dispatched just before assignment to [[displaySettings]].\r\n * @beta\r\n */\r\n public readonly onDisplaySettingsChanged = new BeEvent<(newSettings: RealityModelDisplaySettings, model: ContextRealityModel) => void>();\r\n\r\n /** Construct a new context reality model.\r\n * @param props JSON representation of the reality model, which will be kept in sync with changes made via the ContextRealityModel's methods.\r\n */\r\n public constructor(props: ContextRealityModelProps) {\r\n this._props = props;\r\n this.rdSourceKey = props.rdSourceKey;\r\n this.name = props.name ?? \"\";\r\n this.url = props.tilesetUrl ?? \"\";\r\n this.orbitGtBlob = props.orbitGtBlob;\r\n this.realityDataId = props.realityDataId;\r\n this.description = props.description ?? \"\";\r\n this._appearanceOverrides = props.appearanceOverrides ? FeatureAppearance.fromJSON(props.appearanceOverrides) : undefined;\r\n this._displaySettings = RealityModelDisplaySettings.fromJSON(props.displaySettings);\r\n\r\n if (props.planarClipMask && props.planarClipMask.mode !== PlanarClipMaskMode.None)\r\n this._planarClipMask = PlanarClipMaskSettings.fromJSON(props.planarClipMask);\r\n\r\n if (props.classifiers)\r\n this.classifiers = new SpatialClassifiers(props);\r\n }\r\n\r\n /** Optionally describes how the geometry of the reality model can be masked by other models. */\r\n public get planarClipMaskSettings(): PlanarClipMaskSettings | undefined {\r\n return this._planarClipMask;\r\n }\r\n public set planarClipMaskSettings(settings: PlanarClipMaskSettings | undefined) {\r\n this.onPlanarClipMaskChanged.raiseEvent(settings, this);\r\n if (!settings)\r\n delete this._props.planarClipMask;\r\n else\r\n this._props.planarClipMask = settings.toJSON();\r\n\r\n this._planarClipMask = settings;\r\n }\r\n\r\n /** Overrides applied to the appearance of the reality model. Only the rgb, transparency, nonLocatable, and emphasized properties are applicable - the rest are ignored. */\r\n public get appearanceOverrides(): FeatureAppearance | undefined {\r\n return this._appearanceOverrides;\r\n }\r\n public set appearanceOverrides(overrides: FeatureAppearance | undefined) {\r\n this.onAppearanceOverridesChanged.raiseEvent(overrides, this);\r\n if (!overrides)\r\n delete this._props.appearanceOverrides;\r\n else\r\n this._props.appearanceOverrides = overrides.toJSON();\r\n\r\n this._appearanceOverrides = overrides;\r\n }\r\n\r\n /** Settings controlling how this reality model is displayed in a [Viewport]($frontend).\r\n * @beta\r\n */\r\n public get displaySettings(): RealityModelDisplaySettings {\r\n return this._displaySettings;\r\n }\r\n public set displaySettings(settings: RealityModelDisplaySettings) {\r\n this.onDisplaySettingsChanged.raiseEvent(settings, this);\r\n this._props.displaySettings = settings.toJSON();\r\n this._displaySettings = settings;\r\n }\r\n\r\n /** Convert this model to its JSON representation. */\r\n public toJSON(): ContextRealityModelProps {\r\n return ContextRealityModelProps.clone(this._props);\r\n }\r\n\r\n /** Returns true if [[name]] and [[url]] match the specified name and url. */\r\n public matchesNameAndUrl(name: string, url: string): boolean {\r\n return this.name === name && this.url === url;\r\n }\r\n}\r\n\r\n/** An object that can store the JSON representation of a list of [[ContextRealityModel]]s.\r\n * @see [[ContextRealityModels]].\r\n * @see [[DisplayStyleSettingsProps.contextRealityModels]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ContextRealityModelsContainer {\r\n /** The list of reality models. */\r\n contextRealityModels?: ContextRealityModelProps[];\r\n /** @internal used for type discrimination with ContextRealityModelsArgs. */\r\n container?: never;\r\n}\r\n\r\n/** Arguments supplied to the constructor of [[ContextRealityModels]].\r\n * @public\r\n */\r\nexport interface ContextRealityModelsArgs {\r\n /** The object that holds the JSON representation of the list of context reality models. */\r\n container: ContextRealityModelsContainer;\r\n /** Optional function used to instantiate each [[ContextRealityModel]] in the list. */\r\n createContextRealityModel?: (props: ContextRealityModelProps) => ContextRealityModel;\r\n /** If true, the list will not be populated by the constructor. Instead, the caller is responsible for calling [[ContextRealityModels.populate]] exactly once after construction.\r\n * This is chiefly intended for use internally by the [DisplayStyleState]($frontend) constructor.\r\n */\r\n deferPopulating?: boolean;\r\n}\r\n\r\n/** A list of [[ContextRealityModel]]s attached to a [[DisplayStyleSettings]]. The list may be presented to the user with the name and description of each model.\r\n * The list is automatically synchronized with the underlying JSON representation provided by the input [[ContextRealityModelsContainer]].\r\n * @see [this interactive example](https://www.itwinjs.org/sample-showcase/?group=Viewer&sample=reality-data-sample)\r\n * @see [[DisplayStyleSettings.contextRealityModels]].\r\n * @public\r\n */\r\nexport class ContextRealityModels {\r\n private readonly _container: ContextRealityModelsContainer;\r\n private readonly _createModel: (props: ContextRealityModelProps) => ContextRealityModel;\r\n private readonly _models: ContextRealityModel[] = [];\r\n /** Event dispatched just before [[ContextRealityModel.planarClipMaskSettings]] is modified for one of the reality models. */\r\n public readonly onPlanarClipMaskChanged = new BeEvent<(model: ContextRealityModel, newSettings: PlanarClipMaskSettings | undefined) => void>();\r\n /** Event dispatched just before [[ContextRealityModel.appearanceOverrides]] is modified for one of the reality models. */\r\n public readonly onAppearanceOverridesChanged = new BeEvent<(model: ContextRealityModel, newOverrides: FeatureAppearance | undefined) => void>();\r\n /** Event dispatched just before [[ContextRealityModel.displaySettings]] is modified for one of the reality models.\r\n * @beta\r\n */\r\n public readonly onDisplaySettingsChanged = new BeEvent<(model: ContextRealityModel, newSettings: RealityModelDisplaySettings) => void>();\r\n /** Event dispatched when a model is [[add]]ed, [[delete]]d, [[replace]]d, or [[update]]d. */\r\n public readonly onChanged = new BeEvent<(previousModel: ContextRealityModel | undefined, newModel: ContextRealityModel | undefined) => void>();\r\n\r\n /** Construct a new list of reality models from its JSON representation. The list will be initialized from `container.contextRealityModels` and that JSON representation\r\n * will be kept in sync with changes made to the list. The caller should not directly modify `container.contextRealityModels` or its contents as that will cause the list\r\n * to become out of sync with the JSON representation.\r\n * @param container The object that holds the JSON representation of the list.\r\n * @param createContextRealityModel Optional function used to instantiate each [[ContextRealityModel]] in the list.\r\n */\r\n public constructor(container: ContextRealityModelsContainer, createContextRealityModel?: (props: ContextRealityModelProps) => ContextRealityModel);\r\n\r\n /** Construct a new list of reality models from its JSON representation. The list will be initialized from `args.container.contextRealityModels` and that JSON representation\r\n * will be kept in sync with changes made to the list. The caller should not directly modify `container.contextRealityModels` or its contents as that will cause the list\r\n * to become out of sync with the JSON representation.\r\n * @param args Specifies the container and optionally customizes how the list of models is populated.\r\n */\r\n public constructor(args: ContextRealityModelsArgs);\r\n\r\n /** @internal */\r\n public constructor(arg0: ContextRealityModelsContainer | ContextRealityModelsArgs, createContextRealityModel?: (props: ContextRealityModelProps) => ContextRealityModel) {\r\n let container: ContextRealityModelsContainer;\r\n let defer = false;\r\n if (arg0.container) {\r\n container = arg0.container;\r\n createContextRealityModel = arg0.createContextRealityModel;\r\n defer = true === arg0.deferPopulating;\r\n } else {\r\n container = arg0;\r\n }\r\n\r\n this._container = container;\r\n this._createModel = createContextRealityModel ?? ((props) => new ContextRealityModel(props));\r\n\r\n if (!defer)\r\n this.populate();\r\n }\r\n\r\n /** @internal needs to be invoked after DisplayStyleSettings constructor by DisplayStyleState constructor.*/\r\n /** Populate the list of [[models]] from the container that was supplied to the constructor.\r\n * This should only be invoked once, and only if [[ContextRealityModelsArgs.deferPopulating]] was specified as `true` when calling the constructor.\r\n * @public\r\n */\r\n public populate(): void {\r\n assert(this._models.length === 0, \"do not call ContextRealityModels.populate more than once\");\r\n const models = this._container.contextRealityModels;\r\n if (models)\r\n for (const model of models)\r\n this._models.push(this.createModel(model));\r\n }\r\n\r\n /** The read-only list of reality models. */\r\n public get models(): ReadonlyArray<ContextRealityModel> {\r\n return this._models;\r\n }\r\n\r\n /** Append a new reality model to the list.\r\n * @param The JSON representation of the reality model.\r\n * @returns the newly-added reality model.\r\n */\r\n public add(props: ContextRealityModelProps): ContextRealityModel {\r\n if (!this._container.contextRealityModels)\r\n this._container.contextRealityModels = [];\r\n\r\n props = ContextRealityModelProps.clone(props);\r\n const model = this.createModel(props);\r\n\r\n this.onChanged.raiseEvent(undefined, model);\r\n\r\n this._models.push(model);\r\n this._container.contextRealityModels.push(props);\r\n\r\n return model;\r\n }\r\n\r\n /** Remove the specified reality model from the list.\r\n * @param model The reality model to remove.\r\n * @returns true if the model was removed, or false if the model was not present in the list.\r\n */\r\n public delete(model: ContextRealityModel): boolean {\r\n const index = this._models.indexOf(model);\r\n if (-1 === index)\r\n return false;\r\n\r\n assert(undefined !== this._container.contextRealityModels);\r\n assert(index < this._container.contextRealityModels.length);\r\n\r\n this.dropEventListeners(model);\r\n this.onChanged.raiseEvent(model, undefined);\r\n\r\n this._models.splice(index, 1);\r\n if (this.models.length === 0)\r\n this._container.contextRealityModels = undefined;\r\n else\r\n this._container.contextRealityModels.splice(index, 1);\r\n\r\n return true;\r\n }\r\n\r\n /** Remove all reality models from the list. */\r\n public clear(): void {\r\n for (const model of this.models) {\r\n this.dropEventListeners(model);\r\n this.onChanged.raiseEvent(model, undefined);\r\n }\r\n\r\n this._container.contextRealityModels = undefined;\r\n this._models.length = 0;\r\n }\r\n\r\n /** Replace a reality model in the list.\r\n * @param toReplace The reality model to be replaced.\r\n * @param replaceWith The JSON representation of the replacement reality model.\r\n * @returns the newly-created reality model that replaced `toReplace`.\r\n * @throws Error if `toReplace` is not present in the list\r\n * @note The replacement occupies the same index in the list as `toReplace` did.\r\n */\r\n public replace(toReplace: ContextRealityModel, replaceWith: ContextRealityModelProps): ContextRealityModel {\r\n const index = this._models.indexOf(toReplace);\r\n if (-1 === index)\r\n throw new Error(\"ContextRealityModel not present in list.\");\r\n\r\n assert(undefined !== this._container.contextRealityModels);\r\n assert(index < this._container.contextRealityModels.length);\r\n\r\n replaceWith = ContextRealityModelProps.clone(replaceWith);\r\n const model = this.createModel(replaceWith);\r\n\r\n this.onChanged.raiseEvent(toReplace, model);\r\n this.dropEventListeners(toReplace);\r\n\r\n this._models[index] = model;\r\n this._container.contextRealityModels[index] = replaceWith;\r\n\r\n return model;\r\n }\r\n\r\n /** Change selected properties of a reality model.\r\n * @param toUpdate The reality model whose properties are to be modified.\r\n * @param updateProps The properties to change.\r\n * @returns The updated reality model, identical to `toUpdate` except for properties explicitly supplied by `updateProps`.\r\n * @throws Error if `toUpdate` is not present in the list.\r\n */\r\n public update(toUpdate: ContextRealityModel, updateProps: Partial<ContextRealityModelProps>): ContextRealityModel {\r\n const props = {\r\n ...toUpdate.toJSON(),\r\n ...updateProps,\r\n };\r\n\r\n // Partial<> makes it possible to pass `undefined` for tilesetUrl...preserve previous URL in that case.\r\n if (undefined === props.tilesetUrl)\r\n props.tilesetUrl = toUpdate.url;\r\n\r\n return this.replace(toUpdate, props);\r\n }\r\n\r\n private createModel(props: ContextRealityModelProps): ContextRealityModel {\r\n const model = this._createModel(props);\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n model.onPlanarClipMaskChanged.addListener(this.handlePlanarClipMaskChanged, this);\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n model.onAppearanceOverridesChanged.addListener(this.handleAppearanceOverridesChanged, this);\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n model.onDisplaySettingsChanged.addListener(this.handleDisplaySettingsChanged, this);\r\n return model;\r\n }\r\n\r\n private dropEventListeners(model: ContextRealityModel): void {\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n model.onPlanarClipMaskChanged.removeListener(this.handlePlanarClipMaskChanged, this);\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n model.onAppearanceOverridesChanged.removeListener(this.handleAppearanceOverridesChanged, this);\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n model.onDisplaySettingsChanged.removeListener(this.handleDisplaySettingsChanged, this);\r\n }\r\n\r\n private handlePlanarClipMaskChanged(mask: PlanarClipMaskSettings | undefined, model: ContextRealityModel): void {\r\n this.onPlanarClipMaskChanged.raiseEvent(model, mask);\r\n }\r\n\r\n private handleAppearanceOverridesChanged(app: FeatureAppearance | undefined, model: ContextRealityModel): void {\r\n this.onAppearanceOverridesChanged.raiseEvent(model, app);\r\n }\r\n\r\n private handleDisplaySettingsChanged(settings: RealityModelDisplaySettings, model: ContextRealityModel): void {\r\n this.onDisplaySettingsChanged.raiseEvent(model, settings);\r\n }\r\n}\r\n"]}
@@ -224,6 +224,10 @@ export interface DisplayStyleOverridesOptions {
224
224
  export interface DisplayStyleSettingsOptions {
225
225
  /** A function that instantiates a [[ContextRealityModel]] to be stored in [[DisplayStyleSettings.contextRealityModels]]. */
226
226
  createContextRealityModel?: (props: ContextRealityModelProps) => ContextRealityModel;
227
+ /** If true, the caller will populate contextRealityModels after construction.
228
+ * @internal used by DisplayStyleState constructor.
229
+ */
230
+ deferContextRealityModels?: boolean;
227
231
  }
228
232
  /** Provides access to the settings defined by a [[DisplayStyle]] or [[DisplayStyleState]], and ensures that
229
233
  * the style's JSON properties are kept in sync.
@@ -1 +1 @@
1
- {"version":3,"file":"DisplayStyleSettings.d.ts","sourceRoot":"","sources":["../../src/DisplayStyleSettings.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EACG,OAAO,EAAE,iBAAiB,EAAQ,SAAS,EAAE,UAAU,EAAuC,mBAAmB,EAC1H,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC3E,O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AI,MAAM,GAAG,SAAS,CAEvC;IAED,wFAAwF;IACjF,yBAAyB,CAAC,OAAO,EAAE,UAAU,GAAG,sBAAsB,GAAG,SAAS;IAIzF,qFAAqF;IAC9E,yBAAyB,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,sBAAsB,GAAG,SAAS,GAAG,IAAI;IA4BzG,oJAAoJ;IACpJ,IAAW,sBAAsB,IAAI,QAAQ,CAAC,CAAC,UAAU,EAAE,sBAAsB,CAAC,CAAC,GAAG,SAAS,CAE9F;CACF"}
@@ -284,7 +284,11 @@ export class DisplayStyleSettings {
284
284
  const settings = PlanarClipMaskSettings.fromJSON(props);
285
285
  return settings.isValid ? settings : undefined;
286
286
  });
287
- this._contextRealityModels = new ContextRealityModels(this._json, options === null || options === void 0 ? void 0 : options.createContextRealityModel);
287
+ this._contextRealityModels = new ContextRealityModels({
288
+ container: this._json,
289
+ createContextRealityModel: options === null || options === void 0 ? void 0 : options.createContextRealityModel,
290
+ deferPopulating: options === null || options === void 0 ? void 0 : options.deferContextRealityModels,
291
+ });
288
292
  }
289
293
  /** Returns true if this is a [[DisplayStyle3dSettings]]. */
290
294
  is3d() {