@itwin/core-backend 5.9.0-dev.8 → 5.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (604) hide show
  1. package/CHANGELOG.md +38 -1
  2. package/lib/cjs/BackendHubAccess.d.ts +38 -0
  3. package/lib/cjs/BackendHubAccess.d.ts.map +1 -1
  4. package/lib/cjs/BackendHubAccess.js.map +1 -1
  5. package/lib/cjs/BackendLoggerCategory.js.map +1 -1
  6. package/lib/cjs/BisCoreSchema.js.map +1 -1
  7. package/lib/cjs/BlobContainerService.js.map +1 -1
  8. package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
  9. package/lib/cjs/BriefcaseManager.js +6 -3
  10. package/lib/cjs/BriefcaseManager.js.map +1 -1
  11. package/lib/cjs/CatalogDb.js.map +1 -1
  12. package/lib/cjs/Category.d.ts +4 -4
  13. package/lib/cjs/Category.js.map +1 -1
  14. package/lib/cjs/ChangeSummaryManager.js +2 -2
  15. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  16. package/lib/cjs/ChangedElementsDb.js.map +1 -1
  17. package/lib/cjs/ChangesetECAdaptor.d.ts +9 -1
  18. package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
  19. package/lib/cjs/ChangesetECAdaptor.js +255 -249
  20. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  21. package/lib/cjs/ChangesetReader.d.ts +186 -0
  22. package/lib/cjs/ChangesetReader.d.ts.map +1 -0
  23. package/lib/cjs/ChangesetReader.js +372 -0
  24. package/lib/cjs/ChangesetReader.js.map +1 -0
  25. package/lib/cjs/ChangesetReaderTypes.d.ts +120 -0
  26. package/lib/cjs/ChangesetReaderTypes.d.ts.map +1 -0
  27. package/lib/cjs/ChangesetReaderTypes.js +23 -0
  28. package/lib/cjs/ChangesetReaderTypes.js.map +1 -0
  29. package/lib/cjs/ChannelControl.js.map +1 -1
  30. package/lib/cjs/CheckpointManager.js.map +1 -1
  31. package/lib/cjs/ClassRegistry.js +5 -5
  32. package/lib/cjs/ClassRegistry.js.map +1 -1
  33. package/lib/cjs/CloudSqlite.d.ts +1 -1
  34. package/lib/cjs/CloudSqlite.d.ts.map +1 -1
  35. package/lib/cjs/CloudSqlite.js +68 -13
  36. package/lib/cjs/CloudSqlite.js.map +1 -1
  37. package/lib/cjs/CodeService.js.map +1 -1
  38. package/lib/cjs/CodeSpecs.d.ts +3 -3
  39. package/lib/cjs/CodeSpecs.js.map +1 -1
  40. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  41. package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
  42. package/lib/cjs/DevTools.js.map +1 -1
  43. package/lib/cjs/DisplayStyle.d.ts +2 -2
  44. package/lib/cjs/DisplayStyle.js.map +1 -1
  45. package/lib/cjs/ECDb.js.map +1 -1
  46. package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
  47. package/lib/cjs/ECSqlRowExecutor.js.map +1 -1
  48. package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
  49. package/lib/cjs/ECSqlStatement.js.map +1 -1
  50. package/lib/cjs/ECSqlSyncReader.js.map +1 -1
  51. package/lib/cjs/EditTxn.d.ts +55 -1
  52. package/lib/cjs/EditTxn.d.ts.map +1 -1
  53. package/lib/cjs/EditTxn.js +43 -1
  54. package/lib/cjs/EditTxn.js.map +1 -1
  55. package/lib/cjs/Element.d.ts +79 -10
  56. package/lib/cjs/Element.d.ts.map +1 -1
  57. package/lib/cjs/Element.js +38 -2
  58. package/lib/cjs/Element.js.map +1 -1
  59. package/lib/cjs/ElementAspect.d.ts +1 -1
  60. package/lib/cjs/ElementAspect.js.map +1 -1
  61. package/lib/cjs/ElementGraphics.js.map +1 -1
  62. package/lib/cjs/ElementTreeWalker.d.ts +5 -5
  63. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  64. package/lib/cjs/Entity.js.map +1 -1
  65. package/lib/cjs/EntityReferences.js.map +1 -1
  66. package/lib/cjs/ExportGraphics.js.map +1 -1
  67. package/lib/cjs/ExternalSource.d.ts +2 -2
  68. package/lib/cjs/ExternalSource.d.ts.map +1 -1
  69. package/lib/cjs/ExternalSource.js.map +1 -1
  70. package/lib/cjs/FontFile.js.map +1 -1
  71. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  72. package/lib/cjs/GeographicCRSServices.d.ts +15 -0
  73. package/lib/cjs/GeographicCRSServices.d.ts.map +1 -1
  74. package/lib/cjs/GeographicCRSServices.js +13 -4
  75. package/lib/cjs/GeographicCRSServices.js.map +1 -1
  76. package/lib/cjs/GeometrySummary.js +47 -47
  77. package/lib/cjs/GeometrySummary.js.map +1 -1
  78. package/lib/cjs/IModelDb.d.ts +31 -23
  79. package/lib/cjs/IModelDb.d.ts.map +1 -1
  80. package/lib/cjs/IModelDb.js +53 -34
  81. package/lib/cjs/IModelDb.js.map +1 -1
  82. package/lib/cjs/IModelDbFonts.js.map +1 -1
  83. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  84. package/lib/cjs/IModelHost.js.map +1 -1
  85. package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -1
  86. package/lib/cjs/IModelJsFs.js.map +1 -1
  87. package/lib/cjs/ImageSourceConversion.js.map +1 -1
  88. package/lib/cjs/IpcHost.d.ts.map +1 -1
  89. package/lib/cjs/IpcHost.js +33 -13
  90. package/lib/cjs/IpcHost.js.map +1 -1
  91. package/lib/cjs/LineStyle.d.ts +6 -6
  92. package/lib/cjs/LineStyle.js.map +1 -1
  93. package/lib/cjs/LocalHub.js +1 -1
  94. package/lib/cjs/LocalHub.js.map +1 -1
  95. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  96. package/lib/cjs/LockControl.d.ts +85 -1
  97. package/lib/cjs/LockControl.d.ts.map +1 -1
  98. package/lib/cjs/LockControl.js.map +1 -1
  99. package/lib/cjs/Material.d.ts +1 -1
  100. package/lib/cjs/Material.js.map +1 -1
  101. package/lib/cjs/Model.d.ts +40 -6
  102. package/lib/cjs/Model.d.ts.map +1 -1
  103. package/lib/cjs/Model.js +24 -0
  104. package/lib/cjs/Model.js.map +1 -1
  105. package/lib/cjs/NativeAppStorage.js.map +1 -1
  106. package/lib/cjs/NativeHost.js.map +1 -1
  107. package/lib/cjs/NavigationRelationship.js.map +1 -1
  108. package/lib/cjs/PartialChangeUnifier.d.ts +77 -0
  109. package/lib/cjs/PartialChangeUnifier.d.ts.map +1 -0
  110. package/lib/cjs/PartialChangeUnifier.js +234 -0
  111. package/lib/cjs/PartialChangeUnifier.js.map +1 -0
  112. package/lib/cjs/PromiseMemoizer.js.map +1 -1
  113. package/lib/cjs/PropertyStore.js.map +1 -1
  114. package/lib/cjs/Relationship.d.ts +10 -10
  115. package/lib/cjs/Relationship.js +6 -6
  116. package/lib/cjs/Relationship.js.map +1 -1
  117. package/lib/cjs/RpcBackend.js.map +1 -1
  118. package/lib/cjs/SQLiteDb.js.map +1 -1
  119. package/lib/cjs/Schema.js.map +1 -1
  120. package/lib/cjs/SchemaSync.js.map +1 -1
  121. package/lib/cjs/SchemaUtils.js.map +1 -1
  122. package/lib/cjs/SheetIndex.d.ts +4 -4
  123. package/lib/cjs/SheetIndex.d.ts.map +1 -1
  124. package/lib/cjs/SheetIndex.js.map +1 -1
  125. package/lib/cjs/SqliteChangesetReader.d.ts.map +1 -1
  126. package/lib/cjs/SqliteChangesetReader.js +1 -1
  127. package/lib/cjs/SqliteChangesetReader.js.map +1 -1
  128. package/lib/cjs/SqliteStatement.js.map +1 -1
  129. package/lib/cjs/StashManager.js.map +1 -1
  130. package/lib/cjs/Texture.d.ts +1 -1
  131. package/lib/cjs/Texture.js.map +1 -1
  132. package/lib/cjs/TileStorage.js.map +1 -1
  133. package/lib/cjs/TxnManager.d.ts +114 -4
  134. package/lib/cjs/TxnManager.d.ts.map +1 -1
  135. package/lib/cjs/TxnManager.js +196 -8
  136. package/lib/cjs/TxnManager.js.map +1 -1
  137. package/lib/cjs/ViewDefinition.d.ts +25 -13
  138. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  139. package/lib/cjs/ViewDefinition.js +77 -25
  140. package/lib/cjs/ViewDefinition.js.map +1 -1
  141. package/lib/cjs/ViewStateHydrator.js.map +1 -1
  142. package/lib/cjs/ViewStore.d.ts.map +1 -1
  143. package/lib/cjs/ViewStore.js +63 -21
  144. package/lib/cjs/ViewStore.js.map +1 -1
  145. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts +1 -1
  146. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  147. package/lib/cjs/annotations/FrameGeometry.js.map +1 -1
  148. package/lib/cjs/annotations/LeaderGeometry.js.map +1 -1
  149. package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
  150. package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -1
  151. package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -1
  152. package/lib/cjs/annotations/TextBlockLayout.js.map +1 -1
  153. package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
  154. package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +32 -32
  155. package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +27 -27
  156. package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +94 -94
  157. package/lib/cjs/assets/Settings/backend.setting.json5 +21 -21
  158. package/lib/cjs/core-backend.d.ts +3 -0
  159. package/lib/cjs/core-backend.d.ts.map +1 -1
  160. package/lib/cjs/core-backend.js +3 -0
  161. package/lib/cjs/core-backend.js.map +1 -1
  162. package/lib/cjs/domains/FunctionalElements.d.ts +1 -1
  163. package/lib/cjs/domains/FunctionalElements.d.ts.map +1 -1
  164. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  165. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  166. package/lib/cjs/domains/GenericElements.d.ts +2 -2
  167. package/lib/cjs/domains/GenericElements.d.ts.map +1 -1
  168. package/lib/cjs/domains/GenericElements.js.map +1 -1
  169. package/lib/cjs/domains/GenericSchema.js.map +1 -1
  170. package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -1
  171. package/lib/cjs/internal/ChannelAdmin.d.ts +2 -2
  172. package/lib/cjs/internal/ChannelAdmin.d.ts.map +1 -1
  173. package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
  174. package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
  175. package/lib/cjs/internal/FontFileImpl.js.map +1 -1
  176. package/lib/cjs/internal/HubMock.d.ts +2 -0
  177. package/lib/cjs/internal/HubMock.d.ts.map +1 -1
  178. package/lib/cjs/internal/HubMock.js +7 -0
  179. package/lib/cjs/internal/HubMock.js.map +1 -1
  180. package/lib/cjs/internal/IModelDbFontsImpl.js.map +1 -1
  181. package/lib/cjs/internal/IntegrityCheck.d.ts +10 -10
  182. package/lib/cjs/internal/IntegrityCheck.js +22 -22
  183. package/lib/cjs/internal/IntegrityCheck.js.map +1 -1
  184. package/lib/cjs/internal/NativePlatform.js.map +1 -1
  185. package/lib/cjs/internal/NoLocks.d.ts.map +1 -1
  186. package/lib/cjs/internal/NoLocks.js +6 -0
  187. package/lib/cjs/internal/NoLocks.js.map +1 -1
  188. package/lib/cjs/internal/OnlineStatus.js.map +1 -1
  189. package/lib/cjs/internal/ServerBasedLocks.d.ts +12 -0
  190. package/lib/cjs/internal/ServerBasedLocks.d.ts.map +1 -1
  191. package/lib/cjs/internal/ServerBasedLocks.js +285 -4
  192. package/lib/cjs/internal/ServerBasedLocks.js.map +1 -1
  193. package/lib/cjs/internal/Symbols.js.map +1 -1
  194. package/lib/cjs/internal/annotations/fields.js.map +1 -1
  195. package/lib/cjs/internal/cross-package.js.map +1 -1
  196. package/lib/cjs/internal/workspace/SettingsEditorImpl.js.map +1 -1
  197. package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
  198. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  199. package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
  200. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  201. package/lib/cjs/rpc/multipart.js.map +1 -1
  202. package/lib/cjs/rpc/tracing.js.map +1 -1
  203. package/lib/cjs/rpc/web/logging.js.map +1 -1
  204. package/lib/cjs/rpc/web/request.js.map +1 -1
  205. package/lib/cjs/rpc/web/response.js.map +1 -1
  206. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  207. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  208. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  209. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  210. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  211. package/lib/cjs/workspace/Settings.d.ts +6 -4
  212. package/lib/cjs/workspace/Settings.d.ts.map +1 -1
  213. package/lib/cjs/workspace/Settings.js.map +1 -1
  214. package/lib/cjs/workspace/SettingsDb.js.map +1 -1
  215. package/lib/cjs/workspace/SettingsEditor.js.map +1 -1
  216. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  217. package/lib/cjs/workspace/Workspace.js.map +1 -1
  218. package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
  219. package/lib/esm/BackendHubAccess.d.ts +38 -0
  220. package/lib/esm/BackendHubAccess.d.ts.map +1 -1
  221. package/lib/esm/BackendHubAccess.js.map +1 -1
  222. package/lib/esm/BackendLoggerCategory.js.map +1 -1
  223. package/lib/esm/BisCoreSchema.js.map +1 -1
  224. package/lib/esm/BlobContainerService.js.map +1 -1
  225. package/lib/esm/BriefcaseManager.d.ts.map +1 -1
  226. package/lib/esm/BriefcaseManager.js +6 -3
  227. package/lib/esm/BriefcaseManager.js.map +1 -1
  228. package/lib/esm/CatalogDb.js.map +1 -1
  229. package/lib/esm/Category.d.ts +4 -4
  230. package/lib/esm/Category.js.map +1 -1
  231. package/lib/esm/ChangeSummaryManager.js +2 -2
  232. package/lib/esm/ChangeSummaryManager.js.map +1 -1
  233. package/lib/esm/ChangedElementsDb.js.map +1 -1
  234. package/lib/esm/ChangesetECAdaptor.d.ts +9 -1
  235. package/lib/esm/ChangesetECAdaptor.d.ts.map +1 -1
  236. package/lib/esm/ChangesetECAdaptor.js +255 -249
  237. package/lib/esm/ChangesetECAdaptor.js.map +1 -1
  238. package/lib/esm/ChangesetReader.d.ts +186 -0
  239. package/lib/esm/ChangesetReader.d.ts.map +1 -0
  240. package/lib/esm/ChangesetReader.js +368 -0
  241. package/lib/esm/ChangesetReader.js.map +1 -0
  242. package/lib/esm/ChangesetReaderTypes.d.ts +120 -0
  243. package/lib/esm/ChangesetReaderTypes.d.ts.map +1 -0
  244. package/lib/esm/ChangesetReaderTypes.js +20 -0
  245. package/lib/esm/ChangesetReaderTypes.js.map +1 -0
  246. package/lib/esm/ChannelControl.js.map +1 -1
  247. package/lib/esm/CheckpointManager.js.map +1 -1
  248. package/lib/esm/ClassRegistry.js +5 -5
  249. package/lib/esm/ClassRegistry.js.map +1 -1
  250. package/lib/esm/CloudSqlite.d.ts +1 -1
  251. package/lib/esm/CloudSqlite.d.ts.map +1 -1
  252. package/lib/esm/CloudSqlite.js +69 -14
  253. package/lib/esm/CloudSqlite.js.map +1 -1
  254. package/lib/esm/CodeService.js.map +1 -1
  255. package/lib/esm/CodeSpecs.d.ts +3 -3
  256. package/lib/esm/CodeSpecs.js.map +1 -1
  257. package/lib/esm/ConcurrentQuery.js.map +1 -1
  258. package/lib/esm/CustomViewState3dCreator.js.map +1 -1
  259. package/lib/esm/DevTools.js.map +1 -1
  260. package/lib/esm/DisplayStyle.d.ts +2 -2
  261. package/lib/esm/DisplayStyle.js.map +1 -1
  262. package/lib/esm/ECDb.js.map +1 -1
  263. package/lib/esm/ECSchemaXmlContext.js.map +1 -1
  264. package/lib/esm/ECSqlRowExecutor.js.map +1 -1
  265. package/lib/esm/ECSqlStatement.d.ts.map +1 -1
  266. package/lib/esm/ECSqlStatement.js.map +1 -1
  267. package/lib/esm/ECSqlSyncReader.js.map +1 -1
  268. package/lib/esm/EditTxn.d.ts +55 -1
  269. package/lib/esm/EditTxn.d.ts.map +1 -1
  270. package/lib/esm/EditTxn.js +43 -1
  271. package/lib/esm/EditTxn.js.map +1 -1
  272. package/lib/esm/Element.d.ts +79 -10
  273. package/lib/esm/Element.d.ts.map +1 -1
  274. package/lib/esm/Element.js +38 -2
  275. package/lib/esm/Element.js.map +1 -1
  276. package/lib/esm/ElementAspect.d.ts +1 -1
  277. package/lib/esm/ElementAspect.js.map +1 -1
  278. package/lib/esm/ElementGraphics.js.map +1 -1
  279. package/lib/esm/ElementTreeWalker.d.ts +5 -5
  280. package/lib/esm/ElementTreeWalker.js.map +1 -1
  281. package/lib/esm/Entity.js.map +1 -1
  282. package/lib/esm/EntityReferences.js.map +1 -1
  283. package/lib/esm/ExportGraphics.js.map +1 -1
  284. package/lib/esm/ExternalSource.d.ts +2 -2
  285. package/lib/esm/ExternalSource.d.ts.map +1 -1
  286. package/lib/esm/ExternalSource.js.map +1 -1
  287. package/lib/esm/FontFile.js.map +1 -1
  288. package/lib/esm/GeoCoordConfig.js.map +1 -1
  289. package/lib/esm/GeographicCRSServices.d.ts +15 -0
  290. package/lib/esm/GeographicCRSServices.d.ts.map +1 -1
  291. package/lib/esm/GeographicCRSServices.js +12 -4
  292. package/lib/esm/GeographicCRSServices.js.map +1 -1
  293. package/lib/esm/GeometrySummary.js +47 -47
  294. package/lib/esm/GeometrySummary.js.map +1 -1
  295. package/lib/esm/IModelDb.d.ts +31 -23
  296. package/lib/esm/IModelDb.d.ts.map +1 -1
  297. package/lib/esm/IModelDb.js +54 -35
  298. package/lib/esm/IModelDb.js.map +1 -1
  299. package/lib/esm/IModelDbFonts.js.map +1 -1
  300. package/lib/esm/IModelElementCloneContext.js.map +1 -1
  301. package/lib/esm/IModelHost.js.map +1 -1
  302. package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -1
  303. package/lib/esm/IModelJsFs.js.map +1 -1
  304. package/lib/esm/ImageSourceConversion.js.map +1 -1
  305. package/lib/esm/IpcHost.d.ts.map +1 -1
  306. package/lib/esm/IpcHost.js +33 -13
  307. package/lib/esm/IpcHost.js.map +1 -1
  308. package/lib/esm/LineStyle.d.ts +6 -6
  309. package/lib/esm/LineStyle.js.map +1 -1
  310. package/lib/esm/LocalHub.js +1 -1
  311. package/lib/esm/LocalHub.js.map +1 -1
  312. package/lib/esm/LocalhostIpcHost.js.map +1 -1
  313. package/lib/esm/LockControl.d.ts +85 -1
  314. package/lib/esm/LockControl.d.ts.map +1 -1
  315. package/lib/esm/LockControl.js.map +1 -1
  316. package/lib/esm/Material.d.ts +1 -1
  317. package/lib/esm/Material.js.map +1 -1
  318. package/lib/esm/Model.d.ts +40 -6
  319. package/lib/esm/Model.d.ts.map +1 -1
  320. package/lib/esm/Model.js +24 -0
  321. package/lib/esm/Model.js.map +1 -1
  322. package/lib/esm/NativeAppStorage.js.map +1 -1
  323. package/lib/esm/NativeHost.js.map +1 -1
  324. package/lib/esm/NavigationRelationship.js.map +1 -1
  325. package/lib/esm/PartialChangeUnifier.d.ts +77 -0
  326. package/lib/esm/PartialChangeUnifier.d.ts.map +1 -0
  327. package/lib/esm/PartialChangeUnifier.js +230 -0
  328. package/lib/esm/PartialChangeUnifier.js.map +1 -0
  329. package/lib/esm/PromiseMemoizer.js.map +1 -1
  330. package/lib/esm/PropertyStore.js.map +1 -1
  331. package/lib/esm/Relationship.d.ts +10 -10
  332. package/lib/esm/Relationship.js +6 -6
  333. package/lib/esm/Relationship.js.map +1 -1
  334. package/lib/esm/RpcBackend.js.map +1 -1
  335. package/lib/esm/SQLiteDb.js.map +1 -1
  336. package/lib/esm/Schema.js.map +1 -1
  337. package/lib/esm/SchemaSync.js.map +1 -1
  338. package/lib/esm/SchemaUtils.js.map +1 -1
  339. package/lib/esm/SheetIndex.d.ts +4 -4
  340. package/lib/esm/SheetIndex.d.ts.map +1 -1
  341. package/lib/esm/SheetIndex.js.map +1 -1
  342. package/lib/esm/SqliteChangesetReader.d.ts.map +1 -1
  343. package/lib/esm/SqliteChangesetReader.js +1 -1
  344. package/lib/esm/SqliteChangesetReader.js.map +1 -1
  345. package/lib/esm/SqliteStatement.js.map +1 -1
  346. package/lib/esm/StashManager.js.map +1 -1
  347. package/lib/esm/Texture.d.ts +1 -1
  348. package/lib/esm/Texture.js.map +1 -1
  349. package/lib/esm/TileStorage.js.map +1 -1
  350. package/lib/esm/TxnManager.d.ts +114 -4
  351. package/lib/esm/TxnManager.d.ts.map +1 -1
  352. package/lib/esm/TxnManager.js +196 -8
  353. package/lib/esm/TxnManager.js.map +1 -1
  354. package/lib/esm/ViewDefinition.d.ts +25 -13
  355. package/lib/esm/ViewDefinition.d.ts.map +1 -1
  356. package/lib/esm/ViewDefinition.js +78 -26
  357. package/lib/esm/ViewDefinition.js.map +1 -1
  358. package/lib/esm/ViewStateHydrator.js.map +1 -1
  359. package/lib/esm/ViewStore.d.ts.map +1 -1
  360. package/lib/esm/ViewStore.js +64 -22
  361. package/lib/esm/ViewStore.js.map +1 -1
  362. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts +1 -1
  363. package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  364. package/lib/esm/annotations/FrameGeometry.js.map +1 -1
  365. package/lib/esm/annotations/LeaderGeometry.js.map +1 -1
  366. package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
  367. package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -1
  368. package/lib/esm/annotations/TextBlockGeometry.js.map +1 -1
  369. package/lib/esm/annotations/TextBlockLayout.js.map +1 -1
  370. package/lib/esm/core-backend.d.ts +3 -0
  371. package/lib/esm/core-backend.d.ts.map +1 -1
  372. package/lib/esm/core-backend.js +3 -0
  373. package/lib/esm/core-backend.js.map +1 -1
  374. package/lib/esm/domains/FunctionalElements.d.ts +1 -1
  375. package/lib/esm/domains/FunctionalElements.d.ts.map +1 -1
  376. package/lib/esm/domains/FunctionalElements.js.map +1 -1
  377. package/lib/esm/domains/FunctionalSchema.js.map +1 -1
  378. package/lib/esm/domains/GenericElements.d.ts +2 -2
  379. package/lib/esm/domains/GenericElements.d.ts.map +1 -1
  380. package/lib/esm/domains/GenericElements.js.map +1 -1
  381. package/lib/esm/domains/GenericSchema.js.map +1 -1
  382. package/lib/esm/internal/ChangesetConflictArgs.js.map +1 -1
  383. package/lib/esm/internal/ChannelAdmin.d.ts +2 -2
  384. package/lib/esm/internal/ChannelAdmin.d.ts.map +1 -1
  385. package/lib/esm/internal/ChannelAdmin.js.map +1 -1
  386. package/lib/esm/internal/ElementLRUCache.js.map +1 -1
  387. package/lib/esm/internal/FontFileImpl.js.map +1 -1
  388. package/lib/esm/internal/HubMock.d.ts +2 -0
  389. package/lib/esm/internal/HubMock.d.ts.map +1 -1
  390. package/lib/esm/internal/HubMock.js +7 -0
  391. package/lib/esm/internal/HubMock.js.map +1 -1
  392. package/lib/esm/internal/IModelDbFontsImpl.js.map +1 -1
  393. package/lib/esm/internal/IntegrityCheck.d.ts +10 -10
  394. package/lib/esm/internal/IntegrityCheck.js +22 -22
  395. package/lib/esm/internal/IntegrityCheck.js.map +1 -1
  396. package/lib/esm/internal/NativePlatform.js.map +1 -1
  397. package/lib/esm/internal/NoLocks.d.ts.map +1 -1
  398. package/lib/esm/internal/NoLocks.js +6 -0
  399. package/lib/esm/internal/NoLocks.js.map +1 -1
  400. package/lib/esm/internal/OnlineStatus.js.map +1 -1
  401. package/lib/esm/internal/ServerBasedLocks.d.ts +12 -0
  402. package/lib/esm/internal/ServerBasedLocks.d.ts.map +1 -1
  403. package/lib/esm/internal/ServerBasedLocks.js +286 -5
  404. package/lib/esm/internal/ServerBasedLocks.js.map +1 -1
  405. package/lib/esm/internal/Symbols.js.map +1 -1
  406. package/lib/esm/internal/annotations/fields.js.map +1 -1
  407. package/lib/esm/internal/cross-package.js.map +1 -1
  408. package/lib/esm/internal/workspace/SettingsEditorImpl.js.map +1 -1
  409. package/lib/esm/internal/workspace/SettingsImpl.js.map +1 -1
  410. package/lib/esm/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  411. package/lib/esm/internal/workspace/WorkspaceImpl.js.map +1 -1
  412. package/lib/esm/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  413. package/lib/esm/rpc/multipart.js.map +1 -1
  414. package/lib/esm/rpc/tracing.js.map +1 -1
  415. package/lib/esm/rpc/web/logging.js.map +1 -1
  416. package/lib/esm/rpc/web/request.js.map +1 -1
  417. package/lib/esm/rpc/web/response.js.map +1 -1
  418. package/lib/esm/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  419. package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  420. package/lib/esm/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  421. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  422. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  423. package/lib/esm/test/AdvancedEqual.js.map +1 -1
  424. package/lib/esm/test/AnnotationTestUtils.js.map +1 -1
  425. package/lib/esm/test/AttachDb.test.js +11 -11
  426. package/lib/esm/test/AttachDb.test.js.map +1 -1
  427. package/lib/esm/test/ElementDrivesElement.test.d.ts.map +1 -1
  428. package/lib/esm/test/ElementDrivesElement.test.js +23 -23
  429. package/lib/esm/test/ElementDrivesElement.test.js.map +1 -1
  430. package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
  431. package/lib/esm/test/GeometryTestUtil.js.map +1 -1
  432. package/lib/esm/test/IModelHost.test.js.map +1 -1
  433. package/lib/esm/test/IModelTestUtils.d.ts +1 -0
  434. package/lib/esm/test/IModelTestUtils.d.ts.map +1 -1
  435. package/lib/esm/test/IModelTestUtils.js +5 -0
  436. package/lib/esm/test/IModelTestUtils.js.map +1 -1
  437. package/lib/esm/test/ImageSourceConversion.test.js.map +1 -1
  438. package/lib/esm/test/IpcHost.test.js +112 -0
  439. package/lib/esm/test/IpcHost.test.js.map +1 -1
  440. package/lib/esm/test/KnownTestLocations.js.map +1 -1
  441. package/lib/esm/test/PrintElementTree.js.map +1 -1
  442. package/lib/esm/test/PropertyDb.test.js.map +1 -1
  443. package/lib/esm/test/RevisionUtility.js.map +1 -1
  444. package/lib/esm/test/SchemaUtils.test.js +25 -25
  445. package/lib/esm/test/SchemaUtils.test.js.map +1 -1
  446. package/lib/esm/test/SequentialLogMatcher.js.map +1 -1
  447. package/lib/esm/test/SquashSchemaAndDataChanges.test.js +129 -129
  448. package/lib/esm/test/SquashSchemaAndDataChanges.test.js.map +1 -1
  449. package/lib/esm/test/TestChangeSetUtility.js.map +1 -1
  450. package/lib/esm/test/TestEditTxn.js.map +1 -1
  451. package/lib/esm/test/TestUtils.js.map +1 -1
  452. package/lib/esm/test/annotations/Fields.test.js +53 -53
  453. package/lib/esm/test/annotations/Fields.test.js.map +1 -1
  454. package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -1
  455. package/lib/esm/test/annotations/LeaderGeometry.test.js +0 -1
  456. package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -1
  457. package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
  458. package/lib/esm/test/annotations/TextBlock.test.js.map +1 -1
  459. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -1
  460. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -1
  461. package/lib/esm/test/categories/Category.test.js.map +1 -1
  462. package/lib/esm/test/codespec/CodeSpec.test.js.map +1 -1
  463. package/lib/esm/test/ecdb/CTE.test.js +88 -88
  464. package/lib/esm/test/ecdb/CTE.test.js.map +1 -1
  465. package/lib/esm/test/ecdb/ConcurrentQuery.test.js +19 -19
  466. package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -1
  467. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +15 -15
  468. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -1
  469. package/lib/esm/test/ecdb/ECDb.test.js +72 -72
  470. package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
  471. package/lib/esm/test/ecdb/ECDbTestHelper.js.map +1 -1
  472. package/lib/esm/test/ecdb/ECSchemaXmlContext.test.js.map +1 -1
  473. package/lib/esm/test/ecdb/ECSqlAst.test.js +65 -65
  474. package/lib/esm/test/ecdb/ECSqlAst.test.js.map +1 -1
  475. package/lib/esm/test/ecdb/ECSqlQuery.test.js +4 -4
  476. package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
  477. package/lib/esm/test/ecdb/ECSqlStatement.test.js +332 -332
  478. package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
  479. package/lib/esm/test/ecdb/ECSqlSyncReader.test.js.map +1 -1
  480. package/lib/esm/test/ecdb/QueryReaders.test.js +31 -31
  481. package/lib/esm/test/ecdb/QueryReaders.test.js.map +1 -1
  482. package/lib/esm/test/ecdb/SqliteStatement.test.js.map +1 -1
  483. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js.map +1 -1
  484. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js +21 -21
  485. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js.map +1 -1
  486. package/lib/esm/test/ecsql/src/ECSqlTestParser.js.map +1 -1
  487. package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js.map +1 -1
  488. package/lib/esm/test/element/DeleteDefinitionElements.test.js +819 -26
  489. package/lib/esm/test/element/DeleteDefinitionElements.test.js.map +1 -1
  490. package/lib/esm/test/element/ElementAspect.test.js +22 -22
  491. package/lib/esm/test/element/ElementAspect.test.js.map +1 -1
  492. package/lib/esm/test/element/ElementDependencyGraph.test.js.map +1 -1
  493. package/lib/esm/test/element/ElementRoundTrip.test.js +283 -142
  494. package/lib/esm/test/element/ElementRoundTrip.test.js.map +1 -1
  495. package/lib/esm/test/element/ExcludedElements.test.js.map +1 -1
  496. package/lib/esm/test/element/ExternalSource.test.js.map +1 -1
  497. package/lib/esm/test/element/NullStructArray.test.js +13 -13
  498. package/lib/esm/test/element/NullStructArray.test.js.map +1 -1
  499. package/lib/esm/test/element/ProjectInformationRecord.test.js.map +1 -1
  500. package/lib/esm/test/element/SheetInformationAspect.test.js.map +1 -1
  501. package/lib/esm/test/element/UrlLink.test.js.map +1 -1
  502. package/lib/esm/test/font/FontFile.test.js.map +1 -1
  503. package/lib/esm/test/font/IModelDbFonts.test.js.map +1 -1
  504. package/lib/esm/test/hubaccess/ApplyChangeset.test.js +32 -32
  505. package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -1
  506. package/lib/esm/test/hubaccess/BriefcaseManager.test.js.map +1 -1
  507. package/lib/esm/test/hubaccess/CheckpointManager.test.js.map +1 -1
  508. package/lib/esm/test/hubaccess/Rebase.test.js +57 -57
  509. package/lib/esm/test/hubaccess/Rebase.test.js.map +1 -1
  510. package/lib/esm/test/hubaccess/SemanticRebase.test.js +145 -145
  511. package/lib/esm/test/hubaccess/SemanticRebase.test.js.map +1 -1
  512. package/lib/esm/test/imageData.js.map +1 -1
  513. package/lib/esm/test/imodel/Code.test.js.map +1 -1
  514. package/lib/esm/test/imodel/ElementTreeWalker.test.js.map +1 -1
  515. package/lib/esm/test/imodel/GetTextureImage.test.js.map +1 -1
  516. package/lib/esm/test/imodel/IModel.test.js +45 -45
  517. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  518. package/lib/esm/test/imodel/ProjectExtents.test.js.map +1 -1
  519. package/lib/esm/test/imodel/SchemaXmlImport.test.js +77 -13
  520. package/lib/esm/test/imodel/SchemaXmlImport.test.js.map +1 -1
  521. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -1
  522. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -1
  523. package/lib/esm/test/incrementalSchemaLocater/TestContext.js.map +1 -1
  524. package/lib/esm/test/index.js.map +1 -1
  525. package/lib/esm/test/misc/DevTools.test.js.map +1 -1
  526. package/lib/esm/test/misc/EntitySubClasses.test.js.map +1 -1
  527. package/lib/esm/test/misc/GeoServices.test.js +43 -1
  528. package/lib/esm/test/misc/GeoServices.test.js.map +1 -1
  529. package/lib/esm/test/misc/PromiseMemoizer.test.js.map +1 -1
  530. package/lib/esm/test/native/DgnDbWorker.test.js.map +1 -1
  531. package/lib/esm/test/rpc/response.test.js.map +1 -1
  532. package/lib/esm/test/schema/ClassRegistry.test.js +99 -99
  533. package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
  534. package/lib/esm/test/schema/FunctionalDomain.test.js.map +1 -1
  535. package/lib/esm/test/schema/GenericDomain.test.js.map +1 -1
  536. package/lib/esm/test/schema/IModelSchemaContext.test.js +9 -9
  537. package/lib/esm/test/schema/IModelSchemaContext.test.js.map +1 -1
  538. package/lib/esm/test/schema/SchemaImportCallbacks.test.js +19 -19
  539. package/lib/esm/test/schema/SchemaImportCallbacks.test.js.map +1 -1
  540. package/lib/esm/test/sheetindex/SheetIndex.test.js.map +1 -1
  541. package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -1
  542. package/lib/esm/test/standalone/ChangesetReader.test.js +4201 -1671
  543. package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
  544. package/lib/esm/test/standalone/CustomViewState3dCreator.test.js.map +1 -1
  545. package/lib/esm/test/standalone/DeleteElements.test.d.ts +2 -0
  546. package/lib/esm/test/standalone/DeleteElements.test.d.ts.map +1 -0
  547. package/lib/esm/test/standalone/DeleteElements.test.js +625 -0
  548. package/lib/esm/test/standalone/DeleteElements.test.js.map +1 -0
  549. package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -1
  550. package/lib/esm/test/standalone/Drawing.test.js.map +1 -1
  551. package/lib/esm/test/standalone/EditTxn.test.js.map +1 -1
  552. package/lib/esm/test/standalone/ElementGraphics.test.js.map +1 -1
  553. package/lib/esm/test/standalone/ElementMesh.test.js.map +1 -1
  554. package/lib/esm/test/standalone/ExportGraphics.test.js +14 -14
  555. package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
  556. package/lib/esm/test/standalone/GeometryChangeEvents.test.js.map +1 -1
  557. package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
  558. package/lib/esm/test/standalone/HubMock.test.js.map +1 -1
  559. package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -1
  560. package/lib/esm/test/standalone/IModelWrite.test.js +27 -27
  561. package/lib/esm/test/standalone/IModelWrite.test.js.map +1 -1
  562. package/lib/esm/test/standalone/ITwinWorkspace.test.js.map +1 -1
  563. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js.map +1 -1
  564. package/lib/esm/test/standalone/IntegrityCheck.test.js +214 -5
  565. package/lib/esm/test/standalone/IntegrityCheck.test.js.map +1 -1
  566. package/lib/esm/test/standalone/MergeConflict.test.js.map +1 -1
  567. package/lib/esm/test/standalone/NativeAppStorage.test.js.map +1 -1
  568. package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
  569. package/lib/esm/test/standalone/RenderTimeline.test.js.map +1 -1
  570. package/lib/esm/test/standalone/SQLiteDb.test.js.map +1 -1
  571. package/lib/esm/test/standalone/SQliteChangesetReaderAndChangesetECAdaptor.test.d.ts +2 -0
  572. package/lib/esm/test/standalone/SQliteChangesetReaderAndChangesetECAdaptor.test.d.ts.map +1 -0
  573. package/lib/esm/test/standalone/SQliteChangesetReaderAndChangesetECAdaptor.test.js +1862 -0
  574. package/lib/esm/test/standalone/SQliteChangesetReaderAndChangesetECAdaptor.test.js.map +1 -0
  575. package/lib/esm/test/standalone/SchemaUtils.test.js.map +1 -1
  576. package/lib/esm/test/standalone/SectionDrawing.test.js.map +1 -1
  577. package/lib/esm/test/standalone/ServerBasedLocks.test.js +907 -3
  578. package/lib/esm/test/standalone/ServerBasedLocks.test.js.map +1 -1
  579. package/lib/esm/test/standalone/Setting.test.js.map +1 -1
  580. package/lib/esm/test/standalone/Settings.test.js.map +1 -1
  581. package/lib/esm/test/standalone/SettingsSchemas.test.js.map +1 -1
  582. package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
  583. package/lib/esm/test/standalone/StandaloneDb.test.js +20 -20
  584. package/lib/esm/test/standalone/StandaloneDb.test.js.map +1 -1
  585. package/lib/esm/test/standalone/Texture.test.js.map +1 -1
  586. package/lib/esm/test/standalone/TileCache.test.js.map +1 -1
  587. package/lib/esm/test/standalone/TileTree.test.js.map +1 -1
  588. package/lib/esm/test/standalone/TxnManager.test.js +90 -0
  589. package/lib/esm/test/standalone/TxnManager.test.js.map +1 -1
  590. package/lib/esm/test/standalone/ViewDefinition.test.js +18 -7
  591. package/lib/esm/test/standalone/ViewDefinition.test.js.map +1 -1
  592. package/lib/esm/test/standalone/ViewStoreDb.test.js.map +1 -1
  593. package/lib/esm/test/standalone/Workspace.test.js.map +1 -1
  594. package/lib/esm/test/standalone/iModelDb.test.js.map +1 -1
  595. package/lib/esm/test/workspace/SettingsDb.test.js.map +1 -1
  596. package/lib/esm/workspace/Settings.d.ts +6 -4
  597. package/lib/esm/workspace/Settings.d.ts.map +1 -1
  598. package/lib/esm/workspace/Settings.js.map +1 -1
  599. package/lib/esm/workspace/SettingsDb.js.map +1 -1
  600. package/lib/esm/workspace/SettingsEditor.js.map +1 -1
  601. package/lib/esm/workspace/SettingsSchemas.js.map +1 -1
  602. package/lib/esm/workspace/Workspace.js.map +1 -1
  603. package/lib/esm/workspace/WorkspaceEditor.js.map +1 -1
  604. package/package.json +15 -15
@@ -4,10 +4,10 @@
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  import { assert, expect } from "chai";
6
6
  import { DbResult, Id64 } from "@itwin/core-bentley";
7
- import { withEditTxn } from "../../EditTxn";
7
+ import { EditTxn, withEditTxn } from "../../EditTxn";
8
8
  import { BriefcaseIdValue, Code, ColorDef, ElementGeometry, IModel, QueryRowFormat, SubCategoryAppearance, } from "@itwin/core-common";
9
- import { Angle, Arc3d, Cone, IModelJson as GeomJson, LineSegment3d, Point2d, Point3d } from "@itwin/core-geometry";
10
- import { _nativeDb, IModelDb, IModelJsFs, PhysicalModel, PhysicalObject, SnapshotDb, SpatialCategory } from "../../core-backend";
9
+ import { Angle, Arc3d, Cone, IModelJson as GeomJson, LineSegment3d, Point2d, Point3d, Range2d, Range3d } from "@itwin/core-geometry";
10
+ import { _nativeDb, CategorySelector, DefinitionModel, DisplayStyle2d, DisplayStyle3d, DrawingCategory, DrawingViewDefinition, IModelDb, IModelJsFs, ModelSelector, OrthographicViewDefinition, PhysicalModel, PhysicalObject, SnapshotDb, SpatialCategory, SpatialViewDefinition } from "../../core-backend";
11
11
  import { IModelTestUtils } from "../IModelTestUtils";
12
12
  import { EntityClass, RelationshipClass } from "@itwin/ecschema-metadata";
13
13
  function verifyPrimitiveBase(actualValue, expectedValue) {
@@ -257,145 +257,145 @@ function initElementRefersToElementsProps(className, _iModelName, elId1, elId2,
257
257
  return result;
258
258
  }
259
259
  describe("Element and ElementAspect roundtrip test for all type of properties", () => {
260
- const testSchema = `<?xml version="1.0" encoding="UTF-8"?>
261
- <ECSchema schemaName="ElementRoundTripTest" alias="ts" version="01.00.00" xmlns="http://www.bentley.com/schemas/Bentley.ECXML.3.2">
262
- <ECSchemaReference name="BisCore" version="01.00.04" alias="bis"/>
263
- <ECSchemaReference name="CoreCustomAttributes" version="01.00.03" alias="CoreCA"/>
264
- <ECEntityClass typeName="TestElement" modifier="None">
265
- <BaseClass>bis:PhysicalElement</BaseClass>
266
- <BaseClass>IPrimitive</BaseClass>
267
- <BaseClass>IPrimitiveArray</BaseClass>
268
- </ECEntityClass>
269
- <ECEntityClass typeName="TestElementAspect" modifier="None">
270
- <BaseClass>bis:ElementUniqueAspect</BaseClass>
271
- <BaseClass>IPrimitiveAspect</BaseClass>
272
- <BaseClass>IPrimitiveArrayAspect</BaseClass>
273
- </ECEntityClass>
274
- <ECRelationshipClass typeName="TestElementRefersToElements" strength="referencing" modifier="Sealed">
275
- <BaseClass>bis:ElementRefersToElements</BaseClass>
276
- <Source multiplicity="(0..*)" roleLabel="refers to" polymorphic="true">
277
- <Class class="TestElement"/>
278
- </Source>
279
- <Target multiplicity="(0..*)" roleLabel="is referenced by" polymorphic="true">
280
- <Class class="TestElement"/>
281
- </Target>
282
- <ECProperty propertyName="i" typeName="int"/>
283
- <ECProperty propertyName="l" typeName="long"/>
284
- <ECProperty propertyName="d" typeName="double"/>
285
- <ECProperty propertyName="b" typeName="boolean"/>
286
- <ECProperty propertyName="dt" typeName="dateTime"/>
287
- <ECProperty propertyName="s" typeName="string"/>
288
- <ECProperty propertyName="bin" typeName="binary"/>
289
- <ECProperty propertyName="p2d" typeName="point2d"/>
290
- <ECProperty propertyName="p3d" typeName="point3d"/>
291
- <ECProperty propertyName="g" typeName="Bentley.Geometry.Common.IGeometry"/>
292
- <!--<ECStructProperty propertyName="st" typeName="ComplexStruct"/>-->
293
- <ECArrayProperty propertyName="array_i" typeName="int" minOccurs="0" maxOccurs="unbounded"/>
294
- <ECArrayProperty propertyName="array_l" typeName="long" minOccurs="0" maxOccurs="unbounded"/>
295
- <ECArrayProperty propertyName="array_d" typeName="double" minOccurs="0" maxOccurs="unbounded"/>
296
- <ECArrayProperty propertyName="array_b" typeName="boolean" minOccurs="0" maxOccurs="unbounded"/>
297
- <ECArrayProperty propertyName="array_dt" typeName="dateTime" minOccurs="0" maxOccurs="unbounded"/>
298
- <ECArrayProperty propertyName="array_s" typeName="string" minOccurs="0" maxOccurs="unbounded"/>
299
- <ECArrayProperty propertyName="array_bin" typeName="binary" minOccurs="0" maxOccurs="unbounded"/>
300
- <ECArrayProperty propertyName="array_p2d" typeName="point2d" minOccurs="0" maxOccurs="unbounded"/>
301
- <ECArrayProperty propertyName="array_p3d" typeName="point3d" minOccurs="0" maxOccurs="unbounded"/>
302
- <ECArrayProperty propertyName="array_g" typeName="Bentley.Geometry.Common.IGeometry" minOccurs="0" maxOccurs="unbounded"/>
303
- <!--<ECStructArrayProperty propertyName="array_st" typeName="ComplexStruct" minOccurs="0" maxOccurs="unbounded"/>-->
304
- </ECRelationshipClass>
305
- <ECEntityClass typeName="IPrimitive" modifier="Abstract">
306
- <ECCustomAttributes>
307
- <IsMixin xmlns="CoreCustomAttributes.01.00.03">
308
- <AppliesToEntityClass>bis:PhysicalElement</AppliesToEntityClass>
309
- </IsMixin>
310
- </ECCustomAttributes>
311
- <ECProperty propertyName="i" typeName="int"/>
312
- <ECProperty propertyName="l" typeName="long"/>
313
- <ECProperty propertyName="d" typeName="double"/>
314
- <ECProperty propertyName="b" typeName="boolean"/>
315
- <ECProperty propertyName="dt" typeName="dateTime"/>
316
- <ECProperty propertyName="s" typeName="string"/>
317
- <ECProperty propertyName="bin" typeName="binary"/>
318
- <ECProperty propertyName="p2d" typeName="point2d"/>
319
- <ECProperty propertyName="p3d" typeName="point3d"/>
320
- <ECProperty propertyName="g" typeName="Bentley.Geometry.Common.IGeometry"/>
321
- <ECStructProperty propertyName="st" typeName="ComplexStruct"/>
322
- </ECEntityClass>
323
- <ECEntityClass typeName="IPrimitiveAspect" modifier="Abstract">
324
- <ECCustomAttributes>
325
- <IsMixin xmlns="CoreCustomAttributes.01.00.03">
326
- <AppliesToEntityClass>bis:ElementUniqueAspect</AppliesToEntityClass>
327
- </IsMixin>
328
- </ECCustomAttributes>
329
- <ECProperty propertyName="i" typeName="int"/>
330
- <ECProperty propertyName="l" typeName="long"/>
331
- <ECProperty propertyName="d" typeName="double"/>
332
- <ECProperty propertyName="b" typeName="boolean"/>
333
- <ECProperty propertyName="dt" typeName="dateTime"/>
334
- <ECProperty propertyName="s" typeName="string"/>
335
- <ECProperty propertyName="bin" typeName="binary"/>
336
- <ECProperty propertyName="p2d" typeName="point2d"/>
337
- <ECProperty propertyName="p3d" typeName="point3d"/>
338
- <ECProperty propertyName="g" typeName="Bentley.Geometry.Common.IGeometry"/>
339
- <ECStructProperty propertyName="st" typeName="ComplexStruct"/>
340
- </ECEntityClass>
341
- <ECEntityClass typeName="IPrimitiveArray" modifier="Abstract">
342
- <ECCustomAttributes>
343
- <IsMixin xmlns="CoreCustomAttributes.01.00.03">
344
- <AppliesToEntityClass>bis:PhysicalElement</AppliesToEntityClass>
345
- </IsMixin>
346
- </ECCustomAttributes>
347
- <ECArrayProperty propertyName="array_i" typeName="int" minOccurs="0" maxOccurs="unbounded"/>
348
- <ECArrayProperty propertyName="array_l" typeName="long" minOccurs="0" maxOccurs="unbounded"/>
349
- <ECArrayProperty propertyName="array_d" typeName="double" minOccurs="0" maxOccurs="unbounded"/>
350
- <ECArrayProperty propertyName="array_b" typeName="boolean" minOccurs="0" maxOccurs="unbounded"/>
351
- <ECArrayProperty propertyName="array_dt" typeName="dateTime" minOccurs="0" maxOccurs="unbounded"/>
352
- <ECArrayProperty propertyName="array_s" typeName="string" minOccurs="0" maxOccurs="unbounded"/>
353
- <ECArrayProperty propertyName="array_bin" typeName="binary" minOccurs="0" maxOccurs="unbounded"/>
354
- <ECArrayProperty propertyName="array_p2d" typeName="point2d" minOccurs="0" maxOccurs="unbounded"/>
355
- <ECArrayProperty propertyName="array_p3d" typeName="point3d" minOccurs="0" maxOccurs="unbounded"/>
356
- <ECArrayProperty propertyName="array_g" typeName="Bentley.Geometry.Common.IGeometry" minOccurs="0" maxOccurs="unbounded"/>
357
- <ECStructArrayProperty propertyName="array_st" typeName="ComplexStruct" minOccurs="0" maxOccurs="unbounded"/>
358
- </ECEntityClass>
359
- <ECEntityClass typeName="IPrimitiveArrayAspect" modifier="Abstract">
360
- <ECCustomAttributes>
361
- <IsMixin xmlns="CoreCustomAttributes.01.00.03">
362
- <AppliesToEntityClass>bis:ElementUniqueAspect</AppliesToEntityClass>
363
- </IsMixin>
364
- </ECCustomAttributes>
365
- <ECArrayProperty propertyName="array_i" typeName="int" minOccurs="0" maxOccurs="unbounded"/>
366
- <ECArrayProperty propertyName="array_l" typeName="long" minOccurs="0" maxOccurs="unbounded"/>
367
- <ECArrayProperty propertyName="array_d" typeName="double" minOccurs="0" maxOccurs="unbounded"/>
368
- <ECArrayProperty propertyName="array_b" typeName="boolean" minOccurs="0" maxOccurs="unbounded"/>
369
- <ECArrayProperty propertyName="array_dt" typeName="dateTime" minOccurs="0" maxOccurs="unbounded"/>
370
- <ECArrayProperty propertyName="array_s" typeName="string" minOccurs="0" maxOccurs="unbounded"/>
371
- <ECArrayProperty propertyName="array_bin" typeName="binary" minOccurs="0" maxOccurs="unbounded"/>
372
- <ECArrayProperty propertyName="array_p2d" typeName="point2d" minOccurs="0" maxOccurs="unbounded"/>
373
- <ECArrayProperty propertyName="array_p3d" typeName="point3d" minOccurs="0" maxOccurs="unbounded"/>
374
- <ECArrayProperty propertyName="array_g" typeName="Bentley.Geometry.Common.IGeometry" minOccurs="0" maxOccurs="unbounded"/>
375
- <ECStructArrayProperty propertyName="array_st" typeName="ComplexStruct" minOccurs="0" maxOccurs="unbounded"/>
376
- </ECEntityClass>
377
- <ECStructClass typeName="ComplexStruct" modifier="None">
378
- <ECProperty propertyName="i" typeName="int"/>
379
- <ECProperty propertyName="l" typeName="long"/>
380
- <ECProperty propertyName="d" typeName="double"/>
381
- <ECProperty propertyName="b" typeName="boolean"/>
382
- <ECProperty propertyName="dt" typeName="dateTime"/>
383
- <ECProperty propertyName="s" typeName="string"/>
384
- <ECProperty propertyName="bin" typeName="binary"/>
385
- <ECProperty propertyName="p2d" typeName="point2d"/>
386
- <ECProperty propertyName="p3d" typeName="point3d"/>
387
- <ECProperty propertyName="g" typeName="Bentley.Geometry.Common.IGeometry"/>
388
- <ECArrayProperty propertyName="array_i" typeName="int" minOccurs="0" maxOccurs="unbounded"/>
389
- <ECArrayProperty propertyName="array_l" typeName="long" minOccurs="0" maxOccurs="unbounded"/>
390
- <ECArrayProperty propertyName="array_d" typeName="double" minOccurs="0" maxOccurs="unbounded"/>
391
- <ECArrayProperty propertyName="array_b" typeName="boolean" minOccurs="0" maxOccurs="unbounded"/>
392
- <ECArrayProperty propertyName="array_dt" typeName="dateTime" minOccurs="0" maxOccurs="unbounded"/>
393
- <ECArrayProperty propertyName="array_s" typeName="string" minOccurs="0" maxOccurs="unbounded"/>
394
- <ECArrayProperty propertyName="array_bin" typeName="binary" minOccurs="0" maxOccurs="unbounded"/>
395
- <ECArrayProperty propertyName="array_p2d" typeName="point2d" minOccurs="0" maxOccurs="unbounded"/>
396
- <ECArrayProperty propertyName="array_p3d" typeName="point3d" minOccurs="0" maxOccurs="unbounded"/>
397
- <ECArrayProperty propertyName="array_g" typeName="Bentley.Geometry.Common.IGeometry" minOccurs="0" maxOccurs="unbounded"/>
398
- </ECStructClass>
260
+ const testSchema = `<?xml version="1.0" encoding="UTF-8"?>
261
+ <ECSchema schemaName="ElementRoundTripTest" alias="ts" version="01.00.00" xmlns="http://www.bentley.com/schemas/Bentley.ECXML.3.2">
262
+ <ECSchemaReference name="BisCore" version="01.00.04" alias="bis"/>
263
+ <ECSchemaReference name="CoreCustomAttributes" version="01.00.03" alias="CoreCA"/>
264
+ <ECEntityClass typeName="TestElement" modifier="None">
265
+ <BaseClass>bis:PhysicalElement</BaseClass>
266
+ <BaseClass>IPrimitive</BaseClass>
267
+ <BaseClass>IPrimitiveArray</BaseClass>
268
+ </ECEntityClass>
269
+ <ECEntityClass typeName="TestElementAspect" modifier="None">
270
+ <BaseClass>bis:ElementUniqueAspect</BaseClass>
271
+ <BaseClass>IPrimitiveAspect</BaseClass>
272
+ <BaseClass>IPrimitiveArrayAspect</BaseClass>
273
+ </ECEntityClass>
274
+ <ECRelationshipClass typeName="TestElementRefersToElements" strength="referencing" modifier="Sealed">
275
+ <BaseClass>bis:ElementRefersToElements</BaseClass>
276
+ <Source multiplicity="(0..*)" roleLabel="refers to" polymorphic="true">
277
+ <Class class="TestElement"/>
278
+ </Source>
279
+ <Target multiplicity="(0..*)" roleLabel="is referenced by" polymorphic="true">
280
+ <Class class="TestElement"/>
281
+ </Target>
282
+ <ECProperty propertyName="i" typeName="int"/>
283
+ <ECProperty propertyName="l" typeName="long"/>
284
+ <ECProperty propertyName="d" typeName="double"/>
285
+ <ECProperty propertyName="b" typeName="boolean"/>
286
+ <ECProperty propertyName="dt" typeName="dateTime"/>
287
+ <ECProperty propertyName="s" typeName="string"/>
288
+ <ECProperty propertyName="bin" typeName="binary"/>
289
+ <ECProperty propertyName="p2d" typeName="point2d"/>
290
+ <ECProperty propertyName="p3d" typeName="point3d"/>
291
+ <ECProperty propertyName="g" typeName="Bentley.Geometry.Common.IGeometry"/>
292
+ <!--<ECStructProperty propertyName="st" typeName="ComplexStruct"/>-->
293
+ <ECArrayProperty propertyName="array_i" typeName="int" minOccurs="0" maxOccurs="unbounded"/>
294
+ <ECArrayProperty propertyName="array_l" typeName="long" minOccurs="0" maxOccurs="unbounded"/>
295
+ <ECArrayProperty propertyName="array_d" typeName="double" minOccurs="0" maxOccurs="unbounded"/>
296
+ <ECArrayProperty propertyName="array_b" typeName="boolean" minOccurs="0" maxOccurs="unbounded"/>
297
+ <ECArrayProperty propertyName="array_dt" typeName="dateTime" minOccurs="0" maxOccurs="unbounded"/>
298
+ <ECArrayProperty propertyName="array_s" typeName="string" minOccurs="0" maxOccurs="unbounded"/>
299
+ <ECArrayProperty propertyName="array_bin" typeName="binary" minOccurs="0" maxOccurs="unbounded"/>
300
+ <ECArrayProperty propertyName="array_p2d" typeName="point2d" minOccurs="0" maxOccurs="unbounded"/>
301
+ <ECArrayProperty propertyName="array_p3d" typeName="point3d" minOccurs="0" maxOccurs="unbounded"/>
302
+ <ECArrayProperty propertyName="array_g" typeName="Bentley.Geometry.Common.IGeometry" minOccurs="0" maxOccurs="unbounded"/>
303
+ <!--<ECStructArrayProperty propertyName="array_st" typeName="ComplexStruct" minOccurs="0" maxOccurs="unbounded"/>-->
304
+ </ECRelationshipClass>
305
+ <ECEntityClass typeName="IPrimitive" modifier="Abstract">
306
+ <ECCustomAttributes>
307
+ <IsMixin xmlns="CoreCustomAttributes.01.00.03">
308
+ <AppliesToEntityClass>bis:PhysicalElement</AppliesToEntityClass>
309
+ </IsMixin>
310
+ </ECCustomAttributes>
311
+ <ECProperty propertyName="i" typeName="int"/>
312
+ <ECProperty propertyName="l" typeName="long"/>
313
+ <ECProperty propertyName="d" typeName="double"/>
314
+ <ECProperty propertyName="b" typeName="boolean"/>
315
+ <ECProperty propertyName="dt" typeName="dateTime"/>
316
+ <ECProperty propertyName="s" typeName="string"/>
317
+ <ECProperty propertyName="bin" typeName="binary"/>
318
+ <ECProperty propertyName="p2d" typeName="point2d"/>
319
+ <ECProperty propertyName="p3d" typeName="point3d"/>
320
+ <ECProperty propertyName="g" typeName="Bentley.Geometry.Common.IGeometry"/>
321
+ <ECStructProperty propertyName="st" typeName="ComplexStruct"/>
322
+ </ECEntityClass>
323
+ <ECEntityClass typeName="IPrimitiveAspect" modifier="Abstract">
324
+ <ECCustomAttributes>
325
+ <IsMixin xmlns="CoreCustomAttributes.01.00.03">
326
+ <AppliesToEntityClass>bis:ElementUniqueAspect</AppliesToEntityClass>
327
+ </IsMixin>
328
+ </ECCustomAttributes>
329
+ <ECProperty propertyName="i" typeName="int"/>
330
+ <ECProperty propertyName="l" typeName="long"/>
331
+ <ECProperty propertyName="d" typeName="double"/>
332
+ <ECProperty propertyName="b" typeName="boolean"/>
333
+ <ECProperty propertyName="dt" typeName="dateTime"/>
334
+ <ECProperty propertyName="s" typeName="string"/>
335
+ <ECProperty propertyName="bin" typeName="binary"/>
336
+ <ECProperty propertyName="p2d" typeName="point2d"/>
337
+ <ECProperty propertyName="p3d" typeName="point3d"/>
338
+ <ECProperty propertyName="g" typeName="Bentley.Geometry.Common.IGeometry"/>
339
+ <ECStructProperty propertyName="st" typeName="ComplexStruct"/>
340
+ </ECEntityClass>
341
+ <ECEntityClass typeName="IPrimitiveArray" modifier="Abstract">
342
+ <ECCustomAttributes>
343
+ <IsMixin xmlns="CoreCustomAttributes.01.00.03">
344
+ <AppliesToEntityClass>bis:PhysicalElement</AppliesToEntityClass>
345
+ </IsMixin>
346
+ </ECCustomAttributes>
347
+ <ECArrayProperty propertyName="array_i" typeName="int" minOccurs="0" maxOccurs="unbounded"/>
348
+ <ECArrayProperty propertyName="array_l" typeName="long" minOccurs="0" maxOccurs="unbounded"/>
349
+ <ECArrayProperty propertyName="array_d" typeName="double" minOccurs="0" maxOccurs="unbounded"/>
350
+ <ECArrayProperty propertyName="array_b" typeName="boolean" minOccurs="0" maxOccurs="unbounded"/>
351
+ <ECArrayProperty propertyName="array_dt" typeName="dateTime" minOccurs="0" maxOccurs="unbounded"/>
352
+ <ECArrayProperty propertyName="array_s" typeName="string" minOccurs="0" maxOccurs="unbounded"/>
353
+ <ECArrayProperty propertyName="array_bin" typeName="binary" minOccurs="0" maxOccurs="unbounded"/>
354
+ <ECArrayProperty propertyName="array_p2d" typeName="point2d" minOccurs="0" maxOccurs="unbounded"/>
355
+ <ECArrayProperty propertyName="array_p3d" typeName="point3d" minOccurs="0" maxOccurs="unbounded"/>
356
+ <ECArrayProperty propertyName="array_g" typeName="Bentley.Geometry.Common.IGeometry" minOccurs="0" maxOccurs="unbounded"/>
357
+ <ECStructArrayProperty propertyName="array_st" typeName="ComplexStruct" minOccurs="0" maxOccurs="unbounded"/>
358
+ </ECEntityClass>
359
+ <ECEntityClass typeName="IPrimitiveArrayAspect" modifier="Abstract">
360
+ <ECCustomAttributes>
361
+ <IsMixin xmlns="CoreCustomAttributes.01.00.03">
362
+ <AppliesToEntityClass>bis:ElementUniqueAspect</AppliesToEntityClass>
363
+ </IsMixin>
364
+ </ECCustomAttributes>
365
+ <ECArrayProperty propertyName="array_i" typeName="int" minOccurs="0" maxOccurs="unbounded"/>
366
+ <ECArrayProperty propertyName="array_l" typeName="long" minOccurs="0" maxOccurs="unbounded"/>
367
+ <ECArrayProperty propertyName="array_d" typeName="double" minOccurs="0" maxOccurs="unbounded"/>
368
+ <ECArrayProperty propertyName="array_b" typeName="boolean" minOccurs="0" maxOccurs="unbounded"/>
369
+ <ECArrayProperty propertyName="array_dt" typeName="dateTime" minOccurs="0" maxOccurs="unbounded"/>
370
+ <ECArrayProperty propertyName="array_s" typeName="string" minOccurs="0" maxOccurs="unbounded"/>
371
+ <ECArrayProperty propertyName="array_bin" typeName="binary" minOccurs="0" maxOccurs="unbounded"/>
372
+ <ECArrayProperty propertyName="array_p2d" typeName="point2d" minOccurs="0" maxOccurs="unbounded"/>
373
+ <ECArrayProperty propertyName="array_p3d" typeName="point3d" minOccurs="0" maxOccurs="unbounded"/>
374
+ <ECArrayProperty propertyName="array_g" typeName="Bentley.Geometry.Common.IGeometry" minOccurs="0" maxOccurs="unbounded"/>
375
+ <ECStructArrayProperty propertyName="array_st" typeName="ComplexStruct" minOccurs="0" maxOccurs="unbounded"/>
376
+ </ECEntityClass>
377
+ <ECStructClass typeName="ComplexStruct" modifier="None">
378
+ <ECProperty propertyName="i" typeName="int"/>
379
+ <ECProperty propertyName="l" typeName="long"/>
380
+ <ECProperty propertyName="d" typeName="double"/>
381
+ <ECProperty propertyName="b" typeName="boolean"/>
382
+ <ECProperty propertyName="dt" typeName="dateTime"/>
383
+ <ECProperty propertyName="s" typeName="string"/>
384
+ <ECProperty propertyName="bin" typeName="binary"/>
385
+ <ECProperty propertyName="p2d" typeName="point2d"/>
386
+ <ECProperty propertyName="p3d" typeName="point3d"/>
387
+ <ECProperty propertyName="g" typeName="Bentley.Geometry.Common.IGeometry"/>
388
+ <ECArrayProperty propertyName="array_i" typeName="int" minOccurs="0" maxOccurs="unbounded"/>
389
+ <ECArrayProperty propertyName="array_l" typeName="long" minOccurs="0" maxOccurs="unbounded"/>
390
+ <ECArrayProperty propertyName="array_d" typeName="double" minOccurs="0" maxOccurs="unbounded"/>
391
+ <ECArrayProperty propertyName="array_b" typeName="boolean" minOccurs="0" maxOccurs="unbounded"/>
392
+ <ECArrayProperty propertyName="array_dt" typeName="dateTime" minOccurs="0" maxOccurs="unbounded"/>
393
+ <ECArrayProperty propertyName="array_s" typeName="string" minOccurs="0" maxOccurs="unbounded"/>
394
+ <ECArrayProperty propertyName="array_bin" typeName="binary" minOccurs="0" maxOccurs="unbounded"/>
395
+ <ECArrayProperty propertyName="array_p2d" typeName="point2d" minOccurs="0" maxOccurs="unbounded"/>
396
+ <ECArrayProperty propertyName="array_p3d" typeName="point3d" minOccurs="0" maxOccurs="unbounded"/>
397
+ <ECArrayProperty propertyName="array_g" typeName="Bentley.Geometry.Common.IGeometry" minOccurs="0" maxOccurs="unbounded"/>
398
+ </ECStructClass>
399
399
  </ECSchema>`;
400
400
  const schemaFileName = "ElementRoundTripTest.01.00.00.xml";
401
401
  const iModelFileName = "ElementRoundTripTest.bim";
@@ -921,5 +921,146 @@ describe("Element and ElementAspect roundtrip test for all type of properties",
921
921
  }
922
922
  imodel.close();
923
923
  });
924
+ describe("ECSQL to JS property name roundtrip tests", () => {
925
+ const testIModelPath = IModelTestUtils.prepareOutputFile(subDirName, "viewDefinition_nav_roundtrip.bim");
926
+ let imodel;
927
+ beforeEach(() => {
928
+ if (IModelJsFs.existsSync(testIModelPath))
929
+ IModelJsFs.removeSync(testIModelPath);
930
+ imodel = SnapshotDb.createEmpty(testIModelPath, { rootSubject: { name: "ViewDefinitionNavPropRoundtrip" } });
931
+ });
932
+ afterEach(() => {
933
+ if (imodel.isOpen) {
934
+ imodel.close();
935
+ }
936
+ });
937
+ function parseFullInstanceColumn(rawJson) {
938
+ const parsed = typeof rawJson === "string" ? JSON.parse(rawJson) : rawJson;
939
+ parsed.classFullName = parsed.className.replace(".", ":");
940
+ return parsed;
941
+ }
942
+ function setupSpatialViewDefinitions() {
943
+ const txn = new EditTxn(imodel, "roundTrip test");
944
+ txn.start();
945
+ // Set up required definition elements
946
+ const definitionModelId = DefinitionModel.insert(txn, IModelDb.rootSubjectId, "Definition");
947
+ const categoryId = SpatialCategory.insert(txn, definitionModelId, "SpatialCat", new SubCategoryAppearance());
948
+ const [, physicalModelId] = IModelTestUtils.createAndInsertPhysicalPartitionAndModel(txn, Code.createEmpty(), false, IModelDb.rootSubjectId);
949
+ const modelSelectorId = ModelSelector.insert(txn, definitionModelId, "ModelSelector", [physicalModelId]);
950
+ const displayStyleId = DisplayStyle3d.insert(txn, definitionModelId, "DisplayStyle3d");
951
+ const categorySelectorId = CategorySelector.insert(txn, definitionModelId, "CategorySelector", [categoryId]);
952
+ const viewRange = new Range3d(0, 0, 0, 500, 500, 500);
953
+ txn.end("save");
954
+ return { definitionModelId, modelSelectorId, displayStyleId, categorySelectorId, viewRange };
955
+ }
956
+ it("roundtrip categorySelector, displayStyle, and modelSelector properties from SpatialViewDefinition", async () => {
957
+ const { definitionModelId, modelSelectorId, displayStyleId, categorySelectorId, viewRange } = setupSpatialViewDefinitions();
958
+ const txn = new EditTxn(imodel, "roundTrip test");
959
+ txn.start();
960
+ const spatialView = SpatialViewDefinition.createWithCamera(imodel, definitionModelId, "Test Spatial View", modelSelectorId, categorySelectorId, displayStyleId, viewRange);
961
+ const elementId = txn.insertElement(spatialView.toJSON());
962
+ txn.end("save");
963
+ for await (const row of imodel.createQueryReader(`SELECT $ FROM bis.Element WHERE ECInstanceId = ${elementId} OPTIONS USE_JS_PROP_NAMES`)) {
964
+ const parsed = parseFullInstanceColumn(row.toRow().$);
965
+ // Validate navigation properties in the ECSql result
966
+ assert.isDefined(parsed.categorySelector, "ECSQL $ should contain 'categorySelector'");
967
+ assert.isDefined(parsed.displayStyle, "ECSQL $ should contain 'displayStyle'");
968
+ assert.isDefined(parsed.modelSelector, "ECSQL $ should contain 'modelSelector'");
969
+ // Validate navigation property IDs
970
+ assert.isTrue(Id64.isValidId64(parsed.categorySelector.id), "categorySelector.id should be a valid Id64");
971
+ assert.isTrue(Id64.isValidId64(parsed.displayStyle.id), "displayStyle.id should be a valid Id64");
972
+ assert.isTrue(Id64.isValidId64(parsed.modelSelector.id), "modelSelector.id should be a valid Id64");
973
+ // Try to reconstruct an element from the returned properties
974
+ const reconstructed = imodel.constructEntity(parsed);
975
+ assert.deepEqual(reconstructed.categorySelector, parsed.categorySelector);
976
+ assert.deepEqual(reconstructed.displayStyle, parsed.displayStyle);
977
+ assert.deepEqual(reconstructed.modelSelector, parsed.modelSelector);
978
+ // Deprecated Id64String props should also be valid (Backward compatibility)
979
+ assert.equal(reconstructed.categorySelectorId, categorySelectorId);
980
+ assert.equal(reconstructed.displayStyleId, displayStyleId);
981
+ assert.equal(reconstructed.modelSelectorId, modelSelectorId);
982
+ // Do a quick check of the setter to ensure RelClassName is preserved and only id gets overridden
983
+ reconstructed.categorySelectorId = "Id123";
984
+ reconstructed.modelSelectorId = "Id456";
985
+ reconstructed.displayStyleId = "Id789";
986
+ assert.deepEqual(reconstructed.categorySelector, { id: "Id123", relClassName: "BisCore.ViewDefinitionUsesCategorySelector" });
987
+ assert.deepEqual(reconstructed.modelSelector, { id: "Id456", relClassName: "BisCore.SpatialViewDefinitionUsesModelSelector" });
988
+ assert.deepEqual(reconstructed.displayStyle, { id: "Id789", relClassName: "BisCore.ViewDefinitionUsesDisplayStyle" });
989
+ }
990
+ });
991
+ it("roundtrip categorySelector, displayStyle, and modelSelector properties from OrthographicViewDefinition", async () => {
992
+ const { definitionModelId, modelSelectorId, displayStyleId, categorySelectorId, viewRange } = setupSpatialViewDefinitions();
993
+ const txn = new EditTxn(imodel, "roundTrip test");
994
+ txn.start();
995
+ const orthoViewId = OrthographicViewDefinition.insert(txn, definitionModelId, "Test Ortho View", modelSelectorId, categorySelectorId, displayStyleId, viewRange);
996
+ txn.end("save");
997
+ for await (const row of imodel.createQueryReader(`SELECT $ FROM bis.Element WHERE ECInstanceId = ${orthoViewId} OPTIONS USE_JS_PROP_NAMES`)) {
998
+ const parsed = parseFullInstanceColumn(row.toRow().$);
999
+ // Validate navigation properties in the ECSql result
1000
+ assert.isDefined(parsed.categorySelector, "ECSQL $ should contain 'categorySelector'");
1001
+ assert.isDefined(parsed.displayStyle, "ECSQL $ should contain 'displayStyle'");
1002
+ assert.isDefined(parsed.modelSelector, "ECSQL $ should contain 'modelSelector'");
1003
+ // Validate navigation property IDs
1004
+ assert.isTrue(Id64.isValidId64(parsed.categorySelector.id), "categorySelector.id should be a valid Id64");
1005
+ assert.isTrue(Id64.isValidId64(parsed.displayStyle.id), "displayStyle.id should be a valid Id64");
1006
+ assert.isTrue(Id64.isValidId64(parsed.modelSelector.id), "modelSelector.id should be a valid Id64");
1007
+ // Try to reconstruct an element from the returned properties
1008
+ const reconstructed = imodel.constructEntity(parsed);
1009
+ assert.deepEqual(reconstructed.categorySelector, parsed.categorySelector);
1010
+ assert.deepEqual(reconstructed.displayStyle, parsed.displayStyle);
1011
+ assert.deepEqual(reconstructed.modelSelector, parsed.modelSelector);
1012
+ // Deprecated Id64String props should also be valid (Backward compatibility)
1013
+ assert.equal(reconstructed.categorySelectorId, categorySelectorId);
1014
+ assert.equal(reconstructed.displayStyleId, displayStyleId);
1015
+ assert.equal(reconstructed.modelSelectorId, modelSelectorId);
1016
+ // Do a quick check of the setter to ensure RelClassName is preserved and only id gets overridden
1017
+ reconstructed.categorySelectorId = "Id123";
1018
+ reconstructed.modelSelectorId = "Id456";
1019
+ reconstructed.displayStyleId = "Id789";
1020
+ assert.deepEqual(reconstructed.categorySelector, { id: "Id123", relClassName: "BisCore.ViewDefinitionUsesCategorySelector" });
1021
+ assert.deepEqual(reconstructed.modelSelector, { id: "Id456", relClassName: "BisCore.SpatialViewDefinitionUsesModelSelector" });
1022
+ assert.deepEqual(reconstructed.displayStyle, { id: "Id789", relClassName: "BisCore.ViewDefinitionUsesDisplayStyle" });
1023
+ }
1024
+ });
1025
+ it("roundtrip categorySelector, displayStyle, and modelSelector properties from DrawingViewDefinition", async () => {
1026
+ const txn = new EditTxn(imodel, "roundTrip test");
1027
+ txn.start();
1028
+ const definitionModelId = DefinitionModel.insert(txn, IModelDb.rootSubjectId, "Definition");
1029
+ const drawingCategoryId = DrawingCategory.insert(txn, definitionModelId, "DrawingCat", new SubCategoryAppearance());
1030
+ const [, drawingModelId] = IModelTestUtils.createAndInsertDrawingPartitionAndModel(txn, Code.createEmpty(), false, IModelDb.rootSubjectId);
1031
+ const displayStyle2dId = DisplayStyle2d.insert(txn, definitionModelId, "DisplayStyle2d");
1032
+ const categorySelectorId = CategorySelector.insert(txn, definitionModelId, "CategorySelector", [drawingCategoryId]);
1033
+ const viewRange = new Range2d(0, 0, 100, 100);
1034
+ const drawingViewId = DrawingViewDefinition.insert(txn, definitionModelId, "Test Drawing View", drawingModelId, categorySelectorId, displayStyle2dId, viewRange);
1035
+ txn.end("save");
1036
+ for await (const row of imodel.createQueryReader(`SELECT $ FROM bis.Element WHERE ECInstanceId = ${drawingViewId} OPTIONS USE_JS_PROP_NAMES`)) {
1037
+ const parsed = parseFullInstanceColumn(row.toRow().$);
1038
+ // Validate navigation properties in the ECSql result
1039
+ assert.isDefined(parsed.categorySelector, "ECSQL $ should contain 'categorySelector'");
1040
+ assert.isDefined(parsed.displayStyle, "ECSQL $ should contain 'displayStyle'");
1041
+ assert.isDefined(parsed.baseModel, "ECSQL $ should contain 'baseModel'");
1042
+ // Validate navigation property IDs
1043
+ assert.isTrue(Id64.isValidId64(parsed.categorySelector.id), "categorySelector.id should be a valid Id64");
1044
+ assert.isTrue(Id64.isValidId64(parsed.displayStyle.id), "displayStyle.id should be a valid Id64");
1045
+ assert.isTrue(Id64.isValidId64(parsed.baseModel.id), "baseModel.id should be a valid Id64");
1046
+ // Try to reconstruct an element from the returned properties
1047
+ const reconstructed = imodel.constructEntity(parsed);
1048
+ assert.deepEqual(reconstructed.categorySelector, parsed.categorySelector);
1049
+ assert.deepEqual(reconstructed.displayStyle, parsed.displayStyle);
1050
+ assert.deepEqual(reconstructed.baseModel, parsed.baseModel);
1051
+ // Deprecated Id64String props should also be valid (Backward compatibility)
1052
+ assert.equal(reconstructed.categorySelectorId, categorySelectorId);
1053
+ assert.equal(reconstructed.displayStyleId, displayStyle2dId);
1054
+ assert.equal(reconstructed.baseModelId, drawingModelId);
1055
+ // Do a quick check of the setter to ensure RelClassName is preserved and only id gets overridden
1056
+ reconstructed.categorySelectorId = "Id123";
1057
+ reconstructed.baseModelId = "Id456";
1058
+ reconstructed.displayStyleId = "Id789";
1059
+ assert.deepEqual(reconstructed.categorySelector, { id: "Id123", relClassName: "BisCore.ViewDefinitionUsesCategorySelector" });
1060
+ assert.deepEqual(reconstructed.baseModel, { id: "Id456", relClassName: "BisCore.BaseModelForView2d" });
1061
+ assert.deepEqual(reconstructed.displayStyle, { id: "Id789", relClassName: "BisCore.ViewDefinitionUsesDisplayStyle" });
1062
+ }
1063
+ });
1064
+ });
924
1065
  });
925
1066
  //# sourceMappingURL=ElementRoundTrip.test.js.map