@itwin/core-backend 5.9.0-dev.1 → 5.9.0-dev.11

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 (752) hide show
  1. package/CHANGELOG.md +30 -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.js +3 -3
  9. package/lib/cjs/BriefcaseManager.js.map +1 -1
  10. package/lib/cjs/CatalogDb.js.map +1 -1
  11. package/lib/cjs/Category.d.ts +37 -7
  12. package/lib/cjs/Category.d.ts.map +1 -1
  13. package/lib/cjs/Category.js +33 -42
  14. package/lib/cjs/Category.js.map +1 -1
  15. package/lib/cjs/ChangeSummaryManager.js +2 -2
  16. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  17. package/lib/cjs/ChangedElementsDb.js.map +1 -1
  18. package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
  19. package/lib/cjs/ChangesetECAdaptor.js +253 -250
  20. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  21. package/lib/cjs/ChannelControl.d.ts +29 -0
  22. package/lib/cjs/ChannelControl.d.ts.map +1 -1
  23. package/lib/cjs/ChannelControl.js.map +1 -1
  24. package/lib/cjs/CheckpointManager.js +1 -1
  25. package/lib/cjs/CheckpointManager.js.map +1 -1
  26. package/lib/cjs/ClassRegistry.js +5 -5
  27. package/lib/cjs/ClassRegistry.js.map +1 -1
  28. package/lib/cjs/CloudSqlite.d.ts +1 -1
  29. package/lib/cjs/CloudSqlite.d.ts.map +1 -1
  30. package/lib/cjs/CloudSqlite.js +68 -13
  31. package/lib/cjs/CloudSqlite.js.map +1 -1
  32. package/lib/cjs/CodeService.js.map +1 -1
  33. package/lib/cjs/CodeSpecs.d.ts +32 -3
  34. package/lib/cjs/CodeSpecs.d.ts.map +1 -1
  35. package/lib/cjs/CodeSpecs.js +48 -20
  36. package/lib/cjs/CodeSpecs.js.map +1 -1
  37. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  38. package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
  39. package/lib/cjs/DevTools.js.map +1 -1
  40. package/lib/cjs/DisplayStyle.d.ts +18 -3
  41. package/lib/cjs/DisplayStyle.d.ts.map +1 -1
  42. package/lib/cjs/DisplayStyle.js +10 -21
  43. package/lib/cjs/DisplayStyle.js.map +1 -1
  44. package/lib/cjs/ECDb.js.map +1 -1
  45. package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
  46. package/lib/cjs/ECSqlRowExecutor.js.map +1 -1
  47. package/lib/cjs/ECSqlStatement.js.map +1 -1
  48. package/lib/cjs/ECSqlSyncReader.js.map +1 -1
  49. package/lib/cjs/EditTxn.d.ts +262 -0
  50. package/lib/cjs/EditTxn.d.ts.map +1 -0
  51. package/lib/cjs/EditTxn.js +548 -0
  52. package/lib/cjs/EditTxn.js.map +1 -0
  53. package/lib/cjs/Element.d.ts +74 -5
  54. package/lib/cjs/Element.d.ts.map +1 -1
  55. package/lib/cjs/Element.js +63 -75
  56. package/lib/cjs/Element.js.map +1 -1
  57. package/lib/cjs/ElementAspect.d.ts +10 -0
  58. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  59. package/lib/cjs/ElementAspect.js +21 -12
  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 +56 -3
  63. package/lib/cjs/ElementTreeWalker.d.ts.map +1 -1
  64. package/lib/cjs/ElementTreeWalker.js +53 -40
  65. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  66. package/lib/cjs/Entity.js.map +1 -1
  67. package/lib/cjs/EntityReferences.js.map +1 -1
  68. package/lib/cjs/ExportGraphics.js.map +1 -1
  69. package/lib/cjs/ExternalSource.d.ts +11 -2
  70. package/lib/cjs/ExternalSource.d.ts.map +1 -1
  71. package/lib/cjs/ExternalSource.js +10 -8
  72. package/lib/cjs/ExternalSource.js.map +1 -1
  73. package/lib/cjs/FontFile.js.map +1 -1
  74. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  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 +74 -23
  79. package/lib/cjs/IModelDb.d.ts.map +1 -1
  80. package/lib/cjs/IModelDb.js +193 -297
  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.d.ts +58 -1
  85. package/lib/cjs/IModelHost.d.ts.map +1 -1
  86. package/lib/cjs/IModelHost.js +89 -0
  87. package/lib/cjs/IModelHost.js.map +1 -1
  88. package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -1
  89. package/lib/cjs/IModelJsFs.js.map +1 -1
  90. package/lib/cjs/ImageSourceConversion.js.map +1 -1
  91. package/lib/cjs/IpcHost.d.ts.map +1 -1
  92. package/lib/cjs/IpcHost.js +35 -15
  93. package/lib/cjs/IpcHost.js.map +1 -1
  94. package/lib/cjs/LineStyle.d.ts +47 -7
  95. package/lib/cjs/LineStyle.d.ts.map +1 -1
  96. package/lib/cjs/LineStyle.js +38 -33
  97. package/lib/cjs/LineStyle.js.map +1 -1
  98. package/lib/cjs/LocalHub.js +1 -1
  99. package/lib/cjs/LocalHub.js.map +1 -1
  100. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  101. package/lib/cjs/LockControl.d.ts +85 -1
  102. package/lib/cjs/LockControl.d.ts.map +1 -1
  103. package/lib/cjs/LockControl.js.map +1 -1
  104. package/lib/cjs/Material.d.ts +8 -1
  105. package/lib/cjs/Material.d.ts.map +1 -1
  106. package/lib/cjs/Material.js +6 -12
  107. package/lib/cjs/Material.js.map +1 -1
  108. package/lib/cjs/Model.d.ts +59 -20
  109. package/lib/cjs/Model.d.ts.map +1 -1
  110. package/lib/cjs/Model.js +38 -80
  111. package/lib/cjs/Model.js.map +1 -1
  112. package/lib/cjs/NativeAppStorage.js.map +1 -1
  113. package/lib/cjs/NativeHost.js.map +1 -1
  114. package/lib/cjs/NavigationRelationship.js.map +1 -1
  115. package/lib/cjs/PromiseMemoizer.js.map +1 -1
  116. package/lib/cjs/PropertyStore.js.map +1 -1
  117. package/lib/cjs/Relationship.d.ts +72 -7
  118. package/lib/cjs/Relationship.d.ts.map +1 -1
  119. package/lib/cjs/Relationship.js +39 -21
  120. package/lib/cjs/Relationship.js.map +1 -1
  121. package/lib/cjs/RpcBackend.js.map +1 -1
  122. package/lib/cjs/SQLiteDb.js.map +1 -1
  123. package/lib/cjs/Schema.js.map +1 -1
  124. package/lib/cjs/SchemaSync.js +4 -4
  125. package/lib/cjs/SchemaSync.js.map +1 -1
  126. package/lib/cjs/SchemaUtils.js.map +1 -1
  127. package/lib/cjs/SheetIndex.d.ts +9 -0
  128. package/lib/cjs/SheetIndex.d.ts.map +1 -1
  129. package/lib/cjs/SheetIndex.js +38 -35
  130. package/lib/cjs/SheetIndex.js.map +1 -1
  131. package/lib/cjs/SqliteChangesetReader.js.map +1 -1
  132. package/lib/cjs/SqliteStatement.js.map +1 -1
  133. package/lib/cjs/StashManager.js +1 -1
  134. package/lib/cjs/StashManager.js.map +1 -1
  135. package/lib/cjs/Texture.d.ts +6 -0
  136. package/lib/cjs/Texture.d.ts.map +1 -1
  137. package/lib/cjs/Texture.js +6 -14
  138. package/lib/cjs/Texture.js.map +1 -1
  139. package/lib/cjs/TileStorage.js.map +1 -1
  140. package/lib/cjs/TxnManager.d.ts +105 -9
  141. package/lib/cjs/TxnManager.d.ts.map +1 -1
  142. package/lib/cjs/TxnManager.js +194 -15
  143. package/lib/cjs/TxnManager.js.map +1 -1
  144. package/lib/cjs/ViewDefinition.d.ts +21 -1
  145. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  146. package/lib/cjs/ViewDefinition.js +27 -66
  147. package/lib/cjs/ViewDefinition.js.map +1 -1
  148. package/lib/cjs/ViewStateHydrator.js.map +1 -1
  149. package/lib/cjs/ViewStore.js.map +1 -1
  150. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts +14 -6
  151. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
  152. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js +33 -27
  153. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  154. package/lib/cjs/annotations/FrameGeometry.js.map +1 -1
  155. package/lib/cjs/annotations/LeaderGeometry.js.map +1 -1
  156. package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -1
  157. package/lib/cjs/annotations/TextAnnotationElement.js +6 -5
  158. package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
  159. package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -1
  160. package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -1
  161. package/lib/cjs/annotations/TextBlockLayout.js.map +1 -1
  162. package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
  163. package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +32 -32
  164. package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +27 -27
  165. package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +94 -94
  166. package/lib/cjs/assets/Settings/backend.setting.json5 +21 -21
  167. package/lib/cjs/core-backend.d.ts +1 -0
  168. package/lib/cjs/core-backend.d.ts.map +1 -1
  169. package/lib/cjs/core-backend.js +1 -0
  170. package/lib/cjs/core-backend.js.map +1 -1
  171. package/lib/cjs/domains/FunctionalElements.d.ts +6 -2
  172. package/lib/cjs/domains/FunctionalElements.d.ts.map +1 -1
  173. package/lib/cjs/domains/FunctionalElements.js +8 -13
  174. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  175. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  176. package/lib/cjs/domains/GenericElements.d.ts +11 -4
  177. package/lib/cjs/domains/GenericElements.d.ts.map +1 -1
  178. package/lib/cjs/domains/GenericElements.js +13 -24
  179. package/lib/cjs/domains/GenericElements.js.map +1 -1
  180. package/lib/cjs/domains/GenericSchema.js.map +1 -1
  181. package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -1
  182. package/lib/cjs/internal/ChannelAdmin.d.ts +15 -0
  183. package/lib/cjs/internal/ChannelAdmin.d.ts.map +1 -1
  184. package/lib/cjs/internal/ChannelAdmin.js +5 -3
  185. package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
  186. package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
  187. package/lib/cjs/internal/FontFileImpl.js.map +1 -1
  188. package/lib/cjs/internal/HubMock.d.ts +2 -0
  189. package/lib/cjs/internal/HubMock.d.ts.map +1 -1
  190. package/lib/cjs/internal/HubMock.js +7 -0
  191. package/lib/cjs/internal/HubMock.js.map +1 -1
  192. package/lib/cjs/internal/IModelDbFontsImpl.js.map +1 -1
  193. package/lib/cjs/internal/IntegrityCheck.js.map +1 -1
  194. package/lib/cjs/internal/NativePlatform.js.map +1 -1
  195. package/lib/cjs/internal/NoLocks.d.ts.map +1 -1
  196. package/lib/cjs/internal/NoLocks.js +6 -0
  197. package/lib/cjs/internal/NoLocks.js.map +1 -1
  198. package/lib/cjs/internal/OnlineStatus.js.map +1 -1
  199. package/lib/cjs/internal/ServerBasedLocks.d.ts +12 -0
  200. package/lib/cjs/internal/ServerBasedLocks.d.ts.map +1 -1
  201. package/lib/cjs/internal/ServerBasedLocks.js +285 -4
  202. package/lib/cjs/internal/ServerBasedLocks.js.map +1 -1
  203. package/lib/cjs/internal/Symbols.d.ts +4 -0
  204. package/lib/cjs/internal/Symbols.d.ts.map +1 -1
  205. package/lib/cjs/internal/Symbols.js +5 -1
  206. package/lib/cjs/internal/Symbols.js.map +1 -1
  207. package/lib/cjs/internal/annotations/fields.d.ts +3 -2
  208. package/lib/cjs/internal/annotations/fields.d.ts.map +1 -1
  209. package/lib/cjs/internal/annotations/fields.js +7 -6
  210. package/lib/cjs/internal/annotations/fields.js.map +1 -1
  211. package/lib/cjs/internal/cross-package.js.map +1 -1
  212. package/lib/cjs/internal/workspace/SettingsEditorImpl.d.ts +18 -3
  213. package/lib/cjs/internal/workspace/SettingsEditorImpl.d.ts.map +1 -1
  214. package/lib/cjs/internal/workspace/SettingsEditorImpl.js +49 -242
  215. package/lib/cjs/internal/workspace/SettingsEditorImpl.js.map +1 -1
  216. package/lib/cjs/internal/workspace/SettingsImpl.d.ts.map +1 -1
  217. package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
  218. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  219. package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts +0 -1
  220. package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts.map +1 -1
  221. package/lib/cjs/internal/workspace/WorkspaceImpl.js +70 -41
  222. package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
  223. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  224. package/lib/cjs/rpc/multipart.js.map +1 -1
  225. package/lib/cjs/rpc/tracing.js.map +1 -1
  226. package/lib/cjs/rpc/web/logging.js.map +1 -1
  227. package/lib/cjs/rpc/web/request.js.map +1 -1
  228. package/lib/cjs/rpc/web/response.js.map +1 -1
  229. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  230. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  231. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  232. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -1
  233. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  234. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  235. package/lib/cjs/workspace/Settings.d.ts +11 -5
  236. package/lib/cjs/workspace/Settings.d.ts.map +1 -1
  237. package/lib/cjs/workspace/Settings.js.map +1 -1
  238. package/lib/cjs/workspace/SettingsDb.d.ts +20 -99
  239. package/lib/cjs/workspace/SettingsDb.d.ts.map +1 -1
  240. package/lib/cjs/workspace/SettingsDb.js +23 -7
  241. package/lib/cjs/workspace/SettingsDb.js.map +1 -1
  242. package/lib/cjs/workspace/SettingsEditor.d.ts +40 -226
  243. package/lib/cjs/workspace/SettingsEditor.d.ts.map +1 -1
  244. package/lib/cjs/workspace/SettingsEditor.js +86 -25
  245. package/lib/cjs/workspace/SettingsEditor.js.map +1 -1
  246. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  247. package/lib/cjs/workspace/Workspace.d.ts +7 -11
  248. package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
  249. package/lib/cjs/workspace/Workspace.js.map +1 -1
  250. package/lib/cjs/workspace/WorkspaceEditor.d.ts +14 -0
  251. package/lib/cjs/workspace/WorkspaceEditor.d.ts.map +1 -1
  252. package/lib/cjs/workspace/WorkspaceEditor.js +1 -1
  253. package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
  254. package/lib/esm/BackendHubAccess.d.ts +38 -0
  255. package/lib/esm/BackendHubAccess.d.ts.map +1 -1
  256. package/lib/esm/BackendHubAccess.js.map +1 -1
  257. package/lib/esm/BackendLoggerCategory.js.map +1 -1
  258. package/lib/esm/BisCoreSchema.js.map +1 -1
  259. package/lib/esm/BlobContainerService.js.map +1 -1
  260. package/lib/esm/BriefcaseManager.js +3 -3
  261. package/lib/esm/BriefcaseManager.js.map +1 -1
  262. package/lib/esm/CatalogDb.js.map +1 -1
  263. package/lib/esm/Category.d.ts +37 -7
  264. package/lib/esm/Category.d.ts.map +1 -1
  265. package/lib/esm/Category.js +33 -42
  266. package/lib/esm/Category.js.map +1 -1
  267. package/lib/esm/ChangeSummaryManager.js +2 -2
  268. package/lib/esm/ChangeSummaryManager.js.map +1 -1
  269. package/lib/esm/ChangedElementsDb.js.map +1 -1
  270. package/lib/esm/ChangesetECAdaptor.d.ts.map +1 -1
  271. package/lib/esm/ChangesetECAdaptor.js +253 -250
  272. package/lib/esm/ChangesetECAdaptor.js.map +1 -1
  273. package/lib/esm/ChannelControl.d.ts +29 -0
  274. package/lib/esm/ChannelControl.d.ts.map +1 -1
  275. package/lib/esm/ChannelControl.js.map +1 -1
  276. package/lib/esm/CheckpointManager.js +1 -1
  277. package/lib/esm/CheckpointManager.js.map +1 -1
  278. package/lib/esm/ClassRegistry.js +5 -5
  279. package/lib/esm/ClassRegistry.js.map +1 -1
  280. package/lib/esm/CloudSqlite.d.ts +1 -1
  281. package/lib/esm/CloudSqlite.d.ts.map +1 -1
  282. package/lib/esm/CloudSqlite.js +69 -14
  283. package/lib/esm/CloudSqlite.js.map +1 -1
  284. package/lib/esm/CodeService.js.map +1 -1
  285. package/lib/esm/CodeSpecs.d.ts +32 -3
  286. package/lib/esm/CodeSpecs.d.ts.map +1 -1
  287. package/lib/esm/CodeSpecs.js +49 -21
  288. package/lib/esm/CodeSpecs.js.map +1 -1
  289. package/lib/esm/ConcurrentQuery.js.map +1 -1
  290. package/lib/esm/CustomViewState3dCreator.js.map +1 -1
  291. package/lib/esm/DevTools.js.map +1 -1
  292. package/lib/esm/DisplayStyle.d.ts +18 -3
  293. package/lib/esm/DisplayStyle.d.ts.map +1 -1
  294. package/lib/esm/DisplayStyle.js +10 -21
  295. package/lib/esm/DisplayStyle.js.map +1 -1
  296. package/lib/esm/ECDb.js.map +1 -1
  297. package/lib/esm/ECSchemaXmlContext.js.map +1 -1
  298. package/lib/esm/ECSqlRowExecutor.js.map +1 -1
  299. package/lib/esm/ECSqlStatement.js.map +1 -1
  300. package/lib/esm/ECSqlSyncReader.js.map +1 -1
  301. package/lib/esm/EditTxn.d.ts +262 -0
  302. package/lib/esm/EditTxn.d.ts.map +1 -0
  303. package/lib/esm/EditTxn.js +543 -0
  304. package/lib/esm/EditTxn.js.map +1 -0
  305. package/lib/esm/Element.d.ts +74 -5
  306. package/lib/esm/Element.d.ts.map +1 -1
  307. package/lib/esm/Element.js +64 -76
  308. package/lib/esm/Element.js.map +1 -1
  309. package/lib/esm/ElementAspect.d.ts +10 -0
  310. package/lib/esm/ElementAspect.d.ts.map +1 -1
  311. package/lib/esm/ElementAspect.js +22 -13
  312. package/lib/esm/ElementAspect.js.map +1 -1
  313. package/lib/esm/ElementGraphics.js.map +1 -1
  314. package/lib/esm/ElementTreeWalker.d.ts +56 -3
  315. package/lib/esm/ElementTreeWalker.d.ts.map +1 -1
  316. package/lib/esm/ElementTreeWalker.js +53 -40
  317. package/lib/esm/ElementTreeWalker.js.map +1 -1
  318. package/lib/esm/Entity.js.map +1 -1
  319. package/lib/esm/EntityReferences.js.map +1 -1
  320. package/lib/esm/ExportGraphics.js.map +1 -1
  321. package/lib/esm/ExternalSource.d.ts +11 -2
  322. package/lib/esm/ExternalSource.d.ts.map +1 -1
  323. package/lib/esm/ExternalSource.js +10 -8
  324. package/lib/esm/ExternalSource.js.map +1 -1
  325. package/lib/esm/FontFile.js.map +1 -1
  326. package/lib/esm/GeoCoordConfig.js.map +1 -1
  327. package/lib/esm/GeographicCRSServices.js.map +1 -1
  328. package/lib/esm/GeometrySummary.js +47 -47
  329. package/lib/esm/GeometrySummary.js.map +1 -1
  330. package/lib/esm/IModelDb.d.ts +74 -23
  331. package/lib/esm/IModelDb.d.ts.map +1 -1
  332. package/lib/esm/IModelDb.js +195 -299
  333. package/lib/esm/IModelDb.js.map +1 -1
  334. package/lib/esm/IModelDbFonts.js.map +1 -1
  335. package/lib/esm/IModelElementCloneContext.js.map +1 -1
  336. package/lib/esm/IModelHost.d.ts +58 -1
  337. package/lib/esm/IModelHost.d.ts.map +1 -1
  338. package/lib/esm/IModelHost.js +91 -2
  339. package/lib/esm/IModelHost.js.map +1 -1
  340. package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -1
  341. package/lib/esm/IModelJsFs.js.map +1 -1
  342. package/lib/esm/ImageSourceConversion.js.map +1 -1
  343. package/lib/esm/IpcHost.d.ts.map +1 -1
  344. package/lib/esm/IpcHost.js +36 -16
  345. package/lib/esm/IpcHost.js.map +1 -1
  346. package/lib/esm/LineStyle.d.ts +47 -7
  347. package/lib/esm/LineStyle.d.ts.map +1 -1
  348. package/lib/esm/LineStyle.js +38 -33
  349. package/lib/esm/LineStyle.js.map +1 -1
  350. package/lib/esm/LocalHub.js +1 -1
  351. package/lib/esm/LocalHub.js.map +1 -1
  352. package/lib/esm/LocalhostIpcHost.js.map +1 -1
  353. package/lib/esm/LockControl.d.ts +85 -1
  354. package/lib/esm/LockControl.d.ts.map +1 -1
  355. package/lib/esm/LockControl.js.map +1 -1
  356. package/lib/esm/Material.d.ts +8 -1
  357. package/lib/esm/Material.d.ts.map +1 -1
  358. package/lib/esm/Material.js +6 -12
  359. package/lib/esm/Material.js.map +1 -1
  360. package/lib/esm/Model.d.ts +59 -20
  361. package/lib/esm/Model.d.ts.map +1 -1
  362. package/lib/esm/Model.js +39 -81
  363. package/lib/esm/Model.js.map +1 -1
  364. package/lib/esm/NativeAppStorage.js.map +1 -1
  365. package/lib/esm/NativeHost.js.map +1 -1
  366. package/lib/esm/NavigationRelationship.js.map +1 -1
  367. package/lib/esm/PromiseMemoizer.js.map +1 -1
  368. package/lib/esm/PropertyStore.js.map +1 -1
  369. package/lib/esm/Relationship.d.ts +72 -7
  370. package/lib/esm/Relationship.d.ts.map +1 -1
  371. package/lib/esm/Relationship.js +40 -22
  372. package/lib/esm/Relationship.js.map +1 -1
  373. package/lib/esm/RpcBackend.js.map +1 -1
  374. package/lib/esm/SQLiteDb.js.map +1 -1
  375. package/lib/esm/Schema.js.map +1 -1
  376. package/lib/esm/SchemaSync.js +5 -5
  377. package/lib/esm/SchemaSync.js.map +1 -1
  378. package/lib/esm/SchemaUtils.js.map +1 -1
  379. package/lib/esm/SheetIndex.d.ts +9 -0
  380. package/lib/esm/SheetIndex.d.ts.map +1 -1
  381. package/lib/esm/SheetIndex.js +38 -35
  382. package/lib/esm/SheetIndex.js.map +1 -1
  383. package/lib/esm/SqliteChangesetReader.js.map +1 -1
  384. package/lib/esm/SqliteStatement.js.map +1 -1
  385. package/lib/esm/StashManager.js +1 -1
  386. package/lib/esm/StashManager.js.map +1 -1
  387. package/lib/esm/Texture.d.ts +6 -0
  388. package/lib/esm/Texture.d.ts.map +1 -1
  389. package/lib/esm/Texture.js +6 -14
  390. package/lib/esm/Texture.js.map +1 -1
  391. package/lib/esm/TileStorage.js.map +1 -1
  392. package/lib/esm/TxnManager.d.ts +105 -9
  393. package/lib/esm/TxnManager.d.ts.map +1 -1
  394. package/lib/esm/TxnManager.js +194 -15
  395. package/lib/esm/TxnManager.js.map +1 -1
  396. package/lib/esm/ViewDefinition.d.ts +21 -1
  397. package/lib/esm/ViewDefinition.d.ts.map +1 -1
  398. package/lib/esm/ViewDefinition.js +27 -66
  399. package/lib/esm/ViewDefinition.js.map +1 -1
  400. package/lib/esm/ViewStateHydrator.js.map +1 -1
  401. package/lib/esm/ViewStore.js.map +1 -1
  402. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts +14 -6
  403. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
  404. package/lib/esm/annotations/ElementDrivesTextAnnotation.js +33 -27
  405. package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  406. package/lib/esm/annotations/FrameGeometry.js.map +1 -1
  407. package/lib/esm/annotations/LeaderGeometry.js.map +1 -1
  408. package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -1
  409. package/lib/esm/annotations/TextAnnotationElement.js +6 -5
  410. package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
  411. package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -1
  412. package/lib/esm/annotations/TextBlockGeometry.js.map +1 -1
  413. package/lib/esm/annotations/TextBlockLayout.js.map +1 -1
  414. package/lib/esm/core-backend.d.ts +1 -0
  415. package/lib/esm/core-backend.d.ts.map +1 -1
  416. package/lib/esm/core-backend.js +1 -0
  417. package/lib/esm/core-backend.js.map +1 -1
  418. package/lib/esm/domains/FunctionalElements.d.ts +6 -2
  419. package/lib/esm/domains/FunctionalElements.d.ts.map +1 -1
  420. package/lib/esm/domains/FunctionalElements.js +8 -13
  421. package/lib/esm/domains/FunctionalElements.js.map +1 -1
  422. package/lib/esm/domains/FunctionalSchema.js.map +1 -1
  423. package/lib/esm/domains/GenericElements.d.ts +11 -4
  424. package/lib/esm/domains/GenericElements.d.ts.map +1 -1
  425. package/lib/esm/domains/GenericElements.js +13 -24
  426. package/lib/esm/domains/GenericElements.js.map +1 -1
  427. package/lib/esm/domains/GenericSchema.js.map +1 -1
  428. package/lib/esm/internal/ChangesetConflictArgs.js.map +1 -1
  429. package/lib/esm/internal/ChannelAdmin.d.ts +15 -0
  430. package/lib/esm/internal/ChannelAdmin.d.ts.map +1 -1
  431. package/lib/esm/internal/ChannelAdmin.js +6 -4
  432. package/lib/esm/internal/ChannelAdmin.js.map +1 -1
  433. package/lib/esm/internal/ElementLRUCache.js.map +1 -1
  434. package/lib/esm/internal/FontFileImpl.js.map +1 -1
  435. package/lib/esm/internal/HubMock.d.ts +2 -0
  436. package/lib/esm/internal/HubMock.d.ts.map +1 -1
  437. package/lib/esm/internal/HubMock.js +7 -0
  438. package/lib/esm/internal/HubMock.js.map +1 -1
  439. package/lib/esm/internal/IModelDbFontsImpl.js.map +1 -1
  440. package/lib/esm/internal/IntegrityCheck.js.map +1 -1
  441. package/lib/esm/internal/NativePlatform.js.map +1 -1
  442. package/lib/esm/internal/NoLocks.d.ts.map +1 -1
  443. package/lib/esm/internal/NoLocks.js +6 -0
  444. package/lib/esm/internal/NoLocks.js.map +1 -1
  445. package/lib/esm/internal/OnlineStatus.js.map +1 -1
  446. package/lib/esm/internal/ServerBasedLocks.d.ts +12 -0
  447. package/lib/esm/internal/ServerBasedLocks.d.ts.map +1 -1
  448. package/lib/esm/internal/ServerBasedLocks.js +286 -5
  449. package/lib/esm/internal/ServerBasedLocks.js.map +1 -1
  450. package/lib/esm/internal/Symbols.d.ts +4 -0
  451. package/lib/esm/internal/Symbols.d.ts.map +1 -1
  452. package/lib/esm/internal/Symbols.js +4 -0
  453. package/lib/esm/internal/Symbols.js.map +1 -1
  454. package/lib/esm/internal/annotations/fields.d.ts +3 -2
  455. package/lib/esm/internal/annotations/fields.d.ts.map +1 -1
  456. package/lib/esm/internal/annotations/fields.js +7 -6
  457. package/lib/esm/internal/annotations/fields.js.map +1 -1
  458. package/lib/esm/internal/cross-package.js.map +1 -1
  459. package/lib/esm/internal/workspace/SettingsEditorImpl.d.ts +18 -3
  460. package/lib/esm/internal/workspace/SettingsEditorImpl.d.ts.map +1 -1
  461. package/lib/esm/internal/workspace/SettingsEditorImpl.js +52 -246
  462. package/lib/esm/internal/workspace/SettingsEditorImpl.js.map +1 -1
  463. package/lib/esm/internal/workspace/SettingsImpl.d.ts.map +1 -1
  464. package/lib/esm/internal/workspace/SettingsImpl.js.map +1 -1
  465. package/lib/esm/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  466. package/lib/esm/internal/workspace/WorkspaceImpl.d.ts +0 -1
  467. package/lib/esm/internal/workspace/WorkspaceImpl.d.ts.map +1 -1
  468. package/lib/esm/internal/workspace/WorkspaceImpl.js +71 -41
  469. package/lib/esm/internal/workspace/WorkspaceImpl.js.map +1 -1
  470. package/lib/esm/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  471. package/lib/esm/rpc/multipart.js.map +1 -1
  472. package/lib/esm/rpc/tracing.js.map +1 -1
  473. package/lib/esm/rpc/web/logging.js.map +1 -1
  474. package/lib/esm/rpc/web/request.js.map +1 -1
  475. package/lib/esm/rpc/web/response.js.map +1 -1
  476. package/lib/esm/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  477. package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  478. package/lib/esm/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  479. package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -1
  480. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  481. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  482. package/lib/esm/test/AdvancedEqual.js.map +1 -1
  483. package/lib/esm/test/AnnotationTestUtils.js.map +1 -1
  484. package/lib/esm/test/AttachDb.test.js +11 -11
  485. package/lib/esm/test/AttachDb.test.js.map +1 -1
  486. package/lib/esm/test/ElementDrivesElement.test.d.ts +20 -19
  487. package/lib/esm/test/ElementDrivesElement.test.d.ts.map +1 -1
  488. package/lib/esm/test/ElementDrivesElement.test.js +134 -119
  489. package/lib/esm/test/ElementDrivesElement.test.js.map +1 -1
  490. package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
  491. package/lib/esm/test/GeometryTestUtil.js.map +1 -1
  492. package/lib/esm/test/IModelHost.test.js +56 -2
  493. package/lib/esm/test/IModelHost.test.js.map +1 -1
  494. package/lib/esm/test/IModelTestUtils.d.ts +23 -23
  495. package/lib/esm/test/IModelTestUtils.d.ts.map +1 -1
  496. package/lib/esm/test/IModelTestUtils.js +466 -449
  497. package/lib/esm/test/IModelTestUtils.js.map +1 -1
  498. package/lib/esm/test/ImageSourceConversion.test.js.map +1 -1
  499. package/lib/esm/test/IpcHost.test.js +112 -0
  500. package/lib/esm/test/IpcHost.test.js.map +1 -1
  501. package/lib/esm/test/KnownTestLocations.js.map +1 -1
  502. package/lib/esm/test/PrintElementTree.js.map +1 -1
  503. package/lib/esm/test/PropertyDb.test.js +2 -2
  504. package/lib/esm/test/PropertyDb.test.js.map +1 -1
  505. package/lib/esm/test/RevisionUtility.js.map +1 -1
  506. package/lib/esm/test/SchemaUtils.test.js +25 -25
  507. package/lib/esm/test/SchemaUtils.test.js.map +1 -1
  508. package/lib/esm/test/SequentialLogMatcher.js.map +1 -1
  509. package/lib/esm/test/SquashSchemaAndDataChanges.test.js +156 -147
  510. package/lib/esm/test/SquashSchemaAndDataChanges.test.js.map +1 -1
  511. package/lib/esm/test/TestChangeSetUtility.d.ts.map +1 -1
  512. package/lib/esm/test/TestChangeSetUtility.js +11 -7
  513. package/lib/esm/test/TestChangeSetUtility.js.map +1 -1
  514. package/lib/esm/test/TestEditTxn.d.ts +8 -0
  515. package/lib/esm/test/TestEditTxn.d.ts.map +1 -0
  516. package/lib/esm/test/TestEditTxn.js +34 -0
  517. package/lib/esm/test/TestEditTxn.js.map +1 -0
  518. package/lib/esm/test/TestUtils.d.ts +1 -0
  519. package/lib/esm/test/TestUtils.d.ts.map +1 -1
  520. package/lib/esm/test/TestUtils.js +8 -1
  521. package/lib/esm/test/TestUtils.js.map +1 -1
  522. package/lib/esm/test/annotations/Fields.test.js +135 -143
  523. package/lib/esm/test/annotations/Fields.test.js.map +1 -1
  524. package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -1
  525. package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -1
  526. package/lib/esm/test/annotations/TextAnnotation.test.js +156 -99
  527. package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
  528. package/lib/esm/test/annotations/TextBlock.test.js +5 -3
  529. package/lib/esm/test/annotations/TextBlock.test.js.map +1 -1
  530. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -1
  531. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -1
  532. package/lib/esm/test/categories/Category.test.js +63 -3
  533. package/lib/esm/test/categories/Category.test.js.map +1 -1
  534. package/lib/esm/test/codespec/CodeSpec.test.js +88 -5
  535. package/lib/esm/test/codespec/CodeSpec.test.js.map +1 -1
  536. package/lib/esm/test/ecdb/CTE.test.js +88 -88
  537. package/lib/esm/test/ecdb/CTE.test.js.map +1 -1
  538. package/lib/esm/test/ecdb/ConcurrentQuery.test.js +19 -19
  539. package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -1
  540. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +15 -15
  541. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -1
  542. package/lib/esm/test/ecdb/ECDb.test.js +72 -72
  543. package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
  544. package/lib/esm/test/ecdb/ECDbTestHelper.js.map +1 -1
  545. package/lib/esm/test/ecdb/ECSchemaXmlContext.test.js.map +1 -1
  546. package/lib/esm/test/ecdb/ECSqlAst.test.js +68 -67
  547. package/lib/esm/test/ecdb/ECSqlAst.test.js.map +1 -1
  548. package/lib/esm/test/ecdb/ECSqlQuery.test.js +6 -6
  549. package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
  550. package/lib/esm/test/ecdb/ECSqlStatement.test.js +332 -333
  551. package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
  552. package/lib/esm/test/ecdb/ECSqlSyncReader.test.js.map +1 -1
  553. package/lib/esm/test/ecdb/QueryReaders.test.js +47 -44
  554. package/lib/esm/test/ecdb/QueryReaders.test.js.map +1 -1
  555. package/lib/esm/test/ecdb/SqliteStatement.test.js +2 -2
  556. package/lib/esm/test/ecdb/SqliteStatement.test.js.map +1 -1
  557. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.d.ts.map +1 -1
  558. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js +30 -28
  559. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js.map +1 -1
  560. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js +21 -21
  561. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js.map +1 -1
  562. package/lib/esm/test/ecsql/src/ECSqlTestParser.js.map +1 -1
  563. package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js.map +1 -1
  564. package/lib/esm/test/element/DeleteDefinitionElements.test.js +159 -143
  565. package/lib/esm/test/element/DeleteDefinitionElements.test.js.map +1 -1
  566. package/lib/esm/test/element/ElementAspect.test.js +90 -82
  567. package/lib/esm/test/element/ElementAspect.test.js.map +1 -1
  568. package/lib/esm/test/element/ElementDependencyGraph.test.d.ts.map +1 -1
  569. package/lib/esm/test/element/ElementDependencyGraph.test.js +51 -43
  570. package/lib/esm/test/element/ElementDependencyGraph.test.js.map +1 -1
  571. package/lib/esm/test/element/ElementRoundTrip.test.js +176 -177
  572. package/lib/esm/test/element/ElementRoundTrip.test.js.map +1 -1
  573. package/lib/esm/test/element/ExcludedElements.test.js +2 -2
  574. package/lib/esm/test/element/ExcludedElements.test.js.map +1 -1
  575. package/lib/esm/test/element/ExternalSource.test.js +40 -38
  576. package/lib/esm/test/element/ExternalSource.test.js.map +1 -1
  577. package/lib/esm/test/element/NullStructArray.test.js +23 -22
  578. package/lib/esm/test/element/NullStructArray.test.js.map +1 -1
  579. package/lib/esm/test/element/ProjectInformationRecord.test.js +5 -2
  580. package/lib/esm/test/element/ProjectInformationRecord.test.js.map +1 -1
  581. package/lib/esm/test/element/SheetInformationAspect.test.js +43 -11
  582. package/lib/esm/test/element/SheetInformationAspect.test.js.map +1 -1
  583. package/lib/esm/test/element/UrlLink.test.js +2 -2
  584. package/lib/esm/test/element/UrlLink.test.js.map +1 -1
  585. package/lib/esm/test/font/FontFile.test.js.map +1 -1
  586. package/lib/esm/test/font/IModelDbFonts.test.js +87 -73
  587. package/lib/esm/test/font/IModelDbFonts.test.js.map +1 -1
  588. package/lib/esm/test/hubaccess/ApplyChangeset.test.js +194 -155
  589. package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -1
  590. package/lib/esm/test/hubaccess/BriefcaseManager.test.js +2 -4
  591. package/lib/esm/test/hubaccess/BriefcaseManager.test.js.map +1 -1
  592. package/lib/esm/test/hubaccess/CheckpointManager.test.js.map +1 -1
  593. package/lib/esm/test/hubaccess/Rebase.test.js +369 -303
  594. package/lib/esm/test/hubaccess/Rebase.test.js.map +1 -1
  595. package/lib/esm/test/hubaccess/SemanticRebase.test.js +467 -392
  596. package/lib/esm/test/hubaccess/SemanticRebase.test.js.map +1 -1
  597. package/lib/esm/test/imageData.js.map +1 -1
  598. package/lib/esm/test/imodel/Code.test.js +31 -31
  599. package/lib/esm/test/imodel/Code.test.js.map +1 -1
  600. package/lib/esm/test/imodel/ElementTreeWalker.test.js +57 -48
  601. package/lib/esm/test/imodel/ElementTreeWalker.test.js.map +1 -1
  602. package/lib/esm/test/imodel/GetTextureImage.test.js.map +1 -1
  603. package/lib/esm/test/imodel/IModel.test.js +463 -388
  604. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  605. package/lib/esm/test/imodel/ProjectExtents.test.js +2 -2
  606. package/lib/esm/test/imodel/ProjectExtents.test.js.map +1 -1
  607. package/lib/esm/test/imodel/SchemaXmlImport.test.js +77 -13
  608. package/lib/esm/test/imodel/SchemaXmlImport.test.js.map +1 -1
  609. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -1
  610. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -1
  611. package/lib/esm/test/incrementalSchemaLocater/TestContext.d.ts.map +1 -1
  612. package/lib/esm/test/incrementalSchemaLocater/TestContext.js +2 -2
  613. package/lib/esm/test/incrementalSchemaLocater/TestContext.js.map +1 -1
  614. package/lib/esm/test/index.d.ts +1 -0
  615. package/lib/esm/test/index.d.ts.map +1 -1
  616. package/lib/esm/test/index.js +1 -0
  617. package/lib/esm/test/index.js.map +1 -1
  618. package/lib/esm/test/misc/DevTools.test.js.map +1 -1
  619. package/lib/esm/test/misc/EntitySubClasses.test.js.map +1 -1
  620. package/lib/esm/test/misc/GeoServices.test.js.map +1 -1
  621. package/lib/esm/test/misc/PromiseMemoizer.test.js.map +1 -1
  622. package/lib/esm/test/native/DgnDbWorker.test.js.map +1 -1
  623. package/lib/esm/test/rpc/response.test.js.map +1 -1
  624. package/lib/esm/test/schema/ClassRegistry.test.js +122 -121
  625. package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
  626. package/lib/esm/test/schema/FunctionalDomain.test.js +36 -34
  627. package/lib/esm/test/schema/FunctionalDomain.test.js.map +1 -1
  628. package/lib/esm/test/schema/GenericDomain.test.js +114 -94
  629. package/lib/esm/test/schema/GenericDomain.test.js.map +1 -1
  630. package/lib/esm/test/schema/IModelSchemaContext.test.js +11 -10
  631. package/lib/esm/test/schema/IModelSchemaContext.test.js.map +1 -1
  632. package/lib/esm/test/schema/SchemaImportCallbacks.test.js +226 -211
  633. package/lib/esm/test/schema/SchemaImportCallbacks.test.js.map +1 -1
  634. package/lib/esm/test/sheetindex/SheetIndex.test.d.ts +1 -3
  635. package/lib/esm/test/sheetindex/SheetIndex.test.d.ts.map +1 -1
  636. package/lib/esm/test/sheetindex/SheetIndex.test.js +312 -247
  637. package/lib/esm/test/sheetindex/SheetIndex.test.js.map +1 -1
  638. package/lib/esm/test/standalone/ChangeMerge.test.js +101 -82
  639. package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -1
  640. package/lib/esm/test/standalone/ChangesetReader.test.js +242 -213
  641. package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
  642. package/lib/esm/test/standalone/CustomViewState3dCreator.test.js.map +1 -1
  643. package/lib/esm/test/standalone/DisplayStyle.test.js +43 -40
  644. package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -1
  645. package/lib/esm/test/standalone/Drawing.test.js +4 -3
  646. package/lib/esm/test/standalone/Drawing.test.js.map +1 -1
  647. package/lib/esm/test/standalone/EditTxn.test.d.ts +2 -0
  648. package/lib/esm/test/standalone/EditTxn.test.d.ts.map +1 -0
  649. package/lib/esm/test/standalone/EditTxn.test.js +219 -0
  650. package/lib/esm/test/standalone/EditTxn.test.js.map +1 -0
  651. package/lib/esm/test/standalone/ElementGraphics.test.js.map +1 -1
  652. package/lib/esm/test/standalone/ElementMesh.test.js +16 -13
  653. package/lib/esm/test/standalone/ElementMesh.test.js.map +1 -1
  654. package/lib/esm/test/standalone/ExportGraphics.test.js +40 -34
  655. package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
  656. package/lib/esm/test/standalone/GeometryChangeEvents.test.js +11 -15
  657. package/lib/esm/test/standalone/GeometryChangeEvents.test.js.map +1 -1
  658. package/lib/esm/test/standalone/GeometryStream.test.js +212 -165
  659. package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
  660. package/lib/esm/test/standalone/HubMock.test.js +31 -25
  661. package/lib/esm/test/standalone/HubMock.test.js.map +1 -1
  662. package/lib/esm/test/standalone/IModelLimits.test.js +11 -8
  663. package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -1
  664. package/lib/esm/test/standalone/IModelWrite.test.d.ts +2 -2
  665. package/lib/esm/test/standalone/IModelWrite.test.d.ts.map +1 -1
  666. package/lib/esm/test/standalone/IModelWrite.test.js +211 -169
  667. package/lib/esm/test/standalone/IModelWrite.test.js.map +1 -1
  668. package/lib/esm/test/standalone/ITwinWorkspace.test.d.ts +2 -0
  669. package/lib/esm/test/standalone/ITwinWorkspace.test.d.ts.map +1 -0
  670. package/lib/esm/test/standalone/ITwinWorkspace.test.js +236 -0
  671. package/lib/esm/test/standalone/ITwinWorkspace.test.js.map +1 -0
  672. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js +25 -22
  673. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js.map +1 -1
  674. package/lib/esm/test/standalone/IntegrityCheck.test.js +20 -18
  675. package/lib/esm/test/standalone/IntegrityCheck.test.js.map +1 -1
  676. package/lib/esm/test/standalone/MergeConflict.test.d.ts +2 -2
  677. package/lib/esm/test/standalone/MergeConflict.test.d.ts.map +1 -1
  678. package/lib/esm/test/standalone/MergeConflict.test.js +49 -33
  679. package/lib/esm/test/standalone/MergeConflict.test.js.map +1 -1
  680. package/lib/esm/test/standalone/NativeAppStorage.test.js.map +1 -1
  681. package/lib/esm/test/standalone/RenderMaterialElement.test.js +5 -5
  682. package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
  683. package/lib/esm/test/standalone/RenderTimeline.test.js +3 -2
  684. package/lib/esm/test/standalone/RenderTimeline.test.js.map +1 -1
  685. package/lib/esm/test/standalone/SQLiteDb.test.js.map +1 -1
  686. package/lib/esm/test/standalone/SchemaUtils.test.js.map +1 -1
  687. package/lib/esm/test/standalone/SectionDrawing.test.js +7 -7
  688. package/lib/esm/test/standalone/SectionDrawing.test.js.map +1 -1
  689. package/lib/esm/test/standalone/ServerBasedLocks.test.js +928 -22
  690. package/lib/esm/test/standalone/ServerBasedLocks.test.js.map +1 -1
  691. package/lib/esm/test/standalone/Setting.test.js.map +1 -1
  692. package/lib/esm/test/standalone/Settings.test.js +26 -4
  693. package/lib/esm/test/standalone/Settings.test.js.map +1 -1
  694. package/lib/esm/test/standalone/SettingsSchemas.test.js +2 -1
  695. package/lib/esm/test/standalone/SettingsSchemas.test.js.map +1 -1
  696. package/lib/esm/test/standalone/SnapshotDb.test.js +3 -1
  697. package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
  698. package/lib/esm/test/standalone/StandaloneDb.test.js +27 -26
  699. package/lib/esm/test/standalone/StandaloneDb.test.js.map +1 -1
  700. package/lib/esm/test/standalone/Texture.test.js +5 -4
  701. package/lib/esm/test/standalone/Texture.test.js.map +1 -1
  702. package/lib/esm/test/standalone/TileCache.test.d.ts.map +1 -1
  703. package/lib/esm/test/standalone/TileCache.test.js +5 -3
  704. package/lib/esm/test/standalone/TileCache.test.js.map +1 -1
  705. package/lib/esm/test/standalone/TileTree.test.js +35 -31
  706. package/lib/esm/test/standalone/TileTree.test.js.map +1 -1
  707. package/lib/esm/test/standalone/TxnManager.test.js +700 -653
  708. package/lib/esm/test/standalone/TxnManager.test.js.map +1 -1
  709. package/lib/esm/test/standalone/ViewDefinition.test.js +295 -229
  710. package/lib/esm/test/standalone/ViewDefinition.test.js.map +1 -1
  711. package/lib/esm/test/standalone/ViewStoreDb.test.js.map +1 -1
  712. package/lib/esm/test/standalone/Workspace.test.js +72 -22
  713. package/lib/esm/test/standalone/Workspace.test.js.map +1 -1
  714. package/lib/esm/test/standalone/iModelDb.test.js.map +1 -1
  715. package/lib/esm/test/workspace/SettingsDb.test.js +28 -456
  716. package/lib/esm/test/workspace/SettingsDb.test.js.map +1 -1
  717. package/lib/esm/workspace/Settings.d.ts +11 -5
  718. package/lib/esm/workspace/Settings.d.ts.map +1 -1
  719. package/lib/esm/workspace/Settings.js.map +1 -1
  720. package/lib/esm/workspace/SettingsDb.d.ts +20 -99
  721. package/lib/esm/workspace/SettingsDb.d.ts.map +1 -1
  722. package/lib/esm/workspace/SettingsDb.js +20 -6
  723. package/lib/esm/workspace/SettingsDb.js.map +1 -1
  724. package/lib/esm/workspace/SettingsEditor.d.ts +40 -226
  725. package/lib/esm/workspace/SettingsEditor.d.ts.map +1 -1
  726. package/lib/esm/workspace/SettingsEditor.js +85 -24
  727. package/lib/esm/workspace/SettingsEditor.js.map +1 -1
  728. package/lib/esm/workspace/SettingsSchemas.js.map +1 -1
  729. package/lib/esm/workspace/Workspace.d.ts +7 -11
  730. package/lib/esm/workspace/Workspace.d.ts.map +1 -1
  731. package/lib/esm/workspace/Workspace.js.map +1 -1
  732. package/lib/esm/workspace/WorkspaceEditor.d.ts +14 -0
  733. package/lib/esm/workspace/WorkspaceEditor.d.ts.map +1 -1
  734. package/lib/esm/workspace/WorkspaceEditor.js +1 -1
  735. package/lib/esm/workspace/WorkspaceEditor.js.map +1 -1
  736. package/package.json +14 -14
  737. package/lib/cjs/internal/workspace/SettingsDbImpl.d.ts +0 -38
  738. package/lib/cjs/internal/workspace/SettingsDbImpl.d.ts.map +0 -1
  739. package/lib/cjs/internal/workspace/SettingsDbImpl.js +0 -108
  740. package/lib/cjs/internal/workspace/SettingsDbImpl.js.map +0 -1
  741. package/lib/cjs/internal/workspace/SettingsSqliteDb.d.ts +0 -14
  742. package/lib/cjs/internal/workspace/SettingsSqliteDb.d.ts.map +0 -1
  743. package/lib/cjs/internal/workspace/SettingsSqliteDb.js +0 -40
  744. package/lib/cjs/internal/workspace/SettingsSqliteDb.js.map +0 -1
  745. package/lib/esm/internal/workspace/SettingsDbImpl.d.ts +0 -38
  746. package/lib/esm/internal/workspace/SettingsDbImpl.d.ts.map +0 -1
  747. package/lib/esm/internal/workspace/SettingsDbImpl.js +0 -104
  748. package/lib/esm/internal/workspace/SettingsDbImpl.js.map +0 -1
  749. package/lib/esm/internal/workspace/SettingsSqliteDb.d.ts +0 -14
  750. package/lib/esm/internal/workspace/SettingsSqliteDb.d.ts.map +0 -1
  751. package/lib/esm/internal/workspace/SettingsSqliteDb.js +0 -36
  752. package/lib/esm/internal/workspace/SettingsSqliteDb.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Material.js","sourceRoot":"","sources":["../../src/Material.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAc,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACL,WAAW,EAAE,IAAI,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAK9C,yDAAyD;AAEzD;;;GAGG;AACH,MAAM,OAAgB,gBAAiB,SAAQ,iBAAiB;IACvD,MAAM,KAAc,SAAS,KAAa,OAAO,kBAAkB,CAAC,CAAC,CAAC;IAC7E;;;;OAIG;IACI,MAAM,CAAC,UAAU,CAAC,MAAgB,EAAE,iBAAiC,EAAE,IAAY;QACxF,MAAM,QAAQ,GAAa,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;QACpF,OAAO,IAAI,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAChF,CAAC;IACD;;;;;;OAMG;IACI,MAAM,CAAC,MAAM,CAA6B,QAAkB,EAAE,iBAAiC,EAAE,IAAY;QA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,qDAAqD;QAC9C,WAAW,CAAU;QAC5B,iHAAiH;QAC1G,KAAK,CAAkB;QAC9B,kEAAkE;QAC3D,aAAa,CAAkB;QACtC;;WAEG;QACI,MAAM,CAAU;QACvB;;;;WAIG;QACI,QAAQ,CAAU;QACzB,wEAAwE;QACjE,OAAO,CAAU;QACxB,yEAAyE;QAClE,QAAQ,CAAU;QACzB,wBAAwB;QACjB,OAAO,CAAU;QACxB,wBAAwB;QACjB,YAAY,CAAY;QAC/B;;;WAGG;QACI,UAAU,CAAmB;QACpC;;;;WAIG;QACI,SAAS,CAKd;QAEF,gJAAgJ;QAChJ,YAAmB,WAAmB;YACpC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QACjC,CAAC;KACF;IAhDY,4BAAM,SAgDlB,CAAA;AACH,CAAC,EAvDgB,qBAAqB,KAArB,qBAAqB,QAuDrC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Elements\n */\n\nimport { Id64, Id64String, JsonUtils } from \"@itwin/core-bentley\";\nimport {\n BisCodeSpec, Code, CodeScopeProps, CodeSpec, DefinitionElementProps, ElementProps, NormalMapProps, RenderMaterialAssetMapsProps, RenderMaterialProps, RgbFactorProps, TextureMapProps,\n} from \"@itwin/core-common\";\nimport { DefinitionElement } from \"./Element\";\nimport { IModelDb } from \"./IModelDb\";\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\nimport { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow } from \"./Entity\";\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\n/** A PhysicalMaterial defines the matter that makes up physical elements.\n * @note See [[RenderMaterialElement]] for the DefinitionElement used to define rendering characteristics.\n * @public\n */\nexport abstract class PhysicalMaterial extends DefinitionElement {\n public static override get className(): string { return \"PhysicalMaterial\"; }\n /** Create a Code for a PhysicalMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\n * @param name The name (codeValue) of the PhysicalMaterial\n */\n public static createCode(iModel: IModelDb, definitionModelId: CodeScopeProps, name: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.physicalMaterial);\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: name });\n }\n /** Create a PhysicalMaterial\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\n * @param name The name (codeValue) of the PhysicalMaterial\n * @returns The newly constructed PhysicalMaterial\n * @throws [[IModelError]] if there is a problem creating the PhysicalMaterial\n */\n public static create<T extends PhysicalMaterial>(iModelDb: IModelDb, definitionModelId: CodeScopeProps, name: string): T {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n };\n return iModelDb.elements.createElement(elementProps);\n }\n}\n\n/** Defines a rendering material.\n * @note See [[PhysicalMaterial]] for the DefinitionElement used to define the matter that makes up physical elements.\n * @public\n */\nexport class RenderMaterialElement extends DefinitionElement {\n public static override get className(): string { return \"RenderMaterial\"; }\n\n /** The name of a palette that can be used to categorize multiple materials. */\n public paletteName: string;\n /** An optional description of the material. */\n public description?: string;\n\n private constructor(props: RenderMaterialProps, iModel: IModelDb) {\n super(props, iModel);\n this.paletteName = props.paletteName;\n this.description = props.description;\n }\n\n public override toJSON(): RenderMaterialProps {\n const val = super.toJSON() as RenderMaterialProps;\n val.paletteName = this.paletteName;\n val.description = this.description;\n return val;\n }\n\n /**\n * RenderMaterialElement custom HandledProps includes 'paletteName'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"paletteName\", source: \"Class\" },\n ];\n\n /**\n * RenderMaterialElement deserializes 'paletteName'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): RenderMaterialProps {\n const elProps = super.deserialize(props) as RenderMaterialProps;\n const instance = props.row;\n elProps.paletteName = JsonUtils.asString(instance.paletteName);\n return elProps;\n }\n\n /**\n * RenderMaterialElement serializes 'paletteName'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: RenderMaterialProps, iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, iModel);\n inst.paletteName = props.paletteName;\n return inst;\n }\n\n /** Create a Code for a RenderMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the RenderMaterial and provides the scope for its name.\n * @param name The RenderMaterial name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, name: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.renderMaterial);\n return 0 === name.length ? Code.createEmpty() : new Code({ spec: codeSpec.id, scope: scopeModelId, value: name });\n }\n /**\n * Create a RenderMaterial with given parameters.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param materialName The name/CodeValue of the RenderMaterial\n * @param params Parameters object which describes how to construct the RenderMaterial\n * @returns The newly constructed RenderMaterial element.\n * @throws [[IModelError]] if unable to create the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): RenderMaterialElement {\n let maps: RenderMaterialAssetMapsProps | undefined;\n const pbr_normal = params.normalMap?.scale;\n if (params.patternMap || params.normalMap) {\n // If both normal and pattern map are present, their texture mapping modes, angles, scales, etc are expected to match.\n type TexMap = Omit<TextureMapProps, \"TextureId\">;\n function choose<K extends keyof TexMap>(obj: TexMap, key: K): void {\n const pat = params.patternMap;\n if (pat && undefined !== pat[key])\n obj[key] = pat[key];\n else if (params.normalMap && undefined !== params.normalMap[key])\n obj[key] = params.normalMap[key];\n }\n\n const baseProps: TexMap = {};\n choose(baseProps, \"pattern_angle\");\n choose(baseProps, \"pattern_u_flip\");\n choose(baseProps, \"pattern_flip\");\n choose(baseProps, \"pattern_scale\");\n choose(baseProps, \"pattern_offset\");\n choose(baseProps, \"pattern_scalemode\");\n choose(baseProps, \"pattern_mapping\");\n choose(baseProps, \"pattern_weight\");\n choose(baseProps, \"pattern_useconstantlod\");\n choose(baseProps, \"pattern_constantlod_repetitions\");\n choose(baseProps, \"pattern_constantlod_offset\");\n choose(baseProps, \"pattern_constantlod_mindistanceclamp\");\n choose(baseProps, \"pattern_constantlod_maxdistanceclamp\");\n\n maps = {};\n if (params.patternMap)\n maps.Pattern = { ...params.patternMap, ...baseProps };\n\n if (params.normalMap) {\n maps.Normal = {\n ...params.normalMap,\n ...baseProps,\n };\n\n delete (maps.Normal as any).scale;\n }\n }\n\n const renderMaterialProps: RenderMaterialProps = {\n classFullName: this.classFullName,\n code: this.createCode(iModelDb, definitionModelId, materialName),\n paletteName: params.paletteName,\n description: params.description,\n jsonProperties: {\n materialAssets: {\n renderMaterial: {\n HasBaseColor: params.color !== undefined,\n color: params.color,\n HasSpecularColor: params.specularColor !== undefined,\n specular_color: params.specularColor,\n HasFinish: params.finish !== undefined,\n finish: params.finish,\n HasTransmit: params.transmit !== undefined ? true : undefined,\n transmit: params.transmit,\n HasDiffuse: params.diffuse !== undefined,\n diffuse: params.diffuse,\n HasSpecular: params.specular !== undefined,\n specular: params.specular,\n HasReflect: params.reflect !== undefined,\n reflect: params.reflect,\n HasReflectColor: params.reflectColor !== undefined,\n reflect_color: params.reflectColor,\n Map: maps,\n pbr_normal,\n },\n },\n },\n model: definitionModelId,\n isPrivate: false,\n };\n\n return new RenderMaterialElement(renderMaterialProps, iModelDb);\n }\n\n /**\n * Insert a new RenderMaterial into a model.\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new Texture into this DefinitionModel\n * @param materialName The name/CodeValue of the RenderMaterial\n * @param params Parameters object which describes how to construct the RenderMaterial\n * @returns The Id of the newly inserted RenderMaterial element.\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): Id64String {\n const renderMaterial = this.create(iModelDb, definitionModelId, materialName, params);\n return iModelDb.elements.insertElement(renderMaterial.toJSON());\n }\n\n /** @beta */\n protected static override async onCloned(context: IModelElementCloneContext, sourceProps: ElementProps, targetProps: ElementProps) {\n await super.onCloned(context, sourceProps, targetProps);\n for (const mapName in sourceProps.jsonProperties?.materialAssets?.renderMaterial?.Map ?? {}) {\n if (typeof mapName !== \"string\")\n continue;\n const sourceMap = sourceProps.jsonProperties.materialAssets.renderMaterial.Map[mapName];\n // sourceMap could be null/undefined, keep it the same in targetProps\n if (!sourceMap) {\n targetProps.jsonProperties.materialAssets.renderMaterial.Map[mapName] = sourceMap;\n continue;\n }\n if (!Id64.isValid(sourceMap.TextureId) || sourceMap.TextureId === undefined)\n continue;\n targetProps.jsonProperties.materialAssets.renderMaterial.Map[mapName].TextureId = context.findTargetElementId(sourceMap.TextureId ?? Id64.invalid);\n }\n }\n}\n\n/** @public */\nexport namespace RenderMaterialElement {\n /** Parameters used to construct a [[RenderMaterial]].\n * The persistent JSON representation - [RenderMaterialAssetProps]($common) - is quite verbose and unwieldy. This representation simplifies it somewhat.\n * @see [[RenderMaterialElement.create]] and [[RenderMaterialElement.insert]] to create a [[RenderMaterial]] from parameters of this type.\n * @deprecated in 3.6 - might be removed in next major version. Because it is not useful to use a `class` - just use [[RenderMaterialElementParams]] directly instead.\n */\n export class Params {\n /** A required palette name that categorizes this RenderMaterial */\n public paletteName: string;\n /** An optional description of this RenderMaterial */\n public description?: string;\n /** If defined, the color to use for surface fill or diffuse illumination, overriding the surface's own color. */\n public color?: RgbFactorProps;\n /** The color to use for specular illumination. Default: black. */\n public specularColor?: RgbFactorProps;\n /** The specular exponent describing the surface's shininess, in the range 0 through 128.\n * Default: 0.\n */\n public finish?: number;\n /** A transparency to be applied to the surface, ranging from 0 (fully opaque) to 1 (fully transparent).\n * If defined, then the material transparency overrides the transparency of whatever surface the material is applied to.\n * If undefined, the material has no effect on surface transparency.\n * Default: undefined.\n */\n public transmit?: number;\n /** The surface's diffuse reflectivity from 0.0 to 1.0. Default: 0.6. */\n public diffuse?: number;\n /** The surface's specular reflectivity from 0.0 to 1.0. Default: 0.0. */\n public specular?: number;\n /** Currently unused. */\n public reflect?: number;\n /** Currently unused. */\n public reflectColor?: number[];\n /** Specifies a texture image to map onto the surface, replacing or mixing with the surface's own color and transparency.\n * @note With the exception of `TextureId`, the [TextureMapProps]($common) of [[patternMap]] and [[normalMap]] are expected to be identical. If a property is defined in both\n * [[patternMap]]] and [[normalMap]], the value in [[patternMap]] takes precedence.\n */\n public patternMap?: TextureMapProps;\n /** Specifies a [normal map](https://en.wikipedia.org/wiki/Normal_mapping) to apply to the surface to simulate more surface detail than is present in the\n * surface's geometry.\n * @note With the exception of `TextureId`, the [TextureMapProps]($common) of [[patternMap]] and [[normalMap]] are expected to be identical. If a property is defined in both\n * [[patternMap]]] and [[normalMap]], the value in [[patternMap]] takes precedence.\n */\n public normalMap?: NormalMapProps & {\n /** A factor by which to multiply the components of the normal vectors read from the texture.\n * Default: 1.\n */\n scale?: number;\n };\n\n /** Construct a new RenderMaterial.Params object with the specified paletteName. Alter the public members on that object to specify settings. */\n public constructor(paletteName: string) {\n this.paletteName = paletteName;\n }\n }\n}\n\n/** Parameters used to create a [[RenderMaterial]] element.\n * The persistent JSON representation - [RenderMaterialAssetProps]($common) - is quite verbose and unwieldy. This representation simplifies it somewhat.\n * @see [[RenderMaterialElement.create]] and [[RenderMaterialElement.insert]] to create a [[RenderMaterial]] from parameters of this type.\n * @public\n */\nexport interface RenderMaterialElementParams extends RenderMaterialElement.Params { // eslint-disable-line @typescript-eslint/no-deprecated, @typescript-eslint/no-empty-object-type\n}\n"]}
1
+ {"version":3,"file":"Material.js","sourceRoot":"","sources":["../../src/Material.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;G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;;WAIG;QACI,SAAS,CAKd;QAEF,gJAAgJ;QAChJ,YAAmB,WAAmB;YACpC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QACjC,CAAC;KACF;IAhDY,4BAAM,SAgDlB,CAAA;AACH,CAAC,EAvDgB,qBAAqB,KAArB,qBAAqB,QAuDrC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Elements\r\n */\r\n\r\nimport { Id64, Id64String, JsonUtils } from \"@itwin/core-bentley\";\r\nimport {\r\n BisCodeSpec, Code, CodeScopeProps, CodeSpec, DefinitionElementProps, ElementProps, NormalMapProps, RenderMaterialAssetMapsProps, RenderMaterialProps, RgbFactorProps, TextureMapProps,\r\n} from \"@itwin/core-common\";\r\nimport { DefinitionElement } from \"./Element\";\r\nimport { EditTxn } from \"./EditTxn\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\r\nimport { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow } from \"./Entity\";\r\nimport { _implicitTxn } from \"./internal/Symbols\";\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n\r\n/** A PhysicalMaterial defines the matter that makes up physical elements.\r\n * @note See [[RenderMaterialElement]] for the DefinitionElement used to define rendering characteristics.\r\n * @public\r\n */\r\nexport abstract class PhysicalMaterial extends DefinitionElement {\r\n public static override get className(): string { return \"PhysicalMaterial\"; }\r\n /** Create a Code for a PhysicalMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\r\n * @param name The name (codeValue) of the PhysicalMaterial\r\n */\r\n public static createCode(iModel: IModelDb, definitionModelId: CodeScopeProps, name: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.physicalMaterial);\r\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: name });\r\n }\r\n /** Create a PhysicalMaterial\r\n * @param iModelDb The IModelDb\r\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\r\n * @param name The name (codeValue) of the PhysicalMaterial\r\n * @returns The newly constructed PhysicalMaterial\r\n * @throws [[IModelError]] if there is a problem creating the PhysicalMaterial\r\n */\r\n public static create<T extends PhysicalMaterial>(iModelDb: IModelDb, definitionModelId: CodeScopeProps, name: string): T {\r\n const elementProps: DefinitionElementProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n };\r\n return iModelDb.elements.createElement(elementProps);\r\n }\r\n}\r\n\r\n/** Defines a rendering material.\r\n * @note See [[PhysicalMaterial]] for the DefinitionElement used to define the matter that makes up physical elements.\r\n * @public\r\n */\r\nexport class RenderMaterialElement extends DefinitionElement {\r\n public static override get className(): string { return \"RenderMaterial\"; }\r\n\r\n /** The name of a palette that can be used to categorize multiple materials. */\r\n public paletteName: string;\r\n /** An optional description of the material. */\r\n public description?: string;\r\n\r\n private constructor(props: RenderMaterialProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.paletteName = props.paletteName;\r\n this.description = props.description;\r\n }\r\n\r\n public override toJSON(): RenderMaterialProps {\r\n const val = super.toJSON() as RenderMaterialProps;\r\n val.paletteName = this.paletteName;\r\n val.description = this.description;\r\n return val;\r\n }\r\n\r\n /**\r\n * RenderMaterialElement custom HandledProps includes 'paletteName'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"paletteName\", source: \"Class\" },\r\n ];\r\n\r\n /**\r\n * RenderMaterialElement deserializes 'paletteName'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): RenderMaterialProps {\r\n const elProps = super.deserialize(props) as RenderMaterialProps;\r\n const instance = props.row;\r\n elProps.paletteName = JsonUtils.asString(instance.paletteName);\r\n return elProps;\r\n }\r\n\r\n /**\r\n * RenderMaterialElement serializes 'paletteName'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override serialize(props: RenderMaterialProps, iModel: IModelDb): ECSqlRow {\r\n const inst = super.serialize(props, iModel);\r\n inst.paletteName = props.paletteName;\r\n return inst;\r\n }\r\n\r\n /** Create a Code for a RenderMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the RenderMaterial and provides the scope for its name.\r\n * @param name The RenderMaterial name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, name: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.renderMaterial);\r\n return 0 === name.length ? Code.createEmpty() : new Code({ spec: codeSpec.id, scope: scopeModelId, value: name });\r\n }\r\n /**\r\n * Create a RenderMaterial with given parameters.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param materialName The name/CodeValue of the RenderMaterial\r\n * @param params Parameters object which describes how to construct the RenderMaterial\r\n * @returns The newly constructed RenderMaterial element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): RenderMaterialElement {\r\n let maps: RenderMaterialAssetMapsProps | undefined;\r\n const pbr_normal = params.normalMap?.scale;\r\n if (params.patternMap || params.normalMap) {\r\n // If both normal and pattern map are present, their texture mapping modes, angles, scales, etc are expected to match.\r\n type TexMap = Omit<TextureMapProps, \"TextureId\">;\r\n function choose<K extends keyof TexMap>(obj: TexMap, key: K): void {\r\n const pat = params.patternMap;\r\n if (pat && undefined !== pat[key])\r\n obj[key] = pat[key];\r\n else if (params.normalMap && undefined !== params.normalMap[key])\r\n obj[key] = params.normalMap[key];\r\n }\r\n\r\n const baseProps: TexMap = {};\r\n choose(baseProps, \"pattern_angle\");\r\n choose(baseProps, \"pattern_u_flip\");\r\n choose(baseProps, \"pattern_flip\");\r\n choose(baseProps, \"pattern_scale\");\r\n choose(baseProps, \"pattern_offset\");\r\n choose(baseProps, \"pattern_scalemode\");\r\n choose(baseProps, \"pattern_mapping\");\r\n choose(baseProps, \"pattern_weight\");\r\n choose(baseProps, \"pattern_useconstantlod\");\r\n choose(baseProps, \"pattern_constantlod_repetitions\");\r\n choose(baseProps, \"pattern_constantlod_offset\");\r\n choose(baseProps, \"pattern_constantlod_mindistanceclamp\");\r\n choose(baseProps, \"pattern_constantlod_maxdistanceclamp\");\r\n\r\n maps = {};\r\n if (params.patternMap)\r\n maps.Pattern = { ...params.patternMap, ...baseProps };\r\n\r\n if (params.normalMap) {\r\n maps.Normal = {\r\n ...params.normalMap,\r\n ...baseProps,\r\n };\r\n\r\n delete (maps.Normal as any).scale;\r\n }\r\n }\r\n\r\n const renderMaterialProps: RenderMaterialProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, materialName),\r\n paletteName: params.paletteName,\r\n description: params.description,\r\n jsonProperties: {\r\n materialAssets: {\r\n renderMaterial: {\r\n HasBaseColor: params.color !== undefined,\r\n color: params.color,\r\n HasSpecularColor: params.specularColor !== undefined,\r\n specular_color: params.specularColor,\r\n HasFinish: params.finish !== undefined,\r\n finish: params.finish,\r\n HasTransmit: params.transmit !== undefined ? true : undefined,\r\n transmit: params.transmit,\r\n HasDiffuse: params.diffuse !== undefined,\r\n diffuse: params.diffuse,\r\n HasSpecular: params.specular !== undefined,\r\n specular: params.specular,\r\n HasReflect: params.reflect !== undefined,\r\n reflect: params.reflect,\r\n HasReflectColor: params.reflectColor !== undefined,\r\n reflect_color: params.reflectColor,\r\n Map: maps,\r\n pbr_normal,\r\n },\r\n },\r\n },\r\n model: definitionModelId,\r\n isPrivate: false,\r\n };\r\n\r\n return new RenderMaterialElement(renderMaterialProps, iModelDb);\r\n }\r\n\r\n /**\r\n * Insert a new RenderMaterial into a model.\r\n * @param txn The EditTxn to use\r\n * @param definitionModelId Insert the new Texture into this DefinitionModel\r\n * @param materialName The name/CodeValue of the RenderMaterial\r\n * @param params Parameters object which describes how to construct the RenderMaterial\r\n * @returns The Id of the newly inserted RenderMaterial element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n * @beta\r\n */\r\n public static insert(txn: EditTxn, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): Id64String;\r\n /**\r\n * Insert a new RenderMaterial into a model.\r\n * @deprecated Use RenderMaterialElement.insert(txn, ...) instead.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): Id64String;\r\n public static insert(txnOrDb: EditTxn | IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): Id64String {\r\n const txn = txnOrDb instanceof EditTxn ? txnOrDb : txnOrDb[_implicitTxn];\r\n const renderMaterial = this.create(txn.iModel, definitionModelId, materialName, params);\r\n return renderMaterial.insert(txn);\r\n }\r\n\r\n /** @beta */\r\n protected static override async onCloned(context: IModelElementCloneContext, sourceProps: ElementProps, targetProps: ElementProps) {\r\n await super.onCloned(context, sourceProps, targetProps);\r\n for (const mapName in sourceProps.jsonProperties?.materialAssets?.renderMaterial?.Map ?? {}) {\r\n if (typeof mapName !== \"string\")\r\n continue;\r\n const sourceMap = sourceProps.jsonProperties.materialAssets.renderMaterial.Map[mapName];\r\n // sourceMap could be null/undefined, keep it the same in targetProps\r\n if (!sourceMap) {\r\n targetProps.jsonProperties.materialAssets.renderMaterial.Map[mapName] = sourceMap;\r\n continue;\r\n }\r\n if (!Id64.isValid(sourceMap.TextureId) || sourceMap.TextureId === undefined)\r\n continue;\r\n targetProps.jsonProperties.materialAssets.renderMaterial.Map[mapName].TextureId = context.findTargetElementId(sourceMap.TextureId ?? Id64.invalid);\r\n }\r\n }\r\n}\r\n\r\n/** @public */\r\nexport namespace RenderMaterialElement {\r\n /** Parameters used to construct a [[RenderMaterial]].\r\n * The persistent JSON representation - [RenderMaterialAssetProps]($common) - is quite verbose and unwieldy. This representation simplifies it somewhat.\r\n * @see [[RenderMaterialElement.create]] and [[RenderMaterialElement.insert]] to create a [[RenderMaterial]] from parameters of this type.\r\n * @deprecated in 3.6 - might be removed in next major version. Because it is not useful to use a `class` - just use [[RenderMaterialElementParams]] directly instead.\r\n */\r\n export class Params {\r\n /** A required palette name that categorizes this RenderMaterial */\r\n public paletteName: string;\r\n /** An optional description of this RenderMaterial */\r\n public description?: string;\r\n /** If defined, the color to use for surface fill or diffuse illumination, overriding the surface's own color. */\r\n public color?: RgbFactorProps;\r\n /** The color to use for specular illumination. Default: black. */\r\n public specularColor?: RgbFactorProps;\r\n /** The specular exponent describing the surface's shininess, in the range 0 through 128.\r\n * Default: 0.\r\n */\r\n public finish?: number;\r\n /** A transparency to be applied to the surface, ranging from 0 (fully opaque) to 1 (fully transparent).\r\n * If defined, then the material transparency overrides the transparency of whatever surface the material is applied to.\r\n * If undefined, the material has no effect on surface transparency.\r\n * Default: undefined.\r\n */\r\n public transmit?: number;\r\n /** The surface's diffuse reflectivity from 0.0 to 1.0. Default: 0.6. */\r\n public diffuse?: number;\r\n /** The surface's specular reflectivity from 0.0 to 1.0. Default: 0.0. */\r\n public specular?: number;\r\n /** Currently unused. */\r\n public reflect?: number;\r\n /** Currently unused. */\r\n public reflectColor?: number[];\r\n /** Specifies a texture image to map onto the surface, replacing or mixing with the surface's own color and transparency.\r\n * @note With the exception of `TextureId`, the [TextureMapProps]($common) of [[patternMap]] and [[normalMap]] are expected to be identical. If a property is defined in both\r\n * [[patternMap]]] and [[normalMap]], the value in [[patternMap]] takes precedence.\r\n */\r\n public patternMap?: TextureMapProps;\r\n /** Specifies a [normal map](https://en.wikipedia.org/wiki/Normal_mapping) to apply to the surface to simulate more surface detail than is present in the\r\n * surface's geometry.\r\n * @note With the exception of `TextureId`, the [TextureMapProps]($common) of [[patternMap]] and [[normalMap]] are expected to be identical. If a property is defined in both\r\n * [[patternMap]]] and [[normalMap]], the value in [[patternMap]] takes precedence.\r\n */\r\n public normalMap?: NormalMapProps & {\r\n /** A factor by which to multiply the components of the normal vectors read from the texture.\r\n * Default: 1.\r\n */\r\n scale?: number;\r\n };\r\n\r\n /** Construct a new RenderMaterial.Params object with the specified paletteName. Alter the public members on that object to specify settings. */\r\n public constructor(paletteName: string) {\r\n this.paletteName = paletteName;\r\n }\r\n }\r\n}\r\n\r\n/** Parameters used to create a [[RenderMaterial]] element.\r\n * The persistent JSON representation - [RenderMaterialAssetProps]($common) - is quite verbose and unwieldy. This representation simplifies it somewhat.\r\n * @see [[RenderMaterialElement.create]] and [[RenderMaterialElement.insert]] to create a [[RenderMaterial]] from parameters of this type.\r\n * @public\r\n */\r\nexport interface RenderMaterialElementParams extends RenderMaterialElement.Params { // eslint-disable-line @typescript-eslint/no-deprecated, @typescript-eslint/no-empty-object-type\r\n}\r\n"]}
@@ -5,6 +5,7 @@ import { GuidString, Id64String } from "@itwin/core-bentley";
5
5
  import { Point2d } from "@itwin/core-geometry";
6
6
  import { AxisAlignedBox3d, ElementProps, EntityReferenceSet, GeometricModel2dProps, GeometricModel3dProps, GeometricModelProps, ModelProps, RelatedElement } from "@itwin/core-common";
7
7
  import { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow, Entity } from "./Entity";
8
+ import { EditTxn } from "./EditTxn";
8
9
  import { IModelDb } from "./IModelDb";
9
10
  /** Argument for the `Model.onXxx` static methods
10
11
  * @beta
@@ -165,11 +166,35 @@ export declare class Model extends Entity {
165
166
  removeUserProperties(nameSpace: string): void;
166
167
  getJsonProperty(name: string): any;
167
168
  setJsonProperty(name: string, value: any): void;
168
- /** Insert this Model in the iModel */
169
- insert(): string;
170
- /** Update this Model in the iModel. */
169
+ /**
170
+ * Insert this Model in the iModel using the supplied EditTxn.
171
+ * @beta
172
+ */
173
+ insert(txn: EditTxn): Id64String;
174
+ /**
175
+ * Insert this Model in the iModel.
176
+ * @deprecated Use Model.insert(txn) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
177
+ */
178
+ insert(): Id64String;
179
+ /**
180
+ * Update this Model in the iModel using the supplied EditTxn.
181
+ * @beta
182
+ */
183
+ update(txn: EditTxn): void;
184
+ /**
185
+ * Update this Model in the iModel.
186
+ * @deprecated Use Model.update(txn) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
187
+ */
171
188
  update(): void;
172
- /** Delete this Model from the iModel. */
189
+ /**
190
+ * Delete this Model from the iModel using the supplied EditTxn.
191
+ * @beta
192
+ */
193
+ delete(txn: EditTxn): void;
194
+ /**
195
+ * Delete this Model from the iModel.
196
+ * @deprecated Use Model.delete(txn) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
197
+ */
173
198
  delete(): void;
174
199
  protected collectReferenceIds(referenceIds: EntityReferenceSet): void;
175
200
  }
@@ -259,14 +284,17 @@ export declare abstract class SpatialModel extends GeometricModel3d {
259
284
  */
260
285
  export declare class PhysicalModel extends SpatialModel {
261
286
  static get className(): string;
262
- /** Insert a PhysicalPartition and a PhysicalModel that sub-models it.
263
- * @param iModelDb Insert into this iModel
287
+ /** Insert a PhysicalPartition and a PhysicalModel that sub-models it using an explicit transaction.
288
+ * @param txn The EditTxn used to perform inserts.
264
289
  * @param parentSubjectId The PhysicalPartition will be inserted as a child of this Subject element.
265
290
  * @param name The name of the PhysicalPartition that the new PhysicalModel will sub-model.
266
291
  * @param isPlanProjection Optional value (default is false) that indicates if the contents of this model are expected to be in an XY plane.
267
292
  * @returns The Id of the newly inserted PhysicalPartition and PhysicalModel (same value).
268
293
  * @throws [[IModelError]] if there is an insert problem.
294
+ * @beta
269
295
  */
296
+ static insert(txn: EditTxn, parentSubjectId: Id64String, name: string, isPlanProjection?: boolean): Id64String;
297
+ /** @deprecated Use PhysicalModel.insert(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help. */
270
298
  static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, isPlanProjection?: boolean): Id64String;
271
299
  }
272
300
  /** A container for persisting spatial location elements.
@@ -275,14 +303,17 @@ export declare class PhysicalModel extends SpatialModel {
275
303
  */
276
304
  export declare class SpatialLocationModel extends SpatialModel {
277
305
  static get className(): string;
278
- /** Insert a SpatialLocationPartition and a SpatialLocationModel that sub-models it.
279
- * @param iModelDb Insert into this iModel
306
+ /** Insert a SpatialLocationPartition and a SpatialLocationModel that sub-models it using an explicit transaction.
307
+ * @param txn The EditTxn used to perform inserts.
280
308
  * @param parentSubjectId The SpatialLocationPartition will be inserted as a child of this Subject element.
281
309
  * @param name The name of the SpatialLocationPartition that the new SpatialLocationModel will sub-model.
282
310
  * @param isPlanProjection Optional value (default is false) that indicates if the contents of this model are expected to be in an XY plane.
283
311
  * @returns The Id of the newly inserted SpatialLocationPartition and SpatialLocationModel (same value).
284
312
  * @throws [[IModelError]] if there is an insert problem.
313
+ * @beta
285
314
  */
315
+ static insert(txn: EditTxn, parentSubjectId: Id64String, name: string, isPlanProjection?: boolean): Id64String;
316
+ /** @deprecated Use SpatialLocationModel.insert(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help. */
286
317
  static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, isPlanProjection?: boolean): Id64String;
287
318
  }
288
319
  /** A 2d model that holds [[DrawingGraphic]]s. DrawingModels may be dimensional or non-dimensional.
@@ -329,13 +360,15 @@ export declare abstract class GroupInformationModel extends InformationModel {
329
360
  */
330
361
  export declare class SheetIndexModel extends InformationModel {
331
362
  static get className(): string;
332
- /** Insert a SheetIndex and a SheetIndexModel that sub-models it.
333
- * @param iModelDb Insert into this iModel
334
- * @param parentSubjectId The SheetIndex will be inserted as a child of this Subject element.
335
- * @param name The name of the SheetIndex that the new SheetIndexModel will sub-model.
336
- * @returns The Id of the newly inserted SheetIndexModel.
337
- * @throws [[IModelError]] if there is an insert problem.
338
- */
363
+ /** Insert a [[SheetIndexPartition]] and a SheetIndexModel that sub-models it.
364
+ * @param txn The active EditTxn.
365
+ * @param parentSubjectId The SheetIndexPartition will be inserted as a child of this Subject element.
366
+ * @param name The name of the SheetIndexPartition that the new SheetIndexModel will sub-model.
367
+ * @returns The Id of the newly inserted SheetIndexModel.
368
+ * @throws [[IModelError]] if there is an insert problem.
369
+ */
370
+ static insert(txn: EditTxn, parentSubjectId: Id64String, name: string): Id64String;
371
+ /** @deprecated Use SheetIndexModel.insert(txn, ...) instead. */
339
372
  static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String;
340
373
  }
341
374
  /** A container for persisting Information Record Elements
@@ -344,13 +377,15 @@ export declare class SheetIndexModel extends InformationModel {
344
377
  */
345
378
  export declare class InformationRecordModel extends InformationModel {
346
379
  static get className(): string;
347
- /** Insert a InformationRecordPartition and a InformationRecordModel that sub-models it.
348
- * @param iModelDb Insert into this iModel
380
+ /** Insert an InformationRecordPartition and an InformationRecordModel that sub-models it using an explicit transaction.
381
+ * @param txn The EditTxn used to perform inserts.
349
382
  * @param parentSubjectId The InformationRecordPartition will be inserted as a child of this Subject element.
350
383
  * @param name The name of the InformationRecordPartition that the new InformationRecordModel will sub-model.
351
384
  * @returns The Id of the newly inserted InformationRecordModel.
352
385
  * @throws [[IModelError]] if there is an insert problem.
386
+ * @beta
353
387
  */
388
+ static insert(txn: EditTxn, parentSubjectId: Id64String, name: string): Id64String;
354
389
  static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String;
355
390
  }
356
391
  /** A container for persisting definition elements.
@@ -360,12 +395,14 @@ export declare class InformationRecordModel extends InformationModel {
360
395
  export declare class DefinitionModel extends InformationModel {
361
396
  static get className(): string;
362
397
  /** Insert a DefinitionPartition and a DefinitionModel that sub-models it.
363
- * @param iModelDb Insert into this iModel
398
+ * @param txn The active EditTxn.
364
399
  * @param parentSubjectId The DefinitionPartition will be inserted as a child of this Subject element.
365
400
  * @param name The name of the DefinitionPartition that the new DefinitionModel will sub-model.
366
401
  * @returns The Id of the newly inserted DefinitionModel.
367
402
  * @throws [[IModelError]] if there is an insert problem.
403
+ * @beta
368
404
  */
405
+ static insert(txn: EditTxn, parentSubjectId: Id64String, name: string): Id64String;
369
406
  static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String;
370
407
  }
371
408
  /** The singleton container of repository-related information elements.
@@ -380,13 +417,15 @@ export declare class RepositoryModel extends DefinitionModel {
380
417
  */
381
418
  export declare class DocumentListModel extends InformationModel {
382
419
  static get className(): string;
383
- /** Insert a DocumentPartition and a DocumentListModel that sub-models it.
384
- * @param iModelDb Insert into this iModel
420
+ /** Insert a [[DocumentPartition]] and a DocumentListModel that sub-models it.
421
+ * @param txn The active EditTxn.
385
422
  * @param parentSubjectId The DocumentPartition will be inserted as a child of this Subject element.
386
423
  * @param name The name of the DocumentPartition that the new DocumentListModel will sub-model.
387
424
  * @returns The Id of the newly inserted DocumentPartition and DocumentListModel (same value)
388
425
  * @throws [[IModelError]] if there is an insert problem.
426
+ * @beta
389
427
  */
428
+ static insert(txn: EditTxn, parentSubjectId: Id64String, name: string): Id64String;
390
429
  static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String;
391
430
  }
392
431
  /** A container for persisting link elements.
@@ -1 +1 @@
1
- {"version":3,"file":"Model.d.ts","sourceRoot":"","sources":["../../src/Model.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAa,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,OAAO,EAAW,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,gBAAgB,EAAE,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,mBAAmB,EACnF,UAAU,EAAE,cAAc,EAC7D,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,qBAAqB,EAAE,qBAAq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,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU;WAC3E,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU;CAchG;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,eAAe;IAClD,WAA2B,SAAS,IAAI,MAAM,CAA8B;CAC7E;AAED;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,gBAAgB;IACrD,WAA2B,SAAS,IAAI,MAAM,CAAgC;IAE9E;;;;;;;OAOG;WACW,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU;WAC3E,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU;CAchG;AAED;;;GAGG;AACH,qBAAa,SAAU,SAAQ,gBAAgB;IAC7C,WAA2B,SAAS,IAAI,MAAM,CAAwB;CACvE;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,eAAe;IAClD,WAA2B,SAAS,IAAI,MAAM,CAA8B;CAC7E;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,WAA2B,SAAS,IAAI,MAAM,CAA+B;CAC9E"}
package/lib/esm/Model.js CHANGED
@@ -11,8 +11,9 @@ import { Point2d, Range3d } from "@itwin/core-geometry";
11
11
  import { IModel, RelatedElement, } from "@itwin/core-common";
12
12
  import { DefinitionPartition, DocumentPartition, InformationRecordPartition, PhysicalPartition, SheetIndexPartition, SpatialLocationPartition } from "./Element";
13
13
  import { Entity } from "./Entity";
14
+ import { EditTxn } from "./EditTxn";
14
15
  import { SubjectOwnsPartitionElements } from "./NavigationRelationship";
15
- import { _cache, _nativeDb, _verifyChannel } from "./internal/Symbols";
16
+ import { _cache, _implicitTxn, _nativeDb, _verifyChannel } from "./internal/Symbols";
16
17
  /** A Model is a container for persisting a collection of related elements within an iModel.
17
18
  * See [[IModelDb.Models]] for how to query and manage the Models in an IModelDb.
18
19
  * See [Creating models]($docs/learning/backend/CreateModels.md)
@@ -202,12 +203,9 @@ export class Model extends Entity {
202
203
  removeUserProperties(nameSpace) { delete this.getAllUserProperties()[nameSpace]; }
203
204
  getJsonProperty(name) { return this.jsonProperties[name]; }
204
205
  setJsonProperty(name, value) { this.jsonProperties[name] = value; }
205
- /** Insert this Model in the iModel */
206
- insert() { return this.id = this.iModel.models.insertModel(this.toJSON()); }
207
- /** Update this Model in the iModel. */
208
- update() { this.iModel.models.updateModel(this.toJSON()); }
209
- /** Delete this Model from the iModel. */
210
- delete() { this.iModel.models.deleteModel(this.id); }
206
+ insert(txn) { return this.id = (txn ?? this.iModel[_implicitTxn]).insertModel(this.toJSON()); }
207
+ update(txn) { (txn ?? this.iModel[_implicitTxn]).updateModel(this.toJSON()); }
208
+ delete(txn) { (txn ?? this.iModel[_implicitTxn]).deleteModel(this.id); }
211
209
  collectReferenceIds(referenceIds) {
212
210
  super.collectReferenceIds(referenceIds);
213
211
  if (this.parentModel)
@@ -344,28 +342,22 @@ export class SpatialModel extends GeometricModel3d {
344
342
  */
345
343
  export class PhysicalModel extends SpatialModel {
346
344
  static get className() { return "PhysicalModel"; }
347
- /** Insert a PhysicalPartition and a PhysicalModel that sub-models it.
348
- * @param iModelDb Insert into this iModel
349
- * @param parentSubjectId The PhysicalPartition will be inserted as a child of this Subject element.
350
- * @param name The name of the PhysicalPartition that the new PhysicalModel will sub-model.
351
- * @param isPlanProjection Optional value (default is false) that indicates if the contents of this model are expected to be in an XY plane.
352
- * @returns The Id of the newly inserted PhysicalPartition and PhysicalModel (same value).
353
- * @throws [[IModelError]] if there is an insert problem.
354
- */
355
- static insert(iModelDb, parentSubjectId, name, isPlanProjection) {
345
+ static insert(txnOrDb, parentSubjectId, name, isPlanProjection) {
346
+ const txn = txnOrDb instanceof EditTxn ? txnOrDb : txnOrDb[_implicitTxn];
347
+ const iModelDb = txn.iModel;
356
348
  const partitionProps = {
357
349
  classFullName: PhysicalPartition.classFullName,
358
350
  model: IModel.repositoryModelId,
359
351
  parent: new SubjectOwnsPartitionElements(parentSubjectId),
360
352
  code: PhysicalPartition.createCode(iModelDb, parentSubjectId, name),
361
353
  };
362
- const partitionId = iModelDb.elements.insertElement(partitionProps);
354
+ const partitionId = txn.insertElement(partitionProps);
363
355
  const modelProps = {
364
356
  classFullName: this.classFullName,
365
357
  modeledElement: { id: partitionId },
366
358
  isPlanProjection,
367
359
  };
368
- return iModelDb.models.insertModel(modelProps);
360
+ return txn.insertModel(modelProps);
369
361
  }
370
362
  }
371
363
  /** A container for persisting spatial location elements.
@@ -374,28 +366,22 @@ export class PhysicalModel extends SpatialModel {
374
366
  */
375
367
  export class SpatialLocationModel extends SpatialModel {
376
368
  static get className() { return "SpatialLocationModel"; }
377
- /** Insert a SpatialLocationPartition and a SpatialLocationModel that sub-models it.
378
- * @param iModelDb Insert into this iModel
379
- * @param parentSubjectId The SpatialLocationPartition will be inserted as a child of this Subject element.
380
- * @param name The name of the SpatialLocationPartition that the new SpatialLocationModel will sub-model.
381
- * @param isPlanProjection Optional value (default is false) that indicates if the contents of this model are expected to be in an XY plane.
382
- * @returns The Id of the newly inserted SpatialLocationPartition and SpatialLocationModel (same value).
383
- * @throws [[IModelError]] if there is an insert problem.
384
- */
385
- static insert(iModelDb, parentSubjectId, name, isPlanProjection) {
369
+ static insert(txnOrDb, parentSubjectId, name, isPlanProjection) {
370
+ const txn = txnOrDb instanceof EditTxn ? txnOrDb : txnOrDb[_implicitTxn];
371
+ const iModelDb = txn.iModel;
386
372
  const partitionProps = {
387
373
  classFullName: SpatialLocationPartition.classFullName,
388
374
  model: IModel.repositoryModelId,
389
375
  parent: new SubjectOwnsPartitionElements(parentSubjectId),
390
376
  code: SpatialLocationPartition.createCode(iModelDb, parentSubjectId, name),
391
377
  };
392
- const partitionId = iModelDb.elements.insertElement(partitionProps);
378
+ const partitionId = txn.insertElement(partitionProps);
393
379
  const modelProps = {
394
380
  classFullName: this.classFullName,
395
381
  modeledElement: { id: partitionId },
396
382
  isPlanProjection,
397
383
  };
398
- return iModelDb.models.insertModel(modelProps);
384
+ return txn.insertModel(modelProps);
399
385
  }
400
386
  }
401
387
  /** A 2d model that holds [[DrawingGraphic]]s. DrawingModels may be dimensional or non-dimensional.
@@ -442,22 +428,15 @@ export class GroupInformationModel extends InformationModel {
442
428
  */
443
429
  export class SheetIndexModel extends InformationModel {
444
430
  static get className() { return "SheetIndexModel"; }
445
- /** Insert a SheetIndex and a SheetIndexModel that sub-models it.
446
- * @param iModelDb Insert into this iModel
447
- * @param parentSubjectId The SheetIndex will be inserted as a child of this Subject element.
448
- * @param name The name of the SheetIndex that the new SheetIndexModel will sub-model.
449
- * @returns The Id of the newly inserted SheetIndexModel.
450
- * @throws [[IModelError]] if there is an insert problem.
451
- */
452
- static insert(iModelDb, parentSubjectId, name) {
453
- const sheetIndex = {
431
+ static insert(txnOrDb, parentSubjectId, name) {
432
+ const txn = txnOrDb instanceof EditTxn ? txnOrDb : txnOrDb[_implicitTxn];
433
+ const partitionId = txn.insertElement({
454
434
  classFullName: SheetIndexPartition.classFullName,
455
435
  model: IModel.repositoryModelId,
456
436
  parent: new SubjectOwnsPartitionElements(parentSubjectId),
457
- code: SheetIndexPartition.createCode(iModelDb, parentSubjectId, name),
458
- };
459
- const partitionId = iModelDb.elements.insertElement(sheetIndex);
460
- return iModelDb.models.insertModel({
437
+ code: SheetIndexPartition.createCode(txn.iModel, parentSubjectId, name),
438
+ });
439
+ return txn.insertModel({
461
440
  classFullName: this.classFullName,
462
441
  modeledElement: { id: partitionId },
463
442
  });
@@ -469,22 +448,15 @@ export class SheetIndexModel extends InformationModel {
469
448
  */
470
449
  export class InformationRecordModel extends InformationModel {
471
450
  static get className() { return "InformationRecordModel"; }
472
- /** Insert a InformationRecordPartition and a InformationRecordModel that sub-models it.
473
- * @param iModelDb Insert into this iModel
474
- * @param parentSubjectId The InformationRecordPartition will be inserted as a child of this Subject element.
475
- * @param name The name of the InformationRecordPartition that the new InformationRecordModel will sub-model.
476
- * @returns The Id of the newly inserted InformationRecordModel.
477
- * @throws [[IModelError]] if there is an insert problem.
478
- */
479
- static insert(iModelDb, parentSubjectId, name) {
480
- const partitionProps = {
451
+ static insert(txnOrDb, parentSubjectId, name) {
452
+ const txn = txnOrDb instanceof EditTxn ? txnOrDb : txnOrDb[_implicitTxn];
453
+ const partitionId = txn.insertElement({
481
454
  classFullName: InformationRecordPartition.classFullName,
482
455
  model: IModel.repositoryModelId,
483
456
  parent: new SubjectOwnsPartitionElements(parentSubjectId),
484
- code: InformationRecordPartition.createCode(iModelDb, parentSubjectId, name),
485
- };
486
- const partitionId = iModelDb.elements.insertElement(partitionProps);
487
- return iModelDb.models.insertModel({
457
+ code: InformationRecordPartition.createCode(txn.iModel, parentSubjectId, name),
458
+ });
459
+ return txn.insertModel({
488
460
  classFullName: this.classFullName,
489
461
  modeledElement: { id: partitionId },
490
462
  });
@@ -496,22 +468,15 @@ export class InformationRecordModel extends InformationModel {
496
468
  */
497
469
  export class DefinitionModel extends InformationModel {
498
470
  static get className() { return "DefinitionModel"; }
499
- /** Insert a DefinitionPartition and a DefinitionModel that sub-models it.
500
- * @param iModelDb Insert into this iModel
501
- * @param parentSubjectId The DefinitionPartition will be inserted as a child of this Subject element.
502
- * @param name The name of the DefinitionPartition that the new DefinitionModel will sub-model.
503
- * @returns The Id of the newly inserted DefinitionModel.
504
- * @throws [[IModelError]] if there is an insert problem.
505
- */
506
- static insert(iModelDb, parentSubjectId, name) {
507
- const partitionProps = {
471
+ static insert(txnOrDb, parentSubjectId, name) {
472
+ const txn = txnOrDb instanceof EditTxn ? txnOrDb : txnOrDb[_implicitTxn];
473
+ const partitionId = txn.insertElement({
508
474
  classFullName: DefinitionPartition.classFullName,
509
475
  model: IModel.repositoryModelId,
510
476
  parent: new SubjectOwnsPartitionElements(parentSubjectId),
511
- code: DefinitionPartition.createCode(iModelDb, parentSubjectId, name),
512
- };
513
- const partitionId = iModelDb.elements.insertElement(partitionProps);
514
- return iModelDb.models.insertModel({
477
+ code: DefinitionPartition.createCode(txn.iModel, parentSubjectId, name),
478
+ });
479
+ return txn.insertModel({
515
480
  classFullName: this.classFullName,
516
481
  modeledElement: { id: partitionId },
517
482
  });
@@ -529,22 +494,15 @@ export class RepositoryModel extends DefinitionModel {
529
494
  */
530
495
  export class DocumentListModel extends InformationModel {
531
496
  static get className() { return "DocumentListModel"; }
532
- /** Insert a DocumentPartition and a DocumentListModel that sub-models it.
533
- * @param iModelDb Insert into this iModel
534
- * @param parentSubjectId The DocumentPartition will be inserted as a child of this Subject element.
535
- * @param name The name of the DocumentPartition that the new DocumentListModel will sub-model.
536
- * @returns The Id of the newly inserted DocumentPartition and DocumentListModel (same value)
537
- * @throws [[IModelError]] if there is an insert problem.
538
- */
539
- static insert(iModelDb, parentSubjectId, name) {
540
- const partitionProps = {
497
+ static insert(txnOrDb, parentSubjectId, name) {
498
+ const txn = txnOrDb instanceof EditTxn ? txnOrDb : txnOrDb[_implicitTxn];
499
+ const partitionId = txn.insertElement({
541
500
  classFullName: DocumentPartition.classFullName,
542
501
  model: IModel.repositoryModelId,
543
502
  parent: new SubjectOwnsPartitionElements(parentSubjectId),
544
- code: DocumentPartition.createCode(iModelDb, parentSubjectId, name),
545
- };
546
- const partitionId = iModelDb.elements.insertElement(partitionProps);
547
- return iModelDb.models.insertModel({
503
+ code: DocumentPartition.createCode(txn.iModel, parentSubjectId, name),
504
+ });
505
+ return txn.insertModel({
548
506
  classFullName: this.classFullName,
549
507
  modeledElement: { id: partitionId },
550
508
  });