@itwin/core-backend 5.1.0-dev.9 → 5.2.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 (441) hide show
  1. package/CHANGELOG.md +117 -1
  2. package/lib/cjs/BackendHubAccess.d.ts +1 -1
  3. package/lib/cjs/BackendHubAccess.js +1 -1
  4. package/lib/cjs/BackendHubAccess.js.map +1 -1
  5. package/lib/cjs/BisCoreSchema.d.ts.map +1 -1
  6. package/lib/cjs/BisCoreSchema.js +4 -2
  7. package/lib/cjs/BisCoreSchema.js.map +1 -1
  8. package/lib/cjs/BriefcaseManager.d.ts +10 -2
  9. package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
  10. package/lib/cjs/BriefcaseManager.js +16 -0
  11. package/lib/cjs/BriefcaseManager.js.map +1 -1
  12. package/lib/cjs/Category.d.ts +4 -4
  13. package/lib/cjs/Category.js +4 -4
  14. package/lib/cjs/Category.js.map +1 -1
  15. package/lib/cjs/ChangesetECAdaptor.d.ts +67 -8
  16. package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
  17. package/lib/cjs/ChangesetECAdaptor.js +248 -33
  18. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  19. package/lib/cjs/ClassRegistry.d.ts +9 -1
  20. package/lib/cjs/ClassRegistry.d.ts.map +1 -1
  21. package/lib/cjs/ClassRegistry.js +9 -1
  22. package/lib/cjs/ClassRegistry.js.map +1 -1
  23. package/lib/cjs/CloudSqlite.js +1 -1
  24. package/lib/cjs/CloudSqlite.js.map +1 -1
  25. package/lib/cjs/CodeSpecs.d.ts +1 -1
  26. package/lib/cjs/CodeSpecs.js +1 -1
  27. package/lib/cjs/CodeSpecs.js.map +1 -1
  28. package/lib/cjs/DisplayStyle.d.ts +4 -4
  29. package/lib/cjs/DisplayStyle.js +3 -3
  30. package/lib/cjs/DisplayStyle.js.map +1 -1
  31. package/lib/cjs/ECDb.d.ts +4 -4
  32. package/lib/cjs/ECDb.d.ts.map +1 -1
  33. package/lib/cjs/ECDb.js +4 -4
  34. package/lib/cjs/ECDb.js.map +1 -1
  35. package/lib/cjs/ECSqlStatement.d.ts +15 -6
  36. package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
  37. package/lib/cjs/ECSqlStatement.js +19 -4
  38. package/lib/cjs/ECSqlStatement.js.map +1 -1
  39. package/lib/cjs/Element.d.ts +54 -51
  40. package/lib/cjs/Element.d.ts.map +1 -1
  41. package/lib/cjs/Element.js +67 -52
  42. package/lib/cjs/Element.js.map +1 -1
  43. package/lib/cjs/ElementAspect.d.ts +8 -8
  44. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  45. package/lib/cjs/ElementAspect.js +8 -8
  46. package/lib/cjs/ElementAspect.js.map +1 -1
  47. package/lib/cjs/Entity.d.ts +10 -7
  48. package/lib/cjs/Entity.d.ts.map +1 -1
  49. package/lib/cjs/Entity.js +35 -13
  50. package/lib/cjs/Entity.js.map +1 -1
  51. package/lib/cjs/ExportGraphics.d.ts +54 -8
  52. package/lib/cjs/ExportGraphics.d.ts.map +1 -1
  53. package/lib/cjs/ExportGraphics.js +158 -59
  54. package/lib/cjs/ExportGraphics.js.map +1 -1
  55. package/lib/cjs/GeographicCRSServices.d.ts +6 -2
  56. package/lib/cjs/GeographicCRSServices.d.ts.map +1 -1
  57. package/lib/cjs/GeographicCRSServices.js +1 -1
  58. package/lib/cjs/GeographicCRSServices.js.map +1 -1
  59. package/lib/cjs/IModelDb.d.ts +37 -26
  60. package/lib/cjs/IModelDb.d.ts.map +1 -1
  61. package/lib/cjs/IModelDb.js +124 -47
  62. package/lib/cjs/IModelDb.js.map +1 -1
  63. package/lib/cjs/IModelElementCloneContext.d.ts +1 -1
  64. package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
  65. package/lib/cjs/IModelElementCloneContext.js +1 -1
  66. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  67. package/lib/cjs/IModelHost.d.ts +2 -3
  68. package/lib/cjs/IModelHost.d.ts.map +1 -1
  69. package/lib/cjs/IModelHost.js +2 -3
  70. package/lib/cjs/IModelHost.js.map +1 -1
  71. package/lib/cjs/IModelIncrementalSchemaLocater.d.ts +36 -0
  72. package/lib/cjs/IModelIncrementalSchemaLocater.d.ts.map +1 -0
  73. package/lib/cjs/IModelIncrementalSchemaLocater.js +69 -0
  74. package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -0
  75. package/lib/cjs/LocalHub.d.ts.map +1 -1
  76. package/lib/cjs/LocalHub.js +6 -4
  77. package/lib/cjs/LocalHub.js.map +1 -1
  78. package/lib/cjs/Material.d.ts +4 -3
  79. package/lib/cjs/Material.d.ts.map +1 -1
  80. package/lib/cjs/Material.js +5 -5
  81. package/lib/cjs/Material.js.map +1 -1
  82. package/lib/cjs/Model.d.ts +22 -22
  83. package/lib/cjs/Model.js +22 -22
  84. package/lib/cjs/Model.js.map +1 -1
  85. package/lib/cjs/Relationship.d.ts +3 -0
  86. package/lib/cjs/Relationship.d.ts.map +1 -1
  87. package/lib/cjs/Relationship.js +15 -0
  88. package/lib/cjs/Relationship.js.map +1 -1
  89. package/lib/cjs/SQLiteDb.d.ts +1 -1
  90. package/lib/cjs/SQLiteDb.js +1 -1
  91. package/lib/cjs/SQLiteDb.js.map +1 -1
  92. package/lib/cjs/Schema.d.ts +25 -0
  93. package/lib/cjs/Schema.d.ts.map +1 -1
  94. package/lib/cjs/Schema.js +25 -0
  95. package/lib/cjs/Schema.js.map +1 -1
  96. package/lib/cjs/SqliteStatement.d.ts +1 -1
  97. package/lib/cjs/SqliteStatement.d.ts.map +1 -1
  98. package/lib/cjs/SqliteStatement.js +1 -1
  99. package/lib/cjs/SqliteStatement.js.map +1 -1
  100. package/lib/cjs/Texture.d.ts +1 -1
  101. package/lib/cjs/Texture.js +1 -1
  102. package/lib/cjs/Texture.js.map +1 -1
  103. package/lib/cjs/TxnManager.d.ts +4 -4
  104. package/lib/cjs/TxnManager.js +1 -1
  105. package/lib/cjs/TxnManager.js.map +1 -1
  106. package/lib/cjs/ViewDefinition.d.ts +40 -14
  107. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  108. package/lib/cjs/ViewDefinition.js +42 -14
  109. package/lib/cjs/ViewDefinition.js.map +1 -1
  110. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts +61 -0
  111. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -0
  112. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js +110 -0
  113. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -0
  114. package/lib/cjs/annotations/FrameGeometry.d.ts +51 -0
  115. package/lib/cjs/annotations/FrameGeometry.d.ts.map +1 -0
  116. package/lib/cjs/annotations/FrameGeometry.js +249 -0
  117. package/lib/cjs/annotations/FrameGeometry.js.map +1 -0
  118. package/lib/cjs/annotations/LeaderGeometry.d.ts +53 -0
  119. package/lib/cjs/annotations/LeaderGeometry.d.ts.map +1 -0
  120. package/lib/cjs/annotations/LeaderGeometry.js +184 -0
  121. package/lib/cjs/annotations/LeaderGeometry.js.map +1 -0
  122. package/lib/cjs/annotations/TextAnnotationElement.d.ts +204 -0
  123. package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -0
  124. package/lib/cjs/annotations/TextAnnotationElement.js +411 -0
  125. package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -0
  126. package/lib/cjs/annotations/TextAnnotationGeometry.d.ts +33 -0
  127. package/lib/cjs/annotations/TextAnnotationGeometry.d.ts.map +1 -0
  128. package/lib/cjs/annotations/TextAnnotationGeometry.js +137 -0
  129. package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -0
  130. package/lib/cjs/annotations/TextBlockGeometry.d.ts +16 -0
  131. package/lib/cjs/annotations/TextBlockGeometry.d.ts.map +1 -0
  132. package/lib/cjs/{TextAnnotationGeometry.js → annotations/TextBlockGeometry.js} +28 -70
  133. package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -0
  134. package/lib/cjs/{TextAnnotationLayout.d.ts → annotations/TextBlockLayout.d.ts} +69 -22
  135. package/lib/cjs/annotations/TextBlockLayout.d.ts.map +1 -0
  136. package/lib/cjs/{TextAnnotationLayout.js → annotations/TextBlockLayout.js} +174 -49
  137. package/lib/cjs/annotations/TextBlockLayout.js.map +1 -0
  138. package/lib/cjs/core-backend.d.ts +7 -3
  139. package/lib/cjs/core-backend.d.ts.map +1 -1
  140. package/lib/cjs/core-backend.js +27 -6
  141. package/lib/cjs/core-backend.js.map +1 -1
  142. package/lib/cjs/internal/ElementLRUCache.d.ts +23 -0
  143. package/lib/cjs/internal/ElementLRUCache.d.ts.map +1 -1
  144. package/lib/cjs/internal/ElementLRUCache.js +167 -3
  145. package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
  146. package/lib/cjs/internal/Symbols.d.ts +1 -0
  147. package/lib/cjs/internal/Symbols.d.ts.map +1 -1
  148. package/lib/cjs/internal/Symbols.js +2 -1
  149. package/lib/cjs/internal/Symbols.js.map +1 -1
  150. package/lib/cjs/internal/annotations/fields.d.ts +22 -0
  151. package/lib/cjs/internal/annotations/fields.d.ts.map +1 -0
  152. package/lib/cjs/internal/annotations/fields.js +237 -0
  153. package/lib/cjs/internal/annotations/fields.js.map +1 -0
  154. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
  155. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +1 -1
  156. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  157. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
  158. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  159. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
  160. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
  161. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  162. package/lib/cjs/workspace/Workspace.d.ts +0 -1
  163. package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
  164. package/lib/cjs/workspace/Workspace.js.map +1 -1
  165. package/lib/esm/BackendHubAccess.d.ts +1 -1
  166. package/lib/esm/BackendHubAccess.js +1 -1
  167. package/lib/esm/BackendHubAccess.js.map +1 -1
  168. package/lib/esm/BisCoreSchema.d.ts.map +1 -1
  169. package/lib/esm/BisCoreSchema.js +4 -2
  170. package/lib/esm/BisCoreSchema.js.map +1 -1
  171. package/lib/esm/BriefcaseManager.d.ts +10 -2
  172. package/lib/esm/BriefcaseManager.d.ts.map +1 -1
  173. package/lib/esm/BriefcaseManager.js +17 -1
  174. package/lib/esm/BriefcaseManager.js.map +1 -1
  175. package/lib/esm/Category.d.ts +4 -4
  176. package/lib/esm/Category.js +4 -4
  177. package/lib/esm/Category.js.map +1 -1
  178. package/lib/esm/ChangesetECAdaptor.d.ts +67 -8
  179. package/lib/esm/ChangesetECAdaptor.d.ts.map +1 -1
  180. package/lib/esm/ChangesetECAdaptor.js +248 -33
  181. package/lib/esm/ChangesetECAdaptor.js.map +1 -1
  182. package/lib/esm/ClassRegistry.d.ts +9 -1
  183. package/lib/esm/ClassRegistry.d.ts.map +1 -1
  184. package/lib/esm/ClassRegistry.js +9 -1
  185. package/lib/esm/ClassRegistry.js.map +1 -1
  186. package/lib/esm/CloudSqlite.js +1 -1
  187. package/lib/esm/CloudSqlite.js.map +1 -1
  188. package/lib/esm/CodeSpecs.d.ts +1 -1
  189. package/lib/esm/CodeSpecs.js +1 -1
  190. package/lib/esm/CodeSpecs.js.map +1 -1
  191. package/lib/esm/DisplayStyle.d.ts +4 -4
  192. package/lib/esm/DisplayStyle.js +3 -3
  193. package/lib/esm/DisplayStyle.js.map +1 -1
  194. package/lib/esm/ECDb.d.ts +4 -4
  195. package/lib/esm/ECDb.d.ts.map +1 -1
  196. package/lib/esm/ECDb.js +4 -4
  197. package/lib/esm/ECDb.js.map +1 -1
  198. package/lib/esm/ECSqlStatement.d.ts +15 -6
  199. package/lib/esm/ECSqlStatement.d.ts.map +1 -1
  200. package/lib/esm/ECSqlStatement.js +19 -4
  201. package/lib/esm/ECSqlStatement.js.map +1 -1
  202. package/lib/esm/Element.d.ts +54 -51
  203. package/lib/esm/Element.d.ts.map +1 -1
  204. package/lib/esm/Element.js +67 -52
  205. package/lib/esm/Element.js.map +1 -1
  206. package/lib/esm/ElementAspect.d.ts +8 -8
  207. package/lib/esm/ElementAspect.d.ts.map +1 -1
  208. package/lib/esm/ElementAspect.js +8 -8
  209. package/lib/esm/ElementAspect.js.map +1 -1
  210. package/lib/esm/Entity.d.ts +10 -7
  211. package/lib/esm/Entity.d.ts.map +1 -1
  212. package/lib/esm/Entity.js +36 -14
  213. package/lib/esm/Entity.js.map +1 -1
  214. package/lib/esm/ExportGraphics.d.ts +54 -8
  215. package/lib/esm/ExportGraphics.d.ts.map +1 -1
  216. package/lib/esm/ExportGraphics.js +156 -58
  217. package/lib/esm/ExportGraphics.js.map +1 -1
  218. package/lib/esm/GeographicCRSServices.d.ts +6 -2
  219. package/lib/esm/GeographicCRSServices.d.ts.map +1 -1
  220. package/lib/esm/GeographicCRSServices.js +1 -1
  221. package/lib/esm/GeographicCRSServices.js.map +1 -1
  222. package/lib/esm/IModelDb.d.ts +37 -26
  223. package/lib/esm/IModelDb.d.ts.map +1 -1
  224. package/lib/esm/IModelDb.js +128 -51
  225. package/lib/esm/IModelDb.js.map +1 -1
  226. package/lib/esm/IModelElementCloneContext.d.ts +1 -1
  227. package/lib/esm/IModelElementCloneContext.d.ts.map +1 -1
  228. package/lib/esm/IModelElementCloneContext.js +1 -1
  229. package/lib/esm/IModelElementCloneContext.js.map +1 -1
  230. package/lib/esm/IModelHost.d.ts +2 -3
  231. package/lib/esm/IModelHost.d.ts.map +1 -1
  232. package/lib/esm/IModelHost.js +2 -3
  233. package/lib/esm/IModelHost.js.map +1 -1
  234. package/lib/esm/IModelIncrementalSchemaLocater.d.ts +36 -0
  235. package/lib/esm/IModelIncrementalSchemaLocater.d.ts.map +1 -0
  236. package/lib/esm/IModelIncrementalSchemaLocater.js +65 -0
  237. package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -0
  238. package/lib/esm/LocalHub.d.ts.map +1 -1
  239. package/lib/esm/LocalHub.js +6 -4
  240. package/lib/esm/LocalHub.js.map +1 -1
  241. package/lib/esm/Material.d.ts +4 -3
  242. package/lib/esm/Material.d.ts.map +1 -1
  243. package/lib/esm/Material.js +5 -5
  244. package/lib/esm/Material.js.map +1 -1
  245. package/lib/esm/Model.d.ts +22 -22
  246. package/lib/esm/Model.js +22 -22
  247. package/lib/esm/Model.js.map +1 -1
  248. package/lib/esm/Relationship.d.ts +3 -0
  249. package/lib/esm/Relationship.d.ts.map +1 -1
  250. package/lib/esm/Relationship.js +15 -0
  251. package/lib/esm/Relationship.js.map +1 -1
  252. package/lib/esm/SQLiteDb.d.ts +1 -1
  253. package/lib/esm/SQLiteDb.js +1 -1
  254. package/lib/esm/SQLiteDb.js.map +1 -1
  255. package/lib/esm/Schema.d.ts +25 -0
  256. package/lib/esm/Schema.d.ts.map +1 -1
  257. package/lib/esm/Schema.js +25 -0
  258. package/lib/esm/Schema.js.map +1 -1
  259. package/lib/esm/SqliteStatement.d.ts +1 -1
  260. package/lib/esm/SqliteStatement.d.ts.map +1 -1
  261. package/lib/esm/SqliteStatement.js +1 -1
  262. package/lib/esm/SqliteStatement.js.map +1 -1
  263. package/lib/esm/Texture.d.ts +1 -1
  264. package/lib/esm/Texture.js +1 -1
  265. package/lib/esm/Texture.js.map +1 -1
  266. package/lib/esm/TxnManager.d.ts +4 -4
  267. package/lib/esm/TxnManager.js +1 -1
  268. package/lib/esm/TxnManager.js.map +1 -1
  269. package/lib/esm/ViewDefinition.d.ts +40 -14
  270. package/lib/esm/ViewDefinition.d.ts.map +1 -1
  271. package/lib/esm/ViewDefinition.js +42 -14
  272. package/lib/esm/ViewDefinition.js.map +1 -1
  273. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts +61 -0
  274. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -0
  275. package/lib/esm/annotations/ElementDrivesTextAnnotation.js +105 -0
  276. package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -0
  277. package/lib/esm/annotations/FrameGeometry.d.ts +51 -0
  278. package/lib/esm/annotations/FrameGeometry.d.ts.map +1 -0
  279. package/lib/esm/annotations/FrameGeometry.js +244 -0
  280. package/lib/esm/annotations/FrameGeometry.js.map +1 -0
  281. package/lib/esm/annotations/LeaderGeometry.d.ts +53 -0
  282. package/lib/esm/annotations/LeaderGeometry.d.ts.map +1 -0
  283. package/lib/esm/annotations/LeaderGeometry.js +179 -0
  284. package/lib/esm/annotations/LeaderGeometry.js.map +1 -0
  285. package/lib/esm/annotations/TextAnnotationElement.d.ts +204 -0
  286. package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -0
  287. package/lib/esm/annotations/TextAnnotationElement.js +405 -0
  288. package/lib/esm/annotations/TextAnnotationElement.js.map +1 -0
  289. package/lib/esm/annotations/TextAnnotationGeometry.d.ts +33 -0
  290. package/lib/esm/annotations/TextAnnotationGeometry.d.ts.map +1 -0
  291. package/lib/esm/annotations/TextAnnotationGeometry.js +134 -0
  292. package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -0
  293. package/lib/esm/annotations/TextBlockGeometry.d.ts +16 -0
  294. package/lib/esm/annotations/TextBlockGeometry.d.ts.map +1 -0
  295. package/lib/esm/{TextAnnotationGeometry.js → annotations/TextBlockGeometry.js} +28 -70
  296. package/lib/esm/annotations/TextBlockGeometry.js.map +1 -0
  297. package/lib/esm/{TextAnnotationLayout.d.ts → annotations/TextBlockLayout.d.ts} +69 -22
  298. package/lib/esm/annotations/TextBlockLayout.d.ts.map +1 -0
  299. package/lib/esm/{TextAnnotationLayout.js → annotations/TextBlockLayout.js} +172 -48
  300. package/lib/esm/annotations/TextBlockLayout.js.map +1 -0
  301. package/lib/esm/core-backend.d.ts +7 -3
  302. package/lib/esm/core-backend.d.ts.map +1 -1
  303. package/lib/esm/core-backend.js +27 -3
  304. package/lib/esm/core-backend.js.map +1 -1
  305. package/lib/esm/internal/ElementLRUCache.d.ts +23 -0
  306. package/lib/esm/internal/ElementLRUCache.d.ts.map +1 -1
  307. package/lib/esm/internal/ElementLRUCache.js +165 -2
  308. package/lib/esm/internal/ElementLRUCache.js.map +1 -1
  309. package/lib/esm/internal/Symbols.d.ts +1 -0
  310. package/lib/esm/internal/Symbols.d.ts.map +1 -1
  311. package/lib/esm/internal/Symbols.js +1 -0
  312. package/lib/esm/internal/Symbols.js.map +1 -1
  313. package/lib/esm/internal/annotations/fields.d.ts +22 -0
  314. package/lib/esm/internal/annotations/fields.d.ts.map +1 -0
  315. package/lib/esm/internal/annotations/fields.js +231 -0
  316. package/lib/esm/internal/annotations/fields.js.map +1 -0
  317. package/lib/esm/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
  318. package/lib/esm/rpc-impl/IModelReadRpcImpl.js +1 -1
  319. package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  320. package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
  321. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  322. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
  323. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
  324. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  325. package/lib/esm/test/AnnotationTestUtils.d.ts +15 -0
  326. package/lib/esm/test/AnnotationTestUtils.d.ts.map +1 -0
  327. package/lib/esm/test/AnnotationTestUtils.js +41 -0
  328. package/lib/esm/test/AnnotationTestUtils.js.map +1 -0
  329. package/lib/esm/test/ElementLRUCache.test.js +224 -1
  330. package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
  331. package/lib/esm/test/IModelTestUtils.d.ts.map +1 -1
  332. package/lib/esm/test/IModelTestUtils.js +1 -0
  333. package/lib/esm/test/IModelTestUtils.js.map +1 -1
  334. package/lib/esm/test/TestUtils.d.ts +1 -1
  335. package/lib/esm/test/TestUtils.d.ts.map +1 -1
  336. package/lib/esm/test/TestUtils.js +1 -1
  337. package/lib/esm/test/TestUtils.js.map +1 -1
  338. package/lib/esm/test/annotations/Fields.test.d.ts +2 -0
  339. package/lib/esm/test/annotations/Fields.test.d.ts.map +1 -0
  340. package/lib/esm/test/annotations/Fields.test.js +576 -0
  341. package/lib/esm/test/annotations/Fields.test.js.map +1 -0
  342. package/lib/esm/test/annotations/FrameGeometry.test.d.ts +2 -0
  343. package/lib/esm/test/annotations/FrameGeometry.test.d.ts.map +1 -0
  344. package/lib/esm/test/annotations/FrameGeometry.test.js +86 -0
  345. package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -0
  346. package/lib/esm/test/annotations/LeaderGeometry.test.d.ts +2 -0
  347. package/lib/esm/test/annotations/LeaderGeometry.test.d.ts.map +1 -0
  348. package/lib/esm/test/annotations/LeaderGeometry.test.js +256 -0
  349. package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -0
  350. package/lib/esm/test/annotations/TextAnnotation.test.js +269 -1047
  351. package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
  352. package/lib/esm/test/annotations/TextBlock.test.d.ts +2 -0
  353. package/lib/esm/test/annotations/TextBlock.test.d.ts.map +1 -0
  354. package/lib/esm/test/annotations/TextBlock.test.js +1199 -0
  355. package/lib/esm/test/annotations/TextBlock.test.js.map +1 -0
  356. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.d.ts +60 -0
  357. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.d.ts.map +1 -0
  358. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js +69 -0
  359. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -0
  360. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.d.ts +1442 -0
  361. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.d.ts.map +1 -0
  362. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js +817 -0
  363. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -0
  364. package/lib/esm/test/ecdb/ConcurrentQuery.test.d.ts +2 -0
  365. package/lib/esm/test/ecdb/ConcurrentQuery.test.d.ts.map +1 -0
  366. package/lib/esm/test/ecdb/ConcurrentQuery.test.js +164 -0
  367. package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -0
  368. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +22 -32
  369. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -1
  370. package/lib/esm/test/ecdb/ECDb.test.js +29 -8
  371. package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
  372. package/lib/esm/test/ecdb/ECSqlQuery.test.js +0 -55
  373. package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
  374. package/lib/esm/test/ecdb/ECSqlStatement.test.js +192 -0
  375. package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
  376. package/lib/esm/test/hubaccess/ApplyChangeset.test.d.ts +2 -0
  377. package/lib/esm/test/hubaccess/ApplyChangeset.test.d.ts.map +1 -0
  378. package/lib/esm/test/hubaccess/ApplyChangeset.test.js +86 -0
  379. package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -0
  380. package/lib/esm/test/imodel/IModel.test.js +313 -5
  381. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  382. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.d.ts +2 -0
  383. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.d.ts.map +1 -0
  384. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js +343 -0
  385. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -0
  386. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.d.ts +2 -0
  387. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.d.ts.map +1 -0
  388. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js +207 -0
  389. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -0
  390. package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.d.ts +11 -0
  391. package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.d.ts.map +1 -0
  392. package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js +36 -0
  393. package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js.map +1 -0
  394. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.d.ts +17 -0
  395. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.d.ts.map +1 -0
  396. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js +116 -0
  397. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js.map +1 -0
  398. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts +9 -0
  399. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts.map +1 -0
  400. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js +20 -0
  401. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js.map +1 -0
  402. package/lib/esm/test/misc/GeoServices.test.js +36 -10
  403. package/lib/esm/test/misc/GeoServices.test.js.map +1 -1
  404. package/lib/esm/test/schema/ClassRegistry.test.js +104 -2
  405. package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
  406. package/lib/esm/test/standalone/ChangesetReader.test.js +547 -136
  407. package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
  408. package/lib/esm/test/standalone/ExportGraphics.test.js +53 -1
  409. package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
  410. package/lib/esm/test/standalone/GeometryStream.test.js +49 -1
  411. package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
  412. package/lib/esm/test/standalone/IModelLimits.test.d.ts +2 -0
  413. package/lib/esm/test/standalone/IModelLimits.test.d.ts.map +1 -0
  414. package/lib/esm/test/standalone/IModelLimits.test.js +103 -0
  415. package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -0
  416. package/lib/esm/test/standalone/RenderMaterialElement.test.js +24 -1
  417. package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
  418. package/lib/esm/test/standalone/SnapshotDb.test.js +19 -1
  419. package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
  420. package/lib/esm/workspace/Workspace.d.ts +0 -1
  421. package/lib/esm/workspace/Workspace.d.ts.map +1 -1
  422. package/lib/esm/workspace/Workspace.js.map +1 -1
  423. package/package.json +22 -16
  424. package/lib/cjs/TextAnnotationElement.d.ts +0 -54
  425. package/lib/cjs/TextAnnotationElement.d.ts.map +0 -1
  426. package/lib/cjs/TextAnnotationElement.js +0 -94
  427. package/lib/cjs/TextAnnotationElement.js.map +0 -1
  428. package/lib/cjs/TextAnnotationGeometry.d.ts +0 -32
  429. package/lib/cjs/TextAnnotationGeometry.d.ts.map +0 -1
  430. package/lib/cjs/TextAnnotationGeometry.js.map +0 -1
  431. package/lib/cjs/TextAnnotationLayout.d.ts.map +0 -1
  432. package/lib/cjs/TextAnnotationLayout.js.map +0 -1
  433. package/lib/esm/TextAnnotationElement.d.ts +0 -54
  434. package/lib/esm/TextAnnotationElement.d.ts.map +0 -1
  435. package/lib/esm/TextAnnotationElement.js +0 -89
  436. package/lib/esm/TextAnnotationElement.js.map +0 -1
  437. package/lib/esm/TextAnnotationGeometry.d.ts +0 -32
  438. package/lib/esm/TextAnnotationGeometry.d.ts.map +0 -1
  439. package/lib/esm/TextAnnotationGeometry.js.map +0 -1
  440. package/lib/esm/TextAnnotationLayout.d.ts.map +0 -1
  441. package/lib/esm/TextAnnotationLayout.js.map +0 -1
@@ -15,7 +15,7 @@ const Element_1 = require("./Element");
15
15
  /** Holds the list of Ids of GeometricModels displayed by a [[SpatialViewDefinition]]. Multiple SpatialViewDefinitions may point to the same ModelSelector.
16
16
  * @see [ModelSelectorState]($frontend)
17
17
  * See [how to create a ModelSelector]$(docs/learning/backend/CreateElements.md#ModelSelector).
18
- * @public
18
+ * @public @preview
19
19
  */
20
20
  class ModelSelector extends Element_1.DefinitionElement {
21
21
  static get className() { return "ModelSelector"; }
@@ -107,7 +107,7 @@ exports.ModelSelector = ModelSelector;
107
107
  /** Holds a list of Ids of Categories to be displayed in a view.
108
108
  * @see [CategorySelectorState]($frontend)
109
109
  * See [how to create a CategorySelector]$(docs/learning/backend/CreateElements.md#CategorySelector).
110
- * @public
110
+ * @public @preview
111
111
  */
112
112
  class CategorySelector extends Element_1.DefinitionElement {
113
113
  static get className() { return "CategorySelector"; }
@@ -201,7 +201,7 @@ exports.CategorySelector = CategorySelector;
201
201
  * plus additional view-specific parameters in their [[Element.jsonProperties]].
202
202
  * Subclasses of ViewDefinition determine which model(s) are viewed.
203
203
  * @note ViewDefinition is only available in the backend. See [ViewState]($frontend) for usage in the frontend.
204
- * @public
204
+ * @public @preview
205
205
  */
206
206
  class ViewDefinition extends Element_1.DefinitionElement {
207
207
  static get className() { return "ViewDefinition"; }
@@ -319,7 +319,7 @@ class ViewDefinition extends Element_1.DefinitionElement {
319
319
  }
320
320
  exports.ViewDefinition = ViewDefinition;
321
321
  /** Defines a view of one or more 3d models.
322
- * @public
322
+ * @public @preview
323
323
  */
324
324
  class ViewDefinition3d extends ViewDefinition {
325
325
  _details;
@@ -421,7 +421,7 @@ exports.ViewDefinition3d = ViewDefinition3d;
421
421
  * * ModelIds -------> SpatialModels <----------GeometricElement3d.Model
422
422
  * * CategorySelector
423
423
  * * CategoryIds -----> SpatialCategories <----------GeometricElement3d.Category
424
- * @public
424
+ * @public @preview
425
425
  */
426
426
  class SpatialViewDefinition extends ViewDefinition3d {
427
427
  static get className() { return "SpatialViewDefinition"; }
@@ -536,7 +536,7 @@ class SpatialViewDefinition extends ViewDefinition3d {
536
536
  exports.SpatialViewDefinition = SpatialViewDefinition;
537
537
  /** Defines a spatial view that displays geometry on the image plane using a parallel orthographic projection.
538
538
  * See [how to create a OrthographicViewDefinition]$(docs/learning/backend/CreateElements.md#OrthographicViewDefinition).
539
- * @public
539
+ * @public @preview
540
540
  */
541
541
  class OrthographicViewDefinition extends SpatialViewDefinition {
542
542
  static get className() { return "OrthographicViewDefinition"; }
@@ -602,7 +602,7 @@ class OrthographicViewDefinition extends SpatialViewDefinition {
602
602
  }
603
603
  exports.OrthographicViewDefinition = OrthographicViewDefinition;
604
604
  /** Defines a view of a single 2d model. Each 2d model has its own coordinate system, so only one may appear per view.
605
- * @public
605
+ * @public @preview
606
606
  */
607
607
  class ViewDefinition2d extends ViewDefinition {
608
608
  _details;
@@ -680,7 +680,7 @@ class ViewDefinition2d extends ViewDefinition {
680
680
  }
681
681
  exports.ViewDefinition2d = ViewDefinition2d;
682
682
  /** Defines a view of a [[DrawingModel]].
683
- * @public
683
+ * @public @preview
684
684
  */
685
685
  class DrawingViewDefinition extends ViewDefinition2d {
686
686
  static get className() { return "DrawingViewDefinition"; }
@@ -732,10 +732,38 @@ class DrawingViewDefinition extends ViewDefinition2d {
732
732
  }
733
733
  exports.DrawingViewDefinition = DrawingViewDefinition;
734
734
  /** Defines a view of a [[SheetModel]].
735
- * @public
735
+ * @public @preview
736
736
  */
737
737
  class SheetViewDefinition extends ViewDefinition2d {
738
738
  static get className() { return "SheetViewDefinition"; }
739
+ constructor(props, iModel) {
740
+ super(props, iModel);
741
+ }
742
+ /** Create a SheetViewDefinition */
743
+ static create(args) {
744
+ const { baseModelId, categorySelectorId, displayStyleId, range } = args;
745
+ const props = {
746
+ classFullName: this.classFullName,
747
+ model: args.definitionModelId,
748
+ code: this.createCode(args.iModel, args.definitionModelId, args.name),
749
+ baseModelId,
750
+ categorySelectorId,
751
+ displayStyleId,
752
+ origin: { x: range.low.x, y: range.low.y },
753
+ delta: range.diagonal(),
754
+ angle: 0,
755
+ };
756
+ return new SheetViewDefinition(props, args.iModel);
757
+ }
758
+ /** Insert a SheetViewDefinition into an IModelDb */
759
+ static insert(args) {
760
+ const view = this.create(args);
761
+ return args.iModel.elements.insertElement(view.toJSON());
762
+ }
763
+ /** Create a SheetViewDefinition from JSON props */
764
+ static fromJSON(props, iModel) {
765
+ return new SheetViewDefinition({ ...props, classFullName: this.classFullName }, iModel);
766
+ }
739
767
  }
740
768
  exports.SheetViewDefinition = SheetViewDefinition;
741
769
  /** A ViewDefinition used to display a 2d template model.
@@ -754,7 +782,7 @@ class TemplateViewDefinition3d extends ViewDefinition3d {
754
782
  exports.TemplateViewDefinition3d = TemplateViewDefinition3d;
755
783
  /** An auxiliary coordinate system element. Auxiliary coordinate systems can be used by views to show
756
784
  * coordinate information in different units and/or orientations.
757
- * @public
785
+ * @public @preview
758
786
  */
759
787
  class AuxCoordSystem extends Element_1.DefinitionElement {
760
788
  static get className() { return "AuxCoordSystem"; }
@@ -768,7 +796,7 @@ class AuxCoordSystem extends Element_1.DefinitionElement {
768
796
  }
769
797
  exports.AuxCoordSystem = AuxCoordSystem;
770
798
  /** A 2d auxiliary coordinate system.
771
- * @public
799
+ * @public @preview
772
800
  */
773
801
  class AuxCoordSystem2d extends AuxCoordSystem {
774
802
  static get className() { return "AuxCoordSystem2d"; }
@@ -791,7 +819,7 @@ class AuxCoordSystem2d extends AuxCoordSystem {
791
819
  }
792
820
  exports.AuxCoordSystem2d = AuxCoordSystem2d;
793
821
  /** A 3d auxiliary coordinate system.
794
- * @public
822
+ * @public @preview
795
823
  */
796
824
  class AuxCoordSystem3d extends AuxCoordSystem {
797
825
  static get className() { return "AuxCoordSystem3d"; }
@@ -818,7 +846,7 @@ class AuxCoordSystem3d extends AuxCoordSystem {
818
846
  }
819
847
  exports.AuxCoordSystem3d = AuxCoordSystem3d;
820
848
  /** A spatial auxiliary coordinate system.
821
- * @public
849
+ * @public @preview
822
850
  */
823
851
  class AuxCoordSystemSpatial extends AuxCoordSystem3d {
824
852
  static get className() { return "AuxCoordSystemSpatial"; }
@@ -834,7 +862,7 @@ class AuxCoordSystemSpatial extends AuxCoordSystem3d {
834
862
  }
835
863
  exports.AuxCoordSystemSpatial = AuxCoordSystemSpatial;
836
864
  /** Represents an *attachment* of a [[ViewDefinition]] to a [[Sheet]].
837
- * @public
865
+ * @public @preview
838
866
  */
839
867
  class ViewAttachment extends Element_1.GraphicalElement2d {
840
868
  static get className() { return "ViewAttachment"; }
@@ -1 +1 @@
1
- {"version":3,"file":"ViewDefinition.js","sourceRoot":"","sources":["../../src/ViewDefinition.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAqG;AACrG,wDAE8B;AAC9B,oDAK4B;AAC5B,uCAA0F;AAM1F;;;;GAIG;AACH,MAAa,aAAc,SAAQ,2BAAiB;IAC3C,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAE1E,mFAAmF;IAC5E,MAAM,CAAe;IAE5B,YAAsB,KAAyB,EAAE,MAAgB;QAC/D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC7B,CAAC;IAEe,MAAM;QACpB,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,EAAwB,CAAC;QACjD,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACzB,OAAO,GAAG,CAAC;IACb,CAAC;IAED;;;;OAIG;IACO,MAAM,CAAmB,mBAAmB,GAA4B;QAChF,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE;KAC5C,CAAC;IAEF;;;;OAIG;IACI,MAAM,CAAU,WAAW,CAAC,KAA4B;QAC7D,MAAM,OAAO,GAAG,KAAK,CAAC,WAAW,CAAC,KAAK,CAAuB,CAAC;QAC/D,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG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AAc,SAAS,KAAa,OAAO,uBAAuB,CAAC,CAAC,CAAC;IAClF;;;;OAIG;IACI,MAAM,CAAU,UAAU,CAAC,MAAgB,EAAE,YAA4B,EAAE,SAAiB;QACjG,MAAM,QAAQ,GAAa,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,yBAAW,CAAC,qBAAqB,CAAC,CAAC;QACzF,OAAO,IAAI,kBAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAChF,CAAC;CACF;AAXD,sDAWC;AAED;;GAEG;AACH,MAAa,cAAe,SAAQ,4BAAkB;IAC7C,MAAM,KAAc,SAAS,KAAa,OAAO,gBAAgB,CAAC,CAAC,CAAC;IACpE,IAAI,CAAiB;IAC5B,YAAmB,KAA0B,EAAE,MAAgB;QAC7D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,4BAAc,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3C,0GAA0G;IAC5G,CAAC;IACkB,mBAAmB,CAAC,YAAgC;QACrE,KAAK,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACxC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxC,CAAC;CACF;AAZD,wCAYC;AAED;;GAEG;AACH,MAAa,aAAc,SAAQ,gCAAsB;IAChD,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAC1E,iDAAiD;IAC1C,OAAO,CAAW;IAEzB,YAAsB,KAAyB,EAAE,MAAgB;QAC/D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IAC/B,CAAC;CACF;AATD,sCASC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ViewDefinitions\n */\n\nimport { DbResult, Id64, Id64Array, Id64String, IModelStatus, JsonUtils } from \"@itwin/core-bentley\";\nimport {\n Angle, Matrix3d, Point2d, Point3d, Range2d, Range3d, StandardViewIndex, Transform, Vector3d, YawPitchRollAngles,\n} from \"@itwin/core-geometry\";\nimport {\n AuxCoordSystem2dProps, AuxCoordSystem3dProps, AuxCoordSystemProps, BisCodeSpec, Camera, CategorySelectorProps, Code, CodeScopeProps,\n CodeSpec, ConcreteEntityTypes, EntityReferenceSet, IModelError, LightLocationProps, ModelSelectorProps, RelatedElement,\n SpatialViewDefinitionProps, ViewAttachmentProps, ViewDefinition2dProps, ViewDefinition3dProps, ViewDefinitionProps, ViewDetails,\n ViewDetails3d,\n} from \"@itwin/core-common\";\nimport { DefinitionElement, GraphicalElement2d, SpatialLocationElement } from \"./Element\";\nimport { IModelDb } from \"./IModelDb\";\nimport { DisplayStyle, DisplayStyle2d, DisplayStyle3d } from \"./DisplayStyle\";\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\nimport { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow } from \"./Entity\";\n\n/** Holds the list of Ids of GeometricModels displayed by a [[SpatialViewDefinition]]. Multiple SpatialViewDefinitions may point to the same ModelSelector.\n * @see [ModelSelectorState]($frontend)\n * See [how to create a ModelSelector]$(docs/learning/backend/CreateElements.md#ModelSelector).\n * @public\n */\nexport class ModelSelector extends DefinitionElement {\n public static override get className(): string { return \"ModelSelector\"; }\n\n /** The array of modelIds of the GeometricModels displayed by this ModelSelector */\n public models: Id64String[];\n\n protected constructor(props: ModelSelectorProps, iModel: IModelDb) {\n super(props, iModel);\n this.models = props.models;\n }\n\n public override toJSON(): ModelSelectorProps {\n const val = super.toJSON() as ModelSelectorProps;\n val.models = this.models;\n return val;\n }\n\n /**\n * ModelSelector custom HandledProps includes 'models'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"models\", source: \"Class\" },\n ];\n\n /**\n * ModelSelector deserializes 'models'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ModelSelectorProps {\n const elProps = super.deserialize(props) as ModelSelectorProps;\n const instance = props.row;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n elProps.models = props.iModel.withPreparedStatement(\"SELECT TargetECInstanceId FROM Bis.ModelSelectorRefersToModels WHERE SourceECInstanceId=?\", (statement) => {\n statement.bindId(1, instance.id);\n const ids: Id64Array = [];\n while (DbResult.BE_SQLITE_ROW === statement.step()) {\n ids.push(statement.getValue(0).getId());\n }\n return ids;\n });\n return elProps;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n this.models.forEach((modelId: Id64String) => referenceIds.addModel(modelId));\n }\n\n /** Create a Code for a ModelSelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the ModelSelector and provides the scope for its name.\n * @param codeValue The ModelSelector name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.modelSelector);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n\n /**\n * Create a ModelSelector to select which Models are displayed by a ViewDefinition.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the ModelSelector\n * @param models Array of models to select for display\n * @returns The newly constructed ModelSelector element.\n * @throws [[IModelError]] if unable to create the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): ModelSelector {\n const modelSelectorProps: ModelSelectorProps = {\n classFullName: this.classFullName,\n code: this.createCode(iModelDb, definitionModelId, name),\n model: definitionModelId,\n models,\n isPrivate: false,\n };\n return new ModelSelector(modelSelectorProps, iModelDb);\n }\n /**\n * Insert a ModelSelector to select which Models are displayed by a ViewDefinition.\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new ModelSelector into this DefinitionModel\n * @param name The name/CodeValue of the ModelSelector\n * @param models Array of models to select for display\n * @returns The Id of the newly inserted ModelSelector element.\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): Id64String {\n const modelSelector = this.create(iModelDb, definitionModelId, name, models);\n return iModelDb.elements.insertElement(modelSelector.toJSON());\n }\n}\n\n/** Holds a list of Ids of Categories to be displayed in a view.\n * @see [CategorySelectorState]($frontend)\n * See [how to create a CategorySelector]$(docs/learning/backend/CreateElements.md#CategorySelector).\n * @public\n */\nexport class CategorySelector extends DefinitionElement {\n public static override get className(): string { return \"CategorySelector\"; }\n /** The array of element Ids of the Categories selected by this CategorySelector */\n public categories: Id64String[];\n\n protected constructor(props: CategorySelectorProps, iModel: IModelDb) {\n super(props, iModel);\n this.categories = props.categories;\n }\n\n public override toJSON(): CategorySelectorProps {\n const val = super.toJSON() as CategorySelectorProps;\n val.categories = this.categories;\n return val;\n }\n\n /**\n * CategorySelector custom HandledProps includes 'categories'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"categories\", source: \"Class\" },\n ];\n\n /**\n * CategorySelector deserializes 'categories'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): CategorySelectorProps {\n const elProps = super.deserialize(props) as CategorySelectorProps;\n const instance = props.row;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n elProps.categories = props.iModel.withPreparedStatement(\"SELECT TargetECInstanceId FROM Bis.CategorySelectorRefersToCategories WHERE SourceECInstanceId=?\", (statement) => {\n statement.bindId(1, instance.id);\n const ids: Id64Array = [];\n while (DbResult.BE_SQLITE_ROW === statement.step()) {\n ids.push(statement.getValue(0).getId());\n }\n return ids;\n });\n return elProps;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n this.categories.forEach((categoryId: Id64String) => referenceIds.addElement(categoryId));\n }\n\n /** Create a Code for a CategorySelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the CategorySelector and provides the scope for its name.\n * @param codeValue The CategorySelector name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.categorySelector);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n\n /**\n * Create a CategorySelector to select which categories are displayed by a ViewDefinition.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name of the CategorySelector\n * @param categories Array of categories to select for display\n * @returns The newly constructed CategorySelector element.\n * @throws [[IModelError]] if unable to create the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): CategorySelector {\n const categorySelectorProps: CategorySelectorProps = {\n classFullName: this.classFullName,\n code: this.createCode(iModelDb, definitionModelId, name),\n model: definitionModelId,\n categories,\n isPrivate: false,\n };\n return new CategorySelector(categorySelectorProps, iModelDb);\n }\n\n /**\n * Insert a CategorySelector to select which categories are displayed by a ViewDefinition.\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new CategorySelector into this DefinitionModel\n * @param name The name of the CategorySelector\n * @param categories Array of categories to select for display\n * @returns The Id of the newly inserted CategorySelector element.\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): Id64String {\n const categorySelector = this.create(iModelDb, definitionModelId, name, categories);\n return iModelDb.elements.insertElement(categorySelector.toJSON());\n }\n}\n\n/**\n * The definition element for a view. ViewDefinitions specify the area/volume that is viewed, the Ids of a DisplayStyle and a CategorySelector,\n * plus additional view-specific parameters in their [[Element.jsonProperties]].\n * Subclasses of ViewDefinition determine which model(s) are viewed.\n * @note ViewDefinition is only available in the backend. See [ViewState]($frontend) for usage in the frontend.\n * @public\n */\nexport abstract class ViewDefinition extends DefinitionElement {\n public static override get className(): string { return \"ViewDefinition\"; }\n /** The element Id of the [[CategorySelector]] for this ViewDefinition */\n public categorySelectorId: Id64String;\n /** The element Id of the [[DisplayStyle]] for this ViewDefinition */\n public displayStyleId: Id64String;\n\n protected constructor(props: ViewDefinitionProps, iModel: IModelDb) {\n super(props, iModel);\n\n this.categorySelectorId = Id64.fromJSON(props.categorySelectorId);\n if (!Id64.isValid(this.categorySelectorId))\n throw new IModelError(IModelStatus.BadArg, `categorySelectorId is invalid`);\n\n this.displayStyleId = Id64.fromJSON(props.displayStyleId);\n if (!Id64.isValid(this.displayStyleId))\n throw new IModelError(IModelStatus.BadArg, `displayStyleId is invalid`);\n }\n\n /**\n * ViewDefinition custom HandledProps includes 'categorySelector', and 'displayStyle'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"categorySelector\", source: \"Class\" },\n { propertyName: \"displayStyle\", source: \"Class\" },\n ];\n\n /**\n * ViewDefinition deserializes 'categorySelector', and 'displayStyle'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinitionProps {\n const elProps = super.deserialize(props) as ViewDefinitionProps;\n const instance = props.row;\n if (instance.isPrivate !== undefined)\n elProps.isPrivate = instance.isPrivate;\n elProps.categorySelectorId = instance.categorySelector.id;\n elProps.displayStyleId = instance.displayStyle.id;\n return elProps;\n }\n\n /**\n * ViewDefinition serializes 'categorySelector', and 'displayStyle'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: ViewDefinitionProps, _iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, _iModel);\n inst.categorySelector.id = props.categorySelectorId;\n inst.displayStyle.id = props.displayStyleId;\n return inst;\n }\n\n public override toJSON(): ViewDefinitionProps {\n const json = super.toJSON() as ViewDefinitionProps;\n json.categorySelectorId = this.categorySelectorId;\n json.displayStyleId = this.displayStyleId;\n return json;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.categorySelectorId);\n referenceIds.addElement(this.displayStyleId);\n const acsId: Id64String = this.getAuxiliaryCoordinateSystemId();\n if (Id64.isValidId64(acsId)) {\n referenceIds.addElement(acsId);\n }\n }\n\n /** @beta */\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"categorySelectorId\", \"displayStyleId\"];\n /** @alpha */\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n ...super.requiredReferenceKeyTypeMap,\n categorySelectorId: ConcreteEntityTypes.Element,\n displayStyleId: ConcreteEntityTypes.Element,\n };\n\n /** @beta */\n protected static override onCloned(context: IModelElementCloneContext, sourceElementProps: ViewDefinitionProps, targetElementProps: ViewDefinitionProps): void {\n super.onCloned(context, sourceElementProps, targetElementProps);\n if (context.isBetweenIModels && targetElementProps.jsonProperties && targetElementProps.jsonProperties.viewDetails) {\n const acsId: Id64String = Id64.fromJSON(targetElementProps.jsonProperties.viewDetails.acs);\n if (Id64.isValidId64(acsId)) {\n targetElementProps.jsonProperties.viewDetails.acs = context.findTargetElementId(acsId);\n }\n }\n }\n\n /** Type guard for `instanceof ViewDefinition3d` */\n public isView3d(): this is ViewDefinition3d { return this instanceof ViewDefinition3d; }\n /** Type guard for 'instanceof ViewDefinition2d` */\n public isView2d(): this is ViewDefinition2d { return this instanceof ViewDefinition2d; }\n /** Type guard for `instanceof SpatialViewDefinition` */\n public isSpatialView(): this is SpatialViewDefinition { return this instanceof SpatialViewDefinition; }\n /** Type guard for 'instanceof DrawingViewDefinition' */\n public isDrawingView(): this is DrawingViewDefinition { return this instanceof DrawingViewDefinition; }\n\n /** Load this view's DisplayStyle from the IModelDb. */\n public loadDisplayStyle(): DisplayStyle { return this.iModel.elements.getElement<DisplayStyle>(this.displayStyleId); }\n\n /** Load this view's CategorySelector from the IModelDb. */\n public loadCategorySelector(): CategorySelector { return this.iModel.elements.getElement<CategorySelector>(this.categorySelectorId); }\n\n /** Provides access to optional detail settings for this view. */\n public abstract get details(): ViewDetails;\n\n /** The Id of the AuxiliaryCoordinateSystem for this ViewDefinition, or an invalid Id if no ACS is defined. */\n public getAuxiliaryCoordinateSystemId(): Id64String {\n return this.details.auxiliaryCoordinateSystemId;\n }\n\n /** Set or clear the AuxiliaryCoordinateSystem for this ViewDefinition.\n * @param acsId The Id of the new AuxiliaryCoordinateSystem. If `Id64.invalid` is passed, then no AuxiliaryCoordinateSystem will be used.\n */\n public setAuxiliaryCoordinateSystemId(acsId: Id64String) {\n this.details.auxiliaryCoordinateSystemId = acsId;\n }\n\n /** Create a Code for a ViewDefinition given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel to contain the ViewDefinition and provides the scope for its name.\n * @param codeValue The ViewDefinition name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.viewDefinition);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Defines a view of one or more 3d models.\n * @public\n */\nexport abstract class ViewDefinition3d extends ViewDefinition {\n private readonly _details: ViewDetails3d;\n public static override get className(): string { return \"ViewDefinition3d\"; }\n /** If true, camera is used. Otherwise, use an orthographic projection. */\n public cameraOn: boolean;\n /** The lower left back corner of the view frustum. */\n public origin: Point3d;\n /** The extent (size) of the view frustum, in meters, along its x,y,z axes. */\n public extents: Vector3d;\n /** Rotation from world coordinates to view coordinates. */\n public angles: YawPitchRollAngles;\n /** The camera used for this view, if `cameraOn` is true. */\n public camera: Camera;\n\n protected constructor(props: ViewDefinition3dProps, iModel: IModelDb) {\n super(props, iModel);\n this.cameraOn = JsonUtils.asBool(props.cameraOn);\n this.origin = Point3d.fromJSON(props.origin);\n this.extents = Vector3d.fromJSON(props.extents);\n this.angles = YawPitchRollAngles.fromJSON(props.angles);\n this.camera = new Camera(props.camera);\n this._details = new ViewDetails3d(this.jsonProperties);\n }\n\n /**\n * ViewDefinition3d custom HandledProps includes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\n * 'origin', 'extents', and 'isCameraOn'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"eyePoint\", source: \"Class\" },\n { propertyName: \"focusDistance\", source: \"Class\" },\n { propertyName: \"lensAngle\", source: \"Class\" },\n { propertyName: \"yaw\", source: \"Class\" },\n { propertyName: \"roll\", source: \"Class\" },\n { propertyName: \"pitch\", source: \"Class\" },\n { propertyName: \"origin\", source: \"Class\" },\n { propertyName: \"extents\", source: \"Class\" },\n { propertyName: \"isCameraOn\", source: \"Class\" },\n ];\n\n /**\n * ViewDefinition3d deserializes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\n * 'origin', 'extents', and 'isCameraOn'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinition3dProps {\n const instance = props.row;\n const elProps = super.deserialize(props) as ViewDefinition3dProps;\n // ViewDefinition3dProps\n elProps.cameraOn = instance.isCameraOn as boolean;\n elProps.origin = [ instance.origin.x, instance.origin.y, instance.origin.z ];\n elProps.extents = [ instance.extents.x, instance.extents.y, instance.extents.z ];\n elProps.camera = { eye: [instance.eyePoint.x, instance.eyePoint.y, instance.eyePoint.z], focusDist: instance.focusDistance, lens: Angle.createRadians(instance.lensAngle).toJSON() };\n elProps.angles = YawPitchRollAngles.createDegrees(instance.yaw ?? 0, instance.pitch ?? 0, instance.roll ?? 0).toJSON();\n return elProps;\n }\n\n /**\n * ViewDefinition3d serializes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\n * 'origin', 'extents', and 'isCameraOn'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: ViewDefinition3dProps, _iModel: IModelDb): ECSqlRow {\n const row = super.serialize(props, _iModel);\n row.isCameraOn = props.cameraOn;\n row.eyePoint = props.camera.eye;\n row.focusDistance = props.camera.focusDist;\n row.lensAngle = props.camera.lens;\n if (props.angles) {\n row.yaw = props.angles.yaw;\n row.roll = props.angles.roll;\n row.pitch = props.angles.pitch;\n }\n return row;\n }\n\n public override toJSON(): ViewDefinition3dProps {\n const val = super.toJSON() as ViewDefinition3dProps;\n val.cameraOn = this.cameraOn;\n val.origin = this.origin;\n val.extents = this.extents;\n val.angles = this.angles;\n val.camera = this.camera;\n return val;\n }\n\n /** Provides access to optional detail settings for this view. */\n public get details(): ViewDetails3d { return this._details; }\n\n /** Load this view's DisplayStyle3d from the IModelDb. */\n public loadDisplayStyle3d(): DisplayStyle3d { return this.iModel.elements.getElement<DisplayStyle3d>(this.displayStyleId); }\n}\n\n/** Defines a view of one or more SpatialModels.\n * The list of viewed models is stored by the ModelSelector.\n *\n * This is how a SpatialViewDefinition selects the elements to display:\n *\n * SpatialViewDefinition\n * * ModelSelector\n * * ModelIds -------> SpatialModels <----------GeometricElement3d.Model\n * * CategorySelector\n * * CategoryIds -----> SpatialCategories <----------GeometricElement3d.Category\n * @public\n */\nexport class SpatialViewDefinition extends ViewDefinition3d {\n public static override get className(): string { return \"SpatialViewDefinition\"; }\n /** The Id of the [[ModelSelector]] for this SpatialViewDefinition. */\n public modelSelectorId: Id64String;\n\n protected constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) {\n super(props, iModel);\n this.modelSelectorId = Id64.fromJSON(props.modelSelectorId);\n if (!Id64.isValid(this.modelSelectorId))\n throw new IModelError(IModelStatus.BadArg, `modelSelectorId is invalid`);\n }\n\n /** Construct a SpatialViewDefinition from its JSON representation. */\n public static fromJSON(props: Omit<SpatialViewDefinitionProps, \"classFullName\">, iModel: IModelDb) {\n return new SpatialViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\n }\n\n public override toJSON(): SpatialViewDefinitionProps {\n const json = super.toJSON() as SpatialViewDefinitionProps;\n json.modelSelectorId = this.modelSelectorId;\n return json;\n }\n\n /**\n * SpatialViewDefinition custom HandledProps includes 'modelSelector'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"modelSelector\", source: \"Class\" },\n ];\n\n /**\n * SpatialViewDefinition deserializes 'modelSelector'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): SpatialViewDefinitionProps {\n const elProps = super.deserialize(props) as SpatialViewDefinitionProps;\n const instance = props.row;\n elProps.modelSelectorId = instance.modelSelector.id;\n return elProps;\n }\n\n /**\n * SpatialViewDefinition serializes 'modelSelector'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: SpatialViewDefinitionProps, _iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, _iModel);\n inst.modelSelector.id = props.modelSelectorId;\n return inst;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.modelSelectorId);\n }\n\n /** @beta */\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"modelSelectorId\"];\n\n /** @alpha */\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n ...super.requiredReferenceKeyTypeMap,\n modelSelectorId: ConcreteEntityTypes.Element,\n };\n\n /** Load this view's ModelSelector from the IModelDb. */\n public loadModelSelector(): ModelSelector { return this.iModel.elements.getElement<ModelSelector>(this.modelSelectorId); }\n /**\n * Create a SpatialViewDefinition with the camera turned on.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @param cameraAngle Camera angle in radians.\n * @returns The newly constructed SpatialViewDefinition element\n * @throws [[IModelError]] if there is a problem creating the view\n */\n public static createWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): SpatialViewDefinition {\n const rotation = Matrix3d.createStandardWorldToView(standardView);\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n const cameraDistance = 2 * (rotatedRange.diagonal().magnitudeXY() / 2.0) / Math.tan(cameraAngle / 2.0);\n const cameraLocation = rotatedRange.diagonalFractionToPoint(.5); // Start at center.\n cameraLocation.z += cameraDistance; // Back up by camera distance.\n rotation.multiplyTransposeVectorInPlace(cameraLocation);\n\n const viewDefinitionProps: SpatialViewDefinitionProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n modelSelectorId,\n categorySelectorId,\n displayStyleId,\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\n extents: rotatedRange.diagonal(),\n angles,\n cameraOn: true,\n camera: { lens: { radians: cameraAngle }, focusDist: cameraDistance, eye: cameraLocation },\n };\n\n return new SpatialViewDefinition(viewDefinitionProps, iModelDb);\n }\n /**\n * Insert an SpatialViewDefinition with the camera turned on.\n * @see [[createWithCamera]] for details.\n * @returns The Id of the newly inserted SpatialViewDefinition element\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insertWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): Id64String {\n const viewDefinition = this.createWithCamera(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView, cameraAngle);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n}\n\n/** Defines a spatial view that displays geometry on the image plane using a parallel orthographic projection.\n * See [how to create a OrthographicViewDefinition]$(docs/learning/backend/CreateElements.md#OrthographicViewDefinition).\n * @public\n */\nexport class OrthographicViewDefinition extends SpatialViewDefinition {\n public static override get className(): string { return \"OrthographicViewDefinition\"; }\n\n constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) { super(props, iModel); }\n\n /**\n * Create an OrthographicViewDefinition\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @returns The newly constructed OrthographicViewDefinition element\n * @throws [[IModelError]] if there is a problem creating the view\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): OrthographicViewDefinition {\n const rotation = Matrix3d.createStandardWorldToView(standardView);\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n const viewDefinitionProps: SpatialViewDefinitionProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n modelSelectorId,\n categorySelectorId,\n displayStyleId,\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\n extents: rotatedRange.diagonal(),\n angles,\n cameraOn: false,\n camera: new Camera(), // not used when cameraOn === false\n };\n return new OrthographicViewDefinition(viewDefinitionProps, iModelDb);\n }\n\n /**\n * Insert an OrthographicViewDefinition\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new OrthographicViewDefinition into this DefinitionModel\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @returns The Id of the newly inserted OrthographicViewDefinition element\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): Id64String {\n const viewDefinition = this.create(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n\n /** Set a new viewed range without changing the rotation or any other properties. */\n public setRange(range: Range3d): void {\n const rotation = this.angles.toMatrix3d();\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n this.origin = Point3d.createFrom(rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z));\n this.extents = rotatedRange.diagonal();\n }\n}\n\n/** Defines a view of a single 2d model. Each 2d model has its own coordinate system, so only one may appear per view.\n * @public\n */\nexport class ViewDefinition2d extends ViewDefinition {\n private readonly _details: ViewDetails;\n\n public static override get className(): string { return \"ViewDefinition2d\"; }\n /** The Id of the Model displayed by this view. */\n public baseModelId: Id64String;\n /** The lower-left corner of this view in Model coordinates. */\n public origin: Point2d;\n /** The delta (size) of this view, in meters, aligned with view x,y. */\n public delta: Point2d;\n /** The rotation of this view. */\n public angle: Angle;\n\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\n super(props, iModel);\n this.baseModelId = Id64.fromJSON(props.baseModelId);\n this.origin = Point2d.fromJSON(props.origin);\n this.delta = Point2d.fromJSON(props.delta);\n this.angle = Angle.fromJSON(props.angle);\n this._details = new ViewDetails(this.jsonProperties);\n }\n\n public override toJSON(): ViewDefinition2dProps {\n const val = super.toJSON() as ViewDefinition2dProps;\n val.baseModelId = this.baseModelId;\n val.origin = this.origin;\n val.delta = this.delta;\n val.angle = this.angle;\n return val;\n }\n\n /**\n * ViewDefinition2d custom HandledProps includes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"baseModel\", source: \"Class\" },\n { propertyName: \"origin\", source: \"Class\" },\n { propertyName: \"extents\", source: \"Class\" },\n { propertyName: \"rotationAngle\", source: \"Class\" },\n ];\n\n /**\n * ViewDefinition2d deserializes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinition2dProps {\n const elProps = super.deserialize(props) as ViewDefinition2dProps;\n const instance = props.row;\n elProps.baseModelId = instance.baseModel.id;\n elProps.origin = [ instance.origin.x, instance.origin.y ];\n elProps.delta = [ instance.extents.x, instance.extents.y ];\n elProps.angle = instance.rotationAngle;\n return elProps;\n }\n\n /**\n * ViewDefinition2d serializes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: ViewDefinition2dProps, _iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, _iModel);\n inst.baseModel.id = props.baseModelId;\n inst.origin = props.origin;\n inst.extents = props.delta;\n inst.rotationAngle = props.angle;\n return inst;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.baseModelId);\n }\n\n /** Provides access to optional detail settings for this view. */\n public get details(): ViewDetails { return this._details; }\n\n /** Load this view's DisplayStyle2d from the IModelDb. */\n public loadDisplayStyle2d(): DisplayStyle2d { return this.iModel.elements.getElement<DisplayStyle2d>(this.displayStyleId); }\n}\n\n/** Defines a view of a [[DrawingModel]].\n * @public\n */\nexport class DrawingViewDefinition extends ViewDefinition2d {\n public static override get className(): string { return \"DrawingViewDefinition\"; }\n\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\n super(props, iModel);\n }\n\n /** Create a DrawingViewDefinition\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param baseModelId The base [[DrawingModel]]\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\n * @param range Defines the view origin and extents\n * @throws [[IModelError]] if there is a problem creating the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): DrawingViewDefinition {\n const viewDefinitionProps: ViewDefinition2dProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n baseModelId,\n categorySelectorId,\n displayStyleId,\n origin: { x: range.low.x, y: range.low.y },\n delta: range.diagonal(),\n angle: 0,\n };\n return new DrawingViewDefinition(viewDefinitionProps, iModelDb);\n }\n\n /** Construct a DrawingViewDefinition from its JSON representation. */\n public static fromJSON(props: Omit<ViewDefinition2dProps, \"classFullName\">, iModel: IModelDb) {\n return new DrawingViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\n }\n\n /** Insert a DrawingViewDefinition\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new DrawingViewDefinition into this [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param baseModelId The base [[DrawingModel]]\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\n * @param range Defines the view origin and extents\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): Id64String {\n const viewDefinition = this.create(iModelDb, definitionModelId, name, baseModelId, categorySelectorId, displayStyleId, range);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n}\n\n/** Defines a view of a [[SheetModel]].\n * @public\n */\nexport class SheetViewDefinition extends ViewDefinition2d {\n public static override get className(): string { return \"SheetViewDefinition\"; }\n}\n\n/** A ViewDefinition used to display a 2d template model.\n * @internal\n */\nexport class TemplateViewDefinition2d extends ViewDefinition2d {\n public static override get className(): string { return \"TemplateViewDefinition2d\"; }\n}\n\n/** A ViewDefinition used to display a 3d template model.\n * @internal\n */\nexport class TemplateViewDefinition3d extends ViewDefinition3d {\n public static override get className(): string { return \"TemplateViewDefinition3d\"; }\n}\n\n/** An auxiliary coordinate system element. Auxiliary coordinate systems can be used by views to show\n * coordinate information in different units and/or orientations.\n * @public\n */\nexport abstract class AuxCoordSystem extends DefinitionElement {\n public static override get className(): string { return \"AuxCoordSystem\"; }\n public type?: number;\n public description?: string;\n public constructor(props: AuxCoordSystemProps, iModel: IModelDb) {\n super(props, iModel);\n this.type = props.type;\n this.description = props.description;\n }\n}\n\n/** A 2d auxiliary coordinate system.\n * @public\n */\nexport class AuxCoordSystem2d extends AuxCoordSystem {\n public static override get className(): string { return \"AuxCoordSystem2d\"; }\n public origin?: Point2d;\n public angle?: number;\n public constructor(props: AuxCoordSystem2dProps, iModel: IModelDb) {\n super(props, iModel);\n this.origin = props.origin ? Point2d.fromJSON(props.origin) : undefined;\n this.angle = props.angle ? Angle.fromJSON(props.angle).degrees : undefined;\n }\n\n /** Create a Code for a AuxCoordSystem2d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem2d element and provides the scope for its name.\n * @param codeValue The AuxCoordSystem2d name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem2d);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A 3d auxiliary coordinate system.\n * @public\n */\nexport class AuxCoordSystem3d extends AuxCoordSystem {\n public static override get className(): string { return \"AuxCoordSystem3d\"; }\n public origin?: Point3d;\n public yaw?: number;\n public pitch?: number;\n public roll?: number;\n public constructor(props: AuxCoordSystem3dProps, iModel: IModelDb) {\n super(props, iModel);\n this.origin = props.origin ? Point3d.fromJSON(props.origin) : undefined;\n this.yaw = props.yaw ? Angle.fromJSON(props.yaw).degrees : undefined;\n this.pitch = props.pitch ? Angle.fromJSON(props.pitch).degrees : undefined;\n this.roll = props.roll ? Angle.fromJSON(props.roll).degrees : undefined;\n }\n\n /** Create a Code for a AuxCoordSystem3d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem3d element and provides the scope for its name.\n * @param codeValue The AuxCoordSystem3d name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem3d);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A spatial auxiliary coordinate system.\n * @public\n */\nexport class AuxCoordSystemSpatial extends AuxCoordSystem3d {\n public static override get className(): string { return \"AuxCoordSystemSpatial\"; }\n /** Create a Code for a AuxCoordSystemSpatial element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystemSpatial element and provides the scope for its name.\n * @param codeValue The AuxCoordSystemSpatial name\n */\n public static override createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystemSpatial);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Represents an *attachment* of a [[ViewDefinition]] to a [[Sheet]].\n * @public\n */\nexport class ViewAttachment extends GraphicalElement2d {\n public static override get className(): string { return \"ViewAttachment\"; }\n public view: RelatedElement;\n public constructor(props: ViewAttachmentProps, iModel: IModelDb) {\n super(props, iModel);\n this.view = new RelatedElement(props.view);\n // ###NOTE: scale, displayPriority, and clipping vectors are stored in ViewAttachmentProps.jsonProperties.\n }\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.view.id);\n }\n}\n\n/** The position in space of a Light.\n * @internal\n */\nexport class LightLocation extends SpatialLocationElement {\n public static override get className(): string { return \"LightLocation\"; }\n /** Whether this light is currently turned on. */\n public enabled?: boolean;\n\n protected constructor(props: LightLocationProps, iModel: IModelDb) {\n super(props, iModel);\n this.enabled = props.enabled;\n }\n}\n"]}
1
+ {"version":3,"file":"ViewDefinition.js","sourceRoot":"","sources":["../../src/ViewDefinition.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAqG;AACrG,wDAE8B;AAC9B,oDAK4B;AAC5B,uCAA0F;AAM1F;;;;GAIG;AACH,MAAa,aAAc,SAAQ,2BAAiB;IAC3C,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAE1E,mFAAmF;IAC5E,MAAM,CAAe;IAE5B,YAAsB,KAAyB,EAAE,MAAgB;QAC/D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC7B,CAAC;IAEe,MAAM;QACpB,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,EAAwB,CAAC;QACjD,GAAG,CAAC,MAAM,GAAG,IAAI,C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,gCAAsB;IAChD,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAC1E,iDAAiD;IAC1C,OAAO,CAAW;IAEzB,YAAsB,KAAyB,EAAE,MAAgB;QAC/D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IAC/B,CAAC;CACF;AATD,sCASC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ViewDefinitions\n */\n\nimport { DbResult, Id64, Id64Array, Id64String, IModelStatus, JsonUtils } from \"@itwin/core-bentley\";\nimport {\n Angle, Matrix3d, Point2d, Point3d, Range2d, Range3d, StandardViewIndex, Transform, Vector3d, YawPitchRollAngles,\n} from \"@itwin/core-geometry\";\nimport {\n AuxCoordSystem2dProps, AuxCoordSystem3dProps, AuxCoordSystemProps, BisCodeSpec, Camera, CategorySelectorProps, Code, CodeScopeProps,\n CodeSpec, ConcreteEntityTypes, EntityReferenceSet, IModelError, LightLocationProps, ModelSelectorProps, RelatedElement,\n SpatialViewDefinitionProps, ViewAttachmentProps, ViewDefinition2dProps, ViewDefinition3dProps, ViewDefinitionProps, ViewDetails,\n ViewDetails3d,\n} from \"@itwin/core-common\";\nimport { DefinitionElement, GraphicalElement2d, SpatialLocationElement } from \"./Element\";\nimport { IModelDb } from \"./IModelDb\";\nimport { DisplayStyle, DisplayStyle2d, DisplayStyle3d } from \"./DisplayStyle\";\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\nimport { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow } from \"./Entity\";\n\n/** Holds the list of Ids of GeometricModels displayed by a [[SpatialViewDefinition]]. Multiple SpatialViewDefinitions may point to the same ModelSelector.\n * @see [ModelSelectorState]($frontend)\n * See [how to create a ModelSelector]$(docs/learning/backend/CreateElements.md#ModelSelector).\n * @public @preview\n */\nexport class ModelSelector extends DefinitionElement {\n public static override get className(): string { return \"ModelSelector\"; }\n\n /** The array of modelIds of the GeometricModels displayed by this ModelSelector */\n public models: Id64String[];\n\n protected constructor(props: ModelSelectorProps, iModel: IModelDb) {\n super(props, iModel);\n this.models = props.models;\n }\n\n public override toJSON(): ModelSelectorProps {\n const val = super.toJSON() as ModelSelectorProps;\n val.models = this.models;\n return val;\n }\n\n /**\n * ModelSelector custom HandledProps includes 'models'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"models\", source: \"Class\" },\n ];\n\n /**\n * ModelSelector deserializes 'models'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ModelSelectorProps {\n const elProps = super.deserialize(props) as ModelSelectorProps;\n const instance = props.row;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n elProps.models = props.iModel.withPreparedStatement(\"SELECT TargetECInstanceId FROM Bis.ModelSelectorRefersToModels WHERE SourceECInstanceId=?\", (statement) => {\n statement.bindId(1, instance.id);\n const ids: Id64Array = [];\n while (DbResult.BE_SQLITE_ROW === statement.step()) {\n ids.push(statement.getValue(0).getId());\n }\n return ids;\n });\n return elProps;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n this.models.forEach((modelId: Id64String) => referenceIds.addModel(modelId));\n }\n\n /** Create a Code for a ModelSelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the ModelSelector and provides the scope for its name.\n * @param codeValue The ModelSelector name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.modelSelector);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n\n /**\n * Create a ModelSelector to select which Models are displayed by a ViewDefinition.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the ModelSelector\n * @param models Array of models to select for display\n * @returns The newly constructed ModelSelector element.\n * @throws [[IModelError]] if unable to create the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): ModelSelector {\n const modelSelectorProps: ModelSelectorProps = {\n classFullName: this.classFullName,\n code: this.createCode(iModelDb, definitionModelId, name),\n model: definitionModelId,\n models,\n isPrivate: false,\n };\n return new ModelSelector(modelSelectorProps, iModelDb);\n }\n /**\n * Insert a ModelSelector to select which Models are displayed by a ViewDefinition.\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new ModelSelector into this DefinitionModel\n * @param name The name/CodeValue of the ModelSelector\n * @param models Array of models to select for display\n * @returns The Id of the newly inserted ModelSelector element.\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): Id64String {\n const modelSelector = this.create(iModelDb, definitionModelId, name, models);\n return iModelDb.elements.insertElement(modelSelector.toJSON());\n }\n}\n\n/** Holds a list of Ids of Categories to be displayed in a view.\n * @see [CategorySelectorState]($frontend)\n * See [how to create a CategorySelector]$(docs/learning/backend/CreateElements.md#CategorySelector).\n * @public @preview\n */\nexport class CategorySelector extends DefinitionElement {\n public static override get className(): string { return \"CategorySelector\"; }\n /** The array of element Ids of the Categories selected by this CategorySelector */\n public categories: Id64String[];\n\n protected constructor(props: CategorySelectorProps, iModel: IModelDb) {\n super(props, iModel);\n this.categories = props.categories;\n }\n\n public override toJSON(): CategorySelectorProps {\n const val = super.toJSON() as CategorySelectorProps;\n val.categories = this.categories;\n return val;\n }\n\n /**\n * CategorySelector custom HandledProps includes 'categories'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"categories\", source: \"Class\" },\n ];\n\n /**\n * CategorySelector deserializes 'categories'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): CategorySelectorProps {\n const elProps = super.deserialize(props) as CategorySelectorProps;\n const instance = props.row;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n elProps.categories = props.iModel.withPreparedStatement(\"SELECT TargetECInstanceId FROM Bis.CategorySelectorRefersToCategories WHERE SourceECInstanceId=?\", (statement) => {\n statement.bindId(1, instance.id);\n const ids: Id64Array = [];\n while (DbResult.BE_SQLITE_ROW === statement.step()) {\n ids.push(statement.getValue(0).getId());\n }\n return ids;\n });\n return elProps;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n this.categories.forEach((categoryId: Id64String) => referenceIds.addElement(categoryId));\n }\n\n /** Create a Code for a CategorySelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the CategorySelector and provides the scope for its name.\n * @param codeValue The CategorySelector name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.categorySelector);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n\n /**\n * Create a CategorySelector to select which categories are displayed by a ViewDefinition.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name of the CategorySelector\n * @param categories Array of categories to select for display\n * @returns The newly constructed CategorySelector element.\n * @throws [[IModelError]] if unable to create the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): CategorySelector {\n const categorySelectorProps: CategorySelectorProps = {\n classFullName: this.classFullName,\n code: this.createCode(iModelDb, definitionModelId, name),\n model: definitionModelId,\n categories,\n isPrivate: false,\n };\n return new CategorySelector(categorySelectorProps, iModelDb);\n }\n\n /**\n * Insert a CategorySelector to select which categories are displayed by a ViewDefinition.\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new CategorySelector into this DefinitionModel\n * @param name The name of the CategorySelector\n * @param categories Array of categories to select for display\n * @returns The Id of the newly inserted CategorySelector element.\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): Id64String {\n const categorySelector = this.create(iModelDb, definitionModelId, name, categories);\n return iModelDb.elements.insertElement(categorySelector.toJSON());\n }\n}\n\n/**\n * The definition element for a view. ViewDefinitions specify the area/volume that is viewed, the Ids of a DisplayStyle and a CategorySelector,\n * plus additional view-specific parameters in their [[Element.jsonProperties]].\n * Subclasses of ViewDefinition determine which model(s) are viewed.\n * @note ViewDefinition is only available in the backend. See [ViewState]($frontend) for usage in the frontend.\n * @public @preview\n */\nexport abstract class ViewDefinition extends DefinitionElement {\n public static override get className(): string { return \"ViewDefinition\"; }\n /** The element Id of the [[CategorySelector]] for this ViewDefinition */\n public categorySelectorId: Id64String;\n /** The element Id of the [[DisplayStyle]] for this ViewDefinition */\n public displayStyleId: Id64String;\n\n protected constructor(props: ViewDefinitionProps, iModel: IModelDb) {\n super(props, iModel);\n\n this.categorySelectorId = Id64.fromJSON(props.categorySelectorId);\n if (!Id64.isValid(this.categorySelectorId))\n throw new IModelError(IModelStatus.BadArg, `categorySelectorId is invalid`);\n\n this.displayStyleId = Id64.fromJSON(props.displayStyleId);\n if (!Id64.isValid(this.displayStyleId))\n throw new IModelError(IModelStatus.BadArg, `displayStyleId is invalid`);\n }\n\n /**\n * ViewDefinition custom HandledProps includes 'categorySelector', and 'displayStyle'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"categorySelector\", source: \"Class\" },\n { propertyName: \"displayStyle\", source: \"Class\" },\n ];\n\n /**\n * ViewDefinition deserializes 'categorySelector', and 'displayStyle'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinitionProps {\n const elProps = super.deserialize(props) as ViewDefinitionProps;\n const instance = props.row;\n if (instance.isPrivate !== undefined)\n elProps.isPrivate = instance.isPrivate;\n elProps.categorySelectorId = instance.categorySelector.id;\n elProps.displayStyleId = instance.displayStyle.id;\n return elProps;\n }\n\n /**\n * ViewDefinition serializes 'categorySelector', and 'displayStyle'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: ViewDefinitionProps, _iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, _iModel);\n inst.categorySelector.id = props.categorySelectorId;\n inst.displayStyle.id = props.displayStyleId;\n return inst;\n }\n\n public override toJSON(): ViewDefinitionProps {\n const json = super.toJSON() as ViewDefinitionProps;\n json.categorySelectorId = this.categorySelectorId;\n json.displayStyleId = this.displayStyleId;\n return json;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.categorySelectorId);\n referenceIds.addElement(this.displayStyleId);\n const acsId: Id64String = this.getAuxiliaryCoordinateSystemId();\n if (Id64.isValidId64(acsId)) {\n referenceIds.addElement(acsId);\n }\n }\n\n /** @beta */\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"categorySelectorId\", \"displayStyleId\"];\n /** @alpha */\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n ...super.requiredReferenceKeyTypeMap,\n categorySelectorId: ConcreteEntityTypes.Element,\n displayStyleId: ConcreteEntityTypes.Element,\n };\n\n /** @beta */\n protected static override onCloned(context: IModelElementCloneContext, sourceElementProps: ViewDefinitionProps, targetElementProps: ViewDefinitionProps): void {\n super.onCloned(context, sourceElementProps, targetElementProps);\n if (context.isBetweenIModels && targetElementProps.jsonProperties && targetElementProps.jsonProperties.viewDetails) {\n const acsId: Id64String = Id64.fromJSON(targetElementProps.jsonProperties.viewDetails.acs);\n if (Id64.isValidId64(acsId)) {\n targetElementProps.jsonProperties.viewDetails.acs = context.findTargetElementId(acsId);\n }\n }\n }\n\n /** Type guard for `instanceof ViewDefinition3d` */\n public isView3d(): this is ViewDefinition3d { return this instanceof ViewDefinition3d; }\n /** Type guard for 'instanceof ViewDefinition2d` */\n public isView2d(): this is ViewDefinition2d { return this instanceof ViewDefinition2d; }\n /** Type guard for `instanceof SpatialViewDefinition` */\n public isSpatialView(): this is SpatialViewDefinition { return this instanceof SpatialViewDefinition; }\n /** Type guard for 'instanceof DrawingViewDefinition' */\n public isDrawingView(): this is DrawingViewDefinition { return this instanceof DrawingViewDefinition; }\n\n /** Load this view's DisplayStyle from the IModelDb. */\n public loadDisplayStyle(): DisplayStyle { return this.iModel.elements.getElement<DisplayStyle>(this.displayStyleId); }\n\n /** Load this view's CategorySelector from the IModelDb. */\n public loadCategorySelector(): CategorySelector { return this.iModel.elements.getElement<CategorySelector>(this.categorySelectorId); }\n\n /** Provides access to optional detail settings for this view. */\n public abstract get details(): ViewDetails;\n\n /** The Id of the AuxiliaryCoordinateSystem for this ViewDefinition, or an invalid Id if no ACS is defined. */\n public getAuxiliaryCoordinateSystemId(): Id64String {\n return this.details.auxiliaryCoordinateSystemId;\n }\n\n /** Set or clear the AuxiliaryCoordinateSystem for this ViewDefinition.\n * @param acsId The Id of the new AuxiliaryCoordinateSystem. If `Id64.invalid` is passed, then no AuxiliaryCoordinateSystem will be used.\n */\n public setAuxiliaryCoordinateSystemId(acsId: Id64String) {\n this.details.auxiliaryCoordinateSystemId = acsId;\n }\n\n /** Create a Code for a ViewDefinition given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel to contain the ViewDefinition and provides the scope for its name.\n * @param codeValue The ViewDefinition name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.viewDefinition);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Defines a view of one or more 3d models.\n * @public @preview\n */\nexport abstract class ViewDefinition3d extends ViewDefinition {\n private readonly _details: ViewDetails3d;\n public static override get className(): string { return \"ViewDefinition3d\"; }\n /** If true, camera is used. Otherwise, use an orthographic projection. */\n public cameraOn: boolean;\n /** The lower left back corner of the view frustum. */\n public origin: Point3d;\n /** The extent (size) of the view frustum, in meters, along its x,y,z axes. */\n public extents: Vector3d;\n /** Rotation from world coordinates to view coordinates. */\n public angles: YawPitchRollAngles;\n /** The camera used for this view, if `cameraOn` is true. */\n public camera: Camera;\n\n protected constructor(props: ViewDefinition3dProps, iModel: IModelDb) {\n super(props, iModel);\n this.cameraOn = JsonUtils.asBool(props.cameraOn);\n this.origin = Point3d.fromJSON(props.origin);\n this.extents = Vector3d.fromJSON(props.extents);\n this.angles = YawPitchRollAngles.fromJSON(props.angles);\n this.camera = new Camera(props.camera);\n this._details = new ViewDetails3d(this.jsonProperties);\n }\n\n /**\n * ViewDefinition3d custom HandledProps includes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\n * 'origin', 'extents', and 'isCameraOn'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"eyePoint\", source: \"Class\" },\n { propertyName: \"focusDistance\", source: \"Class\" },\n { propertyName: \"lensAngle\", source: \"Class\" },\n { propertyName: \"yaw\", source: \"Class\" },\n { propertyName: \"roll\", source: \"Class\" },\n { propertyName: \"pitch\", source: \"Class\" },\n { propertyName: \"origin\", source: \"Class\" },\n { propertyName: \"extents\", source: \"Class\" },\n { propertyName: \"isCameraOn\", source: \"Class\" },\n ];\n\n /**\n * ViewDefinition3d deserializes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\n * 'origin', 'extents', and 'isCameraOn'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinition3dProps {\n const instance = props.row;\n const elProps = super.deserialize(props) as ViewDefinition3dProps;\n // ViewDefinition3dProps\n elProps.cameraOn = instance.isCameraOn as boolean;\n elProps.origin = [ instance.origin.x, instance.origin.y, instance.origin.z ];\n elProps.extents = [ instance.extents.x, instance.extents.y, instance.extents.z ];\n elProps.camera = { eye: [instance.eyePoint.x, instance.eyePoint.y, instance.eyePoint.z], focusDist: instance.focusDistance, lens: Angle.createRadians(instance.lensAngle).toJSON() };\n elProps.angles = YawPitchRollAngles.createDegrees(instance.yaw ?? 0, instance.pitch ?? 0, instance.roll ?? 0).toJSON();\n return elProps;\n }\n\n /**\n * ViewDefinition3d serializes 'eyePoint', 'focusDistance', 'lensAngle', 'yaw', 'pitch', 'roll',\n * 'origin', 'extents', and 'isCameraOn'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: ViewDefinition3dProps, _iModel: IModelDb): ECSqlRow {\n const row = super.serialize(props, _iModel);\n row.isCameraOn = props.cameraOn;\n row.eyePoint = props.camera.eye;\n row.focusDistance = props.camera.focusDist;\n row.lensAngle = props.camera.lens;\n if (props.angles) {\n row.yaw = props.angles.yaw;\n row.roll = props.angles.roll;\n row.pitch = props.angles.pitch;\n }\n return row;\n }\n\n public override toJSON(): ViewDefinition3dProps {\n const val = super.toJSON() as ViewDefinition3dProps;\n val.cameraOn = this.cameraOn;\n val.origin = this.origin;\n val.extents = this.extents;\n val.angles = this.angles;\n val.camera = this.camera;\n return val;\n }\n\n /** Provides access to optional detail settings for this view. */\n public get details(): ViewDetails3d { return this._details; }\n\n /** Load this view's DisplayStyle3d from the IModelDb. */\n public loadDisplayStyle3d(): DisplayStyle3d { return this.iModel.elements.getElement<DisplayStyle3d>(this.displayStyleId); }\n}\n\n/** Defines a view of one or more SpatialModels.\n * The list of viewed models is stored by the ModelSelector.\n *\n * This is how a SpatialViewDefinition selects the elements to display:\n *\n * SpatialViewDefinition\n * * ModelSelector\n * * ModelIds -------> SpatialModels <----------GeometricElement3d.Model\n * * CategorySelector\n * * CategoryIds -----> SpatialCategories <----------GeometricElement3d.Category\n * @public @preview\n */\nexport class SpatialViewDefinition extends ViewDefinition3d {\n public static override get className(): string { return \"SpatialViewDefinition\"; }\n /** The Id of the [[ModelSelector]] for this SpatialViewDefinition. */\n public modelSelectorId: Id64String;\n\n protected constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) {\n super(props, iModel);\n this.modelSelectorId = Id64.fromJSON(props.modelSelectorId);\n if (!Id64.isValid(this.modelSelectorId))\n throw new IModelError(IModelStatus.BadArg, `modelSelectorId is invalid`);\n }\n\n /** Construct a SpatialViewDefinition from its JSON representation. */\n public static fromJSON(props: Omit<SpatialViewDefinitionProps, \"classFullName\">, iModel: IModelDb) {\n return new SpatialViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\n }\n\n public override toJSON(): SpatialViewDefinitionProps {\n const json = super.toJSON() as SpatialViewDefinitionProps;\n json.modelSelectorId = this.modelSelectorId;\n return json;\n }\n\n /**\n * SpatialViewDefinition custom HandledProps includes 'modelSelector'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"modelSelector\", source: \"Class\" },\n ];\n\n /**\n * SpatialViewDefinition deserializes 'modelSelector'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): SpatialViewDefinitionProps {\n const elProps = super.deserialize(props) as SpatialViewDefinitionProps;\n const instance = props.row;\n elProps.modelSelectorId = instance.modelSelector.id;\n return elProps;\n }\n\n /**\n * SpatialViewDefinition serializes 'modelSelector'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: SpatialViewDefinitionProps, _iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, _iModel);\n inst.modelSelector.id = props.modelSelectorId;\n return inst;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.modelSelectorId);\n }\n\n /** @beta */\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"modelSelectorId\"];\n\n /** @alpha */\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n ...super.requiredReferenceKeyTypeMap,\n modelSelectorId: ConcreteEntityTypes.Element,\n };\n\n /** Load this view's ModelSelector from the IModelDb. */\n public loadModelSelector(): ModelSelector { return this.iModel.elements.getElement<ModelSelector>(this.modelSelectorId); }\n /**\n * Create a SpatialViewDefinition with the camera turned on.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @param cameraAngle Camera angle in radians.\n * @returns The newly constructed SpatialViewDefinition element\n * @throws [[IModelError]] if there is a problem creating the view\n */\n public static createWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): SpatialViewDefinition {\n const rotation = Matrix3d.createStandardWorldToView(standardView);\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n const cameraDistance = 2 * (rotatedRange.diagonal().magnitudeXY() / 2.0) / Math.tan(cameraAngle / 2.0);\n const cameraLocation = rotatedRange.diagonalFractionToPoint(.5); // Start at center.\n cameraLocation.z += cameraDistance; // Back up by camera distance.\n rotation.multiplyTransposeVectorInPlace(cameraLocation);\n\n const viewDefinitionProps: SpatialViewDefinitionProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n modelSelectorId,\n categorySelectorId,\n displayStyleId,\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\n extents: rotatedRange.diagonal(),\n angles,\n cameraOn: true,\n camera: { lens: { radians: cameraAngle }, focusDist: cameraDistance, eye: cameraLocation },\n };\n\n return new SpatialViewDefinition(viewDefinitionProps, iModelDb);\n }\n /**\n * Insert an SpatialViewDefinition with the camera turned on.\n * @see [[createWithCamera]] for details.\n * @returns The Id of the newly inserted SpatialViewDefinition element\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insertWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): Id64String {\n const viewDefinition = this.createWithCamera(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView, cameraAngle);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n}\n\n/** Defines a spatial view that displays geometry on the image plane using a parallel orthographic projection.\n * See [how to create a OrthographicViewDefinition]$(docs/learning/backend/CreateElements.md#OrthographicViewDefinition).\n * @public @preview\n */\nexport class OrthographicViewDefinition extends SpatialViewDefinition {\n public static override get className(): string { return \"OrthographicViewDefinition\"; }\n\n constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) { super(props, iModel); }\n\n /**\n * Create an OrthographicViewDefinition\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @returns The newly constructed OrthographicViewDefinition element\n * @throws [[IModelError]] if there is a problem creating the view\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): OrthographicViewDefinition {\n const rotation = Matrix3d.createStandardWorldToView(standardView);\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n const viewDefinitionProps: SpatialViewDefinitionProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n modelSelectorId,\n categorySelectorId,\n displayStyleId,\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\n extents: rotatedRange.diagonal(),\n angles,\n cameraOn: false,\n camera: new Camera(), // not used when cameraOn === false\n };\n return new OrthographicViewDefinition(viewDefinitionProps, iModelDb);\n }\n\n /**\n * Insert an OrthographicViewDefinition\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new OrthographicViewDefinition into this DefinitionModel\n * @param name The name/CodeValue of the view\n * @param modelSelectorId The [[ModelSelector]] that this view should use\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\n * @param range Defines the view origin and extents\n * @param standardView Optionally defines the view's rotation\n * @returns The Id of the newly inserted OrthographicViewDefinition element\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): Id64String {\n const viewDefinition = this.create(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n\n /** Set a new viewed range without changing the rotation or any other properties. */\n public setRange(range: Range3d): void {\n const rotation = this.angles.toMatrix3d();\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\n const rotatedRange = rotationTransform.multiplyRange(range);\n this.origin = Point3d.createFrom(rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z));\n this.extents = rotatedRange.diagonal();\n }\n}\n\n/** Defines a view of a single 2d model. Each 2d model has its own coordinate system, so only one may appear per view.\n * @public @preview\n */\nexport class ViewDefinition2d extends ViewDefinition {\n private readonly _details: ViewDetails;\n\n public static override get className(): string { return \"ViewDefinition2d\"; }\n /** The Id of the Model displayed by this view. */\n public baseModelId: Id64String;\n /** The lower-left corner of this view in Model coordinates. */\n public origin: Point2d;\n /** The delta (size) of this view, in meters, aligned with view x,y. */\n public delta: Point2d;\n /** The rotation of this view. */\n public angle: Angle;\n\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\n super(props, iModel);\n this.baseModelId = Id64.fromJSON(props.baseModelId);\n this.origin = Point2d.fromJSON(props.origin);\n this.delta = Point2d.fromJSON(props.delta);\n this.angle = Angle.fromJSON(props.angle);\n this._details = new ViewDetails(this.jsonProperties);\n }\n\n public override toJSON(): ViewDefinition2dProps {\n const val = super.toJSON() as ViewDefinition2dProps;\n val.baseModelId = this.baseModelId;\n val.origin = this.origin;\n val.delta = this.delta;\n val.angle = this.angle;\n return val;\n }\n\n /**\n * ViewDefinition2d custom HandledProps includes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"baseModel\", source: \"Class\" },\n { propertyName: \"origin\", source: \"Class\" },\n { propertyName: \"extents\", source: \"Class\" },\n { propertyName: \"rotationAngle\", source: \"Class\" },\n ];\n\n /**\n * ViewDefinition2d deserializes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ViewDefinition2dProps {\n const elProps = super.deserialize(props) as ViewDefinition2dProps;\n const instance = props.row;\n elProps.baseModelId = instance.baseModel.id;\n elProps.origin = [ instance.origin.x, instance.origin.y ];\n elProps.delta = [ instance.extents.x, instance.extents.y ];\n elProps.angle = instance.rotationAngle;\n return elProps;\n }\n\n /**\n * ViewDefinition2d serializes 'baseModel', 'origin', 'extents', and 'rotationAngle'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: ViewDefinition2dProps, _iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, _iModel);\n inst.baseModel.id = props.baseModelId;\n inst.origin = props.origin;\n inst.extents = props.delta;\n inst.rotationAngle = props.angle;\n return inst;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.baseModelId);\n }\n\n /** Provides access to optional detail settings for this view. */\n public get details(): ViewDetails { return this._details; }\n\n /** Load this view's DisplayStyle2d from the IModelDb. */\n public loadDisplayStyle2d(): DisplayStyle2d { return this.iModel.elements.getElement<DisplayStyle2d>(this.displayStyleId); }\n}\n\n/** Defines a view of a [[DrawingModel]].\n * @public @preview\n */\nexport class DrawingViewDefinition extends ViewDefinition2d {\n public static override get className(): string { return \"DrawingViewDefinition\"; }\n\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\n super(props, iModel);\n }\n\n /** Create a DrawingViewDefinition\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param baseModelId The base [[DrawingModel]]\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\n * @param range Defines the view origin and extents\n * @throws [[IModelError]] if there is a problem creating the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): DrawingViewDefinition {\n const viewDefinitionProps: ViewDefinition2dProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n baseModelId,\n categorySelectorId,\n displayStyleId,\n origin: { x: range.low.x, y: range.low.y },\n delta: range.diagonal(),\n angle: 0,\n };\n return new DrawingViewDefinition(viewDefinitionProps, iModelDb);\n }\n\n /** Construct a DrawingViewDefinition from its JSON representation. */\n public static fromJSON(props: Omit<ViewDefinition2dProps, \"classFullName\">, iModel: IModelDb) {\n return new DrawingViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\n }\n\n /** Insert a DrawingViewDefinition\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new DrawingViewDefinition into this [[DefinitionModel]]\n * @param name The name/CodeValue of the view\n * @param baseModelId The base [[DrawingModel]]\n * @param categorySelectorId The [[CategorySelector]] that this view should use\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\n * @param range Defines the view origin and extents\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): Id64String {\n const viewDefinition = this.create(iModelDb, definitionModelId, name, baseModelId, categorySelectorId, displayStyleId, range);\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\n }\n}\n\n/** Arguments to be passed in to [[SheetViewDefinition.create]]\n * @public\n*/\nexport interface CreateSheetViewDefinitionArgs {\n /** The iModel in which the sheet view will be created. */\n iModel: IModelDb;\n /** The Id of the [[DefinitionModel]] into which the sheet view will be inserted. */\n definitionModelId: Id64String;\n /** The name to use as the view's Code value. */\n name: string;\n /** The Id of the sheet model whose contents will be displayed by this view. */\n baseModelId: Id64String;\n /** The [[CategorySelector]] that this view should use. */\n categorySelectorId: Id64String;\n /** The [[DisplayStyle2d]] that this view should use. */\n displayStyleId: Id64String;\n /** Defines the view origin and extents. */\n range: Range2d;\n}\n\n/** Defines a view of a [[SheetModel]].\n * @public @preview\n */\nexport class SheetViewDefinition extends ViewDefinition2d {\n public static override get className(): string { return \"SheetViewDefinition\"; }\n\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\n super(props, iModel);\n }\n\n /** Create a SheetViewDefinition */\n public static create(args: CreateSheetViewDefinitionArgs): SheetViewDefinition {\n const { baseModelId, categorySelectorId, displayStyleId, range } = args;\n const props: ViewDefinition2dProps = {\n classFullName: this.classFullName,\n model: args.definitionModelId,\n code: this.createCode(args.iModel, args.definitionModelId, args.name),\n baseModelId,\n categorySelectorId,\n displayStyleId,\n origin: { x: range.low.x, y: range.low.y },\n delta: range.diagonal(),\n angle: 0,\n };\n\n return new SheetViewDefinition(props, args.iModel);\n }\n\n /** Insert a SheetViewDefinition into an IModelDb */\n public static insert(args: CreateSheetViewDefinitionArgs): Id64String {\n const view = this.create(args);\n return args.iModel.elements.insertElement(view.toJSON());\n }\n\n /** Create a SheetViewDefinition from JSON props */\n public static fromJSON(props: Omit<ViewDefinition2dProps, \"classFullName\">, iModel: IModelDb): SheetViewDefinition {\n return new SheetViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\n }\n}\n\n/** A ViewDefinition used to display a 2d template model.\n * @internal\n */\nexport class TemplateViewDefinition2d extends ViewDefinition2d {\n public static override get className(): string { return \"TemplateViewDefinition2d\"; }\n}\n\n/** A ViewDefinition used to display a 3d template model.\n * @internal\n */\nexport class TemplateViewDefinition3d extends ViewDefinition3d {\n public static override get className(): string { return \"TemplateViewDefinition3d\"; }\n}\n\n/** An auxiliary coordinate system element. Auxiliary coordinate systems can be used by views to show\n * coordinate information in different units and/or orientations.\n * @public @preview\n */\nexport abstract class AuxCoordSystem extends DefinitionElement {\n public static override get className(): string { return \"AuxCoordSystem\"; }\n public type?: number;\n public description?: string;\n public constructor(props: AuxCoordSystemProps, iModel: IModelDb) {\n super(props, iModel);\n this.type = props.type;\n this.description = props.description;\n }\n}\n\n/** A 2d auxiliary coordinate system.\n * @public @preview\n */\nexport class AuxCoordSystem2d extends AuxCoordSystem {\n public static override get className(): string { return \"AuxCoordSystem2d\"; }\n public origin?: Point2d;\n public angle?: number;\n public constructor(props: AuxCoordSystem2dProps, iModel: IModelDb) {\n super(props, iModel);\n this.origin = props.origin ? Point2d.fromJSON(props.origin) : undefined;\n this.angle = props.angle ? Angle.fromJSON(props.angle).degrees : undefined;\n }\n\n /** Create a Code for a AuxCoordSystem2d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem2d element and provides the scope for its name.\n * @param codeValue The AuxCoordSystem2d name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem2d);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A 3d auxiliary coordinate system.\n * @public @preview\n */\nexport class AuxCoordSystem3d extends AuxCoordSystem {\n public static override get className(): string { return \"AuxCoordSystem3d\"; }\n public origin?: Point3d;\n public yaw?: number;\n public pitch?: number;\n public roll?: number;\n public constructor(props: AuxCoordSystem3dProps, iModel: IModelDb) {\n super(props, iModel);\n this.origin = props.origin ? Point3d.fromJSON(props.origin) : undefined;\n this.yaw = props.yaw ? Angle.fromJSON(props.yaw).degrees : undefined;\n this.pitch = props.pitch ? Angle.fromJSON(props.pitch).degrees : undefined;\n this.roll = props.roll ? Angle.fromJSON(props.roll).degrees : undefined;\n }\n\n /** Create a Code for a AuxCoordSystem3d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem3d element and provides the scope for its name.\n * @param codeValue The AuxCoordSystem3d name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem3d);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A spatial auxiliary coordinate system.\n * @public @preview\n */\nexport class AuxCoordSystemSpatial extends AuxCoordSystem3d {\n public static override get className(): string { return \"AuxCoordSystemSpatial\"; }\n /** Create a Code for a AuxCoordSystemSpatial element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystemSpatial element and provides the scope for its name.\n * @param codeValue The AuxCoordSystemSpatial name\n */\n public static override createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystemSpatial);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Represents an *attachment* of a [[ViewDefinition]] to a [[Sheet]].\n * @public @preview\n */\nexport class ViewAttachment extends GraphicalElement2d {\n public static override get className(): string { return \"ViewAttachment\"; }\n public view: RelatedElement;\n public constructor(props: ViewAttachmentProps, iModel: IModelDb) {\n super(props, iModel);\n this.view = new RelatedElement(props.view);\n // ###NOTE: scale, displayPriority, and clipping vectors are stored in ViewAttachmentProps.jsonProperties.\n }\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.view.id);\n }\n}\n\n/** The position in space of a Light.\n * @internal\n */\nexport class LightLocation extends SpatialLocationElement {\n public static override get className(): string { return \"LightLocation\"; }\n /** Whether this light is currently turned on. */\n public enabled?: boolean;\n\n protected constructor(props: LightLocationProps, iModel: IModelDb) {\n super(props, iModel);\n this.enabled = props.enabled;\n }\n}\n"]}
@@ -0,0 +1,61 @@
1
+ /** @packageDocumentation
2
+ * @module Elements
3
+ */
4
+ import { RelationshipProps, TextBlock } from "@itwin/core-common";
5
+ import { ElementDrivesElement } from "../Relationship";
6
+ import { IModelDb } from "../IModelDb";
7
+ import { Element } from "../Element";
8
+ import { Id64String } from "@itwin/core-bentley";
9
+ /** Describes one of potentially many [TextBlock]($common)s hosted by an [[ITextAnnotation]].
10
+ * For example, a [[TextAnnotation2d]] hosts only a single text block, but an element representing a table may
11
+ * host one text block for each cell in the table, in which case it might use the combination of row and column
12
+ * as the [[id]] for each text block.
13
+ * @beta
14
+ */
15
+ export interface TextBlockAndId {
16
+ /** The text block. */
17
+ readonly textBlock: TextBlock;
18
+ /** An opaque identifier that allows the [[ITextAnnotation]] to discern which of its hosted text blocks is being referred to. */
19
+ readonly id: unknown;
20
+ }
21
+ /** Interface implemented by [[GeometricElement]] subclasses whose schemas declare them to implement the mix-in `BisCore:ITextAnnotation`.
22
+ * Such elements may host any number of [TextBlock]($common)s. `ITextAnnotation` provides a uniform way to interact with text regardless of
23
+ * the type of element to which it belongs.
24
+ * @beta
25
+ */
26
+ export interface ITextAnnotation {
27
+ /** Obtain a collection of all of the [TextBlock]($common)s hosted by this element. */
28
+ getTextBlocks(): Iterable<TextBlockAndId>;
29
+ /** Update the element to replace the contents of the specified [TextBlock]($common)s. */
30
+ updateTextBlocks(textBlocks: TextBlockAndId[]): void;
31
+ }
32
+ /** Returns `true` if the specified `element` implements [[ITextAnnotation]].
33
+ * @beta
34
+ */
35
+ export declare function isITextAnnotation(element: Element): element is ITextAnnotation & Element;
36
+ /** A relationship in which the source element hosts one or more properties that are displayed by a target [[ITextAnnotation]] element.
37
+ * This relationship is used to automatically update the [FieldRun]($common)s contained in the target element when the source element is modified.
38
+ * An [[ITextAnnotation]] element should invoke [[updateFieldDependencies]] from its [[Element.onInserted]] and [[Element.onUpdated]] functions to
39
+ * establish or update the relationships required for the [FieldRun]($common)s it contains.
40
+ * @note This relationship was introduced in version 01.00.22 of the BisCore schema. [FieldRun]($common)s created in iModels that have not been upgraded to
41
+ * that version or newer will not automatically update. Use [[isSupportedForIModel]] to check.
42
+ * @beta
43
+ */
44
+ export declare class ElementDrivesTextAnnotation extends ElementDrivesElement {
45
+ static get className(): string;
46
+ /** @internal */
47
+ static onRootChanged(props: RelationshipProps, iModel: IModelDb): void;
48
+ /** @internal */
49
+ static onDeletedDependency(props: RelationshipProps, iModel: IModelDb): void;
50
+ /** Returns true if `iModel` contains a version of the BisCore schema new enough to support this relationship.
51
+ * If not, the schema should be updated before inserting any [FieldRun]($common)s, or those runs will not
52
+ * update when the source element changes.
53
+ */
54
+ static isSupportedForIModel(iModel: IModelDb): boolean;
55
+ /** Examines all of the [FieldRun]($common)s within the specified [[ITextAnnotation]] and ensures that the appropriate
56
+ * `ElementDrivesTextAnnotation` relationships exist between the fields' source elements and this target element.
57
+ * It also deletes any stale relationships left over from fields that were deleted or whose source elements changed.
58
+ */
59
+ static updateFieldDependencies(annotationElementId: Id64String, iModel: IModelDb): void;
60
+ }
61
+ //# sourceMappingURL=ElementDrivesTextAnnotation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElementDrivesTextAnnotation.d.ts","sourceRoot":"","sources":["../../../src/annotations/ElementDrivesTextAnnotation.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAkB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjE;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,sBAAsB;IACtB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,gIAAgI;IAChI,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;CACtB;AAKD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,sFAAsF;IACtF,aAAa,IAAI,QAAQ,CAAC,cAAc,CAAC,CAAC;IAC1C,yFAAyF;IACzF,gBAAgB,CAAC,UAAU,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC;CACtD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,eAAe,GAAG,OAAO,CAExF;AAED;;;;;;;GAOG;AACH,qBAAa,2BAA4B,SAAQ,oBAAoB;IACnE,WAA2B,SAAS,IAAI,MAAM,CAA0C;IAExF,gBAAgB;WACO,aAAa,CAAC,KA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