@itwin/core-backend 5.0.0-dev.9 → 5.0.0-dev.92

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 (1059) hide show
  1. package/CHANGELOG.md +60 -1
  2. package/lib/cjs/BackendHubAccess.d.ts +14 -28
  3. package/lib/cjs/BackendHubAccess.d.ts.map +1 -1
  4. package/lib/cjs/BackendHubAccess.js +2 -0
  5. package/lib/cjs/BackendHubAccess.js.map +1 -1
  6. package/lib/cjs/BackendLoggerCategory.js.map +1 -1
  7. package/lib/cjs/BisCoreSchema.d.ts.map +1 -1
  8. package/lib/cjs/BisCoreSchema.js +2 -0
  9. package/lib/cjs/BisCoreSchema.js.map +1 -1
  10. package/lib/cjs/BlobContainerService.d.ts +4 -4
  11. package/lib/cjs/BlobContainerService.d.ts.map +1 -1
  12. package/lib/cjs/BlobContainerService.js.map +1 -1
  13. package/lib/cjs/BriefcaseManager.d.ts +10 -0
  14. package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
  15. package/lib/cjs/BriefcaseManager.js +63 -20
  16. package/lib/cjs/BriefcaseManager.js.map +1 -1
  17. package/lib/cjs/Category.js +6 -1
  18. package/lib/cjs/Category.js.map +1 -1
  19. package/lib/cjs/ChangeSummaryManager.d.ts.map +1 -1
  20. package/lib/cjs/ChangeSummaryManager.js +92 -24
  21. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  22. package/lib/cjs/ChangedElementsDb.d.ts +3 -3
  23. package/lib/cjs/ChangedElementsDb.d.ts.map +1 -1
  24. package/lib/cjs/ChangedElementsDb.js +8 -7
  25. package/lib/cjs/ChangedElementsDb.js.map +1 -1
  26. package/lib/cjs/ChangesetECAdaptor.d.ts +3 -3
  27. package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
  28. package/lib/cjs/ChangesetECAdaptor.js +273 -261
  29. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  30. package/lib/cjs/ChannelControl.js.map +1 -1
  31. package/lib/cjs/CheckpointManager.d.ts.map +1 -1
  32. package/lib/cjs/CheckpointManager.js +15 -12
  33. package/lib/cjs/CheckpointManager.js.map +1 -1
  34. package/lib/cjs/ClassRegistry.d.ts +46 -2
  35. package/lib/cjs/ClassRegistry.d.ts.map +1 -1
  36. package/lib/cjs/ClassRegistry.js +98 -42
  37. package/lib/cjs/ClassRegistry.js.map +1 -1
  38. package/lib/cjs/CloudSqlite.d.ts +2 -1
  39. package/lib/cjs/CloudSqlite.d.ts.map +1 -1
  40. package/lib/cjs/CloudSqlite.js +15 -8
  41. package/lib/cjs/CloudSqlite.js.map +1 -1
  42. package/lib/cjs/CodeService.d.ts +2 -0
  43. package/lib/cjs/CodeService.d.ts.map +1 -1
  44. package/lib/cjs/CodeService.js +4 -0
  45. package/lib/cjs/CodeService.js.map +1 -1
  46. package/lib/cjs/CodeSpecs.js +3 -2
  47. package/lib/cjs/CodeSpecs.js.map +1 -1
  48. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  49. package/lib/cjs/CustomViewState3dCreator.js +7 -6
  50. package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
  51. package/lib/cjs/DevTools.js +16 -16
  52. package/lib/cjs/DevTools.js.map +1 -1
  53. package/lib/cjs/DisplayStyle.js +2 -0
  54. package/lib/cjs/DisplayStyle.js.map +1 -1
  55. package/lib/cjs/ECDb.d.ts +16 -59
  56. package/lib/cjs/ECDb.d.ts.map +1 -1
  57. package/lib/cjs/ECDb.js +34 -73
  58. package/lib/cjs/ECDb.js.map +1 -1
  59. package/lib/cjs/ECSchemaXmlContext.js +1 -0
  60. package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
  61. package/lib/cjs/ECSqlStatement.d.ts +4 -2
  62. package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
  63. package/lib/cjs/ECSqlStatement.js +13 -4
  64. package/lib/cjs/ECSqlStatement.js.map +1 -1
  65. package/lib/cjs/Element.d.ts +14 -23
  66. package/lib/cjs/Element.d.ts.map +1 -1
  67. package/lib/cjs/Element.js +133 -46
  68. package/lib/cjs/Element.js.map +1 -1
  69. package/lib/cjs/ElementAspect.d.ts +0 -5
  70. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  71. package/lib/cjs/ElementAspect.js +24 -16
  72. package/lib/cjs/ElementAspect.js.map +1 -1
  73. package/lib/cjs/ElementGraphics.js.map +1 -1
  74. package/lib/cjs/ElementTreeWalker.js +13 -12
  75. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  76. package/lib/cjs/Entity.d.ts +46 -10
  77. package/lib/cjs/Entity.d.ts.map +1 -1
  78. package/lib/cjs/Entity.js +79 -16
  79. package/lib/cjs/Entity.js.map +1 -1
  80. package/lib/cjs/EntityReferences.js.map +1 -1
  81. package/lib/cjs/ExportGraphics.js +4 -0
  82. package/lib/cjs/ExportGraphics.js.map +1 -1
  83. package/lib/cjs/ExternalSource.js +22 -0
  84. package/lib/cjs/ExternalSource.js.map +1 -1
  85. package/lib/cjs/FontFile.d.ts +68 -0
  86. package/lib/cjs/FontFile.d.ts.map +1 -0
  87. package/lib/cjs/FontFile.js +36 -0
  88. package/lib/cjs/FontFile.js.map +1 -0
  89. package/lib/cjs/GeoCoordConfig.js +8 -8
  90. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  91. package/lib/cjs/GeographicCRSServices.js.map +1 -1
  92. package/lib/cjs/GeometrySummary.js +53 -50
  93. package/lib/cjs/GeometrySummary.js.map +1 -1
  94. package/lib/cjs/HubMock.d.ts +4 -4
  95. package/lib/cjs/HubMock.d.ts.map +1 -1
  96. package/lib/cjs/HubMock.js +9 -6
  97. package/lib/cjs/HubMock.js.map +1 -1
  98. package/lib/cjs/IModelDb.d.ts +203 -72
  99. package/lib/cjs/IModelDb.d.ts.map +1 -1
  100. package/lib/cjs/IModelDb.js +338 -168
  101. package/lib/cjs/IModelDb.js.map +1 -1
  102. package/lib/cjs/IModelDbFonts.d.ts +54 -0
  103. package/lib/cjs/IModelDbFonts.d.ts.map +1 -0
  104. package/lib/cjs/{IModelCloneContext.js → IModelDbFonts.js} +2 -7
  105. package/lib/cjs/IModelDbFonts.js.map +1 -0
  106. package/lib/cjs/IModelElementCloneContext.d.ts +2 -0
  107. package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
  108. package/lib/cjs/IModelElementCloneContext.js +12 -1
  109. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  110. package/lib/cjs/IModelHost.d.ts +14 -14
  111. package/lib/cjs/IModelHost.d.ts.map +1 -1
  112. package/lib/cjs/IModelHost.js +75 -42
  113. package/lib/cjs/IModelHost.js.map +1 -1
  114. package/lib/cjs/IModelJsFs.d.ts.map +1 -1
  115. package/lib/cjs/IModelJsFs.js +17 -1
  116. package/lib/cjs/IModelJsFs.js.map +1 -1
  117. package/lib/cjs/ImageSourceConversion.d.ts +49 -0
  118. package/lib/cjs/ImageSourceConversion.d.ts.map +1 -0
  119. package/lib/cjs/ImageSourceConversion.js +37 -0
  120. package/lib/cjs/ImageSourceConversion.js.map +1 -0
  121. package/lib/cjs/IpcHost.d.ts.map +1 -1
  122. package/lib/cjs/IpcHost.js +17 -12
  123. package/lib/cjs/IpcHost.js.map +1 -1
  124. package/lib/cjs/LineStyle.js.map +1 -1
  125. package/lib/cjs/LocalHub.js +9 -3
  126. package/lib/cjs/LocalHub.js.map +1 -1
  127. package/lib/cjs/LocalhostIpcHost.js +5 -6
  128. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  129. package/lib/cjs/LockControl.js.map +1 -1
  130. package/lib/cjs/Material.js +40 -0
  131. package/lib/cjs/Material.js.map +1 -1
  132. package/lib/cjs/Model.d.ts +1 -1
  133. package/lib/cjs/Model.d.ts.map +1 -1
  134. package/lib/cjs/Model.js +27 -2
  135. package/lib/cjs/Model.js.map +1 -1
  136. package/lib/cjs/NativeAppStorage.js +5 -3
  137. package/lib/cjs/NativeAppStorage.js.map +1 -1
  138. package/lib/cjs/NativeHost.js +6 -3
  139. package/lib/cjs/NativeHost.js.map +1 -1
  140. package/lib/cjs/NavigationRelationship.js +25 -25
  141. package/lib/cjs/NavigationRelationship.js.map +1 -1
  142. package/lib/cjs/PromiseMemoizer.d.ts +2 -3
  143. package/lib/cjs/PromiseMemoizer.d.ts.map +1 -1
  144. package/lib/cjs/PromiseMemoizer.js +12 -5
  145. package/lib/cjs/PromiseMemoizer.js.map +1 -1
  146. package/lib/cjs/PropertyStore.js +1 -4
  147. package/lib/cjs/PropertyStore.js.map +1 -1
  148. package/lib/cjs/Relationship.d.ts.map +1 -1
  149. package/lib/cjs/Relationship.js +13 -1
  150. package/lib/cjs/Relationship.js.map +1 -1
  151. package/lib/cjs/RpcBackend.js.map +1 -1
  152. package/lib/cjs/SQLiteDb.d.ts +6 -4
  153. package/lib/cjs/SQLiteDb.d.ts.map +1 -1
  154. package/lib/cjs/SQLiteDb.js +74 -15
  155. package/lib/cjs/SQLiteDb.js.map +1 -1
  156. package/lib/cjs/Schema.d.ts +25 -1
  157. package/lib/cjs/Schema.d.ts.map +1 -1
  158. package/lib/cjs/Schema.js +44 -8
  159. package/lib/cjs/Schema.js.map +1 -1
  160. package/lib/cjs/SchemaSync.js +1 -4
  161. package/lib/cjs/SchemaSync.js.map +1 -1
  162. package/lib/cjs/SchemaUtils.js.map +1 -1
  163. package/lib/cjs/SheetIndex.js +6 -0
  164. package/lib/cjs/SheetIndex.js.map +1 -1
  165. package/lib/cjs/SqliteChangesetReader.d.ts +11 -3
  166. package/lib/cjs/SqliteChangesetReader.d.ts.map +1 -1
  167. package/lib/cjs/SqliteChangesetReader.js +21 -5
  168. package/lib/cjs/SqliteChangesetReader.js.map +1 -1
  169. package/lib/cjs/SqliteStatement.d.ts +4 -2
  170. package/lib/cjs/SqliteStatement.d.ts.map +1 -1
  171. package/lib/cjs/SqliteStatement.js +13 -1
  172. package/lib/cjs/SqliteStatement.js.map +1 -1
  173. package/lib/cjs/TextAnnotationElement.js.map +1 -1
  174. package/lib/cjs/TextAnnotationGeometry.d.ts.map +1 -1
  175. package/lib/cjs/TextAnnotationGeometry.js +38 -11
  176. package/lib/cjs/TextAnnotationGeometry.js.map +1 -1
  177. package/lib/cjs/TextAnnotationLayout.d.ts +10 -3
  178. package/lib/cjs/TextAnnotationLayout.d.ts.map +1 -1
  179. package/lib/cjs/TextAnnotationLayout.js +56 -18
  180. package/lib/cjs/TextAnnotationLayout.js.map +1 -1
  181. package/lib/cjs/Texture.js +3 -0
  182. package/lib/cjs/Texture.js.map +1 -1
  183. package/lib/cjs/TileStorage.js +6 -1
  184. package/lib/cjs/TileStorage.js.map +1 -1
  185. package/lib/cjs/TxnManager.d.ts +55 -4
  186. package/lib/cjs/TxnManager.d.ts.map +1 -1
  187. package/lib/cjs/TxnManager.js +234 -58
  188. package/lib/cjs/TxnManager.js.map +1 -1
  189. package/lib/cjs/ViewDefinition.d.ts +6 -6
  190. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  191. package/lib/cjs/ViewDefinition.js +81 -26
  192. package/lib/cjs/ViewDefinition.js.map +1 -1
  193. package/lib/cjs/ViewStateHydrator.d.ts +0 -1
  194. package/lib/cjs/ViewStateHydrator.d.ts.map +1 -1
  195. package/lib/cjs/ViewStateHydrator.js +1 -11
  196. package/lib/cjs/ViewStateHydrator.js.map +1 -1
  197. package/lib/cjs/ViewStore.js +3 -1
  198. package/lib/cjs/ViewStore.js.map +1 -1
  199. package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
  200. package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +32 -32
  201. package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +27 -27
  202. package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +94 -94
  203. package/lib/cjs/assets/Settings/backend.setting.json5 +21 -21
  204. package/lib/cjs/core-backend.d.ts +7 -1
  205. package/lib/cjs/core-backend.d.ts.map +1 -1
  206. package/lib/cjs/core-backend.js +7 -1
  207. package/lib/cjs/core-backend.js.map +1 -1
  208. package/lib/cjs/domains/FunctionalElements.js +1 -1
  209. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  210. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  211. package/lib/cjs/domains/GenericElements.js.map +1 -1
  212. package/lib/cjs/domains/GenericSchema.js.map +1 -1
  213. package/lib/cjs/internal/ChangesetConflictArgs.d.ts +40 -2
  214. package/lib/cjs/internal/ChangesetConflictArgs.d.ts.map +1 -1
  215. package/lib/cjs/internal/ChangesetConflictArgs.js +101 -0
  216. package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -1
  217. package/lib/cjs/internal/ChannelAdmin.d.ts +1 -1
  218. package/lib/cjs/internal/ChannelAdmin.d.ts.map +1 -1
  219. package/lib/cjs/internal/ChannelAdmin.js +25 -16
  220. package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
  221. package/lib/cjs/internal/FontFileImpl.d.ts +34 -0
  222. package/lib/cjs/internal/FontFileImpl.d.ts.map +1 -0
  223. package/lib/cjs/internal/FontFileImpl.js +143 -0
  224. package/lib/cjs/internal/FontFileImpl.js.map +1 -0
  225. package/lib/cjs/internal/IModelDbFontsImpl.d.ts +7 -0
  226. package/lib/cjs/internal/IModelDbFontsImpl.d.ts.map +1 -0
  227. package/lib/cjs/internal/IModelDbFontsImpl.js +186 -0
  228. package/lib/cjs/internal/IModelDbFontsImpl.js.map +1 -0
  229. package/lib/cjs/internal/NativePlatform.js.map +1 -1
  230. package/lib/cjs/internal/NoLocks.js +2 -5
  231. package/lib/cjs/internal/NoLocks.js.map +1 -1
  232. package/lib/cjs/internal/ServerBasedLocks.d.ts.map +1 -1
  233. package/lib/cjs/internal/ServerBasedLocks.js +6 -6
  234. package/lib/cjs/internal/ServerBasedLocks.js.map +1 -1
  235. package/lib/cjs/internal/Symbols.d.ts +7 -0
  236. package/lib/cjs/internal/Symbols.d.ts.map +1 -1
  237. package/lib/cjs/internal/Symbols.js +8 -1
  238. package/lib/cjs/internal/Symbols.js.map +1 -1
  239. package/lib/cjs/internal/cross-package.js.map +1 -1
  240. package/lib/cjs/internal/workspace/SettingsImpl.js +6 -9
  241. package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
  242. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js +8 -12
  243. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  244. package/lib/cjs/internal/workspace/WorkspaceImpl.js +22 -17
  245. package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
  246. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js +1 -4
  247. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  248. package/lib/cjs/rpc/multipart.d.ts.map +1 -1
  249. package/lib/cjs/rpc/multipart.js +2 -1
  250. package/lib/cjs/rpc/multipart.js.map +1 -1
  251. package/lib/cjs/rpc/tracing.js +2 -2
  252. package/lib/cjs/rpc/tracing.js.map +1 -1
  253. package/lib/cjs/rpc/web/logging.js.map +1 -1
  254. package/lib/cjs/rpc/web/request.d.ts.map +1 -1
  255. package/lib/cjs/rpc/web/request.js +2 -1
  256. package/lib/cjs/rpc/web/request.js.map +1 -1
  257. package/lib/cjs/rpc/web/response.js.map +1 -1
  258. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  259. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts.map +1 -1
  260. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +5 -2
  261. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  262. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js +5 -3
  263. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  264. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -1
  265. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js +4 -3
  266. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  267. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  268. package/lib/cjs/workspace/Settings.js.map +1 -1
  269. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  270. package/lib/cjs/workspace/Workspace.js.map +1 -1
  271. package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
  272. package/lib/esm/BackendHubAccess.d.ts +215 -0
  273. package/lib/esm/BackendHubAccess.d.ts.map +1 -0
  274. package/lib/esm/BackendHubAccess.js +41 -0
  275. package/lib/esm/BackendHubAccess.js.map +1 -0
  276. package/lib/esm/BackendLoggerCategory.d.ts +88 -0
  277. package/lib/esm/BackendLoggerCategory.d.ts.map +1 -0
  278. package/lib/esm/BackendLoggerCategory.js +93 -0
  279. package/lib/esm/BackendLoggerCategory.js.map +1 -0
  280. package/lib/esm/BisCoreSchema.d.ts +22 -0
  281. package/lib/esm/BisCoreSchema.d.ts.map +1 -0
  282. package/lib/esm/BisCoreSchema.js +61 -0
  283. package/lib/esm/BisCoreSchema.js.map +1 -0
  284. package/lib/esm/BlobContainerService.d.ts +159 -0
  285. package/lib/esm/BlobContainerService.d.ts.map +1 -0
  286. package/lib/esm/BlobContainerService.js +15 -0
  287. package/lib/esm/BlobContainerService.js.map +1 -0
  288. package/lib/esm/BriefcaseManager.d.ts +213 -0
  289. package/lib/esm/BriefcaseManager.d.ts.map +1 -0
  290. package/lib/esm/BriefcaseManager.js +520 -0
  291. package/lib/esm/BriefcaseManager.js.map +1 -0
  292. package/lib/esm/Category.d.ts +136 -0
  293. package/lib/esm/Category.d.ts.map +1 -0
  294. package/lib/esm/Category.js +224 -0
  295. package/lib/esm/Category.js.map +1 -0
  296. package/lib/esm/ChangeSummaryManager.d.ts +161 -0
  297. package/lib/esm/ChangeSummaryManager.d.ts.map +1 -0
  298. package/lib/esm/ChangeSummaryManager.js +414 -0
  299. package/lib/esm/ChangeSummaryManager.js.map +1 -0
  300. package/lib/esm/ChangedElementsDb.d.ts +101 -0
  301. package/lib/esm/ChangedElementsDb.d.ts.map +1 -0
  302. package/lib/esm/ChangedElementsDb.js +165 -0
  303. package/lib/esm/ChangedElementsDb.js.map +1 -0
  304. package/lib/esm/ChangesetECAdaptor.d.ts +203 -0
  305. package/lib/esm/ChangesetECAdaptor.d.ts.map +1 -0
  306. package/lib/esm/ChangesetECAdaptor.js +814 -0
  307. package/lib/esm/ChangesetECAdaptor.js.map +1 -0
  308. package/lib/esm/ChannelControl.d.ts +68 -0
  309. package/lib/esm/ChannelControl.d.ts.map +1 -0
  310. package/lib/esm/ChannelControl.js +15 -0
  311. package/lib/esm/ChannelControl.js.map +1 -0
  312. package/lib/esm/CheckpointManager.d.ts +123 -0
  313. package/lib/esm/CheckpointManager.d.ts.map +1 -0
  314. package/lib/esm/CheckpointManager.js +375 -0
  315. package/lib/esm/CheckpointManager.js.map +1 -0
  316. package/lib/esm/ClassRegistry.d.ts +134 -0
  317. package/lib/esm/ClassRegistry.d.ts.map +1 -0
  318. package/lib/esm/ClassRegistry.js +324 -0
  319. package/lib/esm/ClassRegistry.js.map +1 -0
  320. package/lib/esm/CloudSqlite.d.ts +682 -0
  321. package/lib/esm/CloudSqlite.d.ts.map +1 -0
  322. package/lib/esm/CloudSqlite.js +511 -0
  323. package/lib/esm/CloudSqlite.js.map +1 -0
  324. package/lib/esm/CodeService.d.ts +402 -0
  325. package/lib/esm/CodeService.d.ts.map +1 -0
  326. package/lib/esm/CodeService.js +65 -0
  327. package/lib/esm/CodeService.js.map +1 -0
  328. package/lib/esm/CodeSpecs.d.ts +59 -0
  329. package/lib/esm/CodeSpecs.d.ts.map +1 -0
  330. package/lib/esm/CodeSpecs.js +152 -0
  331. package/lib/esm/CodeSpecs.js.map +1 -0
  332. package/lib/esm/ConcurrentQuery.d.ts +14 -0
  333. package/lib/esm/ConcurrentQuery.d.ts.map +1 -0
  334. package/lib/esm/ConcurrentQuery.js +33 -0
  335. package/lib/esm/ConcurrentQuery.js.map +1 -0
  336. package/lib/esm/CustomViewState3dCreator.d.ts +22 -0
  337. package/lib/esm/CustomViewState3dCreator.d.ts.map +1 -0
  338. package/lib/esm/CustomViewState3dCreator.js +78 -0
  339. package/lib/esm/CustomViewState3dCreator.js.map +1 -0
  340. package/lib/esm/DevTools.d.ts +73 -0
  341. package/lib/esm/DevTools.d.ts.map +1 -0
  342. package/lib/esm/DevTools.js +153 -0
  343. package/lib/esm/DevTools.js.map +1 -0
  344. package/lib/esm/DisplayStyle.d.ts +99 -0
  345. package/lib/esm/DisplayStyle.d.ts.map +1 -0
  346. package/lib/esm/DisplayStyle.js +264 -0
  347. package/lib/esm/DisplayStyle.js.map +1 -0
  348. package/lib/esm/ECDb.d.ts +170 -0
  349. package/lib/esm/ECDb.d.ts.map +1 -0
  350. package/lib/esm/ECDb.js +329 -0
  351. package/lib/esm/ECDb.js.map +1 -0
  352. package/lib/esm/ECSchemaXmlContext.d.ts +46 -0
  353. package/lib/esm/ECSchemaXmlContext.d.ts.map +1 -0
  354. package/lib/esm/ECSchemaXmlContext.js +66 -0
  355. package/lib/esm/ECSchemaXmlContext.js.map +1 -0
  356. package/lib/esm/ECSqlStatement.d.ts +492 -0
  357. package/lib/esm/ECSqlStatement.d.ts.map +1 -0
  358. package/lib/esm/ECSqlStatement.js +810 -0
  359. package/lib/esm/ECSqlStatement.js.map +1 -0
  360. package/lib/esm/Element.d.ts +987 -0
  361. package/lib/esm/Element.d.ts.map +1 -0
  362. package/lib/esm/Element.js +1337 -0
  363. package/lib/esm/Element.js.map +1 -0
  364. package/lib/esm/ElementAspect.d.ts +164 -0
  365. package/lib/esm/ElementAspect.d.ts.map +1 -0
  366. package/lib/esm/ElementAspect.js +204 -0
  367. package/lib/esm/ElementAspect.js.map +1 -0
  368. package/lib/esm/ElementGraphics.d.ts +7 -0
  369. package/lib/esm/ElementGraphics.d.ts.map +1 -0
  370. package/lib/esm/ElementGraphics.js +36 -0
  371. package/lib/esm/ElementGraphics.js.map +1 -0
  372. package/lib/esm/ElementTreeWalker.d.ts +182 -0
  373. package/lib/esm/ElementTreeWalker.d.ts.map +1 -0
  374. package/lib/esm/ElementTreeWalker.js +421 -0
  375. package/lib/esm/ElementTreeWalker.js.map +1 -0
  376. package/lib/esm/Entity.d.ts +142 -0
  377. package/lib/esm/Entity.d.ts.map +1 -0
  378. package/lib/esm/Entity.js +186 -0
  379. package/lib/esm/Entity.js.map +1 -0
  380. package/lib/esm/EntityReferences.d.ts +50 -0
  381. package/lib/esm/EntityReferences.d.ts.map +1 -0
  382. package/lib/esm/EntityReferences.js +92 -0
  383. package/lib/esm/EntityReferences.js.map +1 -0
  384. package/lib/esm/ExportGraphics.d.ts +318 -0
  385. package/lib/esm/ExportGraphics.d.ts.map +1 -0
  386. package/lib/esm/ExportGraphics.js +209 -0
  387. package/lib/esm/ExportGraphics.js.map +1 -0
  388. package/lib/esm/ExternalSource.d.ts +89 -0
  389. package/lib/esm/ExternalSource.d.ts.map +1 -0
  390. package/lib/esm/ExternalSource.js +139 -0
  391. package/lib/esm/ExternalSource.js.map +1 -0
  392. package/lib/esm/FontFile.d.ts +68 -0
  393. package/lib/esm/FontFile.d.ts.map +1 -0
  394. package/lib/esm/FontFile.js +33 -0
  395. package/lib/esm/FontFile.js.map +1 -0
  396. package/lib/esm/GeoCoordConfig.d.ts +30 -0
  397. package/lib/esm/GeoCoordConfig.d.ts.map +1 -0
  398. package/lib/esm/GeoCoordConfig.js +78 -0
  399. package/lib/esm/GeoCoordConfig.js.map +1 -0
  400. package/lib/esm/GeographicCRSServices.d.ts +40 -0
  401. package/lib/esm/GeographicCRSServices.d.ts.map +1 -0
  402. package/lib/esm/GeographicCRSServices.js +17 -0
  403. package/lib/esm/GeographicCRSServices.js.map +1 -0
  404. package/lib/esm/GeometrySummary.d.ts +5 -0
  405. package/lib/esm/GeometrySummary.d.ts.map +1 -0
  406. package/lib/esm/GeometrySummary.js +381 -0
  407. package/lib/esm/GeometrySummary.js.map +1 -0
  408. package/lib/esm/HubMock.d.ts +95 -0
  409. package/lib/esm/HubMock.d.ts.map +1 -0
  410. package/lib/esm/HubMock.js +220 -0
  411. package/lib/esm/HubMock.js.map +1 -0
  412. package/lib/esm/IModelDb.d.ts +1398 -0
  413. package/lib/esm/IModelDb.d.ts.map +1 -0
  414. package/lib/esm/IModelDb.js +3230 -0
  415. package/lib/esm/IModelDb.js.map +1 -0
  416. package/lib/esm/IModelDbFonts.d.ts +54 -0
  417. package/lib/esm/IModelDbFonts.d.ts.map +1 -0
  418. package/lib/esm/IModelDbFonts.js +9 -0
  419. package/lib/esm/IModelDbFonts.js.map +1 -0
  420. package/lib/esm/IModelElementCloneContext.d.ts +92 -0
  421. package/lib/esm/IModelElementCloneContext.d.ts.map +1 -0
  422. package/lib/esm/IModelElementCloneContext.js +168 -0
  423. package/lib/esm/IModelElementCloneContext.js.map +1 -0
  424. package/lib/esm/IModelHost.d.ts +387 -0
  425. package/lib/esm/IModelHost.d.ts.map +1 -0
  426. package/lib/esm/IModelHost.js +502 -0
  427. package/lib/esm/IModelHost.js.map +1 -0
  428. package/lib/esm/IModelJsFs.d.ts +62 -0
  429. package/lib/esm/IModelJsFs.d.ts.map +1 -0
  430. package/lib/esm/IModelJsFs.js +151 -0
  431. package/lib/esm/IModelJsFs.js.map +1 -0
  432. package/lib/esm/ImageSourceConversion.d.ts +49 -0
  433. package/lib/esm/ImageSourceConversion.d.ts.map +1 -0
  434. package/lib/esm/ImageSourceConversion.js +33 -0
  435. package/lib/esm/ImageSourceConversion.js.map +1 -0
  436. package/lib/esm/IpcHost.d.ts +111 -0
  437. package/lib/esm/IpcHost.d.ts.map +1 -0
  438. package/lib/esm/IpcHost.js +311 -0
  439. package/lib/esm/IpcHost.js.map +1 -0
  440. package/lib/esm/LineStyle.d.ts +312 -0
  441. package/lib/esm/LineStyle.d.ts.map +1 -0
  442. package/lib/esm/LineStyle.js +293 -0
  443. package/lib/esm/LineStyle.js.map +1 -0
  444. package/lib/esm/LocalHub.d.ts +163 -0
  445. package/lib/esm/LocalHub.d.ts.map +1 -0
  446. package/lib/esm/LocalHub.js +583 -0
  447. package/lib/esm/LocalHub.js.map +1 -0
  448. package/lib/esm/LocalhostIpcHost.d.ts +22 -0
  449. package/lib/esm/LocalhostIpcHost.d.ts.map +1 -0
  450. package/lib/esm/LocalhostIpcHost.js +74 -0
  451. package/lib/esm/LocalhostIpcHost.js.map +1 -0
  452. package/lib/esm/LockControl.d.ts +73 -0
  453. package/lib/esm/LockControl.d.ts.map +1 -0
  454. package/lib/esm/LockControl.js +9 -0
  455. package/lib/esm/LockControl.js.map +1 -0
  456. package/lib/esm/Material.d.ts +131 -0
  457. package/lib/esm/Material.d.ts.map +1 -0
  458. package/lib/esm/Material.js +235 -0
  459. package/lib/esm/Material.js.map +1 -0
  460. package/lib/esm/Model.d.ts +375 -0
  461. package/lib/esm/Model.d.ts.map +1 -0
  462. package/lib/esm/Model.js +484 -0
  463. package/lib/esm/Model.js.map +1 -0
  464. package/lib/esm/NativeAppStorage.d.ts +52 -0
  465. package/lib/esm/NativeAppStorage.d.ts.map +1 -0
  466. package/lib/esm/NativeAppStorage.js +205 -0
  467. package/lib/esm/NativeAppStorage.js.map +1 -0
  468. package/lib/esm/NativeHost.d.ts +53 -0
  469. package/lib/esm/NativeHost.d.ts.map +1 -0
  470. package/lib/esm/NativeHost.js +158 -0
  471. package/lib/esm/NativeHost.js.map +1 -0
  472. package/lib/esm/NavigationRelationship.d.ts +185 -0
  473. package/lib/esm/NavigationRelationship.d.ts.map +1 -0
  474. package/lib/esm/NavigationRelationship.js +238 -0
  475. package/lib/esm/NavigationRelationship.js.map +1 -0
  476. package/lib/esm/PromiseMemoizer.d.ts +48 -0
  477. package/lib/esm/PromiseMemoizer.d.ts.map +1 -0
  478. package/lib/esm/PromiseMemoizer.js +101 -0
  479. package/lib/esm/PromiseMemoizer.js.map +1 -0
  480. package/lib/esm/PropertyStore.d.ts +134 -0
  481. package/lib/esm/PropertyStore.d.ts.map +1 -0
  482. package/lib/esm/PropertyStore.js +177 -0
  483. package/lib/esm/PropertyStore.js.map +1 -0
  484. package/lib/esm/Relationship.d.ts +399 -0
  485. package/lib/esm/Relationship.d.ts.map +1 -0
  486. package/lib/esm/Relationship.js +474 -0
  487. package/lib/esm/Relationship.js.map +1 -0
  488. package/lib/esm/RpcBackend.d.ts +6 -0
  489. package/lib/esm/RpcBackend.d.ts.map +1 -0
  490. package/lib/esm/RpcBackend.js +28 -0
  491. package/lib/esm/RpcBackend.js.map +1 -0
  492. package/lib/esm/SQLiteDb.d.ts +324 -0
  493. package/lib/esm/SQLiteDb.d.ts.map +1 -0
  494. package/lib/esm/SQLiteDb.js +379 -0
  495. package/lib/esm/SQLiteDb.js.map +1 -0
  496. package/lib/esm/Schema.d.ts +79 -0
  497. package/lib/esm/Schema.d.ts.map +1 -0
  498. package/lib/esm/Schema.js +113 -0
  499. package/lib/esm/Schema.js.map +1 -0
  500. package/lib/esm/SchemaSync.d.ts +47 -0
  501. package/lib/esm/SchemaSync.d.ts.map +1 -0
  502. package/lib/esm/SchemaSync.js +148 -0
  503. package/lib/esm/SchemaSync.js.map +1 -0
  504. package/lib/esm/SchemaUtils.d.ts +19 -0
  505. package/lib/esm/SchemaUtils.d.ts.map +1 -0
  506. package/lib/esm/SchemaUtils.js +37 -0
  507. package/lib/esm/SchemaUtils.js.map +1 -0
  508. package/lib/esm/SheetIndex.d.ts +148 -0
  509. package/lib/esm/SheetIndex.d.ts.map +1 -0
  510. package/lib/esm/SheetIndex.js +228 -0
  511. package/lib/esm/SheetIndex.js.map +1 -0
  512. package/lib/esm/SqliteChangesetReader.d.ts +278 -0
  513. package/lib/esm/SqliteChangesetReader.d.ts.map +1 -0
  514. package/lib/esm/SqliteChangesetReader.js +337 -0
  515. package/lib/esm/SqliteChangesetReader.js.map +1 -0
  516. package/lib/esm/SqliteStatement.d.ts +375 -0
  517. package/lib/esm/SqliteStatement.d.ts.map +1 -0
  518. package/lib/esm/SqliteStatement.js +615 -0
  519. package/lib/esm/SqliteStatement.js.map +1 -0
  520. package/lib/esm/TextAnnotationElement.d.ts +54 -0
  521. package/lib/esm/TextAnnotationElement.d.ts.map +1 -0
  522. package/lib/esm/TextAnnotationElement.js +89 -0
  523. package/lib/esm/TextAnnotationElement.js.map +1 -0
  524. package/lib/esm/TextAnnotationGeometry.d.ts +32 -0
  525. package/lib/esm/TextAnnotationGeometry.d.ts.map +1 -0
  526. package/lib/esm/TextAnnotationGeometry.js +181 -0
  527. package/lib/esm/TextAnnotationGeometry.js.map +1 -0
  528. package/lib/esm/TextAnnotationLayout.d.ts +177 -0
  529. package/lib/esm/TextAnnotationLayout.d.ts.map +1 -0
  530. package/lib/esm/TextAnnotationLayout.js +513 -0
  531. package/lib/esm/TextAnnotationLayout.js.map +1 -0
  532. package/lib/esm/Texture.d.ts +58 -0
  533. package/lib/esm/Texture.d.ts.map +1 -0
  534. package/lib/esm/Texture.js +81 -0
  535. package/lib/esm/Texture.js.map +1 -0
  536. package/lib/esm/TileStorage.d.ts +59 -0
  537. package/lib/esm/TileStorage.d.ts.map +1 -0
  538. package/lib/esm/TileStorage.js +158 -0
  539. package/lib/esm/TileStorage.js.map +1 -0
  540. package/lib/esm/TxnManager.d.ts +296 -0
  541. package/lib/esm/TxnManager.d.ts.map +1 -0
  542. package/lib/esm/TxnManager.js +619 -0
  543. package/lib/esm/TxnManager.js.map +1 -0
  544. package/lib/esm/ViewDefinition.d.ts +392 -0
  545. package/lib/esm/ViewDefinition.d.ts.map +1 -0
  546. package/lib/esm/ViewDefinition.js +638 -0
  547. package/lib/esm/ViewDefinition.js.map +1 -0
  548. package/lib/esm/ViewStateHydrator.d.ts +14 -0
  549. package/lib/esm/ViewStateHydrator.d.ts.map +1 -0
  550. package/lib/esm/ViewStateHydrator.js +89 -0
  551. package/lib/esm/ViewStateHydrator.js.map +1 -0
  552. package/lib/esm/ViewStore.d.ts +502 -0
  553. package/lib/esm/ViewStore.d.ts.map +1 -0
  554. package/lib/esm/ViewStore.js +1259 -0
  555. package/lib/esm/ViewStore.js.map +1 -0
  556. package/lib/esm/core-backend.d.ts +183 -0
  557. package/lib/esm/core-backend.d.ts.map +1 -0
  558. package/lib/esm/core-backend.js +187 -0
  559. package/lib/esm/core-backend.js.map +1 -0
  560. package/lib/esm/domains/FunctionalElements.d.ts +86 -0
  561. package/lib/esm/domains/FunctionalElements.d.ts.map +1 -0
  562. package/lib/esm/domains/FunctionalElements.js +117 -0
  563. package/lib/esm/domains/FunctionalElements.js.map +1 -0
  564. package/lib/esm/domains/FunctionalSchema.d.ts +14 -0
  565. package/lib/esm/domains/FunctionalSchema.d.ts.map +1 -0
  566. package/lib/esm/domains/FunctionalSchema.js +37 -0
  567. package/lib/esm/domains/FunctionalSchema.js.map +1 -0
  568. package/lib/esm/domains/GenericElements.d.ts +160 -0
  569. package/lib/esm/domains/GenericElements.d.ts.map +1 -0
  570. package/lib/esm/domains/GenericElements.js +225 -0
  571. package/lib/esm/domains/GenericElements.js.map +1 -0
  572. package/lib/esm/domains/GenericSchema.d.ts +11 -0
  573. package/lib/esm/domains/GenericSchema.d.ts.map +1 -0
  574. package/lib/esm/domains/GenericSchema.js +25 -0
  575. package/lib/esm/domains/GenericSchema.js.map +1 -0
  576. package/lib/esm/internal/ChangesetConflictArgs.d.ts +62 -0
  577. package/lib/esm/internal/ChangesetConflictArgs.d.ts.map +1 -0
  578. package/lib/esm/internal/ChangesetConflictArgs.js +104 -0
  579. package/lib/esm/internal/ChangesetConflictArgs.js.map +1 -0
  580. package/lib/esm/internal/ChannelAdmin.d.ts +34 -0
  581. package/lib/esm/internal/ChannelAdmin.d.ts.map +1 -0
  582. package/lib/esm/internal/ChannelAdmin.js +122 -0
  583. package/lib/esm/internal/ChannelAdmin.js.map +1 -0
  584. package/lib/esm/internal/FontFileImpl.d.ts +34 -0
  585. package/lib/esm/internal/FontFileImpl.d.ts.map +1 -0
  586. package/lib/esm/internal/FontFileImpl.js +135 -0
  587. package/lib/esm/internal/FontFileImpl.js.map +1 -0
  588. package/lib/esm/internal/IModelDbFontsImpl.d.ts +7 -0
  589. package/lib/esm/internal/IModelDbFontsImpl.d.ts.map +1 -0
  590. package/lib/esm/internal/IModelDbFontsImpl.js +183 -0
  591. package/lib/esm/internal/IModelDbFontsImpl.js.map +1 -0
  592. package/lib/esm/internal/NativePlatform.d.ts +15 -0
  593. package/lib/esm/internal/NativePlatform.d.ts.map +1 -0
  594. package/lib/esm/internal/NativePlatform.js +43 -0
  595. package/lib/esm/internal/NativePlatform.js.map +1 -0
  596. package/lib/esm/internal/NoLocks.d.ts +6 -0
  597. package/lib/esm/internal/NoLocks.d.ts.map +1 -0
  598. package/lib/esm/internal/NoLocks.js +24 -0
  599. package/lib/esm/internal/NoLocks.js.map +1 -0
  600. package/lib/esm/internal/ServerBasedLocks.d.ts +52 -0
  601. package/lib/esm/internal/ServerBasedLocks.d.ts.map +1 -0
  602. package/lib/esm/internal/ServerBasedLocks.js +175 -0
  603. package/lib/esm/internal/ServerBasedLocks.js.map +1 -0
  604. package/lib/esm/internal/Symbols.d.ts +18 -0
  605. package/lib/esm/internal/Symbols.d.ts.map +1 -0
  606. package/lib/esm/internal/Symbols.js +25 -0
  607. package/lib/esm/internal/Symbols.js.map +1 -0
  608. package/lib/esm/internal/cross-package.d.ts +4 -0
  609. package/lib/esm/internal/cross-package.d.ts.map +1 -0
  610. package/lib/esm/internal/cross-package.js +8 -0
  611. package/lib/esm/internal/cross-package.js.map +1 -0
  612. package/lib/esm/internal/workspace/SettingsImpl.d.ts +43 -0
  613. package/lib/esm/internal/workspace/SettingsImpl.d.ts.map +1 -0
  614. package/lib/esm/internal/workspace/SettingsImpl.js +154 -0
  615. package/lib/esm/internal/workspace/SettingsImpl.js.map +1 -0
  616. package/lib/esm/internal/workspace/SettingsSchemasImpl.d.ts +6 -0
  617. package/lib/esm/internal/workspace/SettingsSchemasImpl.d.ts.map +1 -0
  618. package/lib/esm/internal/workspace/SettingsSchemasImpl.js +268 -0
  619. package/lib/esm/internal/workspace/SettingsSchemasImpl.js.map +1 -0
  620. package/lib/esm/internal/workspace/WorkspaceImpl.d.ts +41 -0
  621. package/lib/esm/internal/workspace/WorkspaceImpl.d.ts.map +1 -0
  622. package/lib/esm/internal/workspace/WorkspaceImpl.js +691 -0
  623. package/lib/esm/internal/workspace/WorkspaceImpl.js.map +1 -0
  624. package/lib/esm/internal/workspace/WorkspaceSqliteDb.d.ts +10 -0
  625. package/lib/esm/internal/workspace/WorkspaceSqliteDb.d.ts.map +1 -0
  626. package/lib/esm/internal/workspace/WorkspaceSqliteDb.js +35 -0
  627. package/lib/esm/internal/workspace/WorkspaceSqliteDb.js.map +1 -0
  628. package/lib/esm/rpc/multipart.d.ts +12 -0
  629. package/lib/esm/rpc/multipart.d.ts.map +1 -0
  630. package/lib/esm/rpc/multipart.js +67 -0
  631. package/lib/esm/rpc/multipart.js.map +1 -0
  632. package/lib/esm/rpc/tracing.d.ts +29 -0
  633. package/lib/esm/rpc/tracing.d.ts.map +1 -0
  634. package/lib/esm/rpc/tracing.js +71 -0
  635. package/lib/esm/rpc/tracing.js.map +1 -0
  636. package/lib/esm/rpc/web/logging.d.ts +10 -0
  637. package/lib/esm/rpc/web/logging.d.ts.map +1 -0
  638. package/lib/esm/rpc/web/logging.js +41 -0
  639. package/lib/esm/rpc/web/logging.js.map +1 -0
  640. package/lib/esm/rpc/web/request.d.ts +7 -0
  641. package/lib/esm/rpc/web/request.d.ts.map +1 -0
  642. package/lib/esm/rpc/web/request.js +71 -0
  643. package/lib/esm/rpc/web/request.js.map +1 -0
  644. package/lib/esm/rpc/web/response.d.ts +7 -0
  645. package/lib/esm/rpc/web/response.d.ts.map +1 -0
  646. package/lib/esm/rpc/web/response.js +136 -0
  647. package/lib/esm/rpc/web/response.js.map +1 -0
  648. package/lib/esm/rpc-impl/DevToolsRpcImpl.d.ts +16 -0
  649. package/lib/esm/rpc-impl/DevToolsRpcImpl.d.ts.map +1 -0
  650. package/lib/esm/rpc-impl/DevToolsRpcImpl.js +29 -0
  651. package/lib/esm/rpc-impl/DevToolsRpcImpl.js.map +1 -0
  652. package/lib/esm/rpc-impl/IModelReadRpcImpl.d.ts +51 -0
  653. package/lib/esm/rpc-impl/IModelReadRpcImpl.d.ts.map +1 -0
  654. package/lib/esm/rpc-impl/IModelReadRpcImpl.js +313 -0
  655. package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -0
  656. package/lib/esm/rpc-impl/IModelTileRpcImpl.d.ts +21 -0
  657. package/lib/esm/rpc-impl/IModelTileRpcImpl.d.ts.map +1 -0
  658. package/lib/esm/rpc-impl/IModelTileRpcImpl.js +193 -0
  659. package/lib/esm/rpc-impl/IModelTileRpcImpl.js.map +1 -0
  660. package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts +45 -0
  661. package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -0
  662. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js +166 -0
  663. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -0
  664. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.d.ts +18 -0
  665. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.d.ts.map +1 -0
  666. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js +41 -0
  667. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -0
  668. package/lib/esm/test/AdvancedEqual.d.ts +38 -0
  669. package/lib/esm/test/AdvancedEqual.d.ts.map +1 -0
  670. package/lib/esm/test/AdvancedEqual.js +67 -0
  671. package/lib/esm/test/AdvancedEqual.js.map +1 -0
  672. package/lib/esm/test/AttachDb.test.d.ts +2 -0
  673. package/lib/esm/test/AttachDb.test.d.ts.map +1 -0
  674. package/lib/esm/test/AttachDb.test.js +157 -0
  675. package/lib/esm/test/AttachDb.test.js.map +1 -0
  676. package/lib/esm/test/GeometryTestUtil.d.ts +7 -0
  677. package/lib/esm/test/GeometryTestUtil.d.ts.map +1 -0
  678. package/lib/esm/test/GeometryTestUtil.js +25 -0
  679. package/lib/esm/test/GeometryTestUtil.js.map +1 -0
  680. package/lib/esm/test/IModelHost.test.d.ts +2 -0
  681. package/lib/esm/test/IModelHost.test.d.ts.map +1 -0
  682. package/lib/esm/test/IModelHost.test.js +187 -0
  683. package/lib/esm/test/IModelHost.test.js.map +1 -0
  684. package/lib/esm/test/IModelTestUtils.d.ts +173 -0
  685. package/lib/esm/test/IModelTestUtils.d.ts.map +1 -0
  686. package/lib/esm/test/IModelTestUtils.js +1113 -0
  687. package/lib/esm/test/IModelTestUtils.js.map +1 -0
  688. package/lib/esm/test/ImageSourceConversion.test.d.ts +2 -0
  689. package/lib/esm/test/ImageSourceConversion.test.d.ts.map +1 -0
  690. package/lib/esm/test/ImageSourceConversion.test.js +171 -0
  691. package/lib/esm/test/ImageSourceConversion.test.js.map +1 -0
  692. package/lib/esm/test/IpcHost.test.d.ts +2 -0
  693. package/lib/esm/test/IpcHost.test.d.ts.map +1 -0
  694. package/lib/esm/test/IpcHost.test.js +55 -0
  695. package/lib/esm/test/IpcHost.test.js.map +1 -0
  696. package/lib/esm/test/KnownTestLocations.d.ts +7 -0
  697. package/lib/esm/test/KnownTestLocations.d.ts.map +1 -0
  698. package/lib/esm/test/KnownTestLocations.js +27 -0
  699. package/lib/esm/test/KnownTestLocations.js.map +1 -0
  700. package/lib/esm/test/PrintElementTree.d.ts +7 -0
  701. package/lib/esm/test/PrintElementTree.d.ts.map +1 -0
  702. package/lib/esm/test/PrintElementTree.js +35 -0
  703. package/lib/esm/test/PrintElementTree.js.map +1 -0
  704. package/lib/esm/test/PropertyDb.test.d.ts +2 -0
  705. package/lib/esm/test/PropertyDb.test.d.ts.map +1 -0
  706. package/lib/esm/test/PropertyDb.test.js +71 -0
  707. package/lib/esm/test/PropertyDb.test.js.map +1 -0
  708. package/lib/esm/test/RevisionUtility.d.ts +33 -0
  709. package/lib/esm/test/RevisionUtility.d.ts.map +1 -0
  710. package/lib/esm/test/RevisionUtility.js +52 -0
  711. package/lib/esm/test/RevisionUtility.js.map +1 -0
  712. package/lib/esm/test/SchemaUtils.test.d.ts +2 -0
  713. package/lib/esm/test/SchemaUtils.test.d.ts.map +1 -0
  714. package/lib/esm/test/SchemaUtils.test.js +97 -0
  715. package/lib/esm/test/SchemaUtils.test.js.map +1 -0
  716. package/lib/esm/test/SequentialLogMatcher.d.ts +35 -0
  717. package/lib/esm/test/SequentialLogMatcher.d.ts.map +1 -0
  718. package/lib/esm/test/SequentialLogMatcher.js +130 -0
  719. package/lib/esm/test/SequentialLogMatcher.js.map +1 -0
  720. package/lib/esm/test/TestChangeSetUtility.d.ts +23 -0
  721. package/lib/esm/test/TestChangeSetUtility.d.ts.map +1 -0
  722. package/lib/esm/test/TestChangeSetUtility.js +65 -0
  723. package/lib/esm/test/TestChangeSetUtility.js.map +1 -0
  724. package/lib/esm/test/TestUtils.d.ts +38 -0
  725. package/lib/esm/test/TestUtils.d.ts.map +1 -0
  726. package/lib/esm/test/TestUtils.js +99 -0
  727. package/lib/esm/test/TestUtils.js.map +1 -0
  728. package/lib/esm/test/annotations/TextAnnotation.test.d.ts +2 -0
  729. package/lib/esm/test/annotations/TextAnnotation.test.d.ts.map +1 -0
  730. package/lib/esm/test/annotations/TextAnnotation.test.js +1135 -0
  731. package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -0
  732. package/lib/esm/test/categories/Category.test.d.ts +2 -0
  733. package/lib/esm/test/categories/Category.test.d.ts.map +1 -0
  734. package/lib/esm/test/categories/Category.test.js +51 -0
  735. package/lib/esm/test/categories/Category.test.js.map +1 -0
  736. package/lib/esm/test/codespec/CodeSpec.test.d.ts +2 -0
  737. package/lib/esm/test/codespec/CodeSpec.test.d.ts.map +1 -0
  738. package/lib/esm/test/codespec/CodeSpec.test.js +51 -0
  739. package/lib/esm/test/codespec/CodeSpec.test.js.map +1 -0
  740. package/lib/esm/test/ecdb/CTE.test.d.ts +2 -0
  741. package/lib/esm/test/ecdb/CTE.test.d.ts.map +1 -0
  742. package/lib/esm/test/ecdb/CTE.test.js +177 -0
  743. package/lib/esm/test/ecdb/CTE.test.js.map +1 -0
  744. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.d.ts +2 -0
  745. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.d.ts.map +1 -0
  746. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +167 -0
  747. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -0
  748. package/lib/esm/test/ecdb/ECDb.test.d.ts +2 -0
  749. package/lib/esm/test/ecdb/ECDb.test.d.ts.map +1 -0
  750. package/lib/esm/test/ecdb/ECDb.test.js +642 -0
  751. package/lib/esm/test/ecdb/ECDb.test.js.map +1 -0
  752. package/lib/esm/test/ecdb/ECDbTestHelper.d.ts +5 -0
  753. package/lib/esm/test/ecdb/ECDbTestHelper.d.ts.map +1 -0
  754. package/lib/esm/test/ecdb/ECDbTestHelper.js +28 -0
  755. package/lib/esm/test/ecdb/ECDbTestHelper.js.map +1 -0
  756. package/lib/esm/test/ecdb/ECSchemaXmlContext.test.d.ts +2 -0
  757. package/lib/esm/test/ecdb/ECSchemaXmlContext.test.d.ts.map +1 -0
  758. package/lib/esm/test/ecdb/ECSchemaXmlContext.test.js +63 -0
  759. package/lib/esm/test/ecdb/ECSchemaXmlContext.test.js.map +1 -0
  760. package/lib/esm/test/ecdb/ECSqlAst.test.d.ts +5 -0
  761. package/lib/esm/test/ecdb/ECSqlAst.test.d.ts.map +1 -0
  762. package/lib/esm/test/ecdb/ECSqlAst.test.js +971 -0
  763. package/lib/esm/test/ecdb/ECSqlAst.test.js.map +1 -0
  764. package/lib/esm/test/ecdb/ECSqlQuery.test.d.ts +2 -0
  765. package/lib/esm/test/ecdb/ECSqlQuery.test.d.ts.map +1 -0
  766. package/lib/esm/test/ecdb/ECSqlQuery.test.js +770 -0
  767. package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -0
  768. package/lib/esm/test/ecdb/ECSqlReader.test.d.ts +2 -0
  769. package/lib/esm/test/ecdb/ECSqlReader.test.d.ts.map +1 -0
  770. package/lib/esm/test/ecdb/ECSqlReader.test.js +669 -0
  771. package/lib/esm/test/ecdb/ECSqlReader.test.js.map +1 -0
  772. package/lib/esm/test/ecdb/ECSqlStatement.test.d.ts +2 -0
  773. package/lib/esm/test/ecdb/ECSqlStatement.test.d.ts.map +1 -0
  774. package/lib/esm/test/ecdb/ECSqlStatement.test.js +3239 -0
  775. package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -0
  776. package/lib/esm/test/ecdb/SqliteStatement.test.d.ts +2 -0
  777. package/lib/esm/test/ecdb/SqliteStatement.test.d.ts.map +1 -0
  778. package/lib/esm/test/ecdb/SqliteStatement.test.js +508 -0
  779. package/lib/esm/test/ecdb/SqliteStatement.test.js.map +1 -0
  780. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.d.ts +4 -0
  781. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.d.ts.map +1 -0
  782. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js +127 -0
  783. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js.map +1 -0
  784. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.d.ts +2 -0
  785. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.d.ts.map +1 -0
  786. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js +196 -0
  787. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js.map +1 -0
  788. package/lib/esm/test/ecsql/src/ECSqlTestParser.d.ts +66 -0
  789. package/lib/esm/test/ecsql/src/ECSqlTestParser.d.ts.map +1 -0
  790. package/lib/esm/test/ecsql/src/ECSqlTestParser.js +420 -0
  791. package/lib/esm/test/ecsql/src/ECSqlTestParser.js.map +1 -0
  792. package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.d.ts +2 -0
  793. package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.d.ts.map +1 -0
  794. package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js +365 -0
  795. package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js.map +1 -0
  796. package/lib/esm/test/element/DeleteDefinitionElements.test.d.ts +2 -0
  797. package/lib/esm/test/element/DeleteDefinitionElements.test.d.ts.map +1 -0
  798. package/lib/esm/test/element/DeleteDefinitionElements.test.js +208 -0
  799. package/lib/esm/test/element/DeleteDefinitionElements.test.js.map +1 -0
  800. package/lib/esm/test/element/ElementAspect.test.d.ts +2 -0
  801. package/lib/esm/test/element/ElementAspect.test.d.ts.map +1 -0
  802. package/lib/esm/test/element/ElementAspect.test.js +363 -0
  803. package/lib/esm/test/element/ElementAspect.test.js.map +1 -0
  804. package/lib/esm/test/element/ElementDependencyGraph.test.d.ts +2 -0
  805. package/lib/esm/test/element/ElementDependencyGraph.test.d.ts.map +1 -0
  806. package/lib/esm/test/element/ElementDependencyGraph.test.js +383 -0
  807. package/lib/esm/test/element/ElementDependencyGraph.test.js.map +1 -0
  808. package/lib/esm/test/element/ElementRoundTrip.test.d.ts +2 -0
  809. package/lib/esm/test/element/ElementRoundTrip.test.d.ts.map +1 -0
  810. package/lib/esm/test/element/ElementRoundTrip.test.js +916 -0
  811. package/lib/esm/test/element/ElementRoundTrip.test.js.map +1 -0
  812. package/lib/esm/test/element/ExcludedElements.test.d.ts +2 -0
  813. package/lib/esm/test/element/ExcludedElements.test.d.ts.map +1 -0
  814. package/lib/esm/test/element/ExcludedElements.test.js +57 -0
  815. package/lib/esm/test/element/ExcludedElements.test.js.map +1 -0
  816. package/lib/esm/test/element/ExternalSource.test.d.ts +2 -0
  817. package/lib/esm/test/element/ExternalSource.test.d.ts.map +1 -0
  818. package/lib/esm/test/element/ExternalSource.test.js +107 -0
  819. package/lib/esm/test/element/ExternalSource.test.js.map +1 -0
  820. package/lib/esm/test/element/NullStructArray.test.d.ts +2 -0
  821. package/lib/esm/test/element/NullStructArray.test.d.ts.map +1 -0
  822. package/lib/esm/test/element/NullStructArray.test.js +77 -0
  823. package/lib/esm/test/element/NullStructArray.test.js.map +1 -0
  824. package/lib/esm/test/element/UrlLink.test.d.ts +2 -0
  825. package/lib/esm/test/element/UrlLink.test.d.ts.map +1 -0
  826. package/lib/esm/test/element/UrlLink.test.js +36 -0
  827. package/lib/esm/test/element/UrlLink.test.js.map +1 -0
  828. package/lib/esm/test/font/FontFile.test.d.ts +2 -0
  829. package/lib/esm/test/font/FontFile.test.d.ts.map +1 -0
  830. package/lib/esm/test/font/FontFile.test.js +139 -0
  831. package/lib/esm/test/font/FontFile.test.js.map +1 -0
  832. package/lib/esm/test/font/IModelDbFonts.test.d.ts +2 -0
  833. package/lib/esm/test/font/IModelDbFonts.test.d.ts.map +1 -0
  834. package/lib/esm/test/font/IModelDbFonts.test.js +264 -0
  835. package/lib/esm/test/font/IModelDbFonts.test.js.map +1 -0
  836. package/lib/esm/test/hubaccess/BriefcaseManager.test.d.ts +2 -0
  837. package/lib/esm/test/hubaccess/BriefcaseManager.test.d.ts.map +1 -0
  838. package/lib/esm/test/hubaccess/BriefcaseManager.test.js +165 -0
  839. package/lib/esm/test/hubaccess/BriefcaseManager.test.js.map +1 -0
  840. package/lib/esm/test/hubaccess/CheckpointManager.test.d.ts +2 -0
  841. package/lib/esm/test/hubaccess/CheckpointManager.test.d.ts.map +1 -0
  842. package/lib/esm/test/hubaccess/CheckpointManager.test.js +137 -0
  843. package/lib/esm/test/hubaccess/CheckpointManager.test.js.map +1 -0
  844. package/lib/esm/test/imageData.d.ts +9 -0
  845. package/lib/esm/test/imageData.d.ts.map +1 -0
  846. package/lib/esm/test/imageData.js +16 -0
  847. package/lib/esm/test/imageData.js.map +1 -0
  848. package/lib/esm/test/imodel/ElementTreeWalker.test.d.ts +2 -0
  849. package/lib/esm/test/imodel/ElementTreeWalker.test.d.ts.map +1 -0
  850. package/lib/esm/test/imodel/ElementTreeWalker.test.js +382 -0
  851. package/lib/esm/test/imodel/ElementTreeWalker.test.js.map +1 -0
  852. package/lib/esm/test/imodel/GetTextureImage.test.d.ts +2 -0
  853. package/lib/esm/test/imodel/GetTextureImage.test.d.ts.map +1 -0
  854. package/lib/esm/test/imodel/GetTextureImage.test.js +29 -0
  855. package/lib/esm/test/imodel/GetTextureImage.test.js.map +1 -0
  856. package/lib/esm/test/imodel/IModel.test.d.ts +2 -0
  857. package/lib/esm/test/imodel/IModel.test.d.ts.map +1 -0
  858. package/lib/esm/test/imodel/IModel.test.js +2601 -0
  859. package/lib/esm/test/imodel/IModel.test.js.map +1 -0
  860. package/lib/esm/test/imodel/ProjectExtents.test.d.ts +2 -0
  861. package/lib/esm/test/imodel/ProjectExtents.test.d.ts.map +1 -0
  862. package/lib/esm/test/imodel/ProjectExtents.test.js +66 -0
  863. package/lib/esm/test/imodel/ProjectExtents.test.js.map +1 -0
  864. package/lib/esm/test/imodel/SchemaXmlImport.test.d.ts +2 -0
  865. package/lib/esm/test/imodel/SchemaXmlImport.test.d.ts.map +1 -0
  866. package/lib/esm/test/imodel/SchemaXmlImport.test.js +74 -0
  867. package/lib/esm/test/imodel/SchemaXmlImport.test.js.map +1 -0
  868. package/lib/esm/test/index.d.ts +7 -0
  869. package/lib/esm/test/index.d.ts.map +1 -0
  870. package/lib/esm/test/index.js +11 -0
  871. package/lib/esm/test/index.js.map +1 -0
  872. package/lib/esm/test/misc/DevTools.test.d.ts +2 -0
  873. package/lib/esm/test/misc/DevTools.test.d.ts.map +1 -0
  874. package/lib/esm/test/misc/DevTools.test.js +72 -0
  875. package/lib/esm/test/misc/DevTools.test.js.map +1 -0
  876. package/lib/esm/test/misc/EntitySubClasses.test.d.ts +2 -0
  877. package/lib/esm/test/misc/EntitySubClasses.test.d.ts.map +1 -0
  878. package/lib/esm/test/misc/EntitySubClasses.test.js +106 -0
  879. package/lib/esm/test/misc/EntitySubClasses.test.js.map +1 -0
  880. package/lib/esm/test/misc/GeoServices.test.d.ts +2 -0
  881. package/lib/esm/test/misc/GeoServices.test.d.ts.map +1 -0
  882. package/lib/esm/test/misc/GeoServices.test.js +850 -0
  883. package/lib/esm/test/misc/GeoServices.test.js.map +1 -0
  884. package/lib/esm/test/misc/PromiseMemoizer.test.d.ts +2 -0
  885. package/lib/esm/test/misc/PromiseMemoizer.test.d.ts.map +1 -0
  886. package/lib/esm/test/misc/PromiseMemoizer.test.js +111 -0
  887. package/lib/esm/test/misc/PromiseMemoizer.test.js.map +1 -0
  888. package/lib/esm/test/native/DgnDbWorker.test.d.ts +2 -0
  889. package/lib/esm/test/native/DgnDbWorker.test.d.ts.map +1 -0
  890. package/lib/esm/test/native/DgnDbWorker.test.js +159 -0
  891. package/lib/esm/test/native/DgnDbWorker.test.js.map +1 -0
  892. package/lib/esm/test/rpc/response.test.d.ts +2 -0
  893. package/lib/esm/test/rpc/response.test.d.ts.map +1 -0
  894. package/lib/esm/test/rpc/response.test.js +112 -0
  895. package/lib/esm/test/rpc/response.test.js.map +1 -0
  896. package/lib/esm/test/schema/ClassRegistry.test.d.ts +2 -0
  897. package/lib/esm/test/schema/ClassRegistry.test.d.ts.map +1 -0
  898. package/lib/esm/test/schema/ClassRegistry.test.js +679 -0
  899. package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -0
  900. package/lib/esm/test/schema/FunctionalDomain.test.d.ts +2 -0
  901. package/lib/esm/test/schema/FunctionalDomain.test.d.ts.map +1 -0
  902. package/lib/esm/test/schema/FunctionalDomain.test.js +490 -0
  903. package/lib/esm/test/schema/FunctionalDomain.test.js.map +1 -0
  904. package/lib/esm/test/schema/GenericDomain.test.d.ts +2 -0
  905. package/lib/esm/test/schema/GenericDomain.test.d.ts.map +1 -0
  906. package/lib/esm/test/schema/GenericDomain.test.js +132 -0
  907. package/lib/esm/test/schema/GenericDomain.test.js.map +1 -0
  908. package/lib/esm/test/schema/IModelSchemaContext.test.d.ts +2 -0
  909. package/lib/esm/test/schema/IModelSchemaContext.test.d.ts.map +1 -0
  910. package/lib/esm/test/schema/IModelSchemaContext.test.js +95 -0
  911. package/lib/esm/test/schema/IModelSchemaContext.test.js.map +1 -0
  912. package/lib/esm/test/sheetindex/SheetIndex.test.d.ts +4 -0
  913. package/lib/esm/test/sheetindex/SheetIndex.test.d.ts.map +1 -0
  914. package/lib/esm/test/sheetindex/SheetIndex.test.js +312 -0
  915. package/lib/esm/test/sheetindex/SheetIndex.test.js.map +1 -0
  916. package/lib/esm/test/standalone/ChangeMerge.test.d.ts +2 -0
  917. package/lib/esm/test/standalone/ChangeMerge.test.d.ts.map +1 -0
  918. package/lib/esm/test/standalone/ChangeMerge.test.js +413 -0
  919. package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -0
  920. package/lib/esm/test/standalone/ChangesetReader.test.d.ts +2 -0
  921. package/lib/esm/test/standalone/ChangesetReader.test.d.ts.map +1 -0
  922. package/lib/esm/test/standalone/ChangesetReader.test.js +890 -0
  923. package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -0
  924. package/lib/esm/test/standalone/CustomViewState3dCreator.test.d.ts +2 -0
  925. package/lib/esm/test/standalone/CustomViewState3dCreator.test.d.ts.map +1 -0
  926. package/lib/esm/test/standalone/CustomViewState3dCreator.test.js +49 -0
  927. package/lib/esm/test/standalone/CustomViewState3dCreator.test.js.map +1 -0
  928. package/lib/esm/test/standalone/DisplayStyle.test.d.ts +2 -0
  929. package/lib/esm/test/standalone/DisplayStyle.test.d.ts.map +1 -0
  930. package/lib/esm/test/standalone/DisplayStyle.test.js +136 -0
  931. package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -0
  932. package/lib/esm/test/standalone/ElementGraphics.test.d.ts +2 -0
  933. package/lib/esm/test/standalone/ElementGraphics.test.d.ts.map +1 -0
  934. package/lib/esm/test/standalone/ElementGraphics.test.js +127 -0
  935. package/lib/esm/test/standalone/ElementGraphics.test.js.map +1 -0
  936. package/lib/esm/test/standalone/ElementMesh.test.d.ts +2 -0
  937. package/lib/esm/test/standalone/ElementMesh.test.d.ts.map +1 -0
  938. package/lib/esm/test/standalone/ElementMesh.test.js +142 -0
  939. package/lib/esm/test/standalone/ElementMesh.test.js.map +1 -0
  940. package/lib/esm/test/standalone/ExportGraphics.test.d.ts +2 -0
  941. package/lib/esm/test/standalone/ExportGraphics.test.d.ts.map +1 -0
  942. package/lib/esm/test/standalone/ExportGraphics.test.js +1040 -0
  943. package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -0
  944. package/lib/esm/test/standalone/GeometryChangeEvents.test.d.ts +2 -0
  945. package/lib/esm/test/standalone/GeometryChangeEvents.test.d.ts.map +1 -0
  946. package/lib/esm/test/standalone/GeometryChangeEvents.test.js +139 -0
  947. package/lib/esm/test/standalone/GeometryChangeEvents.test.js.map +1 -0
  948. package/lib/esm/test/standalone/GeometryStream.test.d.ts +2 -0
  949. package/lib/esm/test/standalone/GeometryStream.test.d.ts.map +1 -0
  950. package/lib/esm/test/standalone/GeometryStream.test.js +2869 -0
  951. package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -0
  952. package/lib/esm/test/standalone/HubMock.test.d.ts +2 -0
  953. package/lib/esm/test/standalone/HubMock.test.d.ts.map +1 -0
  954. package/lib/esm/test/standalone/HubMock.test.js +343 -0
  955. package/lib/esm/test/standalone/HubMock.test.js.map +1 -0
  956. package/lib/esm/test/standalone/IModelWrite.test.d.ts +7 -0
  957. package/lib/esm/test/standalone/IModelWrite.test.d.ts.map +1 -0
  958. package/lib/esm/test/standalone/IModelWrite.test.js +859 -0
  959. package/lib/esm/test/standalone/IModelWrite.test.js.map +1 -0
  960. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.d.ts +2 -0
  961. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.d.ts.map +1 -0
  962. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js +417 -0
  963. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js.map +1 -0
  964. package/lib/esm/test/standalone/MergeConflict.test.d.ts +7 -0
  965. package/lib/esm/test/standalone/MergeConflict.test.d.ts.map +1 -0
  966. package/lib/esm/test/standalone/MergeConflict.test.js +345 -0
  967. package/lib/esm/test/standalone/MergeConflict.test.js.map +1 -0
  968. package/lib/esm/test/standalone/NativeAppStorage.test.d.ts +2 -0
  969. package/lib/esm/test/standalone/NativeAppStorage.test.d.ts.map +1 -0
  970. package/lib/esm/test/standalone/NativeAppStorage.test.js +121 -0
  971. package/lib/esm/test/standalone/NativeAppStorage.test.js.map +1 -0
  972. package/lib/esm/test/standalone/RenderMaterialElement.test.d.ts +2 -0
  973. package/lib/esm/test/standalone/RenderMaterialElement.test.d.ts.map +1 -0
  974. package/lib/esm/test/standalone/RenderMaterialElement.test.js +398 -0
  975. package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -0
  976. package/lib/esm/test/standalone/RenderTimeline.test.d.ts +2 -0
  977. package/lib/esm/test/standalone/RenderTimeline.test.d.ts.map +1 -0
  978. package/lib/esm/test/standalone/RenderTimeline.test.js +71 -0
  979. package/lib/esm/test/standalone/RenderTimeline.test.js.map +1 -0
  980. package/lib/esm/test/standalone/SQLiteDb.test.d.ts +2 -0
  981. package/lib/esm/test/standalone/SQLiteDb.test.d.ts.map +1 -0
  982. package/lib/esm/test/standalone/SQLiteDb.test.js +63 -0
  983. package/lib/esm/test/standalone/SQLiteDb.test.js.map +1 -0
  984. package/lib/esm/test/standalone/SchemaUtils.test.d.ts +2 -0
  985. package/lib/esm/test/standalone/SchemaUtils.test.d.ts.map +1 -0
  986. package/lib/esm/test/standalone/SchemaUtils.test.js +25 -0
  987. package/lib/esm/test/standalone/SchemaUtils.test.js.map +1 -0
  988. package/lib/esm/test/standalone/SectionDrawing.test.d.ts +2 -0
  989. package/lib/esm/test/standalone/SectionDrawing.test.d.ts.map +1 -0
  990. package/lib/esm/test/standalone/SectionDrawing.test.js +83 -0
  991. package/lib/esm/test/standalone/SectionDrawing.test.js.map +1 -0
  992. package/lib/esm/test/standalone/ServerBasedLocks.test.d.ts +2 -0
  993. package/lib/esm/test/standalone/ServerBasedLocks.test.d.ts.map +1 -0
  994. package/lib/esm/test/standalone/ServerBasedLocks.test.js +279 -0
  995. package/lib/esm/test/standalone/ServerBasedLocks.test.js.map +1 -0
  996. package/lib/esm/test/standalone/Setting.test.d.ts +2 -0
  997. package/lib/esm/test/standalone/Setting.test.d.ts.map +1 -0
  998. package/lib/esm/test/standalone/Setting.test.js +76 -0
  999. package/lib/esm/test/standalone/Setting.test.js.map +1 -0
  1000. package/lib/esm/test/standalone/Settings.test.d.ts +2 -0
  1001. package/lib/esm/test/standalone/Settings.test.d.ts.map +1 -0
  1002. package/lib/esm/test/standalone/Settings.test.js +349 -0
  1003. package/lib/esm/test/standalone/Settings.test.js.map +1 -0
  1004. package/lib/esm/test/standalone/SettingsSchemas.test.d.ts +2 -0
  1005. package/lib/esm/test/standalone/SettingsSchemas.test.d.ts.map +1 -0
  1006. package/lib/esm/test/standalone/SettingsSchemas.test.js +31 -0
  1007. package/lib/esm/test/standalone/SettingsSchemas.test.js.map +1 -0
  1008. package/lib/esm/test/standalone/SnapshotDb.test.d.ts +2 -0
  1009. package/lib/esm/test/standalone/SnapshotDb.test.d.ts.map +1 -0
  1010. package/lib/esm/test/standalone/SnapshotDb.test.js +153 -0
  1011. package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -0
  1012. package/lib/esm/test/standalone/Texture.test.d.ts +2 -0
  1013. package/lib/esm/test/standalone/Texture.test.d.ts.map +1 -0
  1014. package/lib/esm/test/standalone/Texture.test.js +90 -0
  1015. package/lib/esm/test/standalone/Texture.test.js.map +1 -0
  1016. package/lib/esm/test/standalone/TileCache.test.d.ts +9 -0
  1017. package/lib/esm/test/standalone/TileCache.test.d.ts.map +1 -0
  1018. package/lib/esm/test/standalone/TileCache.test.js +127 -0
  1019. package/lib/esm/test/standalone/TileCache.test.js.map +1 -0
  1020. package/lib/esm/test/standalone/TileTree.test.d.ts +2 -0
  1021. package/lib/esm/test/standalone/TileTree.test.d.ts.map +1 -0
  1022. package/lib/esm/test/standalone/TileTree.test.js +241 -0
  1023. package/lib/esm/test/standalone/TileTree.test.js.map +1 -0
  1024. package/lib/esm/test/standalone/TxnManager.test.d.ts +2 -0
  1025. package/lib/esm/test/standalone/TxnManager.test.d.ts.map +1 -0
  1026. package/lib/esm/test/standalone/TxnManager.test.js +878 -0
  1027. package/lib/esm/test/standalone/TxnManager.test.js.map +1 -0
  1028. package/lib/esm/test/standalone/ViewDefinition.test.d.ts +2 -0
  1029. package/lib/esm/test/standalone/ViewDefinition.test.d.ts.map +1 -0
  1030. package/lib/esm/test/standalone/ViewDefinition.test.js +279 -0
  1031. package/lib/esm/test/standalone/ViewDefinition.test.js.map +1 -0
  1032. package/lib/esm/test/standalone/ViewStoreDb.test.d.ts +2 -0
  1033. package/lib/esm/test/standalone/ViewStoreDb.test.d.ts.map +1 -0
  1034. package/lib/esm/test/standalone/ViewStoreDb.test.js +288 -0
  1035. package/lib/esm/test/standalone/ViewStoreDb.test.js.map +1 -0
  1036. package/lib/esm/test/standalone/Workspace.test.d.ts +2 -0
  1037. package/lib/esm/test/standalone/Workspace.test.d.ts.map +1 -0
  1038. package/lib/esm/test/standalone/Workspace.test.js +161 -0
  1039. package/lib/esm/test/standalone/Workspace.test.js.map +1 -0
  1040. package/lib/esm/workspace/Settings.d.ts +216 -0
  1041. package/lib/esm/workspace/Settings.d.ts.map +1 -0
  1042. package/lib/esm/workspace/Settings.js +83 -0
  1043. package/lib/esm/workspace/Settings.js.map +1 -0
  1044. package/lib/esm/workspace/SettingsSchemas.d.ts +135 -0
  1045. package/lib/esm/workspace/SettingsSchemas.d.ts.map +1 -0
  1046. package/lib/esm/workspace/SettingsSchemas.js +9 -0
  1047. package/lib/esm/workspace/SettingsSchemas.js.map +1 -0
  1048. package/lib/esm/workspace/Workspace.d.ts +507 -0
  1049. package/lib/esm/workspace/Workspace.d.ts.map +1 -0
  1050. package/lib/esm/workspace/Workspace.js +97 -0
  1051. package/lib/esm/workspace/Workspace.js.map +1 -0
  1052. package/lib/esm/workspace/WorkspaceEditor.d.ts +245 -0
  1053. package/lib/esm/workspace/WorkspaceEditor.d.ts.map +1 -0
  1054. package/lib/esm/workspace/WorkspaceEditor.js +31 -0
  1055. package/lib/esm/workspace/WorkspaceEditor.js.map +1 -0
  1056. package/package.json +35 -28
  1057. package/lib/cjs/IModelCloneContext.d.ts +0 -9
  1058. package/lib/cjs/IModelCloneContext.d.ts.map +0 -1
  1059. package/lib/cjs/IModelCloneContext.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Entity.js","sourceRoot":"","sources":["../../src/Entity.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AACvD,oDAAyG;AAIzG;;;;GAIG;AACH,MAAa,MAAM;IAQjB,IAAY,KAAK,KAAoB,OAAO,IAAI,CAAC,WAA4B,CAAC,CAAC,CAAC;IAEhF;;;;OAIG;IACI,MAAM,KAAK,SAAS,KAAa,OAAO,QAAQ,CAAC,CAAC,CAAC;IAE1D;;;OAGG;IACH,IAAW,KAAK,KAAU,OAAO,IAAI,CAAC,CAAC,CAAC;IAExC,yDAAyD;IACzD,IAAW,UAAU,KAAa,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;IAExE,4DAA4D;IAC5D,IAAW,SAAS,KAAa,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAQ/D,YAAsB,KAAkB,EAAE,MAAgB;QAlC1D;;WAEG;QACa,uBAAkB,GAAG,IAAa,CAAC;QAwGnD;;;WAGG;QACH,6DAA6D;QACtD,4BAAuB,GAAG,IAAI,CAAC,eAAe,CAAC;QActD;;;WAGG;QACH,6DAA6D;QACnD,gCAA2B,GAAG,IAAI,CAAC,mBAAmB,CAAC;QAhG/D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,GAAG,mBAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAClC,8EAA8E;QAC9E,IAAI,CAAC,eAAe,CAAC,CAAC,QAAgB,EAAE,IAAsB,EAAE,EAAE,CAAE,IAAY,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,cAAc,CAAE,KAAa,CAAC,QAAQ,CAAC,CAAC,EAAE,K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;OAGG;IACI,MAAM,KAAK,gBAAgB,KAAK,OAAO,KAAK,CAAC,CAAC,CAAC;IAEtD;;;;;OAKG;IACI,eAAe;QACpB,MAAM,YAAY,GAAG,IAAI,gCAAkB,EAAE,CAAC;QAC9C,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACvC,OAAO,YAAY,CAAC;IACtB,CAAC;IASD;;;;;;;OAOG;IACO,mBAAmB,CAAC,aAAiC;QAC7D,OAAO,CAAC,2BAA2B;IACrC,CAAC;CAQF;AArID,wBAqIC","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 Schema\r\n */\r\n\r\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport { EntityProps, EntityReferenceSet, PropertyCallback, PropertyMetaData } from \"@itwin/core-common\";\r\nimport type { IModelDb } from \"./IModelDb\";\r\nimport { Schema } from \"./Schema\";\r\n\r\n/** Represents one of the fundamental building block in an [[IModelDb]]: as an [[Element]], [[Model]], or [[Relationship]].\r\n * Every subclass of Entity represents one BIS [ECClass]($ecschema-metadata).\r\n * An Entity is typically instantiated from an [EntityProps]($common) and can be converted back to this representation via [[Entity.toJSON]].\r\n * @public\r\n */\r\nexport class Entity {\r\n /** An immutable property used to discriminate between [[Entity]] and [EntityProps]($common), used to inform the TypeScript compiler that these two types\r\n * are never substitutable for one another. To obtain an EntityProps from an Entity, use [[Entity.toJSON]].\r\n */\r\n public readonly isInstanceOfEntity = true as const;\r\n /** The Schema that defines this class. */\r\n public static schema: typeof Schema;\r\n\r\n private get _ctor(): typeof Entity { return this.constructor as typeof Entity; }\r\n\r\n /** The name of the BIS class associated with this class.\r\n * @note Every subclass of Entity **MUST** override this method to identify its BIS class.\r\n * Failure to do so will ordinarily result in an error when the class is registered, since there may only\r\n * be one JavaScript class for a given BIS class (usually the errant class will collide with its superclass.)\r\n */\r\n public static get className(): string { return \"Entity\"; }\r\n\r\n /** When working with an Entity it can be useful to set property values directly, bypassing the compiler's type checking.\r\n * This property makes such code slightly less tedious to read and write.\r\n * @internal\r\n */\r\n public get asAny(): any { return this; }\r\n\r\n /** The name of the BIS Schema that defines this class */\r\n public get schemaName(): string { return this._ctor.schema.schemaName; }\r\n\r\n /** The name of the BIS class associated with this class. */\r\n public get className(): string { return this._ctor.className; }\r\n\r\n /** The [[IModelDb]] that contains this Entity */\r\n public iModel: IModelDb;\r\n\r\n /** The Id of this Entity. May be invalid if the Entity has not yet been saved in the database. */\r\n public id: Id64String;\r\n\r\n protected constructor(props: EntityProps, iModel: IModelDb) {\r\n this.iModel = iModel;\r\n this.id = Id64.fromJSON(props.id);\r\n // copy all auto-handled properties from input to the object being constructed\r\n this.forEachProperty((propName: string, meta: PropertyMetaData) => (this as any)[propName] = meta.createProperty((props as any)[propName]), false);\r\n }\r\n\r\n /** Invoke the constructor of the specified `Entity` subclass.\r\n * @internal\r\n */\r\n public static instantiate(subclass: typeof Entity, props: EntityProps, iModel: IModelDb): Entity {\r\n return new subclass(props, iModel);\r\n }\r\n\r\n /** Obtain the JSON representation of this Entity. Subclasses of [[Entity]] typically override this method to return their corresponding sub-type of [EntityProps]($common) -\r\n * for example, [[GeometricElement.toJSON]] returns a [GeometricElementProps]($common).\r\n */\r\n public toJSON(): EntityProps {\r\n const val: any = {};\r\n val.classFullName = this.classFullName;\r\n if (Id64.isValid(this.id))\r\n val.id = this.id;\r\n this.forEachProperty((propName: string) => val[propName] = (this as any)[propName], false);\r\n return val;\r\n }\r\n\r\n /** Call a function for each property of this Entity.\r\n * @param func The callback to be invoked on each property\r\n * @param includeCustom If true (default), include custom-handled properties in the iteration. Otherwise, skip custom-handled properties.\r\n * @note Custom-handled properties are core properties that have behavior enforced by C++ handlers.\r\n */\r\n public forEachProperty(func: PropertyCallback, includeCustom: boolean = true) {\r\n this.iModel.forEachMetaData(this.classFullName, true, func, includeCustom);\r\n }\r\n\r\n /** Get the full BIS class name of this Entity in the form \"schema:class\" */\r\n public static get classFullName(): string { return `${this.schema.schemaName}:${this.className}`; }\r\n\r\n /** Get the full BIS class name of this Entity in the form \"schema:class\". */\r\n public get classFullName(): string { return this._ctor.classFullName; }\r\n\r\n /** @internal */\r\n public static get protectedOperations(): string[] { return []; }\r\n\r\n /** return whether this Entity class is a subclass of another Entity class\r\n * @note the subclass-ness is checked according to JavaScript inheritance, to check the underlying raw EC class's\r\n * inheritance, you can use [ECClass.is]($ecschema-metadata)\r\n * @note this should have a type of `is<T extends typeof Entity>(otherClass: T): this is T` but can't because of\r\n * typescript's restriction on the `this` type in static methods\r\n */\r\n public static is(otherClass: typeof Entity): boolean {\r\n // inline of @itwin/core-bentley's isSubclassOf due to protected constructor.\r\n return this === otherClass || this.prototype instanceof otherClass;\r\n }\r\n\r\n /** whether this JavaScript class was generated for this ECClass because there was no registered custom implementation\r\n * ClassRegistry overrides this when generating a class\r\n * @internal\r\n */\r\n public static get isGeneratedClass() { return false; }\r\n\r\n /** Get the set of this entity's *entity references*, [EntityReferenceSet]($backend). An *entity reference* is any id\r\n * stored on the entity, in its EC properties or json fields.\r\n * This is important for cloning operations but can be useful in other situations as well.\r\n * @see this.collectReferenceIds\r\n * @beta\r\n */\r\n public getReferenceIds(): EntityReferenceSet {\r\n const referenceIds = new EntityReferenceSet();\r\n this.collectReferenceIds(referenceIds);\r\n return referenceIds;\r\n }\r\n\r\n /** kept rename for older transformer versions\r\n * @deprecated in 3.x . Use [[getReferenceIds]] instead\r\n * @internal\r\n */\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n public getReferenceConcreteIds = this.getReferenceIds;\r\n\r\n /** Collect the Ids of this entity's *references* at this level of the class hierarchy.\r\n * A *reference* is any entity referenced by this entity's EC Data, including json fields.\r\n * This is important for cloning operations but can be useful in other situations as well.\r\n * @param _referenceIds The Id64Set to populate with reference Ids.\r\n * @note This should be overridden (with `super` called) at each level the class hierarchy that introduces references.\r\n * @see getReferenceIds\r\n * @beta\r\n */\r\n protected collectReferenceIds(_referenceIds: EntityReferenceSet): void {\r\n return; // no references by default\r\n }\r\n\r\n /** kept rename for older transformer versions\r\n * @deprecated in 3.x . Use [[collectReferenceIds]] instead\r\n * @internal\r\n */\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n protected collectReferenceConcreteIds = this.collectReferenceIds;\r\n}\r\n\r\n/** Parameter type that can accept both abstract constructor types and non-abstract constructor types for `instanceof` to test.\r\n * @public\r\n */\r\nexport type EntityClassType<T> = Function & { prototype: T }; // eslint-disable-line @typescript-eslint/no-unsafe-function-type\r\n"]}
1
+ {"version":3,"file":"Entity.js","sourceRoot":"","sources":["../../src/Entity.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AACvD,oDAAyG;AAGzG,gEAAuF;AAEvF;;;;GAIG;AACH,MAAa,MAAM;IACjB;;OAEG;IACa,kBAAkB,GAAG,IAAa,CAAC;IACnD,0CAA0C;IACnC,MAAM,CAAC,MAAM,CAAgB,CAAC,mGAAmG;IAExI,IAAY,KAAK,KAAoB,OAAO,IAAI,CAAC,WAA4B,CAAC,CAAC,CAAC;IAEhF;;;;OAIG;IACI,MAAM,KAAK,SAAS,KAAa,OAAO,QAAQ,CAAC,CAAC,CAAC;IAE1D;;OAEG;IACI,MAAM,KAAK,aAAa;QAC7B,gFAAgF;QAChF,OAAO,IAAI,iCAAa,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAClE,CAAC;IAEO,SAAS,CAAe;IAEhC;;;OAGG;IACH,IAAW,KAAK,KAAU,OAAO,IAAI,CAAC,CAAC,CAAC;IAExC,yDAAyD;IACzD,IAAW,UAAU,KAAa,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;IAExE,4DAA4D;IAC5D,IAAW,SA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,IAAI,KAAK,CAAC,2BAA2B,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;QACnE,CAAC;QAED,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD,gBAAgB;IACT,MAAM,KAAK,mBAAmB,KAAe,OAAO,EAAE,CAAC,CAAC,CAAC;IAEhE;;;;;OAKG;IACI,MAAM,CAAC,EAAE,CAAC,UAAyB;QACxC,6EAA6E;QAC7E,OAAO,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,SAAS,YAAY,UAAU,CAAC;IACrE,CAAC;IAED;;;OAGG;IACI,MAAM,KAAK,gBAAgB,KAAK,OAAO,KAAK,CAAC,CAAC,CAAC;IAEtD;;;;;OAKG;IACI,eAAe;QACpB,MAAM,YAAY,GAAG,IAAI,gCAAkB,EAAE,CAAC;QAC9C,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACvC,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;;;;;;OAOG;IACO,mBAAmB,CAAC,aAAiC;QAC7D,OAAO,CAAC,2BAA2B;IACrC,CAAC;CACF;AApMD,wBAoMC","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 Schema\n */\n\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\nimport { EntityProps, EntityReferenceSet, PropertyCallback, PropertyMetaData } from \"@itwin/core-common\";\nimport type { IModelDb } from \"./IModelDb\";\nimport { Schema } from \"./Schema\";\nimport { EntityClass, PropertyHandler, SchemaItemKey } from \"@itwin/ecschema-metadata\";\n\n/** Represents one of the fundamental building block in an [[IModelDb]]: as an [[Element]], [[Model]], or [[Relationship]].\n * Every subclass of Entity represents one BIS [ECClass]($ecschema-metadata).\n * An Entity is typically instantiated from an [EntityProps]($common) and can be converted back to this representation via [[Entity.toJSON]].\n * @public\n */\nexport class Entity {\n /** An immutable property used to discriminate between [[Entity]] and [EntityProps]($common), used to inform the TypeScript compiler that these two types\n * are never substitutable for one another. To obtain an EntityProps from an Entity, use [[Entity.toJSON]].\n */\n public readonly isInstanceOfEntity = true as const;\n /** The Schema that defines this class. */\n public static schema: typeof Schema; // TODO: Schema key on the static level, but it requires a version which may differ between imodels\n\n private get _ctor(): typeof Entity { return this.constructor as typeof Entity; }\n\n /** The name of the BIS class associated with this class.\n * @note Every subclass of Entity **MUST** override this method to identify its BIS class.\n * Failure to do so will ordinarily result in an error when the class is registered, since there may only\n * be one JavaScript class for a given BIS class (usually the errant class will collide with its superclass.)\n */\n public static get className(): string { return \"Entity\"; }\n\n /** Serves as a unique identifier for this class. Typed variant of [[classFullName]].\n * @beta\n */\n public static get schemaItemKey(): SchemaItemKey {\n // We cannot cache this here because the className gets overridden in subclasses\n return new SchemaItemKey(this.className, this.schema.schemaKey);\n }\n\n private _metadata?: EntityClass;\n\n /** When working with an Entity it can be useful to set property values directly, bypassing the compiler's type checking.\n * This property makes such code slightly less tedious to read and write.\n * @internal\n */\n public get asAny(): any { return this; }\n\n /** The name of the BIS Schema that defines this class */\n public get schemaName(): string { return this._ctor.schema.schemaName; }\n\n /** The name of the BIS class associated with this class. */\n public get className(): string { return this._ctor.className; }\n\n /** The [[IModelDb]] that contains this Entity */\n public iModel: IModelDb;\n\n /** The Id of this Entity. May be invalid if the Entity has not yet been saved in the database. */\n public id: Id64String;\n\n\n protected constructor(props: EntityProps, iModel: IModelDb) {\n this.iModel = iModel;\n this.id = Id64.fromJSON(props.id);\n // copy all auto-handled properties from input to the object being constructed\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this.forEachProperty((propName: string, meta: PropertyMetaData) => (this as any)[propName] = meta.createProperty((props as any)[propName]), false);\n }\n\n /** Invoke the constructor of the specified `Entity` subclass.\n * @internal\n */\n public static instantiate(subclass: typeof Entity, props: EntityProps, iModel: IModelDb): Entity {\n return new subclass(props, iModel);\n }\n\n /** Obtain the JSON representation of this Entity. Subclasses of [[Entity]] typically override this method to return their corresponding sub-type of [EntityProps]($common) -\n * for example, [[GeometricElement.toJSON]] returns a [GeometricElementProps]($common).\n */\n public toJSON(): EntityProps {\n const val: any = {};\n val.classFullName = this.classFullName;\n if (Id64.isValid(this.id))\n val.id = this.id;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this.forEachProperty((propName: string) => val[propName] = (this as any)[propName], false);\n return val;\n }\n\n /** Call a function for each property of this Entity.\n * @param func The callback to be invoked on each property\n * @param includeCustom If true (default), include custom-handled properties in the iteration. Otherwise, skip custom-handled properties.\n * @note Custom-handled properties are core properties that have behavior enforced by C++ handlers.\n * @deprecated in 5.0. Please use `forEach` to get the metadata and iterate over the properties instead.\n *\n * @example\n * ```typescript\n * // Deprecated method\n * entity.forEachProperty((name, propMetaData) => {\n * console.log(`Property name: ${name}, Property type: ${propMetaData.primitiveType}`);\n * });\n *\n * // New method\n * entity.forEach((name, property) => {\n * console.log(`Property name: ${name}, Property type: ${property.propertyType}`);\n * });\n * ```\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public forEachProperty(func: PropertyCallback, includeCustom: boolean = true) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this.iModel.forEachMetaData(this.classFullName, true, func, includeCustom);\n }\n\n /**\n * Call a function for each property of this Entity.\n * @param func The callback to be invoked on each property.\n * @param includeCustom If true (default), include custom-handled properties in the iteration. Otherwise, skip custom-handled properties.\n * @note Custom-handled properties are core properties that have behavior enforced by C++ handlers.\n * @throws Error if metadata for the class cannot be retrieved.\n *\n * @example\n * ```typescript\n * entity.forEach((name, property) => {\n * console.log(`Property name: ${name}, Property type: ${property.propertyType}`);\n * });\n * ```\n */\n public forEach(func: PropertyHandler, includeCustom: boolean = true) {\n const metaData = this.iModel.schemaContext.getSchemaItemSync(this.schemaItemKey, EntityClass);\n if (!metaData)\n throw new Error(`Cannot get metadata for ${this.classFullName}`);\n\n for (const property of metaData.getPropertiesSync()) {\n if (includeCustom || !property.customAttributes?.has(`BisCore.CustomHandledProperty`))\n func(property.name, property);\n }\n }\n\n /** Get the full BIS class name of this Entity in the form \"schema:class\" */\n public static get classFullName(): string { return `${this.schema.schemaName}:${this.className}`; }\n\n /** Get the full BIS class name of this Entity in the form \"schema:class\". */\n public get classFullName(): string { return this._ctor.classFullName; }\n /**\n * Get the item key used by the ecschema-metadata package to identify this entity class\n * @beta\n */\n public get schemaItemKey(): SchemaItemKey { return this._ctor.schemaItemKey; }\n\n /** query metadata for this entity class from the iModel's schema\n * @throws [[IModelError]] if there is a problem querying the schema\n * @returns The metadata for the current entity\n * @beta\n */\n public async getMetaData(): Promise<EntityClass> {\n if (!this._metadata) {\n this._metadata = await this.iModel.schemaContext.getSchemaItem(this.schemaItemKey, EntityClass);\n }\n\n if(!this._metadata) {\n throw new Error(`Cannot get metadata for ${this.classFullName}`);\n }\n\n return this._metadata;\n }\n\n\n /** @internal */\n public static get protectedOperations(): string[] { return []; }\n\n /** return whether this Entity class is a subclass of another Entity class\n * @note the subclass-ness is checked according to JavaScript inheritance, to check the underlying raw EC class's\n * inheritance, you can use [ECClass.is]($ecschema-metadata)\n * @note this should have a type of `is<T extends typeof Entity>(otherClass: T): this is T` but can't because of\n * typescript's restriction on the `this` type in static methods\n */\n public static is(otherClass: typeof Entity): boolean {\n // inline of @itwin/core-bentley's isSubclassOf due to protected constructor.\n return this === otherClass || this.prototype instanceof otherClass;\n }\n\n /** whether this JavaScript class was generated for this ECClass because there was no registered custom implementation\n * ClassRegistry overrides this when generating a class\n * @internal\n */\n public static get isGeneratedClass() { return false; }\n\n /** Get the set of this entity's *entity references*, [EntityReferenceSet]($backend). An *entity reference* is any id\n * stored on the entity, in its EC properties or json fields.\n * This is important for cloning operations but can be useful in other situations as well.\n * @see this.collectReferenceIds\n * @beta\n */\n public getReferenceIds(): EntityReferenceSet {\n const referenceIds = new EntityReferenceSet();\n this.collectReferenceIds(referenceIds);\n return referenceIds;\n }\n\n /** Collect the Ids of this entity's *references* at this level of the class hierarchy.\n * A *reference* is any entity referenced by this entity's EC Data, including json fields.\n * This is important for cloning operations but can be useful in other situations as well.\n * @param _referenceIds The Id64Set to populate with reference Ids.\n * @note This should be overridden (with `super` called) at each level the class hierarchy that introduces references.\n * @see getReferenceIds\n * @beta\n */\n protected collectReferenceIds(_referenceIds: EntityReferenceSet): void {\n return; // no references by default\n }\n}\n\n/** Parameter type that can accept both abstract constructor types and non-abstract constructor types for `instanceof` to test.\n * @public\n */\nexport type EntityClassType<T> = Function & { prototype: T }; // eslint-disable-line @typescript-eslint/no-unsafe-function-type\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityReferences.js","sourceRoot":"","sources":["../../src/EntityReferences.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,oDAAwH;AACxH,sDAAuD;AAEvD,mCAAgC;AAChC,uCAAoC;AACpC,mDAAgD;AAChD,iDAAiE;AACjE,iCAAiC;AAcjC;;;GAGG;AACH,IAAiB,gBAAgB,CAkEhC;AAlED,WAAiB,gBAAgB;IAC/B,SAAgB,OAAO,CAAC,EAAmB;QACzC,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,iCAAmB,CAAC,KAAK,CAAC;IAC7C,CAAC;IAFe,wBAAO,UAEtB,CAAA;IACD,SAAgB,SAAS,CAAC,EAAmB;QAC3C,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,iCAAmB,CAAC,OAAO,CAAC;IAC/C,CAAC;IAFe,0BAAS,YAExB,CAAA;IACD,SAAgB,eAAe,CAAC,EAAmB;QACjD,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,iCAAmB,CAAC,aAAa,CAAC;IACrD,CAAC;IAFe,gCAAe,kBAE9B,CAAA;IACD,SAAgB,cAAc,CAAC,EAAmB;QAChD,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,iCAAmB,CAAC,YAAY,CAAC;IACpD,CAAC;IAFe,+BAAc,iBAE7B,CAAA;IAC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AAE,CAAC,iBAAO,CAAC;YACzB,OAAO,iCAAmB,CAAC,OAAO,CAAC;aAChC,IAAI,WAAW,CAAC,EAAE,CAAC,6BAAa,CAAC;YACpC,OAAO,iCAAmB,CAAC,aAAa,CAAC;aACtC,IAAI,WAAW,CAAC,EAAE,CAAC,aAAK,CAAC;YAC5B,OAAO,iCAAmB,CAAC,KAAK,CAAC;aAC9B,IAAI,WAAW,CAAC,EAAE,CAAC,2BAAY,CAAC;YACnC,OAAO,iCAAmB,CAAC,YAAY,CAAC;;YAExC,MAAM,CAAC,KAAK,EAAE,iEAAiE,CAAC,CAAC;IACrF,CAAC;IAXe,8BAAa,gBAW5B,CAAA;AACH,CAAC,EAlEgB,gBAAgB,gCAAhB,gBAAgB,QAkEhC","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 Schema\r\n */\r\n\r\nimport { ConcreteEntityTypes, ElementAspectProps, ElementProps, EntityReference, ModelProps } from \"@itwin/core-common\";\r\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport type { Entity } from \"./Entity\";\r\nimport { Model } from \"./Model\";\r\nimport { Element } from \"./Element\";\r\nimport { ElementAspect } from \"./ElementAspect\";\r\nimport { Relationship, RelationshipProps } from \"./Relationship\";\r\nimport * as assert from \"assert\";\r\n\r\n/** Concrete classes that can be created, with the notable exception of CodeSpecs since it is does not derive from Entity\r\n * other entity classes. In the future if there is a need\r\n * to manage them this way, it can be added\r\n * @alpha\r\n */\r\nexport type ConcreteEntity = Element | Model | ElementAspect | Relationship;\r\n\r\n/** Props for a [[ConcreteEntity]]\r\n * @alpha\r\n */\r\nexport type ConcreteEntityProps = ElementProps | ModelProps | ElementAspectProps | RelationshipProps;\r\n\r\n/**\r\n * Utilities for the [EntityReference]($common) type which is a kind of strings\r\n * @alpha\r\n */\r\nexport namespace EntityReferences {\r\n export function isModel(id: EntityReference) {\r\n return id[0] === ConcreteEntityTypes.Model;\r\n }\r\n export function isElement(id: EntityReference) {\r\n return id[0] === ConcreteEntityTypes.Element;\r\n }\r\n export function isElementAspect(id: EntityReference) {\r\n return id[0] === ConcreteEntityTypes.ElementAspect;\r\n }\r\n export function isRelationship(id: EntityReference) {\r\n return id[0] === ConcreteEntityTypes.Relationship;\r\n }\r\n export function toId64(id: EntityReference) {\r\n return id.slice(1);\r\n }\r\n\r\n /** split a concrete entity id into its type and raw id */\r\n export function split(id: EntityReference): [ConcreteEntityTypes, Id64String] {\r\n return [id[0] as ConcreteEntityTypes, id.slice(1)];\r\n }\r\n\r\n /** used by the transformer to figure out where to check for the existence in a db of a concrete element id\r\n * @internal\r\n */\r\n export function isValid(id: EntityReference): boolean {\r\n return Id64.isValid(toId64(id));\r\n }\r\n\r\n /** create the invalid id for a concrete entity type\r\n * @internal\r\n */\r\n export function makeInvalid(type: ConcreteEntityTypes): EntityReference {\r\n return `${type}${Id64.invalid}`;\r\n }\r\n\r\n /** create an EntityReference given an entity */\r\n export function from(entity: ConcreteEntity): EntityReference {\r\n const type = typeFromClass(entity.constructor as typeof Entity);\r\n return `${type}${entity.id}`;\r\n }\r\n\r\n /** create an EntityReference given an id and a JavaScript class */\r\n export function fromClass(id: Id64String, entityClass: typeof Entity): EntityReference {\r\n const type = typeFromClass(entityClass);\r\n return `${type}${id}`;\r\n }\r\n\r\n /** Create an EntityReference quickly from an exact reference type and id */\r\n export function fromEntityType(id: Id64String, type: ConcreteEntityTypes): EntityReference {\r\n return `${type}${id}`;\r\n }\r\n\r\n /** @internal the argument entityClass be concrete (i.e. not the Entity abstract base class) */\r\n export function typeFromClass(entityClass: typeof Entity): ConcreteEntityTypes {\r\n if (entityClass.is(Element))\r\n return ConcreteEntityTypes.Element;\r\n else if (entityClass.is(ElementAspect))\r\n return ConcreteEntityTypes.ElementAspect;\r\n else if (entityClass.is(Model))\r\n return ConcreteEntityTypes.Model;\r\n else if (entityClass.is(Relationship))\r\n return ConcreteEntityTypes.Relationship;\r\n else\r\n assert(false, \"unknown or abstract entity type passed to EntityReferences.from\");\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"EntityReferences.js","sourceRoot":"","sources":["../../src/EntityReferences.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,oDAAwH;AACxH,sDAAuD;AAEvD,mCAAgC;AAChC,uCAAoC;AACpC,mDAAgD;AAChD,iDAAiE;AACjE,iCAAiC;AAcjC;;;GAGG;AACH,IAAiB,gBAAgB,CAkEhC;AAlED,WAAiB,gBAAgB;IAC/B,SAAgB,OAAO,CAAC,EAAmB;QACzC,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,iCAAmB,CAAC,KAAK,CAAC;IAC7C,CAAC;IAFe,wBAAO,UAEtB,CAAA;IACD,SAAgB,SAAS,CAAC,EAAmB;QAC3C,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,iCAAmB,CAAC,OAAO,CAAC;IAC/C,CAAC;IAFe,0BAAS,YAExB,CAAA;IACD,SAAgB,eAAe,CAAC,EAAmB;QACjD,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,iCAAmB,CAAC,aAAa,CAAC;IACrD,CAAC;IAFe,gCAAe,kBAE9B,CAAA;IACD,SAAgB,cAAc,CAAC,EAAmB;QAChD,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,iCAAmB,CAAC,YAAY,CAAC;IACpD,CAAC;IAFe,+BAAc,iBAE7B,CAAA;IACD,SAAgB,MAAM,CAAC,EAAmB;QACxC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACrB,CAAC;IAFe,uBAAM,SAErB,CAAA;IAED,0DAA0D;IAC1D,SAAgB,KAAK,CAAC,EAAmB;QACvC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAwB,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,C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AC,EAAE,CAAC,2BAAY,CAAC;YACnC,OAAO,iCAAmB,CAAC,YAAY,CAAC;;YAExC,MAAM,CAAC,KAAK,EAAE,iEAAiE,CAAC,CAAC;IACrF,CAAC;IAXe,8BAAa,gBAW5B,CAAA;AACH,CAAC,EAlEgB,gBAAgB,gCAAhB,gBAAgB,QAkEhC","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 Schema\n */\n\nimport { ConcreteEntityTypes, ElementAspectProps, ElementProps, EntityReference, ModelProps } from \"@itwin/core-common\";\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\nimport type { Entity } from \"./Entity\";\nimport { Model } from \"./Model\";\nimport { Element } from \"./Element\";\nimport { ElementAspect } from \"./ElementAspect\";\nimport { Relationship, RelationshipProps } from \"./Relationship\";\nimport * as assert from \"assert\";\n\n/** Concrete classes that can be created, with the notable exception of CodeSpecs since it is does not derive from Entity\n * other entity classes. In the future if there is a need\n * to manage them this way, it can be added\n * @alpha\n */\nexport type ConcreteEntity = Element | Model | ElementAspect | Relationship;\n\n/** Props for a [[ConcreteEntity]]\n * @alpha\n */\nexport type ConcreteEntityProps = ElementProps | ModelProps | ElementAspectProps | RelationshipProps;\n\n/**\n * Utilities for the [EntityReference]($common) type which is a kind of strings\n * @alpha\n */\nexport namespace EntityReferences {\n export function isModel(id: EntityReference) {\n return id[0] === ConcreteEntityTypes.Model;\n }\n export function isElement(id: EntityReference) {\n return id[0] === ConcreteEntityTypes.Element;\n }\n export function isElementAspect(id: EntityReference) {\n return id[0] === ConcreteEntityTypes.ElementAspect;\n }\n export function isRelationship(id: EntityReference) {\n return id[0] === ConcreteEntityTypes.Relationship;\n }\n export function toId64(id: EntityReference) {\n return id.slice(1);\n }\n\n /** split a concrete entity id into its type and raw id */\n export function split(id: EntityReference): [ConcreteEntityTypes, Id64String] {\n return [id[0] as ConcreteEntityTypes, id.slice(1)];\n }\n\n /** used by the transformer to figure out where to check for the existence in a db of a concrete element id\n * @internal\n */\n export function isValid(id: EntityReference): boolean {\n return Id64.isValid(toId64(id));\n }\n\n /** create the invalid id for a concrete entity type\n * @internal\n */\n export function makeInvalid(type: ConcreteEntityTypes): EntityReference {\n return `${type}${Id64.invalid}`;\n }\n\n /** create an EntityReference given an entity */\n export function from(entity: ConcreteEntity): EntityReference {\n const type = typeFromClass(entity.constructor as typeof Entity);\n return `${type}${entity.id}`;\n }\n\n /** create an EntityReference given an id and a JavaScript class */\n export function fromClass(id: Id64String, entityClass: typeof Entity): EntityReference {\n const type = typeFromClass(entityClass);\n return `${type}${id}`;\n }\n\n /** Create an EntityReference quickly from an exact reference type and id */\n export function fromEntityType(id: Id64String, type: ConcreteEntityTypes): EntityReference {\n return `${type}${id}`;\n }\n\n /** @internal the argument entityClass be concrete (i.e. not the Entity abstract base class) */\n export function typeFromClass(entityClass: typeof Entity): ConcreteEntityTypes {\n if (entityClass.is(Element))\n return ConcreteEntityTypes.Element;\n else if (entityClass.is(ElementAspect))\n return ConcreteEntityTypes.ElementAspect;\n else if (entityClass.is(Model))\n return ConcreteEntityTypes.Model;\n else if (entityClass.is(Relationship))\n return ConcreteEntityTypes.Relationship;\n else\n assert(false, \"unknown or abstract entity type passed to EntityReferences.from\");\n }\n}\n"]}
@@ -75,6 +75,10 @@ var ExportGraphics;
75
75
  * @public
76
76
  */
77
77
  class ExportGraphicsMeshVisitor extends core_geometry_1.PolyfaceData {
78
+ _currentFacetIndex;
79
+ _nextFacetIndex;
80
+ _numWrap;
81
+ _polyface;
78
82
  // to be called from static factory method that validates the polyface ...
79
83
  constructor(facets, numWrap) {
80
84
  super(facets.normals.length > 0, facets.params.length > 0, false, facets.isTwoSided);
@@ -1 +1 @@
1
- {"version":3,"file":"ExportGraphics.js","sourceRoot":"","sources":["../../src/ExportGraphics.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;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AAoC,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC7F,CAAC;IACD,6FAA6F;IACtF,YAAY,CAAC,KAAsB,EAAE,KAAa;QACvD,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACxD,IAAI,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,IAAI,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM;YACzD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QACtC,IAAI,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,IAAI,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM;YACzD,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACzD,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM;YAC5D,IAAI,CAAC,MAAM,CAAC,wBAAwB,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC9D,CAAC;CAEF;AA5ID,8DA4IC","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 ExportGraphics\r\n */\r\n\r\nimport { assert, Id64Array, Id64String } from \"@itwin/core-bentley\";\r\nimport { IndexedPolyface, Polyface, PolyfaceData, PolyfaceVisitor } from \"@itwin/core-geometry\";\r\nimport { ColorDefProps, GeometryClass } from \"@itwin/core-common\";\r\n\r\n/** A collection of line segments, suitable for direct use with graphics APIs.\r\n * The structure of this data matches GL_LINES in OpenGL.\r\n * See [IModelDb.exportGraphics]($core-backend)\r\n * @public\r\n */\r\nexport interface ExportGraphicsLines {\r\n /** Zero-based vertex indices, every two indices represent a line segment */\r\n indices: Int32Array;\r\n /** Vertices for these lines, laid out in the pattern XYZXYZ */\r\n points: Float64Array;\r\n}\r\n\r\n/** Info provided to ExportLinesFunction about linework graphics.\r\n * See [IModelDb.exportGraphics]($core-backend)\r\n * @public\r\n */\r\nexport interface ExportLinesInfo {\r\n /** The element ID for the element the graphics originated from */\r\n elementId: Id64String;\r\n /** ID for the [SubCategory]($core-backend) for these graphics */\r\n subCategory: Id64String;\r\n /** The color and transparency for these graphics */\r\n color: ColorDefProps;\r\n /** GeometryClass for these graphics */\r\n geometryClass: GeometryClass;\r\n /** The linework for these graphics */\r\n lines: ExportGraphicsLines;\r\n}\r\n\r\n/** A callback function that receives generated line graphics.\r\n * See [IModelDb.exportGraphics]($core-backend)\r\n * @public\r\n */\r\nexport type ExportLinesFunction = (info: ExportLinesInfo) => void;\r\n\r\n/** A triangulated mesh with unified indices, suitable for direct use with graphics APIs.\r\n * See [IModelDb.exportGraphics]($core-backend)\r\n * @public\r\n */\r\nexport interface ExportGraphicsMesh {\r\n /** Zero-based vertex indices, every three indices represent a triangle */\r\n indices: Int32Array;\r\n /** Vertices for this mesh, laid out in the pattern XYZXYZ */\r\n points: Float64Array;\r\n /** Normals for this mesh, laid out in the pattern XYZXYZ */\r\n normals: Float32Array;\r\n /** Parameters (uvs) for this mesh, laid out in the pattern XYXY */\r\n params: Float32Array;\r\n /** If true, clients should assume both sides of the mesh are visible and not cull backfaces. */\r\n isTwoSided: boolean;\r\n}\r\n\r\n/** Info provided to ExportGraphicsFunction about graphics.\r\n * See [IModelDb.exportGraphics]($core-backend)\r\n * @public\r\n */\r\nexport interface ExportGraphicsInfo {\r\n /** The element ID for the element the graphics originated from */\r\n elementId: Id64String;\r\n /** ID for the [SubCategory]($core-backend) for these graphics */\r\n subCategory: Id64String;\r\n /** The color and transparency for these graphics */\r\n color: ColorDefProps;\r\n /** GeometryClass for these graphics */\r\n geometryClass: GeometryClass;\r\n /** If defined, ID for the [RenderMaterialElement]($core-backend) for these graphics */\r\n materialId?: Id64String;\r\n /** If defined, ID for the [Texture]($core-backend) for these graphics */\r\n textureId?: Id64String;\r\n /** The mesh for these graphics */\r\n mesh: ExportGraphicsMesh;\r\n}\r\n\r\n/** Information about the base display properties when a [GeometryPart]($core-backend) was\r\n * referenced. This is intended to be used with [IModelDb.exportPartGraphics]($core-backend).\r\n * * If two ExportPartInstanceInfo have the same ExportPartDisplayInfos, they will result in the\r\n * same graphics (with a different transform).\r\n * * If two ExportPartInstanceInfo have different ExportPartDisplayInfos, they may result in different\r\n * graphics.\r\n * @public\r\n */\r\nexport interface ExportPartDisplayInfo {\r\n categoryId: Id64String;\r\n subCategoryId: Id64String;\r\n geometryClass: GeometryClass;\r\n materialId: Id64String;\r\n elmTransparency: number;\r\n lineColor: number;\r\n}\r\n\r\n/** Information about references to [GeometryPart]($core-backend) elements found during\r\n * a call to [IModelDb.exportGraphics]($core-backend).\r\n * See [IModelDb.exportPartGraphics]($core-backend) for the intended use case.\r\n * @public\r\n */\r\nexport interface ExportPartInstanceInfo {\r\n /** ID for the [GeometryPart]($core-backend) */\r\n partId: Id64String;\r\n /** ID for the element that contained the reference to the [GeometryPart]($core-backend) */\r\n partInstanceId: Id64String;\r\n /** The base display properties when the [GeometryPart]($core-backend) was referenced. */\r\n displayProps: ExportPartDisplayInfo;\r\n /** A row-major storage 4x3 transform for this instance.\r\n * See export-gltf under test-apps in the iTwin.js monorepo for a working reference.\r\n */\r\n transform?: Float64Array;\r\n}\r\n\r\n/** A callback function that receives generated graphics.\r\n * See [IModelDb.exportGraphics]($core-backend)\r\n * @public\r\n */\r\nexport type ExportGraphicsFunction = (info: ExportGraphicsInfo) => void;\r\n\r\n/** Parameters for [IModelDb.exportGraphics]($core-backend)\r\n * @public\r\n */\r\nexport interface ExportGraphicsOptions {\r\n /** The source elements for the exported graphics */\r\n elementIdArray: Id64Array;\r\n /** A function to call for each unique element ID, color and texture combination */\r\n onGraphics: ExportGraphicsFunction;\r\n /** An optional function to call if line graphics are desired. */\r\n onLineGraphics?: ExportLinesFunction;\r\n /** If supplied, any references to [GeometryPart]($core-backend) elements found will be\r\n * recorded in this array. In this case, graphics that would result from the GeometryPart\r\n * will not be supplied via onGraphics. See [IModelDb.exportPartGraphics]($core-backend)\r\n */\r\n partInstanceArray?: ExportPartInstanceInfo[];\r\n /** Max distance from a face to the original geometry, see [StrokeOptions]($core-geometry).\r\n * If not supplied, defaults to zero and angleTol will control the quality of the resulting mesh.\r\n */\r\n chordTol?: number;\r\n /** Max angle difference in radians for approximated face, see [StrokeOptions]($core-geometry).\r\n * If not supplied, defaults to PI/12 (15 degrees).\r\n */\r\n angleTol?: number;\r\n /** Max length of any edge in generated faces, see [StrokeOptions]($core-geometry).\r\n * If not supplied, there is no maximum length of an edge. Supplying this value can greatly increase the\r\n * size of the resulting geometry, and should only be done in cases where necessary (if you don't know\r\n * that it's necessary, it's almost certainly not!)\r\n */\r\n maxEdgeLength?: number;\r\n /** The longest dimension of a line style's largest component must be at least this size in order for\r\n * exportGraphics to evaluate and generate its graphics. If undefined, this defaults to 0.1.\r\n * Line styles can evaluate to 3D geometry that clients expect to receive from exportGraphics, but they\r\n * can also generate gigabytes of mesh data when line styles with small components are applied to long\r\n * line strings.\r\n */\r\n minLineStyleComponentSize?: number;\r\n /** Max distance between mesh vertices for them to be collapsed.\r\n * Meshes stored in GeometryStreams are unaffected by StrokeOptions settings. If decimationTol is undefined,\r\n * they are output from exportGraphics without any reduction in quality and can be too detailed for\r\n * some uses. However, decimation is a destructive operation that can introduce gaps and other visual\r\n * anomalies so it is important to choose an appropriate setting for your use case.\r\n */\r\n decimationTol?: number;\r\n /** BRep features with bounding boxes smaller than this size will not generate graphics.\r\n * This option can be used to ignore expensive details from [BRepEntity.DataProps]($core-common)\r\n * like screws and screw holes.\r\n */\r\n minBRepFeatureSize?: number;\r\n}\r\n\r\n/** Info provided to ExportPartFunction about graphics.\r\n * See [IModelDb.exportPartGraphics]($core-backend)\r\n * @public\r\n */\r\nexport interface ExportPartInfo {\r\n /** The color and transparency for these graphics */\r\n color: ColorDefProps;\r\n /** GeometryClass for these graphics */\r\n geometryClass: GeometryClass;\r\n /** If defined, ID for the [RenderMaterialElement]($core-backend) for these graphics */\r\n materialId?: Id64String;\r\n /** If defined, ID for the [Texture]($core-backend) for these graphics */\r\n textureId?: Id64String;\r\n /** The mesh for these graphics */\r\n mesh: ExportGraphicsMesh;\r\n}\r\n\r\n/** A callback function that receives generated graphics for a [GeometryPart]($core-backend).\r\n * See [IModelDb.exportPartGraphics]($core-backend)\r\n * @public\r\n */\r\nexport type ExportPartFunction = (info: ExportPartInfo) => void;\r\n\r\n/** Info provided to ExportPartFunction about line graphics.\r\n * See [IModelDb.exportPartGraphics]($core-backend)\r\n * @public\r\n */\r\nexport interface ExportPartLinesInfo {\r\n /** The color and transparency for these graphics */\r\n color: ColorDefProps;\r\n /** GeometryClass for these graphics */\r\n geometryClass: GeometryClass;\r\n /** The linework for these graphics */\r\n lines: ExportGraphicsLines;\r\n}\r\n\r\n/** A callback function that receives generated line graphics for a [GeometryPart]($core-backend).\r\n * See [IModelDb.exportPartGraphics]($core-backend)\r\n * @public\r\n */\r\nexport type ExportPartLinesFunction = (info: ExportPartLinesInfo) => void;\r\n\r\n/** Parameters for [IModelDb.exportPartGraphics]($core-backend)\r\n * @public\r\n */\r\nexport interface ExportPartGraphicsOptions {\r\n /** The ID for the source [GeometryPart]($core-backend) */\r\n elementId: Id64String;\r\n /** The base display properties to use for generating the graphics. This should come from an\r\n * ExportPartInstanceProps generated by [IModelDb.exportGraphics]($core-backend)\r\n */\r\n displayProps: ExportPartDisplayInfo;\r\n /** A function to call for each unique color and texture combination. */\r\n onPartGraphics: ExportPartFunction;\r\n /** An optional function to call if line graphics are desired. */\r\n onPartLineGraphics?: ExportPartLinesFunction;\r\n /** Max distance from a face to the original geometry, see [StrokeOptions]($core-geometry).\r\n * If not supplied, defaults to zero and angleTol will control the quality of the resulting mesh.\r\n */\r\n chordTol?: number;\r\n /** Max angle difference in radians for approximated face, see [StrokeOptions]($core-geometry).\r\n * If not supplied, defaults to PI/12 (15 degrees).\r\n */\r\n angleTol?: number;\r\n /** Max length of any edge in generated faces, see [StrokeOptions]($core-geometry)\r\n * If not supplied, there is no maximum length of an edge. Supplying this value can greatly increase the\r\n * size of the resulting geometry, and should only be done in cases where necessary (if you don't know\r\n * that it's necessary, it's almost certainly not!)\r\n */\r\n maxEdgeLength?: number;\r\n /** The longest dimension of a line style's largest component must be at least this size in order for\r\n * exportGraphics to evaluate and generate its graphics. If undefined, this defaults to 0.1.\r\n * Line styles can evaluate to 3D geometry that clients expect to receive from exportGraphics, but they\r\n * can also generate gigabytes of mesh data when line styles with small components are applied to long\r\n * line strings.\r\n */\r\n minLineStyleComponentSize?: number;\r\n /** Max distance between mesh vertices for them to be collapsed.\r\n * Meshes stored in GeometryStreams are unaffected by StrokeOptions settings. If decimationTol is undefined,\r\n * they are output from exportGraphics without any reduction in quality and can be too detailed for\r\n * some uses. However, decimation is a destructive operation that can introduce gaps and other visual\r\n * anomalies so it is important to choose an appropriate setting for your use case.\r\n */\r\n decimationTol?: number;\r\n /** BRep features with bounding boxes smaller than this size will not generate graphics.\r\n * This option can be used to ignore expensive details from [BRepEntity.DataProps]($core-common)\r\n * like screws and screw holes.\r\n */\r\n minBRepFeatureSize?: number;\r\n}\r\n\r\n/** Provides utility functions for working with data generated by [IModelDb.exportGraphics]($core-backend)\r\n * @public\r\n */\r\nexport namespace ExportGraphics {\r\n /** Test if ExportPartDisplayInfos have exactly the same values.\r\n * @public\r\n */\r\n export function arePartDisplayInfosEqual(lhs: ExportPartDisplayInfo, rhs: ExportPartDisplayInfo): boolean {\r\n if (lhs.categoryId !== rhs.categoryId)\r\n return false;\r\n if (lhs.subCategoryId !== rhs.subCategoryId)\r\n return false;\r\n if (lhs.materialId !== rhs.materialId)\r\n return false;\r\n if (lhs.elmTransparency !== rhs.elmTransparency)\r\n return false;\r\n if (lhs.lineColor !== rhs.lineColor)\r\n return false;\r\n return true;\r\n }\r\n\r\n /**\r\n * Convert an ExportGraphicsMesh to an IndexedPolyface usable by the geometry API.\r\n * @note The resulting IndexedPolyface may have duplicate points, normals and params. If problematic, call [PolyfaceData.compress]($core-geometry)\r\n * @public\r\n */\r\n export function convertToIndexedPolyface(mesh: ExportGraphicsMesh): IndexedPolyface {\r\n const polyface = IndexedPolyface.create(true, true, false, mesh.isTwoSided);\r\n\r\n const p: Float64Array = mesh.points;\r\n for (let i = 0; i < p.length; i += 3)\r\n polyface.data.point.pushXYZ(p[i], p[i + 1], p[i + 2]);\r\n\r\n const n: Float32Array = mesh.normals;\r\n assert(undefined !== polyface.data.normal);\r\n for (let i = 0; i < n.length; i += 3)\r\n polyface.data.normal.pushXYZ(n[i], n[i + 1], n[i + 2]);\r\n\r\n const uv: Float32Array = mesh.params;\r\n assert(undefined !== polyface.data.param);\r\n for (let i = 0; i < uv.length; i += 2)\r\n polyface.data.param.pushXY(uv[i], uv[i + 1]);\r\n\r\n const indices = mesh.indices;\r\n const addIndex = (idx: number) => {\r\n polyface.addPointIndex(idx, true);\r\n polyface.addNormalIndex(idx);\r\n polyface.addParamIndex(idx);\r\n };\r\n for (let i = 0; i < indices.length; i += 3) {\r\n addIndex(indices[i]);\r\n addIndex(indices[i + 1]);\r\n addIndex(indices[i + 2]);\r\n polyface.terminateFacet(false);\r\n }\r\n\r\n return polyface;\r\n }\r\n}\r\n/**\r\n * * Iterator to walk the facets of an ExportGraphicsMesh and present them to the world as if visiting a Polyface.\r\n * * Because the ExportGraphicsMesh has limited data:\r\n * * There is no auxData in this visitor.\r\n * * There is no color in this visitor.\r\n * * All edgeVisible are true.\r\n * @public\r\n */\r\nexport class ExportGraphicsMeshVisitor extends PolyfaceData implements PolyfaceVisitor {\r\n private _currentFacetIndex: number;\r\n private _nextFacetIndex: number;\r\n private _numWrap: number;\r\n private _polyface: ExportGraphicsMesh;\r\n // to be called from static factory method that validates the polyface ...\r\n private constructor(facets: ExportGraphicsMesh, numWrap: number) {\r\n super(facets.normals.length > 0, facets.params.length > 0, false, facets.isTwoSided);\r\n this._polyface = facets;\r\n this._numWrap = numWrap;\r\n\r\n this._nextFacetIndex = 0;\r\n this._currentFacetIndex = -1;\r\n this.twoSided = facets.isTwoSided;\r\n this.reset();\r\n }\r\n /** Create a visitor for iterating the facets of `polyface`, with indicated number of points to be added to each facet to produce closed point arrays\r\n * Typical wrap counts are:\r\n * * 0 -- leave the point arrays with \"missing final edge\"\r\n * * 1 -- add point 0 as closure point\r\n * * 2 -- add points 0 and 1 as closure and wrap point. This is useful when vertex visit requires two adjacent vectors, e.g. for cross products.\r\n */\r\n public static create(polyface: ExportGraphicsMesh, numWrap: number): ExportGraphicsMeshVisitor {\r\n return new ExportGraphicsMeshVisitor(polyface, numWrap);\r\n }\r\n /** Reset the iterator to start at the first facet of the polyface. */\r\n public reset(): void {\r\n this.moveToReadIndex(0);\r\n this._nextFacetIndex = 0; // so immediate moveToNextFacet stays here.\r\n }\r\n /** Select a facet by simple index. */\r\n public moveToReadIndex(facetIndex: number): boolean {\r\n if (facetIndex < 0 || 2 + facetIndex * 3 >= this._polyface.indices.length)\r\n return false;\r\n this._currentFacetIndex = facetIndex;\r\n this._nextFacetIndex = facetIndex + 1;\r\n this.point.length = 0;\r\n const points = this.point;\r\n points.length = 0;\r\n this.pointIndex.length = 0;\r\n this.point.length = 0;\r\n this.edgeVisible.length = 0;\r\n const sourcePoints = this._polyface.points;\r\n const indices = this._polyface.indices;\r\n const i0 = 3 * facetIndex;\r\n for (let i = i0; i < i0 + 3; i++) {\r\n const k = 3 * indices[i];\r\n this.pointIndex.push(indices[i]);\r\n this.point.pushXYZ(sourcePoints[k], sourcePoints[k + 1], sourcePoints[k + 2]);\r\n this.edgeVisible.push(true);\r\n }\r\n for (let i = 0; i < this._numWrap; i++) {\r\n this.point.pushFromGrowableXYZArray(this.point, i);\r\n }\r\n\r\n const sourceParams = this._polyface.params;\r\n if (sourceParams.length > 0 && this.paramIndex && this.param) {\r\n this.paramIndex.length = 0;\r\n this.param.length = 0;\r\n for (let i = i0; i < i0 + 3; i++) {\r\n const k = 2 * indices[i];\r\n this.paramIndex.push(indices[i]);\r\n this.param.pushXY(sourceParams[k], sourceParams[k + 1]);\r\n }\r\n for (let i = 0; i < this._numWrap; i++) {\r\n this.param.pushFromGrowableXYArray(this.param, i);\r\n }\r\n }\r\n\r\n const sourceNormals = this._polyface.normals;\r\n if (sourceNormals.length > 0 && this.normalIndex && this.normal) {\r\n this.normalIndex.length = 0;\r\n this.normal.length = 0;\r\n for (let i = i0; i < i0 + 3; i++) {\r\n const k = 3 * indices[i];\r\n this.normalIndex.push(indices[i]);\r\n this.normal.pushXYZ(sourceNormals[k], sourceNormals[k + 1], sourceNormals[k + 2]);\r\n }\r\n for (let i = 0; i < this._numWrap; i++) {\r\n this.normal.pushFromGrowableXYZArray(this.normal, i);\r\n }\r\n }\r\n return true;\r\n }\r\n public moveToNextFacet(): boolean {\r\n return this.moveToReadIndex(this._nextFacetIndex);\r\n }\r\n /** Set the number of vertices to replicate in visitor arrays. */\r\n public setNumWrap(numWrap: number): void { this._numWrap = numWrap; }\r\n\r\n /** Return the index (in the client polyface) of the current facet */\r\n public currentReadIndex(): number { return this._currentFacetIndex; }\r\n /** Return the point index of vertex i within the currently loaded facet */\r\n public clientPointIndex(i: number): number { return this.pointIndex[i]; }\r\n /** Return the param index of vertex i within the currently loaded facet.\r\n * Use the artificial paramIndex, which matches pointIndex.\r\n */\r\n public clientParamIndex(i: number): number { return this.paramIndex ? this.paramIndex[i] : -1; }\r\n /** Return the normal index of vertex i within the currently loaded facet.\r\n * Use the artificial paramIndex, which matches pointIndex.\r\n */\r\n public clientNormalIndex(i: number): number { return this.normalIndex ? this.normalIndex[i] : -1; }\r\n /** Return the color index of vertex i within the currently loaded facet */\r\n public clientColorIndex(_i: number): number { return 1; }\r\n /** Return the aux data index of vertex i within the currently loaded facet */\r\n public clientAuxIndex(_i: number): number { return -1; }\r\n\r\n /** return the client polyface */\r\n public clientPolyface(): Polyface { return (undefined as unknown) as Polyface; }\r\n /** clear the contents of all arrays. Use this along with transferDataFrom methods to build up new facets */\r\n public clearArrays(): void {\r\n if (this.point !== undefined)\r\n this.point.length = 0;\r\n if (this.param !== undefined)\r\n this.param.length = 0;\r\n if (this.normal !== undefined)\r\n this.normal.length = 0;\r\n // ignore color and aux -- they never exist.\r\n }\r\n /** transfer interpolated data from the other visitor.\r\n * * all data values are interpolated at `fraction` between `other` values at index0 and index1.\r\n */\r\n public pushInterpolatedDataFrom(other: PolyfaceVisitor, index0: number, fraction: number, index1: number): void {\r\n this.point.pushInterpolatedFromGrowableXYZArray(other.point, index0, fraction, index1);\r\n if (this.param && other.param && index0 < other.param.length && index1 < other.param.length)\r\n this.param.pushInterpolatedFromGrowableXYArray(other.param, index0, fraction, index1);\r\n if (this.normal && other.normal && index0 < other.normal.length && index1 < other.normal.length)\r\n this.normal.pushInterpolatedFromGrowableXYZArray(other.normal, index0, fraction, index1);\r\n }\r\n /** transfer data from a specified index of the other visitor as new data in this visitor. */\r\n public pushDataFrom(other: PolyfaceVisitor, index: number): void {\r\n this.point.pushFromGrowableXYZArray(other.point, index);\r\n if (this.color && other.color && index < other.color.length)\r\n this.color.push(other.color[index]);\r\n if (this.param && other.param && index < other.param.length)\r\n this.param.pushFromGrowableXYArray(other.param, index);\r\n if (this.normal && other.normal && index < other.normal.length)\r\n this.normal.pushFromGrowableXYZArray(other.normal, index);\r\n }\r\n\r\n}\r\n"]}
1
+ {"version":3,"file":"ExportGraphics.js","sourceRoot":"","sources":["../../src/ExportGraphics.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAoE;AACpE,wDAAgG;AAkQhG;;GAEG;AACH,IAAiB,cAAc,CAuD9B;AAvDD,WAAiB,cAAc;IAC7B;;OAEG;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E,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC7F,CAAC;IACD,6FAA6F;IACtF,YAAY,CAAC,KAAsB,EAAE,KAAa;QACvD,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACxD,IAAI,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,IAAI,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM;YACzD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QACtC,IAAI,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,IAAI,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM;YACzD,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACzD,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM;YAC5D,IAAI,CAAC,MAAM,CAAC,wBAAwB,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC9D,CAAC;CAEF;AA5ID,8DA4IC","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 ExportGraphics\n */\n\nimport { assert, Id64Array, Id64String } from \"@itwin/core-bentley\";\nimport { IndexedPolyface, Polyface, PolyfaceData, PolyfaceVisitor } from \"@itwin/core-geometry\";\nimport { ColorDefProps, GeometryClass } from \"@itwin/core-common\";\n\n/** A collection of line segments, suitable for direct use with graphics APIs.\n * The structure of this data matches GL_LINES in OpenGL.\n * See [IModelDb.exportGraphics]($core-backend)\n * @public\n */\nexport interface ExportGraphicsLines {\n /** Zero-based vertex indices, every two indices represent a line segment */\n indices: Int32Array;\n /** Vertices for these lines, laid out in the pattern XYZXYZ */\n points: Float64Array;\n}\n\n/** Info provided to ExportLinesFunction about linework graphics.\n * See [IModelDb.exportGraphics]($core-backend)\n * @public\n */\nexport interface ExportLinesInfo {\n /** The element ID for the element the graphics originated from */\n elementId: Id64String;\n /** ID for the [SubCategory]($core-backend) for these graphics */\n subCategory: Id64String;\n /** The color and transparency for these graphics */\n color: ColorDefProps;\n /** GeometryClass for these graphics */\n geometryClass: GeometryClass;\n /** The linework for these graphics */\n lines: ExportGraphicsLines;\n}\n\n/** A callback function that receives generated line graphics.\n * See [IModelDb.exportGraphics]($core-backend)\n * @public\n */\nexport type ExportLinesFunction = (info: ExportLinesInfo) => void;\n\n/** A triangulated mesh with unified indices, suitable for direct use with graphics APIs.\n * See [IModelDb.exportGraphics]($core-backend)\n * @public\n */\nexport interface ExportGraphicsMesh {\n /** Zero-based vertex indices, every three indices represent a triangle */\n indices: Int32Array;\n /** Vertices for this mesh, laid out in the pattern XYZXYZ */\n points: Float64Array;\n /** Normals for this mesh, laid out in the pattern XYZXYZ */\n normals: Float32Array;\n /** Parameters (uvs) for this mesh, laid out in the pattern XYXY */\n params: Float32Array;\n /** If true, clients should assume both sides of the mesh are visible and not cull backfaces. */\n isTwoSided: boolean;\n}\n\n/** Info provided to ExportGraphicsFunction about graphics.\n * See [IModelDb.exportGraphics]($core-backend)\n * @public\n */\nexport interface ExportGraphicsInfo {\n /** The element ID for the element the graphics originated from */\n elementId: Id64String;\n /** ID for the [SubCategory]($core-backend) for these graphics */\n subCategory: Id64String;\n /** The color and transparency for these graphics */\n color: ColorDefProps;\n /** GeometryClass for these graphics */\n geometryClass: GeometryClass;\n /** If defined, ID for the [RenderMaterialElement]($core-backend) for these graphics */\n materialId?: Id64String;\n /** If defined, ID for the [Texture]($core-backend) for these graphics */\n textureId?: Id64String;\n /** The mesh for these graphics */\n mesh: ExportGraphicsMesh;\n}\n\n/** Information about the base display properties when a [GeometryPart]($core-backend) was\n * referenced. This is intended to be used with [IModelDb.exportPartGraphics]($core-backend).\n * * If two ExportPartInstanceInfo have the same ExportPartDisplayInfos, they will result in the\n * same graphics (with a different transform).\n * * If two ExportPartInstanceInfo have different ExportPartDisplayInfos, they may result in different\n * graphics.\n * @public\n */\nexport interface ExportPartDisplayInfo {\n categoryId: Id64String;\n subCategoryId: Id64String;\n geometryClass: GeometryClass;\n materialId: Id64String;\n elmTransparency: number;\n lineColor: number;\n}\n\n/** Information about references to [GeometryPart]($core-backend) elements found during\n * a call to [IModelDb.exportGraphics]($core-backend).\n * See [IModelDb.exportPartGraphics]($core-backend) for the intended use case.\n * @public\n */\nexport interface ExportPartInstanceInfo {\n /** ID for the [GeometryPart]($core-backend) */\n partId: Id64String;\n /** ID for the element that contained the reference to the [GeometryPart]($core-backend) */\n partInstanceId: Id64String;\n /** The base display properties when the [GeometryPart]($core-backend) was referenced. */\n displayProps: ExportPartDisplayInfo;\n /** A row-major storage 4x3 transform for this instance.\n * See export-gltf under test-apps in the iTwin.js monorepo for a working reference.\n */\n transform?: Float64Array;\n}\n\n/** A callback function that receives generated graphics.\n * See [IModelDb.exportGraphics]($core-backend)\n * @public\n */\nexport type ExportGraphicsFunction = (info: ExportGraphicsInfo) => void;\n\n/** Parameters for [IModelDb.exportGraphics]($core-backend)\n * @public\n */\nexport interface ExportGraphicsOptions {\n /** The source elements for the exported graphics */\n elementIdArray: Id64Array;\n /** A function to call for each unique element ID, color and texture combination */\n onGraphics: ExportGraphicsFunction;\n /** An optional function to call if line graphics are desired. */\n onLineGraphics?: ExportLinesFunction;\n /** If supplied, any references to [GeometryPart]($core-backend) elements found will be\n * recorded in this array. In this case, graphics that would result from the GeometryPart\n * will not be supplied via onGraphics. See [IModelDb.exportPartGraphics]($core-backend)\n */\n partInstanceArray?: ExportPartInstanceInfo[];\n /** Max distance from a face to the original geometry, see [StrokeOptions]($core-geometry).\n * If not supplied, defaults to zero and angleTol will control the quality of the resulting mesh.\n */\n chordTol?: number;\n /** Max angle difference in radians for approximated face, see [StrokeOptions]($core-geometry).\n * If not supplied, defaults to PI/12 (15 degrees).\n */\n angleTol?: number;\n /** Max length of any edge in generated faces, see [StrokeOptions]($core-geometry).\n * If not supplied, there is no maximum length of an edge. Supplying this value can greatly increase the\n * size of the resulting geometry, and should only be done in cases where necessary (if you don't know\n * that it's necessary, it's almost certainly not!)\n */\n maxEdgeLength?: number;\n /** The longest dimension of a line style's largest component must be at least this size in order for\n * exportGraphics to evaluate and generate its graphics. If undefined, this defaults to 0.1.\n * Line styles can evaluate to 3D geometry that clients expect to receive from exportGraphics, but they\n * can also generate gigabytes of mesh data when line styles with small components are applied to long\n * line strings.\n */\n minLineStyleComponentSize?: number;\n /** Max distance between mesh vertices for them to be collapsed.\n * Meshes stored in GeometryStreams are unaffected by StrokeOptions settings. If decimationTol is undefined,\n * they are output from exportGraphics without any reduction in quality and can be too detailed for\n * some uses. However, decimation is a destructive operation that can introduce gaps and other visual\n * anomalies so it is important to choose an appropriate setting for your use case.\n */\n decimationTol?: number;\n /** BRep features with bounding boxes smaller than this size will not generate graphics.\n * This option can be used to ignore expensive details from [BRepEntity.DataProps]($core-common)\n * like screws and screw holes.\n */\n minBRepFeatureSize?: number;\n}\n\n/** Info provided to ExportPartFunction about graphics.\n * See [IModelDb.exportPartGraphics]($core-backend)\n * @public\n */\nexport interface ExportPartInfo {\n /** The color and transparency for these graphics */\n color: ColorDefProps;\n /** GeometryClass for these graphics */\n geometryClass: GeometryClass;\n /** If defined, ID for the [RenderMaterialElement]($core-backend) for these graphics */\n materialId?: Id64String;\n /** If defined, ID for the [Texture]($core-backend) for these graphics */\n textureId?: Id64String;\n /** The mesh for these graphics */\n mesh: ExportGraphicsMesh;\n}\n\n/** A callback function that receives generated graphics for a [GeometryPart]($core-backend).\n * See [IModelDb.exportPartGraphics]($core-backend)\n * @public\n */\nexport type ExportPartFunction = (info: ExportPartInfo) => void;\n\n/** Info provided to ExportPartFunction about line graphics.\n * See [IModelDb.exportPartGraphics]($core-backend)\n * @public\n */\nexport interface ExportPartLinesInfo {\n /** The color and transparency for these graphics */\n color: ColorDefProps;\n /** GeometryClass for these graphics */\n geometryClass: GeometryClass;\n /** The linework for these graphics */\n lines: ExportGraphicsLines;\n}\n\n/** A callback function that receives generated line graphics for a [GeometryPart]($core-backend).\n * See [IModelDb.exportPartGraphics]($core-backend)\n * @public\n */\nexport type ExportPartLinesFunction = (info: ExportPartLinesInfo) => void;\n\n/** Parameters for [IModelDb.exportPartGraphics]($core-backend)\n * @public\n */\nexport interface ExportPartGraphicsOptions {\n /** The ID for the source [GeometryPart]($core-backend) */\n elementId: Id64String;\n /** The base display properties to use for generating the graphics. This should come from an\n * ExportPartInstanceProps generated by [IModelDb.exportGraphics]($core-backend)\n */\n displayProps: ExportPartDisplayInfo;\n /** A function to call for each unique color and texture combination. */\n onPartGraphics: ExportPartFunction;\n /** An optional function to call if line graphics are desired. */\n onPartLineGraphics?: ExportPartLinesFunction;\n /** Max distance from a face to the original geometry, see [StrokeOptions]($core-geometry).\n * If not supplied, defaults to zero and angleTol will control the quality of the resulting mesh.\n */\n chordTol?: number;\n /** Max angle difference in radians for approximated face, see [StrokeOptions]($core-geometry).\n * If not supplied, defaults to PI/12 (15 degrees).\n */\n angleTol?: number;\n /** Max length of any edge in generated faces, see [StrokeOptions]($core-geometry)\n * If not supplied, there is no maximum length of an edge. Supplying this value can greatly increase the\n * size of the resulting geometry, and should only be done in cases where necessary (if you don't know\n * that it's necessary, it's almost certainly not!)\n */\n maxEdgeLength?: number;\n /** The longest dimension of a line style's largest component must be at least this size in order for\n * exportGraphics to evaluate and generate its graphics. If undefined, this defaults to 0.1.\n * Line styles can evaluate to 3D geometry that clients expect to receive from exportGraphics, but they\n * can also generate gigabytes of mesh data when line styles with small components are applied to long\n * line strings.\n */\n minLineStyleComponentSize?: number;\n /** Max distance between mesh vertices for them to be collapsed.\n * Meshes stored in GeometryStreams are unaffected by StrokeOptions settings. If decimationTol is undefined,\n * they are output from exportGraphics without any reduction in quality and can be too detailed for\n * some uses. However, decimation is a destructive operation that can introduce gaps and other visual\n * anomalies so it is important to choose an appropriate setting for your use case.\n */\n decimationTol?: number;\n /** BRep features with bounding boxes smaller than this size will not generate graphics.\n * This option can be used to ignore expensive details from [BRepEntity.DataProps]($core-common)\n * like screws and screw holes.\n */\n minBRepFeatureSize?: number;\n}\n\n/** Provides utility functions for working with data generated by [IModelDb.exportGraphics]($core-backend)\n * @public\n */\nexport namespace ExportGraphics {\n /** Test if ExportPartDisplayInfos have exactly the same values.\n * @public\n */\n export function arePartDisplayInfosEqual(lhs: ExportPartDisplayInfo, rhs: ExportPartDisplayInfo): boolean {\n if (lhs.categoryId !== rhs.categoryId)\n return false;\n if (lhs.subCategoryId !== rhs.subCategoryId)\n return false;\n if (lhs.materialId !== rhs.materialId)\n return false;\n if (lhs.elmTransparency !== rhs.elmTransparency)\n return false;\n if (lhs.lineColor !== rhs.lineColor)\n return false;\n return true;\n }\n\n /**\n * Convert an ExportGraphicsMesh to an IndexedPolyface usable by the geometry API.\n * @note The resulting IndexedPolyface may have duplicate points, normals and params. If problematic, call [PolyfaceData.compress]($core-geometry)\n * @public\n */\n export function convertToIndexedPolyface(mesh: ExportGraphicsMesh): IndexedPolyface {\n const polyface = IndexedPolyface.create(true, true, false, mesh.isTwoSided);\n\n const p: Float64Array = mesh.points;\n for (let i = 0; i < p.length; i += 3)\n polyface.data.point.pushXYZ(p[i], p[i + 1], p[i + 2]);\n\n const n: Float32Array = mesh.normals;\n assert(undefined !== polyface.data.normal);\n for (let i = 0; i < n.length; i += 3)\n polyface.data.normal.pushXYZ(n[i], n[i + 1], n[i + 2]);\n\n const uv: Float32Array = mesh.params;\n assert(undefined !== polyface.data.param);\n for (let i = 0; i < uv.length; i += 2)\n polyface.data.param.pushXY(uv[i], uv[i + 1]);\n\n const indices = mesh.indices;\n const addIndex = (idx: number) => {\n polyface.addPointIndex(idx, true);\n polyface.addNormalIndex(idx);\n polyface.addParamIndex(idx);\n };\n for (let i = 0; i < indices.length; i += 3) {\n addIndex(indices[i]);\n addIndex(indices[i + 1]);\n addIndex(indices[i + 2]);\n polyface.terminateFacet(false);\n }\n\n return polyface;\n }\n}\n/**\n * * Iterator to walk the facets of an ExportGraphicsMesh and present them to the world as if visiting a Polyface.\n * * Because the ExportGraphicsMesh has limited data:\n * * There is no auxData in this visitor.\n * * There is no color in this visitor.\n * * All edgeVisible are true.\n * @public\n */\nexport class ExportGraphicsMeshVisitor extends PolyfaceData implements PolyfaceVisitor {\n private _currentFacetIndex: number;\n private _nextFacetIndex: number;\n private _numWrap: number;\n private _polyface: ExportGraphicsMesh;\n // to be called from static factory method that validates the polyface ...\n private constructor(facets: ExportGraphicsMesh, numWrap: number) {\n super(facets.normals.length > 0, facets.params.length > 0, false, facets.isTwoSided);\n this._polyface = facets;\n this._numWrap = numWrap;\n\n this._nextFacetIndex = 0;\n this._currentFacetIndex = -1;\n this.twoSided = facets.isTwoSided;\n this.reset();\n }\n /** Create a visitor for iterating the facets of `polyface`, with indicated number of points to be added to each facet to produce closed point arrays\n * Typical wrap counts are:\n * * 0 -- leave the point arrays with \"missing final edge\"\n * * 1 -- add point 0 as closure point\n * * 2 -- add points 0 and 1 as closure and wrap point. This is useful when vertex visit requires two adjacent vectors, e.g. for cross products.\n */\n public static create(polyface: ExportGraphicsMesh, numWrap: number): ExportGraphicsMeshVisitor {\n return new ExportGraphicsMeshVisitor(polyface, numWrap);\n }\n /** Reset the iterator to start at the first facet of the polyface. */\n public reset(): void {\n this.moveToReadIndex(0);\n this._nextFacetIndex = 0; // so immediate moveToNextFacet stays here.\n }\n /** Select a facet by simple index. */\n public moveToReadIndex(facetIndex: number): boolean {\n if (facetIndex < 0 || 2 + facetIndex * 3 >= this._polyface.indices.length)\n return false;\n this._currentFacetIndex = facetIndex;\n this._nextFacetIndex = facetIndex + 1;\n this.point.length = 0;\n const points = this.point;\n points.length = 0;\n this.pointIndex.length = 0;\n this.point.length = 0;\n this.edgeVisible.length = 0;\n const sourcePoints = this._polyface.points;\n const indices = this._polyface.indices;\n const i0 = 3 * facetIndex;\n for (let i = i0; i < i0 + 3; i++) {\n const k = 3 * indices[i];\n this.pointIndex.push(indices[i]);\n this.point.pushXYZ(sourcePoints[k], sourcePoints[k + 1], sourcePoints[k + 2]);\n this.edgeVisible.push(true);\n }\n for (let i = 0; i < this._numWrap; i++) {\n this.point.pushFromGrowableXYZArray(this.point, i);\n }\n\n const sourceParams = this._polyface.params;\n if (sourceParams.length > 0 && this.paramIndex && this.param) {\n this.paramIndex.length = 0;\n this.param.length = 0;\n for (let i = i0; i < i0 + 3; i++) {\n const k = 2 * indices[i];\n this.paramIndex.push(indices[i]);\n this.param.pushXY(sourceParams[k], sourceParams[k + 1]);\n }\n for (let i = 0; i < this._numWrap; i++) {\n this.param.pushFromGrowableXYArray(this.param, i);\n }\n }\n\n const sourceNormals = this._polyface.normals;\n if (sourceNormals.length > 0 && this.normalIndex && this.normal) {\n this.normalIndex.length = 0;\n this.normal.length = 0;\n for (let i = i0; i < i0 + 3; i++) {\n const k = 3 * indices[i];\n this.normalIndex.push(indices[i]);\n this.normal.pushXYZ(sourceNormals[k], sourceNormals[k + 1], sourceNormals[k + 2]);\n }\n for (let i = 0; i < this._numWrap; i++) {\n this.normal.pushFromGrowableXYZArray(this.normal, i);\n }\n }\n return true;\n }\n public moveToNextFacet(): boolean {\n return this.moveToReadIndex(this._nextFacetIndex);\n }\n /** Set the number of vertices to replicate in visitor arrays. */\n public setNumWrap(numWrap: number): void { this._numWrap = numWrap; }\n\n /** Return the index (in the client polyface) of the current facet */\n public currentReadIndex(): number { return this._currentFacetIndex; }\n /** Return the point index of vertex i within the currently loaded facet */\n public clientPointIndex(i: number): number { return this.pointIndex[i]; }\n /** Return the param index of vertex i within the currently loaded facet.\n * Use the artificial paramIndex, which matches pointIndex.\n */\n public clientParamIndex(i: number): number { return this.paramIndex ? this.paramIndex[i] : -1; }\n /** Return the normal index of vertex i within the currently loaded facet.\n * Use the artificial paramIndex, which matches pointIndex.\n */\n public clientNormalIndex(i: number): number { return this.normalIndex ? this.normalIndex[i] : -1; }\n /** Return the color index of vertex i within the currently loaded facet */\n public clientColorIndex(_i: number): number { return 1; }\n /** Return the aux data index of vertex i within the currently loaded facet */\n public clientAuxIndex(_i: number): number { return -1; }\n\n /** return the client polyface */\n public clientPolyface(): Polyface { return (undefined as unknown) as Polyface; }\n /** clear the contents of all arrays. Use this along with transferDataFrom methods to build up new facets */\n public clearArrays(): void {\n if (this.point !== undefined)\n this.point.length = 0;\n if (this.param !== undefined)\n this.param.length = 0;\n if (this.normal !== undefined)\n this.normal.length = 0;\n // ignore color and aux -- they never exist.\n }\n /** transfer interpolated data from the other visitor.\n * * all data values are interpolated at `fraction` between `other` values at index0 and index1.\n */\n public pushInterpolatedDataFrom(other: PolyfaceVisitor, index0: number, fraction: number, index1: number): void {\n this.point.pushInterpolatedFromGrowableXYZArray(other.point, index0, fraction, index1);\n if (this.param && other.param && index0 < other.param.length && index1 < other.param.length)\n this.param.pushInterpolatedFromGrowableXYArray(other.param, index0, fraction, index1);\n if (this.normal && other.normal && index0 < other.normal.length && index1 < other.normal.length)\n this.normal.pushInterpolatedFromGrowableXYZArray(other.normal, index0, fraction, index1);\n }\n /** transfer data from a specified index of the other visitor as new data in this visitor. */\n public pushDataFrom(other: PolyfaceVisitor, index: number): void {\n this.point.pushFromGrowableXYZArray(other.point, index);\n if (this.color && other.color && index < other.color.length)\n this.color.push(other.color[index]);\n if (this.param && other.param && index < other.param.length)\n this.param.pushFromGrowableXYArray(other.param, index);\n if (this.normal && other.normal && index < other.normal.length)\n this.normal.pushFromGrowableXYZArray(other.normal, index);\n }\n\n}\n"]}
@@ -17,6 +17,12 @@ const NavigationRelationship_1 = require("./NavigationRelationship");
17
17
  * @beta
18
18
  */
19
19
  class ExternalSource extends Element_1.InformationReferenceElement {
20
+ /** The repository that contains this ExternalSource. */
21
+ repository;
22
+ /** The name of the iModel Connecter that processed this ExternalSource. */
23
+ connectorName;
24
+ /** The version of the iModel Connecter that processed this ExternalSource. */
25
+ connectorVersion;
20
26
  /** @internal */
21
27
  static get className() { return "ExternalSource"; }
22
28
  constructor(props, iModel) {
@@ -58,6 +64,20 @@ exports.ExternalSource = ExternalSource;
58
64
  * @beta
59
65
  */
60
66
  class ExternalSourceAttachment extends Element_1.InformationReferenceElement {
67
+ /** The [[ExternalSource]] that is attached by this ExternalSourceAttachment. */
68
+ attaches;
69
+ /** Specifies whether the attached [[ExternalSource]] provides context or models a part of the whole. */
70
+ role;
71
+ /** The translation or offset in global coordinates of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */
72
+ translation;
73
+ /** The Yaw angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */
74
+ yaw;
75
+ /** The Pitch angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */
76
+ pitch;
77
+ /** The Roll angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */
78
+ roll;
79
+ /** The scale of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */
80
+ scale;
61
81
  /** @internal */
62
82
  static get className() { return "ExternalSourceAttachment"; }
63
83
  constructor(props, iModel) {
@@ -111,6 +131,8 @@ exports.ExternalSourceGroup = ExternalSourceGroup;
111
131
  * @beta
112
132
  */
113
133
  class SynchronizationConfigLink extends Element_1.UrlLink {
134
+ /** Date/Time of last successful run of this synchronization configuration */
135
+ lastSuccessfulRun;
114
136
  /** @internal */
115
137
  static get className() { return "SynchronizationConfigLink"; }
116
138
  constructor(props, iModel) {
@@ -1 +1 @@
1
- {"version":3,"file":"ExternalSource.js","sourceRoot":"","sources":["../../src/ExternalSource.ts"],"names":[],"mappings":";AACA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,wDAA+C;AAC/C,oDAG4B;AAC5B,uCAAiE;AAEjE,qEAAgH;AAEhH;;;GAGG;AACH,MAAa,cAAe,SAAQ,qCAA2B;IAO7D,gBAAgB;IACT,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AC,SAAS,CAAC,yBAAW,CAAC,wBAAwB,CAAC,CAAC;QACpF,OAAO,IAAI,kBAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAClF,CAAC;CACF;AApDD,4DAoDC;AAED;;;GAGG;AACH,MAAa,mBAAoB,SAAQ,cAAc;IACrD,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,qBAAqB,CAAC,CAAC,CAAC;IAEhF,YAAsB,KAA0B,EAAE,MAAgB;QAChE,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACvB,CAAC;CACF;AAPD,kDAOC;AAED;;;GAGG;AACH,MAAa,yBAA0B,SAAQ,iBAAO;IAGpD,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,2BAA2B,CAAC,CAAC,CAAC;IAEtF,YAAsB,KAAqC,EAAE,MAAgB;QAC3E,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACvB,CAAC;IAEe,MAAM;QACpB,OAAO,KAAK,CAAC,MAAM,EAAoC,CAAC,CAAC,sDAAsD;IACjH,CAAC;CACF;AAbD,8DAaC","sourcesContent":["\r\n/*---------------------------------------------------------------------------------------------\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 { Id64String } from \"@itwin/core-bentley\";\r\nimport { Point3d } from \"@itwin/core-geometry\";\r\nimport {\r\n BisCodeSpec, Code, CodeScopeSpec, EntityReferenceSet, ExternalSourceAttachmentProps, ExternalSourceAttachmentRole, ExternalSourceProps, IModel, RelatedElement,\r\n SynchronizationConfigLinkProps,\r\n} from \"@itwin/core-common\";\r\nimport { InformationReferenceElement, UrlLink } from \"./Element\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { ExternalSourceAttachmentAttachesSource, ExternalSourceIsInRepository } from \"./NavigationRelationship\";\r\n\r\n/** An ExternalSource refers to an 'information container' found in a repository. In some cases, the container is the entire repository.\r\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\r\n * @beta\r\n */\r\nexport class ExternalSource extends InformationReferenceElement {\r\n /** The repository that contains this ExternalSource. */\r\n public repository?: ExternalSourceIsInRepository;\r\n /** The name of the iModel Connecter that processed this ExternalSource. */\r\n public connectorName?: string;\r\n /** The version of the iModel Connecter that processed this ExternalSource. */\r\n public connectorVersion?: string;\r\n /** @internal */\r\n public static override get className(): string { return \"ExternalSource\"; }\r\n\r\n protected constructor(props: ExternalSourceProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n if (props.repository)\r\n this.repository = new ExternalSourceIsInRepository(RelatedElement.idFromJson(props.repository));\r\n }\r\n\r\n public override toJSON(): ExternalSourceProps { // This override only specializes the return type\r\n return super.toJSON() as ExternalSourceProps; // Entity.toJSON takes care of auto-handled properties\r\n }\r\n /** The [[CodeSpec]] for ExternalSource elements is not automatically created, so this method ensures that it exists. */\r\n public static ensureCodeSpec(iModelDb: IModelDb): Id64String {\r\n try {\r\n const codeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.externalSource);\r\n return codeSpec.id;\r\n } catch {\r\n return iModelDb.codeSpecs.insert(BisCodeSpec.externalSource, CodeScopeSpec.Type.Repository);\r\n }\r\n }\r\n /** Create a Code for an ExternalSource element given a name that is meant to be unique within the scope of the iModel.\r\n * @param iModelDb The IModelDb\r\n * @param codeValue The ExternalSource name\r\n * @see [[ensureCodeSpec]]\r\n */\r\n public static createCode(iModelDb: IModelDb, codeValue: string): Code {\r\n const codeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.externalSource);\r\n return new Code({ spec: codeSpec.id, scope: IModel.rootSubjectId, value: codeValue });\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n if (this.repository)\r\n referenceIds.addElement(this.repository.id);\r\n }\r\n}\r\n\r\n/** Attachment of an ExternalSource\r\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\r\n * @beta\r\n */\r\nexport class ExternalSourceAttachment extends InformationReferenceElement {\r\n /** The [[ExternalSource]] that is attached by this ExternalSourceAttachment. */\r\n public attaches?: ExternalSourceAttachmentAttachesSource;\r\n /** Specifies whether the attached [[ExternalSource]] provides context or models a part of the whole. */\r\n public role?: ExternalSourceAttachmentRole;\r\n /** The translation or offset in global coordinates of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */\r\n public translation?: Point3d;\r\n /** The Yaw angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */\r\n public yaw?: number;\r\n /** The Pitch angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */\r\n public pitch?: number;\r\n /** The Roll angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */\r\n public roll?: number;\r\n /** The scale of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */\r\n public scale?: Point3d;\r\n /** @internal */\r\n public static override get className(): string { return \"ExternalSourceAttachment\"; }\r\n\r\n protected constructor(props: ExternalSourceAttachmentProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n if (props.attaches)\r\n this.attaches = new ExternalSourceAttachmentAttachesSource(RelatedElement.idFromJson(props.attaches));\r\n\r\n if (props.translation)\r\n this.translation = Point3d.fromJSON(props.translation);\r\n\r\n if (props.scale)\r\n this.scale = Point3d.fromJSON(props.scale);\r\n }\r\n\r\n public override toJSON(): ExternalSourceAttachmentProps { // This override only specializes the return type\r\n return super.toJSON() as ExternalSourceAttachmentProps; // Entity.toJSON takes care of auto-handled properties\r\n }\r\n /** The [[CodeSpec]] for ExternalSourceAttachment elements is not automatically created, so this method ensures that it exists. */\r\n public static ensureCodeSpec(iModelDb: IModelDb): Id64String {\r\n try {\r\n const codeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.externalSourceAttachment);\r\n return codeSpec.id;\r\n } catch {\r\n return iModelDb.codeSpecs.insert(BisCodeSpec.externalSourceAttachment, CodeScopeSpec.Type.ParentElement);\r\n }\r\n }\r\n /** Create a Code for an ExternalSourceAttachment element given a name that is meant to be unique within the scope of its parent [[ExternalSource]].\r\n * @param iModelDb The IModelDb\r\n * @param scopeElementId The parent ExternalSource\r\n * @param codeValue The ExternalSourceAttachment name\r\n * @see [[ensureCodeSpec]]\r\n */\r\n public static createCode(iModelDb: IModelDb, scopeElementId: Id64String, codeValue: string): Code {\r\n const codeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.externalSourceAttachment);\r\n return new Code({ spec: codeSpec.id, scope: scopeElementId, value: codeValue });\r\n }\r\n}\r\n\r\n/** A group of ExternalSources that are collectively a source of information for one or more elements.\r\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\r\n * @beta\r\n */\r\nexport class ExternalSourceGroup extends ExternalSource {\r\n /** @internal */\r\n public static override get className(): string { return \"ExternalSourceGroup\"; }\r\n\r\n protected constructor(props: ExternalSourceProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n}\r\n\r\n/** Link to the Configuration for an iModel Synchronization Job\r\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\r\n * @beta\r\n */\r\nexport class SynchronizationConfigLink extends UrlLink {\r\n /** Date/Time of last successful run of this synchronization configuration */\r\n public lastSuccessfulRun?: string;\r\n /** @internal */\r\n public static override get className(): string { return \"SynchronizationConfigLink\"; }\r\n\r\n protected constructor(props: SynchronizationConfigLinkProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n\r\n public override toJSON(): SynchronizationConfigLinkProps { // This override only specializes the return type\r\n return super.toJSON() as SynchronizationConfigLinkProps; // Entity.toJSON takes care of auto-handled properties\r\n }\r\n}\r\n\r\n"]}
1
+ {"version":3,"file":"ExternalSource.js","sourceRoot":"","sources":["../../src/ExternalSource.ts"],"names":[],"mappings":";AACA;;;+FAG+F;AA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AoC,CAAC,CAAC,sDAAsD;IACjH,CAAC;CACF;AAbD,8DAaC","sourcesContent":["\n/*---------------------------------------------------------------------------------------------\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 { Id64String } from \"@itwin/core-bentley\";\nimport { Point3d } from \"@itwin/core-geometry\";\nimport {\n BisCodeSpec, Code, CodeScopeSpec, EntityReferenceSet, ExternalSourceAttachmentProps, ExternalSourceAttachmentRole, ExternalSourceProps, IModel, RelatedElement,\n SynchronizationConfigLinkProps,\n} from \"@itwin/core-common\";\nimport { InformationReferenceElement, UrlLink } from \"./Element\";\nimport { IModelDb } from \"./IModelDb\";\nimport { ExternalSourceAttachmentAttachesSource, ExternalSourceIsInRepository } from \"./NavigationRelationship\";\n\n/** An ExternalSource refers to an 'information container' found in a repository. In some cases, the container is the entire repository.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class ExternalSource extends InformationReferenceElement {\n /** The repository that contains this ExternalSource. */\n public repository?: ExternalSourceIsInRepository;\n /** The name of the iModel Connecter that processed this ExternalSource. */\n public connectorName?: string;\n /** The version of the iModel Connecter that processed this ExternalSource. */\n public connectorVersion?: string;\n /** @internal */\n public static override get className(): string { return \"ExternalSource\"; }\n\n protected constructor(props: ExternalSourceProps, iModel: IModelDb) {\n super(props, iModel);\n if (props.repository)\n this.repository = new ExternalSourceIsInRepository(RelatedElement.idFromJson(props.repository));\n }\n\n public override toJSON(): ExternalSourceProps { // This override only specializes the return type\n return super.toJSON() as ExternalSourceProps; // Entity.toJSON takes care of auto-handled properties\n }\n /** The [[CodeSpec]] for ExternalSource elements is not automatically created, so this method ensures that it exists. */\n public static ensureCodeSpec(iModelDb: IModelDb): Id64String {\n try {\n const codeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.externalSource);\n return codeSpec.id;\n } catch {\n return iModelDb.codeSpecs.insert(BisCodeSpec.externalSource, CodeScopeSpec.Type.Repository);\n }\n }\n /** Create a Code for an ExternalSource element given a name that is meant to be unique within the scope of the iModel.\n * @param iModelDb The IModelDb\n * @param codeValue The ExternalSource name\n * @see [[ensureCodeSpec]]\n */\n public static createCode(iModelDb: IModelDb, codeValue: string): Code {\n const codeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.externalSource);\n return new Code({ spec: codeSpec.id, scope: IModel.rootSubjectId, value: codeValue });\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (this.repository)\n referenceIds.addElement(this.repository.id);\n }\n}\n\n/** Attachment of an ExternalSource\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class ExternalSourceAttachment extends InformationReferenceElement {\n /** The [[ExternalSource]] that is attached by this ExternalSourceAttachment. */\n public attaches?: ExternalSourceAttachmentAttachesSource;\n /** Specifies whether the attached [[ExternalSource]] provides context or models a part of the whole. */\n public role?: ExternalSourceAttachmentRole;\n /** The translation or offset in global coordinates of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */\n public translation?: Point3d;\n /** The Yaw angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */\n public yaw?: number;\n /** The Pitch angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */\n public pitch?: number;\n /** The Roll angle (in degrees) of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */\n public roll?: number;\n /** The scale of the attached [[ExternalSource]] relative to the ExternalSource that attaches it. */\n public scale?: Point3d;\n /** @internal */\n public static override get className(): string { return \"ExternalSourceAttachment\"; }\n\n protected constructor(props: ExternalSourceAttachmentProps, iModel: IModelDb) {\n super(props, iModel);\n if (props.attaches)\n this.attaches = new ExternalSourceAttachmentAttachesSource(RelatedElement.idFromJson(props.attaches));\n\n if (props.translation)\n this.translation = Point3d.fromJSON(props.translation);\n\n if (props.scale)\n this.scale = Point3d.fromJSON(props.scale);\n }\n\n public override toJSON(): ExternalSourceAttachmentProps { // This override only specializes the return type\n return super.toJSON() as ExternalSourceAttachmentProps; // Entity.toJSON takes care of auto-handled properties\n }\n /** The [[CodeSpec]] for ExternalSourceAttachment elements is not automatically created, so this method ensures that it exists. */\n public static ensureCodeSpec(iModelDb: IModelDb): Id64String {\n try {\n const codeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.externalSourceAttachment);\n return codeSpec.id;\n } catch {\n return iModelDb.codeSpecs.insert(BisCodeSpec.externalSourceAttachment, CodeScopeSpec.Type.ParentElement);\n }\n }\n /** Create a Code for an ExternalSourceAttachment element given a name that is meant to be unique within the scope of its parent [[ExternalSource]].\n * @param iModelDb The IModelDb\n * @param scopeElementId The parent ExternalSource\n * @param codeValue The ExternalSourceAttachment name\n * @see [[ensureCodeSpec]]\n */\n public static createCode(iModelDb: IModelDb, scopeElementId: Id64String, codeValue: string): Code {\n const codeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.externalSourceAttachment);\n return new Code({ spec: codeSpec.id, scope: scopeElementId, value: codeValue });\n }\n}\n\n/** A group of ExternalSources that are collectively a source of information for one or more elements.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class ExternalSourceGroup extends ExternalSource {\n /** @internal */\n public static override get className(): string { return \"ExternalSourceGroup\"; }\n\n protected constructor(props: ExternalSourceProps, iModel: IModelDb) {\n super(props, iModel);\n }\n}\n\n/** Link to the Configuration for an iModel Synchronization Job\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class SynchronizationConfigLink extends UrlLink {\n /** Date/Time of last successful run of this synchronization configuration */\n public lastSuccessfulRun?: string;\n /** @internal */\n public static override get className(): string { return \"SynchronizationConfigLink\"; }\n\n protected constructor(props: SynchronizationConfigLinkProps, iModel: IModelDb) {\n super(props, iModel);\n }\n\n public override toJSON(): SynchronizationConfigLinkProps { // This override only specializes the return type\n return super.toJSON() as SynchronizationConfigLinkProps; // Entity.toJSON takes care of auto-handled properties\n }\n}\n\n"]}
@@ -0,0 +1,68 @@
1
+ /** @packageDocumentation
2
+ * @module ElementGeometry
3
+ */
4
+ import { FontFace, FontType, LocalFileName, RscFontEncodingProps } from "@itwin/core-common";
5
+ import type { IModelJsNative } from "@bentley/imodeljs-native";
6
+ import { _faceProps, _getData, _implementationProhibited, _key } from "./internal/Symbols";
7
+ /** A container for one or more [font faces]($docs/learning/backend/Fonts.md), often originating as a file on disk.
8
+ * @see [[FontFile.createFromTrueTypeFileName]] and [[FontFile.createFromShxFontBlob]] to create a font file.
9
+ * @see [[IModelDbFonts.queryEmbeddedFontFiles]] to obtain font files embedded in an [[IModelDb]].
10
+ * @see [[IModelDbFonts.embedFontFile]] to embed a font file into an [[IModelDb]].
11
+ * @beta
12
+ */
13
+ export interface FontFile {
14
+ /** @internal */
15
+ readonly [_implementationProhibited]: unknown;
16
+ /** The format in which the font data is encoded. */
17
+ readonly type: FontType;
18
+ /** The individual faces encoded into the file. */
19
+ readonly faces: ReadonlyArray<Readonly<FontFace>>;
20
+ /** If false, the font is not licensed for embedding, and attempting to embed it into an iModel will throw an error. */
21
+ readonly isEmbeddable: boolean;
22
+ /** A canonical representation of this font's contents, used for comparing two font files for equivalence.
23
+ * @internal
24
+ */
25
+ readonly [_key]: string;
26
+ /** Returns the raw (but uncompressed) binary data.
27
+ * @internal
28
+ */
29
+ readonly [_getData]: () => Uint8Array;
30
+ /** Native representation of [[faces]].
31
+ * @internal
32
+ */
33
+ readonly [_faceProps]: IModelJsNative.FontFaceProps[];
34
+ }
35
+ /** Arguments supplied to [[FontFile.createFromShxFontBlob]].
36
+ * @beta
37
+ */
38
+ export interface CreateFontFileFromShxBlobArgs {
39
+ /** The name to give to the font family contained in the [[blob]]. */
40
+ familyName: string;
41
+ /** The binary representation of the SHX font face. */
42
+ blob: Uint8Array;
43
+ }
44
+ /** Arguments supplied to [[FontFile.CreateFromRscFontBlob]].
45
+ * @alpha
46
+ */
47
+ export interface CreateFontFileFromRscBlobArgs {
48
+ /** The name to give to the font family contained in the [[blob]]. */
49
+ familyName: string;
50
+ /** The binary, flat-buffer-encoded representation of the RSC font face. */
51
+ blob: Uint8Array;
52
+ /** The font's encoding. */
53
+ encoding?: RscFontEncodingProps;
54
+ }
55
+ /** @beta */
56
+ export declare namespace FontFile {
57
+ /** Create a FontFile from a [FontType.TrueType]($common) file on disk.
58
+ * @param fileName The absolute path to the font file.
59
+ */
60
+ function createFromTrueTypeFileName(fileName: LocalFileName): FontFile;
61
+ /** Create a FontFile from the binary representation of a [FontType.SHX]($common) font face. */
62
+ function createFromShxFontBlob(args: CreateFontFileFromShxBlobArgs): FontFile;
63
+ /** Create a FontFile from the binary representation of a [FontType.RSC]($common) font face.
64
+ * @alpha
65
+ */
66
+ function createFromRscFontBlob(args: CreateFontFileFromRscBlobArgs): FontFile;
67
+ }
68
+ //# sourceMappingURL=FontFile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FontFile.d.ts","sourceRoot":"","sources":["../../src/FontFile.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC7F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,yBAAyB,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAG3F;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,gBAAgB;IAChB,QAAQ,CAAC,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAE9C,oDAAoD;IACpD,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,kDAAkD;IAClD,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IAClD,uHAAuH;IACvH,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAE/B;;OAEG;IACH,QAAQ,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAE,MAAM,UAAU,CAAC;IAEtC;;OAEG;IACF,QAAQ,CAAC,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC,aAAa,EAAE,CAAC;CACxD;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,IAAI,EAAE,UAAU,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,IAAI,EAAE,UAAU,CAAC;IACjB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CACjC;AAED,YAAY;AACZ,yBAAiB,QAAQ,CAAC;IACxB;;OAEG;IACH,SAAgB,0BAA0B,CAAC,QAAQ,EAAE,aAAa,GAAG,QAAQ,CAE5E;IAED,+FAA+F;IAC/F,SAAgB,qBAAqB,CAAC,IAAI,EAAE,6BAA6B,GAAG,QAAQ,CAEnF;IAED;;OAEG;IACH,SAAgB,qBAAqB,CAAC,IAAI,EAAE,6BAA6B,GAAG,QAAQ,CAEnF;CACF"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module ElementGeometry
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.FontFile = void 0;
11
+ const Symbols_1 = require("./internal/Symbols");
12
+ const FontFileImpl_1 = require("./internal/FontFileImpl");
13
+ /** @beta */
14
+ var FontFile;
15
+ (function (FontFile) {
16
+ /** Create a FontFile from a [FontType.TrueType]($common) file on disk.
17
+ * @param fileName The absolute path to the font file.
18
+ */
19
+ function createFromTrueTypeFileName(fileName) {
20
+ return (0, FontFileImpl_1.trueTypeFontFileFromFileName)(fileName);
21
+ }
22
+ FontFile.createFromTrueTypeFileName = createFromTrueTypeFileName;
23
+ /** Create a FontFile from the binary representation of a [FontType.SHX]($common) font face. */
24
+ function createFromShxFontBlob(args) {
25
+ return (0, FontFileImpl_1.shxFontFileFromBlob)(args);
26
+ }
27
+ FontFile.createFromShxFontBlob = createFromShxFontBlob;
28
+ /** Create a FontFile from the binary representation of a [FontType.RSC]($common) font face.
29
+ * @alpha
30
+ */
31
+ function createFromRscFontBlob(args) {
32
+ return (0, FontFileImpl_1.rscFontFileFromBlob)(args);
33
+ }
34
+ FontFile.createFromRscFontBlob = createFromRscFontBlob;
35
+ })(FontFile || (exports.FontFile = FontFile = {}));
36
+ //# sourceMappingURL=FontFile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FontFile.js","sourceRoot":"","sources":["../../src/FontFile.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH,gDAA2F;AAC3F,0DAAiH;AAyDjH,YAAY;AACZ,IAAiB,QAAQ,CAmBxB;AAnBD,WAAiB,QAAQ;IACvB;;OAEG;IACH,SAAgB,0BAA0B,CAAC,QAAuB;QAChE,OAAO,IAAA,2CAA4B,EAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IAFe,mCAA0B,6BAEzC,CAAA;IAED,+FAA+F;IAC/F,SAAgB,qBAAqB,CAAC,IAAmC;QACvE,OAAO,IAAA,kCAAmB,EAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAFe,8BAAqB,wBAEpC,CAAA;IAED;;OAEG;IACH,SAAgB,qBAAqB,CAAC,IAAmC;QACvE,OAAO,IAAA,kCAAmB,EAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAFe,8BAAqB,wBAEpC,CAAA;AACH,CAAC,EAnBgB,QAAQ,wBAAR,QAAQ,QAmBxB","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 ElementGeometry\n */\n\nimport { FontFace, FontType, LocalFileName, RscFontEncodingProps } from \"@itwin/core-common\";\nimport type { IModelJsNative } from \"@bentley/imodeljs-native\";\nimport { _faceProps, _getData, _implementationProhibited, _key } from \"./internal/Symbols\";\nimport { rscFontFileFromBlob, shxFontFileFromBlob, trueTypeFontFileFromFileName } from \"./internal/FontFileImpl\"; \n\n/** A container for one or more [font faces]($docs/learning/backend/Fonts.md), often originating as a file on disk.\n * @see [[FontFile.createFromTrueTypeFileName]] and [[FontFile.createFromShxFontBlob]] to create a font file.\n * @see [[IModelDbFonts.queryEmbeddedFontFiles]] to obtain font files embedded in an [[IModelDb]].\n * @see [[IModelDbFonts.embedFontFile]] to embed a font file into an [[IModelDb]].\n * @beta\n */\nexport interface FontFile {\n /** @internal */\n readonly [_implementationProhibited]: unknown;\n\n /** The format in which the font data is encoded. */\n readonly type: FontType;\n /** The individual faces encoded into the file. */\n readonly faces: ReadonlyArray<Readonly<FontFace>>;\n /** If false, the font is not licensed for embedding, and attempting to embed it into an iModel will throw an error. */\n readonly isEmbeddable: boolean;\n\n /** A canonical representation of this font's contents, used for comparing two font files for equivalence.\n * @internal\n */\n readonly [_key]: string;\n\n /** Returns the raw (but uncompressed) binary data.\n * @internal\n */\n readonly [_getData]: () => Uint8Array;\n\n /** Native representation of [[faces]].\n * @internal\n */\n readonly [_faceProps]: IModelJsNative.FontFaceProps[];\n}\n\n/** Arguments supplied to [[FontFile.createFromShxFontBlob]].\n * @beta\n */\nexport interface CreateFontFileFromShxBlobArgs {\n /** The name to give to the font family contained in the [[blob]]. */\n familyName: string;\n /** The binary representation of the SHX font face. */\n blob: Uint8Array;\n}\n\n/** Arguments supplied to [[FontFile.CreateFromRscFontBlob]].\n * @alpha\n */\nexport interface CreateFontFileFromRscBlobArgs {\n /** The name to give to the font family contained in the [[blob]]. */\n familyName: string;\n /** The binary, flat-buffer-encoded representation of the RSC font face. */\n blob: Uint8Array;\n /** The font's encoding. */\n encoding?: RscFontEncodingProps;\n}\n\n/** @beta */\nexport namespace FontFile {\n /** Create a FontFile from a [FontType.TrueType]($common) file on disk.\n * @param fileName The absolute path to the font file.\n */\n export function createFromTrueTypeFileName(fileName: LocalFileName): FontFile {\n return trueTypeFontFileFromFileName(fileName);\n }\n\n /** Create a FontFile from the binary representation of a [FontType.SHX]($common) font face. */\n export function createFromShxFontBlob(args: CreateFontFileFromShxBlobArgs): FontFile {\n return shxFontFileFromBlob(args);\n }\n\n /** Create a FontFile from the binary representation of a [FontType.RSC]($common) font face.\n * @alpha\n */\n export function createFromRscFontBlob(args: CreateFontFileFromRscBlobArgs): FontFile {\n return rscFontFileFromBlob(args);\n }\n}\n"]}
@@ -19,6 +19,13 @@ const makeSettingName = (name) => `${"itwin/core/gcs"}/${name}`;
19
19
  * @internal
20
20
  */
21
21
  class GeoCoordConfig {
22
+ /** array of cloud prefetch tasks that may be awaited to permit offline usage */
23
+ static prefetches = [];
24
+ static settingName = {
25
+ databases: makeSettingName("databases"),
26
+ defaultDatabases: makeSettingName("default/databases"),
27
+ disableWorkspaces: makeSettingName("disableWorkspaces"),
28
+ };
22
29
  static addGcsWorkspace(dbProps) {
23
30
  // override to disable loading GCS data from workspaces
24
31
  if (IModelHost_1.IModelHost.appWorkspace.settings.getBoolean(GeoCoordConfig.settingName.disableWorkspaces, false))
@@ -55,6 +62,7 @@ class GeoCoordConfig {
55
62
  }
56
63
  }
57
64
  }
65
+ static _defaultDbsLoaded = false;
58
66
  static onStartup() {
59
67
  this._defaultDbsLoaded = false;
60
68
  this.prefetches.length = 0;
@@ -71,12 +79,4 @@ class GeoCoordConfig {
71
79
  }
72
80
  }
73
81
  exports.GeoCoordConfig = GeoCoordConfig;
74
- /** array of cloud prefetch tasks that may be awaited to permit offline usage */
75
- GeoCoordConfig.prefetches = [];
76
- GeoCoordConfig.settingName = {
77
- databases: makeSettingName("databases"),
78
- defaultDatabases: makeSettingName("default/databases"),
79
- disableWorkspaces: makeSettingName("disableWorkspaces"),
80
- };
81
- GeoCoordConfig._defaultDbsLoaded = false;
82
82
  //# sourceMappingURL=GeoCoordConfig.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GeoCoordConfig.js","sourceRoot":"","sources":["../../src/GeoCoordConfig.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA2D;AAC3D,+CAA4C;AAC5C,6CAA0C;AAG1C,8DAAyD;AAEzD,MAAM,SAAS,GAAG,UAAU,CAAC;AAM7B,MAAM,eAAe,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,GAAG,gBAAgB,IAAI,IAAI,EAAE,CAAC;AAExE;;;GAGG;AACH,MAAa,cAAc;IASjB,MAAM,CAAC,eAAe,CAAC,OAAmB;QAChD,uDAAuD;QACvD,IAAI,uBAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,cAAc,CAAC,WAAW,CAAC,iBAAiB,EAAE,KAAK,CAAC;YAClG,OAAO;QAET,IAAI,CAAC;YACH,MAAM,EAAE,GAAG,uBAAU,CAAC,YAAY,CAAC;YACnC,MAAM,SAAS,GAAG,EAAE,CAAC,YAAY,CAAC,EAAE,GAAG,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,8DAA8D;YAClI,MAAM,cAAc,GAAG,SAAS,CAAC,cAAc,CAAC;YAChD,IAAI,CAAC,cAAc,EAAE,WAAW,EAAE,CAAC;gBACjC,qBAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,gCAAgC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;gBAC/E,OAAO;YACT,CAAC;YAED,MAAM,SAAS,GAAG,SAAS,CAAC,iBAAiB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AM,KAAK,IAAI,OAAO,EAAE,CAAC;gBAC5B,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC;IACH,CAAC;IAGM,MAAM,CAAC,SAAS;QACrB,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;QAC/B,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;IAC7B,CAAC;IAEM,MAAM,CAAC,oBAAoB;QAChC,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC5B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;YAC9B,IAAI,CAAC,OAAO,CAAC,uBAAU,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;QACpF,CAAC;IACH,CAAC;IAEM,MAAM,CAAC,aAAa,CAAC,QAAkB;QAC5C,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC5B,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC;;AApEH,wCAqEC;AApEC,gFAAgF;AACzD,yBAAU,GAAgC,EAAE,CAAC;AAC7C,0BAAW,GAAG;IACnC,SAAS,EAAE,eAAe,CAAC,WAAW,CAAC;IACvC,gBAAgB,EAAE,eAAe,CAAC,mBAAmB,CAAC;IACtD,iBAAiB,EAAE,eAAe,CAAC,mBAAmB,CAAC;CACxD,CAAC;AA6Ca,gCAAiB,GAAG,KAAK,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\nimport { BentleyError, Logger } from \"@itwin/core-bentley\";\r\nimport { CloudSqlite } from \"./CloudSqlite\";\r\nimport { IModelHost } from \"./IModelHost\";\r\nimport { Settings } from \"./workspace/Settings\";\r\nimport { WorkspaceDbCloudProps } from \"./workspace/Workspace\";\r\nimport { IModelNative } from \"./internal/NativePlatform\";\r\n\r\nconst loggerCat = \"GeoCoord\";\r\n\r\n/** @internal */\r\nexport interface GcsDbProps extends WorkspaceDbCloudProps {\r\n priority?: number;\r\n}\r\nconst makeSettingName = (name: string) => `${\"itwin/core/gcs\"}/${name}`;\r\n\r\n/**\r\n * Internal class to configure and load the gcs workspaces for an iModel.\r\n * @internal\r\n */\r\nexport class GeoCoordConfig {\r\n /** array of cloud prefetch tasks that may be awaited to permit offline usage */\r\n public static readonly prefetches: CloudSqlite.CloudPrefetch[] = [];\r\n public static readonly settingName = {\r\n databases: makeSettingName(\"databases\"),\r\n defaultDatabases: makeSettingName(\"default/databases\"),\r\n disableWorkspaces: makeSettingName(\"disableWorkspaces\"),\r\n };\r\n\r\n private static addGcsWorkspace(dbProps: GcsDbProps) {\r\n // override to disable loading GCS data from workspaces\r\n if (IModelHost.appWorkspace.settings.getBoolean(GeoCoordConfig.settingName.disableWorkspaces, false))\r\n return;\r\n\r\n try {\r\n const ws = IModelHost.appWorkspace;\r\n const container = ws.getContainer({ ...dbProps, accessToken: \"\" }); // all gcs containers are public so no accessToken is required\r\n const cloudContainer = container.cloudContainer;\r\n if (!cloudContainer?.isConnected) {\r\n Logger.logError(\"GeoCoord\", `could not load gcs database \"${dbProps.dbName}\"`);\r\n return;\r\n }\r\n\r\n const gcsDbName = container.resolveDbFileName(dbProps);\r\n const gcsDbProps = cloudContainer.queryDatabase(gcsDbName);\r\n if (undefined === gcsDbProps)\r\n throw new Error(`database \"${gcsDbName}\" not found in container \"${dbProps.containerId}\"`);\r\n\r\n if (!IModelNative.platform.addGcsWorkspaceDb(gcsDbName, cloudContainer, dbProps.priority))\r\n return; // already had this db\r\n\r\n Logger.logInfo(loggerCat, `loaded gcsDb \"${gcsDbName}\", from \"${dbProps.baseUri}/${dbProps.containerId}\" size=${gcsDbProps.totalBlocks}, local=${gcsDbProps.localBlocks}`);\r\n\r\n if (true === dbProps.prefetch)\r\n this.prefetches.push(CloudSqlite.startCloudPrefetch(cloudContainer, gcsDbName));\r\n\r\n } catch (e: any) {\r\n let msg = `Cannot load GCS workspace (${e.errorNumber}): ${BentleyError.getErrorMessage(e)}`;\r\n msg += `,container=${dbProps.baseUri}/${dbProps.containerId}, storage=${dbProps.storageType}, public=${dbProps.isPublic}, cacheDir=${IModelHost.cacheDir}`;\r\n Logger.logError(loggerCat, msg);\r\n }\r\n }\r\n\r\n private static loadAll(settings: Settings, settingName: string) {\r\n const dbProps = settings.getArray<GcsDbProps>(settingName);\r\n if (dbProps) {\r\n for (const entry of dbProps) {\r\n this.addGcsWorkspace(entry);\r\n }\r\n }\r\n }\r\n\r\n private static _defaultDbsLoaded = false;\r\n public static onStartup() {\r\n this._defaultDbsLoaded = false;\r\n this.prefetches.length = 0;\r\n }\r\n\r\n public static loadDefaultDatabases(): void {\r\n if (!this._defaultDbsLoaded) {\r\n this._defaultDbsLoaded = true;\r\n this.loadAll(IModelHost.appWorkspace.settings, this.settingName.defaultDatabases);\r\n }\r\n }\r\n\r\n public static loadForImodel(settings: Settings) {\r\n this.loadDefaultDatabases();\r\n this.loadAll(settings, this.settingName.databases);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"GeoCoordConfig.js","sourceRoot":"","sources":["../../src/GeoCoordConfig.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA2D;AAC3D,+CAA4C;AAC5C,6CAA0C;AAG1C,8DAAyD;AAEzD,MAAM,SAAS,GAAG,UAAU,CAAC;AAM7B,MAAM,eAAe,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,GAAG,gBAAgB,IAAI,IAAI,EAAE,CAAC;AAExE;;;GAGG;AACH,MAAa,cAAc;IACzB,gFAAgF;IACzE,MAAM,CAAU,UAAU,GAAgC,EAAE,CAAC;IAC7D,MAAM,CAAU,WAAW,GAAG;QAC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YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;QACpF,CAAC;IACH,CAAC;IAEM,MAAM,CAAC,aAAa,CAAC,QAAkB;QAC5C,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC5B,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC;;AApEH,wCAqEC","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 iModels\n */\n\nimport { BentleyError, Logger } from \"@itwin/core-bentley\";\nimport { CloudSqlite } from \"./CloudSqlite\";\nimport { IModelHost } from \"./IModelHost\";\nimport { Settings } from \"./workspace/Settings\";\nimport { WorkspaceDbCloudProps } from \"./workspace/Workspace\";\nimport { IModelNative } from \"./internal/NativePlatform\";\n\nconst loggerCat = \"GeoCoord\";\n\n/** @internal */\nexport interface GcsDbProps extends WorkspaceDbCloudProps {\n priority?: number;\n}\nconst makeSettingName = (name: string) => `${\"itwin/core/gcs\"}/${name}`;\n\n/**\n * Internal class to configure and load the gcs workspaces for an iModel.\n * @internal\n */\nexport class GeoCoordConfig {\n /** array of cloud prefetch tasks that may be awaited to permit offline usage */\n public static readonly prefetches: CloudSqlite.CloudPrefetch[] = [];\n public static readonly settingName = {\n databases: makeSettingName(\"databases\"),\n defaultDatabases: makeSettingName(\"default/databases\"),\n disableWorkspaces: makeSettingName(\"disableWorkspaces\"),\n };\n\n private static addGcsWorkspace(dbProps: GcsDbProps) {\n // override to disable loading GCS data from workspaces\n if (IModelHost.appWorkspace.settings.getBoolean(GeoCoordConfig.settingName.disableWorkspaces, false))\n return;\n\n try {\n const ws = IModelHost.appWorkspace;\n const container = ws.getContainer({ ...dbProps, accessToken: \"\" }); // all gcs containers are public so no accessToken is required\n const cloudContainer = container.cloudContainer;\n if (!cloudContainer?.isConnected) {\n Logger.logError(\"GeoCoord\", `could not load gcs database \"${dbProps.dbName}\"`);\n return;\n }\n\n const gcsDbName = container.resolveDbFileName(dbProps);\n const gcsDbProps = cloudContainer.queryDatabase(gcsDbName);\n if (undefined === gcsDbProps)\n throw new Error(`database \"${gcsDbName}\" not found in container \"${dbProps.containerId}\"`);\n\n if (!IModelNative.platform.addGcsWorkspaceDb(gcsDbName, cloudContainer, dbProps.priority))\n return; // already had this db\n\n Logger.logInfo(loggerCat, `loaded gcsDb \"${gcsDbName}\", from \"${dbProps.baseUri}/${dbProps.containerId}\" size=${gcsDbProps.totalBlocks}, local=${gcsDbProps.localBlocks}`);\n\n if (true === dbProps.prefetch)\n this.prefetches.push(CloudSqlite.startCloudPrefetch(cloudContainer, gcsDbName));\n\n } catch (e: any) {\n let msg = `Cannot load GCS workspace (${e.errorNumber}): ${BentleyError.getErrorMessage(e)}`;\n msg += `,container=${dbProps.baseUri}/${dbProps.containerId}, storage=${dbProps.storageType}, public=${dbProps.isPublic}, cacheDir=${IModelHost.cacheDir}`;\n Logger.logError(loggerCat, msg);\n }\n }\n\n private static loadAll(settings: Settings, settingName: string) {\n const dbProps = settings.getArray<GcsDbProps>(settingName);\n if (dbProps) {\n for (const entry of dbProps) {\n this.addGcsWorkspace(entry);\n }\n }\n }\n\n private static _defaultDbsLoaded = false;\n public static onStartup() {\n this._defaultDbsLoaded = false;\n this.prefetches.length = 0;\n }\n\n public static loadDefaultDatabases(): void {\n if (!this._defaultDbsLoaded) {\n this._defaultDbsLoaded = true;\n this.loadAll(IModelHost.appWorkspace.settings, this.settingName.defaultDatabases);\n }\n }\n\n public static loadForImodel(settings: Settings) {\n this.loadDefaultDatabases();\n this.loadAll(settings, this.settingName.databases);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"GeographicCRSServices.js","sourceRoot":"","sources":["../../src/GeographicCRSServices.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAyCH,wFAEC;AAxCD,8DAAyD;AAiCzD;;;;GAIG;AACI,KAAK,UAAU,sCAAsC,CAAC,IAAgD;IAC3G,OAAO,6BAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACrE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\nimport { Range2dProps } from \"@itwin/core-geometry\";\r\nimport { IModelNative } from \"./internal/NativePlatform\";\r\n\r\n/** Describes a geographic coordinate reference system produced by [[getAvailableCoordinateReferenceSystems]].\r\n * @beta\r\n */\r\nexport interface AvailableCoordinateReferenceSystemProps {\r\n /** The name of the coordinate reference system. It can be presented to the user in the UI as an identifier for the coordinate reference system. */\r\n name: string;\r\n /** The description of the coordinate reference system. It can be presented to the user in the UI as extra information for the coordinate reference system. */\r\n description: string;\r\n /** Indicate if the coordinate reference system is deprecated. A coordinate reference system is deprecated if it is no longer recommended for use.\r\n * A deprecated coordinate reference system can usually be substituted by a more accurate one. It is possible that an existing project uses a deprecated coordinate reference system.\r\n * However, for new projects, it is recommended to use a non-deprecated coordinate reference system.\r\n */\r\n deprecated: boolean;\r\n /** Extent of the coordinate reference system. This is the area where the coordinate reference system can be used.\r\n * Outside of this area, the coordinate reference system may not be accurate. The extent is defined by a range of longitude and latitude values.\r\n * Minimum longitude and latitude correspond to crsExtent.low.x and crsExtent.low.y, respectively.\r\n * Maximum longitude and latitude correspond to crsExtent.high.x and crsExtent.high.y, respectively.\r\n */\r\n crsExtent: Range2dProps;\r\n}\r\n\r\n/** Arguments supplied to [[getAvailableCoordinateReferenceSystems]].\r\n * @beta\r\n */\r\nexport interface GetAvailableCoordinateReferenceSystemsArgs {\r\n /** If provided, only return CRS's that contain the given extent. Minimum longitude and latitude correspond to extent.low.x and extent.low.y, respectively.\r\n * Maximum longitude and latitude correspond to extent.high.x and extent.high.y, respectively.\r\n */\r\n extent?: Range2dProps;\r\n}\r\n\r\n/** Get a list of Geographic Coordinate Reference Systems.\r\n * @param options Specifies the parameters to filter the returned list.\r\n * @returns The list of Geographic Coordinate Reference Systems, according to the supplied parameters.\r\n * @beta\r\n */\r\nexport async function getAvailableCoordinateReferenceSystems(args: GetAvailableCoordinateReferenceSystemsArgs): Promise<AvailableCoordinateReferenceSystemProps[]> {\r\n return IModelNative.platform.GeoServices.getListOfCRS(args.extent);\r\n}\r\n"]}
1
+ {"version":3,"file":"GeographicCRSServices.js","sourceRoot":"","sources":["../../src/GeographicCRSServices.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAyCH,wFAEC;AAxCD,8DAAyD;AAiCzD;;;;GAIG;AACI,KAAK,UAAU,sCAAsC,CAAC,IAAgD;IAC3G,OAAO,6BAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACrE,CAAC","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 iModels\n */\n\nimport { Range2dProps } from \"@itwin/core-geometry\";\nimport { IModelNative } from \"./internal/NativePlatform\";\n\n/** Describes a geographic coordinate reference system produced by [[getAvailableCoordinateReferenceSystems]].\n * @beta\n */\nexport interface AvailableCoordinateReferenceSystemProps {\n /** The name of the coordinate reference system. It can be presented to the user in the UI as an identifier for the coordinate reference system. */\n name: string;\n /** The description of the coordinate reference system. It can be presented to the user in the UI as extra information for the coordinate reference system. */\n description: string;\n /** Indicate if the coordinate reference system is deprecated. A coordinate reference system is deprecated if it is no longer recommended for use.\n * A deprecated coordinate reference system can usually be substituted by a more accurate one. It is possible that an existing project uses a deprecated coordinate reference system.\n * However, for new projects, it is recommended to use a non-deprecated coordinate reference system.\n */\n deprecated: boolean;\n /** Extent of the coordinate reference system. This is the area where the coordinate reference system can be used.\n * Outside of this area, the coordinate reference system may not be accurate. The extent is defined by a range of longitude and latitude values.\n * Minimum longitude and latitude correspond to crsExtent.low.x and crsExtent.low.y, respectively.\n * Maximum longitude and latitude correspond to crsExtent.high.x and crsExtent.high.y, respectively.\n */\n crsExtent: Range2dProps;\n}\n\n/** Arguments supplied to [[getAvailableCoordinateReferenceSystems]].\n * @beta\n */\nexport interface GetAvailableCoordinateReferenceSystemsArgs {\n /** If provided, only return CRS's that contain the given extent. Minimum longitude and latitude correspond to extent.low.x and extent.low.y, respectively.\n * Maximum longitude and latitude correspond to extent.high.x and extent.high.y, respectively.\n */\n extent?: Range2dProps;\n}\n\n/** Get a list of Geographic Coordinate Reference Systems.\n * @param options Specifies the parameters to filter the returned list.\n * @returns The list of Geographic Coordinate Reference Systems, according to the supplied parameters.\n * @beta\n */\nexport async function getAvailableCoordinateReferenceSystems(args: GetAvailableCoordinateReferenceSystemsArgs): Promise<AvailableCoordinateReferenceSystemProps[]> {\n return IModelNative.platform.GeoServices.getListOfCRS(args.extent);\n}\n"]}