@itwin/ecschema-editing 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 (589) hide show
  1. package/CHANGELOG.md +51 -1
  2. package/lib/cjs/Differencing/Errors.js +6 -0
  3. package/lib/cjs/Differencing/Errors.js.map +1 -1
  4. package/lib/cjs/Differencing/SchemaConflicts.d.ts +3 -1
  5. package/lib/cjs/Differencing/SchemaConflicts.d.ts.map +1 -1
  6. package/lib/cjs/Differencing/SchemaConflicts.js +2 -0
  7. package/lib/cjs/Differencing/SchemaConflicts.js.map +1 -1
  8. package/lib/cjs/Differencing/SchemaDiagnosticVisitor.d.ts +4 -3
  9. package/lib/cjs/Differencing/SchemaDiagnosticVisitor.d.ts.map +1 -1
  10. package/lib/cjs/Differencing/SchemaDiagnosticVisitor.js +57 -11
  11. package/lib/cjs/Differencing/SchemaDiagnosticVisitor.js.map +1 -1
  12. package/lib/cjs/Differencing/SchemaDifference.d.ts +33 -4
  13. package/lib/cjs/Differencing/SchemaDifference.d.ts.map +1 -1
  14. package/lib/cjs/Differencing/SchemaDifference.js +55 -5
  15. package/lib/cjs/Differencing/SchemaDifference.js.map +1 -1
  16. package/lib/cjs/Differencing/SchemaDifferenceValidator.d.ts +2 -1
  17. package/lib/cjs/Differencing/SchemaDifferenceValidator.d.ts.map +1 -1
  18. package/lib/cjs/Differencing/SchemaDifferenceValidator.js +78 -19
  19. package/lib/cjs/Differencing/SchemaDifferenceValidator.js.map +1 -1
  20. package/lib/cjs/Differencing/SchemaDifferenceVisitor.d.ts.map +1 -1
  21. package/lib/cjs/Differencing/SchemaDifferenceVisitor.js +5 -0
  22. package/lib/cjs/Differencing/SchemaDifferenceVisitor.js.map +1 -1
  23. package/lib/cjs/Differencing/Utils.js.map +1 -1
  24. package/lib/cjs/Editing/Constants.d.ts +2 -1
  25. package/lib/cjs/Editing/Constants.d.ts.map +1 -1
  26. package/lib/cjs/Editing/Constants.js +4 -1
  27. package/lib/cjs/Editing/Constants.js.map +1 -1
  28. package/lib/cjs/Editing/CustomAttributes.d.ts +2 -1
  29. package/lib/cjs/Editing/CustomAttributes.d.ts.map +1 -1
  30. package/lib/cjs/Editing/CustomAttributes.js +3 -0
  31. package/lib/cjs/Editing/CustomAttributes.js.map +1 -1
  32. package/lib/cjs/Editing/ECClasses.d.ts +6 -1
  33. package/lib/cjs/Editing/ECClasses.d.ts.map +1 -1
  34. package/lib/cjs/Editing/ECClasses.js +48 -49
  35. package/lib/cjs/Editing/ECClasses.js.map +1 -1
  36. package/lib/cjs/Editing/Editor.d.ts +2 -2
  37. package/lib/cjs/Editing/Editor.d.ts.map +1 -1
  38. package/lib/cjs/Editing/Editor.js +32 -21
  39. package/lib/cjs/Editing/Editor.js.map +1 -1
  40. package/lib/cjs/Editing/Entities.d.ts +2 -1
  41. package/lib/cjs/Editing/Entities.d.ts.map +1 -1
  42. package/lib/cjs/Editing/Entities.js +18 -14
  43. package/lib/cjs/Editing/Entities.js.map +1 -1
  44. package/lib/cjs/Editing/Enumerations.d.ts +2 -1
  45. package/lib/cjs/Editing/Enumerations.d.ts.map +1 -1
  46. package/lib/cjs/Editing/Enumerations.js +6 -3
  47. package/lib/cjs/Editing/Enumerations.js.map +1 -1
  48. package/lib/cjs/Editing/Exception.js +35 -6
  49. package/lib/cjs/Editing/Exception.js.map +1 -1
  50. package/lib/cjs/Editing/Formats.d.ts +2 -1
  51. package/lib/cjs/Editing/Formats.d.ts.map +1 -1
  52. package/lib/cjs/Editing/Formats.js +5 -1
  53. package/lib/cjs/Editing/Formats.js.map +1 -1
  54. package/lib/cjs/Editing/InvertedUnits.d.ts +2 -1
  55. package/lib/cjs/Editing/InvertedUnits.d.ts.map +1 -1
  56. package/lib/cjs/Editing/InvertedUnits.js +10 -6
  57. package/lib/cjs/Editing/InvertedUnits.js.map +1 -1
  58. package/lib/cjs/Editing/KindOfQuantities.d.ts +2 -1
  59. package/lib/cjs/Editing/KindOfQuantities.d.ts.map +1 -1
  60. package/lib/cjs/Editing/KindOfQuantities.js +11 -7
  61. package/lib/cjs/Editing/KindOfQuantities.js.map +1 -1
  62. package/lib/cjs/Editing/Mixins.d.ts +2 -1
  63. package/lib/cjs/Editing/Mixins.d.ts.map +1 -1
  64. package/lib/cjs/Editing/Mixins.js +13 -9
  65. package/lib/cjs/Editing/Mixins.js.map +1 -1
  66. package/lib/cjs/Editing/Mutable/MutableArrayProperty.js.map +1 -1
  67. package/lib/cjs/Editing/Mutable/MutableCAClass.js.map +1 -1
  68. package/lib/cjs/Editing/Mutable/MutableClass.d.ts +2 -1
  69. package/lib/cjs/Editing/Mutable/MutableClass.d.ts.map +1 -1
  70. package/lib/cjs/Editing/Mutable/MutableClass.js.map +1 -1
  71. package/lib/cjs/Editing/Mutable/MutableConstant.js.map +1 -1
  72. package/lib/cjs/Editing/Mutable/MutableEntityClass.js.map +1 -1
  73. package/lib/cjs/Editing/Mutable/MutableEnumeration.js.map +1 -1
  74. package/lib/cjs/Editing/Mutable/MutableFormat.d.ts +8 -1
  75. package/lib/cjs/Editing/Mutable/MutableFormat.d.ts.map +1 -1
  76. package/lib/cjs/Editing/Mutable/MutableFormat.js.map +1 -1
  77. package/lib/cjs/Editing/Mutable/MutableInvertedUnit.js.map +1 -1
  78. package/lib/cjs/Editing/Mutable/MutableKindOfQuantity.js.map +1 -1
  79. package/lib/cjs/Editing/Mutable/MutableMixin.js.map +1 -1
  80. package/lib/cjs/Editing/Mutable/MutableNavigationProperty.js.map +1 -1
  81. package/lib/cjs/Editing/Mutable/MutablePhenomenon.js.map +1 -1
  82. package/lib/cjs/Editing/Mutable/MutablePrimitiveOrEnumProperty.js.map +1 -1
  83. package/lib/cjs/Editing/Mutable/MutableProperty.js.map +1 -1
  84. package/lib/cjs/Editing/Mutable/MutablePropertyCategory.js.map +1 -1
  85. package/lib/cjs/Editing/Mutable/MutableRelationshipClass.js.map +1 -1
  86. package/lib/cjs/Editing/Mutable/MutableSchema.js.map +1 -1
  87. package/lib/cjs/Editing/Mutable/MutableSchemaItem.js.map +1 -1
  88. package/lib/cjs/Editing/Mutable/MutableStructProperty.js.map +1 -1
  89. package/lib/cjs/Editing/Mutable/MutableUnit.js.map +1 -1
  90. package/lib/cjs/Editing/Mutable/MutableUnitSystem.js.map +1 -1
  91. package/lib/cjs/Editing/Phenomena.d.ts +2 -1
  92. package/lib/cjs/Editing/Phenomena.d.ts.map +1 -1
  93. package/lib/cjs/Editing/Phenomena.js +3 -0
  94. package/lib/cjs/Editing/Phenomena.js.map +1 -1
  95. package/lib/cjs/Editing/Properties.d.ts +2 -2
  96. package/lib/cjs/Editing/Properties.d.ts.map +1 -1
  97. package/lib/cjs/Editing/Properties.js +6 -4
  98. package/lib/cjs/Editing/Properties.js.map +1 -1
  99. package/lib/cjs/Editing/PropertyCategories.d.ts +2 -1
  100. package/lib/cjs/Editing/PropertyCategories.d.ts.map +1 -1
  101. package/lib/cjs/Editing/PropertyCategories.js +5 -1
  102. package/lib/cjs/Editing/PropertyCategories.js.map +1 -1
  103. package/lib/cjs/Editing/RelationshipClasses.d.ts +1 -0
  104. package/lib/cjs/Editing/RelationshipClasses.d.ts.map +1 -1
  105. package/lib/cjs/Editing/RelationshipClasses.js +17 -10
  106. package/lib/cjs/Editing/RelationshipClasses.js.map +1 -1
  107. package/lib/cjs/Editing/SchemaItems.d.ts +2 -2
  108. package/lib/cjs/Editing/SchemaItems.d.ts.map +1 -1
  109. package/lib/cjs/Editing/SchemaItems.js +8 -11
  110. package/lib/cjs/Editing/SchemaItems.js.map +1 -1
  111. package/lib/cjs/Editing/Structs.d.ts +2 -1
  112. package/lib/cjs/Editing/Structs.d.ts.map +1 -1
  113. package/lib/cjs/Editing/Structs.js +3 -0
  114. package/lib/cjs/Editing/Structs.js.map +1 -1
  115. package/lib/cjs/Editing/UnitSystems.d.ts +2 -1
  116. package/lib/cjs/Editing/UnitSystems.d.ts.map +1 -1
  117. package/lib/cjs/Editing/UnitSystems.js +3 -0
  118. package/lib/cjs/Editing/UnitSystems.js.map +1 -1
  119. package/lib/cjs/Editing/Units.d.ts +2 -1
  120. package/lib/cjs/Editing/Units.d.ts.map +1 -1
  121. package/lib/cjs/Editing/Units.js +5 -2
  122. package/lib/cjs/Editing/Units.js.map +1 -1
  123. package/lib/cjs/Merging/ClassMerger.js.map +1 -1
  124. package/lib/cjs/Merging/ConstantMerger.js +4 -4
  125. package/lib/cjs/Merging/ConstantMerger.js.map +1 -1
  126. package/lib/cjs/Merging/CustomAttributeClassMerger.js.map +1 -1
  127. package/lib/cjs/Merging/CustomAttributeMerger.d.ts.map +1 -1
  128. package/lib/cjs/Merging/CustomAttributeMerger.js +7 -6
  129. package/lib/cjs/Merging/CustomAttributeMerger.js.map +1 -1
  130. package/lib/cjs/Merging/Edits/NameMapping.d.ts +22 -0
  131. package/lib/cjs/Merging/Edits/NameMapping.d.ts.map +1 -0
  132. package/lib/cjs/Merging/Edits/NameMapping.js +54 -0
  133. package/lib/cjs/Merging/Edits/NameMapping.js.map +1 -0
  134. package/lib/cjs/Merging/Edits/RenameEditHandler.d.ts +1 -1
  135. package/lib/cjs/Merging/Edits/RenameEditHandler.d.ts.map +1 -1
  136. package/lib/cjs/Merging/Edits/RenameEditHandler.js +1 -260
  137. package/lib/cjs/Merging/Edits/RenameEditHandler.js.map +1 -1
  138. package/lib/cjs/Merging/Edits/SchemaEdits.d.ts +9 -6
  139. package/lib/cjs/Merging/Edits/SchemaEdits.d.ts.map +1 -1
  140. package/lib/cjs/Merging/Edits/SchemaEdits.js +19 -14
  141. package/lib/cjs/Merging/Edits/SchemaEdits.js.map +1 -1
  142. package/lib/cjs/Merging/Edits/SkipEditHandler.js.map +1 -1
  143. package/lib/cjs/Merging/EntityClassMerger.js +1 -2
  144. package/lib/cjs/Merging/EntityClassMerger.js.map +1 -1
  145. package/lib/cjs/Merging/EnumerationMerger.js +1 -1
  146. package/lib/cjs/Merging/EnumerationMerger.js.map +1 -1
  147. package/lib/cjs/Merging/EnumeratorMerger.d.ts.map +1 -1
  148. package/lib/cjs/Merging/EnumeratorMerger.js +2 -2
  149. package/lib/cjs/Merging/EnumeratorMerger.js.map +1 -1
  150. package/lib/cjs/Merging/FormatMerger.d.ts +24 -0
  151. package/lib/cjs/Merging/FormatMerger.d.ts.map +1 -0
  152. package/lib/cjs/Merging/FormatMerger.js +143 -0
  153. package/lib/cjs/Merging/FormatMerger.js.map +1 -0
  154. package/lib/cjs/Merging/InvertedUnitMerger.d.ts +14 -0
  155. package/lib/cjs/Merging/InvertedUnitMerger.d.ts.map +1 -0
  156. package/lib/cjs/Merging/InvertedUnitMerger.js +45 -0
  157. package/lib/cjs/Merging/InvertedUnitMerger.js.map +1 -0
  158. package/lib/cjs/Merging/KindOfQuantityMerger.d.ts +1 -1
  159. package/lib/cjs/Merging/KindOfQuantityMerger.d.ts.map +1 -1
  160. package/lib/cjs/Merging/KindOfQuantityMerger.js +4 -5
  161. package/lib/cjs/Merging/KindOfQuantityMerger.js.map +1 -1
  162. package/lib/cjs/Merging/MixinMerger.js +1 -1
  163. package/lib/cjs/Merging/MixinMerger.js.map +1 -1
  164. package/lib/cjs/Merging/PhenomenonMerger.js +1 -1
  165. package/lib/cjs/Merging/PhenomenonMerger.js.map +1 -1
  166. package/lib/cjs/Merging/PropertyCategoryMerger.js.map +1 -1
  167. package/lib/cjs/Merging/PropertyMerger.js +28 -26
  168. package/lib/cjs/Merging/PropertyMerger.js.map +1 -1
  169. package/lib/cjs/Merging/RelationshipClassMerger.d.ts.map +1 -1
  170. package/lib/cjs/Merging/RelationshipClassMerger.js +4 -4
  171. package/lib/cjs/Merging/RelationshipClassMerger.js.map +1 -1
  172. package/lib/cjs/Merging/SchemaMerger.d.ts +5 -3
  173. package/lib/cjs/Merging/SchemaMerger.d.ts.map +1 -1
  174. package/lib/cjs/Merging/SchemaMerger.js +45 -5
  175. package/lib/cjs/Merging/SchemaMerger.js.map +1 -1
  176. package/lib/cjs/Merging/SchemaMergingVisitor.d.ts +14 -8
  177. package/lib/cjs/Merging/SchemaMergingVisitor.d.ts.map +1 -1
  178. package/lib/cjs/Merging/SchemaMergingVisitor.js +42 -17
  179. package/lib/cjs/Merging/SchemaMergingVisitor.js.map +1 -1
  180. package/lib/cjs/Merging/SchemaMergingWalker.d.ts.map +1 -1
  181. package/lib/cjs/Merging/SchemaMergingWalker.js +2 -0
  182. package/lib/cjs/Merging/SchemaMergingWalker.js.map +1 -1
  183. package/lib/cjs/Merging/SchemaReferenceMerger.js.map +1 -1
  184. package/lib/cjs/Merging/StructClassMerger.js.map +1 -1
  185. package/lib/cjs/Merging/UnitMerger.d.ts +14 -0
  186. package/lib/cjs/Merging/UnitMerger.d.ts.map +1 -0
  187. package/lib/cjs/Merging/UnitMerger.js +62 -0
  188. package/lib/cjs/Merging/UnitMerger.js.map +1 -0
  189. package/lib/cjs/Merging/UnitSystemMerger.js.map +1 -1
  190. package/lib/cjs/Merging/Utils.d.ts +11 -0
  191. package/lib/cjs/Merging/Utils.d.ts.map +1 -1
  192. package/lib/cjs/Merging/Utils.js +23 -3
  193. package/lib/cjs/Merging/Utils.js.map +1 -1
  194. package/lib/cjs/Validation/Diagnostic.js +18 -16
  195. package/lib/cjs/Validation/Diagnostic.js.map +1 -1
  196. package/lib/cjs/Validation/DiagnosticReporter.js +4 -1
  197. package/lib/cjs/Validation/DiagnosticReporter.js.map +1 -1
  198. package/lib/cjs/Validation/ECRules.js +1 -1
  199. package/lib/cjs/Validation/ECRules.js.map +1 -1
  200. package/lib/cjs/Validation/LoggingDiagnosticReporter.js.map +1 -1
  201. package/lib/cjs/Validation/RuleSuppressionSet.js.map +1 -1
  202. package/lib/cjs/Validation/Rules.js.map +1 -1
  203. package/lib/cjs/Validation/SchemaChanges.js +39 -69
  204. package/lib/cjs/Validation/SchemaChanges.js.map +1 -1
  205. package/lib/cjs/Validation/SchemaCompareDiagnostics.d.ts +2 -2
  206. package/lib/cjs/Validation/SchemaCompareDiagnostics.js.map +1 -1
  207. package/lib/cjs/Validation/SchemaCompareReporter.js.map +1 -1
  208. package/lib/cjs/Validation/SchemaCompareResultDelegate.d.ts +1 -1
  209. package/lib/cjs/Validation/SchemaCompareResultDelegate.d.ts.map +1 -1
  210. package/lib/cjs/Validation/SchemaCompareResultDelegate.js +4 -1
  211. package/lib/cjs/Validation/SchemaCompareResultDelegate.js.map +1 -1
  212. package/lib/cjs/Validation/SchemaCompareVisitor.d.ts.map +1 -1
  213. package/lib/cjs/Validation/SchemaCompareVisitor.js +23 -23
  214. package/lib/cjs/Validation/SchemaCompareVisitor.js.map +1 -1
  215. package/lib/cjs/Validation/SchemaComparer.d.ts +22 -1
  216. package/lib/cjs/Validation/SchemaComparer.d.ts.map +1 -1
  217. package/lib/cjs/Validation/SchemaComparer.js +30 -5
  218. package/lib/cjs/Validation/SchemaComparer.js.map +1 -1
  219. package/lib/cjs/Validation/SchemaValidater.js +1 -4
  220. package/lib/cjs/Validation/SchemaValidater.js.map +1 -1
  221. package/lib/cjs/Validation/SchemaValidationVisitor.js +3 -4
  222. package/lib/cjs/Validation/SchemaValidationVisitor.js.map +1 -1
  223. package/lib/cjs/Validation/SchemaWalker.d.ts +1 -1
  224. package/lib/cjs/Validation/SchemaWalker.d.ts.map +1 -1
  225. package/lib/cjs/Validation/SchemaWalker.js +6 -4
  226. package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
  227. package/lib/cjs/ecschema-editing.js.map +1 -1
  228. package/lib/esm/Differencing/Errors.d.ts +19 -0
  229. package/lib/esm/Differencing/Errors.d.ts.map +1 -0
  230. package/lib/esm/Differencing/Errors.js +26 -0
  231. package/lib/esm/Differencing/Errors.js.map +1 -0
  232. package/lib/esm/Differencing/SchemaConflicts.d.ts +84 -0
  233. package/lib/esm/Differencing/SchemaConflicts.d.ts.map +1 -0
  234. package/lib/esm/Differencing/SchemaConflicts.js +60 -0
  235. package/lib/esm/Differencing/SchemaConflicts.js.map +1 -0
  236. package/lib/esm/Differencing/SchemaDiagnosticVisitor.d.ts +41 -0
  237. package/lib/esm/Differencing/SchemaDiagnosticVisitor.d.ts.map +1 -0
  238. package/lib/esm/Differencing/SchemaDiagnosticVisitor.js +443 -0
  239. package/lib/esm/Differencing/SchemaDiagnosticVisitor.js.map +1 -0
  240. package/lib/esm/Differencing/SchemaDifference.d.ts +357 -0
  241. package/lib/esm/Differencing/SchemaDifference.d.ts.map +1 -0
  242. package/lib/esm/Differencing/SchemaDifference.js +106 -0
  243. package/lib/esm/Differencing/SchemaDifference.js.map +1 -0
  244. package/lib/esm/Differencing/SchemaDifferenceValidator.d.ts +18 -0
  245. package/lib/esm/Differencing/SchemaDifferenceValidator.d.ts.map +1 -0
  246. package/lib/esm/Differencing/SchemaDifferenceValidator.js +521 -0
  247. package/lib/esm/Differencing/SchemaDifferenceValidator.js.map +1 -0
  248. package/lib/esm/Differencing/SchemaDifferenceVisitor.d.ts +32 -0
  249. package/lib/esm/Differencing/SchemaDifferenceVisitor.d.ts.map +1 -0
  250. package/lib/esm/Differencing/SchemaDifferenceVisitor.js +88 -0
  251. package/lib/esm/Differencing/SchemaDifferenceVisitor.js.map +1 -0
  252. package/lib/esm/Differencing/Utils.d.ts +110 -0
  253. package/lib/esm/Differencing/Utils.d.ts.map +1 -0
  254. package/lib/esm/Differencing/Utils.js +161 -0
  255. package/lib/esm/Differencing/Utils.js.map +1 -0
  256. package/lib/esm/Editing/Constants.d.ts +22 -0
  257. package/lib/esm/Editing/Constants.d.ts.map +1 -0
  258. package/lib/esm/Editing/Constants.js +55 -0
  259. package/lib/esm/Editing/Constants.js.map +1 -0
  260. package/lib/esm/Editing/CustomAttributes.d.ts +22 -0
  261. package/lib/esm/Editing/CustomAttributes.d.ts.map +1 -0
  262. package/lib/esm/Editing/CustomAttributes.js +49 -0
  263. package/lib/esm/Editing/CustomAttributes.js.map +1 -0
  264. package/lib/esm/Editing/ECClasses.d.ts +86 -0
  265. package/lib/esm/Editing/ECClasses.d.ts.map +1 -0
  266. package/lib/esm/Editing/ECClasses.js +294 -0
  267. package/lib/esm/Editing/ECClasses.js.map +1 -0
  268. package/lib/esm/Editing/Editor.d.ts +117 -0
  269. package/lib/esm/Editing/Editor.d.ts.map +1 -0
  270. package/lib/esm/Editing/Editor.js +264 -0
  271. package/lib/esm/Editing/Editor.js.map +1 -0
  272. package/lib/esm/Editing/Entities.d.ts +38 -0
  273. package/lib/esm/Editing/Entities.d.ts.map +1 -0
  274. package/lib/esm/Editing/Entities.js +126 -0
  275. package/lib/esm/Editing/Entities.js.map +1 -0
  276. package/lib/esm/Editing/Enumerations.d.ts +25 -0
  277. package/lib/esm/Editing/Enumerations.d.ts.map +1 -0
  278. package/lib/esm/Editing/Enumerations.js +90 -0
  279. package/lib/esm/Editing/Enumerations.js.map +1 -0
  280. package/lib/esm/Editing/Exception.d.ts +358 -0
  281. package/lib/esm/Editing/Exception.d.ts.map +1 -0
  282. package/lib/esm/Editing/Exception.js +471 -0
  283. package/lib/esm/Editing/Exception.js.map +1 -0
  284. package/lib/esm/Editing/Formats.d.ts +23 -0
  285. package/lib/esm/Editing/Formats.d.ts.map +1 -0
  286. package/lib/esm/Editing/Formats.js +62 -0
  287. package/lib/esm/Editing/Formats.js.map +1 -0
  288. package/lib/esm/Editing/InvertedUnits.d.ts +19 -0
  289. package/lib/esm/Editing/InvertedUnits.d.ts.map +1 -0
  290. package/lib/esm/Editing/InvertedUnits.js +68 -0
  291. package/lib/esm/Editing/InvertedUnits.js.map +1 -0
  292. package/lib/esm/Editing/KindOfQuantities.d.ts +30 -0
  293. package/lib/esm/Editing/KindOfQuantities.d.ts.map +1 -0
  294. package/lib/esm/Editing/KindOfQuantities.js +92 -0
  295. package/lib/esm/Editing/KindOfQuantities.js.map +1 -0
  296. package/lib/esm/Editing/Mixins.d.ts +35 -0
  297. package/lib/esm/Editing/Mixins.d.ts.map +1 -0
  298. package/lib/esm/Editing/Mixins.js +90 -0
  299. package/lib/esm/Editing/Mixins.js.map +1 -0
  300. package/lib/esm/Editing/Mutable/MutableArrayProperty.d.ts +10 -0
  301. package/lib/esm/Editing/Mutable/MutableArrayProperty.d.ts.map +1 -0
  302. package/lib/esm/Editing/Mutable/MutableArrayProperty.js +12 -0
  303. package/lib/esm/Editing/Mutable/MutableArrayProperty.js.map +1 -0
  304. package/lib/esm/Editing/Mutable/MutableCAClass.d.ts +10 -0
  305. package/lib/esm/Editing/Mutable/MutableCAClass.d.ts.map +1 -0
  306. package/lib/esm/Editing/Mutable/MutableCAClass.js +12 -0
  307. package/lib/esm/Editing/Mutable/MutableCAClass.js.map +1 -0
  308. package/lib/esm/Editing/Mutable/MutableClass.d.ts +39 -0
  309. package/lib/esm/Editing/Mutable/MutableClass.d.ts.map +1 -0
  310. package/lib/esm/Editing/Mutable/MutableClass.js +18 -0
  311. package/lib/esm/Editing/Mutable/MutableClass.js.map +1 -0
  312. package/lib/esm/Editing/Mutable/MutableConstant.d.ts +14 -0
  313. package/lib/esm/Editing/Mutable/MutableConstant.d.ts.map +1 -0
  314. package/lib/esm/Editing/Mutable/MutableConstant.js +12 -0
  315. package/lib/esm/Editing/Mutable/MutableConstant.js.map +1 -0
  316. package/lib/esm/Editing/Mutable/MutableEntityClass.d.ts +12 -0
  317. package/lib/esm/Editing/Mutable/MutableEntityClass.d.ts.map +1 -0
  318. package/lib/esm/Editing/Mutable/MutableEntityClass.js +12 -0
  319. package/lib/esm/Editing/Mutable/MutableEntityClass.js.map +1 -0
  320. package/lib/esm/Editing/Mutable/MutableEnumeration.d.ts +11 -0
  321. package/lib/esm/Editing/Mutable/MutableEnumeration.d.ts.map +1 -0
  322. package/lib/esm/Editing/Mutable/MutableEnumeration.js +11 -0
  323. package/lib/esm/Editing/Mutable/MutableEnumeration.js.map +1 -0
  324. package/lib/esm/Editing/Mutable/MutableFormat.d.ts +26 -0
  325. package/lib/esm/Editing/Mutable/MutableFormat.d.ts.map +1 -0
  326. package/lib/esm/Editing/Mutable/MutableFormat.js +12 -0
  327. package/lib/esm/Editing/Mutable/MutableFormat.js.map +1 -0
  328. package/lib/esm/Editing/Mutable/MutableInvertedUnit.d.ts +11 -0
  329. package/lib/esm/Editing/Mutable/MutableInvertedUnit.d.ts.map +1 -0
  330. package/lib/esm/Editing/Mutable/MutableInvertedUnit.js +12 -0
  331. package/lib/esm/Editing/Mutable/MutableInvertedUnit.js.map +1 -0
  332. package/lib/esm/Editing/Mutable/MutableKindOfQuantity.d.ts +14 -0
  333. package/lib/esm/Editing/Mutable/MutableKindOfQuantity.d.ts.map +1 -0
  334. package/lib/esm/Editing/Mutable/MutableKindOfQuantity.js +12 -0
  335. package/lib/esm/Editing/Mutable/MutableKindOfQuantity.js.map +1 -0
  336. package/lib/esm/Editing/Mutable/MutableMixin.d.ts +12 -0
  337. package/lib/esm/Editing/Mutable/MutableMixin.d.ts.map +1 -0
  338. package/lib/esm/Editing/Mutable/MutableMixin.js +12 -0
  339. package/lib/esm/Editing/Mutable/MutableMixin.js.map +1 -0
  340. package/lib/esm/Editing/Mutable/MutableNavigationProperty.d.ts +8 -0
  341. package/lib/esm/Editing/Mutable/MutableNavigationProperty.d.ts.map +1 -0
  342. package/lib/esm/Editing/Mutable/MutableNavigationProperty.js +12 -0
  343. package/lib/esm/Editing/Mutable/MutableNavigationProperty.js.map +1 -0
  344. package/lib/esm/Editing/Mutable/MutablePhenomenon.d.ts +11 -0
  345. package/lib/esm/Editing/Mutable/MutablePhenomenon.d.ts.map +1 -0
  346. package/lib/esm/Editing/Mutable/MutablePhenomenon.js +12 -0
  347. package/lib/esm/Editing/Mutable/MutablePhenomenon.js.map +1 -0
  348. package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.d.ts +13 -0
  349. package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.d.ts.map +1 -0
  350. package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.js +12 -0
  351. package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.js.map +1 -0
  352. package/lib/esm/Editing/Mutable/MutableProperty.d.ts +16 -0
  353. package/lib/esm/Editing/Mutable/MutableProperty.d.ts.map +1 -0
  354. package/lib/esm/Editing/Mutable/MutableProperty.js +12 -0
  355. package/lib/esm/Editing/Mutable/MutableProperty.js.map +1 -0
  356. package/lib/esm/Editing/Mutable/MutablePropertyCategory.d.ts +11 -0
  357. package/lib/esm/Editing/Mutable/MutablePropertyCategory.d.ts.map +1 -0
  358. package/lib/esm/Editing/Mutable/MutablePropertyCategory.js +12 -0
  359. package/lib/esm/Editing/Mutable/MutablePropertyCategory.js.map +1 -0
  360. package/lib/esm/Editing/Mutable/MutableRelationshipClass.d.ts +30 -0
  361. package/lib/esm/Editing/Mutable/MutableRelationshipClass.d.ts.map +1 -0
  362. package/lib/esm/Editing/Mutable/MutableRelationshipClass.js +20 -0
  363. package/lib/esm/Editing/Mutable/MutableRelationshipClass.js.map +1 -0
  364. package/lib/esm/Editing/Mutable/MutableSchema.d.ts +51 -0
  365. package/lib/esm/Editing/Mutable/MutableSchema.d.ts.map +1 -0
  366. package/lib/esm/Editing/Mutable/MutableSchema.js +14 -0
  367. package/lib/esm/Editing/Mutable/MutableSchema.js.map +1 -0
  368. package/lib/esm/Editing/Mutable/MutableSchemaItem.d.ts +11 -0
  369. package/lib/esm/Editing/Mutable/MutableSchemaItem.d.ts.map +1 -0
  370. package/lib/esm/Editing/Mutable/MutableSchemaItem.js +12 -0
  371. package/lib/esm/Editing/Mutable/MutableSchemaItem.js.map +1 -0
  372. package/lib/esm/Editing/Mutable/MutableStructProperty.d.ts +8 -0
  373. package/lib/esm/Editing/Mutable/MutableStructProperty.d.ts.map +1 -0
  374. package/lib/esm/Editing/Mutable/MutableStructProperty.js +12 -0
  375. package/lib/esm/Editing/Mutable/MutableStructProperty.js.map +1 -0
  376. package/lib/esm/Editing/Mutable/MutableUnit.d.ts +12 -0
  377. package/lib/esm/Editing/Mutable/MutableUnit.d.ts.map +1 -0
  378. package/lib/esm/Editing/Mutable/MutableUnit.js +12 -0
  379. package/lib/esm/Editing/Mutable/MutableUnit.js.map +1 -0
  380. package/lib/esm/Editing/Mutable/MutableUnitSystem.d.ts +10 -0
  381. package/lib/esm/Editing/Mutable/MutableUnitSystem.d.ts.map +1 -0
  382. package/lib/esm/Editing/Mutable/MutableUnitSystem.js +12 -0
  383. package/lib/esm/Editing/Mutable/MutableUnitSystem.js.map +1 -0
  384. package/lib/esm/Editing/Phenomena.d.ts +17 -0
  385. package/lib/esm/Editing/Phenomena.d.ts.map +1 -0
  386. package/lib/esm/Editing/Phenomena.js +44 -0
  387. package/lib/esm/Editing/Phenomena.js.map +1 -0
  388. package/lib/esm/Editing/Properties.d.ts +206 -0
  389. package/lib/esm/Editing/Properties.d.ts.map +1 -0
  390. package/lib/esm/Editing/Properties.js +415 -0
  391. package/lib/esm/Editing/Properties.js.map +1 -0
  392. package/lib/esm/Editing/PropertyCategories.d.ts +18 -0
  393. package/lib/esm/Editing/PropertyCategories.d.ts.map +1 -0
  394. package/lib/esm/Editing/PropertyCategories.js +54 -0
  395. package/lib/esm/Editing/PropertyCategories.js.map +1 -0
  396. package/lib/esm/Editing/RelationshipClasses.d.ts +69 -0
  397. package/lib/esm/Editing/RelationshipClasses.d.ts.map +1 -0
  398. package/lib/esm/Editing/RelationshipClasses.js +236 -0
  399. package/lib/esm/Editing/RelationshipClasses.js.map +1 -0
  400. package/lib/esm/Editing/SchemaItems.d.ts +42 -0
  401. package/lib/esm/Editing/SchemaItems.d.ts.map +1 -0
  402. package/lib/esm/Editing/SchemaItems.js +104 -0
  403. package/lib/esm/Editing/SchemaItems.js.map +1 -0
  404. package/lib/esm/Editing/Structs.d.ts +21 -0
  405. package/lib/esm/Editing/Structs.d.ts.map +1 -0
  406. package/lib/esm/Editing/Structs.js +47 -0
  407. package/lib/esm/Editing/Structs.js.map +1 -0
  408. package/lib/esm/Editing/UnitSystems.d.ts +17 -0
  409. package/lib/esm/Editing/UnitSystems.d.ts.map +1 -0
  410. package/lib/esm/Editing/UnitSystems.js +43 -0
  411. package/lib/esm/Editing/UnitSystems.js.map +1 -0
  412. package/lib/esm/Editing/Units.d.ts +17 -0
  413. package/lib/esm/Editing/Units.d.ts.map +1 -0
  414. package/lib/esm/Editing/Units.js +49 -0
  415. package/lib/esm/Editing/Units.js.map +1 -0
  416. package/lib/esm/Merging/ClassMerger.d.ts +9 -0
  417. package/lib/esm/Merging/ClassMerger.d.ts.map +1 -0
  418. package/lib/esm/Merging/ClassMerger.js +66 -0
  419. package/lib/esm/Merging/ClassMerger.js.map +1 -0
  420. package/lib/esm/Merging/ConstantMerger.d.ts +14 -0
  421. package/lib/esm/Merging/ConstantMerger.d.ts.map +1 -0
  422. package/lib/esm/Merging/ConstantMerger.js +64 -0
  423. package/lib/esm/Merging/ConstantMerger.js.map +1 -0
  424. package/lib/esm/Merging/CustomAttributeClassMerger.d.ts +14 -0
  425. package/lib/esm/Merging/CustomAttributeClassMerger.d.ts.map +1 -0
  426. package/lib/esm/Merging/CustomAttributeClassMerger.js +36 -0
  427. package/lib/esm/Merging/CustomAttributeClassMerger.js.map +1 -0
  428. package/lib/esm/Merging/CustomAttributeMerger.d.ts +19 -0
  429. package/lib/esm/Merging/CustomAttributeMerger.d.ts.map +1 -0
  430. package/lib/esm/Merging/CustomAttributeMerger.js +66 -0
  431. package/lib/esm/Merging/CustomAttributeMerger.js.map +1 -0
  432. package/lib/esm/Merging/Edits/NameMapping.d.ts +22 -0
  433. package/lib/esm/Merging/Edits/NameMapping.d.ts.map +1 -0
  434. package/lib/esm/Merging/Edits/NameMapping.js +49 -0
  435. package/lib/esm/Merging/Edits/NameMapping.js.map +1 -0
  436. package/lib/esm/Merging/Edits/RenameEditHandler.d.ts +14 -0
  437. package/lib/esm/Merging/Edits/RenameEditHandler.d.ts.map +1 -0
  438. package/lib/esm/Merging/Edits/RenameEditHandler.js +62 -0
  439. package/lib/esm/Merging/Edits/RenameEditHandler.js.map +1 -0
  440. package/lib/esm/Merging/Edits/SchemaEdits.d.ts +81 -0
  441. package/lib/esm/Merging/Edits/SchemaEdits.d.ts.map +1 -0
  442. package/lib/esm/Merging/Edits/SchemaEdits.js +112 -0
  443. package/lib/esm/Merging/Edits/SchemaEdits.js.map +1 -0
  444. package/lib/esm/Merging/Edits/SkipEditHandler.d.ts +14 -0
  445. package/lib/esm/Merging/Edits/SkipEditHandler.d.ts.map +1 -0
  446. package/lib/esm/Merging/Edits/SkipEditHandler.js +60 -0
  447. package/lib/esm/Merging/Edits/SkipEditHandler.js.map +1 -0
  448. package/lib/esm/Merging/EntityClassMerger.d.ts +19 -0
  449. package/lib/esm/Merging/EntityClassMerger.d.ts.map +1 -0
  450. package/lib/esm/Merging/EntityClassMerger.js +39 -0
  451. package/lib/esm/Merging/EntityClassMerger.js.map +1 -0
  452. package/lib/esm/Merging/EnumerationMerger.d.ts +14 -0
  453. package/lib/esm/Merging/EnumerationMerger.d.ts.map +1 -0
  454. package/lib/esm/Merging/EnumerationMerger.js +48 -0
  455. package/lib/esm/Merging/EnumerationMerger.js.map +1 -0
  456. package/lib/esm/Merging/EnumeratorMerger.d.ts +14 -0
  457. package/lib/esm/Merging/EnumeratorMerger.d.ts.map +1 -0
  458. package/lib/esm/Merging/EnumeratorMerger.js +36 -0
  459. package/lib/esm/Merging/EnumeratorMerger.js.map +1 -0
  460. package/lib/esm/Merging/FormatMerger.d.ts +24 -0
  461. package/lib/esm/Merging/FormatMerger.d.ts.map +1 -0
  462. package/lib/esm/Merging/FormatMerger.js +137 -0
  463. package/lib/esm/Merging/FormatMerger.js.map +1 -0
  464. package/lib/esm/Merging/InvertedUnitMerger.d.ts +14 -0
  465. package/lib/esm/Merging/InvertedUnitMerger.d.ts.map +1 -0
  466. package/lib/esm/Merging/InvertedUnitMerger.js +41 -0
  467. package/lib/esm/Merging/InvertedUnitMerger.js.map +1 -0
  468. package/lib/esm/Merging/KindOfQuantityMerger.d.ts +19 -0
  469. package/lib/esm/Merging/KindOfQuantityMerger.d.ts.map +1 -0
  470. package/lib/esm/Merging/KindOfQuantityMerger.js +89 -0
  471. package/lib/esm/Merging/KindOfQuantityMerger.js.map +1 -0
  472. package/lib/esm/Merging/MixinMerger.d.ts +14 -0
  473. package/lib/esm/Merging/MixinMerger.d.ts.map +1 -0
  474. package/lib/esm/Merging/MixinMerger.js +33 -0
  475. package/lib/esm/Merging/MixinMerger.js.map +1 -0
  476. package/lib/esm/Merging/PhenomenonMerger.d.ts +14 -0
  477. package/lib/esm/Merging/PhenomenonMerger.d.ts.map +1 -0
  478. package/lib/esm/Merging/PhenomenonMerger.js +36 -0
  479. package/lib/esm/Merging/PhenomenonMerger.js.map +1 -0
  480. package/lib/esm/Merging/PropertyCategoryMerger.d.ts +14 -0
  481. package/lib/esm/Merging/PropertyCategoryMerger.d.ts.map +1 -0
  482. package/lib/esm/Merging/PropertyCategoryMerger.js +31 -0
  483. package/lib/esm/Merging/PropertyCategoryMerger.js.map +1 -0
  484. package/lib/esm/Merging/PropertyMerger.d.ts +12 -0
  485. package/lib/esm/Merging/PropertyMerger.d.ts.map +1 -0
  486. package/lib/esm/Merging/PropertyMerger.js +228 -0
  487. package/lib/esm/Merging/PropertyMerger.js.map +1 -0
  488. package/lib/esm/Merging/RelationshipClassMerger.d.ts +27 -0
  489. package/lib/esm/Merging/RelationshipClassMerger.d.ts.map +1 -0
  490. package/lib/esm/Merging/RelationshipClassMerger.js +136 -0
  491. package/lib/esm/Merging/RelationshipClassMerger.js.map +1 -0
  492. package/lib/esm/Merging/SchemaMerger.d.ts +49 -0
  493. package/lib/esm/Merging/SchemaMerger.d.ts.map +1 -0
  494. package/lib/esm/Merging/SchemaMerger.js +117 -0
  495. package/lib/esm/Merging/SchemaMerger.js.map +1 -0
  496. package/lib/esm/Merging/SchemaMergingVisitor.d.ts +149 -0
  497. package/lib/esm/Merging/SchemaMergingVisitor.d.ts.map +1 -0
  498. package/lib/esm/Merging/SchemaMergingVisitor.js +339 -0
  499. package/lib/esm/Merging/SchemaMergingVisitor.js.map +1 -0
  500. package/lib/esm/Merging/SchemaMergingWalker.d.ts +19 -0
  501. package/lib/esm/Merging/SchemaMergingWalker.d.ts.map +1 -0
  502. package/lib/esm/Merging/SchemaMergingWalker.js +61 -0
  503. package/lib/esm/Merging/SchemaMergingWalker.js.map +1 -0
  504. package/lib/esm/Merging/SchemaReferenceMerger.d.ts +13 -0
  505. package/lib/esm/Merging/SchemaReferenceMerger.d.ts.map +1 -0
  506. package/lib/esm/Merging/SchemaReferenceMerger.js +57 -0
  507. package/lib/esm/Merging/SchemaReferenceMerger.js.map +1 -0
  508. package/lib/esm/Merging/StructClassMerger.d.ts +14 -0
  509. package/lib/esm/Merging/StructClassMerger.d.ts.map +1 -0
  510. package/lib/esm/Merging/StructClassMerger.js +20 -0
  511. package/lib/esm/Merging/StructClassMerger.js.map +1 -0
  512. package/lib/esm/Merging/UnitMerger.d.ts +14 -0
  513. package/lib/esm/Merging/UnitMerger.d.ts.map +1 -0
  514. package/lib/esm/Merging/UnitMerger.js +58 -0
  515. package/lib/esm/Merging/UnitMerger.js.map +1 -0
  516. package/lib/esm/Merging/UnitSystemMerger.d.ts +14 -0
  517. package/lib/esm/Merging/UnitSystemMerger.d.ts.map +1 -0
  518. package/lib/esm/Merging/UnitSystemMerger.js +24 -0
  519. package/lib/esm/Merging/UnitSystemMerger.js.map +1 -0
  520. package/lib/esm/Merging/Utils.d.ts +34 -0
  521. package/lib/esm/Merging/Utils.d.ts.map +1 -0
  522. package/lib/esm/Merging/Utils.js +90 -0
  523. package/lib/esm/Merging/Utils.js.map +1 -0
  524. package/lib/esm/Validation/Diagnostic.d.ts +322 -0
  525. package/lib/esm/Validation/Diagnostic.d.ts.map +1 -0
  526. package/lib/esm/Validation/Diagnostic.js +295 -0
  527. package/lib/esm/Validation/Diagnostic.js.map +1 -0
  528. package/lib/esm/Validation/DiagnosticReporter.d.ts +97 -0
  529. package/lib/esm/Validation/DiagnosticReporter.d.ts.map +1 -0
  530. package/lib/esm/Validation/DiagnosticReporter.js +105 -0
  531. package/lib/esm/Validation/DiagnosticReporter.js.map +1 -0
  532. package/lib/esm/Validation/ECRules.d.ts +454 -0
  533. package/lib/esm/Validation/ECRules.d.ts.map +1 -0
  534. package/lib/esm/Validation/ECRules.js +578 -0
  535. package/lib/esm/Validation/ECRules.js.map +1 -0
  536. package/lib/esm/Validation/LoggingDiagnosticReporter.d.ts +14 -0
  537. package/lib/esm/Validation/LoggingDiagnosticReporter.d.ts.map +1 -0
  538. package/lib/esm/Validation/LoggingDiagnosticReporter.js +37 -0
  539. package/lib/esm/Validation/LoggingDiagnosticReporter.js.map +1 -0
  540. package/lib/esm/Validation/RuleSuppressionSet.d.ts +60 -0
  541. package/lib/esm/Validation/RuleSuppressionSet.d.ts.map +1 -0
  542. package/lib/esm/Validation/RuleSuppressionSet.js +9 -0
  543. package/lib/esm/Validation/RuleSuppressionSet.js.map +1 -0
  544. package/lib/esm/Validation/Rules.d.ts +65 -0
  545. package/lib/esm/Validation/Rules.d.ts.map +1 -0
  546. package/lib/esm/Validation/Rules.js +9 -0
  547. package/lib/esm/Validation/Rules.js.map +1 -0
  548. package/lib/esm/Validation/SchemaChanges.d.ts +640 -0
  549. package/lib/esm/Validation/SchemaChanges.d.ts.map +1 -0
  550. package/lib/esm/Validation/SchemaChanges.js +1141 -0
  551. package/lib/esm/Validation/SchemaChanges.js.map +1 -0
  552. package/lib/esm/Validation/SchemaCompareDiagnostics.d.ts +423 -0
  553. package/lib/esm/Validation/SchemaCompareDiagnostics.d.ts.map +1 -0
  554. package/lib/esm/Validation/SchemaCompareDiagnostics.js +109 -0
  555. package/lib/esm/Validation/SchemaCompareDiagnostics.js.map +1 -0
  556. package/lib/esm/Validation/SchemaCompareReporter.d.ts +12 -0
  557. package/lib/esm/Validation/SchemaCompareReporter.d.ts.map +1 -0
  558. package/lib/esm/Validation/SchemaCompareReporter.js +9 -0
  559. package/lib/esm/Validation/SchemaCompareReporter.js.map +1 -0
  560. package/lib/esm/Validation/SchemaCompareResultDelegate.d.ts +237 -0
  561. package/lib/esm/Validation/SchemaCompareResultDelegate.d.ts.map +1 -0
  562. package/lib/esm/Validation/SchemaCompareResultDelegate.js +346 -0
  563. package/lib/esm/Validation/SchemaCompareResultDelegate.js.map +1 -0
  564. package/lib/esm/Validation/SchemaCompareVisitor.d.ts +120 -0
  565. package/lib/esm/Validation/SchemaCompareVisitor.d.ts.map +1 -0
  566. package/lib/esm/Validation/SchemaCompareVisitor.js +222 -0
  567. package/lib/esm/Validation/SchemaCompareVisitor.js.map +1 -0
  568. package/lib/esm/Validation/SchemaComparer.d.ts +211 -0
  569. package/lib/esm/Validation/SchemaComparer.d.ts.map +1 -0
  570. package/lib/esm/Validation/SchemaComparer.js +770 -0
  571. package/lib/esm/Validation/SchemaComparer.js.map +1 -0
  572. package/lib/esm/Validation/SchemaValidater.d.ts +20 -0
  573. package/lib/esm/Validation/SchemaValidater.d.ts.map +1 -0
  574. package/lib/esm/Validation/SchemaValidater.js +55 -0
  575. package/lib/esm/Validation/SchemaValidater.js.map +1 -0
  576. package/lib/esm/Validation/SchemaValidationVisitor.d.ts +171 -0
  577. package/lib/esm/Validation/SchemaValidationVisitor.d.ts.map +1 -0
  578. package/lib/esm/Validation/SchemaValidationVisitor.js +488 -0
  579. package/lib/esm/Validation/SchemaValidationVisitor.js.map +1 -0
  580. package/lib/esm/Validation/SchemaWalker.d.ts +23 -0
  581. package/lib/esm/Validation/SchemaWalker.d.ts.map +1 -0
  582. package/lib/esm/Validation/SchemaWalker.js +50 -0
  583. package/lib/esm/Validation/SchemaWalker.js.map +1 -0
  584. package/lib/esm/ecschema-editing.d.ts +49 -0
  585. package/lib/esm/ecschema-editing.d.ts.map +1 -0
  586. package/lib/esm/ecschema-editing.js +52 -0
  587. package/lib/esm/ecschema-editing.js.map +1 -0
  588. package/package.json +19 -17
  589. package/public/locales/en/ECSchemaEditing.json +26 -26
@@ -0,0 +1,322 @@
1
+ /** @packageDocumentation
2
+ * @module Diagnostic
3
+ */
4
+ import { AnyClass, AnyECType, AnyProperty, CustomAttributeContainerProps, RelationshipConstraint, Schema, SchemaItem } from "@itwin/ecschema-metadata";
5
+ /**
6
+ * Defines the possible diagnostic types.
7
+ * @beta
8
+ */
9
+ export declare enum DiagnosticType {
10
+ None = 0,
11
+ Schema = 1,
12
+ SchemaItem = 2,
13
+ Property = 3,
14
+ CustomAttributeContainer = 4,
15
+ RelationshipConstraint = 5
16
+ }
17
+ /**
18
+ * Defines the possible diagnostic categories.
19
+ * @beta
20
+ */
21
+ export declare enum DiagnosticCategory {
22
+ Warning = 0,
23
+ Error = 1,
24
+ Suggestion = 2,
25
+ Message = 3
26
+ }
27
+ /**
28
+ * The interface implemented by all diagnostics used during schema validation.
29
+ * @beta
30
+ */
31
+ export interface IDiagnostic<TYPE extends AnyECType, ARGS extends any[]> {
32
+ /** The diagnostic category (error, warning, etc...). Value is static across all instances. */
33
+ category: DiagnosticCategory;
34
+ /** The unique string identifier of the diagnostic in the format '<ruleSetName>:<number>. Value is static across all instances. */
35
+ code: string;
36
+ /** The context type of diagnostic (schema, schema item, property, etc...). Value is static across all instances. */
37
+ diagnosticType: DiagnosticType;
38
+ /** The unformatted message text associated with the diagnostic. Value is static across all instances. */
39
+ messageText: string;
40
+ /** The arguments used when formatted the diagnostic instance's message. */
41
+ messageArgs?: ARGS;
42
+ /** The EC object associated with the diagnostic instance. */
43
+ ecDefinition: TYPE;
44
+ /** The schema where the diagnostic originated. */
45
+ schema: Schema;
46
+ }
47
+ /**
48
+ * Type which encapsulates all possible diagnostics.
49
+ * @beta
50
+ */
51
+ export type AnyDiagnostic = IDiagnostic<AnyECType, any[]>;
52
+ /**
53
+ * The abstract base class for all [[IDiagnostic]] implementations.
54
+ * @beta
55
+ */
56
+ export declare abstract class BaseDiagnostic<TYPE extends AnyECType, ARGS extends any[]> implements IDiagnostic<TYPE, ARGS> {
57
+ /**
58
+ * Initializes a new BaseDiagnostic.
59
+ * @param ecDefinition The EC object to associate with the diagnostic.
60
+ * @param messageArgs The arguments used when formatting the diagnostic message.
61
+ * @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
62
+ */
63
+ constructor(ecDefinition: TYPE, messageArgs?: ARGS, category?: DiagnosticCategory);
64
+ /** Gets the unique string identifier for the diagnostic in the format '<ruleSetName>:<number>'. */
65
+ abstract get code(): string;
66
+ /** Gets the context type of the diagnostic (schema, schema item, property, etc...) */
67
+ abstract get diagnosticType(): DiagnosticType;
68
+ /** Gets the message associated with the diagnostic. */
69
+ abstract get messageText(): string;
70
+ /** Gets the schema where the diagnostic originated. */
71
+ abstract get schema(): Schema;
72
+ /** The EC object to associate with the diagnostic. */
73
+ ecDefinition: TYPE;
74
+ /** The arguments used when formatting the diagnostic message. */
75
+ messageArgs?: ARGS;
76
+ /** The diagnostic category is of the type DiagnosticCategory; which is defined as an enumeration above. */
77
+ category: DiagnosticCategory;
78
+ }
79
+ /**
80
+ * An [[IDiagnostic]] implementation used for [[Schema]] diagnostics.
81
+ * @beta
82
+ */
83
+ export declare abstract class SchemaDiagnostic<ARGS extends any[]> extends BaseDiagnostic<Schema, ARGS> {
84
+ static diagnosticType: DiagnosticType;
85
+ /**
86
+ * Initializes a new SchemaDiagnostic.
87
+ * @param ecDefinition The EC object to associate with the diagnostic.
88
+ * @param messageArgs The arguments used when formatting the diagnostic message.
89
+ * @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
90
+ */
91
+ constructor(schema: Schema, messageArgs: ARGS, category?: DiagnosticCategory);
92
+ /** Gets the schema where the diagnostic originated. */
93
+ get schema(): Schema;
94
+ /** Gets the DiagnosticType. */
95
+ get diagnosticType(): DiagnosticType;
96
+ }
97
+ /**
98
+ * An [[IDiagnostic]] implementation used for [[SchemaItem]] diagnostics.
99
+ * @beta
100
+ */
101
+ export declare abstract class SchemaItemDiagnostic<TYPE extends SchemaItem, ARGS extends any[]> extends BaseDiagnostic<TYPE, ARGS> {
102
+ static diagnosticType: DiagnosticType;
103
+ /**
104
+ * Initializes a new SchemaItemDiagnostic.
105
+ * @param ecDefinition The EC object to associate with the diagnostic.
106
+ * @param messageArgs The arguments used when formatting the diagnostic message.
107
+ * @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
108
+ */
109
+ constructor(ecDefinition: SchemaItem, messageArgs: ARGS, category?: DiagnosticCategory);
110
+ /** Gets the schema where the diagnostic originated. */
111
+ get schema(): Schema;
112
+ /** Gets the DiagnosticType. */
113
+ get diagnosticType(): DiagnosticType;
114
+ }
115
+ /**
116
+ * An [[IDiagnostic]] implementation used for [[ECClass]] diagnostics.
117
+ * @beta
118
+ */
119
+ export declare abstract class ClassDiagnostic<ARGS extends any[]> extends SchemaItemDiagnostic<AnyClass, ARGS> {
120
+ /**
121
+ * Initializes a new ClassDiagnostic.
122
+ * @param ecClass The class to associate with the diagnostic.
123
+ * @param messageArgs The arguments used when formatting the diagnostic message.
124
+ * @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
125
+ */
126
+ constructor(ecClass: AnyClass, messageArgs: ARGS, category?: DiagnosticCategory);
127
+ /** Gets the schema where the diagnostic originated. */
128
+ get schema(): Schema;
129
+ }
130
+ /**
131
+ * An [[IDiagnostic]] implementation used for [[Property]] diagnostics.
132
+ * @beta
133
+ */
134
+ export declare abstract class PropertyDiagnostic<ARGS extends any[]> extends BaseDiagnostic<AnyProperty, ARGS> {
135
+ /**
136
+ * Initializes a new PropertyDiagnostic.
137
+ * @param property The property to associate with the diagnostic.
138
+ * @param messageArgs The arguments used when formatting the diagnostic message.
139
+ * @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
140
+ */
141
+ constructor(property: AnyProperty, messageArgs?: ARGS, category?: DiagnosticCategory);
142
+ /** Gets the schema where the diagnostic originated. */
143
+ get schema(): Schema;
144
+ /** Gets the DiagnosticType. */
145
+ get diagnosticType(): DiagnosticType;
146
+ }
147
+ /**
148
+ * An [[IDiagnostic]] implementation used for [[RelationshipConstraint]] diagnostics.
149
+ * @beta
150
+ */
151
+ export declare abstract class RelationshipConstraintDiagnostic<ARGS extends any[]> extends BaseDiagnostic<RelationshipConstraint, ARGS> {
152
+ /**
153
+ * Initializes a new RelationshipConstraintDiagnostic.
154
+ * @param constraint The Relationship Constraint to associate with the diagnostic.
155
+ * @param messageArgs The arguments used when formatting the diagnostic message.
156
+ * @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
157
+ */
158
+ constructor(constraint: RelationshipConstraint, messageArgs: ARGS, category?: DiagnosticCategory);
159
+ /** Gets the schema where the diagnostic originated. */
160
+ get schema(): Schema;
161
+ /** Gets the DiagnosticType. */
162
+ get diagnosticType(): DiagnosticType;
163
+ }
164
+ /**
165
+ * An [[IDiagnostic]] implementation used for [[CustomAttributeContainerProps]] diagnostics.
166
+ * @beta
167
+ */
168
+ export declare abstract class CustomAttributeContainerDiagnostic<ARGS extends any[]> extends BaseDiagnostic<CustomAttributeContainerProps, ARGS> {
169
+ /**
170
+ * Initializes a new CustomAttributeContainerDiagnostic.
171
+ * @param constraint The Custom Attribute Container to associate with the diagnostic.
172
+ * @param messageArgs The arguments used when formatting the diagnostic message.
173
+ * @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
174
+ */
175
+ constructor(container: CustomAttributeContainerProps, messageArgs: ARGS, category?: DiagnosticCategory);
176
+ /** Gets the schema where the diagnostic originated. */
177
+ get schema(): Schema;
178
+ /** Gets the DiagnosticType. */
179
+ get diagnosticType(): DiagnosticType;
180
+ }
181
+ /**
182
+ * Helper method for creating [[SchemaDiagnostic]] child classes.
183
+ * @param code The string that uniquely identifies the diagnostic in the format '<ruleSetName>:<number>'.
184
+ * @param messageText The message to associate with the diagnostic class.
185
+ * @beta
186
+ */
187
+ export declare function createSchemaDiagnosticClass<ARGS extends any[]>(code: string, messageText: string): {
188
+ new (schema: Schema, messageArgs: ARGS, category?: DiagnosticCategory): {
189
+ readonly code: string;
190
+ readonly messageText: string;
191
+ /** Gets the schema where the diagnostic originated. */
192
+ readonly schema: Schema;
193
+ /** Gets the DiagnosticType. */
194
+ readonly diagnosticType: DiagnosticType;
195
+ /** The EC object to associate with the diagnostic. */
196
+ ecDefinition: Schema;
197
+ /** The arguments used when formatting the diagnostic message. */
198
+ messageArgs?: ARGS | undefined;
199
+ /** The diagnostic category is of the type DiagnosticCategory; which is defined as an enumeration above. */
200
+ category: DiagnosticCategory;
201
+ };
202
+ code: string;
203
+ diagnosticType: DiagnosticType;
204
+ };
205
+ /**
206
+ * Helper method for creating [[SchemaItemDiagnostic]] child classes.
207
+ * @param code The string that uniquely identifies the diagnostic in the format '<ruleSetName>:<number>'.
208
+ * @param messageText The message to associate with the diagnostic class.
209
+ * @beta
210
+ */
211
+ export declare function createSchemaItemDiagnosticClass<ITEM extends SchemaItem, ARGS extends any[]>(code: string, messageText: string): {
212
+ new (ecDefinition: SchemaItem, messageArgs: ARGS, category?: DiagnosticCategory): {
213
+ readonly code: string;
214
+ readonly messageText: string;
215
+ /** Gets the schema where the diagnostic originated. */
216
+ readonly schema: Schema;
217
+ /** Gets the DiagnosticType. */
218
+ readonly diagnosticType: DiagnosticType;
219
+ /** The EC object to associate with the diagnostic. */
220
+ ecDefinition: ITEM;
221
+ /** The arguments used when formatting the diagnostic message. */
222
+ messageArgs?: ARGS | undefined;
223
+ /** The diagnostic category is of the type DiagnosticCategory; which is defined as an enumeration above. */
224
+ category: DiagnosticCategory;
225
+ };
226
+ diagnosticType: DiagnosticType;
227
+ };
228
+ /**
229
+ * Helper method for creating [[ClassDiagnostic]] child classes.
230
+ * @param code The string that uniquely identifies the diagnostic in the format '<ruleSetName>:<number>'.
231
+ * @param messageText The message to associate with the diagnostic class.
232
+ * @beta
233
+ */
234
+ export declare function createClassDiagnosticClass<ARGS extends any[]>(code: string, messageText: string): {
235
+ new (ecClass: AnyClass, messageArgs: ARGS, category?: DiagnosticCategory): {
236
+ readonly code: string;
237
+ readonly messageText: string;
238
+ /** Gets the schema where the diagnostic originated. */
239
+ readonly schema: Schema;
240
+ /** Gets the DiagnosticType. */
241
+ readonly diagnosticType: DiagnosticType;
242
+ /** The EC object to associate with the diagnostic. */
243
+ ecDefinition: AnyClass;
244
+ /** The arguments used when formatting the diagnostic message. */
245
+ messageArgs?: ARGS | undefined;
246
+ /** The diagnostic category is of the type DiagnosticCategory; which is defined as an enumeration above. */
247
+ category: DiagnosticCategory;
248
+ };
249
+ diagnosticType: DiagnosticType;
250
+ };
251
+ /**
252
+ * Helper method for creating [[PropertyDiagnostic]] child classes.
253
+ * @param code The string that uniquely identifies the diagnostic in the format '<ruleSetName>:<number>'.
254
+ * @param messageText The message to associate with the diagnostic class.
255
+ * @beta
256
+ */
257
+ export declare function createPropertyDiagnosticClass<ARGS extends any[]>(code: string, messageText: string): {
258
+ new (property: AnyProperty, messageArgs?: ARGS | undefined, category?: DiagnosticCategory): {
259
+ readonly code: string;
260
+ readonly messageText: string;
261
+ /** Gets the schema where the diagnostic originated. */
262
+ readonly schema: Schema;
263
+ /** Gets the DiagnosticType. */
264
+ readonly diagnosticType: DiagnosticType;
265
+ /** The EC object to associate with the diagnostic. */
266
+ ecDefinition: AnyProperty;
267
+ /** The arguments used when formatting the diagnostic message. */
268
+ messageArgs?: ARGS | undefined;
269
+ /** The diagnostic category is of the type DiagnosticCategory; which is defined as an enumeration above. */
270
+ category: DiagnosticCategory;
271
+ };
272
+ code: string;
273
+ };
274
+ /**
275
+ * Helper method for creating [[RelationshipConstraintDiagnostic]] child classes.
276
+ * @param code The string that uniquely identifies the type of diagnostic in the format '<ruleSetName>:<number>'.
277
+ * @param messageText The message to associate with the diagnostic class.
278
+ * @beta
279
+ */
280
+ export declare function createRelationshipConstraintDiagnosticClass<ARGS extends any[]>(code: string, messageText: string): {
281
+ new (constraint: RelationshipConstraint, messageArgs: ARGS, category?: DiagnosticCategory): {
282
+ readonly code: string;
283
+ readonly messageText: string;
284
+ /** Gets the schema where the diagnostic originated. */
285
+ readonly schema: Schema;
286
+ /** Gets the DiagnosticType. */
287
+ readonly diagnosticType: DiagnosticType;
288
+ /** The EC object to associate with the diagnostic. */
289
+ ecDefinition: RelationshipConstraint;
290
+ /** The arguments used when formatting the diagnostic message. */
291
+ messageArgs?: ARGS | undefined;
292
+ /** The diagnostic category is of the type DiagnosticCategory; which is defined as an enumeration above. */
293
+ category: DiagnosticCategory;
294
+ };
295
+ };
296
+ /**
297
+ * Helper method for creating [[CustomAttributeContainerDiagnostic]] child classes.
298
+ * @param code The that uniquely identifies the type of diagnostic in the format '<ruleSetName>:<number>'.
299
+ * @param messageText The message to associate with the diagnostic class.
300
+ * @beta
301
+ */
302
+ export declare function createCustomAttributeContainerDiagnosticClass<ARGS extends any[]>(code: string, messageText: string): {
303
+ new (container: CustomAttributeContainerProps, messageArgs: ARGS, category?: DiagnosticCategory): {
304
+ readonly code: string;
305
+ readonly messageText: string;
306
+ /** Gets the schema where the diagnostic originated. */
307
+ readonly schema: Schema;
308
+ /** Gets the DiagnosticType. */
309
+ readonly diagnosticType: DiagnosticType;
310
+ /** The EC object to associate with the diagnostic. */
311
+ ecDefinition: CustomAttributeContainerProps;
312
+ /** The arguments used when formatting the diagnostic message. */
313
+ messageArgs?: ARGS | undefined;
314
+ /** The diagnostic category is of the type DiagnosticCategory; which is defined as an enumeration above. */
315
+ category: DiagnosticCategory;
316
+ };
317
+ };
318
+ /** @beta */
319
+ export declare function diagnosticCategoryToString(category: DiagnosticCategory): "Error" | "Warning" | "Message" | "Suggestion";
320
+ /** @beta */
321
+ export declare function diagnosticTypeToString(type: DiagnosticType): "CustomAttributeContainer" | "None" | "Property" | "RelationshipConstraint" | "Schema" | "SchemaItem";
322
+ //# sourceMappingURL=Diagnostic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Diagnostic.d.ts","sourceRoot":"","sources":["../../../src/Validation/Diagnostic.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,6BAA6B,EAAE,sBAAsB,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAYvJ;;;GAGG;AACH,oBAAY,cAAc;IACxB,IAAI,IA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AQ,EAAE,kBAAkB,kDAWtE;AAED,YAAY;AACZ,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,cAAc,yGAe1D"}
@@ -0,0 +1,295 @@
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 Diagnostic
7
+ */
8
+ /* eslint-disable @typescript-eslint/no-shadow */
9
+ const formatString = (format, ...args) => {
10
+ return format.replace(/{(\d+)}/g, (match, theNumber) => {
11
+ return typeof args[theNumber] !== "undefined"
12
+ ? args[theNumber]
13
+ : match;
14
+ });
15
+ };
16
+ /**
17
+ * Defines the possible diagnostic types.
18
+ * @beta
19
+ */
20
+ export var DiagnosticType;
21
+ (function (DiagnosticType) {
22
+ DiagnosticType[DiagnosticType["None"] = 0] = "None";
23
+ DiagnosticType[DiagnosticType["Schema"] = 1] = "Schema";
24
+ DiagnosticType[DiagnosticType["SchemaItem"] = 2] = "SchemaItem";
25
+ DiagnosticType[DiagnosticType["Property"] = 3] = "Property";
26
+ DiagnosticType[DiagnosticType["CustomAttributeContainer"] = 4] = "CustomAttributeContainer";
27
+ DiagnosticType[DiagnosticType["RelationshipConstraint"] = 5] = "RelationshipConstraint";
28
+ })(DiagnosticType || (DiagnosticType = {}));
29
+ /**
30
+ * Defines the possible diagnostic categories.
31
+ * @beta
32
+ */
33
+ export var DiagnosticCategory;
34
+ (function (DiagnosticCategory) {
35
+ DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning";
36
+ DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error";
37
+ DiagnosticCategory[DiagnosticCategory["Suggestion"] = 2] = "Suggestion";
38
+ DiagnosticCategory[DiagnosticCategory["Message"] = 3] = "Message";
39
+ })(DiagnosticCategory || (DiagnosticCategory = {}));
40
+ /**
41
+ * The abstract base class for all [[IDiagnostic]] implementations.
42
+ * @beta
43
+ */
44
+ export class BaseDiagnostic {
45
+ /**
46
+ * Initializes a new BaseDiagnostic.
47
+ * @param ecDefinition The EC object to associate with the diagnostic.
48
+ * @param messageArgs The arguments used when formatting the diagnostic message.
49
+ * @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
50
+ */
51
+ constructor(ecDefinition, messageArgs, category = DiagnosticCategory.Error) {
52
+ this.ecDefinition = ecDefinition;
53
+ this.messageArgs = messageArgs;
54
+ this.category = category;
55
+ }
56
+ /** The EC object to associate with the diagnostic. */
57
+ ecDefinition;
58
+ /** The arguments used when formatting the diagnostic message. */
59
+ messageArgs;
60
+ /** The diagnostic category is of the type DiagnosticCategory; which is defined as an enumeration above. */
61
+ category;
62
+ }
63
+ /**
64
+ * An [[IDiagnostic]] implementation used for [[Schema]] diagnostics.
65
+ * @beta
66
+ */
67
+ export class SchemaDiagnostic extends BaseDiagnostic {
68
+ static diagnosticType = DiagnosticType.SchemaItem;
69
+ /**
70
+ * Initializes a new SchemaDiagnostic.
71
+ * @param ecDefinition The EC object to associate with the diagnostic.
72
+ * @param messageArgs The arguments used when formatting the diagnostic message.
73
+ * @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
74
+ */
75
+ constructor(schema, messageArgs, category = DiagnosticCategory.Error) {
76
+ super(schema, messageArgs, category);
77
+ }
78
+ /** Gets the schema where the diagnostic originated. */
79
+ get schema() { return this.ecDefinition; }
80
+ /** Gets the DiagnosticType. */
81
+ get diagnosticType() { return DiagnosticType.Schema; }
82
+ }
83
+ /**
84
+ * An [[IDiagnostic]] implementation used for [[SchemaItem]] diagnostics.
85
+ * @beta
86
+ */
87
+ export class SchemaItemDiagnostic extends BaseDiagnostic {
88
+ static diagnosticType = DiagnosticType.SchemaItem;
89
+ /**
90
+ * Initializes a new SchemaItemDiagnostic.
91
+ * @param ecDefinition The EC object to associate with the diagnostic.
92
+ * @param messageArgs The arguments used when formatting the diagnostic message.
93
+ * @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
94
+ */
95
+ constructor(ecDefinition, messageArgs, category = DiagnosticCategory.Error) {
96
+ super(ecDefinition, messageArgs, category);
97
+ }
98
+ /** Gets the schema where the diagnostic originated. */
99
+ get schema() { return this.ecDefinition.schema; }
100
+ /** Gets the DiagnosticType. */
101
+ get diagnosticType() { return DiagnosticType.SchemaItem; }
102
+ }
103
+ /**
104
+ * An [[IDiagnostic]] implementation used for [[ECClass]] diagnostics.
105
+ * @beta
106
+ */
107
+ export class ClassDiagnostic extends SchemaItemDiagnostic {
108
+ /**
109
+ * Initializes a new ClassDiagnostic.
110
+ * @param ecClass The class to associate with the diagnostic.
111
+ * @param messageArgs The arguments used when formatting the diagnostic message.
112
+ * @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
113
+ */
114
+ constructor(ecClass, messageArgs, category = DiagnosticCategory.Error) {
115
+ super(ecClass, messageArgs, category);
116
+ }
117
+ /** Gets the schema where the diagnostic originated. */
118
+ get schema() { return this.ecDefinition.schema; }
119
+ }
120
+ /**
121
+ * An [[IDiagnostic]] implementation used for [[Property]] diagnostics.
122
+ * @beta
123
+ */
124
+ export class PropertyDiagnostic extends BaseDiagnostic {
125
+ /**
126
+ * Initializes a new PropertyDiagnostic.
127
+ * @param property The property to associate with the diagnostic.
128
+ * @param messageArgs The arguments used when formatting the diagnostic message.
129
+ * @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
130
+ */
131
+ constructor(property, messageArgs, category = DiagnosticCategory.Error) {
132
+ super(property, messageArgs, category);
133
+ }
134
+ /** Gets the schema where the diagnostic originated. */
135
+ get schema() { return this.ecDefinition.schema; }
136
+ /** Gets the DiagnosticType. */
137
+ get diagnosticType() { return DiagnosticType.Property; }
138
+ }
139
+ /**
140
+ * An [[IDiagnostic]] implementation used for [[RelationshipConstraint]] diagnostics.
141
+ * @beta
142
+ */
143
+ export class RelationshipConstraintDiagnostic extends BaseDiagnostic {
144
+ /**
145
+ * Initializes a new RelationshipConstraintDiagnostic.
146
+ * @param constraint The Relationship Constraint to associate with the diagnostic.
147
+ * @param messageArgs The arguments used when formatting the diagnostic message.
148
+ * @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
149
+ */
150
+ constructor(constraint, messageArgs, category = DiagnosticCategory.Error) {
151
+ super(constraint, messageArgs, category);
152
+ }
153
+ /** Gets the schema where the diagnostic originated. */
154
+ get schema() { return this.ecDefinition.schema; }
155
+ /** Gets the DiagnosticType. */
156
+ get diagnosticType() { return DiagnosticType.RelationshipConstraint; }
157
+ }
158
+ /**
159
+ * An [[IDiagnostic]] implementation used for [[CustomAttributeContainerProps]] diagnostics.
160
+ * @beta
161
+ */
162
+ export class CustomAttributeContainerDiagnostic extends BaseDiagnostic {
163
+ /**
164
+ * Initializes a new CustomAttributeContainerDiagnostic.
165
+ * @param constraint The Custom Attribute Container to associate with the diagnostic.
166
+ * @param messageArgs The arguments used when formatting the diagnostic message.
167
+ * @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
168
+ */
169
+ constructor(container, messageArgs, category = DiagnosticCategory.Error) {
170
+ super(container, messageArgs, category);
171
+ }
172
+ /** Gets the schema where the diagnostic originated. */
173
+ get schema() { return this.ecDefinition.schema; }
174
+ /** Gets the DiagnosticType. */
175
+ get diagnosticType() { return DiagnosticType.CustomAttributeContainer; }
176
+ }
177
+ /**
178
+ * Helper method for creating [[SchemaDiagnostic]] child classes.
179
+ * @param code The string that uniquely identifies the diagnostic in the format '<ruleSetName>:<number>'.
180
+ * @param messageText The message to associate with the diagnostic class.
181
+ * @beta
182
+ */
183
+ export function createSchemaDiagnosticClass(code, messageText) {
184
+ validateCode(code);
185
+ return class extends SchemaDiagnostic {
186
+ static code = code;
187
+ get code() { return code; }
188
+ get messageText() { return undefined === this.messageArgs ? messageText : formatString(messageText, ...this.messageArgs); }
189
+ };
190
+ }
191
+ /**
192
+ * Helper method for creating [[SchemaItemDiagnostic]] child classes.
193
+ * @param code The string that uniquely identifies the diagnostic in the format '<ruleSetName>:<number>'.
194
+ * @param messageText The message to associate with the diagnostic class.
195
+ * @beta
196
+ */
197
+ export function createSchemaItemDiagnosticClass(code, messageText) {
198
+ validateCode(code);
199
+ return class extends SchemaItemDiagnostic {
200
+ get code() { return code; }
201
+ get messageText() { return undefined === this.messageArgs ? messageText : formatString(messageText, ...this.messageArgs); }
202
+ };
203
+ }
204
+ /**
205
+ * Helper method for creating [[ClassDiagnostic]] child classes.
206
+ * @param code The string that uniquely identifies the diagnostic in the format '<ruleSetName>:<number>'.
207
+ * @param messageText The message to associate with the diagnostic class.
208
+ * @beta
209
+ */
210
+ export function createClassDiagnosticClass(code, messageText) {
211
+ validateCode(code);
212
+ return class extends ClassDiagnostic {
213
+ get code() { return code; }
214
+ get messageText() { return undefined === this.messageArgs ? messageText : formatString(messageText, ...this.messageArgs); }
215
+ };
216
+ }
217
+ /**
218
+ * Helper method for creating [[PropertyDiagnostic]] child classes.
219
+ * @param code The string that uniquely identifies the diagnostic in the format '<ruleSetName>:<number>'.
220
+ * @param messageText The message to associate with the diagnostic class.
221
+ * @beta
222
+ */
223
+ export function createPropertyDiagnosticClass(code, messageText) {
224
+ validateCode(code);
225
+ return class extends PropertyDiagnostic {
226
+ static code = code;
227
+ get code() { return code; }
228
+ get messageText() { return undefined === this.messageArgs ? messageText : formatString(messageText, ...this.messageArgs); }
229
+ };
230
+ }
231
+ /**
232
+ * Helper method for creating [[RelationshipConstraintDiagnostic]] child classes.
233
+ * @param code The string that uniquely identifies the type of diagnostic in the format '<ruleSetName>:<number>'.
234
+ * @param messageText The message to associate with the diagnostic class.
235
+ * @beta
236
+ */
237
+ export function createRelationshipConstraintDiagnosticClass(code, messageText) {
238
+ validateCode(code);
239
+ return class extends RelationshipConstraintDiagnostic {
240
+ get code() { return code; }
241
+ get messageText() { return undefined === this.messageArgs ? messageText : formatString(messageText, ...this.messageArgs); }
242
+ };
243
+ }
244
+ /**
245
+ * Helper method for creating [[CustomAttributeContainerDiagnostic]] child classes.
246
+ * @param code The that uniquely identifies the type of diagnostic in the format '<ruleSetName>:<number>'.
247
+ * @param messageText The message to associate with the diagnostic class.
248
+ * @beta
249
+ */
250
+ export function createCustomAttributeContainerDiagnosticClass(code, messageText) {
251
+ validateCode(code);
252
+ return class extends CustomAttributeContainerDiagnostic {
253
+ get code() { return code; }
254
+ get messageText() { return undefined === this.messageArgs ? messageText : formatString(messageText, ...this.messageArgs); }
255
+ };
256
+ }
257
+ /** @beta */
258
+ export function diagnosticCategoryToString(category) {
259
+ switch (category) {
260
+ case DiagnosticCategory.Error:
261
+ return "Error";
262
+ case DiagnosticCategory.Warning:
263
+ return "Warning";
264
+ case DiagnosticCategory.Message:
265
+ return "Message";
266
+ case DiagnosticCategory.Suggestion:
267
+ return "Suggestion";
268
+ }
269
+ }
270
+ /** @beta */
271
+ export function diagnosticTypeToString(type) {
272
+ switch (type) {
273
+ case DiagnosticType.CustomAttributeContainer:
274
+ return "CustomAttributeContainer";
275
+ case DiagnosticType.None:
276
+ return "None";
277
+ case DiagnosticType.Property:
278
+ return "Property";
279
+ case DiagnosticType.RelationshipConstraint:
280
+ return "RelationshipConstraint";
281
+ case DiagnosticType.Schema:
282
+ return "Schema";
283
+ case DiagnosticType.SchemaItem:
284
+ return "SchemaItem";
285
+ }
286
+ }
287
+ function validateCode(code) {
288
+ const msg = `Diagnostic code ${code} is invalid. Expected the format <ruleSetName>-<number>.`;
289
+ const parts = code.split("-");
290
+ if (parts.length !== 2)
291
+ throw new Error(msg);
292
+ if (isNaN(Number(parts[1])))
293
+ throw new Error(msg);
294
+ }
295
+ //# sourceMappingURL=Diagnostic.js.map