@itwin/ecschema-editing 5.0.0-dev.90 → 5.0.0-dev.93

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 (363) hide show
  1. package/lib/cjs/Validation/DiagnosticReporter.js +1 -1
  2. package/lib/cjs/Validation/DiagnosticReporter.js.map +1 -1
  3. package/lib/esm/Differencing/Errors.d.ts +19 -0
  4. package/lib/esm/Differencing/Errors.d.ts.map +1 -0
  5. package/lib/esm/Differencing/Errors.js +26 -0
  6. package/lib/esm/Differencing/Errors.js.map +1 -0
  7. package/lib/esm/Differencing/SchemaConflicts.d.ts +84 -0
  8. package/lib/esm/Differencing/SchemaConflicts.d.ts.map +1 -0
  9. package/lib/esm/Differencing/SchemaConflicts.js +60 -0
  10. package/lib/esm/Differencing/SchemaConflicts.js.map +1 -0
  11. package/lib/esm/Differencing/SchemaDiagnosticVisitor.d.ts +41 -0
  12. package/lib/esm/Differencing/SchemaDiagnosticVisitor.d.ts.map +1 -0
  13. package/lib/esm/Differencing/SchemaDiagnosticVisitor.js +443 -0
  14. package/lib/esm/Differencing/SchemaDiagnosticVisitor.js.map +1 -0
  15. package/lib/esm/Differencing/SchemaDifference.d.ts +357 -0
  16. package/lib/esm/Differencing/SchemaDifference.d.ts.map +1 -0
  17. package/lib/esm/Differencing/SchemaDifference.js +106 -0
  18. package/lib/esm/Differencing/SchemaDifference.js.map +1 -0
  19. package/lib/esm/Differencing/SchemaDifferenceValidator.d.ts +18 -0
  20. package/lib/esm/Differencing/SchemaDifferenceValidator.d.ts.map +1 -0
  21. package/lib/esm/Differencing/SchemaDifferenceValidator.js +521 -0
  22. package/lib/esm/Differencing/SchemaDifferenceValidator.js.map +1 -0
  23. package/lib/esm/Differencing/SchemaDifferenceVisitor.d.ts +32 -0
  24. package/lib/esm/Differencing/SchemaDifferenceVisitor.d.ts.map +1 -0
  25. package/lib/esm/Differencing/SchemaDifferenceVisitor.js +88 -0
  26. package/lib/esm/Differencing/SchemaDifferenceVisitor.js.map +1 -0
  27. package/lib/esm/Differencing/Utils.d.ts +110 -0
  28. package/lib/esm/Differencing/Utils.d.ts.map +1 -0
  29. package/lib/esm/Differencing/Utils.js +161 -0
  30. package/lib/esm/Differencing/Utils.js.map +1 -0
  31. package/lib/esm/Editing/Constants.d.ts +22 -0
  32. package/lib/esm/Editing/Constants.d.ts.map +1 -0
  33. package/lib/esm/Editing/Constants.js +55 -0
  34. package/lib/esm/Editing/Constants.js.map +1 -0
  35. package/lib/esm/Editing/CustomAttributes.d.ts +22 -0
  36. package/lib/esm/Editing/CustomAttributes.d.ts.map +1 -0
  37. package/lib/esm/Editing/CustomAttributes.js +49 -0
  38. package/lib/esm/Editing/CustomAttributes.js.map +1 -0
  39. package/lib/esm/Editing/ECClasses.d.ts +86 -0
  40. package/lib/esm/Editing/ECClasses.d.ts.map +1 -0
  41. package/lib/esm/Editing/ECClasses.js +294 -0
  42. package/lib/esm/Editing/ECClasses.js.map +1 -0
  43. package/lib/esm/Editing/Editor.d.ts +117 -0
  44. package/lib/esm/Editing/Editor.d.ts.map +1 -0
  45. package/lib/esm/Editing/Editor.js +264 -0
  46. package/lib/esm/Editing/Editor.js.map +1 -0
  47. package/lib/esm/Editing/Entities.d.ts +38 -0
  48. package/lib/esm/Editing/Entities.d.ts.map +1 -0
  49. package/lib/esm/Editing/Entities.js +126 -0
  50. package/lib/esm/Editing/Entities.js.map +1 -0
  51. package/lib/esm/Editing/Enumerations.d.ts +25 -0
  52. package/lib/esm/Editing/Enumerations.d.ts.map +1 -0
  53. package/lib/esm/Editing/Enumerations.js +90 -0
  54. package/lib/esm/Editing/Enumerations.js.map +1 -0
  55. package/lib/esm/Editing/Exception.d.ts +358 -0
  56. package/lib/esm/Editing/Exception.d.ts.map +1 -0
  57. package/lib/esm/Editing/Exception.js +471 -0
  58. package/lib/esm/Editing/Exception.js.map +1 -0
  59. package/lib/esm/Editing/Formats.d.ts +23 -0
  60. package/lib/esm/Editing/Formats.d.ts.map +1 -0
  61. package/lib/esm/Editing/Formats.js +62 -0
  62. package/lib/esm/Editing/Formats.js.map +1 -0
  63. package/lib/esm/Editing/InvertedUnits.d.ts +19 -0
  64. package/lib/esm/Editing/InvertedUnits.d.ts.map +1 -0
  65. package/lib/esm/Editing/InvertedUnits.js +68 -0
  66. package/lib/esm/Editing/InvertedUnits.js.map +1 -0
  67. package/lib/esm/Editing/KindOfQuantities.d.ts +30 -0
  68. package/lib/esm/Editing/KindOfQuantities.d.ts.map +1 -0
  69. package/lib/esm/Editing/KindOfQuantities.js +92 -0
  70. package/lib/esm/Editing/KindOfQuantities.js.map +1 -0
  71. package/lib/esm/Editing/Mixins.d.ts +35 -0
  72. package/lib/esm/Editing/Mixins.d.ts.map +1 -0
  73. package/lib/esm/Editing/Mixins.js +90 -0
  74. package/lib/esm/Editing/Mixins.js.map +1 -0
  75. package/lib/esm/Editing/Mutable/MutableArrayProperty.d.ts +10 -0
  76. package/lib/esm/Editing/Mutable/MutableArrayProperty.d.ts.map +1 -0
  77. package/lib/esm/Editing/Mutable/MutableArrayProperty.js +12 -0
  78. package/lib/esm/Editing/Mutable/MutableArrayProperty.js.map +1 -0
  79. package/lib/esm/Editing/Mutable/MutableCAClass.d.ts +10 -0
  80. package/lib/esm/Editing/Mutable/MutableCAClass.d.ts.map +1 -0
  81. package/lib/esm/Editing/Mutable/MutableCAClass.js +12 -0
  82. package/lib/esm/Editing/Mutable/MutableCAClass.js.map +1 -0
  83. package/lib/esm/Editing/Mutable/MutableClass.d.ts +39 -0
  84. package/lib/esm/Editing/Mutable/MutableClass.d.ts.map +1 -0
  85. package/lib/esm/Editing/Mutable/MutableClass.js +18 -0
  86. package/lib/esm/Editing/Mutable/MutableClass.js.map +1 -0
  87. package/lib/esm/Editing/Mutable/MutableConstant.d.ts +14 -0
  88. package/lib/esm/Editing/Mutable/MutableConstant.d.ts.map +1 -0
  89. package/lib/esm/Editing/Mutable/MutableConstant.js +12 -0
  90. package/lib/esm/Editing/Mutable/MutableConstant.js.map +1 -0
  91. package/lib/esm/Editing/Mutable/MutableEntityClass.d.ts +12 -0
  92. package/lib/esm/Editing/Mutable/MutableEntityClass.d.ts.map +1 -0
  93. package/lib/esm/Editing/Mutable/MutableEntityClass.js +12 -0
  94. package/lib/esm/Editing/Mutable/MutableEntityClass.js.map +1 -0
  95. package/lib/esm/Editing/Mutable/MutableEnumeration.d.ts +11 -0
  96. package/lib/esm/Editing/Mutable/MutableEnumeration.d.ts.map +1 -0
  97. package/lib/esm/Editing/Mutable/MutableEnumeration.js +11 -0
  98. package/lib/esm/Editing/Mutable/MutableEnumeration.js.map +1 -0
  99. package/lib/esm/Editing/Mutable/MutableFormat.d.ts +26 -0
  100. package/lib/esm/Editing/Mutable/MutableFormat.d.ts.map +1 -0
  101. package/lib/esm/Editing/Mutable/MutableFormat.js +12 -0
  102. package/lib/esm/Editing/Mutable/MutableFormat.js.map +1 -0
  103. package/lib/esm/Editing/Mutable/MutableInvertedUnit.d.ts +11 -0
  104. package/lib/esm/Editing/Mutable/MutableInvertedUnit.d.ts.map +1 -0
  105. package/lib/esm/Editing/Mutable/MutableInvertedUnit.js +12 -0
  106. package/lib/esm/Editing/Mutable/MutableInvertedUnit.js.map +1 -0
  107. package/lib/esm/Editing/Mutable/MutableKindOfQuantity.d.ts +14 -0
  108. package/lib/esm/Editing/Mutable/MutableKindOfQuantity.d.ts.map +1 -0
  109. package/lib/esm/Editing/Mutable/MutableKindOfQuantity.js +12 -0
  110. package/lib/esm/Editing/Mutable/MutableKindOfQuantity.js.map +1 -0
  111. package/lib/esm/Editing/Mutable/MutableMixin.d.ts +12 -0
  112. package/lib/esm/Editing/Mutable/MutableMixin.d.ts.map +1 -0
  113. package/lib/esm/Editing/Mutable/MutableMixin.js +12 -0
  114. package/lib/esm/Editing/Mutable/MutableMixin.js.map +1 -0
  115. package/lib/esm/Editing/Mutable/MutableNavigationProperty.d.ts +8 -0
  116. package/lib/esm/Editing/Mutable/MutableNavigationProperty.d.ts.map +1 -0
  117. package/lib/esm/Editing/Mutable/MutableNavigationProperty.js +12 -0
  118. package/lib/esm/Editing/Mutable/MutableNavigationProperty.js.map +1 -0
  119. package/lib/esm/Editing/Mutable/MutablePhenomenon.d.ts +11 -0
  120. package/lib/esm/Editing/Mutable/MutablePhenomenon.d.ts.map +1 -0
  121. package/lib/esm/Editing/Mutable/MutablePhenomenon.js +12 -0
  122. package/lib/esm/Editing/Mutable/MutablePhenomenon.js.map +1 -0
  123. package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.d.ts +13 -0
  124. package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.d.ts.map +1 -0
  125. package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.js +12 -0
  126. package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.js.map +1 -0
  127. package/lib/esm/Editing/Mutable/MutableProperty.d.ts +16 -0
  128. package/lib/esm/Editing/Mutable/MutableProperty.d.ts.map +1 -0
  129. package/lib/esm/Editing/Mutable/MutableProperty.js +12 -0
  130. package/lib/esm/Editing/Mutable/MutableProperty.js.map +1 -0
  131. package/lib/esm/Editing/Mutable/MutablePropertyCategory.d.ts +11 -0
  132. package/lib/esm/Editing/Mutable/MutablePropertyCategory.d.ts.map +1 -0
  133. package/lib/esm/Editing/Mutable/MutablePropertyCategory.js +12 -0
  134. package/lib/esm/Editing/Mutable/MutablePropertyCategory.js.map +1 -0
  135. package/lib/esm/Editing/Mutable/MutableRelationshipClass.d.ts +30 -0
  136. package/lib/esm/Editing/Mutable/MutableRelationshipClass.d.ts.map +1 -0
  137. package/lib/esm/Editing/Mutable/MutableRelationshipClass.js +20 -0
  138. package/lib/esm/Editing/Mutable/MutableRelationshipClass.js.map +1 -0
  139. package/lib/esm/Editing/Mutable/MutableSchema.d.ts +51 -0
  140. package/lib/esm/Editing/Mutable/MutableSchema.d.ts.map +1 -0
  141. package/lib/esm/Editing/Mutable/MutableSchema.js +14 -0
  142. package/lib/esm/Editing/Mutable/MutableSchema.js.map +1 -0
  143. package/lib/esm/Editing/Mutable/MutableSchemaItem.d.ts +11 -0
  144. package/lib/esm/Editing/Mutable/MutableSchemaItem.d.ts.map +1 -0
  145. package/lib/esm/Editing/Mutable/MutableSchemaItem.js +12 -0
  146. package/lib/esm/Editing/Mutable/MutableSchemaItem.js.map +1 -0
  147. package/lib/esm/Editing/Mutable/MutableStructProperty.d.ts +8 -0
  148. package/lib/esm/Editing/Mutable/MutableStructProperty.d.ts.map +1 -0
  149. package/lib/esm/Editing/Mutable/MutableStructProperty.js +12 -0
  150. package/lib/esm/Editing/Mutable/MutableStructProperty.js.map +1 -0
  151. package/lib/esm/Editing/Mutable/MutableUnit.d.ts +12 -0
  152. package/lib/esm/Editing/Mutable/MutableUnit.d.ts.map +1 -0
  153. package/lib/esm/Editing/Mutable/MutableUnit.js +12 -0
  154. package/lib/esm/Editing/Mutable/MutableUnit.js.map +1 -0
  155. package/lib/esm/Editing/Mutable/MutableUnitSystem.d.ts +10 -0
  156. package/lib/esm/Editing/Mutable/MutableUnitSystem.d.ts.map +1 -0
  157. package/lib/esm/Editing/Mutable/MutableUnitSystem.js +12 -0
  158. package/lib/esm/Editing/Mutable/MutableUnitSystem.js.map +1 -0
  159. package/lib/esm/Editing/Phenomena.d.ts +17 -0
  160. package/lib/esm/Editing/Phenomena.d.ts.map +1 -0
  161. package/lib/esm/Editing/Phenomena.js +44 -0
  162. package/lib/esm/Editing/Phenomena.js.map +1 -0
  163. package/lib/esm/Editing/Properties.d.ts +206 -0
  164. package/lib/esm/Editing/Properties.d.ts.map +1 -0
  165. package/lib/esm/Editing/Properties.js +415 -0
  166. package/lib/esm/Editing/Properties.js.map +1 -0
  167. package/lib/esm/Editing/PropertyCategories.d.ts +18 -0
  168. package/lib/esm/Editing/PropertyCategories.d.ts.map +1 -0
  169. package/lib/esm/Editing/PropertyCategories.js +54 -0
  170. package/lib/esm/Editing/PropertyCategories.js.map +1 -0
  171. package/lib/esm/Editing/RelationshipClasses.d.ts +69 -0
  172. package/lib/esm/Editing/RelationshipClasses.d.ts.map +1 -0
  173. package/lib/esm/Editing/RelationshipClasses.js +236 -0
  174. package/lib/esm/Editing/RelationshipClasses.js.map +1 -0
  175. package/lib/esm/Editing/SchemaItems.d.ts +42 -0
  176. package/lib/esm/Editing/SchemaItems.d.ts.map +1 -0
  177. package/lib/esm/Editing/SchemaItems.js +104 -0
  178. package/lib/esm/Editing/SchemaItems.js.map +1 -0
  179. package/lib/esm/Editing/Structs.d.ts +21 -0
  180. package/lib/esm/Editing/Structs.d.ts.map +1 -0
  181. package/lib/esm/Editing/Structs.js +47 -0
  182. package/lib/esm/Editing/Structs.js.map +1 -0
  183. package/lib/esm/Editing/UnitSystems.d.ts +17 -0
  184. package/lib/esm/Editing/UnitSystems.d.ts.map +1 -0
  185. package/lib/esm/Editing/UnitSystems.js +43 -0
  186. package/lib/esm/Editing/UnitSystems.js.map +1 -0
  187. package/lib/esm/Editing/Units.d.ts +17 -0
  188. package/lib/esm/Editing/Units.d.ts.map +1 -0
  189. package/lib/esm/Editing/Units.js +49 -0
  190. package/lib/esm/Editing/Units.js.map +1 -0
  191. package/lib/esm/Merging/ClassMerger.d.ts +9 -0
  192. package/lib/esm/Merging/ClassMerger.d.ts.map +1 -0
  193. package/lib/esm/Merging/ClassMerger.js +66 -0
  194. package/lib/esm/Merging/ClassMerger.js.map +1 -0
  195. package/lib/esm/Merging/ConstantMerger.d.ts +14 -0
  196. package/lib/esm/Merging/ConstantMerger.d.ts.map +1 -0
  197. package/lib/esm/Merging/ConstantMerger.js +64 -0
  198. package/lib/esm/Merging/ConstantMerger.js.map +1 -0
  199. package/lib/esm/Merging/CustomAttributeClassMerger.d.ts +14 -0
  200. package/lib/esm/Merging/CustomAttributeClassMerger.d.ts.map +1 -0
  201. package/lib/esm/Merging/CustomAttributeClassMerger.js +36 -0
  202. package/lib/esm/Merging/CustomAttributeClassMerger.js.map +1 -0
  203. package/lib/esm/Merging/CustomAttributeMerger.d.ts +19 -0
  204. package/lib/esm/Merging/CustomAttributeMerger.d.ts.map +1 -0
  205. package/lib/esm/Merging/CustomAttributeMerger.js +66 -0
  206. package/lib/esm/Merging/CustomAttributeMerger.js.map +1 -0
  207. package/lib/esm/Merging/Edits/NameMapping.d.ts +22 -0
  208. package/lib/esm/Merging/Edits/NameMapping.d.ts.map +1 -0
  209. package/lib/esm/Merging/Edits/NameMapping.js +49 -0
  210. package/lib/esm/Merging/Edits/NameMapping.js.map +1 -0
  211. package/lib/esm/Merging/Edits/RenameEditHandler.d.ts +14 -0
  212. package/lib/esm/Merging/Edits/RenameEditHandler.d.ts.map +1 -0
  213. package/lib/esm/Merging/Edits/RenameEditHandler.js +62 -0
  214. package/lib/esm/Merging/Edits/RenameEditHandler.js.map +1 -0
  215. package/lib/esm/Merging/Edits/SchemaEdits.d.ts +81 -0
  216. package/lib/esm/Merging/Edits/SchemaEdits.d.ts.map +1 -0
  217. package/lib/esm/Merging/Edits/SchemaEdits.js +112 -0
  218. package/lib/esm/Merging/Edits/SchemaEdits.js.map +1 -0
  219. package/lib/esm/Merging/Edits/SkipEditHandler.d.ts +14 -0
  220. package/lib/esm/Merging/Edits/SkipEditHandler.d.ts.map +1 -0
  221. package/lib/esm/Merging/Edits/SkipEditHandler.js +60 -0
  222. package/lib/esm/Merging/Edits/SkipEditHandler.js.map +1 -0
  223. package/lib/esm/Merging/EntityClassMerger.d.ts +19 -0
  224. package/lib/esm/Merging/EntityClassMerger.d.ts.map +1 -0
  225. package/lib/esm/Merging/EntityClassMerger.js +39 -0
  226. package/lib/esm/Merging/EntityClassMerger.js.map +1 -0
  227. package/lib/esm/Merging/EnumerationMerger.d.ts +14 -0
  228. package/lib/esm/Merging/EnumerationMerger.d.ts.map +1 -0
  229. package/lib/esm/Merging/EnumerationMerger.js +48 -0
  230. package/lib/esm/Merging/EnumerationMerger.js.map +1 -0
  231. package/lib/esm/Merging/EnumeratorMerger.d.ts +14 -0
  232. package/lib/esm/Merging/EnumeratorMerger.d.ts.map +1 -0
  233. package/lib/esm/Merging/EnumeratorMerger.js +36 -0
  234. package/lib/esm/Merging/EnumeratorMerger.js.map +1 -0
  235. package/lib/esm/Merging/FormatMerger.d.ts +24 -0
  236. package/lib/esm/Merging/FormatMerger.d.ts.map +1 -0
  237. package/lib/esm/Merging/FormatMerger.js +137 -0
  238. package/lib/esm/Merging/FormatMerger.js.map +1 -0
  239. package/lib/esm/Merging/InvertedUnitMerger.d.ts +14 -0
  240. package/lib/esm/Merging/InvertedUnitMerger.d.ts.map +1 -0
  241. package/lib/esm/Merging/InvertedUnitMerger.js +41 -0
  242. package/lib/esm/Merging/InvertedUnitMerger.js.map +1 -0
  243. package/lib/esm/Merging/KindOfQuantityMerger.d.ts +19 -0
  244. package/lib/esm/Merging/KindOfQuantityMerger.d.ts.map +1 -0
  245. package/lib/esm/Merging/KindOfQuantityMerger.js +89 -0
  246. package/lib/esm/Merging/KindOfQuantityMerger.js.map +1 -0
  247. package/lib/esm/Merging/MixinMerger.d.ts +14 -0
  248. package/lib/esm/Merging/MixinMerger.d.ts.map +1 -0
  249. package/lib/esm/Merging/MixinMerger.js +33 -0
  250. package/lib/esm/Merging/MixinMerger.js.map +1 -0
  251. package/lib/esm/Merging/PhenomenonMerger.d.ts +14 -0
  252. package/lib/esm/Merging/PhenomenonMerger.d.ts.map +1 -0
  253. package/lib/esm/Merging/PhenomenonMerger.js +36 -0
  254. package/lib/esm/Merging/PhenomenonMerger.js.map +1 -0
  255. package/lib/esm/Merging/PropertyCategoryMerger.d.ts +14 -0
  256. package/lib/esm/Merging/PropertyCategoryMerger.d.ts.map +1 -0
  257. package/lib/esm/Merging/PropertyCategoryMerger.js +31 -0
  258. package/lib/esm/Merging/PropertyCategoryMerger.js.map +1 -0
  259. package/lib/esm/Merging/PropertyMerger.d.ts +12 -0
  260. package/lib/esm/Merging/PropertyMerger.d.ts.map +1 -0
  261. package/lib/esm/Merging/PropertyMerger.js +228 -0
  262. package/lib/esm/Merging/PropertyMerger.js.map +1 -0
  263. package/lib/esm/Merging/RelationshipClassMerger.d.ts +27 -0
  264. package/lib/esm/Merging/RelationshipClassMerger.d.ts.map +1 -0
  265. package/lib/esm/Merging/RelationshipClassMerger.js +136 -0
  266. package/lib/esm/Merging/RelationshipClassMerger.js.map +1 -0
  267. package/lib/esm/Merging/SchemaMerger.d.ts +49 -0
  268. package/lib/esm/Merging/SchemaMerger.d.ts.map +1 -0
  269. package/lib/esm/Merging/SchemaMerger.js +117 -0
  270. package/lib/esm/Merging/SchemaMerger.js.map +1 -0
  271. package/lib/esm/Merging/SchemaMergingVisitor.d.ts +149 -0
  272. package/lib/esm/Merging/SchemaMergingVisitor.d.ts.map +1 -0
  273. package/lib/esm/Merging/SchemaMergingVisitor.js +339 -0
  274. package/lib/esm/Merging/SchemaMergingVisitor.js.map +1 -0
  275. package/lib/esm/Merging/SchemaMergingWalker.d.ts +19 -0
  276. package/lib/esm/Merging/SchemaMergingWalker.d.ts.map +1 -0
  277. package/lib/esm/Merging/SchemaMergingWalker.js +61 -0
  278. package/lib/esm/Merging/SchemaMergingWalker.js.map +1 -0
  279. package/lib/esm/Merging/SchemaReferenceMerger.d.ts +13 -0
  280. package/lib/esm/Merging/SchemaReferenceMerger.d.ts.map +1 -0
  281. package/lib/esm/Merging/SchemaReferenceMerger.js +57 -0
  282. package/lib/esm/Merging/SchemaReferenceMerger.js.map +1 -0
  283. package/lib/esm/Merging/StructClassMerger.d.ts +14 -0
  284. package/lib/esm/Merging/StructClassMerger.d.ts.map +1 -0
  285. package/lib/esm/Merging/StructClassMerger.js +20 -0
  286. package/lib/esm/Merging/StructClassMerger.js.map +1 -0
  287. package/lib/esm/Merging/UnitMerger.d.ts +14 -0
  288. package/lib/esm/Merging/UnitMerger.d.ts.map +1 -0
  289. package/lib/esm/Merging/UnitMerger.js +58 -0
  290. package/lib/esm/Merging/UnitMerger.js.map +1 -0
  291. package/lib/esm/Merging/UnitSystemMerger.d.ts +14 -0
  292. package/lib/esm/Merging/UnitSystemMerger.d.ts.map +1 -0
  293. package/lib/esm/Merging/UnitSystemMerger.js +24 -0
  294. package/lib/esm/Merging/UnitSystemMerger.js.map +1 -0
  295. package/lib/esm/Merging/Utils.d.ts +34 -0
  296. package/lib/esm/Merging/Utils.d.ts.map +1 -0
  297. package/lib/esm/Merging/Utils.js +90 -0
  298. package/lib/esm/Merging/Utils.js.map +1 -0
  299. package/lib/esm/Validation/Diagnostic.d.ts +322 -0
  300. package/lib/esm/Validation/Diagnostic.d.ts.map +1 -0
  301. package/lib/esm/Validation/Diagnostic.js +295 -0
  302. package/lib/esm/Validation/Diagnostic.js.map +1 -0
  303. package/lib/esm/Validation/DiagnosticReporter.d.ts +97 -0
  304. package/lib/esm/Validation/DiagnosticReporter.d.ts.map +1 -0
  305. package/lib/esm/Validation/DiagnosticReporter.js +105 -0
  306. package/lib/esm/Validation/DiagnosticReporter.js.map +1 -0
  307. package/lib/esm/Validation/ECRules.d.ts +454 -0
  308. package/lib/esm/Validation/ECRules.d.ts.map +1 -0
  309. package/lib/esm/Validation/ECRules.js +578 -0
  310. package/lib/esm/Validation/ECRules.js.map +1 -0
  311. package/lib/esm/Validation/LoggingDiagnosticReporter.d.ts +14 -0
  312. package/lib/esm/Validation/LoggingDiagnosticReporter.d.ts.map +1 -0
  313. package/lib/esm/Validation/LoggingDiagnosticReporter.js +37 -0
  314. package/lib/esm/Validation/LoggingDiagnosticReporter.js.map +1 -0
  315. package/lib/esm/Validation/RuleSuppressionSet.d.ts +60 -0
  316. package/lib/esm/Validation/RuleSuppressionSet.d.ts.map +1 -0
  317. package/lib/esm/Validation/RuleSuppressionSet.js +9 -0
  318. package/lib/esm/Validation/RuleSuppressionSet.js.map +1 -0
  319. package/lib/esm/Validation/Rules.d.ts +65 -0
  320. package/lib/esm/Validation/Rules.d.ts.map +1 -0
  321. package/lib/esm/Validation/Rules.js +9 -0
  322. package/lib/esm/Validation/Rules.js.map +1 -0
  323. package/lib/esm/Validation/SchemaChanges.d.ts +640 -0
  324. package/lib/esm/Validation/SchemaChanges.d.ts.map +1 -0
  325. package/lib/esm/Validation/SchemaChanges.js +1141 -0
  326. package/lib/esm/Validation/SchemaChanges.js.map +1 -0
  327. package/lib/esm/Validation/SchemaCompareDiagnostics.d.ts +423 -0
  328. package/lib/esm/Validation/SchemaCompareDiagnostics.d.ts.map +1 -0
  329. package/lib/esm/Validation/SchemaCompareDiagnostics.js +109 -0
  330. package/lib/esm/Validation/SchemaCompareDiagnostics.js.map +1 -0
  331. package/lib/esm/Validation/SchemaCompareReporter.d.ts +12 -0
  332. package/lib/esm/Validation/SchemaCompareReporter.d.ts.map +1 -0
  333. package/lib/esm/Validation/SchemaCompareReporter.js +9 -0
  334. package/lib/esm/Validation/SchemaCompareReporter.js.map +1 -0
  335. package/lib/esm/Validation/SchemaCompareResultDelegate.d.ts +237 -0
  336. package/lib/esm/Validation/SchemaCompareResultDelegate.d.ts.map +1 -0
  337. package/lib/esm/Validation/SchemaCompareResultDelegate.js +346 -0
  338. package/lib/esm/Validation/SchemaCompareResultDelegate.js.map +1 -0
  339. package/lib/esm/Validation/SchemaCompareVisitor.d.ts +120 -0
  340. package/lib/esm/Validation/SchemaCompareVisitor.d.ts.map +1 -0
  341. package/lib/esm/Validation/SchemaCompareVisitor.js +222 -0
  342. package/lib/esm/Validation/SchemaCompareVisitor.js.map +1 -0
  343. package/lib/esm/Validation/SchemaComparer.d.ts +211 -0
  344. package/lib/esm/Validation/SchemaComparer.d.ts.map +1 -0
  345. package/lib/esm/Validation/SchemaComparer.js +770 -0
  346. package/lib/esm/Validation/SchemaComparer.js.map +1 -0
  347. package/lib/esm/Validation/SchemaValidater.d.ts +20 -0
  348. package/lib/esm/Validation/SchemaValidater.d.ts.map +1 -0
  349. package/lib/esm/Validation/SchemaValidater.js +55 -0
  350. package/lib/esm/Validation/SchemaValidater.js.map +1 -0
  351. package/lib/esm/Validation/SchemaValidationVisitor.d.ts +171 -0
  352. package/lib/esm/Validation/SchemaValidationVisitor.d.ts.map +1 -0
  353. package/lib/esm/Validation/SchemaValidationVisitor.js +488 -0
  354. package/lib/esm/Validation/SchemaValidationVisitor.js.map +1 -0
  355. package/lib/esm/Validation/SchemaWalker.d.ts +23 -0
  356. package/lib/esm/Validation/SchemaWalker.d.ts.map +1 -0
  357. package/lib/esm/Validation/SchemaWalker.js +50 -0
  358. package/lib/esm/Validation/SchemaWalker.js.map +1 -0
  359. package/lib/esm/ecschema-editing.d.ts +49 -0
  360. package/lib/esm/ecschema-editing.d.ts.map +1 -0
  361. package/lib/esm/ecschema-editing.js +52 -0
  362. package/lib/esm/ecschema-editing.js.map +1 -0
  363. package/package.json +12 -10
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Formats.js","sourceRoot":"","sources":["../../../src/Editing/Formats.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAwC,cAAc,EAAa,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAIvI,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;GAGG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC,IAAuB,aAAa;QAClC,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,YAAmB,YAAiC;QAClD,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC7C,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,SAAoB,EAAE,IAAY,EAAE,UAAsB,EAAE,YAAqB,EAAE,KAAuB;QAC5H,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAS,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAA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B,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC;YAClJ,OAAO,SAAS,CAAC,GAAG,CAAC;QACvB,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YAChB,MAAM,IAAI,kBAAkB,CAAC,eAAe,CAAC,yBAAyB,EAAE,IAAI,YAAY,CAAC,IAAI,CAAC,cAAc,EAAE,WAAW,CAAC,IAAK,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;QAClJ,CAAC;IACH,CAAC;CACF","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 Editing\n */\n\nimport { Format, InvertedUnit, SchemaItemFormatProps, SchemaItemKey, SchemaItemType, SchemaKey, Unit } from \"@itwin/ecschema-metadata\";\nimport { FormatType } from \"@itwin/core-quantity\";\nimport { SchemaContextEditor } from \"./Editor\";\nimport { MutableFormat } from \"./Mutable/MutableFormat\";\nimport { ECEditingStatus, SchemaEditingError, SchemaItemId } from \"./Exception\";\nimport { SchemaItems } from \"./SchemaItems\";\n\n/**\n * @alpha\n * A class allowing you to create schema items of type Format.\n */\nexport class Formats extends SchemaItems {\n protected override get itemTypeClass(): typeof Format {\n return Format;\n }\n\n public constructor(schemaEditor: SchemaContextEditor) {\n super(SchemaItemType.Format, schemaEditor);\n }\n\n public async create(schemaKey: SchemaKey, name: string, formatType: FormatType, displayLabel?: string, units?: SchemaItemKey[]): Promise<SchemaItemKey> {\n try {\n const newFormat = await this.createSchemaItem<Format>(schemaKey, this.schemaItemType, (schema) => schema.createFormat.bind(schema), name) as MutableFormat;\n\n if (units !== undefined) {\n for (const unit of units) {\n const unitItem = await this.schemaEditor.schemaContext.getSchemaItem(unit);\n if (!unitItem) {\n throw new SchemaEditingError(ECEditingStatus.SchemaItemNotFoundInContext, new SchemaItemId(SchemaItemType.Unit, unit));\n }\n\n if (!Unit.isUnit(unitItem) && !InvertedUnit.isInvertedUnit(unitItem)) {\n throw new SchemaEditingError(ECEditingStatus.InvalidFormatUnitsSpecified, new SchemaItemId(unitItem.schemaItemType, unitItem.key));\n }\n\n newFormat.addUnit(unitItem);\n }\n }\n\n if (displayLabel)\n newFormat.setDisplayLabel(displayLabel);\n\n // TODO: Handle the setting of format traits, separators, etc....\n newFormat.setFormatType(formatType);\n return newFormat.key;\n } catch (e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFailed, new SchemaItemId(this.schemaItemType, name, schemaKey), e);\n }\n }\n\n /**\n * Creates a format through a SchemaItemFormatProps.\n * @param schemaKey a SchemaKey of the Schema that will house the new object.\n * @param relationshipProps a json object that will be used to populate the new RelationshipClass. Needs a name value passed in.\n */\n public async createFromProps(schemaKey: SchemaKey, formatProps: SchemaItemFormatProps): Promise<SchemaItemKey> {\n try {\n const newFormat = await this.createSchemaItemFromProps(schemaKey, this.schemaItemType, (schema) => schema.createFormat.bind(schema), formatProps);\n return newFormat.key;\n } catch (e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFromProps, new SchemaItemId(this.schemaItemType, formatProps.name!, schemaKey), e);\n }\n }\n}\n"]}
@@ -0,0 +1,19 @@
1
+ /** @packageDocumentation
2
+ * @module Editing
3
+ */
4
+ import { InvertedUnit, InvertedUnitProps, SchemaItemKey, SchemaKey } from "@itwin/ecschema-metadata";
5
+ import { SchemaContextEditor } from "./Editor";
6
+ import { SchemaItems } from "./SchemaItems";
7
+ /**
8
+ * @alpha
9
+ * A class allowing you to create schema items of type Inverted Unit.
10
+ */
11
+ export declare class InvertedUnits extends SchemaItems {
12
+ protected get itemTypeClass(): typeof InvertedUnit;
13
+ constructor(schemaEditor: SchemaContextEditor);
14
+ create(schemaKey: SchemaKey, name: string, invertsUnitKey: SchemaItemKey, unitSystemKey: SchemaItemKey, displayLabel?: string): Promise<SchemaItemKey>;
15
+ createFromProps(schemaKey: SchemaKey, invertedUnitProps: InvertedUnitProps): Promise<SchemaItemKey>;
16
+ setInvertsUnit(invertedUnitKey: SchemaItemKey, invertsUnitKey: SchemaItemKey): Promise<void>;
17
+ setUnitSystem(invertedUnitKey: SchemaItemKey, unitSystemKey: SchemaItemKey): Promise<void>;
18
+ }
19
+ //# sourceMappingURL=InvertedUnits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InvertedUnits.d.ts","sourceRoot":"","sources":["../../../src/Editing/InvertedUnits.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EACoB,YAAY,EAAE,iBAAiB,EAAE,aAAa,EACvD,SAAS,EAC1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;GAGG;AACH,qBAAa,aAAc,SAAQ,WAAW;IAC5C,cAAuB,aAAa,IAAI,OAAO,YAAY,CAE1D;gBAEkB,YAAY,EAAE,mBAAmB;IAGvC,MAAM,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAmBtJ,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,iBAAiB,EAAE,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC;IASnG,cAAc,CAAC,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAU5F,aAAa,CAAC,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;CASxG"}
@@ -0,0 +1,68 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module Editing
7
+ */
8
+ import { DelayedPromiseWithProps, InvertedUnit, SchemaItemType, Unit, UnitSystem, } from "@itwin/ecschema-metadata";
9
+ import { MutableInvertedUnit } from "./Mutable/MutableInvertedUnit";
10
+ import { ECEditingStatus, SchemaEditingError, SchemaItemId } from "./Exception";
11
+ import { SchemaItems } from "./SchemaItems";
12
+ /**
13
+ * @alpha
14
+ * A class allowing you to create schema items of type Inverted Unit.
15
+ */
16
+ export class InvertedUnits extends SchemaItems {
17
+ get itemTypeClass() {
18
+ return InvertedUnit;
19
+ }
20
+ constructor(schemaEditor) {
21
+ super(SchemaItemType.InvertedUnit, schemaEditor);
22
+ }
23
+ async create(schemaKey, name, invertsUnitKey, unitSystemKey, displayLabel) {
24
+ try {
25
+ const newUnit = await this.createSchemaItem(schemaKey, this.schemaItemType, (schema) => schema.createInvertedUnit.bind(schema), name);
26
+ const invertsUnit = await this.getSchemaItem(invertsUnitKey, Unit);
27
+ newUnit.setInvertsUnit(new DelayedPromiseWithProps(invertsUnitKey, async () => invertsUnit));
28
+ const unitSystem = await this.getSchemaItem(unitSystemKey, UnitSystem);
29
+ newUnit.setUnitSystem(new DelayedPromiseWithProps(unitSystemKey, async () => unitSystem));
30
+ if (displayLabel)
31
+ newUnit.setDisplayLabel(displayLabel);
32
+ return newUnit.key;
33
+ }
34
+ catch (e) {
35
+ throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFailed, new SchemaItemId(this.schemaItemType, name, schemaKey), e);
36
+ }
37
+ }
38
+ async createFromProps(schemaKey, invertedUnitProps) {
39
+ try {
40
+ const newUnit = await this.createSchemaItemFromProps(schemaKey, this.schemaItemType, (schema) => schema.createInvertedUnit.bind(schema), invertedUnitProps);
41
+ return newUnit.key;
42
+ }
43
+ catch (e) {
44
+ throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFromProps, new SchemaItemId(this.schemaItemType, invertedUnitProps.name, schemaKey), e);
45
+ }
46
+ }
47
+ async setInvertsUnit(invertedUnitKey, invertsUnitKey) {
48
+ try {
49
+ const invertedUnit = await this.getSchemaItem(invertedUnitKey, MutableInvertedUnit);
50
+ const invertsUnit = await this.getSchemaItem(invertedUnitKey, Unit);
51
+ invertedUnit.setInvertsUnit(new DelayedPromiseWithProps(invertsUnitKey, async () => invertsUnit));
52
+ }
53
+ catch (e) {
54
+ throw new SchemaEditingError(ECEditingStatus.SetInvertsUnit, new SchemaItemId(this.schemaItemType, invertedUnitKey), e);
55
+ }
56
+ }
57
+ async setUnitSystem(invertedUnitKey, unitSystemKey) {
58
+ try {
59
+ const invertedUnit = await this.getSchemaItem(invertedUnitKey, MutableInvertedUnit);
60
+ const unitSystem = await this.getSchemaItem(unitSystemKey, UnitSystem);
61
+ invertedUnit.setUnitSystem(new DelayedPromiseWithProps(unitSystemKey, async () => unitSystem));
62
+ }
63
+ catch (e) {
64
+ throw new SchemaEditingError(ECEditingStatus.SetUnitSystem, new SchemaItemId(this.schemaItemType, invertedUnitKey), e);
65
+ }
66
+ }
67
+ }
68
+ //# sourceMappingURL=InvertedUnits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InvertedUnits.js","sourceRoot":"","sources":["../../../src/Editing/InvertedUnits.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EACL,uBAAuB,EAAE,YAAY,EACrC,cAAc,EAAa,IAAI,EAAE,UAAU,GAC5C,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;GAGG;AACH,MAAM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AAC,aAAa,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;YACvE,YAAY,CAAC,aAAa,CAAC,IAAI,uBAAuB,CAA4B,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;QAC5H,CAAC;QAAC,OAAM,CAAM,EAAE,CAAC;YACf,MAAM,IAAI,kBAAkB,CAAC,eAAe,CAAC,aAAa,EAAE,IAAI,YAAY,CAAC,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC;QACzH,CAAC;IACH,CAAC;CACF","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 Editing\n */\n\nimport {\n DelayedPromiseWithProps, InvertedUnit, InvertedUnitProps, SchemaItemKey,\n SchemaItemType, SchemaKey, Unit, UnitSystem,\n} from \"@itwin/ecschema-metadata\";\nimport { SchemaContextEditor } from \"./Editor\";\nimport { MutableInvertedUnit } from \"./Mutable/MutableInvertedUnit\";\nimport { ECEditingStatus, SchemaEditingError, SchemaItemId } from \"./Exception\";\nimport { SchemaItems } from \"./SchemaItems\";\n\n/**\n * @alpha\n * A class allowing you to create schema items of type Inverted Unit.\n */\nexport class InvertedUnits extends SchemaItems {\n protected override get itemTypeClass(): typeof InvertedUnit {\n return InvertedUnit;\n }\n\n public constructor(schemaEditor: SchemaContextEditor) {\n super(SchemaItemType.InvertedUnit, schemaEditor);\n }\n public async create(schemaKey: SchemaKey, name: string, invertsUnitKey: SchemaItemKey, unitSystemKey: SchemaItemKey, displayLabel?: string): Promise<SchemaItemKey> {\n try {\n const newUnit = await this.createSchemaItem<InvertedUnit>(schemaKey, this.schemaItemType, (schema) => schema.createInvertedUnit.bind(schema), name) as MutableInvertedUnit;\n\n const invertsUnit = await this.getSchemaItem(invertsUnitKey, Unit);\n newUnit.setInvertsUnit(new DelayedPromiseWithProps<SchemaItemKey, Unit>(invertsUnitKey, async () => invertsUnit));\n\n const unitSystem = await this.getSchemaItem(unitSystemKey, UnitSystem);\n newUnit.setUnitSystem(new DelayedPromiseWithProps<SchemaItemKey, UnitSystem>(unitSystemKey, async () => unitSystem));\n\n if (displayLabel)\n newUnit.setDisplayLabel(displayLabel);\n\n return newUnit.key;\n } catch (e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFailed, new SchemaItemId(this.schemaItemType, name, schemaKey), e);\n }\n }\n\n public async createFromProps(schemaKey: SchemaKey, invertedUnitProps: InvertedUnitProps): Promise<SchemaItemKey> {\n try {\n const newUnit = await this.createSchemaItemFromProps(schemaKey, this.schemaItemType, (schema) => schema.createInvertedUnit.bind(schema), invertedUnitProps);\n return newUnit.key;\n } catch (e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFromProps, new SchemaItemId(this.schemaItemType, invertedUnitProps.name!, schemaKey), e);\n }\n }\n\n public async setInvertsUnit(invertedUnitKey: SchemaItemKey, invertsUnitKey: SchemaItemKey): Promise<void> {\n try {\n const invertedUnit = await this.getSchemaItem(invertedUnitKey, MutableInvertedUnit);\n const invertsUnit = await this.getSchemaItem(invertedUnitKey, Unit);\n invertedUnit.setInvertsUnit(new DelayedPromiseWithProps<SchemaItemKey, Unit>(invertsUnitKey, async () => invertsUnit));\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.SetInvertsUnit, new SchemaItemId(this.schemaItemType, invertedUnitKey), e);\n }\n }\n\n public async setUnitSystem(invertedUnitKey: SchemaItemKey, unitSystemKey: SchemaItemKey): Promise<void> {\n try {\n const invertedUnit = await this.getSchemaItem(invertedUnitKey, MutableInvertedUnit);\n const unitSystem = await this.getSchemaItem(unitSystemKey, UnitSystem);\n invertedUnit.setUnitSystem(new DelayedPromiseWithProps<SchemaItemKey, UnitSystem>(unitSystemKey, async () => unitSystem));\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.SetUnitSystem, new SchemaItemId(this.schemaItemType, invertedUnitKey), e);\n }\n }\n}\n"]}
@@ -0,0 +1,30 @@
1
+ /** @packageDocumentation
2
+ * @module Editing
3
+ */
4
+ import { InvertedUnit, KindOfQuantity, KindOfQuantityProps, OverrideFormat, SchemaItemKey, SchemaKey, Unit } from "@itwin/ecschema-metadata";
5
+ import { SchemaContextEditor } from "./Editor";
6
+ import { SchemaItems } from "./SchemaItems";
7
+ /**
8
+ * @alpha
9
+ * A class allowing you to create schema items of type KindOfQuantity.
10
+ */
11
+ export declare class KindOfQuantities extends SchemaItems {
12
+ protected get itemTypeClass(): typeof KindOfQuantity;
13
+ constructor(schemaEditor: SchemaContextEditor);
14
+ create(schemaKey: SchemaKey, name: string, persistenceUnitKey: SchemaItemKey, displayLabel?: string): Promise<SchemaItemKey>;
15
+ createFromProps(schemaKey: SchemaKey, koqProps: KindOfQuantityProps): Promise<SchemaItemKey>;
16
+ /**
17
+ *
18
+ * @param koqKey A schemaItemKey of the editing KindOfQuantity.
19
+ * @param format A schemaItemKey of a Format.
20
+ * @param isDefault .is set to false when not explicitly passed.
21
+ */
22
+ addPresentationFormat(koqKey: SchemaItemKey, format: SchemaItemKey, isDefault?: boolean): Promise<void>;
23
+ addPresentationOverrideFormat(koqKey: SchemaItemKey, overrideFormat: OverrideFormat, isDefault?: boolean): Promise<void>;
24
+ /**
25
+ * @param parent A SchemaItemKey of the parent Format.
26
+ * @param unitLabelOverrides The list of Unit (or InvertedUnit) and label overrides. The length of list should be equal to the number of units in the parent Format.
27
+ */
28
+ createFormatOverride(parent: SchemaItemKey, precision?: number, unitLabelOverrides?: Array<[Unit | InvertedUnit, string | undefined]>): Promise<OverrideFormat>;
29
+ }
30
+ //# sourceMappingURL=KindOfQuantities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KindOfQuantities.d.ts","sourceRoot":"","sources":["../../../src/Editing/KindOfQuantities.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAEG,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,cAAc,EACzE,aAAa,EAAkB,SAAS,EAAE,IAAI,EAC/C,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,cAAuB,aAAa,IAAI,OAAO,cAAc,CAE5D;gBACkB,YAAY,EAAE,mBAAmB;IAIvC,MAAM,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,kBAAkB,EAAE,aAAa,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAyB5H,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,CAAC;IASzG;;;;;OAKG;IACU,qBAAqB,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,GAAE,OAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAU9G,6BAA6B,CAAC,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,GAAE,OAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAS5I;;;OAGG;IACU,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,GAAG,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;CAQ7K"}
@@ -0,0 +1,92 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module Editing
7
+ */
8
+ import { DelayedPromiseWithProps, Format, InvertedUnit, KindOfQuantity, OverrideFormat, SchemaItemType, Unit, } from "@itwin/ecschema-metadata";
9
+ import { MutableKindOfQuantity } from "./Mutable/MutableKindOfQuantity";
10
+ import { ECEditingStatus, SchemaEditingError, SchemaItemId } from "./Exception";
11
+ import { SchemaItems } from "./SchemaItems";
12
+ /**
13
+ * @alpha
14
+ * A class allowing you to create schema items of type KindOfQuantity.
15
+ */
16
+ export class KindOfQuantities extends SchemaItems {
17
+ get itemTypeClass() {
18
+ return KindOfQuantity;
19
+ }
20
+ constructor(schemaEditor) {
21
+ super(SchemaItemType.KindOfQuantity, schemaEditor);
22
+ }
23
+ async create(schemaKey, name, persistenceUnitKey, displayLabel) {
24
+ try {
25
+ const koqItem = await this.createSchemaItem(schemaKey, this.schemaItemType, (schema) => schema.createKindOfQuantity.bind(schema), name);
26
+ const persistenceUnit = await koqItem.schema.lookupItem(persistenceUnitKey);
27
+ if (persistenceUnit === undefined || (!Unit.isUnit(persistenceUnit) && !InvertedUnit.isInvertedUnit(persistenceUnit)))
28
+ throw new SchemaEditingError(ECEditingStatus.SchemaItemNotFound, new SchemaItemId(SchemaItemType.Unit, persistenceUnitKey));
29
+ if (Unit.isUnit(persistenceUnit)) {
30
+ koqItem.persistenceUnit = new DelayedPromiseWithProps(persistenceUnit.key, async () => persistenceUnit);
31
+ }
32
+ if (InvertedUnit.isInvertedUnit(persistenceUnit)) {
33
+ koqItem.persistenceUnit = new DelayedPromiseWithProps(persistenceUnit.key, async () => persistenceUnit);
34
+ }
35
+ if (displayLabel !== undefined) {
36
+ koqItem.setDisplayLabel(displayLabel);
37
+ }
38
+ return koqItem.key;
39
+ }
40
+ catch (e) {
41
+ throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFailed, new SchemaItemId(this.schemaItemType, name, schemaKey), e);
42
+ }
43
+ }
44
+ async createFromProps(schemaKey, koqProps) {
45
+ try {
46
+ const koqItem = await this.createSchemaItemFromProps(schemaKey, this.schemaItemType, (schema) => schema.createKindOfQuantity.bind(schema), koqProps);
47
+ return koqItem.key;
48
+ }
49
+ catch (e) {
50
+ throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFromProps, new SchemaItemId(this.schemaItemType, koqProps.name, schemaKey), e);
51
+ }
52
+ }
53
+ /**
54
+ *
55
+ * @param koqKey A schemaItemKey of the editing KindOfQuantity.
56
+ * @param format A schemaItemKey of a Format.
57
+ * @param isDefault .is set to false when not explicitly passed.
58
+ */
59
+ async addPresentationFormat(koqKey, format, isDefault = false) {
60
+ try {
61
+ const kindOfQuantity = await this.getSchemaItem(koqKey, MutableKindOfQuantity);
62
+ const presentationFormat = await this.getSchemaItem(format, Format);
63
+ kindOfQuantity.addPresentationFormat(presentationFormat, isDefault);
64
+ }
65
+ catch (e) {
66
+ throw new SchemaEditingError(ECEditingStatus.AddPresentationUnit, new SchemaItemId(this.schemaItemType, koqKey), e);
67
+ }
68
+ }
69
+ async addPresentationOverrideFormat(koqKey, overrideFormat, isDefault = false) {
70
+ try {
71
+ const kindOfQuantity = await this.getSchemaItem(koqKey, MutableKindOfQuantity);
72
+ kindOfQuantity.addPresentationFormat(overrideFormat, isDefault);
73
+ }
74
+ catch (e) {
75
+ throw new SchemaEditingError(ECEditingStatus.AddPresentationOverride, new SchemaItemId(this.schemaItemType, koqKey), e);
76
+ }
77
+ }
78
+ /**
79
+ * @param parent A SchemaItemKey of the parent Format.
80
+ * @param unitLabelOverrides The list of Unit (or InvertedUnit) and label overrides. The length of list should be equal to the number of units in the parent Format.
81
+ */
82
+ async createFormatOverride(parent, precision, unitLabelOverrides) {
83
+ try {
84
+ const parentFormat = await this.getSchemaItem(parent, Format);
85
+ return new OverrideFormat(parentFormat, precision, unitLabelOverrides);
86
+ }
87
+ catch (e) {
88
+ throw new SchemaEditingError(ECEditingStatus.CreateFormatOverride, new SchemaItemId(this.schemaItemType, parent), e);
89
+ }
90
+ }
91
+ }
92
+ //# sourceMappingURL=KindO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AAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YAC9D,OAAO,IAAI,cAAc,CAAC,YAAY,EAAE,SAAS,EAAE,kBAAkB,CAAC,CAAC;QACzE,CAAC;QAAC,OAAM,CAAM,EAAE,CAAC;YACf,MAAM,IAAI,kBAAkB,CAAC,eAAe,CAAC,oBAAoB,EAAE,IAAI,YAAY,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QACvH,CAAC;IACH,CAAC;CACF","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 Editing\n */\n\nimport {\n DelayedPromiseWithProps,\n Format, InvertedUnit, KindOfQuantity, KindOfQuantityProps, OverrideFormat,\n SchemaItemKey, SchemaItemType, SchemaKey, Unit,\n} from \"@itwin/ecschema-metadata\";\nimport { SchemaContextEditor } from \"./Editor\";\nimport { MutableKindOfQuantity } from \"./Mutable/MutableKindOfQuantity\";\nimport { ECEditingStatus, SchemaEditingError, SchemaItemId } from \"./Exception\";\nimport { SchemaItems } from \"./SchemaItems\";\n\n/**\n * @alpha\n * A class allowing you to create schema items of type KindOfQuantity.\n */\nexport class KindOfQuantities extends SchemaItems {\n protected override get itemTypeClass(): typeof KindOfQuantity {\n return KindOfQuantity;\n }\n public constructor(schemaEditor: SchemaContextEditor) {\n super(SchemaItemType.KindOfQuantity, schemaEditor);\n }\n\n public async create(schemaKey: SchemaKey, name: string, persistenceUnitKey: SchemaItemKey, displayLabel?: string): Promise<SchemaItemKey> {\n try {\n const koqItem = await this.createSchemaItem<KindOfQuantity>(schemaKey, this.schemaItemType, (schema) => schema.createKindOfQuantity.bind(schema), name) as MutableKindOfQuantity;\n const persistenceUnit = await koqItem.schema.lookupItem(persistenceUnitKey);\n if (persistenceUnit === undefined || (!Unit.isUnit(persistenceUnit) && !InvertedUnit.isInvertedUnit(persistenceUnit)))\n throw new SchemaEditingError(ECEditingStatus.SchemaItemNotFound, new SchemaItemId(SchemaItemType.Unit, persistenceUnitKey));\n\n if (Unit.isUnit(persistenceUnit)) {\n koqItem.persistenceUnit = new DelayedPromiseWithProps(persistenceUnit.key, async () => persistenceUnit);\n }\n\n if (InvertedUnit.isInvertedUnit(persistenceUnit)) {\n koqItem.persistenceUnit = new DelayedPromiseWithProps(persistenceUnit.key, async () => persistenceUnit);\n }\n\n if (displayLabel !== undefined) {\n koqItem.setDisplayLabel(displayLabel);\n }\n\n return koqItem.key;\n } catch (e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFailed, new SchemaItemId(this.schemaItemType, name, schemaKey), e);\n }\n }\n\n public async createFromProps(schemaKey: SchemaKey, koqProps: KindOfQuantityProps): Promise<SchemaItemKey> {\n try {\n const koqItem = await this.createSchemaItemFromProps(schemaKey, this.schemaItemType, (schema) => schema.createKindOfQuantity.bind(schema), koqProps);\n return koqItem.key;\n } catch (e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFromProps, new SchemaItemId(this.schemaItemType, koqProps.name!, schemaKey), e);\n }\n }\n\n /**\n *\n * @param koqKey A schemaItemKey of the editing KindOfQuantity.\n * @param format A schemaItemKey of a Format.\n * @param isDefault .is set to false when not explicitly passed.\n */\n public async addPresentationFormat(koqKey: SchemaItemKey, format: SchemaItemKey, isDefault: boolean = false): Promise<void> {\n try {\n const kindOfQuantity = await this.getSchemaItem(koqKey, MutableKindOfQuantity);\n const presentationFormat = await this.getSchemaItem(format, Format);\n kindOfQuantity.addPresentationFormat(presentationFormat, isDefault);\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.AddPresentationUnit, new SchemaItemId(this.schemaItemType, koqKey), e);\n }\n }\n\n public async addPresentationOverrideFormat(koqKey: SchemaItemKey, overrideFormat: OverrideFormat, isDefault: boolean = false): Promise<void> {\n try {\n const kindOfQuantity = await this.getSchemaItem(koqKey, MutableKindOfQuantity);\n kindOfQuantity.addPresentationFormat(overrideFormat, isDefault);\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.AddPresentationOverride, new SchemaItemId(this.schemaItemType, koqKey), e);\n }\n }\n\n /**\n * @param parent A SchemaItemKey of the parent Format.\n * @param unitLabelOverrides The list of Unit (or InvertedUnit) and label overrides. The length of list should be equal to the number of units in the parent Format.\n */\n public async createFormatOverride(parent: SchemaItemKey, precision?: number, unitLabelOverrides?: Array<[Unit | InvertedUnit, string | undefined]>): Promise<OverrideFormat> {\n try {\n const parentFormat = await this.getSchemaItem(parent, Format);\n return new OverrideFormat(parentFormat, precision, unitLabelOverrides);\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateFormatOverride, new SchemaItemId(this.schemaItemType, parent), e);\n }\n }\n}\n"]}
@@ -0,0 +1,35 @@
1
+ /** @packageDocumentation
2
+ * @module Editing
3
+ */
4
+ import { Mixin, MixinProps, NavigationPropertyProps, RelationshipClass, SchemaItemKey, SchemaKey, StrengthDirection } from "@itwin/ecschema-metadata";
5
+ import { SchemaContextEditor } from "./Editor";
6
+ import { ECClasses } from "./ECClasses";
7
+ import { NavigationProperties } from "./Properties";
8
+ /**
9
+ * @alpha
10
+ * A class extending ECClasses allowing you to create schema items of type Mixin.
11
+ */
12
+ export declare class Mixins extends ECClasses {
13
+ protected get itemTypeClass(): typeof Mixin;
14
+ constructor(schemaEditor: SchemaContextEditor);
15
+ /**
16
+ * Allows access for editing of NavigationProperty attributes.
17
+ */
18
+ readonly navigationProperties: NavigationProperties;
19
+ create(schemaKey: SchemaKey, name: string, appliesTo: SchemaItemKey, displayLabel?: string, baseClassKey?: SchemaItemKey): Promise<SchemaItemKey>;
20
+ /**
21
+ * Creates a MixinClass through a MixinProps.
22
+ * @param schemaKey a SchemaKey of the Schema that will house the new object.
23
+ * @param mixinProps a json object that will be used to populate the new MixinClass. Needs a name value passed in.
24
+ */
25
+ createFromProps(schemaKey: SchemaKey, mixinProps: MixinProps): Promise<SchemaItemKey>;
26
+ addMixin(entityKey: SchemaItemKey, mixinKey: SchemaItemKey): Promise<void>;
27
+ createNavigationProperty(mixinKey: SchemaItemKey, name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<void>;
28
+ /**
29
+ * Creates a Navigation Property through a NavigationPropertyProps.
30
+ * @param classKey a SchemaItemKey of the Mixin that will house the new property.
31
+ * @param navigationProps a json object that will be used to populate the new Navigation Property.
32
+ */
33
+ createNavigationPropertyFromProps(classKey: SchemaItemKey, navigationProps: NavigationPropertyProps): Promise<void>;
34
+ }
35
+ //# sourceMappingURL=Mixins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Mixins.d.ts","sourceRoot":"","sources":["../../../src/Editing/Mixins.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EACiC,KAAK,EAAE,UAAU,EAAE,uBAAuB,EAAE,iBAAiB,EACnG,aAAa,EAAkB,SAAS,EAAE,iBAAiB,EAC5D,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAGpD;;;GAGG;AACH,qBAAa,MAAO,SAAQ,SAAS;IACnC,cAAuB,aAAa,IAAI,OAAO,KAAK,CAEnD;gBAEkB,YAAY,EAAE,mBAAmB;IAIpD;;OAEG;IACH,SAAgB,oBAAoB,uBAAqE;IAE5F,MAAM,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;IAe9J;;;;OAIG;IACU,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC;IASrF,QAAQ,CAAC,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAU1E,wBAAwB,CAAC,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,iBAAiB,EAAE,SAAS,EAAE,MAAM,GAAG,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAS5K;;;;OAIG;IACU,iCAAiC,CAAC,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;CASjI"}
@@ -0,0 +1,90 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module Editing
7
+ */
8
+ import { DelayedPromiseWithProps, EntityClass, Mixin, SchemaItemType, } from "@itwin/ecschema-metadata";
9
+ import { ECClasses } from "./ECClasses";
10
+ import { MutableMixin } from "./Mutable/MutableMixin";
11
+ import { NavigationProperties } from "./Properties";
12
+ import { ClassId, ECEditingStatus, SchemaEditingError } from "./Exception";
13
+ /**
14
+ * @alpha
15
+ * A class extending ECClasses allowing you to create schema items of type Mixin.
16
+ */
17
+ export class Mixins extends ECClasses {
18
+ get itemTypeClass() {
19
+ return Mixin;
20
+ }
21
+ constructor(schemaEditor) {
22
+ super(SchemaItemType.Mixin, schemaEditor);
23
+ }
24
+ /**
25
+ * Allows access for editing of NavigationProperty attributes.
26
+ */
27
+ navigationProperties = new NavigationProperties(SchemaItemType.Mixin, this.schemaEditor);
28
+ async create(schemaKey, name, appliesTo, displayLabel, baseClassKey) {
29
+ try {
30
+ const newClass = await this.createClass(schemaKey, this.schemaItemType, (schema) => schema.createMixinClass.bind(schema), name, baseClassKey);
31
+ const newAppliesTo = await this.getSchemaItem(appliesTo, EntityClass);
32
+ newClass.setAppliesTo(new DelayedPromiseWithProps(newAppliesTo.key, async () => newAppliesTo));
33
+ if (displayLabel)
34
+ newClass.setDisplayLabel(displayLabel);
35
+ return newClass.key;
36
+ }
37
+ catch (e) {
38
+ throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFailed, new ClassId(this.schemaItemType, name, schemaKey), e);
39
+ }
40
+ }
41
+ /**
42
+ * Creates a MixinClass through a MixinProps.
43
+ * @param schemaKey a SchemaKey of the Schema that will house the new object.
44
+ * @param mixinProps a json object that will be used to populate the new MixinClass. Needs a name value passed in.
45
+ */
46
+ async createFromProps(schemaKey, mixinProps) {
47
+ try {
48
+ const newClass = await this.createSchemaItemFromProps(schemaKey, this.schemaItemType, (schema) => schema.createMixinClass.bind(schema), mixinProps);
49
+ return newClass.key;
50
+ }
51
+ catch (e) {
52
+ throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFromProps, new ClassId(this.schemaItemType, mixinProps.name, schemaKey), e);
53
+ }
54
+ }
55
+ async addMixin(entityKey, mixinKey) {
56
+ try {
57
+ const entity = await this.getSchemaItem(entityKey, EntityClass);
58
+ const mixin = await this.getSchemaItem(mixinKey, Mixin);
59
+ entity.addMixin(mixin);
60
+ }
61
+ catch (e) {
62
+ throw new SchemaEditingError(ECEditingStatus.AddMixin, new ClassId(SchemaItemType.EntityClass, entityKey), e);
63
+ }
64
+ }
65
+ async createNavigationProperty(mixinKey, name, relationship, direction) {
66
+ try {
67
+ const mixin = await this.getSchemaItem(mixinKey, MutableMixin);
68
+ await mixin.createNavigationProperty(name, relationship, direction);
69
+ }
70
+ catch (e) {
71
+ throw new SchemaEditingError(ECEditingStatus.CreateNavigationProperty, new ClassId(SchemaItemType.Mixin, mixinKey), e);
72
+ }
73
+ }
74
+ /**
75
+ * Creates a Navigation Property through a NavigationPropertyProps.
76
+ * @param classKey a SchemaItemKey of the Mixin that will house the new property.
77
+ * @param navigationProps a json object that will be used to populate the new Navigation Property.
78
+ */
79
+ async createNavigationPropertyFromProps(classKey, navigationProps) {
80
+ try {
81
+ const mixin = await this.getSchemaItem(classKey, MutableMixin);
82
+ const property = await mixin.createNavigationProperty(navigationProps.name, navigationProps.relationshipName, navigationProps.direction);
83
+ await property.fromJSON(navigationProps);
84
+ }
85
+ catch (e) {
86
+ throw new SchemaEditingError(ECEditingStatus.CreateNavigationPropertyFromProps, new ClassId(SchemaItemType.RelationshipClass, classKey), e);
87
+ }
88
+ }
89
+ }
90
+ //# sourceMappingURL=Mixins.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Mixins.js","sourceRoot":"","sources":["../../../src/Editing/Mixins.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EACL,uBAAuB,EAAE,WAAW,EAAE,KAAK,EAC5B,cAAc,GAC9B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAE3E;;;GAGG;AACH,MAAM,OAAO,MAAO,SAAQ,SAAS;IACnC,IAAuB,aAAa;QAClC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,YAAmB,YAAiC;QAClD,KAAK,CAAC,cAAc,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;IAC5C,CAAC;IAED;;OAEG;IACa,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAElG,KAAK,CAAC,MAAM,CAAC,SAAoB,EAAE,IAAY,EAAE,SAAwB,EAAE,YAAqB,EAAE,YAA4B;QACnI,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CAAQ,SAA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e,CAAC,SAAS,CAAC,CAAC;YACzI,MAAM,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;QAC3C,CAAC;QAAC,OAAM,CAAM,EAAE,CAAC;YACf,MAAM,IAAI,kBAAkB,CAAC,eAAe,CAAC,iCAAiC,EAAE,IAAI,OAAO,CAAC,cAAc,CAAC,iBAAiB,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;QAC9I,CAAC;IACH,CAAC;CACF","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 Editing\n */\n\nimport {\n DelayedPromiseWithProps, EntityClass, Mixin, MixinProps, NavigationPropertyProps, RelationshipClass,\n SchemaItemKey, SchemaItemType, SchemaKey, StrengthDirection,\n} from \"@itwin/ecschema-metadata\";\nimport { SchemaContextEditor } from \"./Editor\";\nimport { ECClasses } from \"./ECClasses\";\nimport { MutableMixin } from \"./Mutable/MutableMixin\";\nimport { MutableEntityClass } from \"./Mutable/MutableEntityClass\";\nimport { NavigationProperties } from \"./Properties\";\nimport { ClassId, ECEditingStatus, SchemaEditingError } from \"./Exception\";\n\n/**\n * @alpha\n * A class extending ECClasses allowing you to create schema items of type Mixin.\n */\nexport class Mixins extends ECClasses {\n protected override get itemTypeClass(): typeof Mixin {\n return Mixin;\n }\n\n public constructor(schemaEditor: SchemaContextEditor) {\n super(SchemaItemType.Mixin, schemaEditor);\n }\n\n /**\n * Allows access for editing of NavigationProperty attributes.\n */\n public readonly navigationProperties = new NavigationProperties(SchemaItemType.Mixin, this.schemaEditor);\n\n public async create(schemaKey: SchemaKey, name: string, appliesTo: SchemaItemKey, displayLabel?: string, baseClassKey?: SchemaItemKey): Promise<SchemaItemKey> {\n try {\n const newClass = await this.createClass<Mixin>(schemaKey, this.schemaItemType, (schema) => schema.createMixinClass.bind(schema), name, baseClassKey) as MutableMixin;\n const newAppliesTo = await this.getSchemaItem(appliesTo, EntityClass);\n newClass.setAppliesTo(new DelayedPromiseWithProps<SchemaItemKey, EntityClass>(newAppliesTo.key, async () => newAppliesTo));\n\n if (displayLabel)\n newClass.setDisplayLabel(displayLabel);\n\n return newClass.key;\n } catch (e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFailed, new ClassId(this.schemaItemType, name, schemaKey), e);\n }\n }\n\n /**\n * Creates a MixinClass through a MixinProps.\n * @param schemaKey a SchemaKey of the Schema that will house the new object.\n * @param mixinProps a json object that will be used to populate the new MixinClass. Needs a name value passed in.\n */\n public async createFromProps(schemaKey: SchemaKey, mixinProps: MixinProps): Promise<SchemaItemKey> {\n try {\n const newClass = await this.createSchemaItemFromProps(schemaKey, this.schemaItemType, (schema) => schema.createMixinClass.bind(schema), mixinProps);\n return newClass.key;\n } catch (e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFromProps, new ClassId(this.schemaItemType, mixinProps.name!, schemaKey), e);\n }\n }\n\n public async addMixin(entityKey: SchemaItemKey, mixinKey: SchemaItemKey): Promise<void> {\n try {\n const entity = await this.getSchemaItem(entityKey, EntityClass);\n const mixin = await this.getSchemaItem(mixinKey, Mixin);\n (entity as MutableEntityClass).addMixin(mixin);\n } catch(e: any){\n throw new SchemaEditingError(ECEditingStatus.AddMixin, new ClassId(SchemaItemType.EntityClass, entityKey), e);\n }\n }\n\n public async createNavigationProperty(mixinKey: SchemaItemKey, name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<void> {\n try {\n const mixin = await this.getSchemaItem(mixinKey, MutableMixin);\n await mixin.createNavigationProperty(name, relationship, direction);\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateNavigationProperty, new ClassId(SchemaItemType.Mixin, mixinKey), e);\n }\n }\n\n /**\n * Creates a Navigation Property through a NavigationPropertyProps.\n * @param classKey a SchemaItemKey of the Mixin that will house the new property.\n * @param navigationProps a json object that will be used to populate the new Navigation Property.\n */\n public async createNavigationPropertyFromProps(classKey: SchemaItemKey, navigationProps: NavigationPropertyProps): Promise<void> {\n try {\n const mixin = await this.getSchemaItem(classKey, MutableMixin);\n const property = await mixin.createNavigationProperty(navigationProps.name, navigationProps.relationshipName, navigationProps.direction);\n await property.fromJSON(navigationProps);\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateNavigationPropertyFromProps, new ClassId(SchemaItemType.RelationshipClass, classKey), e);\n }\n }\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import { ArrayProperty } from "@itwin/ecschema-metadata";
2
+ /**
3
+ * @internal
4
+ * An abstract class used for schema editing.
5
+ */
6
+ export declare abstract class MutableArrayProperty extends ArrayProperty {
7
+ abstract setMinOccurs(minOccurs: number): void;
8
+ abstract setMaxOccurs(maxOccurs: number): void;
9
+ }
10
+ //# sourceMappingURL=MutableArrayProperty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MutableArrayProperty.d.ts","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableArrayProperty.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD;;;GAGG;AACH,8BAAsB,oBAAqB,SAAQ,aAAa;aACrC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;aACrC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;CAC/D"}
@@ -0,0 +1,12 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ import { ArrayProperty } from "@itwin/ecschema-metadata";
6
+ /**
7
+ * @internal
8
+ * An abstract class used for schema editing.
9
+ */
10
+ export class MutableArrayProperty extends ArrayProperty {
11
+ }
12
+ //# sourceMappingURL=MutableArrayProperty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MutableArrayProperty.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableArrayProperty.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD;;;GAGG;AACH,MAAM,OAAgB,oBAAqB,SAAQ,aAAa;CAG/D","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*--------------------------------------------------------------------------------------------*/\nimport { ArrayProperty } from \"@itwin/ecschema-metadata\";\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableArrayProperty extends ArrayProperty {\n public abstract override setMinOccurs(minOccurs: number): void;\n public abstract override setMaxOccurs(maxOccurs: number): void;\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import { CustomAttributeClass, CustomAttributeContainerType } from "@itwin/ecschema-metadata";
2
+ /**
3
+ * @internal
4
+ * An abstract class used for Schema editing.
5
+ */
6
+ export declare abstract class MutableCAClass extends CustomAttributeClass {
7
+ abstract setAppliesTo(containerType: CustomAttributeContainerType): void;
8
+ abstract setDisplayLabel(displayLabel: string): void;
9
+ }
10
+ //# sourceMappingURL=MutableCAClass.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MutableCAClass.d.ts","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableCAClass.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAE9F;;;GAGG;AACH,8BAAsB,cAAe,SAAQ,oBAAoB;aACtC,YAAY,CAAC,aAAa,EAAE,4BAA4B,GAAG,IAAI;aAC/D,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;CACrE"}
@@ -0,0 +1,12 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ import { CustomAttributeClass } from "@itwin/ecschema-metadata";
6
+ /**
7
+ * @internal
8
+ * An abstract class used for Schema editing.
9
+ */
10
+ export class MutableCAClass extends CustomAttributeClass {
11
+ }
12
+ //# sourceMappingURL=MutableCAClass.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MutableCAClass.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableCAClass.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,oBAAoB,EAAgC,MAAM,0BAA0B,CAAC;AAE9F;;;GAGG;AACH,MAAM,OAAgB,cAAe,SAAQ,oBAAoB;CAGhE","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*--------------------------------------------------------------------------------------------*/\nimport { CustomAttributeClass, CustomAttributeContainerType } from \"@itwin/ecschema-metadata\";\n\n/**\n * @internal\n * An abstract class used for Schema editing.\n */\nexport abstract class MutableCAClass extends CustomAttributeClass {\n public abstract override setAppliesTo(containerType: CustomAttributeContainerType): void;\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n"]}
@@ -0,0 +1,39 @@
1
+ import { CustomAttribute, ECClass, ECClassModifier, Enumeration, EnumerationArrayProperty, EnumerationProperty, LazyLoadedECClass, PrimitiveArrayProperty, PrimitiveProperty, PrimitiveType, Property, StructArrayProperty, StructClass, StructProperty } from "@itwin/ecschema-metadata";
2
+ /**
3
+ * @internal
4
+ * An abstract class used for schema editing.
5
+ */
6
+ export declare abstract class MutableStructClass extends StructClass {
7
+ abstract setDisplayLabel(displayLabel: string): void;
8
+ }
9
+ /**
10
+ * Hackish approach that works like a "friend class" so we can access protected members without making them public.
11
+ * @internal
12
+ */
13
+ export declare abstract class MutableClass extends ECClass {
14
+ abstract setBaseClass(baseClass: LazyLoadedECClass | undefined): Promise<void>;
15
+ abstract addCustomAttribute(customAttribute: CustomAttribute): void;
16
+ abstract setModifier(modifier: ECClassModifier): void;
17
+ abstract setName(name: string): void;
18
+ abstract setDescription(description: string): void;
19
+ abstract setDisplayLabel(displayLabel: string): void;
20
+ abstract createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty>;
21
+ abstract createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty>;
22
+ abstract createPrimitiveProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;
23
+ abstract createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty;
24
+ abstract createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty;
25
+ abstract createPrimitivePropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;
26
+ abstract createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty>;
27
+ abstract createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty>;
28
+ abstract createPrimitiveArrayProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;
29
+ abstract createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty;
30
+ abstract createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty;
31
+ abstract createPrimitiveArrayPropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;
32
+ abstract createStructProperty(name: string, structType: string | StructClass): Promise<StructProperty>;
33
+ abstract createStructPropertySync(name: string, structType: string | StructClass): StructProperty;
34
+ abstract createStructArrayProperty(name: string, structType: string | StructClass): Promise<StructArrayProperty>;
35
+ abstract createStructArrayPropertySync(name: string, structType: string | StructClass): StructArrayProperty;
36
+ abstract deleteProperty(name: string): Promise<void>;
37
+ abstract deletePropertySync(name: string): void;
38
+ }
39
+ //# sourceMappingURL=MutableClass.d.ts.map
@@ -0,0 +1 @@
1
+ {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,0 +1,18 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ import { ECClass, StructClass, } from "@itwin/ecschema-metadata";
6
+ /**
7
+ * @internal
8
+ * An abstract class used for schema editing.
9
+ */
10
+ export class MutableStructClass extends StructClass {
11
+ }
12
+ /**
13
+ * Hackish approach that works like a "friend class" so we can access protected members without making them public.
14
+ * @internal
15
+ */
16
+ export class MutableClass extends ECClass {
17
+ }
18
+ //# sourceMappingURL=MutableClass.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MutableClass.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableClass.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EACY,OAAO,EACyC,WAAW,GAC7E,MAAM,0BAA0B,CAAC;AAElC;;;GAGG;AACH,MAAM,OAAgB,kBAAmB,SAAQ,WAAW;CAE3D;AAED;;;GAGG;AACH,MAAM,OAAgB,YAAa,SAAQ,OAAO;CA+BjD","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*--------------------------------------------------------------------------------------------*/\nimport {\n CustomAttribute, ECClass, ECClassModifier, Enumeration, EnumerationArrayProperty, EnumerationProperty, LazyLoadedECClass, PrimitiveArrayProperty,\n PrimitiveProperty, PrimitiveType, Property, StructArrayProperty, StructClass, StructProperty,\n} from \"@itwin/ecschema-metadata\";\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableStructClass extends StructClass {\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n\n/**\n * Hackish approach that works like a \"friend class\" so we can access protected members without making them public.\n * @internal\n */\nexport abstract class MutableClass extends ECClass {\n public abstract override setBaseClass(baseClass: LazyLoadedECClass | undefined): Promise<void>;\n public abstract override addCustomAttribute(customAttribute: CustomAttribute): void;\n public abstract override setModifier(modifier: ECClassModifier): void;\n public abstract override setName(name: string): void;\n public abstract override setDescription(description: string): void;\n public abstract override setDisplayLabel(displayLabel: string): void;\n public abstract override createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty>;\n public abstract override createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty>;\n public abstract override createPrimitiveProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;\n\n public abstract override createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty;\n public abstract override createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty;\n public abstract override createPrimitivePropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;\n\n public abstract override createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty>;\n public abstract override createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty>;\n public abstract override createPrimitiveArrayProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;\n\n public abstract override createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty;\n public abstract override createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty;\n public abstract override createPrimitiveArrayPropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;\n\n public abstract override createStructProperty(name: string, structType: string | StructClass): Promise<StructProperty>;\n public abstract override createStructPropertySync(name: string, structType: string | StructClass): StructProperty;\n\n public abstract override createStructArrayProperty(name: string, structType: string | StructClass): Promise<StructArrayProperty>;\n public abstract override createStructArrayPropertySync(name: string, structType: string | StructClass): StructArrayProperty;\n\n public abstract override deleteProperty(name: string): Promise<void>;\n public abstract override deletePropertySync(name: string): void;\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import { Constant, LazyLoadedPhenomenon } from "@itwin/ecschema-metadata";
2
+ /**
3
+ * @internal
4
+ * An abstract class used for schema editing.
5
+ */
6
+ export declare abstract class MutableConstant extends Constant {
7
+ abstract setPhenomenon(phenomenon: LazyLoadedPhenomenon): void;
8
+ abstract setDefinition(definition: string): void;
9
+ abstract setNumerator(numerator: number): void;
10
+ abstract setDenominator(denominator: number): void;
11
+ abstract setDisplayLabel(displayLabel: string): void;
12
+ abstract setDescription(description: string): void;
13
+ }
14
+ //# sourceMappingURL=MutableConstant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MutableConstant.d.ts","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableConstant.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAE1E;;;GAGG;AACH,8BAAsB,eAAgB,SAAQ,QAAQ;aAC3B,aAAa,CAAC,UAAU,EAAE,oBAAoB,GAAG,IAAI;aACrD,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;aACvC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;aACrC,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;aACzC,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;aAC3C,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;CACnE"}
@@ -0,0 +1,12 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ import { Constant } from "@itwin/ecschema-metadata";
6
+ /**
7
+ * @internal
8
+ * An abstract class used for schema editing.
9
+ */
10
+ export class MutableConstant extends Constant {
11
+ }
12
+ //# sourceMappingURL=MutableConstant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MutableConstant.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableConstant.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,QAAQ,EAAwB,MAAM,0BAA0B,CAAC;AAE1E;;;GAGG;AACH,MAAM,OAAgB,eAAgB,SAAQ,QAAQ;CAOrD","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*--------------------------------------------------------------------------------------------*/\nimport { Constant, LazyLoadedPhenomenon } from \"@itwin/ecschema-metadata\";\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableConstant extends Constant {\n public abstract override setPhenomenon(phenomenon: LazyLoadedPhenomenon): void;\n public abstract override setDefinition(definition: string): void;\n public abstract override setNumerator(numerator: number): void;\n public abstract override setDenominator(denominator: number): void;\n public abstract override setDisplayLabel(displayLabel: string): void;\n public abstract override setDescription(description: string): void;\n}\n"]}