@itwin/core-backend 5.0.0-dev.11 → 5.0.0-dev.111

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 (1102) hide show
  1. package/CHANGELOG.md +90 -1
  2. package/lib/cjs/BackendHubAccess.d.ts +15 -35
  3. package/lib/cjs/BackendHubAccess.d.ts.map +1 -1
  4. package/lib/cjs/BackendHubAccess.js +2 -0
  5. package/lib/cjs/BackendHubAccess.js.map +1 -1
  6. package/lib/cjs/BackendLoggerCategory.js.map +1 -1
  7. package/lib/cjs/BisCoreSchema.d.ts.map +1 -1
  8. package/lib/cjs/BisCoreSchema.js +2 -0
  9. package/lib/cjs/BisCoreSchema.js.map +1 -1
  10. package/lib/cjs/BlobContainerService.d.ts +4 -4
  11. package/lib/cjs/BlobContainerService.d.ts.map +1 -1
  12. package/lib/cjs/BlobContainerService.js.map +1 -1
  13. package/lib/cjs/BriefcaseManager.d.ts +10 -0
  14. package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
  15. package/lib/cjs/BriefcaseManager.js +63 -20
  16. package/lib/cjs/BriefcaseManager.js.map +1 -1
  17. package/lib/cjs/CatalogDb.d.ts +103 -0
  18. package/lib/cjs/CatalogDb.d.ts.map +1 -0
  19. package/lib/cjs/CatalogDb.js +271 -0
  20. package/lib/cjs/CatalogDb.js.map +1 -0
  21. package/lib/cjs/Category.d.ts +37 -0
  22. package/lib/cjs/Category.d.ts.map +1 -1
  23. package/lib/cjs/Category.js +79 -1
  24. package/lib/cjs/Category.js.map +1 -1
  25. package/lib/cjs/ChangeSummaryManager.d.ts.map +1 -1
  26. package/lib/cjs/ChangeSummaryManager.js +104 -29
  27. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  28. package/lib/cjs/ChangedElementsDb.d.ts +3 -3
  29. package/lib/cjs/ChangedElementsDb.d.ts.map +1 -1
  30. package/lib/cjs/ChangedElementsDb.js +8 -7
  31. package/lib/cjs/ChangedElementsDb.js.map +1 -1
  32. package/lib/cjs/ChangesetECAdaptor.d.ts +3 -3
  33. package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
  34. package/lib/cjs/ChangesetECAdaptor.js +274 -261
  35. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  36. package/lib/cjs/ChannelControl.js.map +1 -1
  37. package/lib/cjs/CheckpointManager.d.ts +12 -17
  38. package/lib/cjs/CheckpointManager.d.ts.map +1 -1
  39. package/lib/cjs/CheckpointManager.js +40 -92
  40. package/lib/cjs/CheckpointManager.js.map +1 -1
  41. package/lib/cjs/ClassRegistry.d.ts +46 -2
  42. package/lib/cjs/ClassRegistry.d.ts.map +1 -1
  43. package/lib/cjs/ClassRegistry.js +98 -42
  44. package/lib/cjs/ClassRegistry.js.map +1 -1
  45. package/lib/cjs/CloudSqlite.d.ts +104 -20
  46. package/lib/cjs/CloudSqlite.d.ts.map +1 -1
  47. package/lib/cjs/CloudSqlite.js +172 -54
  48. package/lib/cjs/CloudSqlite.js.map +1 -1
  49. package/lib/cjs/CodeService.d.ts +2 -0
  50. package/lib/cjs/CodeService.d.ts.map +1 -1
  51. package/lib/cjs/CodeService.js +4 -0
  52. package/lib/cjs/CodeService.js.map +1 -1
  53. package/lib/cjs/CodeSpecs.js +3 -2
  54. package/lib/cjs/CodeSpecs.js.map +1 -1
  55. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  56. package/lib/cjs/CustomViewState3dCreator.js +7 -6
  57. package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
  58. package/lib/cjs/DevTools.js +16 -16
  59. package/lib/cjs/DevTools.js.map +1 -1
  60. package/lib/cjs/DisplayStyle.d.ts +5 -0
  61. package/lib/cjs/DisplayStyle.d.ts.map +1 -1
  62. package/lib/cjs/DisplayStyle.js +29 -0
  63. package/lib/cjs/DisplayStyle.js.map +1 -1
  64. package/lib/cjs/ECDb.d.ts +53 -60
  65. package/lib/cjs/ECDb.d.ts.map +1 -1
  66. package/lib/cjs/ECDb.js +115 -73
  67. package/lib/cjs/ECDb.js.map +1 -1
  68. package/lib/cjs/ECSchemaXmlContext.d.ts +1 -1
  69. package/lib/cjs/ECSchemaXmlContext.js +2 -1
  70. package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
  71. package/lib/cjs/ECSqlStatement.d.ts +185 -4
  72. package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
  73. package/lib/cjs/ECSqlStatement.js +237 -9
  74. package/lib/cjs/ECSqlStatement.js.map +1 -1
  75. package/lib/cjs/Element.d.ts +194 -35
  76. package/lib/cjs/Element.d.ts.map +1 -1
  77. package/lib/cjs/Element.js +683 -57
  78. package/lib/cjs/Element.js.map +1 -1
  79. package/lib/cjs/ElementAspect.d.ts +0 -5
  80. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  81. package/lib/cjs/ElementAspect.js +25 -16
  82. package/lib/cjs/ElementAspect.js.map +1 -1
  83. package/lib/cjs/ElementGraphics.js.map +1 -1
  84. package/lib/cjs/ElementTreeWalker.d.ts.map +1 -1
  85. package/lib/cjs/ElementTreeWalker.js +17 -12
  86. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  87. package/lib/cjs/Entity.d.ts +91 -11
  88. package/lib/cjs/Entity.d.ts.map +1 -1
  89. package/lib/cjs/Entity.js +137 -16
  90. package/lib/cjs/Entity.js.map +1 -1
  91. package/lib/cjs/EntityReferences.js.map +1 -1
  92. package/lib/cjs/ExportGraphics.js +4 -0
  93. package/lib/cjs/ExportGraphics.js.map +1 -1
  94. package/lib/cjs/ExternalSource.js +22 -0
  95. package/lib/cjs/ExternalSource.js.map +1 -1
  96. package/lib/cjs/FontFile.d.ts +68 -0
  97. package/lib/cjs/FontFile.d.ts.map +1 -0
  98. package/lib/cjs/FontFile.js +36 -0
  99. package/lib/cjs/FontFile.js.map +1 -0
  100. package/lib/cjs/GeoCoordConfig.js +8 -8
  101. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  102. package/lib/cjs/GeographicCRSServices.js.map +1 -1
  103. package/lib/cjs/GeometrySummary.js +53 -50
  104. package/lib/cjs/GeometrySummary.js.map +1 -1
  105. package/lib/cjs/IModelDb.d.ts +231 -108
  106. package/lib/cjs/IModelDb.d.ts.map +1 -1
  107. package/lib/cjs/IModelDb.js +516 -249
  108. package/lib/cjs/IModelDb.js.map +1 -1
  109. package/lib/cjs/IModelDbFonts.d.ts +54 -0
  110. package/lib/cjs/IModelDbFonts.d.ts.map +1 -0
  111. package/lib/cjs/{IModelCloneContext.js → IModelDbFonts.js} +2 -7
  112. package/lib/cjs/IModelDbFonts.js.map +1 -0
  113. package/lib/cjs/IModelElementCloneContext.d.ts +2 -0
  114. package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
  115. package/lib/cjs/IModelElementCloneContext.js +12 -1
  116. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  117. package/lib/cjs/IModelHost.d.ts +28 -15
  118. package/lib/cjs/IModelHost.d.ts.map +1 -1
  119. package/lib/cjs/IModelHost.js +82 -43
  120. package/lib/cjs/IModelHost.js.map +1 -1
  121. package/lib/cjs/IModelJsFs.d.ts.map +1 -1
  122. package/lib/cjs/IModelJsFs.js +17 -1
  123. package/lib/cjs/IModelJsFs.js.map +1 -1
  124. package/lib/cjs/ImageSourceConversion.d.ts +49 -0
  125. package/lib/cjs/ImageSourceConversion.d.ts.map +1 -0
  126. package/lib/cjs/ImageSourceConversion.js +37 -0
  127. package/lib/cjs/ImageSourceConversion.js.map +1 -0
  128. package/lib/cjs/IpcHost.d.ts.map +1 -1
  129. package/lib/cjs/IpcHost.js +19 -33
  130. package/lib/cjs/IpcHost.js.map +1 -1
  131. package/lib/cjs/LineStyle.js.map +1 -1
  132. package/lib/cjs/LocalHub.js +9 -3
  133. package/lib/cjs/LocalHub.js.map +1 -1
  134. package/lib/cjs/LocalhostIpcHost.js +5 -6
  135. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  136. package/lib/cjs/LockControl.js.map +1 -1
  137. package/lib/cjs/Material.d.ts +19 -0
  138. package/lib/cjs/Material.d.ts.map +1 -1
  139. package/lib/cjs/Material.js +69 -0
  140. package/lib/cjs/Material.js.map +1 -1
  141. package/lib/cjs/Model.d.ts +43 -7
  142. package/lib/cjs/Model.d.ts.map +1 -1
  143. package/lib/cjs/Model.js +120 -7
  144. package/lib/cjs/Model.js.map +1 -1
  145. package/lib/cjs/NativeAppStorage.js +5 -3
  146. package/lib/cjs/NativeAppStorage.js.map +1 -1
  147. package/lib/cjs/NativeHost.d.ts.map +1 -1
  148. package/lib/cjs/NativeHost.js +10 -4
  149. package/lib/cjs/NativeHost.js.map +1 -1
  150. package/lib/cjs/NavigationRelationship.js +25 -25
  151. package/lib/cjs/NavigationRelationship.js.map +1 -1
  152. package/lib/cjs/PromiseMemoizer.d.ts +2 -3
  153. package/lib/cjs/PromiseMemoizer.d.ts.map +1 -1
  154. package/lib/cjs/PromiseMemoizer.js +12 -5
  155. package/lib/cjs/PromiseMemoizer.js.map +1 -1
  156. package/lib/cjs/PropertyStore.js +1 -4
  157. package/lib/cjs/PropertyStore.js.map +1 -1
  158. package/lib/cjs/Relationship.d.ts.map +1 -1
  159. package/lib/cjs/Relationship.js +15 -1
  160. package/lib/cjs/Relationship.js.map +1 -1
  161. package/lib/cjs/RpcBackend.js.map +1 -1
  162. package/lib/cjs/SQLiteDb.d.ts +6 -4
  163. package/lib/cjs/SQLiteDb.d.ts.map +1 -1
  164. package/lib/cjs/SQLiteDb.js +79 -19
  165. package/lib/cjs/SQLiteDb.js.map +1 -1
  166. package/lib/cjs/Schema.d.ts +25 -1
  167. package/lib/cjs/Schema.d.ts.map +1 -1
  168. package/lib/cjs/Schema.js +44 -8
  169. package/lib/cjs/Schema.js.map +1 -1
  170. package/lib/cjs/SchemaSync.js +1 -4
  171. package/lib/cjs/SchemaSync.js.map +1 -1
  172. package/lib/cjs/SchemaUtils.js.map +1 -1
  173. package/lib/cjs/SheetIndex.js +6 -0
  174. package/lib/cjs/SheetIndex.js.map +1 -1
  175. package/lib/cjs/SqliteChangesetReader.d.ts +11 -3
  176. package/lib/cjs/SqliteChangesetReader.d.ts.map +1 -1
  177. package/lib/cjs/SqliteChangesetReader.js +21 -5
  178. package/lib/cjs/SqliteChangesetReader.js.map +1 -1
  179. package/lib/cjs/SqliteStatement.d.ts +4 -2
  180. package/lib/cjs/SqliteStatement.d.ts.map +1 -1
  181. package/lib/cjs/SqliteStatement.js +13 -1
  182. package/lib/cjs/SqliteStatement.js.map +1 -1
  183. package/lib/cjs/TextAnnotationElement.js.map +1 -1
  184. package/lib/cjs/TextAnnotationGeometry.d.ts.map +1 -1
  185. package/lib/cjs/TextAnnotationGeometry.js +38 -11
  186. package/lib/cjs/TextAnnotationGeometry.js.map +1 -1
  187. package/lib/cjs/TextAnnotationLayout.d.ts +10 -3
  188. package/lib/cjs/TextAnnotationLayout.d.ts.map +1 -1
  189. package/lib/cjs/TextAnnotationLayout.js +56 -18
  190. package/lib/cjs/TextAnnotationLayout.js.map +1 -1
  191. package/lib/cjs/Texture.js +3 -0
  192. package/lib/cjs/Texture.js.map +1 -1
  193. package/lib/cjs/TileStorage.js +6 -1
  194. package/lib/cjs/TileStorage.js.map +1 -1
  195. package/lib/cjs/TxnManager.d.ts +55 -4
  196. package/lib/cjs/TxnManager.d.ts.map +1 -1
  197. package/lib/cjs/TxnManager.js +235 -58
  198. package/lib/cjs/TxnManager.js.map +1 -1
  199. package/lib/cjs/ViewDefinition.d.ts +106 -6
  200. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  201. package/lib/cjs/ViewDefinition.js +289 -26
  202. package/lib/cjs/ViewDefinition.js.map +1 -1
  203. package/lib/cjs/ViewStateHydrator.d.ts +0 -1
  204. package/lib/cjs/ViewStateHydrator.d.ts.map +1 -1
  205. package/lib/cjs/ViewStateHydrator.js +4 -14
  206. package/lib/cjs/ViewStateHydrator.js.map +1 -1
  207. package/lib/cjs/ViewStore.d.ts.map +1 -1
  208. package/lib/cjs/ViewStore.js +32 -29
  209. package/lib/cjs/ViewStore.js.map +1 -1
  210. package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
  211. package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +32 -32
  212. package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +27 -27
  213. package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +94 -94
  214. package/lib/cjs/assets/Settings/backend.setting.json5 +21 -21
  215. package/lib/cjs/core-backend.d.ts +8 -2
  216. package/lib/cjs/core-backend.d.ts.map +1 -1
  217. package/lib/cjs/core-backend.js +8 -2
  218. package/lib/cjs/core-backend.js.map +1 -1
  219. package/lib/cjs/domains/FunctionalElements.js +1 -1
  220. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  221. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  222. package/lib/cjs/domains/GenericElements.js.map +1 -1
  223. package/lib/cjs/domains/GenericSchema.js.map +1 -1
  224. package/lib/cjs/internal/ChangesetConflictArgs.d.ts +40 -2
  225. package/lib/cjs/internal/ChangesetConflictArgs.d.ts.map +1 -1
  226. package/lib/cjs/internal/ChangesetConflictArgs.js +101 -0
  227. package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -1
  228. package/lib/cjs/internal/ChannelAdmin.d.ts +1 -1
  229. package/lib/cjs/internal/ChannelAdmin.d.ts.map +1 -1
  230. package/lib/cjs/internal/ChannelAdmin.js +16 -13
  231. package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
  232. package/lib/cjs/internal/ElementLRUCache.d.ts +28 -0
  233. package/lib/cjs/internal/ElementLRUCache.d.ts.map +1 -0
  234. package/lib/cjs/internal/ElementLRUCache.js +120 -0
  235. package/lib/cjs/internal/ElementLRUCache.js.map +1 -0
  236. package/lib/cjs/internal/FontFileImpl.d.ts +34 -0
  237. package/lib/cjs/internal/FontFileImpl.d.ts.map +1 -0
  238. package/lib/cjs/internal/FontFileImpl.js +143 -0
  239. package/lib/cjs/internal/FontFileImpl.js.map +1 -0
  240. package/lib/cjs/{HubMock.d.ts → internal/HubMock.d.ts} +6 -7
  241. package/lib/cjs/internal/HubMock.d.ts.map +1 -0
  242. package/lib/cjs/{HubMock.js → internal/HubMock.js} +40 -15
  243. package/lib/cjs/internal/HubMock.js.map +1 -0
  244. package/lib/cjs/internal/IModelDbFontsImpl.d.ts +7 -0
  245. package/lib/cjs/internal/IModelDbFontsImpl.d.ts.map +1 -0
  246. package/lib/cjs/internal/IModelDbFontsImpl.js +186 -0
  247. package/lib/cjs/internal/IModelDbFontsImpl.js.map +1 -0
  248. package/lib/cjs/internal/NativePlatform.js.map +1 -1
  249. package/lib/cjs/internal/NoLocks.js +2 -5
  250. package/lib/cjs/internal/NoLocks.js.map +1 -1
  251. package/lib/cjs/internal/ServerBasedLocks.d.ts.map +1 -1
  252. package/lib/cjs/internal/ServerBasedLocks.js +6 -6
  253. package/lib/cjs/internal/ServerBasedLocks.js.map +1 -1
  254. package/lib/cjs/internal/Symbols.d.ts +9 -0
  255. package/lib/cjs/internal/Symbols.d.ts.map +1 -1
  256. package/lib/cjs/internal/Symbols.js +10 -1
  257. package/lib/cjs/internal/Symbols.js.map +1 -1
  258. package/lib/cjs/internal/cross-package.js.map +1 -1
  259. package/lib/cjs/internal/workspace/SettingsImpl.js +6 -9
  260. package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
  261. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js +8 -12
  262. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  263. package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts +2 -16
  264. package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts.map +1 -1
  265. package/lib/cjs/internal/workspace/WorkspaceImpl.js +57 -121
  266. package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
  267. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js +1 -4
  268. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  269. package/lib/cjs/rpc/multipart.d.ts.map +1 -1
  270. package/lib/cjs/rpc/multipart.js +2 -1
  271. package/lib/cjs/rpc/multipart.js.map +1 -1
  272. package/lib/cjs/rpc/tracing.js +2 -2
  273. package/lib/cjs/rpc/tracing.js.map +1 -1
  274. package/lib/cjs/rpc/web/logging.js.map +1 -1
  275. package/lib/cjs/rpc/web/request.d.ts.map +1 -1
  276. package/lib/cjs/rpc/web/request.js +2 -1
  277. package/lib/cjs/rpc/web/request.js.map +1 -1
  278. package/lib/cjs/rpc/web/response.js.map +1 -1
  279. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  280. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts.map +1 -1
  281. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +8 -4
  282. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  283. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js +5 -3
  284. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  285. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -1
  286. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js +15 -25
  287. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  288. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  289. package/lib/cjs/workspace/Settings.js.map +1 -1
  290. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  291. package/lib/cjs/workspace/Workspace.d.ts +6 -13
  292. package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
  293. package/lib/cjs/workspace/Workspace.js.map +1 -1
  294. package/lib/cjs/workspace/WorkspaceEditor.d.ts +2 -7
  295. package/lib/cjs/workspace/WorkspaceEditor.d.ts.map +1 -1
  296. package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
  297. package/lib/esm/BackendHubAccess.d.ts +209 -0
  298. package/lib/esm/BackendHubAccess.d.ts.map +1 -0
  299. package/lib/esm/BackendHubAccess.js +41 -0
  300. package/lib/esm/BackendHubAccess.js.map +1 -0
  301. package/lib/esm/BackendLoggerCategory.d.ts +88 -0
  302. package/lib/esm/BackendLoggerCategory.d.ts.map +1 -0
  303. package/lib/esm/BackendLoggerCategory.js +93 -0
  304. package/lib/esm/BackendLoggerCategory.js.map +1 -0
  305. package/lib/esm/BisCoreSchema.d.ts +22 -0
  306. package/lib/esm/BisCoreSchema.d.ts.map +1 -0
  307. package/lib/esm/BisCoreSchema.js +61 -0
  308. package/lib/esm/BisCoreSchema.js.map +1 -0
  309. package/lib/esm/BlobContainerService.d.ts +159 -0
  310. package/lib/esm/BlobContainerService.d.ts.map +1 -0
  311. package/lib/esm/BlobContainerService.js +15 -0
  312. package/lib/esm/BlobContainerService.js.map +1 -0
  313. package/lib/esm/BriefcaseManager.d.ts +213 -0
  314. package/lib/esm/BriefcaseManager.d.ts.map +1 -0
  315. package/lib/esm/BriefcaseManager.js +520 -0
  316. package/lib/esm/BriefcaseManager.js.map +1 -0
  317. package/lib/esm/CatalogDb.d.ts +103 -0
  318. package/lib/esm/CatalogDb.d.ts.map +1 -0
  319. package/lib/esm/CatalogDb.js +267 -0
  320. package/lib/esm/CatalogDb.js.map +1 -0
  321. package/lib/esm/Category.d.ts +173 -0
  322. package/lib/esm/Category.d.ts.map +1 -0
  323. package/lib/esm/Category.js +297 -0
  324. package/lib/esm/Category.js.map +1 -0
  325. package/lib/esm/ChangeSummaryManager.d.ts +161 -0
  326. package/lib/esm/ChangeSummaryManager.d.ts.map +1 -0
  327. package/lib/esm/ChangeSummaryManager.js +421 -0
  328. package/lib/esm/ChangeSummaryManager.js.map +1 -0
  329. package/lib/esm/ChangedElementsDb.d.ts +101 -0
  330. package/lib/esm/ChangedElementsDb.d.ts.map +1 -0
  331. package/lib/esm/ChangedElementsDb.js +165 -0
  332. package/lib/esm/ChangedElementsDb.js.map +1 -0
  333. package/lib/esm/ChangesetECAdaptor.d.ts +203 -0
  334. package/lib/esm/ChangesetECAdaptor.d.ts.map +1 -0
  335. package/lib/esm/ChangesetECAdaptor.js +815 -0
  336. package/lib/esm/ChangesetECAdaptor.js.map +1 -0
  337. package/lib/esm/ChannelControl.d.ts +68 -0
  338. package/lib/esm/ChannelControl.d.ts.map +1 -0
  339. package/lib/esm/ChannelControl.js +15 -0
  340. package/lib/esm/ChannelControl.js.map +1 -0
  341. package/lib/esm/CheckpointManager.d.ts +118 -0
  342. package/lib/esm/CheckpointManager.d.ts.map +1 -0
  343. package/lib/esm/CheckpointManager.js +321 -0
  344. package/lib/esm/CheckpointManager.js.map +1 -0
  345. package/lib/esm/ClassRegistry.d.ts +134 -0
  346. package/lib/esm/ClassRegistry.d.ts.map +1 -0
  347. package/lib/esm/ClassRegistry.js +324 -0
  348. package/lib/esm/ClassRegistry.js.map +1 -0
  349. package/lib/esm/CloudSqlite.d.ts +766 -0
  350. package/lib/esm/CloudSqlite.d.ts.map +1 -0
  351. package/lib/esm/CloudSqlite.js +622 -0
  352. package/lib/esm/CloudSqlite.js.map +1 -0
  353. package/lib/esm/CodeService.d.ts +402 -0
  354. package/lib/esm/CodeService.d.ts.map +1 -0
  355. package/lib/esm/CodeService.js +65 -0
  356. package/lib/esm/CodeService.js.map +1 -0
  357. package/lib/esm/CodeSpecs.d.ts +59 -0
  358. package/lib/esm/CodeSpecs.d.ts.map +1 -0
  359. package/lib/esm/CodeSpecs.js +152 -0
  360. package/lib/esm/CodeSpecs.js.map +1 -0
  361. package/lib/esm/ConcurrentQuery.d.ts +14 -0
  362. package/lib/esm/ConcurrentQuery.d.ts.map +1 -0
  363. package/lib/esm/ConcurrentQuery.js +33 -0
  364. package/lib/esm/ConcurrentQuery.js.map +1 -0
  365. package/lib/esm/CustomViewState3dCreator.d.ts +22 -0
  366. package/lib/esm/CustomViewState3dCreator.d.ts.map +1 -0
  367. package/lib/esm/CustomViewState3dCreator.js +78 -0
  368. package/lib/esm/CustomViewState3dCreator.js.map +1 -0
  369. package/lib/esm/DevTools.d.ts +73 -0
  370. package/lib/esm/DevTools.d.ts.map +1 -0
  371. package/lib/esm/DevTools.js +153 -0
  372. package/lib/esm/DevTools.js.map +1 -0
  373. package/lib/esm/DisplayStyle.d.ts +104 -0
  374. package/lib/esm/DisplayStyle.d.ts.map +1 -0
  375. package/lib/esm/DisplayStyle.js +291 -0
  376. package/lib/esm/DisplayStyle.js.map +1 -0
  377. package/lib/esm/ECDb.d.ts +206 -0
  378. package/lib/esm/ECDb.d.ts.map +1 -0
  379. package/lib/esm/ECDb.js +410 -0
  380. package/lib/esm/ECDb.js.map +1 -0
  381. package/lib/esm/ECSchemaXmlContext.d.ts +46 -0
  382. package/lib/esm/ECSchemaXmlContext.d.ts.map +1 -0
  383. package/lib/esm/ECSchemaXmlContext.js +66 -0
  384. package/lib/esm/ECSchemaXmlContext.js.map +1 -0
  385. package/lib/esm/ECSqlStatement.d.ts +671 -0
  386. package/lib/esm/ECSqlStatement.d.ts.map +1 -0
  387. package/lib/esm/ECSqlStatement.js +1028 -0
  388. package/lib/esm/ECSqlStatement.js.map +1 -0
  389. package/lib/esm/Element.d.ts +1155 -0
  390. package/lib/esm/Element.d.ts.map +1 -0
  391. package/lib/esm/Element.js +1876 -0
  392. package/lib/esm/Element.js.map +1 -0
  393. package/lib/esm/ElementAspect.d.ts +164 -0
  394. package/lib/esm/ElementAspect.d.ts.map +1 -0
  395. package/lib/esm/ElementAspect.js +205 -0
  396. package/lib/esm/ElementAspect.js.map +1 -0
  397. package/lib/esm/ElementGraphics.d.ts +7 -0
  398. package/lib/esm/ElementGraphics.d.ts.map +1 -0
  399. package/lib/esm/ElementGraphics.js +36 -0
  400. package/lib/esm/ElementGraphics.js.map +1 -0
  401. package/lib/esm/ElementTreeWalker.d.ts +182 -0
  402. package/lib/esm/ElementTreeWalker.d.ts.map +1 -0
  403. package/lib/esm/ElementTreeWalker.js +425 -0
  404. package/lib/esm/ElementTreeWalker.js.map +1 -0
  405. package/lib/esm/Entity.d.ts +186 -0
  406. package/lib/esm/Entity.d.ts.map +1 -0
  407. package/lib/esm/Entity.js +244 -0
  408. package/lib/esm/Entity.js.map +1 -0
  409. package/lib/esm/EntityReferences.d.ts +50 -0
  410. package/lib/esm/EntityReferences.d.ts.map +1 -0
  411. package/lib/esm/EntityReferences.js +92 -0
  412. package/lib/esm/EntityReferences.js.map +1 -0
  413. package/lib/esm/ExportGraphics.d.ts +318 -0
  414. package/lib/esm/ExportGraphics.d.ts.map +1 -0
  415. package/lib/esm/ExportGraphics.js +209 -0
  416. package/lib/esm/ExportGraphics.js.map +1 -0
  417. package/lib/esm/ExternalSource.d.ts +89 -0
  418. package/lib/esm/ExternalSource.d.ts.map +1 -0
  419. package/lib/esm/ExternalSource.js +139 -0
  420. package/lib/esm/ExternalSource.js.map +1 -0
  421. package/lib/esm/FontFile.d.ts +68 -0
  422. package/lib/esm/FontFile.d.ts.map +1 -0
  423. package/lib/esm/FontFile.js +33 -0
  424. package/lib/esm/FontFile.js.map +1 -0
  425. package/lib/esm/GeoCoordConfig.d.ts +30 -0
  426. package/lib/esm/GeoCoordConfig.d.ts.map +1 -0
  427. package/lib/esm/GeoCoordConfig.js +78 -0
  428. package/lib/esm/GeoCoordConfig.js.map +1 -0
  429. package/lib/esm/GeographicCRSServices.d.ts +40 -0
  430. package/lib/esm/GeographicCRSServices.d.ts.map +1 -0
  431. package/lib/esm/GeographicCRSServices.js +17 -0
  432. package/lib/esm/GeographicCRSServices.js.map +1 -0
  433. package/lib/esm/GeometrySummary.d.ts +5 -0
  434. package/lib/esm/GeometrySummary.d.ts.map +1 -0
  435. package/lib/esm/GeometrySummary.js +381 -0
  436. package/lib/esm/GeometrySummary.js.map +1 -0
  437. package/lib/esm/IModelDb.d.ts +1390 -0
  438. package/lib/esm/IModelDb.d.ts.map +1 -0
  439. package/lib/esm/IModelDb.js +3327 -0
  440. package/lib/esm/IModelDb.js.map +1 -0
  441. package/lib/esm/IModelDbFonts.d.ts +54 -0
  442. package/lib/esm/IModelDbFonts.d.ts.map +1 -0
  443. package/lib/esm/IModelDbFonts.js +9 -0
  444. package/lib/esm/IModelDbFonts.js.map +1 -0
  445. package/lib/esm/IModelElementCloneContext.d.ts +92 -0
  446. package/lib/esm/IModelElementCloneContext.d.ts.map +1 -0
  447. package/lib/esm/IModelElementCloneContext.js +168 -0
  448. package/lib/esm/IModelElementCloneContext.js.map +1 -0
  449. package/lib/esm/IModelHost.d.ts +400 -0
  450. package/lib/esm/IModelHost.d.ts.map +1 -0
  451. package/lib/esm/IModelHost.js +508 -0
  452. package/lib/esm/IModelHost.js.map +1 -0
  453. package/lib/esm/IModelJsFs.d.ts +62 -0
  454. package/lib/esm/IModelJsFs.d.ts.map +1 -0
  455. package/lib/esm/IModelJsFs.js +151 -0
  456. package/lib/esm/IModelJsFs.js.map +1 -0
  457. package/lib/esm/ImageSourceConversion.d.ts +49 -0
  458. package/lib/esm/ImageSourceConversion.d.ts.map +1 -0
  459. package/lib/esm/ImageSourceConversion.js +33 -0
  460. package/lib/esm/ImageSourceConversion.js.map +1 -0
  461. package/lib/esm/IpcHost.d.ts +111 -0
  462. package/lib/esm/IpcHost.d.ts.map +1 -0
  463. package/lib/esm/IpcHost.js +292 -0
  464. package/lib/esm/IpcHost.js.map +1 -0
  465. package/lib/esm/LineStyle.d.ts +312 -0
  466. package/lib/esm/LineStyle.d.ts.map +1 -0
  467. package/lib/esm/LineStyle.js +293 -0
  468. package/lib/esm/LineStyle.js.map +1 -0
  469. package/lib/esm/LocalHub.d.ts +163 -0
  470. package/lib/esm/LocalHub.d.ts.map +1 -0
  471. package/lib/esm/LocalHub.js +583 -0
  472. package/lib/esm/LocalHub.js.map +1 -0
  473. package/lib/esm/LocalhostIpcHost.d.ts +22 -0
  474. package/lib/esm/LocalhostIpcHost.d.ts.map +1 -0
  475. package/lib/esm/LocalhostIpcHost.js +74 -0
  476. package/lib/esm/LocalhostIpcHost.js.map +1 -0
  477. package/lib/esm/LockControl.d.ts +73 -0
  478. package/lib/esm/LockControl.d.ts.map +1 -0
  479. package/lib/esm/LockControl.js +9 -0
  480. package/lib/esm/LockControl.js.map +1 -0
  481. package/lib/esm/Material.d.ts +150 -0
  482. package/lib/esm/Material.d.ts.map +1 -0
  483. package/lib/esm/Material.js +264 -0
  484. package/lib/esm/Material.js.map +1 -0
  485. package/lib/esm/Model.d.ts +411 -0
  486. package/lib/esm/Model.d.ts.map +1 -0
  487. package/lib/esm/Model.js +572 -0
  488. package/lib/esm/Model.js.map +1 -0
  489. package/lib/esm/NativeAppStorage.d.ts +52 -0
  490. package/lib/esm/NativeAppStorage.d.ts.map +1 -0
  491. package/lib/esm/NativeAppStorage.js +205 -0
  492. package/lib/esm/NativeAppStorage.js.map +1 -0
  493. package/lib/esm/NativeHost.d.ts +53 -0
  494. package/lib/esm/NativeHost.d.ts.map +1 -0
  495. package/lib/esm/NativeHost.js +161 -0
  496. package/lib/esm/NativeHost.js.map +1 -0
  497. package/lib/esm/NavigationRelationship.d.ts +185 -0
  498. package/lib/esm/NavigationRelationship.d.ts.map +1 -0
  499. package/lib/esm/NavigationRelationship.js +238 -0
  500. package/lib/esm/NavigationRelationship.js.map +1 -0
  501. package/lib/esm/PromiseMemoizer.d.ts +48 -0
  502. package/lib/esm/PromiseMemoizer.d.ts.map +1 -0
  503. package/lib/esm/PromiseMemoizer.js +101 -0
  504. package/lib/esm/PromiseMemoizer.js.map +1 -0
  505. package/lib/esm/PropertyStore.d.ts +134 -0
  506. package/lib/esm/PropertyStore.d.ts.map +1 -0
  507. package/lib/esm/PropertyStore.js +177 -0
  508. package/lib/esm/PropertyStore.js.map +1 -0
  509. package/lib/esm/Relationship.d.ts +399 -0
  510. package/lib/esm/Relationship.d.ts.map +1 -0
  511. package/lib/esm/Relationship.js +476 -0
  512. package/lib/esm/Relationship.js.map +1 -0
  513. package/lib/esm/RpcBackend.d.ts +6 -0
  514. package/lib/esm/RpcBackend.d.ts.map +1 -0
  515. package/lib/esm/RpcBackend.js +28 -0
  516. package/lib/esm/RpcBackend.js.map +1 -0
  517. package/lib/esm/SQLiteDb.d.ts +324 -0
  518. package/lib/esm/SQLiteDb.d.ts.map +1 -0
  519. package/lib/esm/SQLiteDb.js +380 -0
  520. package/lib/esm/SQLiteDb.js.map +1 -0
  521. package/lib/esm/Schema.d.ts +79 -0
  522. package/lib/esm/Schema.d.ts.map +1 -0
  523. package/lib/esm/Schema.js +113 -0
  524. package/lib/esm/Schema.js.map +1 -0
  525. package/lib/esm/SchemaSync.d.ts +47 -0
  526. package/lib/esm/SchemaSync.d.ts.map +1 -0
  527. package/lib/esm/SchemaSync.js +148 -0
  528. package/lib/esm/SchemaSync.js.map +1 -0
  529. package/lib/esm/SchemaUtils.d.ts +19 -0
  530. package/lib/esm/SchemaUtils.d.ts.map +1 -0
  531. package/lib/esm/SchemaUtils.js +37 -0
  532. package/lib/esm/SchemaUtils.js.map +1 -0
  533. package/lib/esm/SheetIndex.d.ts +148 -0
  534. package/lib/esm/SheetIndex.d.ts.map +1 -0
  535. package/lib/esm/SheetIndex.js +228 -0
  536. package/lib/esm/SheetIndex.js.map +1 -0
  537. package/lib/esm/SqliteChangesetReader.d.ts +278 -0
  538. package/lib/esm/SqliteChangesetReader.d.ts.map +1 -0
  539. package/lib/esm/SqliteChangesetReader.js +337 -0
  540. package/lib/esm/SqliteChangesetReader.js.map +1 -0
  541. package/lib/esm/SqliteStatement.d.ts +375 -0
  542. package/lib/esm/SqliteStatement.d.ts.map +1 -0
  543. package/lib/esm/SqliteStatement.js +615 -0
  544. package/lib/esm/SqliteStatement.js.map +1 -0
  545. package/lib/esm/TextAnnotationElement.d.ts +54 -0
  546. package/lib/esm/TextAnnotationElement.d.ts.map +1 -0
  547. package/lib/esm/TextAnnotationElement.js +89 -0
  548. package/lib/esm/TextAnnotationElement.js.map +1 -0
  549. package/lib/esm/TextAnnotationGeometry.d.ts +32 -0
  550. package/lib/esm/TextAnnotationGeometry.d.ts.map +1 -0
  551. package/lib/esm/TextAnnotationGeometry.js +181 -0
  552. package/lib/esm/TextAnnotationGeometry.js.map +1 -0
  553. package/lib/esm/TextAnnotationLayout.d.ts +177 -0
  554. package/lib/esm/TextAnnotationLayout.d.ts.map +1 -0
  555. package/lib/esm/TextAnnotationLayout.js +513 -0
  556. package/lib/esm/TextAnnotationLayout.js.map +1 -0
  557. package/lib/esm/Texture.d.ts +58 -0
  558. package/lib/esm/Texture.d.ts.map +1 -0
  559. package/lib/esm/Texture.js +81 -0
  560. package/lib/esm/Texture.js.map +1 -0
  561. package/lib/esm/TileStorage.d.ts +59 -0
  562. package/lib/esm/TileStorage.d.ts.map +1 -0
  563. package/lib/esm/TileStorage.js +158 -0
  564. package/lib/esm/TileStorage.js.map +1 -0
  565. package/lib/esm/TxnManager.d.ts +296 -0
  566. package/lib/esm/TxnManager.d.ts.map +1 -0
  567. package/lib/esm/TxnManager.js +620 -0
  568. package/lib/esm/TxnManager.js.map +1 -0
  569. package/lib/esm/ViewDefinition.d.ts +492 -0
  570. package/lib/esm/ViewDefinition.d.ts.map +1 -0
  571. package/lib/esm/ViewDefinition.js +846 -0
  572. package/lib/esm/ViewDefinition.js.map +1 -0
  573. package/lib/esm/ViewStateHydrator.d.ts +14 -0
  574. package/lib/esm/ViewStateHydrator.d.ts.map +1 -0
  575. package/lib/esm/ViewStateHydrator.js +89 -0
  576. package/lib/esm/ViewStateHydrator.js.map +1 -0
  577. package/lib/esm/ViewStore.d.ts +502 -0
  578. package/lib/esm/ViewStore.d.ts.map +1 -0
  579. package/lib/esm/ViewStore.js +1260 -0
  580. package/lib/esm/ViewStore.js.map +1 -0
  581. package/lib/esm/core-backend.d.ts +183 -0
  582. package/lib/esm/core-backend.d.ts.map +1 -0
  583. package/lib/esm/core-backend.js +187 -0
  584. package/lib/esm/core-backend.js.map +1 -0
  585. package/lib/esm/domains/FunctionalElements.d.ts +86 -0
  586. package/lib/esm/domains/FunctionalElements.d.ts.map +1 -0
  587. package/lib/esm/domains/FunctionalElements.js +117 -0
  588. package/lib/esm/domains/FunctionalElements.js.map +1 -0
  589. package/lib/esm/domains/FunctionalSchema.d.ts +14 -0
  590. package/lib/esm/domains/FunctionalSchema.d.ts.map +1 -0
  591. package/lib/esm/domains/FunctionalSchema.js +37 -0
  592. package/lib/esm/domains/FunctionalSchema.js.map +1 -0
  593. package/lib/esm/domains/GenericElements.d.ts +160 -0
  594. package/lib/esm/domains/GenericElements.d.ts.map +1 -0
  595. package/lib/esm/domains/GenericElements.js +225 -0
  596. package/lib/esm/domains/GenericElements.js.map +1 -0
  597. package/lib/esm/domains/GenericSchema.d.ts +11 -0
  598. package/lib/esm/domains/GenericSchema.d.ts.map +1 -0
  599. package/lib/esm/domains/GenericSchema.js +25 -0
  600. package/lib/esm/domains/GenericSchema.js.map +1 -0
  601. package/lib/esm/internal/ChangesetConflictArgs.d.ts +62 -0
  602. package/lib/esm/internal/ChangesetConflictArgs.d.ts.map +1 -0
  603. package/lib/esm/internal/ChangesetConflictArgs.js +104 -0
  604. package/lib/esm/internal/ChangesetConflictArgs.js.map +1 -0
  605. package/lib/esm/internal/ChannelAdmin.d.ts +34 -0
  606. package/lib/esm/internal/ChannelAdmin.d.ts.map +1 -0
  607. package/lib/esm/internal/ChannelAdmin.js +116 -0
  608. package/lib/esm/internal/ChannelAdmin.js.map +1 -0
  609. package/lib/esm/internal/ElementLRUCache.d.ts +28 -0
  610. package/lib/esm/internal/ElementLRUCache.d.ts.map +1 -0
  611. package/lib/esm/internal/ElementLRUCache.js +116 -0
  612. package/lib/esm/internal/ElementLRUCache.js.map +1 -0
  613. package/lib/esm/internal/FontFileImpl.d.ts +34 -0
  614. package/lib/esm/internal/FontFileImpl.d.ts.map +1 -0
  615. package/lib/esm/internal/FontFileImpl.js +135 -0
  616. package/lib/esm/internal/FontFileImpl.js.map +1 -0
  617. package/lib/esm/internal/HubMock.d.ts +94 -0
  618. package/lib/esm/internal/HubMock.d.ts.map +1 -0
  619. package/lib/esm/internal/HubMock.js +242 -0
  620. package/lib/esm/internal/HubMock.js.map +1 -0
  621. package/lib/esm/internal/IModelDbFontsImpl.d.ts +7 -0
  622. package/lib/esm/internal/IModelDbFontsImpl.d.ts.map +1 -0
  623. package/lib/esm/internal/IModelDbFontsImpl.js +183 -0
  624. package/lib/esm/internal/IModelDbFontsImpl.js.map +1 -0
  625. package/lib/esm/internal/NativePlatform.d.ts +15 -0
  626. package/lib/esm/internal/NativePlatform.d.ts.map +1 -0
  627. package/lib/esm/internal/NativePlatform.js +43 -0
  628. package/lib/esm/internal/NativePlatform.js.map +1 -0
  629. package/lib/esm/internal/NoLocks.d.ts +6 -0
  630. package/lib/esm/internal/NoLocks.d.ts.map +1 -0
  631. package/lib/esm/internal/NoLocks.js +24 -0
  632. package/lib/esm/internal/NoLocks.js.map +1 -0
  633. package/lib/esm/internal/ServerBasedLocks.d.ts +52 -0
  634. package/lib/esm/internal/ServerBasedLocks.d.ts.map +1 -0
  635. package/lib/esm/internal/ServerBasedLocks.js +175 -0
  636. package/lib/esm/internal/ServerBasedLocks.js.map +1 -0
  637. package/lib/esm/internal/Symbols.d.ts +20 -0
  638. package/lib/esm/internal/Symbols.d.ts.map +1 -0
  639. package/lib/esm/internal/Symbols.js +27 -0
  640. package/lib/esm/internal/Symbols.js.map +1 -0
  641. package/lib/esm/internal/cross-package.d.ts +4 -0
  642. package/lib/esm/internal/cross-package.d.ts.map +1 -0
  643. package/lib/esm/internal/cross-package.js +8 -0
  644. package/lib/esm/internal/cross-package.js.map +1 -0
  645. package/lib/esm/internal/workspace/SettingsImpl.d.ts +43 -0
  646. package/lib/esm/internal/workspace/SettingsImpl.d.ts.map +1 -0
  647. package/lib/esm/internal/workspace/SettingsImpl.js +154 -0
  648. package/lib/esm/internal/workspace/SettingsImpl.js.map +1 -0
  649. package/lib/esm/internal/workspace/SettingsSchemasImpl.d.ts +6 -0
  650. package/lib/esm/internal/workspace/SettingsSchemasImpl.d.ts.map +1 -0
  651. package/lib/esm/internal/workspace/SettingsSchemasImpl.js +268 -0
  652. package/lib/esm/internal/workspace/SettingsSchemasImpl.js.map +1 -0
  653. package/lib/esm/internal/workspace/WorkspaceImpl.d.ts +27 -0
  654. package/lib/esm/internal/workspace/WorkspaceImpl.d.ts.map +1 -0
  655. package/lib/esm/internal/workspace/WorkspaceImpl.js +627 -0
  656. package/lib/esm/internal/workspace/WorkspaceImpl.js.map +1 -0
  657. package/lib/esm/internal/workspace/WorkspaceSqliteDb.d.ts +10 -0
  658. package/lib/esm/internal/workspace/WorkspaceSqliteDb.d.ts.map +1 -0
  659. package/lib/esm/internal/workspace/WorkspaceSqliteDb.js +35 -0
  660. package/lib/esm/internal/workspace/WorkspaceSqliteDb.js.map +1 -0
  661. package/lib/esm/rpc/multipart.d.ts +12 -0
  662. package/lib/esm/rpc/multipart.d.ts.map +1 -0
  663. package/lib/esm/rpc/multipart.js +67 -0
  664. package/lib/esm/rpc/multipart.js.map +1 -0
  665. package/lib/esm/rpc/tracing.d.ts +29 -0
  666. package/lib/esm/rpc/tracing.d.ts.map +1 -0
  667. package/lib/esm/rpc/tracing.js +71 -0
  668. package/lib/esm/rpc/tracing.js.map +1 -0
  669. package/lib/esm/rpc/web/logging.d.ts +10 -0
  670. package/lib/esm/rpc/web/logging.d.ts.map +1 -0
  671. package/lib/esm/rpc/web/logging.js +41 -0
  672. package/lib/esm/rpc/web/logging.js.map +1 -0
  673. package/lib/esm/rpc/web/request.d.ts +7 -0
  674. package/lib/esm/rpc/web/request.d.ts.map +1 -0
  675. package/lib/esm/rpc/web/request.js +71 -0
  676. package/lib/esm/rpc/web/request.js.map +1 -0
  677. package/lib/esm/rpc/web/response.d.ts +7 -0
  678. package/lib/esm/rpc/web/response.d.ts.map +1 -0
  679. package/lib/esm/rpc/web/response.js +136 -0
  680. package/lib/esm/rpc/web/response.js.map +1 -0
  681. package/lib/esm/rpc-impl/DevToolsRpcImpl.d.ts +16 -0
  682. package/lib/esm/rpc-impl/DevToolsRpcImpl.d.ts.map +1 -0
  683. package/lib/esm/rpc-impl/DevToolsRpcImpl.js +29 -0
  684. package/lib/esm/rpc-impl/DevToolsRpcImpl.js.map +1 -0
  685. package/lib/esm/rpc-impl/IModelReadRpcImpl.d.ts +51 -0
  686. package/lib/esm/rpc-impl/IModelReadRpcImpl.d.ts.map +1 -0
  687. package/lib/esm/rpc-impl/IModelReadRpcImpl.js +314 -0
  688. package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -0
  689. package/lib/esm/rpc-impl/IModelTileRpcImpl.d.ts +21 -0
  690. package/lib/esm/rpc-impl/IModelTileRpcImpl.d.ts.map +1 -0
  691. package/lib/esm/rpc-impl/IModelTileRpcImpl.js +193 -0
  692. package/lib/esm/rpc-impl/IModelTileRpcImpl.js.map +1 -0
  693. package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts +45 -0
  694. package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -0
  695. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js +155 -0
  696. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -0
  697. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.d.ts +18 -0
  698. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.d.ts.map +1 -0
  699. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js +41 -0
  700. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -0
  701. package/lib/esm/test/AdvancedEqual.d.ts +38 -0
  702. package/lib/esm/test/AdvancedEqual.d.ts.map +1 -0
  703. package/lib/esm/test/AdvancedEqual.js +67 -0
  704. package/lib/esm/test/AdvancedEqual.js.map +1 -0
  705. package/lib/esm/test/AttachDb.test.d.ts +2 -0
  706. package/lib/esm/test/AttachDb.test.d.ts.map +1 -0
  707. package/lib/esm/test/AttachDb.test.js +157 -0
  708. package/lib/esm/test/AttachDb.test.js.map +1 -0
  709. package/lib/esm/test/ElementLRUCache.test.d.ts +2 -0
  710. package/lib/esm/test/ElementLRUCache.test.d.ts.map +1 -0
  711. package/lib/esm/test/ElementLRUCache.test.js +212 -0
  712. package/lib/esm/test/ElementLRUCache.test.js.map +1 -0
  713. package/lib/esm/test/GeometryTestUtil.d.ts +7 -0
  714. package/lib/esm/test/GeometryTestUtil.d.ts.map +1 -0
  715. package/lib/esm/test/GeometryTestUtil.js +25 -0
  716. package/lib/esm/test/GeometryTestUtil.js.map +1 -0
  717. package/lib/esm/test/IModelHost.test.d.ts +2 -0
  718. package/lib/esm/test/IModelHost.test.d.ts.map +1 -0
  719. package/lib/esm/test/IModelHost.test.js +187 -0
  720. package/lib/esm/test/IModelHost.test.js.map +1 -0
  721. package/lib/esm/test/IModelTestUtils.d.ts +177 -0
  722. package/lib/esm/test/IModelTestUtils.d.ts.map +1 -0
  723. package/lib/esm/test/IModelTestUtils.js +1146 -0
  724. package/lib/esm/test/IModelTestUtils.js.map +1 -0
  725. package/lib/esm/test/ImageSourceConversion.test.d.ts +2 -0
  726. package/lib/esm/test/ImageSourceConversion.test.d.ts.map +1 -0
  727. package/lib/esm/test/ImageSourceConversion.test.js +171 -0
  728. package/lib/esm/test/ImageSourceConversion.test.js.map +1 -0
  729. package/lib/esm/test/IpcHost.test.d.ts +2 -0
  730. package/lib/esm/test/IpcHost.test.d.ts.map +1 -0
  731. package/lib/esm/test/IpcHost.test.js +55 -0
  732. package/lib/esm/test/IpcHost.test.js.map +1 -0
  733. package/lib/esm/test/KnownTestLocations.d.ts +7 -0
  734. package/lib/esm/test/KnownTestLocations.d.ts.map +1 -0
  735. package/lib/esm/test/KnownTestLocations.js +27 -0
  736. package/lib/esm/test/KnownTestLocations.js.map +1 -0
  737. package/lib/esm/test/PrintElementTree.d.ts +7 -0
  738. package/lib/esm/test/PrintElementTree.d.ts.map +1 -0
  739. package/lib/esm/test/PrintElementTree.js +36 -0
  740. package/lib/esm/test/PrintElementTree.js.map +1 -0
  741. package/lib/esm/test/PropertyDb.test.d.ts +2 -0
  742. package/lib/esm/test/PropertyDb.test.d.ts.map +1 -0
  743. package/lib/esm/test/PropertyDb.test.js +71 -0
  744. package/lib/esm/test/PropertyDb.test.js.map +1 -0
  745. package/lib/esm/test/RevisionUtility.d.ts +33 -0
  746. package/lib/esm/test/RevisionUtility.d.ts.map +1 -0
  747. package/lib/esm/test/RevisionUtility.js +52 -0
  748. package/lib/esm/test/RevisionUtility.js.map +1 -0
  749. package/lib/esm/test/SchemaUtils.test.d.ts +2 -0
  750. package/lib/esm/test/SchemaUtils.test.d.ts.map +1 -0
  751. package/lib/esm/test/SchemaUtils.test.js +99 -0
  752. package/lib/esm/test/SchemaUtils.test.js.map +1 -0
  753. package/lib/esm/test/SequentialLogMatcher.d.ts +35 -0
  754. package/lib/esm/test/SequentialLogMatcher.d.ts.map +1 -0
  755. package/lib/esm/test/SequentialLogMatcher.js +130 -0
  756. package/lib/esm/test/SequentialLogMatcher.js.map +1 -0
  757. package/lib/esm/test/TestChangeSetUtility.d.ts +23 -0
  758. package/lib/esm/test/TestChangeSetUtility.d.ts.map +1 -0
  759. package/lib/esm/test/TestChangeSetUtility.js +65 -0
  760. package/lib/esm/test/TestChangeSetUtility.js.map +1 -0
  761. package/lib/esm/test/TestUtils.d.ts +38 -0
  762. package/lib/esm/test/TestUtils.d.ts.map +1 -0
  763. package/lib/esm/test/TestUtils.js +99 -0
  764. package/lib/esm/test/TestUtils.js.map +1 -0
  765. package/lib/esm/test/annotations/TextAnnotation.test.d.ts +2 -0
  766. package/lib/esm/test/annotations/TextAnnotation.test.d.ts.map +1 -0
  767. package/lib/esm/test/annotations/TextAnnotation.test.js +1135 -0
  768. package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -0
  769. package/lib/esm/test/categories/Category.test.d.ts +2 -0
  770. package/lib/esm/test/categories/Category.test.d.ts.map +1 -0
  771. package/lib/esm/test/categories/Category.test.js +51 -0
  772. package/lib/esm/test/categories/Category.test.js.map +1 -0
  773. package/lib/esm/test/codespec/CodeSpec.test.d.ts +2 -0
  774. package/lib/esm/test/codespec/CodeSpec.test.d.ts.map +1 -0
  775. package/lib/esm/test/codespec/CodeSpec.test.js +51 -0
  776. package/lib/esm/test/codespec/CodeSpec.test.js.map +1 -0
  777. package/lib/esm/test/ecdb/CTE.test.d.ts +2 -0
  778. package/lib/esm/test/ecdb/CTE.test.d.ts.map +1 -0
  779. package/lib/esm/test/ecdb/CTE.test.js +177 -0
  780. package/lib/esm/test/ecdb/CTE.test.js.map +1 -0
  781. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.d.ts +2 -0
  782. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.d.ts.map +1 -0
  783. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +167 -0
  784. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -0
  785. package/lib/esm/test/ecdb/ECDb.test.d.ts +2 -0
  786. package/lib/esm/test/ecdb/ECDb.test.d.ts.map +1 -0
  787. package/lib/esm/test/ecdb/ECDb.test.js +653 -0
  788. package/lib/esm/test/ecdb/ECDb.test.js.map +1 -0
  789. package/lib/esm/test/ecdb/ECDbTestHelper.d.ts +5 -0
  790. package/lib/esm/test/ecdb/ECDbTestHelper.d.ts.map +1 -0
  791. package/lib/esm/test/ecdb/ECDbTestHelper.js +28 -0
  792. package/lib/esm/test/ecdb/ECDbTestHelper.js.map +1 -0
  793. package/lib/esm/test/ecdb/ECSchemaXmlContext.test.d.ts +2 -0
  794. package/lib/esm/test/ecdb/ECSchemaXmlContext.test.d.ts.map +1 -0
  795. package/lib/esm/test/ecdb/ECSchemaXmlContext.test.js +63 -0
  796. package/lib/esm/test/ecdb/ECSchemaXmlContext.test.js.map +1 -0
  797. package/lib/esm/test/ecdb/ECSqlAst.test.d.ts +5 -0
  798. package/lib/esm/test/ecdb/ECSqlAst.test.d.ts.map +1 -0
  799. package/lib/esm/test/ecdb/ECSqlAst.test.js +972 -0
  800. package/lib/esm/test/ecdb/ECSqlAst.test.js.map +1 -0
  801. package/lib/esm/test/ecdb/ECSqlQuery.test.d.ts +2 -0
  802. package/lib/esm/test/ecdb/ECSqlQuery.test.d.ts.map +1 -0
  803. package/lib/esm/test/ecdb/ECSqlQuery.test.js +753 -0
  804. package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -0
  805. package/lib/esm/test/ecdb/ECSqlReader.test.d.ts +2 -0
  806. package/lib/esm/test/ecdb/ECSqlReader.test.d.ts.map +1 -0
  807. package/lib/esm/test/ecdb/ECSqlReader.test.js +669 -0
  808. package/lib/esm/test/ecdb/ECSqlReader.test.js.map +1 -0
  809. package/lib/esm/test/ecdb/ECSqlStatement.test.d.ts +2 -0
  810. package/lib/esm/test/ecdb/ECSqlStatement.test.d.ts.map +1 -0
  811. package/lib/esm/test/ecdb/ECSqlStatement.test.js +3329 -0
  812. package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -0
  813. package/lib/esm/test/ecdb/SqliteStatement.test.d.ts +2 -0
  814. package/lib/esm/test/ecdb/SqliteStatement.test.d.ts.map +1 -0
  815. package/lib/esm/test/ecdb/SqliteStatement.test.js +510 -0
  816. package/lib/esm/test/ecdb/SqliteStatement.test.js.map +1 -0
  817. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.d.ts +4 -0
  818. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.d.ts.map +1 -0
  819. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js +127 -0
  820. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js.map +1 -0
  821. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.d.ts +2 -0
  822. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.d.ts.map +1 -0
  823. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js +197 -0
  824. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js.map +1 -0
  825. package/lib/esm/test/ecsql/src/ECSqlTestParser.d.ts +66 -0
  826. package/lib/esm/test/ecsql/src/ECSqlTestParser.d.ts.map +1 -0
  827. package/lib/esm/test/ecsql/src/ECSqlTestParser.js +420 -0
  828. package/lib/esm/test/ecsql/src/ECSqlTestParser.js.map +1 -0
  829. package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.d.ts +2 -0
  830. package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.d.ts.map +1 -0
  831. package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js +369 -0
  832. package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js.map +1 -0
  833. package/lib/esm/test/element/DeleteDefinitionElements.test.d.ts +2 -0
  834. package/lib/esm/test/element/DeleteDefinitionElements.test.d.ts.map +1 -0
  835. package/lib/esm/test/element/DeleteDefinitionElements.test.js +208 -0
  836. package/lib/esm/test/element/DeleteDefinitionElements.test.js.map +1 -0
  837. package/lib/esm/test/element/ElementAspect.test.d.ts +2 -0
  838. package/lib/esm/test/element/ElementAspect.test.d.ts.map +1 -0
  839. package/lib/esm/test/element/ElementAspect.test.js +363 -0
  840. package/lib/esm/test/element/ElementAspect.test.js.map +1 -0
  841. package/lib/esm/test/element/ElementDependencyGraph.test.d.ts +2 -0
  842. package/lib/esm/test/element/ElementDependencyGraph.test.d.ts.map +1 -0
  843. package/lib/esm/test/element/ElementDependencyGraph.test.js +383 -0
  844. package/lib/esm/test/element/ElementDependencyGraph.test.js.map +1 -0
  845. package/lib/esm/test/element/ElementRoundTrip.test.d.ts +2 -0
  846. package/lib/esm/test/element/ElementRoundTrip.test.d.ts.map +1 -0
  847. package/lib/esm/test/element/ElementRoundTrip.test.js +926 -0
  848. package/lib/esm/test/element/ElementRoundTrip.test.js.map +1 -0
  849. package/lib/esm/test/element/ExcludedElements.test.d.ts +2 -0
  850. package/lib/esm/test/element/ExcludedElements.test.d.ts.map +1 -0
  851. package/lib/esm/test/element/ExcludedElements.test.js +57 -0
  852. package/lib/esm/test/element/ExcludedElements.test.js.map +1 -0
  853. package/lib/esm/test/element/ExternalSource.test.d.ts +2 -0
  854. package/lib/esm/test/element/ExternalSource.test.d.ts.map +1 -0
  855. package/lib/esm/test/element/ExternalSource.test.js +107 -0
  856. package/lib/esm/test/element/ExternalSource.test.js.map +1 -0
  857. package/lib/esm/test/element/NullStructArray.test.d.ts +2 -0
  858. package/lib/esm/test/element/NullStructArray.test.d.ts.map +1 -0
  859. package/lib/esm/test/element/NullStructArray.test.js +77 -0
  860. package/lib/esm/test/element/NullStructArray.test.js.map +1 -0
  861. package/lib/esm/test/element/UrlLink.test.d.ts +2 -0
  862. package/lib/esm/test/element/UrlLink.test.d.ts.map +1 -0
  863. package/lib/esm/test/element/UrlLink.test.js +36 -0
  864. package/lib/esm/test/element/UrlLink.test.js.map +1 -0
  865. package/lib/esm/test/font/FontFile.test.d.ts +2 -0
  866. package/lib/esm/test/font/FontFile.test.d.ts.map +1 -0
  867. package/lib/esm/test/font/FontFile.test.js +139 -0
  868. package/lib/esm/test/font/FontFile.test.js.map +1 -0
  869. package/lib/esm/test/font/IModelDbFonts.test.d.ts +2 -0
  870. package/lib/esm/test/font/IModelDbFonts.test.d.ts.map +1 -0
  871. package/lib/esm/test/font/IModelDbFonts.test.js +266 -0
  872. package/lib/esm/test/font/IModelDbFonts.test.js.map +1 -0
  873. package/lib/esm/test/hubaccess/BriefcaseManager.test.d.ts +2 -0
  874. package/lib/esm/test/hubaccess/BriefcaseManager.test.d.ts.map +1 -0
  875. package/lib/esm/test/hubaccess/BriefcaseManager.test.js +176 -0
  876. package/lib/esm/test/hubaccess/BriefcaseManager.test.js.map +1 -0
  877. package/lib/esm/test/hubaccess/CheckpointManager.test.d.ts +2 -0
  878. package/lib/esm/test/hubaccess/CheckpointManager.test.d.ts.map +1 -0
  879. package/lib/esm/test/hubaccess/CheckpointManager.test.js +52 -0
  880. package/lib/esm/test/hubaccess/CheckpointManager.test.js.map +1 -0
  881. package/lib/esm/test/imageData.d.ts +9 -0
  882. package/lib/esm/test/imageData.d.ts.map +1 -0
  883. package/lib/esm/test/imageData.js +16 -0
  884. package/lib/esm/test/imageData.js.map +1 -0
  885. package/lib/esm/test/imodel/ElementTreeWalker.test.d.ts +2 -0
  886. package/lib/esm/test/imodel/ElementTreeWalker.test.d.ts.map +1 -0
  887. package/lib/esm/test/imodel/ElementTreeWalker.test.js +383 -0
  888. package/lib/esm/test/imodel/ElementTreeWalker.test.js.map +1 -0
  889. package/lib/esm/test/imodel/GetTextureImage.test.d.ts +2 -0
  890. package/lib/esm/test/imodel/GetTextureImage.test.d.ts.map +1 -0
  891. package/lib/esm/test/imodel/GetTextureImage.test.js +29 -0
  892. package/lib/esm/test/imodel/GetTextureImage.test.js.map +1 -0
  893. package/lib/esm/test/imodel/IModel.test.d.ts +2 -0
  894. package/lib/esm/test/imodel/IModel.test.d.ts.map +1 -0
  895. package/lib/esm/test/imodel/IModel.test.js +2626 -0
  896. package/lib/esm/test/imodel/IModel.test.js.map +1 -0
  897. package/lib/esm/test/imodel/ProjectExtents.test.d.ts +2 -0
  898. package/lib/esm/test/imodel/ProjectExtents.test.d.ts.map +1 -0
  899. package/lib/esm/test/imodel/ProjectExtents.test.js +66 -0
  900. package/lib/esm/test/imodel/ProjectExtents.test.js.map +1 -0
  901. package/lib/esm/test/imodel/SchemaXmlImport.test.d.ts +2 -0
  902. package/lib/esm/test/imodel/SchemaXmlImport.test.d.ts.map +1 -0
  903. package/lib/esm/test/imodel/SchemaXmlImport.test.js +74 -0
  904. package/lib/esm/test/imodel/SchemaXmlImport.test.js.map +1 -0
  905. package/lib/esm/test/index.d.ts +7 -0
  906. package/lib/esm/test/index.d.ts.map +1 -0
  907. package/lib/esm/test/index.js +11 -0
  908. package/lib/esm/test/index.js.map +1 -0
  909. package/lib/esm/test/misc/DevTools.test.d.ts +2 -0
  910. package/lib/esm/test/misc/DevTools.test.d.ts.map +1 -0
  911. package/lib/esm/test/misc/DevTools.test.js +72 -0
  912. package/lib/esm/test/misc/DevTools.test.js.map +1 -0
  913. package/lib/esm/test/misc/EntitySubClasses.test.d.ts +2 -0
  914. package/lib/esm/test/misc/EntitySubClasses.test.d.ts.map +1 -0
  915. package/lib/esm/test/misc/EntitySubClasses.test.js +106 -0
  916. package/lib/esm/test/misc/EntitySubClasses.test.js.map +1 -0
  917. package/lib/esm/test/misc/GeoServices.test.d.ts +2 -0
  918. package/lib/esm/test/misc/GeoServices.test.d.ts.map +1 -0
  919. package/lib/esm/test/misc/GeoServices.test.js +850 -0
  920. package/lib/esm/test/misc/GeoServices.test.js.map +1 -0
  921. package/lib/esm/test/misc/PromiseMemoizer.test.d.ts +2 -0
  922. package/lib/esm/test/misc/PromiseMemoizer.test.d.ts.map +1 -0
  923. package/lib/esm/test/misc/PromiseMemoizer.test.js +111 -0
  924. package/lib/esm/test/misc/PromiseMemoizer.test.js.map +1 -0
  925. package/lib/esm/test/native/DgnDbWorker.test.d.ts +2 -0
  926. package/lib/esm/test/native/DgnDbWorker.test.d.ts.map +1 -0
  927. package/lib/esm/test/native/DgnDbWorker.test.js +159 -0
  928. package/lib/esm/test/native/DgnDbWorker.test.js.map +1 -0
  929. package/lib/esm/test/rpc/response.test.d.ts +2 -0
  930. package/lib/esm/test/rpc/response.test.d.ts.map +1 -0
  931. package/lib/esm/test/rpc/response.test.js +112 -0
  932. package/lib/esm/test/rpc/response.test.js.map +1 -0
  933. package/lib/esm/test/schema/ClassRegistry.test.d.ts +2 -0
  934. package/lib/esm/test/schema/ClassRegistry.test.d.ts.map +1 -0
  935. package/lib/esm/test/schema/ClassRegistry.test.js +679 -0
  936. package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -0
  937. package/lib/esm/test/schema/FunctionalDomain.test.d.ts +2 -0
  938. package/lib/esm/test/schema/FunctionalDomain.test.d.ts.map +1 -0
  939. package/lib/esm/test/schema/FunctionalDomain.test.js +490 -0
  940. package/lib/esm/test/schema/FunctionalDomain.test.js.map +1 -0
  941. package/lib/esm/test/schema/GenericDomain.test.d.ts +2 -0
  942. package/lib/esm/test/schema/GenericDomain.test.d.ts.map +1 -0
  943. package/lib/esm/test/schema/GenericDomain.test.js +133 -0
  944. package/lib/esm/test/schema/GenericDomain.test.js.map +1 -0
  945. package/lib/esm/test/schema/IModelSchemaContext.test.d.ts +2 -0
  946. package/lib/esm/test/schema/IModelSchemaContext.test.d.ts.map +1 -0
  947. package/lib/esm/test/schema/IModelSchemaContext.test.js +95 -0
  948. package/lib/esm/test/schema/IModelSchemaContext.test.js.map +1 -0
  949. package/lib/esm/test/sheetindex/SheetIndex.test.d.ts +4 -0
  950. package/lib/esm/test/sheetindex/SheetIndex.test.d.ts.map +1 -0
  951. package/lib/esm/test/sheetindex/SheetIndex.test.js +312 -0
  952. package/lib/esm/test/sheetindex/SheetIndex.test.js.map +1 -0
  953. package/lib/esm/test/standalone/ChangeMerge.test.d.ts +2 -0
  954. package/lib/esm/test/standalone/ChangeMerge.test.d.ts.map +1 -0
  955. package/lib/esm/test/standalone/ChangeMerge.test.js +409 -0
  956. package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -0
  957. package/lib/esm/test/standalone/ChangesetReader.test.d.ts +2 -0
  958. package/lib/esm/test/standalone/ChangesetReader.test.d.ts.map +1 -0
  959. package/lib/esm/test/standalone/ChangesetReader.test.js +891 -0
  960. package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -0
  961. package/lib/esm/test/standalone/CustomViewState3dCreator.test.d.ts +2 -0
  962. package/lib/esm/test/standalone/CustomViewState3dCreator.test.d.ts.map +1 -0
  963. package/lib/esm/test/standalone/CustomViewState3dCreator.test.js +49 -0
  964. package/lib/esm/test/standalone/CustomViewState3dCreator.test.js.map +1 -0
  965. package/lib/esm/test/standalone/DisplayStyle.test.d.ts +2 -0
  966. package/lib/esm/test/standalone/DisplayStyle.test.d.ts.map +1 -0
  967. package/lib/esm/test/standalone/DisplayStyle.test.js +136 -0
  968. package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -0
  969. package/lib/esm/test/standalone/Drawing.test.d.ts +2 -0
  970. package/lib/esm/test/standalone/Drawing.test.d.ts.map +1 -0
  971. package/lib/esm/test/standalone/Drawing.test.js +120 -0
  972. package/lib/esm/test/standalone/Drawing.test.js.map +1 -0
  973. package/lib/esm/test/standalone/ElementGraphics.test.d.ts +2 -0
  974. package/lib/esm/test/standalone/ElementGraphics.test.d.ts.map +1 -0
  975. package/lib/esm/test/standalone/ElementGraphics.test.js +127 -0
  976. package/lib/esm/test/standalone/ElementGraphics.test.js.map +1 -0
  977. package/lib/esm/test/standalone/ElementMesh.test.d.ts +2 -0
  978. package/lib/esm/test/standalone/ElementMesh.test.d.ts.map +1 -0
  979. package/lib/esm/test/standalone/ElementMesh.test.js +142 -0
  980. package/lib/esm/test/standalone/ElementMesh.test.js.map +1 -0
  981. package/lib/esm/test/standalone/ExportGraphics.test.d.ts +2 -0
  982. package/lib/esm/test/standalone/ExportGraphics.test.d.ts.map +1 -0
  983. package/lib/esm/test/standalone/ExportGraphics.test.js +1005 -0
  984. package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -0
  985. package/lib/esm/test/standalone/GeometryChangeEvents.test.d.ts +2 -0
  986. package/lib/esm/test/standalone/GeometryChangeEvents.test.d.ts.map +1 -0
  987. package/lib/esm/test/standalone/GeometryChangeEvents.test.js +139 -0
  988. package/lib/esm/test/standalone/GeometryChangeEvents.test.js.map +1 -0
  989. package/lib/esm/test/standalone/GeometryStream.test.d.ts +2 -0
  990. package/lib/esm/test/standalone/GeometryStream.test.d.ts.map +1 -0
  991. package/lib/esm/test/standalone/GeometryStream.test.js +2869 -0
  992. package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -0
  993. package/lib/esm/test/standalone/HubMock.test.d.ts +2 -0
  994. package/lib/esm/test/standalone/HubMock.test.d.ts.map +1 -0
  995. package/lib/esm/test/standalone/HubMock.test.js +343 -0
  996. package/lib/esm/test/standalone/HubMock.test.js.map +1 -0
  997. package/lib/esm/test/standalone/IModelWrite.test.d.ts +7 -0
  998. package/lib/esm/test/standalone/IModelWrite.test.d.ts.map +1 -0
  999. package/lib/esm/test/standalone/IModelWrite.test.js +907 -0
  1000. package/lib/esm/test/standalone/IModelWrite.test.js.map +1 -0
  1001. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.d.ts +2 -0
  1002. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.d.ts.map +1 -0
  1003. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js +417 -0
  1004. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js.map +1 -0
  1005. package/lib/esm/test/standalone/MergeConflict.test.d.ts +7 -0
  1006. package/lib/esm/test/standalone/MergeConflict.test.d.ts.map +1 -0
  1007. package/lib/esm/test/standalone/MergeConflict.test.js +345 -0
  1008. package/lib/esm/test/standalone/MergeConflict.test.js.map +1 -0
  1009. package/lib/esm/test/standalone/NativeAppStorage.test.d.ts +2 -0
  1010. package/lib/esm/test/standalone/NativeAppStorage.test.d.ts.map +1 -0
  1011. package/lib/esm/test/standalone/NativeAppStorage.test.js +121 -0
  1012. package/lib/esm/test/standalone/NativeAppStorage.test.js.map +1 -0
  1013. package/lib/esm/test/standalone/RenderMaterialElement.test.d.ts +2 -0
  1014. package/lib/esm/test/standalone/RenderMaterialElement.test.d.ts.map +1 -0
  1015. package/lib/esm/test/standalone/RenderMaterialElement.test.js +399 -0
  1016. package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -0
  1017. package/lib/esm/test/standalone/RenderTimeline.test.d.ts +2 -0
  1018. package/lib/esm/test/standalone/RenderTimeline.test.d.ts.map +1 -0
  1019. package/lib/esm/test/standalone/RenderTimeline.test.js +71 -0
  1020. package/lib/esm/test/standalone/RenderTimeline.test.js.map +1 -0
  1021. package/lib/esm/test/standalone/SQLiteDb.test.d.ts +2 -0
  1022. package/lib/esm/test/standalone/SQLiteDb.test.d.ts.map +1 -0
  1023. package/lib/esm/test/standalone/SQLiteDb.test.js +63 -0
  1024. package/lib/esm/test/standalone/SQLiteDb.test.js.map +1 -0
  1025. package/lib/esm/test/standalone/SchemaUtils.test.d.ts +2 -0
  1026. package/lib/esm/test/standalone/SchemaUtils.test.d.ts.map +1 -0
  1027. package/lib/esm/test/standalone/SchemaUtils.test.js +25 -0
  1028. package/lib/esm/test/standalone/SchemaUtils.test.js.map +1 -0
  1029. package/lib/esm/test/standalone/SectionDrawing.test.d.ts +2 -0
  1030. package/lib/esm/test/standalone/SectionDrawing.test.d.ts.map +1 -0
  1031. package/lib/esm/test/standalone/SectionDrawing.test.js +83 -0
  1032. package/lib/esm/test/standalone/SectionDrawing.test.js.map +1 -0
  1033. package/lib/esm/test/standalone/ServerBasedLocks.test.d.ts +2 -0
  1034. package/lib/esm/test/standalone/ServerBasedLocks.test.d.ts.map +1 -0
  1035. package/lib/esm/test/standalone/ServerBasedLocks.test.js +279 -0
  1036. package/lib/esm/test/standalone/ServerBasedLocks.test.js.map +1 -0
  1037. package/lib/esm/test/standalone/Setting.test.d.ts +2 -0
  1038. package/lib/esm/test/standalone/Setting.test.d.ts.map +1 -0
  1039. package/lib/esm/test/standalone/Setting.test.js +76 -0
  1040. package/lib/esm/test/standalone/Setting.test.js.map +1 -0
  1041. package/lib/esm/test/standalone/Settings.test.d.ts +2 -0
  1042. package/lib/esm/test/standalone/Settings.test.d.ts.map +1 -0
  1043. package/lib/esm/test/standalone/Settings.test.js +349 -0
  1044. package/lib/esm/test/standalone/Settings.test.js.map +1 -0
  1045. package/lib/esm/test/standalone/SettingsSchemas.test.d.ts +2 -0
  1046. package/lib/esm/test/standalone/SettingsSchemas.test.d.ts.map +1 -0
  1047. package/lib/esm/test/standalone/SettingsSchemas.test.js +31 -0
  1048. package/lib/esm/test/standalone/SettingsSchemas.test.js.map +1 -0
  1049. package/lib/esm/test/standalone/SnapshotDb.test.d.ts +2 -0
  1050. package/lib/esm/test/standalone/SnapshotDb.test.d.ts.map +1 -0
  1051. package/lib/esm/test/standalone/SnapshotDb.test.js +156 -0
  1052. package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -0
  1053. package/lib/esm/test/standalone/Texture.test.d.ts +2 -0
  1054. package/lib/esm/test/standalone/Texture.test.d.ts.map +1 -0
  1055. package/lib/esm/test/standalone/Texture.test.js +90 -0
  1056. package/lib/esm/test/standalone/Texture.test.js.map +1 -0
  1057. package/lib/esm/test/standalone/TileCache.test.d.ts +9 -0
  1058. package/lib/esm/test/standalone/TileCache.test.d.ts.map +1 -0
  1059. package/lib/esm/test/standalone/TileCache.test.js +127 -0
  1060. package/lib/esm/test/standalone/TileCache.test.js.map +1 -0
  1061. package/lib/esm/test/standalone/TileTree.test.d.ts +2 -0
  1062. package/lib/esm/test/standalone/TileTree.test.d.ts.map +1 -0
  1063. package/lib/esm/test/standalone/TileTree.test.js +241 -0
  1064. package/lib/esm/test/standalone/TileTree.test.js.map +1 -0
  1065. package/lib/esm/test/standalone/TxnManager.test.d.ts +2 -0
  1066. package/lib/esm/test/standalone/TxnManager.test.d.ts.map +1 -0
  1067. package/lib/esm/test/standalone/TxnManager.test.js +878 -0
  1068. package/lib/esm/test/standalone/TxnManager.test.js.map +1 -0
  1069. package/lib/esm/test/standalone/ViewDefinition.test.d.ts +2 -0
  1070. package/lib/esm/test/standalone/ViewDefinition.test.d.ts.map +1 -0
  1071. package/lib/esm/test/standalone/ViewDefinition.test.js +279 -0
  1072. package/lib/esm/test/standalone/ViewDefinition.test.js.map +1 -0
  1073. package/lib/esm/test/standalone/ViewStoreDb.test.d.ts +2 -0
  1074. package/lib/esm/test/standalone/ViewStoreDb.test.d.ts.map +1 -0
  1075. package/lib/esm/test/standalone/ViewStoreDb.test.js +288 -0
  1076. package/lib/esm/test/standalone/ViewStoreDb.test.js.map +1 -0
  1077. package/lib/esm/test/standalone/Workspace.test.d.ts +2 -0
  1078. package/lib/esm/test/standalone/Workspace.test.d.ts.map +1 -0
  1079. package/lib/esm/test/standalone/Workspace.test.js +162 -0
  1080. package/lib/esm/test/standalone/Workspace.test.js.map +1 -0
  1081. package/lib/esm/workspace/Settings.d.ts +216 -0
  1082. package/lib/esm/workspace/Settings.d.ts.map +1 -0
  1083. package/lib/esm/workspace/Settings.js +83 -0
  1084. package/lib/esm/workspace/Settings.js.map +1 -0
  1085. package/lib/esm/workspace/SettingsSchemas.d.ts +135 -0
  1086. package/lib/esm/workspace/SettingsSchemas.d.ts.map +1 -0
  1087. package/lib/esm/workspace/SettingsSchemas.js +9 -0
  1088. package/lib/esm/workspace/SettingsSchemas.js.map +1 -0
  1089. package/lib/esm/workspace/Workspace.d.ts +500 -0
  1090. package/lib/esm/workspace/Workspace.d.ts.map +1 -0
  1091. package/lib/esm/workspace/Workspace.js +97 -0
  1092. package/lib/esm/workspace/Workspace.js.map +1 -0
  1093. package/lib/esm/workspace/WorkspaceEditor.d.ts +240 -0
  1094. package/lib/esm/workspace/WorkspaceEditor.d.ts.map +1 -0
  1095. package/lib/esm/workspace/WorkspaceEditor.js +31 -0
  1096. package/lib/esm/workspace/WorkspaceEditor.js.map +1 -0
  1097. package/package.json +37 -29
  1098. package/lib/cjs/HubMock.d.ts.map +0 -1
  1099. package/lib/cjs/HubMock.js.map +0 -1
  1100. package/lib/cjs/IModelCloneContext.d.ts +0 -9
  1101. package/lib/cjs/IModelCloneContext.d.ts.map +0 -1
  1102. package/lib/cjs/IModelCloneContext.js.map +0 -1
@@ -0,0 +1,1876 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module Elements
7
+ */
8
+ import { CompressedId64Set, Id64, JsonUtils, OrderedId64Array } from "@itwin/core-bentley";
9
+ import { BisCodeSpec, Code, ConcreteEntityTypes, IModel, Placement2d, Placement3d, RelatedElement, RenderSchedule, SectionType, TypeDefinition } from "@itwin/core-common";
10
+ import { ClipVector, Range3d, Transform, YawPitchRollAngles } from "@itwin/core-geometry";
11
+ import { Entity } from "./Entity";
12
+ import { DefinitionModel, DrawingModel, PhysicalModel, SectionDrawingModel } from "./Model";
13
+ import { SubjectOwnsSubjects } from "./NavigationRelationship";
14
+ import { _cache, _elementWasCreated, _nativeDb, _verifyChannel } from "./internal/Symbols";
15
+ /** The smallest individually identifiable building block for modeling the real world in an iModel.
16
+ * Each element represents an [[Entity]] in the real world. Sets of Elements (contained in [[Model]]s) are used to model
17
+ * other Elements that represent larger scale real world entities. Using this recursive modeling strategy,
18
+ * Elements can represent entities at any scale. Elements can represent physical things or abstract concepts
19
+ * or simply be information records.
20
+ *
21
+ * Every Element has a 64-bit id (inherited from Entity) that uniquely identifies it within an iModel. Every Element also
22
+ * has a [[code]] that identifies its meaning in the real world. Additionally, Elements may have a [[federationGuid]]
23
+ * to hold a GUID, if the element was assigned that GUID by some other federated database. The iModel database enforces
24
+ * uniqueness of id, code, and federationGuid.
25
+ *
26
+ * The Element class provides `static` methods like [[onInsert]], [[onUpdated]], [[onCloned]], and [[onChildAdded]] that enable
27
+ * it to customize persistence operations. For example, the base implementations of [[onInsert]], [[onUpdate]], and [[onDelete]]
28
+ * validate that the appropriate [locks]($docs/learning/backend/ConcurrencyControl.md), [codes]($docs/learning/backend/CodeService.md),
29
+ * and [channel permissions]($docs/learning/backend/Channel.md) are obtained before a change to the element is written to the iModel.
30
+ * A subclass of Element that overrides any of these methods **must** call the `super` method as well. An application that supplies its
31
+ * own Element subclasses should register them at startup via [[ClassRegistry.registerModule]] or [[ClassRegistry.register]].
32
+ *
33
+ * See:
34
+ * * [Element Fundamentals]($docs/bis/guide/fundamentals/element-fundamentals.md)
35
+ * * [Working with schemas and elements in TypeScript]($docs/learning/backend/SchemasAndElementsInTypeScript.md)
36
+ * * [Creating elements]($docs/learning/backend/CreateElements.md)
37
+ * @public
38
+ */
39
+ export class Element extends Entity {
40
+ static get className() { return "Element"; }
41
+ /** @internal */
42
+ static get protectedOperations() { return ["onInsert", "onUpdate", "onDelete"]; }
43
+ /** The ModelId of the [Model]($docs/bis/guide/fundamentals/model-fundamentals.md) containing this element */
44
+ model;
45
+ /** The [Code]($docs/bis/guide/fundamentals/codes.md) for this element */
46
+ code;
47
+ /** The parent element, if present, of this element. */
48
+ parent;
49
+ /** A [FederationGuid]($docs/bis/guide/fundamentals/element-fundamentals.md#federationguid) assigned to this element by some other federated database */
50
+ federationGuid;
51
+ /** A [user-assigned label]($docs/bis/guide/fundamentals/element-fundamentals.md#userlabel) for this element. */
52
+ userLabel;
53
+ /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this element. */
54
+ jsonProperties;
55
+ constructor(props, iModel) {
56
+ super(props, iModel);
57
+ this.code = Code.fromJSON(props.code); // TODO: Validate props.code - don't silently fail if it is the wrong type
58
+ this.model = RelatedElement.idFromJson(props.model);
59
+ this.parent = RelatedElement.fromJSON(props.parent);
60
+ this.federationGuid = props.federationGuid;
61
+ this.userLabel = props.userLabel;
62
+ this.jsonProperties = { ...props.jsonProperties }; // make sure we have our own copy
63
+ }
64
+ /**
65
+ * Element custom HandledProps include 'codeValue', 'codeSpec', 'codeScope', 'model', 'parent', 'federationGuid', and 'lastMod'.
66
+ * @inheritdoc
67
+ * @beta
68
+ */
69
+ static _customHandledProps = [
70
+ { propertyName: "codeValue", source: "Class" },
71
+ { propertyName: "codeSpec", source: "Class" },
72
+ { propertyName: "codeScope", source: "Class" },
73
+ { propertyName: "model", source: "Class" },
74
+ { propertyName: "parent", source: "Class" },
75
+ { propertyName: "federationGuid", source: "Class" },
76
+ { propertyName: "lastMod", source: "Class" },
77
+ ];
78
+ /**
79
+ * Element deserializes 'codeValue', 'codeSpec', 'codeScope', 'model', 'parent', and 'federationGuid'.
80
+ * @inheritdoc
81
+ * @beta
82
+ */
83
+ static deserialize(props) {
84
+ const elProps = super.deserialize(props);
85
+ const instance = props.row;
86
+ elProps.code = { value: instance.codeValue ?? "", spec: instance.codeSpec.id, scope: instance.codeScope.id };
87
+ elProps.model = instance.model.id;
88
+ if (instance.parent)
89
+ elProps.parent = instance.parent;
90
+ if (instance.federationGuid)
91
+ elProps.federationGuid = instance.federationGuid;
92
+ return elProps;
93
+ }
94
+ /**
95
+ * Element serialize 'codeValue', 'codeSpec', 'codeScope', 'model', 'parent', and 'federationGuid'.
96
+ * @inheritdoc
97
+ * @beta
98
+ */
99
+ static serialize(props, iModel) {
100
+ const inst = super.serialize(props, iModel);
101
+ inst.codeValue = props.code.value;
102
+ inst.codeSpec = { id: props.code.spec };
103
+ inst.codeScope = { id: props.code.scope };
104
+ inst.model = { id: props.model };
105
+ inst.parent = props.parent;
106
+ inst.federationGuid = props.federationGuid ?? iModel[_nativeDb].newBeGuid();
107
+ return inst;
108
+ }
109
+ /** Called before a new Element is inserted.
110
+ * @note throw an exception to disallow the insert
111
+ * @note If you override this method, you must call super.
112
+ * @note `this` is the class of the Element to be inserted
113
+ * @beta
114
+ */
115
+ static onInsert(arg) {
116
+ const { iModel, props } = arg;
117
+ const operation = "insert";
118
+ iModel.channels[_verifyChannel](arg.props.model);
119
+ iModel.locks.checkSharedLock(props.model, "model", operation); // inserting requires shared lock on model
120
+ if (props.parent) // inserting requires shared lock on parent, if present
121
+ iModel.locks.checkSharedLock(props.parent.id, "parent", operation);
122
+ iModel.codeService?.verifyCode(arg);
123
+ }
124
+ /** Called after a new Element was inserted.
125
+ * @note If you override this method, you must call super.
126
+ * @note `this` is the class of the Element that was inserted
127
+ * @beta
128
+ */
129
+ static onInserted(arg) {
130
+ const locks = arg.iModel.locks;
131
+ if (locks && !locks.holdsExclusiveLock(arg.model))
132
+ locks[_elementWasCreated](arg.id);
133
+ arg.iModel.models[_cache].delete(arg.model);
134
+ }
135
+ /** Called before an Element is updated.
136
+ * @note throw an exception to disallow the update
137
+ * @note If you override this method, you must call super.
138
+ * @note `this` is the class of the Element to be updated
139
+ * @beta
140
+ */
141
+ static onUpdate(arg) {
142
+ const { iModel, props } = arg;
143
+ iModel.channels[_verifyChannel](props.model);
144
+ iModel.locks.checkExclusiveLock(props.id, "element", "update"); // eslint-disable-line @typescript-eslint/no-non-null-assertion
145
+ iModel.codeService?.verifyCode(arg);
146
+ }
147
+ /** Called after an Element was updated.
148
+ * @note If you override this method, you must call super.
149
+ * @note `this` is the class of the Element that was updated
150
+ * @beta
151
+ */
152
+ static onUpdated(arg) {
153
+ arg.iModel.elements[_cache].delete({ id: arg.id });
154
+ arg.iModel.models[_cache].delete(arg.model);
155
+ }
156
+ /** Called before an Element is deleted.
157
+ * @note throw an exception to disallow the delete
158
+ * @note If you override this method, you must call super.
159
+ * @note `this` is the class of the Element to be deleted
160
+ * @beta
161
+ */
162
+ static onDelete(arg) {
163
+ arg.iModel.channels[_verifyChannel](arg.model);
164
+ arg.iModel.locks.checkExclusiveLock(arg.id, "element", "delete");
165
+ }
166
+ /** Called after an Element was deleted.
167
+ * @note If you override this method, you must call super.
168
+ * @note `this` is the class of the Element that was deleted
169
+ * @beta
170
+ */
171
+ static onDeleted(arg) {
172
+ arg.iModel.elements[_cache].delete(arg);
173
+ arg.iModel.models[_cache].delete(arg.model);
174
+ }
175
+ /** Called when an element with an instance of this class as its parent is about to be deleted.
176
+ * @note throw an exception if the element should not be deleted
177
+ * @note implementers should not presume that the element was deleted if this method does not throw,
178
+ * since the delete may fail for other reasons. Instead, rely on [[onChildDeleted]] for that purpose.
179
+ * @note `this` is the class of the parent Element whose child will be deleted
180
+ * @beta
181
+ */
182
+ static onChildDelete(_arg) { }
183
+ /** Called after an element with an instance of this class as its parent was successfully deleted.
184
+ * @note `this` is the class of the parent Element whose child was deleted
185
+ * @beta
186
+ */
187
+ static onChildDeleted(arg) {
188
+ arg.iModel.elements[_cache].delete({ id: arg.parentId });
189
+ arg.iModel.elements[_cache].delete({ id: arg.childId });
190
+ }
191
+ /** Called when a *new element* with an instance of this class as its parent is about to be inserted.
192
+ * @note throw an exception if the element should not be inserted
193
+ * @note `this` is the class of the prospective parent Element.
194
+ * @beta
195
+ */
196
+ static onChildInsert(_arg) { }
197
+ /** Called after a *new element* with an instance of this class as its parent was inserted.
198
+ * @note `this` is the class of the parent Element.
199
+ * @beta
200
+ */
201
+ static onChildInserted(arg) {
202
+ arg.iModel.elements[_cache].delete({ id: arg.parentId });
203
+ }
204
+ /** Called when an element with an instance of this class as its parent is about to be updated.
205
+ * @note throw an exception if the element should not be updated
206
+ * @note `this` is the class of the parent Element.
207
+ * @beta
208
+ */
209
+ static onChildUpdate(_arg) { }
210
+ /** Called after an element with an instance of this the class as its parent was updated.
211
+ * @note `this` is the class of the parent Element.
212
+ * @beta
213
+ */
214
+ static onChildUpdated(arg) {
215
+ arg.iModel.elements[_cache].delete({ id: arg.parentId });
216
+ }
217
+ /** Called when an *existing element* is about to be updated so that an instance of this class will become its new parent.
218
+ * @note throw an exception if the element should not be added
219
+ * @note `this` is the class of the prospective parent Element.
220
+ * @beta
221
+ */
222
+ static onChildAdd(_arg) { }
223
+ /** Called after an *existing element* has been updated so that an instance of this class is its new parent.
224
+ * @note `this` is the class of the new parent Element.
225
+ * @beta
226
+ */
227
+ static onChildAdded(arg) {
228
+ arg.iModel.elements[_cache].delete({ id: arg.parentId });
229
+ }
230
+ /** Called when an element with an instance of this class as its parent is about to be updated change to a different parent.
231
+ * @note throw an exception if the element should not be dropped
232
+ * @note `this` is the class of the parent Element.
233
+ * @beta
234
+ */
235
+ static onChildDrop(_arg) { }
236
+ /** Called after an element with an instance of this class as its previous parent was updated to have a new parent.
237
+ * @note `this` is the class of the previous parent Element.
238
+ * @beta
239
+ */
240
+ static onChildDropped(arg) {
241
+ arg.iModel.elements[_cache].delete({ id: arg.parentId });
242
+ }
243
+ /** Called when an instance of this class is being *sub-modeled* by a new Model.
244
+ * @note throw an exception if model should not be inserted
245
+ * @note `this` is the class of Element to be sub-modeled.
246
+ * @beta
247
+ */
248
+ static onSubModelInsert(_arg) { }
249
+ /** Called after an instance of this class was *sub-modeled* by a new Model.
250
+ * @note `this` is the class of Element that is now sub-modeled.
251
+ * @beta
252
+ */
253
+ static onSubModelInserted(arg) {
254
+ const id = arg.subModelId;
255
+ arg.iModel.elements[_cache].delete({ id });
256
+ arg.iModel.models[_cache].delete(id);
257
+ }
258
+ /** Called when a sub-model of an instance of this class is being deleted.
259
+ * @note throw an exception if model should not be deleted
260
+ * @note `this` is the class of Element that is sub-modeled.
261
+ * @beta
262
+ */
263
+ static onSubModelDelete(_arg) { }
264
+ /** Called after a sub-model of an instance of this class was deleted.
265
+ * @note `this` is the class of Element that was sub-modeled.
266
+ * @beta
267
+ */
268
+ static onSubModelDeleted(arg) {
269
+ const id = arg.subModelId;
270
+ arg.iModel.elements[_cache].delete({ id });
271
+ arg.iModel.models[_cache].delete(id);
272
+ }
273
+ /** Called during the iModel transformation process after an Element from the source iModel was *cloned* for the target iModel.
274
+ * The transformation process automatically handles remapping BisCore properties and those that are properly described in ECSchema.
275
+ * This callback is only meant to be overridden if there are other Ids in non-standard locations that need to be remapped or other data that needs to be fixed up after the clone.
276
+ * @param _context The context that persists any remapping between the source iModel and target iModel.
277
+ * @param _sourceProps The ElementProps for the source Element that was cloned.
278
+ * @param _targetProps The ElementProps that are a result of the clone. These can be further modified.
279
+ * @note If you override this method, you must call super.
280
+ * @beta
281
+ */
282
+ static onCloned(_context, _sourceProps, _targetProps) { }
283
+ /** Called when a *root* element in a subgraph is changed and before its outputs are processed.
284
+ * This special callback is made when:
285
+ * * the element is part of an [[ElementDrivesElement]] graph, and
286
+ * * the element has no inputs, and
287
+ * * none of the element's outputs have been processed.
288
+ * @see [[ElementDrivesElement]] for more on element dependency graphs.
289
+ * @beta
290
+ */
291
+ static onBeforeOutputsHandled(_id, _iModel) { }
292
+ /** Called on an element in a graph after all of its inputs have been processed and before its outputs are processed.
293
+ * This callback is made when:
294
+ * * the specified element is part of an [[ElementDrivesElement]] graph, and
295
+ * * there was a direct change to some element upstream in the dependency graph.
296
+ * * all upstream elements in the graph have been processed.
297
+ * * none of the downstream elements have been processed.
298
+ * This method is not called if none of the element's inputs were changed.
299
+ * @see [[ElementDrivesElement]] for more on element dependency graphs.
300
+ * @beta
301
+ */
302
+ static onAllInputsHandled(_id, _iModel) { }
303
+ toJSON() {
304
+ const val = super.toJSON();
305
+ if (Code.isValid(this.code))
306
+ val.code = this.code;
307
+ val.model = this.model;
308
+ if (undefined !== this.userLabel) // NOTE: blank string should be included in JSON
309
+ val.userLabel = this.userLabel;
310
+ if (this.federationGuid)
311
+ val.federationGuid = this.federationGuid;
312
+ if (this.parent)
313
+ val.parent = this.parent;
314
+ if (Object.keys(this.jsonProperties).length > 0)
315
+ val.jsonProperties = this.jsonProperties;
316
+ return val;
317
+ }
318
+ collectReferenceIds(referenceIds) {
319
+ super.collectReferenceIds(referenceIds);
320
+ referenceIds.addModel(this.model); // The modeledElement is a reference
321
+ if (this.code.scope && Id64.isValidId64(this.code.scope))
322
+ referenceIds.addElement(this.code.scope); // The element that scopes the code is a reference
323
+ if (this.parent)
324
+ referenceIds.addElement(this.parent.id); // A parent element is a reference
325
+ }
326
+ /** A *required reference* is an element that had to be inserted before this element could have been inserted.
327
+ * This is the list of property keys on this element that store references to those elements
328
+ * @note This should be overridden (with `super` called) at each level of the class hierarchy that introduces required references.
329
+ * @note any property listed here must be added to the reference ids in [[collectReferenceIds]]
330
+ * @beta
331
+ */
332
+ static requiredReferenceKeys = ["parent", "model"];
333
+ /** A map of every [[requiredReferenceKeys]] on this class to their entity type.
334
+ * @note This should be overridden (with `super` called) at each level of the class hierarchy that introduces required references.
335
+ * @alpha
336
+ */
337
+ static requiredReferenceKeyTypeMap = {
338
+ parent: ConcreteEntityTypes.Element,
339
+ model: ConcreteEntityTypes.Model,
340
+ };
341
+ /** Get the class metadata for this element.
342
+ * @deprecated in 5.0. Please use `getMetaData` provided by the parent class `Entity` instead.
343
+ *
344
+ * @example
345
+ * ```typescript
346
+ * // Current usage:
347
+ * const metaData: EntityMetaData | undefined = element.getClassMetaData();
348
+ *
349
+ * // Replacement:
350
+ * const metaData: EntityClass = await element.getMetaData();
351
+ * ```
352
+ */
353
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
354
+ getClassMetaData() { return this.iModel.classMetaDataRegistry.find(this.classFullName); }
355
+ getAllUserProperties() {
356
+ if (!this.jsonProperties.UserProps)
357
+ this.jsonProperties.UserProps = new Object();
358
+ return this.jsonProperties.UserProps;
359
+ }
360
+ /** Get a set of JSON user properties by namespace */
361
+ getUserProperties(namespace) { return this.getAllUserProperties()[namespace]; }
362
+ /** Change a set of user JSON properties of this Element by namespace. */
363
+ setUserProperties(nameSpace, value) { this.getAllUserProperties()[nameSpace] = value; }
364
+ /** Remove a set of JSON user properties, specified by namespace, from this Element */
365
+ removeUserProperties(nameSpace) { delete this.getAllUserProperties()[nameSpace]; }
366
+ /** Get a JSON property of this element, by namespace */
367
+ getJsonProperty(nameSpace) { return this.jsonProperties[nameSpace]; }
368
+ setJsonProperty(nameSpace, value) { this.jsonProperties[nameSpace] = value; }
369
+ /** Get a display label for this Element. By default returns userLabel if present, otherwise code value. */
370
+ getDisplayLabel() { return this.userLabel ?? this.code.value; }
371
+ /** Get a list of HTML strings that describe this Element for the tooltip. Strings will be listed on separate lines in the tooltip.
372
+ * Any instances of the pattern `%{tag}` will be replaced by the localized value of tag.
373
+ */
374
+ getToolTipMessage() {
375
+ const addKey = (key) => `<b>%{iModelJs:Element.${key}}:</b> `; // %{iModelJs:Element.xxx} is replaced with localized value of xxx in frontend.
376
+ const msg = [];
377
+ const display = this.getDisplayLabel();
378
+ msg.push(display ? display : `${addKey("Id") + this.id}, ${addKey("Type")}${this.className}`);
379
+ if (this instanceof GeometricElement)
380
+ msg.push(addKey("Category") + this.iModel.elements.getElement(this.category).getDisplayLabel());
381
+ msg.push(addKey("Model") + this.iModel.elements.getElement(this.model).getDisplayLabel());
382
+ return msg;
383
+ }
384
+ /**
385
+ * Insert this Element into the iModel.
386
+ * @see [[IModelDb.Elements.insertElement]]
387
+ * @note For convenience, the value of `this.id` is updated to reflect the resultant element's id.
388
+ * However when `this.federationGuid` is not present or undefined, a new Guid will be generated and stored on the resultant element. But
389
+ * the value of `this.federationGuid` is *not* updated. Generally, it is best to re-read the element after inserting (e.g. via [[IModelDb.Elements.getElement]])
390
+ * if you intend to continue working with it. That will ensure its values reflect the persistent state.
391
+ */
392
+ insert() {
393
+ return this.id = this.iModel.elements.insertElement(this.toJSON());
394
+ }
395
+ /** Update this Element in the iModel. */
396
+ update() { this.iModel.elements.updateElement(this.toJSON()); }
397
+ /** Delete this Element from the iModel. */
398
+ delete() { this.iModel.elements.deleteElement(this.id); }
399
+ }
400
+ /** An abstract base class to model real world entities that intrinsically have geometry.
401
+ * @public
402
+ */
403
+ export class GeometricElement extends Element {
404
+ static get className() { return "GeometricElement"; }
405
+ /** The Id of the [[Category]] for this GeometricElement. */
406
+ category;
407
+ /** The GeometryStream for this GeometricElement. */
408
+ geom;
409
+ constructor(props, iModel) {
410
+ super(props, iModel);
411
+ this.category = Id64.fromJSON(props.category);
412
+ this.geom = props.geom;
413
+ }
414
+ /** Type guard for instanceof [[GeometricElement3d]] */
415
+ is3d() { return this instanceof GeometricElement3d; }
416
+ /** Type guard for instanceof [[GeometricElement2d]] */
417
+ is2d() { return this instanceof GeometricElement2d; }
418
+ /** Get the [Transform]($geometry) from the Placement of this GeometricElement */
419
+ getPlacementTransform() { return this.placement.transform; }
420
+ calculateRange3d() { return this.placement.calculateRange(); }
421
+ toJSON() {
422
+ const val = super.toJSON();
423
+ val.category = this.category;
424
+ if (this.geom)
425
+ val.geom = this.geom;
426
+ return val;
427
+ }
428
+ collectReferenceIds(referenceIds) {
429
+ super.collectReferenceIds(referenceIds);
430
+ referenceIds.addElement(this.category);
431
+ // TODO: GeometryPartIds?
432
+ }
433
+ /** @beta */
434
+ static requiredReferenceKeys = [...super.requiredReferenceKeys, "category"];
435
+ /** @alpha */
436
+ static requiredReferenceKeyTypeMap = {
437
+ ...super.requiredReferenceKeyTypeMap,
438
+ category: ConcreteEntityTypes.Element,
439
+ };
440
+ /**
441
+ * GeometricElement custom HandledProps includes 'inSpatialIndex'.
442
+ * @inheritdoc
443
+ * @beta
444
+ */
445
+ static _customHandledProps = [
446
+ { propertyName: "inSpatialIndex", source: "Class" },
447
+ ];
448
+ /**
449
+ * GeometricElement deserializes 'inSpatialIndex'.
450
+ * @inheritdoc
451
+ * @beta
452
+ */
453
+ static deserialize(props) {
454
+ return super.deserialize(props);
455
+ }
456
+ /**
457
+ * GeometricElement serialize 'inSpatialIndex'.
458
+ * @inheritdoc
459
+ * @beta
460
+ */
461
+ static serialize(props, iModel) {
462
+ return super.serialize(props, iModel);
463
+ }
464
+ }
465
+ /** An abstract base class to model real world entities that intrinsically have 3d geometry.
466
+ * See [how to create a GeometricElement3d]($docs/learning/backend/CreateElements.md#GeometricElement3d).
467
+ * @public
468
+ */
469
+ export class GeometricElement3d extends GeometricElement {
470
+ static get className() { return "GeometricElement3d"; }
471
+ placement;
472
+ typeDefinition;
473
+ constructor(props, iModel) {
474
+ super(props, iModel);
475
+ this.placement = Placement3d.fromJSON(props.placement);
476
+ if (props.typeDefinition)
477
+ this.typeDefinition = TypeDefinition.fromJSON(props.typeDefinition);
478
+ }
479
+ toJSON() {
480
+ const val = super.toJSON();
481
+ val.placement = this.placement;
482
+ if (undefined !== this.typeDefinition)
483
+ val.typeDefinition = this.typeDefinition;
484
+ return val;
485
+ }
486
+ collectReferenceIds(referenceIds) {
487
+ super.collectReferenceIds(referenceIds);
488
+ if (undefined !== this.typeDefinition)
489
+ referenceIds.addElement(this.typeDefinition.id);
490
+ }
491
+ /**
492
+ * GeometricElement3d custom HandledProps includes 'category', 'geometryStream', 'origin', 'yaw', 'pitch', 'roll',
493
+ * 'bBoxLow', 'bBoxHigh', and 'typeDefinition'.
494
+ * @inheritdoc
495
+ * @beta
496
+ */
497
+ static _customHandledProps = [
498
+ { propertyName: "category", source: "Class" },
499
+ { propertyName: "geometryStream", source: "Class" },
500
+ { propertyName: "origin", source: "Class" },
501
+ { propertyName: "yaw", source: "Class" },
502
+ { propertyName: "pitch", source: "Class" },
503
+ { propertyName: "roll", source: "Class" },
504
+ { propertyName: "bBoxLow", source: "Class" },
505
+ { propertyName: "bBoxHigh", source: "Class" },
506
+ { propertyName: "typeDefinition", source: "Class" }
507
+ ];
508
+ /**
509
+ * GeometricElement3d deserializes 'category', 'geometryStream', 'origin', 'yaw', 'pitch', 'roll',
510
+ * 'bBoxLow', 'bBoxHigh', and 'typeDefinition'.
511
+ * @inheritdoc
512
+ * @beta
513
+ */
514
+ static deserialize(props) {
515
+ const elProps = super.deserialize(props);
516
+ const instance = props.row;
517
+ elProps.category = instance.category.id;
518
+ const origin = instance.origin ? [instance.origin.x, instance.origin.y, instance.origin.z] : [0, 0, 0];
519
+ let bbox;
520
+ if ("bBoxHigh" in instance && instance.bBoxHigh !== undefined && "bBoxLow" in instance && instance.bBoxLow !== undefined) {
521
+ bbox = {
522
+ low: [instance.bBoxLow.x, instance.bBoxLow.y, instance.bBoxLow.z],
523
+ high: [instance.bBoxHigh.x, instance.bBoxHigh.y, instance.bBoxHigh.z],
524
+ };
525
+ }
526
+ elProps.placement = {
527
+ origin,
528
+ angles: YawPitchRollAngles.createDegrees(instance.yaw ?? 0, instance.pitch ?? 0, instance.roll ?? 0).toJSON(),
529
+ bbox
530
+ };
531
+ if (instance.geometryStream) {
532
+ elProps.geom = props.iModel[_nativeDb].convertOrUpdateGeometrySource({
533
+ is2d: false,
534
+ geom: instance.geometryStream,
535
+ placement: elProps.placement,
536
+ categoryId: elProps.category
537
+ }, "GeometryStreamProps", props.options?.element ?? {}).geom;
538
+ }
539
+ if (instance.typeDefinition) {
540
+ elProps.typeDefinition = instance.typeDefinition;
541
+ }
542
+ return elProps;
543
+ }
544
+ /**
545
+ * GeometricElement3d serializes 'category', 'geometryStream', 'origin', 'yaw', 'pitch', 'roll',
546
+ * 'bBoxLow', 'bBoxHigh', and 'typeDefinition'.
547
+ * @inheritdoc
548
+ * @beta
549
+ */
550
+ static serialize(props, iModel) {
551
+ const inst = super.serialize(props, iModel);
552
+ inst.category = { id: props.category };
553
+ const assignPlacement = (placement) => {
554
+ if (Array.isArray(placement.origin)) {
555
+ inst.origin = { x: placement.origin[0], y: placement.origin[1], z: placement.origin[2] };
556
+ }
557
+ else {
558
+ inst.origin = placement.origin;
559
+ }
560
+ inst.yaw = placement.angles.yaw;
561
+ inst.pitch = placement.angles.pitch;
562
+ inst.roll = placement.angles.roll;
563
+ if (placement.bbox) {
564
+ if (Array.isArray(placement.bbox.low)) {
565
+ inst.bBoxLow = { x: placement.bbox.low[0], y: placement.bbox.low[1], z: placement.bbox.low[2] };
566
+ }
567
+ else {
568
+ inst.bBoxLow = placement.bbox.low;
569
+ }
570
+ if (Array.isArray(placement.bbox.high)) {
571
+ inst.bBoxHigh = { x: placement.bbox.high[0], y: placement.bbox.high[1], z: placement.bbox.high[2] };
572
+ }
573
+ else {
574
+ inst.bBoxHigh = placement.bbox.high;
575
+ }
576
+ }
577
+ };
578
+ if (props.placement) {
579
+ assignPlacement(props.placement);
580
+ }
581
+ if (props.elementGeometryBuilderParams) {
582
+ const source = iModel[_nativeDb].convertOrUpdateGeometrySource({
583
+ builder: props.elementGeometryBuilderParams,
584
+ is2d: true,
585
+ placement: props.placement,
586
+ categoryId: props.category,
587
+ }, "BinaryStream", {});
588
+ inst.geometryStream = source.geom;
589
+ if (source.placement) {
590
+ assignPlacement(source.placement);
591
+ }
592
+ }
593
+ if (props.geom) {
594
+ const source = iModel[_nativeDb].convertOrUpdateGeometrySource({
595
+ geom: props.geom,
596
+ is2d: false,
597
+ placement: props.placement,
598
+ categoryId: props.category,
599
+ }, "BinaryStream", {});
600
+ inst.geometryStream = source.geom;
601
+ if (source.placement) {
602
+ assignPlacement(source.placement);
603
+ }
604
+ }
605
+ inst.typeDefinition = props.typeDefinition;
606
+ return inst;
607
+ }
608
+ }
609
+ /** A 3d Graphical Element
610
+ * @public
611
+ */
612
+ export class GraphicalElement3d extends GeometricElement3d {
613
+ static get className() { return "GraphicalElement3d"; }
614
+ constructor(props, iModel) { super(props, iModel); }
615
+ }
616
+ /** An abstract base class to model information entities that intrinsically have 2d geometry.
617
+ * @public
618
+ */
619
+ export class GeometricElement2d extends GeometricElement {
620
+ static get className() { return "GeometricElement2d"; }
621
+ placement;
622
+ typeDefinition;
623
+ constructor(props, iModel) {
624
+ super(props, iModel);
625
+ this.placement = Placement2d.fromJSON(props.placement);
626
+ if (props.typeDefinition)
627
+ this.typeDefinition = TypeDefinition.fromJSON(props.typeDefinition);
628
+ }
629
+ toJSON() {
630
+ const val = super.toJSON();
631
+ val.placement = this.placement;
632
+ if (undefined !== this.typeDefinition)
633
+ val.typeDefinition = this.typeDefinition;
634
+ return val;
635
+ }
636
+ /**
637
+ * GeometricElement2d custom HandledProps includes 'category', 'geometryStream', 'origin', 'rotation',
638
+ * 'bBoxLow', 'bBoxHigh', and 'typeDefinition'.
639
+ * @inheritdoc
640
+ * @beta
641
+ */
642
+ static _customHandledProps = [
643
+ { propertyName: "category", source: "Class" },
644
+ { propertyName: "geometryStream", source: "Class" },
645
+ { propertyName: "origin", source: "Class" },
646
+ { propertyName: "rotation", source: "Class" },
647
+ { propertyName: "bBoxLow", source: "Class" },
648
+ { propertyName: "bBoxHigh", source: "Class" },
649
+ { propertyName: "typeDefinition", source: "Class" }
650
+ ];
651
+ /**
652
+ * GeometricElement2d deserialize 'category', 'geometryStream', 'origin', 'rotation',
653
+ * 'bBoxLow', 'bBoxHigh', and 'typeDefinition'.
654
+ * @inheritdoc
655
+ * @beta
656
+ */
657
+ static deserialize(props) {
658
+ const elProps = super.deserialize(props);
659
+ const instance = props.row;
660
+ elProps.category = instance.category.id;
661
+ const origin = instance.origin ? [instance.origin.x, instance.origin.y] : [0, 0];
662
+ let bbox;
663
+ if ("bBoxHigh" in instance && instance.bBoxHigh !== undefined && "bBoxLow" in instance && instance.bBoxLow !== undefined) {
664
+ bbox = {
665
+ low: [instance.bBoxLow.x, instance.bBoxLow.y],
666
+ high: [instance.bBoxHigh.x, instance.bBoxHigh.y],
667
+ };
668
+ }
669
+ elProps.placement = {
670
+ origin,
671
+ angle: instance.rotation,
672
+ bbox,
673
+ };
674
+ if (instance.geometryStream) {
675
+ const source = props.iModel[_nativeDb].convertOrUpdateGeometrySource({
676
+ is2d: true,
677
+ geom: instance.geometryStream,
678
+ placement: elProps.placement,
679
+ categoryId: elProps.category
680
+ }, "GeometryStreamProps", props.options?.element ?? {});
681
+ elProps.geom = source.geom;
682
+ if (source.placement) {
683
+ elProps.placement = source.placement;
684
+ }
685
+ }
686
+ if (instance.typeDefinition) {
687
+ elProps.typeDefinition = instance.typeDefinition;
688
+ }
689
+ return elProps;
690
+ }
691
+ /**
692
+ * GeometricElement2d serializes 'category', 'geometryStream', 'origin', 'rotation',
693
+ * 'bBoxLow', 'bBoxHigh', and 'typeDefinition'.
694
+ * @inheritdoc
695
+ * @beta
696
+ */
697
+ static serialize(props, iModel) {
698
+ const inst = super.serialize(props, iModel);
699
+ inst.category = { id: props.category };
700
+ const assignPlacement = (placement) => {
701
+ if (Array.isArray(placement.origin)) {
702
+ inst.origin = { x: placement.origin[0], y: placement.origin[1] };
703
+ }
704
+ else {
705
+ inst.origin = placement.origin;
706
+ }
707
+ inst.rotation = placement.angle;
708
+ if (placement.bbox) {
709
+ if (Array.isArray(placement.bbox.low)) {
710
+ inst.bBoxLow = { x: placement.bbox.low[0], y: placement.bbox.low[1] };
711
+ }
712
+ else {
713
+ inst.bBoxLow = placement.bbox.low;
714
+ }
715
+ if (Array.isArray(placement.bbox.high)) {
716
+ inst.bBoxHigh = { x: placement.bbox.high[0], y: placement.bbox.high[1] };
717
+ }
718
+ else {
719
+ inst.bBoxHigh = placement.bbox.high;
720
+ }
721
+ }
722
+ };
723
+ if (props.placement) {
724
+ assignPlacement(props.placement);
725
+ }
726
+ if (props.elementGeometryBuilderParams) {
727
+ const source = iModel[_nativeDb].convertOrUpdateGeometrySource({
728
+ builder: props.elementGeometryBuilderParams,
729
+ is2d: true,
730
+ placement: props.placement,
731
+ categoryId: props.category,
732
+ }, "BinaryStream", {});
733
+ inst.geometryStream = source.geom;
734
+ if (source.placement) {
735
+ assignPlacement(source.placement);
736
+ }
737
+ }
738
+ if (props.geom) {
739
+ const source = iModel[_nativeDb].convertOrUpdateGeometrySource({
740
+ geom: props.geom,
741
+ is2d: true,
742
+ placement: props.placement,
743
+ categoryId: props.category,
744
+ }, "BinaryStream", {});
745
+ inst.geometryStream = source.geom;
746
+ if (source.placement) {
747
+ assignPlacement(source.placement);
748
+ }
749
+ }
750
+ inst.typeDefinition = props.typeDefinition;
751
+ return inst;
752
+ }
753
+ collectReferenceIds(referenceIds) {
754
+ super.collectReferenceIds(referenceIds);
755
+ if (undefined !== this.typeDefinition)
756
+ referenceIds.addElement(this.typeDefinition.id);
757
+ }
758
+ }
759
+ /** An abstract base class for 2d Geometric Elements that are used to convey information within graphical presentations (like drawings).
760
+ * @public
761
+ */
762
+ export class GraphicalElement2d extends GeometricElement2d {
763
+ static get className() { return "GraphicalElement2d"; }
764
+ constructor(props, iModel) { super(props, iModel); }
765
+ }
766
+ /** 2d element used to annotate drawings and sheets.
767
+ * @public
768
+ */
769
+ export class AnnotationElement2d extends GraphicalElement2d {
770
+ static get className() { return "AnnotationElement2d"; }
771
+ constructor(props, iModel) { super(props, iModel); }
772
+ }
773
+ /** 2d element used to persist graphics for use in drawings.
774
+ * @public
775
+ */
776
+ export class DrawingGraphic extends GraphicalElement2d {
777
+ static get className() { return "DrawingGraphic"; }
778
+ constructor(props, iModel) { super(props, iModel); }
779
+ }
780
+ /** An Element that occupies real world space. Its coordinates are in the project space of its iModel.
781
+ * @public
782
+ */
783
+ export class SpatialElement extends GeometricElement3d {
784
+ static get className() { return "SpatialElement"; }
785
+ constructor(props, iModel) { super(props, iModel); }
786
+ }
787
+ /** An Element that is spatially located, has mass, and can be *touched*.
788
+ * @public
789
+ */
790
+ export class PhysicalElement extends SpatialElement {
791
+ static get className() { return "PhysicalElement"; }
792
+ /** If defined, the [[PhysicalMaterial]] that makes up this PhysicalElement. */
793
+ physicalMaterial;
794
+ constructor(props, iModel) {
795
+ super(props, iModel);
796
+ this.physicalMaterial = RelatedElement.fromJSON(props.physicalMaterial);
797
+ }
798
+ toJSON() {
799
+ const val = super.toJSON();
800
+ val.physicalMaterial = this.physicalMaterial?.toJSON();
801
+ return val;
802
+ }
803
+ }
804
+ /** Identifies a *tracked* real world location but has no mass and cannot be *touched*.
805
+ * @public
806
+ */
807
+ export class SpatialLocationElement extends SpatialElement {
808
+ static get className() { return "SpatialLocationElement"; }
809
+ constructor(props, iModel) { super(props, iModel); }
810
+ }
811
+ /** A Volume Element is a Spatial Location Element that is restricted to defining a volume.
812
+ * @public
813
+ */
814
+ export class VolumeElement extends SpatialLocationElement {
815
+ static get className() { return "VolumeElement"; }
816
+ constructor(props, iModel) { super(props, iModel); }
817
+ }
818
+ /** A SectionDrawingLocation element identifies the location of a [[SectionDrawing]] in the context of a [[SpatialModel]],
819
+ * enabling [HyperModeling]($hypermodeling).
820
+ * @note The associated ECClass was added to the BisCore schema in version 1.0.11.
821
+ * @public
822
+ */
823
+ export class SectionDrawingLocation extends SpatialLocationElement {
824
+ /** The Id of the [[ViewDefinition]] to which this location refers. */
825
+ sectionView;
826
+ static get className() { return "SectionDrawingLocation"; }
827
+ constructor(props, iModel) {
828
+ super(props, iModel);
829
+ this.sectionView = RelatedElement.fromJSON(props.sectionView) ?? RelatedElement.none;
830
+ }
831
+ toJSON() {
832
+ return {
833
+ ...super.toJSON(),
834
+ sectionView: this.sectionView.toJSON(),
835
+ };
836
+ }
837
+ }
838
+ /** Information Content Element is an abstract base class for modeling pure information entities. Only the
839
+ * core framework should directly subclass from Information Content Element. Domain and application developers
840
+ * should start with the most appropriate subclass of Information Content Element.
841
+ * @public
842
+ */
843
+ export class InformationContentElement extends Element {
844
+ static get className() { return "InformationContentElement"; }
845
+ constructor(props, iModel) { super(props, iModel); }
846
+ }
847
+ /** Element used in conjunction with bis:ElementDrivesElement relationships to bundle multiple inputs before
848
+ * driving the output element.
849
+ * @beta
850
+ */
851
+ export class DriverBundleElement extends InformationContentElement {
852
+ static get className() { return "DriverBundleElement"; }
853
+ constructor(props, iModel) { super(props, iModel); }
854
+ }
855
+ /** Information Reference is an abstract base class for modeling entities whose main purpose is to reference something else.
856
+ * @public
857
+ */
858
+ export class InformationReferenceElement extends InformationContentElement {
859
+ static get className() { return "InformationReferenceElement"; }
860
+ constructor(props, iModel) { super(props, iModel); }
861
+ }
862
+ /** A Subject is an information element that describes what this repository (or part thereof) is about.
863
+ * @public
864
+ */
865
+ export class Subject extends InformationReferenceElement {
866
+ static get className() { return "Subject"; }
867
+ description;
868
+ constructor(props, iModel) {
869
+ super(props, iModel);
870
+ this.description = props.description;
871
+ }
872
+ toJSON() {
873
+ return super.toJSON(); // Entity.toJSON takes care of auto-handled properties
874
+ }
875
+ /** Create a Code for a Subject given a name that is meant to be unique within the scope of its parent Subject.
876
+ * @param iModelDb The IModelDb
877
+ * @param parentSubjectId The Id of the parent Subject that provides the scope for names of its child Subjects.
878
+ * @param codeValue The child Subject name
879
+ */
880
+ static createCode(iModelDb, parentSubjectId, codeValue) {
881
+ const codeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.subject);
882
+ return new Code({ spec: codeSpec.id, scope: parentSubjectId, value: codeValue });
883
+ }
884
+ /** Create a Subject
885
+ * @param iModelDb The IModelDb
886
+ * @param parentSubjectId The new Subject will be a child of this Subject
887
+ * @param name The name (codeValue) of the Subject
888
+ * @param description The optional description of the Subject
889
+ * @returns The newly constructed Subject
890
+ * @throws [[IModelError]] if there is a problem creating the Subject
891
+ */
892
+ static create(iModelDb, parentSubjectId, name, description) {
893
+ const subjectProps = {
894
+ classFullName: this.classFullName,
895
+ model: IModel.repositoryModelId,
896
+ parent: new SubjectOwnsSubjects(parentSubjectId),
897
+ code: this.createCode(iModelDb, parentSubjectId, name),
898
+ description,
899
+ };
900
+ return new Subject(subjectProps, iModelDb);
901
+ }
902
+ /** Insert a Subject
903
+ * @param iModelDb Insert into this IModelDb
904
+ * @param parentSubjectId The new Subject will be inserted as a child of this Subject
905
+ * @param name The name (codeValue) of the Subject
906
+ * @param description The optional description of the Subject
907
+ * @returns The Id of the newly inserted Subject
908
+ * @throws [[IModelError]] if there is a problem inserting the Subject
909
+ */
910
+ static insert(iModelDb, parentSubjectId, name, description) {
911
+ const subject = this.create(iModelDb, parentSubjectId, name, description);
912
+ return iModelDb.elements.insertElement(subject.toJSON());
913
+ }
914
+ }
915
+ /** An InformationContentElement that identifies the content of a document.
916
+ * The realized form of a document is called a DocumentCarrier (different class than Document).
917
+ * For example, a will is a legal document. The will published into a PDF file is an ElectronicDocumentCopy.
918
+ * The will printed onto paper is a PrintedDocumentCopy.
919
+ * In this example, the Document only identifies, names, and tracks the content of the will.
920
+ * @public
921
+ */
922
+ export class Document extends InformationContentElement {
923
+ static get className() { return "Document"; }
924
+ constructor(props, iModel) { super(props, iModel); }
925
+ }
926
+ /** A document that represents a drawing, that is, a two-dimensional graphical representation of engineering data. A Drawing element is usually modelled by a [[DrawingModel]].
927
+ * @public
928
+ */
929
+ export class Drawing extends Document {
930
+ _scaleFactor;
931
+ /** A factor used by tools to adjust the size of text in [GeometricElement2d]($backend)s in the associated [DrawingModel]($backend) and to compute the
932
+ * size of the [ViewAttachment]($backend) created when attaching the [Drawing]($backend) to a [Sheet]($backend).
933
+ * Default: 1.
934
+ * @note Attempting to set this property to a value less than or equal to zero will produce an exception.
935
+ * @public
936
+ */
937
+ get scaleFactor() { return this._scaleFactor; }
938
+ set scaleFactor(factor) {
939
+ if (factor <= 0) {
940
+ if (this._scaleFactor === undefined) {
941
+ // Entity constructor calls our setter before our constructor runs...don't throw an exception at that time,
942
+ // because somebody may have persisted the value as zero.
943
+ return;
944
+ }
945
+ throw new Error("Drawing.scaleFactor must be greater than zero");
946
+ }
947
+ this._scaleFactor = factor;
948
+ }
949
+ static get className() { return "Drawing"; }
950
+ constructor(props, iModel) {
951
+ super(props, iModel);
952
+ this._scaleFactor = typeof props.scaleFactor === "number" && props.scaleFactor > 0 ? props.scaleFactor : 1;
953
+ }
954
+ toJSON() {
955
+ const drawingProps = super.toJSON();
956
+ // Entity.toJSON auto-magically sets drawingProps.scaleFactor from this.scaleFactor - unset if default value of 1.
957
+ if (drawingProps.scaleFactor === 1) {
958
+ delete drawingProps.scaleFactor;
959
+ }
960
+ return drawingProps;
961
+ }
962
+ /** The name of the DrawingModel class modeled by this element type. */
963
+ static get drawingModelFullClassName() { return DrawingModel.classFullName; }
964
+ /** Create a Code for a Drawing given a name that is meant to be unique within the scope of the specified DocumentListModel.
965
+ * @param iModel The IModelDb
966
+ * @param scopeModelId The Id of the DocumentListModel that contains the Drawing and provides the scope for its name.
967
+ * @param codeValue The Drawing name
968
+ */
969
+ static createCode(iModel, scopeModelId, codeValue) {
970
+ const codeSpec = iModel.codeSpecs.getByName(BisCodeSpec.drawing);
971
+ return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });
972
+ }
973
+ /** Insert a Drawing element and a DrawingModel that breaks it down.
974
+ * @param iModelDb Insert into this iModel
975
+ * @param documentListModelId Insert the new Drawing into this DocumentListModel
976
+ * @param name The name of the Drawing.
977
+ * @param scaleFactor See [[scaleFactor]]. Must be greater than zero.
978
+ * @returns The Id of the newly inserted Drawing element and the DrawingModel that breaks it down (same value).
979
+ * @throws [[IModelError]] if unable to insert the element.
980
+ * @throws Error if `scaleFactor` is less than or equal to zero.
981
+ */
982
+ static insert(iModelDb, documentListModelId, name, scaleFactor) {
983
+ const drawingProps = {
984
+ classFullName: this.classFullName,
985
+ model: documentListModelId,
986
+ code: this.createCode(iModelDb, documentListModelId, name),
987
+ };
988
+ if (scaleFactor !== undefined) {
989
+ if (scaleFactor <= 0) {
990
+ throw new Error("Drawing.scaleFactor must be greater than zero");
991
+ }
992
+ drawingProps.scaleFactor = scaleFactor;
993
+ }
994
+ const drawingId = iModelDb.elements.insertElement(drawingProps);
995
+ const model = iModelDb.models.createModel({
996
+ classFullName: this.drawingModelFullClassName,
997
+ modeledElement: { id: drawingId },
998
+ });
999
+ return iModelDb.models.insertModel(model.toJSON());
1000
+ }
1001
+ }
1002
+ /** A document that represents a section drawing, that is, a graphical documentation derived from a planar
1003
+ * section of a spatial view. A SectionDrawing element is modelled by a [[SectionDrawingModel]] or a [[GraphicalModel3d]].
1004
+ * A [[SectionDrawingLocation]] can associate the drawing with a spatial location, enabling [HyperModeling]($hypermodeling).
1005
+ * @public
1006
+ */
1007
+ export class SectionDrawing extends Drawing {
1008
+ /** The type of section used to generate the drawing. */
1009
+ sectionType;
1010
+ /** The spatial view from which the section was generated. */
1011
+ spatialView;
1012
+ /** A transform from the section drawing model's coordinates to spatial coordinates. */
1013
+ drawingToSpatialTransform;
1014
+ /** If the section drawing is placed onto a [[Sheet]] via a [[ViewAttachment]], a transform from the sheet's coordinates to spatial coordinates. */
1015
+ sheetToSpatialTransform;
1016
+ /** If the section drawing is placed onto a [[Sheet]] via a [[ViewAttachment]], the clip to apply to the sheet graphics when drawn in the context
1017
+ * of the spatial view.
1018
+ * @note The ClipVector is defined in spatial coordinates.
1019
+ */
1020
+ drawingBoundaryClip;
1021
+ /** If true, when displaying the section drawing as a [DrawingViewState]($frontend), the [[spatialView]] will also be displayed. */
1022
+ displaySpatialView;
1023
+ static get className() { return "SectionDrawing"; }
1024
+ static get drawingModelFullClassName() { return SectionDrawingModel.classFullName; }
1025
+ constructor(props, iModel) {
1026
+ super(props, iModel);
1027
+ this.sectionType = JsonUtils.asInt(props.sectionType, SectionType.Section);
1028
+ this.spatialView = RelatedElement.fromJSON(props.spatialView) ?? RelatedElement.none;
1029
+ this.displaySpatialView = JsonUtils.asBool(props.jsonProperties?.displaySpatialView);
1030
+ const json = props.jsonProperties;
1031
+ if (!json)
1032
+ return;
1033
+ if (json.drawingToSpatialTransform)
1034
+ this.drawingToSpatialTransform = Transform.fromJSON(json.drawingToSpatialTransform);
1035
+ if (json.sheetToSpatialTransform)
1036
+ this.sheetToSpatialTransform = Transform.fromJSON(json.sheetToSpatialTransform);
1037
+ if (json.drawingBoundaryClip)
1038
+ this.drawingBoundaryClip = ClipVector.fromJSON(json.drawingBoundaryClip);
1039
+ }
1040
+ toJSON() {
1041
+ const props = {
1042
+ ...super.toJSON(),
1043
+ sectionType: this.sectionType,
1044
+ spatialView: this.spatialView.toJSON(),
1045
+ };
1046
+ if (!props.jsonProperties)
1047
+ props.jsonProperties = {};
1048
+ props.jsonProperties.displaySpatialView = this.displaySpatialView ? true : undefined;
1049
+ props.jsonProperties.drawingToSpatialTransform = this.drawingToSpatialTransform?.toJSON();
1050
+ props.jsonProperties.sheetToSpatialTransform = this.sheetToSpatialTransform?.toJSON();
1051
+ props.jsonProperties.drawingBoundaryClip = this.drawingBoundaryClip?.toJSON();
1052
+ return props;
1053
+ }
1054
+ }
1055
+ /** The template for a SheetBorder
1056
+ * @public
1057
+ */
1058
+ export class SheetBorderTemplate extends Document {
1059
+ static get className() { return "SheetBorderTemplate"; }
1060
+ height;
1061
+ width;
1062
+ constructor(props, iModel) {
1063
+ super(props, iModel);
1064
+ this.height = props.height;
1065
+ this.width = props.width;
1066
+ }
1067
+ }
1068
+ /** The template for a [[Sheet]]
1069
+ * @public
1070
+ */
1071
+ export class SheetTemplate extends Document {
1072
+ static get className() { return "SheetTemplate"; }
1073
+ height;
1074
+ width;
1075
+ border;
1076
+ constructor(props, iModel) {
1077
+ super(props, iModel);
1078
+ this.height = props.height;
1079
+ this.width = props.width;
1080
+ this.border = props.border;
1081
+ }
1082
+ collectReferenceIds(referenceIds) {
1083
+ super.collectReferenceIds(referenceIds);
1084
+ if (undefined !== this.border)
1085
+ referenceIds.addElement(this.border);
1086
+ }
1087
+ }
1088
+ /** A digital representation of a *sheet of paper*. Modeled by a [[SheetModel]].
1089
+ * @public
1090
+ */
1091
+ export class Sheet extends Document {
1092
+ static get className() { return "Sheet"; }
1093
+ height;
1094
+ width;
1095
+ scale;
1096
+ sheetTemplate;
1097
+ constructor(props, iModel) {
1098
+ super(props, iModel);
1099
+ this.height = JsonUtils.asDouble(props.height);
1100
+ this.width = JsonUtils.asDouble(props.width);
1101
+ this.scale = props.scale;
1102
+ this.sheetTemplate = props.sheetTemplate ? Id64.fromJSON(props.sheetTemplate) : undefined;
1103
+ }
1104
+ collectReferenceIds(referenceIds) {
1105
+ super.collectReferenceIds(referenceIds);
1106
+ if (undefined !== this.sheetTemplate)
1107
+ referenceIds.addElement(this.sheetTemplate);
1108
+ }
1109
+ /** Create a Code for a Sheet given a name that is meant to be unique within the scope of the specified DocumentListModel.
1110
+ * @param iModel The IModelDb
1111
+ * @param scopeModelId The Id of the DocumentListModel that contains the Sheet and provides the scope for its name.
1112
+ * @param codeValue The Sheet name
1113
+ */
1114
+ static createCode(iModel, scopeModelId, codeValue) {
1115
+ const codeSpec = iModel.codeSpecs.getByName(BisCodeSpec.sheet);
1116
+ return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });
1117
+ }
1118
+ }
1119
+ /** Information Record Element is an abstract base class for modeling information records. Information Record
1120
+ * Element is the default choice if no other subclass of Information Content Element makes sense.
1121
+ * @public
1122
+ */
1123
+ export class InformationRecordElement extends InformationContentElement {
1124
+ static get className() { return "InformationRecordElement"; }
1125
+ constructor(props, iModel) { super(props, iModel); }
1126
+ }
1127
+ /** A Definition Element holds configuration-related information that is meant to be referenced / shared.
1128
+ * @public
1129
+ */
1130
+ export class DefinitionElement extends InformationContentElement {
1131
+ static get className() { return "DefinitionElement"; }
1132
+ /** If true, don't show this DefinitionElement in user interface lists. */
1133
+ isPrivate;
1134
+ constructor(props, iModel) {
1135
+ super(props, iModel);
1136
+ this.isPrivate = true === props.isPrivate;
1137
+ }
1138
+ /**
1139
+ * DefinitionElement custom HandledProps includes 'isPrivate'.
1140
+ * @inheritdoc
1141
+ * @beta
1142
+ */
1143
+ static _customHandledProps = [
1144
+ { propertyName: "isPrivate", source: "Class" },
1145
+ ];
1146
+ /**
1147
+ * DefinitionElement deserializes 'isPrivate'.
1148
+ * @inheritdoc
1149
+ * @beta
1150
+ */
1151
+ static deserialize(props) {
1152
+ const elProps = super.deserialize(props);
1153
+ if (props.row.isPrivate !== undefined)
1154
+ elProps.isPrivate = props.row.isPrivate;
1155
+ return elProps;
1156
+ }
1157
+ /**
1158
+ * DefinitionElement serialize 'isPrivate'.
1159
+ * @inheritdoc
1160
+ * @beta
1161
+ */
1162
+ static serialize(props, iModel) {
1163
+ const inst = super.serialize(props, iModel);
1164
+ if (undefined !== props.isPrivate) {
1165
+ inst.isPrivate = props.isPrivate;
1166
+ }
1167
+ return inst;
1168
+ }
1169
+ toJSON() {
1170
+ const val = super.toJSON();
1171
+ val.isPrivate = this.isPrivate;
1172
+ return val;
1173
+ }
1174
+ }
1175
+ /** This abstract class unifies DefinitionGroup and DefinitionContainer for relationship endpoint purposes.
1176
+ * @note The associated ECClass was added to the BisCore schema in version 1.0.10
1177
+ * @public
1178
+ */
1179
+ export class DefinitionSet extends DefinitionElement {
1180
+ static get className() { return "DefinitionSet"; }
1181
+ }
1182
+ /** A DefinitionContainer exclusively owns a set of DefinitionElements contained within its sub-model (of type DefinitionModel).
1183
+ * @note The associated ECClass was added to the BisCore schema in version 1.0.10
1184
+ * @public
1185
+ */
1186
+ export class DefinitionContainer extends DefinitionSet {
1187
+ static get className() { return "DefinitionContainer"; }
1188
+ /** Create a DefinitionContainer
1189
+ * @param iModelDb The IModelDb
1190
+ * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionContainer element.
1191
+ * @param code The Code for this DefinitionContainer.
1192
+ * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.
1193
+ * @returns The newly constructed DefinitionContainer
1194
+ * @note There is not a predefined CodeSpec for DefinitionContainer elements, so it is the responsibility of the domain or application to create one.
1195
+ * @throws [[IModelError]] if there is a problem creating the DefinitionContainer
1196
+ */
1197
+ static create(iModelDb, definitionModelId, code, isPrivate) {
1198
+ const elementProps = {
1199
+ classFullName: this.classFullName,
1200
+ model: definitionModelId,
1201
+ code,
1202
+ isPrivate,
1203
+ };
1204
+ return new DefinitionContainer(elementProps, iModelDb);
1205
+ }
1206
+ /** Insert a DefinitionContainer and its sub-model.
1207
+ * @param iModelDb Insert into this IModelDb
1208
+ * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionContainer element.
1209
+ * @param code The Code for this DefinitionContainer.
1210
+ * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.
1211
+ * @returns The Id of the newly inserted DefinitionContainer and its newly inserted sub-model (of type DefinitionModel).
1212
+ * @note There is not a predefined CodeSpec for DefinitionContainer elements, so it is the responsibility of the domain or application to create one.
1213
+ * @throws [[IModelError]] if there is a problem inserting the DefinitionContainer
1214
+ */
1215
+ static insert(iModelDb, definitionModelId, code, isPrivate) {
1216
+ const containerElement = this.create(iModelDb, definitionModelId, code, isPrivate);
1217
+ const containerElementId = iModelDb.elements.insertElement(containerElement.toJSON());
1218
+ const containerSubModelProps = {
1219
+ classFullName: DefinitionModel.classFullName,
1220
+ modeledElement: { id: containerElementId },
1221
+ isPrivate,
1222
+ };
1223
+ iModelDb.models.insertModel(containerSubModelProps);
1224
+ return containerElementId;
1225
+ }
1226
+ }
1227
+ /** A non-exclusive set of DefinitionElements grouped using the DefinitionGroupGroupsDefinitions relationship.
1228
+ * @note The associated ECClass was added to the BisCore schema in version 1.0.10
1229
+ * @public
1230
+ */
1231
+ export class DefinitionGroup extends DefinitionSet {
1232
+ static get className() { return "DefinitionGroup"; }
1233
+ /** Create a DefinitionGroup
1234
+ * @param iModelDb The IModelDb
1235
+ * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionGroup element.
1236
+ * @param code The Code for this DefinitionGroup
1237
+ * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.
1238
+ * @returns The newly constructed DefinitionGroup
1239
+ * @note There is not a predefined CodeSpec for DefinitionGroup elements, so it is the responsibility of the domain or application to create one.
1240
+ * @throws [[IModelError]] if there is a problem creating the DefinitionGroup
1241
+ */
1242
+ static create(iModelDb, definitionModelId, code, isPrivate) {
1243
+ const elementProps = {
1244
+ classFullName: this.classFullName,
1245
+ model: definitionModelId,
1246
+ code,
1247
+ isPrivate,
1248
+ };
1249
+ return new DefinitionGroup(elementProps, iModelDb);
1250
+ }
1251
+ }
1252
+ /** Defines a set of properties (the *type*) that may be associated with an element.
1253
+ * @public
1254
+ */
1255
+ export class TypeDefinitionElement extends DefinitionElement {
1256
+ static get className() { return "TypeDefinitionElement"; }
1257
+ recipe;
1258
+ constructor(props, iModel) {
1259
+ super(props, iModel);
1260
+ this.recipe = this.recipe;
1261
+ }
1262
+ collectReferenceIds(referenceIds) {
1263
+ super.collectReferenceIds(referenceIds);
1264
+ if (undefined !== this.recipe)
1265
+ referenceIds.addElement(this.recipe.id);
1266
+ }
1267
+ }
1268
+ /** Defines a recipe for generating instances from a definition.
1269
+ * @beta
1270
+ */
1271
+ export class RecipeDefinitionElement extends DefinitionElement {
1272
+ static get className() { return "RecipeDefinitionElement"; }
1273
+ constructor(props, iModel) { super(props, iModel); }
1274
+ }
1275
+ /** Defines a set of properties (the *type*) that can be associated with a Physical Element. A Physical
1276
+ * Type has a strong correlation with something that can be ordered from a catalog since all instances
1277
+ * share a common set of properties.
1278
+ * @public
1279
+ */
1280
+ export class PhysicalType extends TypeDefinitionElement {
1281
+ static get className() { return "PhysicalType"; }
1282
+ /** If defined, the [[PhysicalMaterial]] that makes up this PhysicalType. */
1283
+ physicalMaterial;
1284
+ constructor(props, iModel) {
1285
+ super(props, iModel);
1286
+ this.physicalMaterial = RelatedElement.fromJSON(props.physicalMaterial);
1287
+ }
1288
+ toJSON() {
1289
+ const val = super.toJSON();
1290
+ val.physicalMaterial = this.physicalMaterial?.toJSON();
1291
+ return val;
1292
+ }
1293
+ /** Create a Code for a PhysicalType element given a name that is meant to be unique within the scope of the specified DefinitionModel.
1294
+ * @param iModel The IModelDb
1295
+ * @param scopeModelId The Id of the DefinitionModel that contains the PhysicalType element and provides the scope for its name.
1296
+ * @param codeValue The PhysicalType name
1297
+ */
1298
+ static createCode(iModel, scopeModelId, codeValue) {
1299
+ const codeSpec = iModel.codeSpecs.getByName(BisCodeSpec.physicalType);
1300
+ return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });
1301
+ }
1302
+ }
1303
+ /** Defines a set of properties (the *type*) that can be associated with a spatial location.
1304
+ * @public
1305
+ */
1306
+ export class SpatialLocationType extends TypeDefinitionElement {
1307
+ static get className() { return "SpatialLocationType"; }
1308
+ constructor(props, iModel) { super(props, iModel); }
1309
+ /** Create a Code for a SpatialLocationType element given a name that is meant to be unique within the scope of the specified DefinitionModel.
1310
+ * @param iModel The IModelDb
1311
+ * @param scopeModelId The Id of the DefinitionModel that contains the SpatialLocationType element and provides the scope for its name.
1312
+ * @param codeValue The SpatialLocationType name
1313
+ */
1314
+ static createCode(iModel, scopeModelId, codeValue) {
1315
+ const codeSpec = iModel.codeSpecs.getByName(BisCodeSpec.spatialLocationType);
1316
+ return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });
1317
+ }
1318
+ }
1319
+ /** A TemplateRecipe3d is a DefinitionElement that has a sub-model that contains the 3d template elements.
1320
+ * @beta
1321
+ */
1322
+ export class TemplateRecipe3d extends RecipeDefinitionElement {
1323
+ static get className() { return "TemplateRecipe3d"; }
1324
+ constructor(props, iModel) { super(props, iModel); }
1325
+ /** Create a Code for a TemplateRecipe3d given a name that is meant to be unique within the scope of its Model.
1326
+ * @param iModelDb The IModelDb
1327
+ * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.
1328
+ * @param codeValue The name of the TemplateRecipe3d element.
1329
+ */
1330
+ static createCode(iModelDb, definitionModelId, codeValue) {
1331
+ const codeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.templateRecipe3d);
1332
+ return new Code({ spec: codeSpec.id, scope: definitionModelId, value: codeValue });
1333
+ }
1334
+ /** Create a TemplateRecipe3d
1335
+ * @param iModelDb The IModelDb
1336
+ * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.
1337
+ * @param name The name (Code.value) of the TemplateRecipe3d
1338
+ * @returns The newly constructed TemplateRecipe3d
1339
+ * @throws [[IModelError]] if there is a problem creating the TemplateRecipe3d
1340
+ */
1341
+ static create(iModelDb, definitionModelId, name, isPrivate) {
1342
+ const elementProps = {
1343
+ classFullName: this.classFullName,
1344
+ model: definitionModelId,
1345
+ code: this.createCode(iModelDb, definitionModelId, name),
1346
+ isPrivate,
1347
+ };
1348
+ return new TemplateRecipe3d(elementProps, iModelDb);
1349
+ }
1350
+ /** Insert a TemplateRecipe3d and a PhysicalModel (sub-model) that will contain the 3d template elements.
1351
+ * @param iModelDb The IModelDb
1352
+ * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.
1353
+ * @param name The name (Code.value) of the TemplateRecipe3d
1354
+ * @returns The Id of the newly inserted TemplateRecipe3d and the PhysicalModel that sub-models it.
1355
+ * @throws [[IModelError]] if there is a problem inserting the TemplateRecipe3d or its sub-model.
1356
+ */
1357
+ static insert(iModelDb, definitionModelId, name, isPrivate) {
1358
+ const element = this.create(iModelDb, definitionModelId, name, isPrivate);
1359
+ const modeledElementId = iModelDb.elements.insertElement(element.toJSON());
1360
+ const modelProps = {
1361
+ classFullName: PhysicalModel.classFullName,
1362
+ modeledElement: { id: modeledElementId },
1363
+ isTemplate: true,
1364
+ };
1365
+ return iModelDb.models.insertModel(modelProps); // will be the same value as modeledElementId
1366
+ }
1367
+ }
1368
+ /** Defines a set of properties (the *type*) that can be associated with a 2D Graphical Element.
1369
+ * @public
1370
+ */
1371
+ export class GraphicalType2d extends TypeDefinitionElement {
1372
+ static get className() { return "GraphicalType2d"; }
1373
+ constructor(props, iModel) { super(props, iModel); }
1374
+ /** Create a Code for a GraphicalType2d element given a name that is meant to be unique within the scope of the specified DefinitionModel.
1375
+ * @param iModel The IModelDb
1376
+ * @param scopeModelId The Id of the DefinitionModel that contains the GraphicalType2d element and provides the scope for its name.
1377
+ * @param codeValue The GraphicalType2d name
1378
+ */
1379
+ static createCode(iModel, scopeModelId, codeValue) {
1380
+ const codeSpec = iModel.codeSpecs.getByName(BisCodeSpec.graphicalType2d);
1381
+ return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });
1382
+ }
1383
+ }
1384
+ /** A recipe that uses a 2D template for creating new instances.
1385
+ * @beta
1386
+ */
1387
+ export class TemplateRecipe2d extends RecipeDefinitionElement {
1388
+ static get className() { return "TemplateRecipe2d"; }
1389
+ constructor(props, iModel) { super(props, iModel); }
1390
+ /** Create a Code for a TemplateRecipe2d given a name that is meant to be unique within the scope of its Model.
1391
+ * @param iModelDb The IModelDb
1392
+ * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.
1393
+ * @param codeValue The name of the TemplateRecipe2d element.
1394
+ */
1395
+ static createCode(iModelDb, definitionModelId, codeValue) {
1396
+ const codeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.templateRecipe2d);
1397
+ return new Code({ spec: codeSpec.id, scope: definitionModelId, value: codeValue });
1398
+ }
1399
+ /** Create a TemplateRecipe2d
1400
+ * @param iModelDb The IModelDb
1401
+ * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.
1402
+ * @param name The name (Code.value) of the TemplateRecipe2d
1403
+ * @returns The newly constructed TemplateRecipe2d
1404
+ * @throws [[IModelError]] if there is a problem creating the TemplateRecipe2d
1405
+ */
1406
+ static create(iModelDb, definitionModelId, name, isPrivate) {
1407
+ const elementProps = {
1408
+ classFullName: this.classFullName,
1409
+ model: definitionModelId,
1410
+ code: this.createCode(iModelDb, definitionModelId, name),
1411
+ isPrivate,
1412
+ };
1413
+ return new TemplateRecipe2d(elementProps, iModelDb);
1414
+ }
1415
+ /** Insert a TemplateRecipe2d and a DrawingModel (sub-model) that will contain the 2d template elements.
1416
+ * @param iModelDb The IModelDb
1417
+ * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.
1418
+ * @param name The name (Code.value) of the TemplateRecipe2d
1419
+ * @returns The Id of the newly inserted TemplateRecipe2d and the PhysicalModel that sub-models it.
1420
+ * @throws [[IModelError]] if there is a problem inserting the TemplateRecipe2d or its sub-model.
1421
+ */
1422
+ static insert(iModelDb, definitionModelId, name, isPrivate) {
1423
+ const element = this.create(iModelDb, definitionModelId, name, isPrivate);
1424
+ const modeledElementId = iModelDb.elements.insertElement(element.toJSON());
1425
+ const modelProps = {
1426
+ classFullName: DrawingModel.classFullName,
1427
+ modeledElement: { id: modeledElementId },
1428
+ isTemplate: true,
1429
+ };
1430
+ return iModelDb.models.insertModel(modelProps); // will be the same value as modeledElementId
1431
+ }
1432
+ }
1433
+ /** An abstract base class for elements that establishes a particular modeling perspective for its parent Subject.
1434
+ * Instances are always sub-modeled by a specialization of Model of the appropriate modeling perspective.
1435
+ * @see [iModel Information Hierarchy]($docs/bis/guide/data-organization/top-of-the-world), [[Subject]], [[Model]]
1436
+ * @public
1437
+ */
1438
+ export class InformationPartitionElement extends InformationContentElement {
1439
+ static get className() { return "InformationPartitionElement"; }
1440
+ /** A human-readable string describing the intent of the partition. */
1441
+ description;
1442
+ constructor(props, iModel) {
1443
+ super(props, iModel);
1444
+ this.description = props.description;
1445
+ }
1446
+ toJSON() {
1447
+ return super.toJSON(); // Entity.toJSON takes care of auto-handled properties
1448
+ }
1449
+ /** Create a code that can be used for any subclass of InformationPartitionElement.
1450
+ * @param iModelDb The IModelDb
1451
+ * @param parentSubjectId The Id of the parent Subject that provides the scope for names of its child InformationPartitionElements.
1452
+ * @param codeValue The InformationPartitionElement name
1453
+ */
1454
+ static createCode(iModel, parentSubjectId, codeValue) {
1455
+ const codeSpec = iModel.codeSpecs.getByName(BisCodeSpec.informationPartitionElement);
1456
+ return new Code({ spec: codeSpec.id, scope: parentSubjectId, value: codeValue });
1457
+ }
1458
+ }
1459
+ /** A DefinitionPartition element establishes a *Definition* modeling perspective for its parent Subject.
1460
+ * A DefinitionPartition is always sub-modeled by a DefinitionModel.
1461
+ * @see [[DefinitionModel]]
1462
+ * @public
1463
+ */
1464
+ export class DefinitionPartition extends InformationPartitionElement {
1465
+ static get className() { return "DefinitionPartition"; }
1466
+ }
1467
+ /** A DocumentPartition element establishes a *Document* modeling perspective for its parent Subject.
1468
+ * A DocumentPartition is always sub-modeled by a DocumentListModel.
1469
+ * @see [[DocumentListModel]]
1470
+ * @public
1471
+ */
1472
+ export class DocumentPartition extends InformationPartitionElement {
1473
+ static get className() { return "DocumentPartition"; }
1474
+ }
1475
+ /** A GroupInformationPartition element establishes a *Group Information* modeling perspective for its parent Subject.
1476
+ * A GroupInformationPartition is always sub-modeled by a GroupInformationModel.
1477
+ * @see [[GroupInformationModel]]
1478
+ * @public
1479
+ */
1480
+ export class GroupInformationPartition extends InformationPartitionElement {
1481
+ static get className() { return "GroupInformationPartition"; }
1482
+ }
1483
+ /** A GraphicalPartition3d element establishes a *3D Graphical* modeling perspective for its parent Subject.
1484
+ * A GraphicalPartition3d is always sub-modeled by a GraphicalModel3d.
1485
+ * @note The associated ECClass was added to the BisCore schema in version 1.0.8
1486
+ * @see [[GraphicalModel3d]]
1487
+ * @public
1488
+ */
1489
+ export class GraphicalPartition3d extends InformationPartitionElement {
1490
+ static get className() { return "GraphicalPartition3d"; }
1491
+ }
1492
+ /** An InformationRecordPartition element establishes a *Information Record* modeling perspective for its parent Subject.
1493
+ * A InformationRecordPartition is always sub-modeled by an InformationRecordModel.
1494
+ * @see [[InformationRecordModel]]
1495
+ * @public
1496
+ */
1497
+ export class InformationRecordPartition extends InformationPartitionElement {
1498
+ static get className() { return "InformationRecordPartition"; }
1499
+ }
1500
+ /** A LinkPartition element establishes a *Link* modeling perspective for its parent Subject. A LinkPartition is always sub-modeled by a LinkModel.
1501
+ * @see [[LinkModel]]
1502
+ * @public
1503
+ */
1504
+ export class LinkPartition extends InformationPartitionElement {
1505
+ static get className() { return "LinkPartition"; }
1506
+ }
1507
+ /** A PhysicalPartition element establishes a *Physical* modeling perspective for its parent Subject. A PhysicalPartition is always sub-modeled by a PhysicalModel.
1508
+ * @see [[PhysicalModel]]
1509
+ * @public
1510
+ */
1511
+ export class PhysicalPartition extends InformationPartitionElement {
1512
+ static get className() { return "PhysicalPartition"; }
1513
+ }
1514
+ /** A SpatialLocationPartition element establishes a *SpatialLocation* modeling perspective for its parent Subject.
1515
+ * A SpatialLocationPartition is always sub-modeled by a SpatialLocationModel.
1516
+ * @see [[SpatialLocationModel]]
1517
+ * @public
1518
+ */
1519
+ export class SpatialLocationPartition extends InformationPartitionElement {
1520
+ static get className() { return "SpatialLocationPartition"; }
1521
+ }
1522
+ /** A SheetIndexPartition element establishes a [[SheetIndex]] modeling perspective for its parent [[Subject]].
1523
+ * A SheetIndexPartition is always sub-modeled by a [[SheetIndexModel]].
1524
+ * @beta
1525
+ */
1526
+ export class SheetIndexPartition extends InformationPartitionElement {
1527
+ static get className() { return "SheetIndexPartition"; }
1528
+ }
1529
+ /** Group Information is an abstract base class for modeling entities whose main purpose is to reference a group of related elements.
1530
+ * @public
1531
+ */
1532
+ export class GroupInformationElement extends InformationReferenceElement {
1533
+ static get className() { return "GroupInformationElement"; }
1534
+ }
1535
+ /** An information element that specifies a link.
1536
+ * @public
1537
+ */
1538
+ export class LinkElement extends InformationReferenceElement {
1539
+ static get className() { return "LinkElement"; }
1540
+ /** Create a Code for a LinkElement given a name that is meant to be unique within the scope of the specified Model.
1541
+ * @param iModel The IModelDb
1542
+ * @param scopeModelId The Id of the Model that contains the LinkElement and provides the scope for its name.
1543
+ * @param codeValue The LinkElement name
1544
+ */
1545
+ static createCode(iModel, scopeModelId, codeValue) {
1546
+ const codeSpec = iModel.codeSpecs.getByName(BisCodeSpec.linkElement);
1547
+ return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });
1548
+ }
1549
+ }
1550
+ /** An information element that specifies a URL link.
1551
+ * @public
1552
+ */
1553
+ export class UrlLink extends LinkElement {
1554
+ static get className() { return "UrlLink"; }
1555
+ description;
1556
+ url;
1557
+ constructor(props, iModel) {
1558
+ super(props, iModel);
1559
+ this.description = props.description;
1560
+ this.url = props.url;
1561
+ }
1562
+ /**
1563
+ * UrlLink custom HandledProps includes 'description', and 'url'.
1564
+ * @inheritdoc
1565
+ * @beta
1566
+ */
1567
+ static _customHandledProps = [
1568
+ { propertyName: "description", source: "Class" },
1569
+ { propertyName: "url", source: "Class" },
1570
+ ];
1571
+ /**
1572
+ * UrlLink deserializes 'description', and 'url'.
1573
+ * @inheritdoc
1574
+ * @beta
1575
+ */
1576
+ static deserialize(props) {
1577
+ const elProps = super.deserialize(props);
1578
+ elProps.description = props.row.description ?? "";
1579
+ elProps.url = props.row.url;
1580
+ return elProps;
1581
+ }
1582
+ /**
1583
+ * UrlLink serializes 'description', and 'url'.
1584
+ * @inheritdoc
1585
+ * @beta
1586
+ */
1587
+ static serialize(props, iModel) {
1588
+ const inst = super.serialize(props, iModel);
1589
+ inst.description = props.description;
1590
+ return inst;
1591
+ }
1592
+ toJSON() {
1593
+ const val = super.toJSON();
1594
+ val.description = this.description;
1595
+ val.url = this.url;
1596
+ return val;
1597
+ }
1598
+ }
1599
+ /** Represents a folder-like structure that organizes repositories (typically files) in an external system.
1600
+ * @note The associated ECClass was added to the BisCore schema in version 1.0.13
1601
+ * @alpha
1602
+ */
1603
+ export class FolderLink extends UrlLink {
1604
+ static get className() { return "FolderLink"; }
1605
+ }
1606
+ /** An information element that links to a repository.
1607
+ * @public
1608
+ */
1609
+ export class RepositoryLink extends UrlLink {
1610
+ static get className() { return "RepositoryLink"; }
1611
+ repositoryGuid;
1612
+ /** @note This property was added to the BisCore schema in version 1.0.13 */
1613
+ format;
1614
+ constructor(props, iModel) {
1615
+ super(props, iModel);
1616
+ this.repositoryGuid = props.repositoryGuid;
1617
+ this.format = props.format;
1618
+ }
1619
+ toJSON() {
1620
+ const val = super.toJSON();
1621
+ val.repositoryGuid = this.repositoryGuid;
1622
+ val.format = this.format;
1623
+ return val;
1624
+ }
1625
+ }
1626
+ /** An information element that links to an embedded file.
1627
+ * @public
1628
+ */
1629
+ export class EmbeddedFileLink extends LinkElement {
1630
+ static get className() { return "EmbeddedFileLink"; }
1631
+ }
1632
+ /** A real world entity is modeled as a Role Element when a set of external circumstances define an important
1633
+ * role (one that is worth tracking) that is not intrinsic to the entity playing the role. For example,
1634
+ * a person can play the role of a teacher or a rock can play the role of a boundary marker.
1635
+ * @public
1636
+ */
1637
+ export class RoleElement extends Element {
1638
+ static get className() { return "RoleElement"; }
1639
+ }
1640
+ /** A Definition Element that specifies a collection of geometry that is meant to be reused across Geometric
1641
+ * Element instances. Leveraging Geometry Parts can help reduce file size and improve display performance.
1642
+ * @public
1643
+ */
1644
+ export class GeometryPart extends DefinitionElement {
1645
+ static get className() { return "GeometryPart"; }
1646
+ geom;
1647
+ bbox;
1648
+ constructor(props, iModel) {
1649
+ super(props, iModel);
1650
+ this.geom = props.geom;
1651
+ this.bbox = Range3d.fromJSON(props.bbox);
1652
+ }
1653
+ /**
1654
+ * GeometryPart custom HandledProps includes 'geometryStream', 'bBoxHigh', and 'bBoxLow'.
1655
+ * @inheritdoc
1656
+ * @beta
1657
+ */
1658
+ static _customHandledProps = [
1659
+ { propertyName: "geometryStream", source: "Class" },
1660
+ { propertyName: "bBoxLow", source: "Class" },
1661
+ { propertyName: "bBoxHigh", source: "Class" },
1662
+ ];
1663
+ /**
1664
+ * GeometryPart deserializes 'geometryStream', 'bBoxHigh', and 'bBoxLow'.
1665
+ * @inheritdoc
1666
+ * @beta
1667
+ */
1668
+ static deserialize(props) {
1669
+ const elProps = super.deserialize(props);
1670
+ const instance = props.row;
1671
+ if ("bBoxHigh" in instance && instance.bBoxHigh !== undefined && "bBoxLow" in instance && instance.bBoxLow !== undefined) {
1672
+ elProps.bbox = {
1673
+ low: [instance.bBoxLow.x, instance.bBoxLow.y, instance.bBoxLow.z],
1674
+ high: [instance.bBoxHigh.x, instance.bBoxHigh.y, instance.bBoxHigh.z],
1675
+ };
1676
+ }
1677
+ if (instance.geometryStream) {
1678
+ elProps.geom = props.iModel[_nativeDb].convertOrUpdateGeometryPart({
1679
+ geom: instance.geometryStream,
1680
+ is2d: false,
1681
+ bbox: elProps.bbox,
1682
+ }, "GeometryStreamProps", props.options?.element ?? {}).geom;
1683
+ }
1684
+ return elProps;
1685
+ }
1686
+ /**
1687
+ * GeometryPart serialize 'geometryStream', 'bBoxHigh', and 'bBoxLow'.
1688
+ * @inheritdoc
1689
+ * @beta
1690
+ */
1691
+ static serialize(props, iModel) {
1692
+ const inst = super.serialize(props, iModel);
1693
+ if (undefined !== props.geom) {
1694
+ const source = inst.geometryStream = iModel[_nativeDb].convertOrUpdateGeometryPart({
1695
+ geom: props.geom,
1696
+ is2d: false,
1697
+ bbox: props.bbox,
1698
+ }, "BinaryStream", {});
1699
+ inst.geometryStream = source.geom;
1700
+ if (source.bbox) {
1701
+ props.bbox = source.bbox;
1702
+ }
1703
+ }
1704
+ if (undefined !== props.bbox) {
1705
+ if (Array.isArray(props.bbox.low)) {
1706
+ inst.bBoxLow = { x: props.bbox.low[0], y: props.bbox.low[1], z: props.bbox.low[2] };
1707
+ }
1708
+ else {
1709
+ inst.bBoxLow = props.bbox.low;
1710
+ }
1711
+ if (Array.isArray(props.bbox.high)) {
1712
+ inst.bBoxHigh = { x: props.bbox.high[0], y: props.bbox.high[1], z: props.bbox.high[2] };
1713
+ }
1714
+ else {
1715
+ inst.bBoxHigh = props.bbox.high;
1716
+ }
1717
+ }
1718
+ return inst;
1719
+ }
1720
+ toJSON() {
1721
+ const val = super.toJSON();
1722
+ val.geom = this.geom;
1723
+ val.bbox = this.bbox;
1724
+ return val;
1725
+ }
1726
+ /** Create a Code for a GeometryPart element given a name that is meant to be unique within the scope of the specified DefinitionModel.
1727
+ * @param iModel The IModelDb
1728
+ * @param scopeModelId The Id of the DefinitionModel that contains the GeometryPart element and provides the scope for its name.
1729
+ * @param codeValue The GeometryPart name
1730
+ * @note GeometryPart elements are not required to be named (have a non-empty Code).
1731
+ */
1732
+ static createCode(iModel, scopeModelId, codeValue) {
1733
+ const codeSpec = iModel.codeSpecs.getByName(BisCodeSpec.geometryPart);
1734
+ return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });
1735
+ }
1736
+ }
1737
+ /** The definition element for a line style
1738
+ * @public
1739
+ */
1740
+ export class LineStyle extends DefinitionElement {
1741
+ static get className() { return "LineStyle"; }
1742
+ description;
1743
+ data;
1744
+ constructor(props, iModel) {
1745
+ super(props, iModel);
1746
+ this.description = props.description;
1747
+ this.data = props.data;
1748
+ }
1749
+ /**
1750
+ * LineStyle custom HandledProps includes 'data'.
1751
+ * @inheritdoc
1752
+ * @beta
1753
+ */
1754
+ static _customHandledProps = [
1755
+ { propertyName: "data", source: "Class" },
1756
+ ];
1757
+ /**
1758
+ * LineStyle deserializes 'data'.
1759
+ * @inheritdoc
1760
+ * @beta
1761
+ */
1762
+ static deserialize(props) {
1763
+ const elProps = super.deserialize(props);
1764
+ const instance = props.row;
1765
+ elProps.data = instance.data ?? "";
1766
+ return elProps;
1767
+ }
1768
+ /**
1769
+ * LineStyle serializes 'data'.
1770
+ * @inheritdoc
1771
+ * @beta
1772
+ */
1773
+ static serialize(props, iModel) {
1774
+ const inst = super.serialize(props, iModel);
1775
+ inst.data = props.data;
1776
+ return inst;
1777
+ }
1778
+ /** Create a Code for a LineStyle definition given a name that is meant to be unique within the scope of the specified model.
1779
+ * @param iModel The IModel
1780
+ * @param scopeModelId The Id of the DefinitionModel that contains the LineStyle and provides the scope for its name.
1781
+ * @param codeValue The name of the LineStyle
1782
+ * @returns A LineStyle Code
1783
+ */
1784
+ static createCode(iModel, scopeModelId, codeValue) {
1785
+ return new Code({ spec: iModel.codeSpecs.getByName(BisCodeSpec.lineStyle).id, scope: scopeModelId, value: codeValue });
1786
+ }
1787
+ }
1788
+ /** Describes how to animate a view of a [[GeometricModel]] to show change over time using a [RenderSchedule.Script]($common).
1789
+ * @note This class was introduced in version 01.00.13 of the BisCore ECSchema. It should only be used with [[IModelDb]]s containing that version or newer.
1790
+ * @public
1791
+ */
1792
+ export class RenderTimeline extends InformationRecordElement {
1793
+ static get className() { return "RenderTimeline"; }
1794
+ /** A human-readable description of the timeline, which may be an empty string. */
1795
+ description;
1796
+ /** The JSON representation of the instructions for visualizing change over time.
1797
+ * @see [RenderSchedule.Script]($common) for the API for working with the script.
1798
+ */
1799
+ scriptProps;
1800
+ constructor(props, iModel) {
1801
+ super(props, iModel);
1802
+ this.description = props.description ?? "";
1803
+ this.scriptProps = RenderTimeline.parseScriptProps(props.script);
1804
+ }
1805
+ static fromJSON(props, iModel) {
1806
+ return new RenderTimeline(props, iModel);
1807
+ }
1808
+ toJSON() {
1809
+ const props = super.toJSON();
1810
+ if (this.description.length > 0)
1811
+ props.description = this.description;
1812
+ props.script = JSON.stringify(this.scriptProps);
1813
+ return props;
1814
+ }
1815
+ /**
1816
+ * RenderTimeline deserialize checks if Schedule Script Element Ids need to be omitted, and if so, removes them.
1817
+ * @inheritdoc
1818
+ * @beta
1819
+ */
1820
+ static deserialize(props) {
1821
+ const elProps = super.deserialize(props);
1822
+ const options = props.options?.element?.renderTimeline;
1823
+ // Omit Schedule Script Element Ids if the option is set
1824
+ if (options?.omitScriptElementIds && elProps.script) {
1825
+ const scriptProps = RenderTimeline.parseScriptProps(elProps.script);
1826
+ elProps.script = JSON.stringify(RenderSchedule.Script.removeScheduleScriptElementIds(scriptProps));
1827
+ }
1828
+ return elProps;
1829
+ }
1830
+ static parseScriptProps(json) {
1831
+ try {
1832
+ return JSON.parse(json);
1833
+ }
1834
+ catch {
1835
+ return [];
1836
+ }
1837
+ }
1838
+ collectReferenceIds(ids) {
1839
+ super.collectReferenceIds(ids);
1840
+ const script = RenderSchedule.Script.fromJSON(this.scriptProps);
1841
+ script?.discloseIds(ids);
1842
+ }
1843
+ /** @alpha */
1844
+ static onCloned(context, sourceProps, targetProps) {
1845
+ super.onCloned(context, sourceProps, targetProps);
1846
+ if (context.isBetweenIModels)
1847
+ targetProps.script = JSON.stringify(this.remapScript(context, this.parseScriptProps(targetProps.script)));
1848
+ }
1849
+ /** Remap Ids when cloning a RenderSchedule.Script between iModels on a DisplayStyle or RenderTimeline.
1850
+ * @beta
1851
+ */
1852
+ static remapScript(context, input) {
1853
+ const scriptProps = [];
1854
+ if (!Array.isArray(input))
1855
+ return scriptProps;
1856
+ const elementIds = new OrderedId64Array();
1857
+ for (const model of input) {
1858
+ const modelId = context.findTargetElementId(model.modelId);
1859
+ if (!Id64.isValid(modelId))
1860
+ continue;
1861
+ model.modelId = modelId;
1862
+ scriptProps.push(model);
1863
+ for (const element of model.elementTimelines) {
1864
+ elementIds.clear();
1865
+ for (const sourceId of RenderSchedule.ElementTimeline.getElementIds(element.elementIds)) {
1866
+ const targetId = context.findTargetElementId(sourceId);
1867
+ if (Id64.isValid(targetId))
1868
+ elementIds.insert(targetId);
1869
+ }
1870
+ element.elementIds = CompressedId64Set.compressIds(elementIds);
1871
+ }
1872
+ }
1873
+ return scriptProps;
1874
+ }
1875
+ }
1876
+ //# sourceMappingURL=Element.js.map