@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
@@ -1 +1 @@
1
- {"version":3,"file":"IModelTileIO.js","sourceRoot":"","sources":["../../../src/tile/IModelTileIO.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyD;AACzD,wDAA+C;AAE/C,qCAA+E;AAE/E;;GAEG;AACH,IAAY,SASX;AATD,WAAY,SAAS;IACnB,uBAAuB;IACvB,yCAAQ,CAAA;IACR,6CAA6C;IAC7C,6DAAuB,CAAA;IACvB,wEAAwE;IACxE,qDAAmB,CAAA;IACnB,mEAAmE;IACnE,2EAA8B,CAAA;AAChC,CAAC,EATW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QASpB;AAED;;GAEG;AACH,IAAY,kBAYX;AAZD,WAAY,kBAAkB;IAC5B;;;OAGG;IACH,8DAAU,CAAA;IACV;;OAEG;IACH,6DAAS,CAAA;IACT,kGAAkG;IAClG,yEAAkC,CAAA;AACpC,CAAC,EAZW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAY7B;AAED;;GAEG;AACH,MAAa,UAAW,SAAQ,mBAAU;IAwBxC;;OAEG;IACH,YAAmB,MAAkB;QACnC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,UAAU,CAAC;QACtC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC;QAE/B,IAAI,CAAC,YAAY,GAAG,IAAI,uBAAO,EAAE,CAAC;QAClC,IAAA,oCAA2B,EAAC,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QAC3D,IAAA,oCAA2B,EAAC,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAE5D,IAAI,CAAC,SAA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AAkB;QACvC,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC;QACjC,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;QACtC,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC;QAChC,OAAO,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;IAC9F,CAAC;;AANH,gDAaC;AALe,8BAAW,GAAG,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tile\r\n */\r\n\r\nimport { assert, ByteStream } from \"@itwin/core-bentley\";\r\nimport { Range3d } from \"@itwin/core-geometry\";\r\nimport { ElementAlignedBox3d } from \"../geometry/Placement\";\r\nimport { nextPoint3d64FromByteStream, TileFormat, TileHeader } from \"./TileIO\";\r\n\r\n/** Flags describing the geometry contained within a tile in iMdl format.\r\n * @internal\r\n */\r\nexport enum ImdlFlags {\r\n /** No special flags */\r\n None = 0,\r\n /** The tile contains some curved geometry */\r\n ContainsCurves = 1 << 0,\r\n /** Some geometry within the tile range was omitted based on its size */\r\n Incomplete = 1 << 2,\r\n /** The tile must be refined by sub-division, not magnification. */\r\n DisallowMagnification = 1 << 3,\r\n}\r\n\r\n/** Describes the maximum major and minor version of the iMdl tile format supported by this version of this package.\r\n * @internal\r\n */\r\nexport enum CurrentImdlVersion {\r\n /** The unsigned 16-bit major version number. If the major version specified in the tile header is greater than this value, then this\r\n * front-end is not capable of reading the tile content. Otherwise, this front-end can read the tile content even if the header specifies a\r\n * greater minor version than CurrentVersion.Minor, although some data may be skipped.\r\n */\r\n Major = 29,\r\n /** The unsigned 16-bit minor version number. If the major version in the tile header is equal to CurrentVersion.Major, then this package can\r\n * read the tile content even if the minor version in the tile header is greater than this value, although some data may be skipped.\r\n */\r\n Minor = 0,\r\n /** The unsigned 32-bit version number derived from the 16-bit major and minor version numbers. */\r\n Combined = (Major << 0x10) | Minor,\r\n}\r\n\r\n/** Header embedded at the beginning of binary tile data in iMdl format describing its contents.\r\n * @internal\r\n */\r\nexport class ImdlHeader extends TileHeader {\r\n /** The size of this header in bytes. */\r\n public readonly headerLength: number;\r\n /** Flags describing the geometry contained within the tile */\r\n public readonly flags: ImdlFlags;\r\n /** A bounding box no larger than the tile's range, tightly enclosing the tile's geometry; or a null range if the tile is empty */\r\n public readonly contentRange: ElementAlignedBox3d;\r\n /** The chord tolerance in meters at which the tile's geometry was faceted */\r\n public readonly tolerance: number;\r\n /** The number of elements which contributed at least some geometry to the tile content */\r\n public readonly numElementsIncluded: number;\r\n /** The number of elements within the tile range which contributed no geometry to the tile content */\r\n public readonly numElementsExcluded: number;\r\n /** The total number of bytes in the binary tile data, including this header */\r\n public readonly tileLength: number;\r\n /** A bitfield wherein each set bit indicates an empty sub-volume. */\r\n public readonly emptySubRanges: number;\r\n\r\n public get versionMajor(): number { return this.version >>> 0x10; }\r\n public get versionMinor(): number { return (this.version & 0xffff) >>> 0; }\r\n\r\n public get isValid(): boolean { return TileFormat.IModel === this.format; }\r\n public get isReadableVersion(): boolean { return this.versionMajor <= CurrentImdlVersion.Major; }\r\n\r\n /** Deserialize a header from the binary data at the stream's current position.\r\n * If the binary data does not contain a valid header, the Header will be marked 'invalid'.\r\n */\r\n public constructor(stream: ByteStream) {\r\n super(stream);\r\n this.headerLength = stream.nextUint32;\r\n this.flags = stream.nextUint32;\r\n\r\n this.contentRange = new Range3d();\r\n nextPoint3d64FromByteStream(stream, this.contentRange.low);\r\n nextPoint3d64FromByteStream(stream, this.contentRange.high);\r\n\r\n this.tolerance = stream.nextFloat64;\r\n this.numElementsIncluded = stream.nextUint32;\r\n this.numElementsExcluded = stream.nextUint32;\r\n this.tileLength = stream.nextUint32;\r\n\r\n // empty sub-volume bit field introduced in format v02.00\r\n this.emptySubRanges = this.versionMajor >= 2 ? stream.nextUint32 : 0;\r\n\r\n // Skip any unprocessed bytes in header\r\n const remainingHeaderBytes = this.headerLength - stream.curPos;\r\n assert(remainingHeaderBytes >= 0);\r\n stream.advance(remainingHeaderBytes);\r\n\r\n if (stream.isPastTheEnd)\r\n this.invalidate();\r\n }\r\n}\r\n\r\n/** Header preceding the feature table embedded in an iMdl tile's content.\r\n * @internal\r\n */\r\nexport class FeatureTableHeader {\r\n public static readFrom(stream: ByteStream) {\r\n const length = stream.nextUint32;\r\n const maxFeatures = stream.nextUint32;\r\n const count = stream.nextUint32;\r\n return stream.isPastTheEnd ? undefined : new FeatureTableHeader(length, maxFeatures, count);\r\n }\r\n\r\n public static sizeInBytes = 12;\r\n\r\n private constructor(public readonly length: number,\r\n public readonly maxFeatures: number,\r\n public readonly count: number) { }\r\n}\r\n"]}
1
+ {"version":3,"file":"IModelTileIO.js","sourceRoot":"","sources":["../../../src/tile/IModelTileIO.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyD;AACzD,wDAA+C;AAE/C,qCAA+E;AAE/E;;GAEG;AACH,IAAY,SASX;AATD,WAAY,SAAS;IACnB,uBAAuB;IACvB,yCAAQ,CAAA;IACR,6CAA6C;IAC7C,6DAAuB,CAAA;IACvB,wEAAwE;IACxE,qDAAmB,CAAA;IACnB,mEAAmE;IACnE,2EAA8B,CAAA;AAChC,CAAC,EATW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QASpB;AAED;;GAEG;AACH,IAAY,kBAYX;AAZD,WAAY,kBAAkB;IAC5B;;;OAGG;IACH,8DAAU,CAAA;IACV;;OAEG;IACH,6DAAS,CAAA;IACT,kGAAkG;IAClG,yEAAkC,CAAA;AACpC,CAAC,EAZW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAY7B;AAED;;GAEG;AACH,MAAa,UAAW,SAAQ,mBAAU;I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C,KAAK,CAAC,CAAC,CAAC,CAAC;IAE3E,IAAW,OAAO,KAAc,OAAO,mBAAU,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3E,IAAW,iBAAiB,KAAc,OAAO,IAAI,CAAC,YAAY,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC;CA8BlG;AApDD,gCAoDC;AAED;;GAEG;AACH,MAAa,kBAAkB;IAU7B,YAAoC,MAAc,EAChC,WAAmB,EACnB,KAAa;QAFK,WAAM,GAAN,MAAM,CAAQ;QAChC,gBAAW,GAAX,WAAW,CAAQ;QACnB,UAAK,GAAL,KAAK,CAAQ;IAAI,CAAC;IAX7B,MAAM,CAAC,QAAQ,CAAC,MAAkB;QACvC,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QACnC,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QACxC,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAClC,OAAO,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;IAC9F,CAAC;;AANH,gDAaC;AALe,8BAAW,GAAG,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Tile\r\n */\r\n\r\nimport { assert, ByteStream } from \"@itwin/core-bentley\";\r\nimport { Range3d } from \"@itwin/core-geometry\";\r\nimport { ElementAlignedBox3d } from \"../geometry/Placement\";\r\nimport { nextPoint3d64FromByteStream, TileFormat, TileHeader } from \"./TileIO\";\r\n\r\n/** Flags describing the geometry contained within a tile in iMdl format.\r\n * @internal\r\n */\r\nexport enum ImdlFlags {\r\n /** No special flags */\r\n None = 0,\r\n /** The tile contains some curved geometry */\r\n ContainsCurves = 1 << 0,\r\n /** Some geometry within the tile range was omitted based on its size */\r\n Incomplete = 1 << 2,\r\n /** The tile must be refined by sub-division, not magnification. */\r\n DisallowMagnification = 1 << 3,\r\n}\r\n\r\n/** Describes the maximum major and minor version of the iMdl tile format supported by this version of this package.\r\n * @internal\r\n */\r\nexport enum CurrentImdlVersion {\r\n /** The unsigned 16-bit major version number. If the major version specified in the tile header is greater than this value, then this\r\n * front-end is not capable of reading the tile content. Otherwise, this front-end can read the tile content even if the header specifies a\r\n * greater minor version than CurrentVersion.Minor, although some data may be skipped.\r\n */\r\n Major = 30,\r\n /** The unsigned 16-bit minor version number. If the major version in the tile header is equal to CurrentVersion.Major, then this package can\r\n * read the tile content even if the minor version in the tile header is greater than this value, although some data may be skipped.\r\n */\r\n Minor = 0,\r\n /** The unsigned 32-bit version number derived from the 16-bit major and minor version numbers. */\r\n Combined = (Major << 0x10) | Minor,\r\n}\r\n\r\n/** Header embedded at the beginning of binary tile data in iMdl format describing its contents.\r\n * @internal\r\n */\r\nexport class ImdlHeader extends TileHeader {\r\n /** The size of this header in bytes. */\r\n public readonly headerLength: number;\r\n /** Flags describing the geometry contained within the tile */\r\n public readonly flags: ImdlFlags;\r\n /** A bounding box no larger than the tile's range, tightly enclosing the tile's geometry; or a null range if the tile is empty */\r\n public readonly contentRange: ElementAlignedBox3d;\r\n /** The chord tolerance in meters at which the tile's geometry was faceted */\r\n public readonly tolerance: number;\r\n /** The number of elements which contributed at least some geometry to the tile content */\r\n public readonly numElementsIncluded: number;\r\n /** The number of elements within the tile range which contributed no geometry to the tile content */\r\n public readonly numElementsExcluded: number;\r\n /** The total number of bytes in the binary tile data, including this header */\r\n public readonly tileLength: number;\r\n /** A bitfield wherein each set bit indicates an empty sub-volume. */\r\n public readonly emptySubRanges: number;\r\n\r\n public get versionMajor(): number { return this.version >>> 0x10; }\r\n public get versionMinor(): number { return (this.version & 0xffff) >>> 0; }\r\n\r\n public get isValid(): boolean { return TileFormat.IModel === this.format; }\r\n public get isReadableVersion(): boolean { return this.versionMajor <= CurrentImdlVersion.Major; }\r\n\r\n /** Deserialize a header from the binary data at the stream's current position.\r\n * If the binary data does not contain a valid header, the Header will be marked 'invalid'.\r\n */\r\n public constructor(stream: ByteStream) {\r\n super(stream);\r\n this.headerLength = stream.readUint32();\r\n this.flags = stream.readUint32();\r\n\r\n this.contentRange = new Range3d();\r\n nextPoint3d64FromByteStream(stream, this.contentRange.low);\r\n nextPoint3d64FromByteStream(stream, this.contentRange.high);\r\n\r\n this.tolerance = stream.readFloat64();\r\n this.numElementsIncluded = stream.readUint32();\r\n this.numElementsExcluded = stream.readUint32();\r\n this.tileLength = stream.readUint32();\r\n\r\n // empty sub-volume bit field introduced in format v02.00\r\n this.emptySubRanges = this.versionMajor >= 2 ? stream.readUint32() : 0;\r\n\r\n // Skip any unprocessed bytes in header\r\n const remainingHeaderBytes = this.headerLength - stream.curPos;\r\n assert(remainingHeaderBytes >= 0);\r\n stream.advance(remainingHeaderBytes);\r\n\r\n if (stream.isPastTheEnd)\r\n this.invalidate();\r\n }\r\n}\r\n\r\n/** Header preceding the feature table embedded in an iMdl tile's content.\r\n * @internal\r\n */\r\nexport class FeatureTableHeader {\r\n public static readFrom(stream: ByteStream) {\r\n const length = stream.readUint32();\r\n const maxFeatures = stream.readUint32();\r\n const count = stream.readUint32();\r\n return stream.isPastTheEnd ? undefined : new FeatureTableHeader(length, maxFeatures, count);\r\n }\r\n\r\n public static sizeInBytes = 12;\r\n\r\n private constructor(public readonly length: number,\r\n public readonly maxFeatures: number,\r\n public readonly count: number) { }\r\n}\r\n"]}
@@ -15,11 +15,11 @@ const TileIO_1 = require("./TileIO");
15
15
  class PntsHeader extends TileIO_1.TileHeader {
16
16
  constructor(stream) {
17
17
  super(stream);
18
- this.length = stream.nextUint32;
19
- this.featureTableJsonLength = stream.nextUint32;
20
- this.featureTableBinaryLength = stream.nextUint32;
21
- this.batchTableJsonLength = stream.nextUint32;
22
- this.batchTableBinaryLength = stream.nextUint32;
18
+ this.length = stream.readUint32();
19
+ this.featureTableJsonLength = stream.readUint32();
20
+ this.featureTableBinaryLength = stream.readUint32();
21
+ this.batchTableJsonLength = stream.readUint32();
22
+ this.batchTableBinaryLength = stream.readUint32();
23
23
  }
24
24
  get isValid() { return TileIO_1.TileFormat.Pnts === this.format; }
25
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PntsTileIO.js","sourceRoot":"","sources":["../../../src/tile/PntsTileIO.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,qCAAkD;AAElD;;GAEG;AACH,MAAa,UAAW,SAAQ,mBAAU;IAQxC,YAAmB,MAAkB;QACnC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC;QAChC,IAAI,CAAC,sBAAsB,GAAG,MAAM,CAAC,UAAU,CAAC;QAChD,IAAI,CAAC,wBAAwB,GAAG,MAAM,CAAC,UAAU,CAAC;QAClD,IAAI,CAAC,oBAAoB,GAAG,MAAM,CAAC,UAAU,CAAC;QAC9C,IAAI,CAAC,sBAAsB,GAAG,MAAM,CAAC,UAAU,CAAC;IAClD,CAAC;IATD,IAAW,OAAO,KAAc,OAAO,mBAAU,CAAC,IAAI,KAAK,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;CAU1E;AAhBD,gCAgBC","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 Tile\r\n */\r\n\r\nimport { ByteStream } from \"@itwin/core-bentley\";\r\nimport { TileFormat, TileHeader } from \"./TileIO\";\r\n\r\n/** Header preceding tile content in [pnts](https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification/TileFormats/PointCloud) format.\r\n * @internal\r\n */\r\nexport class PntsHeader extends TileHeader {\r\n public readonly length: number;\r\n public readonly featureTableJsonLength: number;\r\n public readonly featureTableBinaryLength: number;\r\n public readonly batchTableJsonLength: number;\r\n public readonly batchTableBinaryLength: number;\r\n public get isValid(): boolean { return TileFormat.Pnts === this.format; }\r\n\r\n public constructor(stream: ByteStream) {\r\n super(stream);\r\n this.length = stream.nextUint32;\r\n this.featureTableJsonLength = stream.nextUint32;\r\n this.featureTableBinaryLength = stream.nextUint32;\r\n this.batchTableJsonLength = stream.nextUint32;\r\n this.batchTableBinaryLength = stream.nextUint32;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"PntsTileIO.js","sourceRoot":"","sources":["../../../src/tile/PntsTileIO.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,qCAAkD;AAElD;;GAEG;AACH,MAAa,UAAW,SAAQ,mBAAU;IAQxC,YAAmB,MAAkB;QACnC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAClC,IAAI,CAAC,sBAAsB,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAClD,IAAI,CAAC,wBAAwB,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QACpD,IAAI,CAAC,oBAAoB,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAChD,IAAI,CAAC,sBAAsB,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;IACpD,CAAC;IATD,IAAW,OAAO,KAAc,OAAO,mBAAU,CAAC,IAAI,KAAK,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;CAU1E;AAhBD,gCAgBC","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 Tile\r\n */\r\n\r\nimport { ByteStream } from \"@itwin/core-bentley\";\r\nimport { TileFormat, TileHeader } from \"./TileIO\";\r\n\r\n/** Header preceding tile content in [pnts](https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification/TileFormats/PointCloud) format.\r\n * @internal\r\n */\r\nexport class PntsHeader extends TileHeader {\r\n public readonly length: number;\r\n public readonly featureTableJsonLength: number;\r\n public readonly featureTableBinaryLength: number;\r\n public readonly batchTableJsonLength: number;\r\n public readonly batchTableBinaryLength: number;\r\n public get isValid(): boolean { return TileFormat.Pnts === this.format; }\r\n\r\n public constructor(stream: ByteStream) {\r\n super(stream);\r\n this.length = stream.readUint32();\r\n this.featureTableJsonLength = stream.readUint32();\r\n this.featureTableBinaryLength = stream.readUint32();\r\n this.batchTableJsonLength = stream.readUint32();\r\n this.batchTableBinaryLength = stream.readUint32();\r\n }\r\n}\r\n"]}
@@ -95,8 +95,8 @@ exports.TileReadError = TileReadError;
95
95
  class TileHeader {
96
96
  /** Construct a Header from the binary data at the supplied stream's current read position */
97
97
  constructor(stream) {
98
- this._format = tileFormatFromNumber(stream.nextUint32);
99
- this.version = stream.nextUint32;
98
+ this._format = tileFormatFromNumber(stream.readUint32());
99
+ this.version = stream.readUint32();
100
100
  }
101
101
  get format() { return this._format; }
102
102
  /** Mark the header as representing invalid data */
@@ -109,7 +109,7 @@ exports.TileHeader = TileHeader;
109
109
  * @internal
110
110
  */
111
111
  function nextPoint3d64FromByteStream(stream, result) {
112
- const x = stream.nextFloat64, y = stream.nextFloat64, z = stream.nextFloat64;
112
+ const x = stream.readFloat64(), y = stream.readFloat64(), z = stream.readFloat64();
113
113
  if (undefined === result)
114
114
  return new core_geometry_1.Point3d(x, y, z);
115
115
  result.set(x, y, z);
@@ -1 +1 @@
1
- {"version":3,"file":"TileIO.js","sourceRoot":"","sources":["../../../src/tile/TileIO.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA+D;AAC/D,w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------------------------------------------------------\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 Tile\r\n */\r\n\r\nimport { BentleyError, ByteStream } from \"@itwin/core-bentley\";\r\nimport { Point3d } from \"@itwin/core-geometry\";\r\n\r\n/** Type codes for various tile formats. Often these are embedded as 32-bit 'magic numbers' in a binary stream to indicate the format.\r\n * @internal\r\n */\r\nexport enum TileFormat {\r\n Unknown = 0,\r\n B3dm = 0x6d643362, // \"b3dm\"\r\n Gltf = 0x46546c67, // \"glTF\"\r\n Pnts = 0x73746e70, // \"pnts\"\r\n IModel = 0x6c644d69, // \"iMdl\"\r\n Cmpt = 0x74706d63, // cmpt\r\n I3dm = 0x6d643369, // i3dm\r\n A3x = 0x583341, // A3X0 (numeric 0 not char '0')\r\n}\r\n\r\n/** Given a magic number, return whether it identifies a known tile format.\r\n * @internal\r\n */\r\nexport function isKnownTileFormat(format: number) {\r\n switch (format) {\r\n case TileFormat.Unknown:\r\n case TileFormat.B3dm:\r\n case TileFormat.Gltf:\r\n case TileFormat.IModel:\r\n case TileFormat.Pnts:\r\n case TileFormat.Cmpt:\r\n case TileFormat.I3dm:\r\n case TileFormat.A3x:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\n/** Given a magic number, attempt to convert it to a known TileFormat.\r\n * @internal\r\n */\r\nexport function tileFormatFromNumber(formatNumber: number): TileFormat {\r\n const format = formatNumber as TileFormat;\r\n return isKnownTileFormat(format) ? format : TileFormat.Unknown;\r\n}\r\n\r\n/** Status codes for tile reading operations\r\n * @internal\r\n */\r\nexport enum TileReadStatus {\r\n Success = 0,\r\n InvalidTileData,\r\n InvalidHeader,\r\n InvalidBatchTable,\r\n InvalidScene,\r\n InvalidFeatureTable,\r\n NewerMajorVersion,\r\n Canceled,\r\n}\r\n\r\nconst readStatusMessages = [\r\n \"Success\",\r\n \"Invalid tile data\",\r\n \"Invalid tile header\",\r\n \"Invalid batch table\",\r\n \"Invalid scene\",\r\n \"Invalid feature table\",\r\n \"Major version too new\",\r\n \"Canceled\",\r\n];\r\n\r\n/** Exception thrown by functions that deserialize tiles.\r\n * @internal\r\n */\r\nexport class TileReadError extends BentleyError {\r\n public constructor(status: TileReadStatus, message?: string) {\r\n if (undefined === message)\r\n message = readStatusMessages[status];\r\n\r\n super(status, message);\r\n }\r\n\r\n public get wasCanceled(): boolean { return TileReadStatus.Canceled === this.errorNumber; }\r\n}\r\n\r\n/** The base header preceding tile data of most formats, identifying the tile format and version of that format.\r\n * Specific tile formats may define their own headers as sub-types of this Header, appending\r\n * additional format-specific data.\r\n * @internal\r\n */\r\nexport abstract class TileHeader {\r\n private _format: TileFormat;\r\n public version: number;\r\n\r\n /** Construct a Header from the binary data at the supplied stream's current read position */\r\n public constructor(stream: ByteStream) {\r\n this._format = tileFormatFromNumber(stream.nextUint32);\r\n this.version = stream.nextUint32;\r\n }\r\n\r\n public get format(): TileFormat { return this._format; }\r\n\r\n /** Returns whether the header represents valid data */\r\n public abstract get isValid(): boolean;\r\n\r\n /** Mark the header as representing invalid data */\r\n protected invalidate(): void {\r\n this._format = TileFormat.Unknown;\r\n }\r\n}\r\n\r\n/** Read 3 64-bit floating point numbers at the byte stream's current read position, advance by 24 bytes, and return a Point3d constructed from the 3 numbers.\r\n * @internal\r\n */\r\nexport function nextPoint3d64FromByteStream(stream: ByteStream, result?: Point3d): Point3d {\r\n const x = stream.nextFloat64,\r\n y = stream.nextFloat64,\r\n z = stream.nextFloat64;\r\n\r\n if (undefined === result)\r\n return new Point3d(x, y, z);\r\n\r\n result.set(x, y, z);\r\n return result;\r\n}\r\n"]}
1
+ {"version":3,"file":"TileIO.js","sourceRoot":"","sources":["../../../src/tile/TileIO.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA+D;AAC/D,wDAA+C;AAE/C;;GAEG;AACH,IAAY,UASX;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------------------\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 Tile\r\n */\r\n\r\nimport { BentleyError, ByteStream } from \"@itwin/core-bentley\";\r\nimport { Point3d } from \"@itwin/core-geometry\";\r\n\r\n/** Type codes for various tile formats. Often these are embedded as 32-bit 'magic numbers' in a binary stream to indicate the format.\r\n * @internal\r\n */\r\nexport enum TileFormat {\r\n Unknown = 0,\r\n B3dm = 0x6d643362, // \"b3dm\"\r\n Gltf = 0x46546c67, // \"glTF\"\r\n Pnts = 0x73746e70, // \"pnts\"\r\n IModel = 0x6c644d69, // \"iMdl\"\r\n Cmpt = 0x74706d63, // cmpt\r\n I3dm = 0x6d643369, // i3dm\r\n A3x = 0x583341, // A3X0 (numeric 0 not char '0')\r\n}\r\n\r\n/** Given a magic number, return whether it identifies a known tile format.\r\n * @internal\r\n */\r\nexport function isKnownTileFormat(format: number) {\r\n switch (format) {\r\n case TileFormat.Unknown:\r\n case TileFormat.B3dm:\r\n case TileFormat.Gltf:\r\n case TileFormat.IModel:\r\n case TileFormat.Pnts:\r\n case TileFormat.Cmpt:\r\n case TileFormat.I3dm:\r\n case TileFormat.A3x:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\n/** Given a magic number, attempt to convert it to a known TileFormat.\r\n * @internal\r\n */\r\nexport function tileFormatFromNumber(formatNumber: number): TileFormat {\r\n const format = formatNumber as TileFormat;\r\n return isKnownTileFormat(format) ? format : TileFormat.Unknown;\r\n}\r\n\r\n/** Status codes for tile reading operations\r\n * @internal\r\n */\r\nexport enum TileReadStatus {\r\n Success = 0,\r\n InvalidTileData,\r\n InvalidHeader,\r\n InvalidBatchTable,\r\n InvalidScene,\r\n InvalidFeatureTable,\r\n NewerMajorVersion,\r\n Canceled,\r\n}\r\n\r\nconst readStatusMessages = [\r\n \"Success\",\r\n \"Invalid tile data\",\r\n \"Invalid tile header\",\r\n \"Invalid batch table\",\r\n \"Invalid scene\",\r\n \"Invalid feature table\",\r\n \"Major version too new\",\r\n \"Canceled\",\r\n];\r\n\r\n/** Exception thrown by functions that deserialize tiles.\r\n * @internal\r\n */\r\nexport class TileReadError extends BentleyError {\r\n public constructor(status: TileReadStatus, message?: string) {\r\n if (undefined === message)\r\n message = readStatusMessages[status];\r\n\r\n super(status, message);\r\n }\r\n\r\n public get wasCanceled(): boolean { return TileReadStatus.Canceled === this.errorNumber; }\r\n}\r\n\r\n/** The base header preceding tile data of most formats, identifying the tile format and version of that format.\r\n * Specific tile formats may define their own headers as sub-types of this Header, appending\r\n * additional format-specific data.\r\n * @internal\r\n */\r\nexport abstract class TileHeader {\r\n private _format: TileFormat;\r\n public version: number;\r\n\r\n /** Construct a Header from the binary data at the supplied stream's current read position */\r\n public constructor(stream: ByteStream) {\r\n this._format = tileFormatFromNumber(stream.readUint32());\r\n this.version = stream.readUint32();\r\n }\r\n\r\n public get format(): TileFormat { return this._format; }\r\n\r\n /** Returns whether the header represents valid data */\r\n public abstract get isValid(): boolean;\r\n\r\n /** Mark the header as representing invalid data */\r\n protected invalidate(): void {\r\n this._format = TileFormat.Unknown;\r\n }\r\n}\r\n\r\n/** Read 3 64-bit floating point numbers at the byte stream's current read position, advance by 24 bytes, and return a Point3d constructed from the 3 numbers.\r\n * @internal\r\n */\r\nexport function nextPoint3d64FromByteStream(stream: ByteStream, result?: Point3d): Point3d {\r\n const x = stream.readFloat64(),\r\n y = stream.readFloat64(),\r\n z = stream.readFloat64();\r\n\r\n if (undefined === result)\r\n return new Point3d(x, y, z);\r\n\r\n result.set(x, y, z);\r\n return result;\r\n}\r\n"]}
@@ -2,11 +2,17 @@
2
2
  * @module Authorization
3
3
  */
4
4
  import { AccessToken } from "@itwin/core-bentley";
5
- /** Interface to provide authorization information
6
- * @beta
5
+ /** Provides authorization to access APIs.
6
+ * Bentley's iTwin platform APIs [use OAuth 2.0](https://developer.bentley.com/apis/overview/authorization/) for authorization.
7
+ * Implementations are provided for [Electron](https://www.npmjs.com/package/@itwin/electron-authorization), [browsers](https://www.npmjs.com/package/@itwin/browser-authorization),
8
+ * [services](https://www.npmjs.com/package/@itwin/service-authorization), and [command-line applications](https://www.npmjs.com/package/@itwin/node-cli-authorization).
9
+ * @see [IModelHostOptions.authorizationClient]($backend) and [IModelAppOptions.authorizationClient]($frontend) to configure the client.
10
+ * @see [IModelHost.authorizationClient]($backend) and [IModelApp.authorizationClient]($frontend) to access the configured client.
11
+ * @note Access tokens expire periodically and are automatically refreshed when possible; therefore, tokens should always be requested via the client, not cached for later reuse.
12
+ @public
7
13
  */
8
14
  export interface AuthorizationClient {
9
- /** Get the AccessToken of the currently authorized user, or blank string if no token is available. */
15
+ /** Obtain an [[AccessToken]] for the currently authorized user, or blank string if no token is available. */
10
16
  getAccessToken(): Promise<AccessToken>;
11
17
  }
12
18
  //# sourceMappingURL=AuthorizationClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AuthorizationClient.d.ts","sourceRoot":"","sources":["../../src/AuthorizationClient.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,sGAAsG;IACtG,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;CACxC"}
1
+ {"version":3,"file":"AuthorizationClient.d.ts","sourceRoot":"","sources":["../../src/AuthorizationClient.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAmB;IAClC,6GAA6G;IAC7G,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;CACxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AuthorizationClient.js","sourceRoot":"","sources":["../../src/AuthorizationClient.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","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 Authorization\r\n */\r\n\r\nimport { AccessToken } from \"@itwin/core-bentley\";\r\n\r\n/** Interface to provide authorization information\r\n * @beta\r\n */\r\nexport interface AuthorizationClient {\r\n /** Get the AccessToken of the currently authorized user, or blank string if no token is available. */\r\n getAccessToken(): Promise<AccessToken>;\r\n}\r\n"]}
1
+ {"version":3,"file":"AuthorizationClient.js","sourceRoot":"","sources":["../../src/AuthorizationClient.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","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 Authorization\r\n */\r\n\r\nimport { AccessToken } from \"@itwin/core-bentley\";\r\n\r\n/** Provides authorization to access APIs.\r\n * Bentley's iTwin platform APIs [use OAuth 2.0](https://developer.bentley.com/apis/overview/authorization/) for authorization.\r\n * Implementations are provided for [Electron](https://www.npmjs.com/package/@itwin/electron-authorization), [browsers](https://www.npmjs.com/package/@itwin/browser-authorization),\r\n * [services](https://www.npmjs.com/package/@itwin/service-authorization), and [command-line applications](https://www.npmjs.com/package/@itwin/node-cli-authorization).\r\n * @see [IModelHostOptions.authorizationClient]($backend) and [IModelAppOptions.authorizationClient]($frontend) to configure the client.\r\n * @see [IModelHost.authorizationClient]($backend) and [IModelApp.authorizationClient]($frontend) to access the configured client.\r\n * @note Access tokens expire periodically and are automatically refreshed when possible; therefore, tokens should always be requested via the client, not cached for later reuse.\r\n @public\r\n */\r\nexport interface AuthorizationClient {\r\n /** Obtain an [[AccessToken]] for the currently authorized user, or blank string if no token is available. */\r\n getAccessToken(): Promise<AccessToken>;\r\n}\r\n"]}
@@ -4,10 +4,10 @@
4
4
  /// <reference types="node" />
5
5
  import type { Readable, Writable } from "stream";
6
6
  import type { Buffer } from "buffer";
7
- /** @public @deprecated */
7
+ /** @public @deprecated in 3.x. */
8
8
  export declare type BackendReadable = Readable;
9
- /** @public @deprecated */
9
+ /** @public @deprecated in 3.x. */
10
10
  export declare type BackendWritable = Writable;
11
- /** @internal @deprecated */
11
+ /** @internal @deprecated in 3.x. */
12
12
  export declare type BackendBuffer = Buffer;
13
13
  //# sourceMappingURL=BackendTypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BackendTypes.d.ts","sourceRoot":"","sources":["../../src/BackendTypes.ts"],"names":[],"mappings":"AAIA;;GAEG;;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AASrC,0BAA0B;AAC1B,oBAAY,eAAe,GAAG,QAAQ,CAAC;AAEvC,0BAA0B;AAC1B,oBAAY,eAAe,GAAG,QAAQ,CAAC;AAEvC,4BAA4B;AAC5B,oBAAY,aAAa,GAAG,MAAM,CAAC"}
1
+ {"version":3,"file":"BackendTypes.d.ts","sourceRoot":"","sources":["../../src/BackendTypes.ts"],"names":[],"mappings":"AAIA;;GAEG;;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AASrC,kCAAkC;AAClC,oBAAY,eAAe,GAAG,QAAQ,CAAC;AAEvC,kCAAkC;AAClC,oBAAY,eAAe,GAAG,QAAQ,CAAC;AAEvC,oCAAoC;AACpC,oBAAY,aAAa,GAAG,MAAM,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"BackendTypes.js","sourceRoot":"","sources":["../../src/BackendTypes.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","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 Utils\r\n */\r\n\r\nimport type { Readable, Writable } from \"stream\"; // Must be \"import type\" to avoid webpack polyfill errors\r\nimport type { Buffer } from \"buffer\"; // Must be \"import type\" to avoid webpack polyfill errors\r\n\r\n/*\r\nIMPORTANT:\r\nThis is a temporary source file for backwards compatibility only.\r\nDo not add any new types to this file.\r\nAll types here will be removed in 4.0\r\n*/\r\n\r\n/** @public @deprecated */\r\nexport type BackendReadable = Readable;\r\n\r\n/** @public @deprecated */\r\nexport type BackendWritable = Writable;\r\n\r\n/** @internal @deprecated */\r\nexport type BackendBuffer = Buffer;\r\n"]}
1
+ {"version":3,"file":"BackendTypes.js","sourceRoot":"","sources":["../../src/BackendTypes.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","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 Utils\r\n */\r\n\r\nimport type { Readable, Writable } from \"stream\"; // Must be \"import type\" to avoid webpack polyfill errors\r\nimport type { Buffer } from \"buffer\"; // Must be \"import type\" to avoid webpack polyfill errors\r\n\r\n/*\r\nIMPORTANT:\r\nThis is a temporary source file for backwards compatibility only.\r\nDo not add any new types to this file.\r\nAll types here will be removed in 4.0\r\n*/\r\n\r\n/** @public @deprecated in 3.x. */\r\nexport type BackendReadable = Readable;\r\n\r\n/** @public @deprecated in 3.x. */\r\nexport type BackendWritable = Writable;\r\n\r\n/** @internal @deprecated in 3.x. */\r\nexport type BackendBuffer = Buffer;\r\n"]}
@@ -58,11 +58,11 @@ export interface BackgroundMapProps {
58
58
  export interface DeprecatedBackgroundMapProps {
59
59
  /** Identifies the source of the map tiles. Currently supported providers are "BingProvider" and "MapBoxProvider".
60
60
  * Default value: "BingProvider"
61
- * @deprecated use MapImageryProps.backgroundBase.
61
+ * @deprecated in 3.x. use MapImageryProps.backgroundBase.
62
62
  */
63
63
  providerName?: string;
64
64
  /** Options for customizing the tiles supplied by the provider. If undefined, default values of all members are used.
65
- * @deprecated use MapImageryProps.backgroundBase
65
+ * @deprecated in 3.x. use MapImageryProps.backgroundBase
66
66
  */
67
67
  providerData?: {
68
68
  /** The type of map graphics to request. Default value: BackgroundMapType.Hybrid. */
@@ -1 +1 @@
1
- {"version":3,"file":"BackgroundMapSettings.js","sourceRoot":"","sources":["../../src/BackgroundMapSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAuB,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAgB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAElE;;;;;GAKG;AACH,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,oCAAoC;IACpC,mDAAa,CAAA;IACb,8BAA8B;IAC9B,2CAAS,CAAA;AACX,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AAgED,SAAS,kBAAkB,CAAC,IAAgB;IAC1C,OAAO,SAAS,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC;AAC/D,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAsB;IACnD,IAAI,QAAQ,KAAK,OAAO,KAAK;QAC3B,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAEzC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["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\nimport { BackgroundMapProvider, BackgroundMapType } from \"./BackgroundMapProvider\";\r\nimport { PlanarClipMaskProps, PlanarClipMaskSettings } from \"./PlanarClipMask\";\r\nimport { TerrainProps, TerrainSettings } from \"./TerrainSettings\";\r\n\r\n/** Describes the projection of the background map\r\n * @see [[BackgroundMapProps]]\r\n * @see [[DisplayStyleSettingsProps]]\r\n * @public\r\n * @extensions\r\n */\r\nexport enum GlobeMode {\r\n /** Display Earth as 3d ellipsoid */\r\n Ellipsoid = 0,\r\n /** Display Earth as plane. */\r\n Plane = 1,\r\n}\r\n\r\n/** In-memory JSON representation of a [[BackgroundMapSettings]].\r\n * @see [[PersistentBackgroundMapProps]] for the persistent JSON representation.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface BackgroundMapProps {\r\n /** The elevation of the map in meters relative the WGS84 ellipsoid. Default value: 0. */\r\n groundBias?: number;\r\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden.\r\n * Default value: false.\r\n */\r\n transparency?: number | false;\r\n /** If set to true, the map tiles will be rendered with depth, allowing them to obscure other geometry. Otherwise, they are always rendered behind all other geometry. Default value: false. */\r\n useDepthBuffer?: boolean;\r\n /** If true, terrain heights will be applied to the map; otherwise the map will be rendered as a plane. */\r\n applyTerrain?: boolean;\r\n /** Properties associated with terrain display. */\r\n terrainSettings?: TerrainProps;\r\n /** Globe Mode. Default value: GlobeMode.Ellipsoid */\r\n globeMode?: GlobeMode;\r\n /** If true, the map will be treated as non-locatable - i.e., tools will not interact with it. This is particularly useful when the map is transparent - it\r\n * allows the user to select elements that are behind the map.\r\n */\r\n nonLocatable?: boolean;\r\n /** A planar mask applied to the map geometry\r\n * @beta\r\n */\r\n planarClipMask?: PlanarClipMaskProps;\r\n\r\n /** See [[DeprecatedBackgroundMapProps.providerName]]. */\r\n providerName?: never;\r\n /** See [[DeprecatedBackgroundMapProps.providerData]]. */\r\n providerData?: never;\r\n}\r\n\r\n/** Properties of [[PersistentBackgroundMapProps]] that have been deprecated, but are retained for backwards compatibility.\r\n * These properties are omitted from [[BackgroundMapProps]] as they are no longer part of the API, but are included in\r\n * [[PersistentBackgroundMapProps]] because they remain part of the persistence format.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DeprecatedBackgroundMapProps {\r\n /** Identifies the source of the map tiles. Currently supported providers are \"BingProvider\" and \"MapBoxProvider\".\r\n * Default value: \"BingProvider\"\r\n * @deprecated use MapImageryProps.backgroundBase.\r\n */\r\n providerName?: string;\r\n /** Options for customizing the tiles supplied by the provider. If undefined, default values of all members are used.\r\n * @deprecated use MapImageryProps.backgroundBase\r\n */\r\n providerData?: {\r\n /** The type of map graphics to request. Default value: BackgroundMapType.Hybrid. */\r\n mapType?: BackgroundMapType;\r\n };\r\n}\r\n\r\n/** Persistent JSON representation of a [[BackgroundMapSettings]].\r\n * @public\r\n * @extensions\r\n */\r\nexport type PersistentBackgroundMapProps = Omit<BackgroundMapProps, keyof DeprecatedBackgroundMapProps> & DeprecatedBackgroundMapProps;\r\n\r\nfunction normalizeGlobeMode(mode?: GlobeMode): GlobeMode {\r\n return GlobeMode.Plane === mode ? mode : GlobeMode.Ellipsoid;\r\n}\r\n\r\nfunction normalizeTransparency(trans?: number | false): number | false {\r\n if (\"number\" === typeof trans)\r\n return Math.min(1, Math.max(0, trans));\r\n\r\n return false;\r\n}\r\n\r\n/** As part of a [[DisplayStyleSettings]], controls aspects of how the background map is displayed.\r\n * @see [[DisplayStyleSettings.backgroundMap]] to query or change these settings for a display style.\r\n * @see [[MapImagerySettings]] to control the type of imagery applied to the background map.\r\n * @public\r\n */\r\nexport class BackgroundMapSettings {\r\n /** Retained strictly for persistence. */\r\n private readonly _provider: BackgroundMapProvider;\r\n\r\n /** Elevation in meters, relative to WGS84 Ellipsoid.. */\r\n public readonly groundBias: number;\r\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden. Default value: false. */\r\n public readonly transparency: number | false;\r\n /** If set to true, the map tiles will be rendered with depth, allowing them to obscure other geometry. Otherwise, they are always rendered behind all other geometry. Default value: false. */\r\n public readonly useDepthBuffer: boolean;\r\n /** If true, terrain heights will be applied to the map; otherwise the map will be rendered as a plane. */\r\n public readonly applyTerrain: boolean;\r\n /** Settings associated with terrain display. */\r\n public readonly terrainSettings: TerrainSettings;\r\n /** Globe display mode. */\r\n public readonly globeMode: GlobeMode;\r\n /** Planar Mask - used to mask the background map to avoid overlapping with other geometry\r\n * @beta\r\n */\r\n public readonly planarClipMask: PlanarClipMaskSettings;\r\n private readonly _locatable: boolean;\r\n /** If false, the map will be treated as non-locatable - i.e., tools will not interact with it. This is particularly useful when the map is transparent - it\r\n * allows the user to select elements that are behind the map.\r\n */\r\n public get locatable(): boolean {\r\n // Handle legacy TerrainProps.nonLocatable:\r\n // - If TerrainProps.nonLocatable=true and terrain is on, terrain is not locatable.\r\n // - Otherwise, use BackgroundMapProps.nonLocatable.\r\n if (this.applyTerrain && this.terrainSettings.nonLocatable)\r\n return false;\r\n\r\n return this._locatable;\r\n }\r\n\r\n /** If transparency is overridden, the transparency to apply; otherwise, undefined. */\r\n public get transparencyOverride(): number | undefined { return false !== this.transparency ? this.transparency : undefined; }\r\n\r\n private constructor(props: BackgroundMapProps | PersistentBackgroundMapProps) {\r\n this.groundBias = props.groundBias ?? 0;\r\n this.transparency = normalizeTransparency(props.transparency);\r\n this.useDepthBuffer = props.useDepthBuffer ?? false;\r\n this.applyTerrain = props.applyTerrain ?? false;\r\n this.terrainSettings = TerrainSettings.fromJSON(props.terrainSettings);\r\n this.globeMode = normalizeGlobeMode(props.globeMode);\r\n this._locatable = true !== props.nonLocatable;\r\n this.planarClipMask = PlanarClipMaskSettings.fromJSON(props.planarClipMask);\r\n this._provider = BackgroundMapProvider.fromBackgroundMapProps(props);\r\n }\r\n\r\n /** Create settings from their persistent representation. In general, this method should only be used when reading the settings directly from\r\n * the iModel - otherwise, prefer [[fromJSON]].\r\n */\r\n public static fromPersistentJSON(json?: PersistentBackgroundMapProps): BackgroundMapSettings {\r\n return new this(json ?? {});\r\n }\r\n\r\n /** Construct from JSON, performing validation and applying default values for undefined fields.\r\n * @see [[fromPersistentJSON]] if you are reading the settings directly from the iModel.\r\n */\r\n public static fromJSON(json?: BackgroundMapProps): BackgroundMapSettings {\r\n return new BackgroundMapSettings(json ?? {});\r\n }\r\n\r\n /** Convert these settings to their in-memory JSON representation.\r\n * @see [[toPersistentJSON]] if you intend to write the JSON directly to an iModel.\r\n */\r\n public toJSON(): BackgroundMapProps {\r\n const props: BackgroundMapProps = {};\r\n if (0 !== this.groundBias)\r\n props.groundBias = this.groundBias;\r\n if (this.applyTerrain)\r\n props.applyTerrain = true;\r\n if (false !== this.transparency)\r\n props.transparency = this.transparency;\r\n if (GlobeMode.Ellipsoid !== this.globeMode)\r\n props.globeMode = this.globeMode;\r\n if (this.useDepthBuffer)\r\n props.useDepthBuffer = true;\r\n if (!this._locatable)\r\n props.nonLocatable = true;\r\n\r\n const terrainSettings = this.terrainSettings.toJSON();\r\n for (const prop of Object.values(terrainSettings)) {\r\n if (undefined !== prop) {\r\n props.terrainSettings = terrainSettings;\r\n break;\r\n }\r\n }\r\n\r\n if (this.planarClipMask.isValid)\r\n props.planarClipMask = this.planarClipMask.toJSON();\r\n\r\n return props;\r\n }\r\n\r\n /** Convert these settings to their persistent representation. In general, this method should only be used when writing the settings directly to\r\n * the iModel - otherwise, prefer [[toJSON]].\r\n */\r\n public toPersistentJSON(): PersistentBackgroundMapProps {\r\n const props = this.toJSON() as PersistentBackgroundMapProps;\r\n\r\n // Preserve deprecated imagery provider properties.\r\n if (\"BingProvider\" !== this._provider.name)\r\n props.providerName = this._provider.name; // eslint-disable-line deprecation/deprecation\r\n if (BackgroundMapType.Hybrid !== this._provider.type)\r\n props.providerData = { mapType: this._provider.type }; // eslint-disable-line deprecation/deprecation\r\n\r\n return props;\r\n }\r\n\r\n /** Returns true if these settings are equivalent to the supplied JSON settings. */\r\n public equalsJSON(json?: BackgroundMapProps): boolean {\r\n return this.equals(BackgroundMapSettings.fromJSON(json));\r\n }\r\n\r\n /** Returns true if the persistent representation of these settings is equivalent to `json`. */\r\n public equalsPersistentJSON(json?: PersistentBackgroundMapProps): boolean {\r\n return this.equals(BackgroundMapSettings.fromPersistentJSON(json));\r\n }\r\n\r\n /** Returns true if these settings are equivalent to `other`. */\r\n public equals(other: BackgroundMapSettings): boolean {\r\n return this.groundBias === other.groundBias && this.useDepthBuffer === other.useDepthBuffer && this.transparency === other.transparency\r\n && this.globeMode === other.globeMode && this._locatable === other._locatable && this.applyTerrain === other.applyTerrain\r\n && this.terrainSettings.equals(other.terrainSettings) && this.planarClipMask.equals(other.planarClipMask)\r\n && this._provider.name === other._provider.name && this._provider.type === other._provider.type;\r\n }\r\n\r\n /** Create a copy of this BackgroundMapSettings, optionally modifying some of its properties.\r\n * @param changedProps JSON representation of the properties to change.\r\n * @returns A BackgroundMapSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\r\n */\r\n public clone(changedProps?: BackgroundMapProps): BackgroundMapSettings {\r\n if (undefined === changedProps)\r\n return this;\r\n\r\n const props = {\r\n groundBias: changedProps.groundBias ?? this.groundBias,\r\n transparency: changedProps.transparency ?? this.transparency,\r\n useDepthBuffer: changedProps.useDepthBuffer ?? this.useDepthBuffer,\r\n globeMode: changedProps.globeMode ?? this.globeMode,\r\n nonLocatable: changedProps.nonLocatable ?? !this._locatable,\r\n applyTerrain: changedProps.applyTerrain ?? this.applyTerrain,\r\n terrainSettings: changedProps.terrainSettings ? this.terrainSettings.clone(changedProps.terrainSettings).toJSON() : this.terrainSettings.toJSON(),\r\n planarClipMask: changedProps.planarClipMask ? this.planarClipMask.clone(changedProps.planarClipMask).toJSON() : this.planarClipMask.toJSON(),\r\n providerName: this._provider.name,\r\n providerData: { mapType: this._provider.type },\r\n };\r\n\r\n return BackgroundMapSettings.fromPersistentJSON(props);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"BackgroundMapSettings.js","sourceRoot":"","sources":["../../src/BackgroundMapSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAuB,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAgB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAElE;;;;;GAKG;AACH,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,oCAAoC;IACpC,mDAAa,CAAA;IACb,8BAA8B;IAC9B,2CAAS,CAAA;AACX,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AAgED,SAAS,kBAAkB,CAAC,IAAgB;IAC1C,OAAO,SAAS,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC;AAC/D,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAsB;IACnD,IAAI,QAAQ,KAAK,OAAO,KAAK;QAC3B,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAEzC,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,MAAM,OAAO,qBAAqB;IAqChC,YAAoB,KAAwD;;QAC1E,IAAI,CAAC,UAAU,GAAG,MAAA,KAAK,CAAC,UAAU,mCAAI,CAAC,CAAC;QACxC,IAAI,CAAC,YAAY,GAAG,qBAAqB,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC9D,IAAI,CAAC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,UAAU,mCAAI,IAAI,CAAC,UAAU;YACtD,YAAY,EAAE,MAAA,YAAY,CAAC,YAAY,mCAAI,IAAI,CAAC,YAAY;YAC5D,cAAc,EAAE,MAAA,YAAY,CAAC,cAAc,mCAAI,IAAI,CAAC,cAAc;YAClE,SAAS,EAAE,MAAA,YAAY,CAAC,SAAS,mCAAI,IAAI,CAAC,SAAS;YACnD,YAAY,EAAE,MAAA,YAAY,CAAC,YAAY,mCAAI,CAAC,IAAI,CAAC,UAAU;YAC3D,YAAY,EAAE,MAAA,YAAY,CAAC,YAAY,mCAAI,IAAI,CAAC,YAAY;YAC5D,eAAe,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE;YACjJ,cAAc,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE;YAC5I,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI;YACjC,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;SAC/C,CAAC;QAEF,OAAO,qBAAqB,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module DisplayStyles\r\n */\r\n\r\nimport { BackgroundMapProvider, BackgroundMapType } from \"./BackgroundMapProvider\";\r\nimport { PlanarClipMaskProps, PlanarClipMaskSettings } from \"./PlanarClipMask\";\r\nimport { TerrainProps, TerrainSettings } from \"./TerrainSettings\";\r\n\r\n/** Describes the projection of the background map\r\n * @see [[BackgroundMapProps]]\r\n * @see [[DisplayStyleSettingsProps]]\r\n * @public\r\n * @extensions\r\n */\r\nexport enum GlobeMode {\r\n /** Display Earth as 3d ellipsoid */\r\n Ellipsoid = 0,\r\n /** Display Earth as plane. */\r\n Plane = 1,\r\n}\r\n\r\n/** In-memory JSON representation of a [[BackgroundMapSettings]].\r\n * @see [[PersistentBackgroundMapProps]] for the persistent JSON representation.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface BackgroundMapProps {\r\n /** The elevation of the map in meters relative the WGS84 ellipsoid. Default value: 0. */\r\n groundBias?: number;\r\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden.\r\n * Default value: false.\r\n */\r\n transparency?: number | false;\r\n /** If set to true, the map tiles will be rendered with depth, allowing them to obscure other geometry. Otherwise, they are always rendered behind all other geometry. Default value: false. */\r\n useDepthBuffer?: boolean;\r\n /** If true, terrain heights will be applied to the map; otherwise the map will be rendered as a plane. */\r\n applyTerrain?: boolean;\r\n /** Properties associated with terrain display. */\r\n terrainSettings?: TerrainProps;\r\n /** Globe Mode. Default value: GlobeMode.Ellipsoid */\r\n globeMode?: GlobeMode;\r\n /** If true, the map will be treated as non-locatable - i.e., tools will not interact with it. This is particularly useful when the map is transparent - it\r\n * allows the user to select elements that are behind the map.\r\n */\r\n nonLocatable?: boolean;\r\n /** A planar mask applied to the map geometry\r\n * @beta\r\n */\r\n planarClipMask?: PlanarClipMaskProps;\r\n\r\n /** See [[DeprecatedBackgroundMapProps.providerName]]. */\r\n providerName?: never;\r\n /** See [[DeprecatedBackgroundMapProps.providerData]]. */\r\n providerData?: never;\r\n}\r\n\r\n/** Properties of [[PersistentBackgroundMapProps]] that have been deprecated, but are retained for backwards compatibility.\r\n * These properties are omitted from [[BackgroundMapProps]] as they are no longer part of the API, but are included in\r\n * [[PersistentBackgroundMapProps]] because they remain part of the persistence format.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DeprecatedBackgroundMapProps {\r\n /** Identifies the source of the map tiles. Currently supported providers are \"BingProvider\" and \"MapBoxProvider\".\r\n * Default value: \"BingProvider\"\r\n * @deprecated in 3.x. use MapImageryProps.backgroundBase.\r\n */\r\n providerName?: string;\r\n /** Options for customizing the tiles supplied by the provider. If undefined, default values of all members are used.\r\n * @deprecated in 3.x. use MapImageryProps.backgroundBase\r\n */\r\n providerData?: {\r\n /** The type of map graphics to request. Default value: BackgroundMapType.Hybrid. */\r\n mapType?: BackgroundMapType;\r\n };\r\n}\r\n\r\n/** Persistent JSON representation of a [[BackgroundMapSettings]].\r\n * @public\r\n * @extensions\r\n */\r\nexport type PersistentBackgroundMapProps = Omit<BackgroundMapProps, keyof DeprecatedBackgroundMapProps> & DeprecatedBackgroundMapProps;\r\n\r\nfunction normalizeGlobeMode(mode?: GlobeMode): GlobeMode {\r\n return GlobeMode.Plane === mode ? mode : GlobeMode.Ellipsoid;\r\n}\r\n\r\nfunction normalizeTransparency(trans?: number | false): number | false {\r\n if (\"number\" === typeof trans)\r\n return Math.min(1, Math.max(0, trans));\r\n\r\n return false;\r\n}\r\n\r\n/** As part of a [[DisplayStyleSettings]], controls aspects of how the background map is displayed.\r\n * @see [[DisplayStyleSettings.backgroundMap]] to query or change these settings for a display style.\r\n * @see [[MapImagerySettings]] to control the type of imagery applied to the background map.\r\n * @public\r\n */\r\nexport class BackgroundMapSettings {\r\n /** Retained strictly for persistence. */\r\n private readonly _provider: BackgroundMapProvider;\r\n\r\n /** Elevation in meters, relative to WGS84 Ellipsoid.. */\r\n public readonly groundBias: number;\r\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden. Default value: false. */\r\n public readonly transparency: number | false;\r\n /** If set to true, the map tiles will be rendered with depth, allowing them to obscure other geometry. Otherwise, they are always rendered behind all other geometry. Default value: false. */\r\n public readonly useDepthBuffer: boolean;\r\n /** If true, terrain heights will be applied to the map; otherwise the map will be rendered as a plane. */\r\n public readonly applyTerrain: boolean;\r\n /** Settings associated with terrain display. */\r\n public readonly terrainSettings: TerrainSettings;\r\n /** Globe display mode. */\r\n public readonly globeMode: GlobeMode;\r\n /** Planar Mask - used to mask the background map to avoid overlapping with other geometry\r\n * @beta\r\n */\r\n public readonly planarClipMask: PlanarClipMaskSettings;\r\n private readonly _locatable: boolean;\r\n /** If false, the map will be treated as non-locatable - i.e., tools will not interact with it. This is particularly useful when the map is transparent - it\r\n * allows the user to select elements that are behind the map.\r\n */\r\n public get locatable(): boolean {\r\n // Handle legacy TerrainProps.nonLocatable:\r\n // - If TerrainProps.nonLocatable=true and terrain is on, terrain is not locatable.\r\n // - Otherwise, use BackgroundMapProps.nonLocatable.\r\n if (this.applyTerrain && this.terrainSettings.nonLocatable)\r\n return false;\r\n\r\n return this._locatable;\r\n }\r\n\r\n /** If transparency is overridden, the transparency to apply; otherwise, undefined. */\r\n public get transparencyOverride(): number | undefined { return false !== this.transparency ? this.transparency : undefined; }\r\n\r\n private constructor(props: BackgroundMapProps | PersistentBackgroundMapProps) {\r\n this.groundBias = props.groundBias ?? 0;\r\n this.transparency = normalizeTransparency(props.transparency);\r\n this.useDepthBuffer = props.useDepthBuffer ?? false;\r\n this.applyTerrain = props.applyTerrain ?? false;\r\n this.terrainSettings = TerrainSettings.fromJSON(props.terrainSettings);\r\n this.globeMode = normalizeGlobeMode(props.globeMode);\r\n this._locatable = true !== props.nonLocatable;\r\n this.planarClipMask = PlanarClipMaskSettings.fromJSON(props.planarClipMask);\r\n this._provider = BackgroundMapProvider.fromBackgroundMapProps(props);\r\n }\r\n\r\n /** Create settings from their persistent representation. In general, this method should only be used when reading the settings directly from\r\n * the iModel - otherwise, prefer [[fromJSON]].\r\n */\r\n public static fromPersistentJSON(json?: PersistentBackgroundMapProps): BackgroundMapSettings {\r\n return new this(json ?? {});\r\n }\r\n\r\n /** Construct from JSON, performing validation and applying default values for undefined fields.\r\n * @see [[fromPersistentJSON]] if you are reading the settings directly from the iModel.\r\n */\r\n public static fromJSON(json?: BackgroundMapProps): BackgroundMapSettings {\r\n return new BackgroundMapSettings(json ?? {});\r\n }\r\n\r\n /** Convert these settings to their in-memory JSON representation.\r\n * @see [[toPersistentJSON]] if you intend to write the JSON directly to an iModel.\r\n */\r\n public toJSON(): BackgroundMapProps {\r\n const props: BackgroundMapProps = {};\r\n if (0 !== this.groundBias)\r\n props.groundBias = this.groundBias;\r\n if (this.applyTerrain)\r\n props.applyTerrain = true;\r\n if (false !== this.transparency)\r\n props.transparency = this.transparency;\r\n if (GlobeMode.Ellipsoid !== this.globeMode)\r\n props.globeMode = this.globeMode;\r\n if (this.useDepthBuffer)\r\n props.useDepthBuffer = true;\r\n if (!this._locatable)\r\n props.nonLocatable = true;\r\n\r\n const terrainSettings = this.terrainSettings.toJSON();\r\n for (const prop of Object.values(terrainSettings)) {\r\n if (undefined !== prop) {\r\n props.terrainSettings = terrainSettings;\r\n break;\r\n }\r\n }\r\n\r\n if (this.planarClipMask.isValid)\r\n props.planarClipMask = this.planarClipMask.toJSON();\r\n\r\n return props;\r\n }\r\n\r\n /** Convert these settings to their persistent representation. In general, this method should only be used when writing the settings directly to\r\n * the iModel - otherwise, prefer [[toJSON]].\r\n */\r\n public toPersistentJSON(): PersistentBackgroundMapProps {\r\n const props = this.toJSON() as PersistentBackgroundMapProps;\r\n\r\n // Preserve deprecated imagery provider properties.\r\n if (\"BingProvider\" !== this._provider.name)\r\n props.providerName = this._provider.name; // eslint-disable-line deprecation/deprecation\r\n if (BackgroundMapType.Hybrid !== this._provider.type)\r\n props.providerData = { mapType: this._provider.type }; // eslint-disable-line deprecation/deprecation\r\n\r\n return props;\r\n }\r\n\r\n /** Returns true if these settings are equivalent to the supplied JSON settings. */\r\n public equalsJSON(json?: BackgroundMapProps): boolean {\r\n return this.equals(BackgroundMapSettings.fromJSON(json));\r\n }\r\n\r\n /** Returns true if the persistent representation of these settings is equivalent to `json`. */\r\n public equalsPersistentJSON(json?: PersistentBackgroundMapProps): boolean {\r\n return this.equals(BackgroundMapSettings.fromPersistentJSON(json));\r\n }\r\n\r\n /** Returns true if these settings are equivalent to `other`. */\r\n public equals(other: BackgroundMapSettings): boolean {\r\n return this.groundBias === other.groundBias && this.useDepthBuffer === other.useDepthBuffer && this.transparency === other.transparency\r\n && this.globeMode === other.globeMode && this._locatable === other._locatable && this.applyTerrain === other.applyTerrain\r\n && this.terrainSettings.equals(other.terrainSettings) && this.planarClipMask.equals(other.planarClipMask)\r\n && this._provider.name === other._provider.name && this._provider.type === other._provider.type;\r\n }\r\n\r\n /** Create a copy of this BackgroundMapSettings, optionally modifying some of its properties.\r\n * @param changedProps JSON representation of the properties to change.\r\n * @returns A BackgroundMapSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\r\n */\r\n public clone(changedProps?: BackgroundMapProps): BackgroundMapSettings {\r\n if (undefined === changedProps)\r\n return this;\r\n\r\n const props = {\r\n groundBias: changedProps.groundBias ?? this.groundBias,\r\n transparency: changedProps.transparency ?? this.transparency,\r\n useDepthBuffer: changedProps.useDepthBuffer ?? this.useDepthBuffer,\r\n globeMode: changedProps.globeMode ?? this.globeMode,\r\n nonLocatable: changedProps.nonLocatable ?? !this._locatable,\r\n applyTerrain: changedProps.applyTerrain ?? this.applyTerrain,\r\n terrainSettings: changedProps.terrainSettings ? this.terrainSettings.clone(changedProps.terrainSettings).toJSON() : this.terrainSettings.toJSON(),\r\n planarClipMask: changedProps.planarClipMask ? this.planarClipMask.clone(changedProps.planarClipMask).toJSON() : this.planarClipMask.toJSON(),\r\n providerName: this._provider.name,\r\n providerData: { mapType: this._provider.type },\r\n };\r\n\r\n return BackgroundMapSettings.fromPersistentJSON(props);\r\n }\r\n}\r\n"]}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  /**
5
5
  * @beta
6
- * @deprecated
6
+ * @deprecated in 3.x.
7
7
  */
8
8
  export declare enum CloudStorageProvider {
9
9
  Azure = 0,
@@ -14,7 +14,7 @@ export declare enum CloudStorageProvider {
14
14
  }
15
15
  /**
16
16
  * @beta
17
- * @deprecated
17
+ * @deprecated in 3.x.
18
18
  */
19
19
  export interface CloudStorageContainerDescriptor {
20
20
  provider?: CloudStorageProvider;
@@ -23,7 +23,7 @@ export interface CloudStorageContainerDescriptor {
23
23
  }
24
24
  /**
25
25
  * @beta
26
- * @deprecated
26
+ * @deprecated in 3.x.
27
27
  */
28
28
  export interface CloudStorageContainerUrl {
29
29
  descriptor: CloudStorageContainerDescriptor;
@@ -36,14 +36,14 @@ export interface CloudStorageContainerUrl {
36
36
  }
37
37
  /**
38
38
  * @beta
39
- * @deprecated
39
+ * @deprecated in 3.x.
40
40
  */
41
41
  export declare namespace CloudStorageContainerUrl {
42
42
  function empty(): CloudStorageContainerUrl;
43
43
  }
44
44
  /**
45
45
  * @beta
46
- * @deprecated
46
+ * @deprecated in 3.x.
47
47
  */
48
48
  export declare abstract class CloudStorageCache<TContentId, TContentType> {
49
49
  private _containers;
@@ -9,7 +9,7 @@ import { UnexpectedErrors } from "@itwin/core-bentley";
9
9
  /* eslint-disable deprecation/deprecation */
10
10
  /**
11
11
  * @beta
12
- * @deprecated
12
+ * @deprecated in 3.x.
13
13
  */
14
14
  export var CloudStorageProvider;
15
15
  (function (CloudStorageProvider) {
@@ -21,7 +21,7 @@ export var CloudStorageProvider;
21
21
  })(CloudStorageProvider || (CloudStorageProvider = {}));
22
22
  /**
23
23
  * @beta
24
- * @deprecated
24
+ * @deprecated in 3.x.
25
25
  */
26
26
  export var CloudStorageContainerUrl;
27
27
  (function (CloudStorageContainerUrl) {
@@ -37,7 +37,7 @@ export var CloudStorageContainerUrl;
37
37
  })(CloudStorageContainerUrl || (CloudStorageContainerUrl = {}));
38
38
  /**
39
39
  * @beta
40
- * @deprecated
40
+ * @deprecated in 3.x.
41
41
  */
42
42
  export class CloudStorageCache {
43
43
  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SAChB;QAED,OAAO,SAAS,CAAC;IACnB,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 CloudStorage\r\n */\r\n\r\nimport { UnexpectedErrors } from \"@itwin/core-bentley\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/**\r\n * @beta\r\n * @deprecated\r\n */\r\nexport enum CloudStorageProvider {\r\n Azure,\r\n Amazon,\r\n AliCloud,\r\n External,\r\n Unknown,\r\n}\r\n\r\n/**\r\n * @beta\r\n * @deprecated\r\n */\r\nexport interface CloudStorageContainerDescriptor {\r\n provider?: CloudStorageProvider;\r\n name: string;\r\n resource?: string;\r\n}\r\n\r\n/**\r\n * @beta\r\n * @deprecated\r\n */\r\nexport interface CloudStorageContainerUrl {\r\n descriptor: CloudStorageContainerDescriptor;\r\n valid: number;\r\n expires: number;\r\n url: string;\r\n method?: string;\r\n headers?: Record<string, string>;\r\n bound?: boolean;\r\n}\r\n\r\n/**\r\n * @beta\r\n * @deprecated\r\n */\r\nexport namespace CloudStorageContainerUrl {\r\n export function empty(): CloudStorageContainerUrl {\r\n return {\r\n descriptor: { name: \"\" },\r\n valid: 0,\r\n expires: 0,\r\n url: \"\",\r\n };\r\n }\r\n}\r\n\r\n/**\r\n * @beta\r\n * @deprecated\r\n */\r\nexport abstract class CloudStorageCache<TContentId, TContentType> {\r\n private _containers: Map<string, CloudStorageContainerUrl>;\r\n\r\n public provider: CloudStorageProvider = CloudStorageProvider.Unknown;\r\n public abstract formContainerName(id: TContentId): string;\r\n public abstract formResourceName(id: TContentId): string;\r\n protected formContainerKey(id: TContentId): string { return this.formContainerName(id); }\r\n protected abstract obtainContainerUrl(id: TContentId, descriptor: CloudStorageContainerDescriptor): Promise<CloudStorageContainerUrl>;\r\n protected abstract instantiateResource(response: Response): Promise<TContentType | undefined>;\r\n protected supplyUrlBase(_container: CloudStorageContainerUrl, _id: TContentId): string | undefined { return undefined; }\r\n\r\n public constructor() {\r\n this._containers = new Map();\r\n }\r\n\r\n public async retrieve(id: TContentId): Promise<TContentType | undefined> {\r\n try {\r\n const container = await this.getContainer(id);\r\n if (!container.url)\r\n return undefined;\r\n\r\n const response = await this.requestResource(container, id);\r\n if (response.ok) {\r\n const content = await this.instantiateResource(response);\r\n return content;\r\n }\r\n } catch (err) {\r\n UnexpectedErrors.handle(err);\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n protected async requestResource(container: CloudStorageContainerUrl, id: TContentId): Promise<Response> {\r\n const base = this.supplyUrlBase(container, id);\r\n const url = (undefined === base || \"\" === base) ? new URL(container.url) : new URL(container.url, base);\r\n\r\n if (!container.bound) {\r\n url.pathname += `/${this.formResourceName(id)}`;\r\n }\r\n\r\n const init: RequestInit = {\r\n headers: container.headers,\r\n method: \"GET\",\r\n };\r\n\r\n return fetch(url.toString(), init);\r\n }\r\n\r\n private _pendingContainerRequests: Map<string, Promise<CloudStorageContainerUrl>> = new Map();\r\n\r\n protected async getContainer(id: TContentId): Promise<CloudStorageContainerUrl> {\r\n const now = new Date().getTime();\r\n const name = this.formContainerName(id);\r\n const resource = this.formResourceName(id);\r\n const key = this.formContainerKey(id);\r\n\r\n let container = this._containers.get(key);\r\n if (container && container.url && (container.valid > now || container.expires < now)) {\r\n container = undefined;\r\n this._containers.delete(key);\r\n }\r\n\r\n if (!container) {\r\n let request = this._pendingContainerRequests.get(key);\r\n if (!request) {\r\n request = new Promise(async (resolve, reject) => {\r\n try {\r\n container = await this.obtainContainerUrl(id, { name, resource });\r\n this._containers.set(key, container);\r\n this._pendingContainerRequests.delete(key);\r\n resolve(container);\r\n } catch (err) {\r\n this._pendingContainerRequests.delete(key);\r\n reject(err);\r\n }\r\n });\r\n\r\n this._pendingContainerRequests.set(key, request);\r\n }\r\n\r\n return request;\r\n }\r\n\r\n return container;\r\n }\r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AED,OAAO,SAAS,CAAC;IACnB,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 CloudStorage\r\n */\r\n\r\nimport { UnexpectedErrors } from \"@itwin/core-bentley\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/**\r\n * @beta\r\n * @deprecated in 3.x.\r\n */\r\nexport enum CloudStorageProvider {\r\n Azure,\r\n Amazon,\r\n AliCloud,\r\n External,\r\n Unknown,\r\n}\r\n\r\n/**\r\n * @beta\r\n * @deprecated in 3.x.\r\n */\r\nexport interface CloudStorageContainerDescriptor {\r\n provider?: CloudStorageProvider;\r\n name: string;\r\n resource?: string;\r\n}\r\n\r\n/**\r\n * @beta\r\n * @deprecated in 3.x.\r\n */\r\nexport interface CloudStorageContainerUrl {\r\n descriptor: CloudStorageContainerDescriptor;\r\n valid: number;\r\n expires: number;\r\n url: string;\r\n method?: string;\r\n headers?: Record<string, string>;\r\n bound?: boolean;\r\n}\r\n\r\n/**\r\n * @beta\r\n * @deprecated in 3.x.\r\n */\r\nexport namespace CloudStorageContainerUrl {\r\n export function empty(): CloudStorageContainerUrl {\r\n return {\r\n descriptor: { name: \"\" },\r\n valid: 0,\r\n expires: 0,\r\n url: \"\",\r\n };\r\n }\r\n}\r\n\r\n/**\r\n * @beta\r\n * @deprecated in 3.x.\r\n */\r\nexport abstract class CloudStorageCache<TContentId, TContentType> {\r\n private _containers: Map<string, CloudStorageContainerUrl>;\r\n\r\n public provider: CloudStorageProvider = CloudStorageProvider.Unknown;\r\n public abstract formContainerName(id: TContentId): string;\r\n public abstract formResourceName(id: TContentId): string;\r\n protected formContainerKey(id: TContentId): string { return this.formContainerName(id); }\r\n protected abstract obtainContainerUrl(id: TContentId, descriptor: CloudStorageContainerDescriptor): Promise<CloudStorageContainerUrl>;\r\n protected abstract instantiateResource(response: Response): Promise<TContentType | undefined>;\r\n protected supplyUrlBase(_container: CloudStorageContainerUrl, _id: TContentId): string | undefined { return undefined; }\r\n\r\n public constructor() {\r\n this._containers = new Map();\r\n }\r\n\r\n public async retrieve(id: TContentId): Promise<TContentType | undefined> {\r\n try {\r\n const container = await this.getContainer(id);\r\n if (!container.url)\r\n return undefined;\r\n\r\n const response = await this.requestResource(container, id);\r\n if (response.ok) {\r\n const content = await this.instantiateResource(response);\r\n return content;\r\n }\r\n } catch (err) {\r\n UnexpectedErrors.handle(err);\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n protected async requestResource(container: CloudStorageContainerUrl, id: TContentId): Promise<Response> {\r\n const base = this.supplyUrlBase(container, id);\r\n const url = (undefined === base || \"\" === base) ? new URL(container.url) : new URL(container.url, base);\r\n\r\n if (!container.bound) {\r\n url.pathname += `/${this.formResourceName(id)}`;\r\n }\r\n\r\n const init: RequestInit = {\r\n headers: container.headers,\r\n method: \"GET\",\r\n };\r\n\r\n return fetch(url.toString(), init);\r\n }\r\n\r\n private _pendingContainerRequests: Map<string, Promise<CloudStorageContainerUrl>> = new Map();\r\n\r\n protected async getContainer(id: TContentId): Promise<CloudStorageContainerUrl> {\r\n const now = new Date().getTime();\r\n const name = this.formContainerName(id);\r\n const resource = this.formResourceName(id);\r\n const key = this.formContainerKey(id);\r\n\r\n let container = this._containers.get(key);\r\n if (container && container.url && (container.valid > now || container.expires < now)) {\r\n container = undefined;\r\n this._containers.delete(key);\r\n }\r\n\r\n if (!container) {\r\n let request = this._pendingContainerRequests.get(key);\r\n if (!request) {\r\n request = new Promise(async (resolve, reject) => {\r\n try {\r\n container = await this.obtainContainerUrl(id, { name, resource });\r\n this._containers.set(key, container);\r\n this._pendingContainerRequests.delete(key);\r\n resolve(container);\r\n } catch (err) {\r\n this._pendingContainerRequests.delete(key);\r\n reject(err);\r\n }\r\n });\r\n\r\n this._pendingContainerRequests.set(key, request);\r\n }\r\n\r\n return request;\r\n }\r\n\r\n return container;\r\n }\r\n}\r\n"]}
@@ -12,7 +12,7 @@ export interface TileContentIdentifier {
12
12
  }
13
13
  /**
14
14
  * @beta
15
- * @deprecated
15
+ * @deprecated in 3.x.
16
16
  */
17
17
  export declare class CloudStorageTileCache extends CloudStorageCache<TileContentIdentifier, Uint8Array> {
18
18
  private static _instance;
@@ -10,7 +10,7 @@ import { CloudStorageCache, CloudStorageProvider } from "./CloudStorage";
10
10
  import { IModelTileRpcInterface } from "./rpc/IModelTileRpcInterface";
11
11
  /**
12
12
  * @beta
13
- * @deprecated
13
+ * @deprecated in 3.x.
14
14
  */
15
15
  export class CloudStorageTileCache extends CloudStorageCache {
16
16
  constructor() {
@@ -1 +1 @@
1
- {"version":3,"file":"CloudStorageTileCache.js","sourceRoot":"","sources":["../../src/CloudStorageTileCache.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,4CAA4C;AAE5C,OAAO,EAAE,iBAAiB,EAA6D,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEpI,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAUtE;;;GAGG;AACH,MAAM,OAAO,qBAAsB,SAAQ,iBAAoD;IA0B7F;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAzBM,MAAM,CAAC,QAAQ;QACpB,IAAI,CAAC,qBAAqB,CAAC,SAAS,EAAE;YACpC,qBAAqB,CAAC,SAAS,GAAG,IAAI,qBAAqB,EAAE,CAAC;SAC/D;QAED,OAAO,qBAAqB,CAAC,SAAS,CAAC;IACzC,CAAC;IAEM,2BAA2B,CAAC,GAAoC;QACrE,MAAM,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QAE1B,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC;QAClC,MAAM,WAAW,GAAG,CAAC,CAAC,CAAC,WAAW;QAClC,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,GAAG,K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,QAAQ,EAAE;YACnD,OAAO,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;SAC/D;QAED,OAAO,KAAK,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;IACpC,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 CloudStorage\r\n */\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\nimport { CloudStorageCache, CloudStorageContainerDescriptor, CloudStorageContainerUrl, CloudStorageProvider } from \"./CloudStorage\";\r\nimport { IModelRpcProps } from \"./IModel\";\r\nimport { IModelTileRpcInterface } from \"./rpc/IModelTileRpcInterface\";\r\n\r\n/** @beta */\r\nexport interface TileContentIdentifier {\r\n tokenProps: IModelRpcProps;\r\n treeId: string;\r\n contentId: string;\r\n guid: string | undefined;\r\n}\r\n\r\n/**\r\n * @beta\r\n * @deprecated\r\n */\r\nexport class CloudStorageTileCache extends CloudStorageCache<TileContentIdentifier, Uint8Array> {\r\n private static _instance: CloudStorageTileCache;\r\n\r\n public static getCache(): CloudStorageTileCache {\r\n if (!CloudStorageTileCache._instance) {\r\n CloudStorageTileCache._instance = new CloudStorageTileCache();\r\n }\r\n\r\n return CloudStorageTileCache._instance;\r\n }\r\n\r\n public supplyExpiryForContainerUrl(_id: CloudStorageContainerDescriptor): Date {\r\n const expiry = new Date();\r\n\r\n const today = new Date().getDay();\r\n const rolloverDay = 6; // saturday\r\n expiry.setHours((rolloverDay - today) * 24);\r\n\r\n expiry.setHours(23);\r\n expiry.setMinutes(59);\r\n expiry.setSeconds(59);\r\n expiry.setMilliseconds(999);\r\n\r\n return expiry;\r\n }\r\n\r\n protected constructor() {\r\n super();\r\n }\r\n\r\n protected async obtainContainerUrl(id: TileContentIdentifier, descriptor: CloudStorageContainerDescriptor): Promise<CloudStorageContainerUrl> {\r\n const client = IModelTileRpcInterface.getClient();\r\n return client.getTileCacheContainerUrl(id.tokenProps, descriptor);\r\n }\r\n\r\n protected async instantiateResource(response: Response): Promise<Uint8Array | undefined> {\r\n const data = await response.arrayBuffer();\r\n if (!data.byteLength) {\r\n return undefined;\r\n }\r\n\r\n return new Uint8Array(data);\r\n }\r\n\r\n public formContainerName(id: TileContentIdentifier): string {\r\n return `${id.tokenProps.iModelId}`;\r\n }\r\n\r\n public formResourceName(id: TileContentIdentifier): string {\r\n const changesetId = id.tokenProps.changeset?.id || \"first\";\r\n const version = id.guid ? id.guid : changesetId; // NB: id.guid can be null (backend) OR undefined (frontend) here...\r\n return `tiles/${id.treeId}/${version}/${id.contentId}`;\r\n }\r\n\r\n protected override formContainerKey(id: TileContentIdentifier): string {\r\n if (this.provider === CloudStorageProvider.AliCloud) {\r\n return this.formContainerName(id) + this.formResourceName(id);\r\n }\r\n\r\n return super.formContainerKey(id);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"CloudStorageTileCache.js","sourceRoot":"","sources":["../../src/CloudStorageTileCache.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,4CAA4C;AAE5C,OAAO,EAAE,iBAAiB,EAA6D,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEpI,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAUtE;;;GAGG;AACH,MAAM,OAAO,qBAAsB,SAAQ,iBAAoD;IA0B7F;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAzBM,MAAM,CAAC,QAAQ;QACpB,IAAI,CAAC,qBAAqB,CAAC,SAAS,EAAE;YACpC,qBAAqB,CAAC,SAAS,GAAG,IAAI,qBAAqB,EAAE,CAAC;SAC/D;QAED,OAAO,qBAAqB,CAAC,SAAS,CAAC;IACzC,CAAC;IAEM,2BAA2B,CAAC,GAAoC;QACrE,M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AC,WAAW,CAAC,CAAC,oEAAoE;QACrH,OAAO,SAAS,EAAE,CAAC,MAAM,IAAI,OAAO,IAAI,EAAE,CAAC,SAAS,EAAE,CAAC;IACzD,CAAC;IAEkB,gBAAgB,CAAC,EAAyB;QAC3D,IAAI,IAAI,CAAC,QAAQ,KAAK,oBAAoB,CAAC,QAAQ,EAAE;YACnD,OAAO,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;SAC/D;QAED,OAAO,KAAK,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;IACpC,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 CloudStorage\r\n */\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\nimport { CloudStorageCache, CloudStorageContainerDescriptor, CloudStorageContainerUrl, CloudStorageProvider } from \"./CloudStorage\";\r\nimport { IModelRpcProps } from \"./IModel\";\r\nimport { IModelTileRpcInterface } from \"./rpc/IModelTileRpcInterface\";\r\n\r\n/** @beta */\r\nexport interface TileContentIdentifier {\r\n tokenProps: IModelRpcProps;\r\n treeId: string;\r\n contentId: string;\r\n guid: string | undefined;\r\n}\r\n\r\n/**\r\n * @beta\r\n * @deprecated in 3.x.\r\n */\r\nexport class CloudStorageTileCache extends CloudStorageCache<TileContentIdentifier, Uint8Array> {\r\n private static _instance: CloudStorageTileCache;\r\n\r\n public static getCache(): CloudStorageTileCache {\r\n if (!CloudStorageTileCache._instance) {\r\n CloudStorageTileCache._instance = new CloudStorageTileCache();\r\n }\r\n\r\n return CloudStorageTileCache._instance;\r\n }\r\n\r\n public supplyExpiryForContainerUrl(_id: CloudStorageContainerDescriptor): Date {\r\n const expiry = new Date();\r\n\r\n const today = new Date().getDay();\r\n const rolloverDay = 6; // saturday\r\n expiry.setHours((rolloverDay - today) * 24);\r\n\r\n expiry.setHours(23);\r\n expiry.setMinutes(59);\r\n expiry.setSeconds(59);\r\n expiry.setMilliseconds(999);\r\n\r\n return expiry;\r\n }\r\n\r\n protected constructor() {\r\n super();\r\n }\r\n\r\n protected async obtainContainerUrl(id: TileContentIdentifier, descriptor: CloudStorageContainerDescriptor): Promise<CloudStorageContainerUrl> {\r\n const client = IModelTileRpcInterface.getClient();\r\n return client.getTileCacheContainerUrl(id.tokenProps, descriptor);\r\n }\r\n\r\n protected async instantiateResource(response: Response): Promise<Uint8Array | undefined> {\r\n const data = await response.arrayBuffer();\r\n if (!data.byteLength) {\r\n return undefined;\r\n }\r\n\r\n return new Uint8Array(data);\r\n }\r\n\r\n public formContainerName(id: TileContentIdentifier): string {\r\n return `${id.tokenProps.iModelId}`;\r\n }\r\n\r\n public formResourceName(id: TileContentIdentifier): string {\r\n const changesetId = id.tokenProps.changeset?.id || \"first\";\r\n const version = id.guid ? id.guid : changesetId; // NB: id.guid can be null (backend) OR undefined (frontend) here...\r\n return `tiles/${id.treeId}/${version}/${id.contentId}`;\r\n }\r\n\r\n protected override formContainerKey(id: TileContentIdentifier): string {\r\n if (this.provider === CloudStorageProvider.AliCloud) {\r\n return this.formContainerName(id) + this.formResourceName(id);\r\n }\r\n\r\n return super.formContainerKey(id);\r\n }\r\n}\r\n"]}
package/lib/esm/Code.d.ts CHANGED
@@ -199,16 +199,37 @@ export declare namespace CodeScopeSpec {
199
199
  /** The Code value must be unique among other elements also scoped by the same element */
200
200
  RelatedElement = 4
201
201
  }
202
- /** Requirements for how the CodeScope Element is identified.
202
+ /**
203
+ * Requirements for how the CodeScope Element is identified.
203
204
  * @public
204
205
  */
205
206
  enum ScopeRequirement {
206
- /** The Code is required to have a valid ElementId as its scope */
207
+ /** The ElementId of CodeScope element identifies its scope. Used for Codes that are unique only within a single iModel. */
207
208
  ElementId = 1,
208
- /** The Code is required to have a valid FederationGuid as its scope */
209
+ /** The FederationGuid of the CodeScope element identifies its scope. Used for Codes that are globally unique. */
209
210
  FederationGuid = 2
210
211
  }
211
212
  }
213
+ /**
214
+ * The JSON properties of a CodeSpec
215
+ * @public
216
+ */
217
+ export interface CodeSpecProperties {
218
+ scopeSpec: {
219
+ /** the type of CodeSpec */
220
+ type: CodeScopeSpec.Type;
221
+ /** If true, the federationGuid of the scope element identifies the scope, for Codes that are globally unique.
222
+ * Otherwise, the ElementId of the scopeElement is used, for Codes that are scoped only within a single iModel.
223
+ */
224
+ fGuidRequired?: boolean;
225
+ /** The relationship className (in the form "schema:class"), when `type` is `CodeScopeSpec.Type.RelatedElement` */
226
+ relationship?: string;
227
+ };
228
+ spec?: {
229
+ isManagedWithDgnDb?: boolean;
230
+ };
231
+ version?: string;
232
+ }
212
233
  /** A [Code Specification]($docs/bis/guide/references/glossary#codespec) captures the rules for encoding and decoding significant business information into
213
234
  * and from a Code (string). This specification is used to generate and validate Codes.
214
235
  *
@@ -224,12 +245,10 @@ export declare class CodeSpec {
224
245
  /** The name of this CodeSpec. */
225
246
  name: string;
226
247
  /** The JSON properties for this CodeSpec.
227
- * > Note: Use the getters and setters instead of accessing this directly.
248
+ * @note Use the getters and setters instead of accessing this directly.
228
249
  * @internal
229
250
  */
230
- properties: any;
231
- /** Internal-only constructor. Proper use is to supply `properties` only or `scopeType` and `scopeReq` but not `properties`.
232
- */
251
+ properties: CodeSpecProperties;
233
252
  private constructor();
234
253
  /** Create a new CodeSpec from the specified parameters
235
254
  * > Note: CodeSpec.id will not be valid until inserted
@@ -239,17 +258,19 @@ export declare class CodeSpec {
239
258
  /** Create a new CodeSpec directly from JSON. Used internally by the CodeSpecs.load function.
240
259
  * @internal
241
260
  */
242
- static createFromJson(iModel: IModel, id: Id64String, name: string, properties: any): CodeSpec;
261
+ static createFromJson(iModel: IModel, id: Id64String, name: string, properties?: CodeSpecProperties): CodeSpec;
243
262
  /** Will be true if the id of this CodeSpec is valid. */
244
263
  get isValid(): boolean;
245
264
  /** The scope type of this CodeSpec. */
246
265
  get scopeType(): CodeScopeSpec.Type;
247
266
  set scopeType(scopeType: CodeScopeSpec.Type);
248
- /** Will be `CodeScopeSpec.ScopeRequirement.FederationGuid` if the scoping element is required to have a FederationGuid or `CodeScopeSpec.ScopeRequirement.ElementId` otherwise (which is the default). */
267
+ /** Will be `CodeScopeSpec.ScopeRequirement.FederationGuid` if the scoping element is required to have a FederationGuid or
268
+ * CodeScopeSpec.ScopeRequirement.ElementId` otherwise (the default).
269
+ */
249
270
  get scopeReq(): CodeScopeSpec.ScopeRequirement;
250
271
  set scopeReq(req: CodeScopeSpec.ScopeRequirement);
251
272
  /** 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.
252
- * @beta
273
+ * @deprecated in 3.6 Use scopeReq instead.
253
274
  */
254
275
  get isManagedWithIModel(): boolean;
255
276
  set isManagedWithIModel(value: boolean);
@@ -1 +1 @@
1
- {"version":3,"file":"Code.d.ts","sourceRoot":"","sources":["../../src/Code.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAQ,UAAU,EAAa,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;;;;GAKG;AACH,oBAAY,cAAc,GAAG,UAAU,GAAG,UAAU,CAAC;AAErD;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,mGAAmG;IACnG,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC;IAC1B,uGAAuG;IACvG,KAAK,EAAE,cAAc,CAAC;IACtB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,qBAAa,IAAK,YAAW,SAAS;IACpC,8FAA8F;IACvF,IAAI,EAAE,UAAU,CAAC;IACxB,+FAA+F;IACxF,KAAK,EAAE,UAAU,CAAC;IACzB;;OAEG;IACH,IAAW,KAAK,IACM,MAAM,CADoB;IAChD,IAAW,K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