@itwin/ecschema-editing 5.4.0-dev.5 → 5.4.0-dev.6

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 (182) hide show
  1. package/lib/cjs/Differencing/Errors.js.map +1 -1
  2. package/lib/cjs/Differencing/SchemaConflicts.js.map +1 -1
  3. package/lib/cjs/Differencing/SchemaDiagnosticVisitor.js.map +1 -1
  4. package/lib/cjs/Differencing/SchemaDifference.js.map +1 -1
  5. package/lib/cjs/Differencing/SchemaDifferenceValidator.js.map +1 -1
  6. package/lib/cjs/Differencing/SchemaDifferenceVisitor.js.map +1 -1
  7. package/lib/cjs/Differencing/Utils.js.map +1 -1
  8. package/lib/cjs/Editing/Constants.js.map +1 -1
  9. package/lib/cjs/Editing/CustomAttributes.js.map +1 -1
  10. package/lib/cjs/Editing/ECClasses.js.map +1 -1
  11. package/lib/cjs/Editing/Editor.js.map +1 -1
  12. package/lib/cjs/Editing/Entities.js.map +1 -1
  13. package/lib/cjs/Editing/Enumerations.js.map +1 -1
  14. package/lib/cjs/Editing/Exception.js.map +1 -1
  15. package/lib/cjs/Editing/Formats.js.map +1 -1
  16. package/lib/cjs/Editing/InvertedUnits.js.map +1 -1
  17. package/lib/cjs/Editing/KindOfQuantities.js.map +1 -1
  18. package/lib/cjs/Editing/Mixins.js.map +1 -1
  19. package/lib/cjs/Editing/Mutable/MutableArrayProperty.js.map +1 -1
  20. package/lib/cjs/Editing/Mutable/MutableCAClass.js.map +1 -1
  21. package/lib/cjs/Editing/Mutable/MutableClass.js.map +1 -1
  22. package/lib/cjs/Editing/Mutable/MutableConstant.js.map +1 -1
  23. package/lib/cjs/Editing/Mutable/MutableEntityClass.js.map +1 -1
  24. package/lib/cjs/Editing/Mutable/MutableEnumeration.js.map +1 -1
  25. package/lib/cjs/Editing/Mutable/MutableFormat.js.map +1 -1
  26. package/lib/cjs/Editing/Mutable/MutableInvertedUnit.js.map +1 -1
  27. package/lib/cjs/Editing/Mutable/MutableKindOfQuantity.js.map +1 -1
  28. package/lib/cjs/Editing/Mutable/MutableMixin.js.map +1 -1
  29. package/lib/cjs/Editing/Mutable/MutableNavigationProperty.js.map +1 -1
  30. package/lib/cjs/Editing/Mutable/MutablePhenomenon.js.map +1 -1
  31. package/lib/cjs/Editing/Mutable/MutablePrimitiveOrEnumProperty.js.map +1 -1
  32. package/lib/cjs/Editing/Mutable/MutableProperty.js.map +1 -1
  33. package/lib/cjs/Editing/Mutable/MutablePropertyCategory.js.map +1 -1
  34. package/lib/cjs/Editing/Mutable/MutableRelationshipClass.js.map +1 -1
  35. package/lib/cjs/Editing/Mutable/MutableSchema.js.map +1 -1
  36. package/lib/cjs/Editing/Mutable/MutableSchemaItem.js.map +1 -1
  37. package/lib/cjs/Editing/Mutable/MutableStructProperty.js.map +1 -1
  38. package/lib/cjs/Editing/Mutable/MutableUnit.js.map +1 -1
  39. package/lib/cjs/Editing/Mutable/MutableUnitSystem.js.map +1 -1
  40. package/lib/cjs/Editing/Phenomena.js.map +1 -1
  41. package/lib/cjs/Editing/Properties.js.map +1 -1
  42. package/lib/cjs/Editing/PropertyCategories.js.map +1 -1
  43. package/lib/cjs/Editing/RelationshipClasses.js.map +1 -1
  44. package/lib/cjs/Editing/SchemaItems.js.map +1 -1
  45. package/lib/cjs/Editing/Structs.js.map +1 -1
  46. package/lib/cjs/Editing/UnitSystems.js.map +1 -1
  47. package/lib/cjs/Editing/Units.js.map +1 -1
  48. package/lib/cjs/Merging/ClassMerger.js.map +1 -1
  49. package/lib/cjs/Merging/ConstantMerger.js.map +1 -1
  50. package/lib/cjs/Merging/CustomAttributeClassMerger.js.map +1 -1
  51. package/lib/cjs/Merging/CustomAttributeMerger.js.map +1 -1
  52. package/lib/cjs/Merging/Edits/NameMapping.js.map +1 -1
  53. package/lib/cjs/Merging/Edits/RenameEditHandler.js.map +1 -1
  54. package/lib/cjs/Merging/Edits/SchemaEdits.js.map +1 -1
  55. package/lib/cjs/Merging/Edits/SkipEditHandler.js.map +1 -1
  56. package/lib/cjs/Merging/EntityClassMerger.js.map +1 -1
  57. package/lib/cjs/Merging/EnumerationMerger.js.map +1 -1
  58. package/lib/cjs/Merging/EnumeratorMerger.js.map +1 -1
  59. package/lib/cjs/Merging/FormatMerger.js.map +1 -1
  60. package/lib/cjs/Merging/InvertedUnitMerger.js.map +1 -1
  61. package/lib/cjs/Merging/KindOfQuantityMerger.js.map +1 -1
  62. package/lib/cjs/Merging/MixinMerger.js.map +1 -1
  63. package/lib/cjs/Merging/PhenomenonMerger.js.map +1 -1
  64. package/lib/cjs/Merging/PropertyCategoryMerger.js.map +1 -1
  65. package/lib/cjs/Merging/PropertyMerger.js.map +1 -1
  66. package/lib/cjs/Merging/RelationshipClassMerger.js.map +1 -1
  67. package/lib/cjs/Merging/SchemaMerger.js.map +1 -1
  68. package/lib/cjs/Merging/SchemaMergingVisitor.js.map +1 -1
  69. package/lib/cjs/Merging/SchemaMergingWalker.js.map +1 -1
  70. package/lib/cjs/Merging/SchemaReferenceMerger.js.map +1 -1
  71. package/lib/cjs/Merging/StructClassMerger.js.map +1 -1
  72. package/lib/cjs/Merging/UnitMerger.js.map +1 -1
  73. package/lib/cjs/Merging/UnitSystemMerger.js.map +1 -1
  74. package/lib/cjs/Merging/Utils.js.map +1 -1
  75. package/lib/cjs/Validation/Diagnostic.js.map +1 -1
  76. package/lib/cjs/Validation/DiagnosticReporter.js.map +1 -1
  77. package/lib/cjs/Validation/ECRules.js.map +1 -1
  78. package/lib/cjs/Validation/LoggingDiagnosticReporter.js.map +1 -1
  79. package/lib/cjs/Validation/RuleSuppressionSet.js.map +1 -1
  80. package/lib/cjs/Validation/Rules.js.map +1 -1
  81. package/lib/cjs/Validation/SchemaChanges.js.map +1 -1
  82. package/lib/cjs/Validation/SchemaCompareDiagnostics.js.map +1 -1
  83. package/lib/cjs/Validation/SchemaCompareReporter.js.map +1 -1
  84. package/lib/cjs/Validation/SchemaCompareResultDelegate.js.map +1 -1
  85. package/lib/cjs/Validation/SchemaCompareVisitor.js.map +1 -1
  86. package/lib/cjs/Validation/SchemaComparer.js.map +1 -1
  87. package/lib/cjs/Validation/SchemaValidater.js.map +1 -1
  88. package/lib/cjs/Validation/SchemaValidationVisitor.js.map +1 -1
  89. package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
  90. package/lib/cjs/ecschema-editing.js.map +1 -1
  91. package/lib/esm/Differencing/Errors.js.map +1 -1
  92. package/lib/esm/Differencing/SchemaConflicts.js.map +1 -1
  93. package/lib/esm/Differencing/SchemaDiagnosticVisitor.js.map +1 -1
  94. package/lib/esm/Differencing/SchemaDifference.js.map +1 -1
  95. package/lib/esm/Differencing/SchemaDifferenceValidator.js.map +1 -1
  96. package/lib/esm/Differencing/SchemaDifferenceVisitor.js.map +1 -1
  97. package/lib/esm/Differencing/Utils.js.map +1 -1
  98. package/lib/esm/Editing/Constants.js.map +1 -1
  99. package/lib/esm/Editing/CustomAttributes.js.map +1 -1
  100. package/lib/esm/Editing/ECClasses.js.map +1 -1
  101. package/lib/esm/Editing/Editor.js.map +1 -1
  102. package/lib/esm/Editing/Entities.js.map +1 -1
  103. package/lib/esm/Editing/Enumerations.js.map +1 -1
  104. package/lib/esm/Editing/Exception.js.map +1 -1
  105. package/lib/esm/Editing/Formats.js.map +1 -1
  106. package/lib/esm/Editing/InvertedUnits.js.map +1 -1
  107. package/lib/esm/Editing/KindOfQuantities.js.map +1 -1
  108. package/lib/esm/Editing/Mixins.js.map +1 -1
  109. package/lib/esm/Editing/Mutable/MutableArrayProperty.js.map +1 -1
  110. package/lib/esm/Editing/Mutable/MutableCAClass.js.map +1 -1
  111. package/lib/esm/Editing/Mutable/MutableClass.js.map +1 -1
  112. package/lib/esm/Editing/Mutable/MutableConstant.js.map +1 -1
  113. package/lib/esm/Editing/Mutable/MutableEntityClass.js.map +1 -1
  114. package/lib/esm/Editing/Mutable/MutableEnumeration.js.map +1 -1
  115. package/lib/esm/Editing/Mutable/MutableFormat.js.map +1 -1
  116. package/lib/esm/Editing/Mutable/MutableInvertedUnit.js.map +1 -1
  117. package/lib/esm/Editing/Mutable/MutableKindOfQuantity.js.map +1 -1
  118. package/lib/esm/Editing/Mutable/MutableMixin.js.map +1 -1
  119. package/lib/esm/Editing/Mutable/MutableNavigationProperty.js.map +1 -1
  120. package/lib/esm/Editing/Mutable/MutablePhenomenon.js.map +1 -1
  121. package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.js.map +1 -1
  122. package/lib/esm/Editing/Mutable/MutableProperty.js.map +1 -1
  123. package/lib/esm/Editing/Mutable/MutablePropertyCategory.js.map +1 -1
  124. package/lib/esm/Editing/Mutable/MutableRelationshipClass.js.map +1 -1
  125. package/lib/esm/Editing/Mutable/MutableSchema.js.map +1 -1
  126. package/lib/esm/Editing/Mutable/MutableSchemaItem.js.map +1 -1
  127. package/lib/esm/Editing/Mutable/MutableStructProperty.js.map +1 -1
  128. package/lib/esm/Editing/Mutable/MutableUnit.js.map +1 -1
  129. package/lib/esm/Editing/Mutable/MutableUnitSystem.js.map +1 -1
  130. package/lib/esm/Editing/Phenomena.js.map +1 -1
  131. package/lib/esm/Editing/Properties.js.map +1 -1
  132. package/lib/esm/Editing/PropertyCategories.js.map +1 -1
  133. package/lib/esm/Editing/RelationshipClasses.js.map +1 -1
  134. package/lib/esm/Editing/SchemaItems.js.map +1 -1
  135. package/lib/esm/Editing/Structs.js.map +1 -1
  136. package/lib/esm/Editing/UnitSystems.js.map +1 -1
  137. package/lib/esm/Editing/Units.js.map +1 -1
  138. package/lib/esm/Merging/ClassMerger.js.map +1 -1
  139. package/lib/esm/Merging/ConstantMerger.js.map +1 -1
  140. package/lib/esm/Merging/CustomAttributeClassMerger.js.map +1 -1
  141. package/lib/esm/Merging/CustomAttributeMerger.js.map +1 -1
  142. package/lib/esm/Merging/Edits/NameMapping.js.map +1 -1
  143. package/lib/esm/Merging/Edits/RenameEditHandler.js.map +1 -1
  144. package/lib/esm/Merging/Edits/SchemaEdits.js.map +1 -1
  145. package/lib/esm/Merging/Edits/SkipEditHandler.js.map +1 -1
  146. package/lib/esm/Merging/EntityClassMerger.js.map +1 -1
  147. package/lib/esm/Merging/EnumerationMerger.js.map +1 -1
  148. package/lib/esm/Merging/EnumeratorMerger.js.map +1 -1
  149. package/lib/esm/Merging/FormatMerger.js.map +1 -1
  150. package/lib/esm/Merging/InvertedUnitMerger.js.map +1 -1
  151. package/lib/esm/Merging/KindOfQuantityMerger.js.map +1 -1
  152. package/lib/esm/Merging/MixinMerger.js.map +1 -1
  153. package/lib/esm/Merging/PhenomenonMerger.js.map +1 -1
  154. package/lib/esm/Merging/PropertyCategoryMerger.js.map +1 -1
  155. package/lib/esm/Merging/PropertyMerger.js.map +1 -1
  156. package/lib/esm/Merging/RelationshipClassMerger.js.map +1 -1
  157. package/lib/esm/Merging/SchemaMerger.js.map +1 -1
  158. package/lib/esm/Merging/SchemaMergingVisitor.js.map +1 -1
  159. package/lib/esm/Merging/SchemaMergingWalker.js.map +1 -1
  160. package/lib/esm/Merging/SchemaReferenceMerger.js.map +1 -1
  161. package/lib/esm/Merging/StructClassMerger.js.map +1 -1
  162. package/lib/esm/Merging/UnitMerger.js.map +1 -1
  163. package/lib/esm/Merging/UnitSystemMerger.js.map +1 -1
  164. package/lib/esm/Merging/Utils.js.map +1 -1
  165. package/lib/esm/Validation/Diagnostic.js.map +1 -1
  166. package/lib/esm/Validation/DiagnosticReporter.js.map +1 -1
  167. package/lib/esm/Validation/ECRules.js.map +1 -1
  168. package/lib/esm/Validation/LoggingDiagnosticReporter.js.map +1 -1
  169. package/lib/esm/Validation/RuleSuppressionSet.js.map +1 -1
  170. package/lib/esm/Validation/Rules.js.map +1 -1
  171. package/lib/esm/Validation/SchemaChanges.js.map +1 -1
  172. package/lib/esm/Validation/SchemaCompareDiagnostics.js.map +1 -1
  173. package/lib/esm/Validation/SchemaCompareReporter.js.map +1 -1
  174. package/lib/esm/Validation/SchemaCompareResultDelegate.js.map +1 -1
  175. package/lib/esm/Validation/SchemaCompareVisitor.js.map +1 -1
  176. package/lib/esm/Validation/SchemaComparer.js.map +1 -1
  177. package/lib/esm/Validation/SchemaValidater.js.map +1 -1
  178. package/lib/esm/Validation/SchemaValidationVisitor.js.map +1 -1
  179. package/lib/esm/Validation/SchemaWalker.js.map +1 -1
  180. package/lib/esm/ecschema-editing.js.map +1 -1
  181. package/package.json +9 -9
  182. package/public/locales/en/ECSchemaEditing.json +26 -26
@@ -1 +1 @@
1
- {"version":3,"file":"Exception.js","sourceRoot":"","sources":["../../../src/Editing/Exception.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,gEAAuN;AAEvN,aAAa;AACb,IAAY,eAmFX;AAnFD,WAAY,eAAe;IACzB,4FAA+B,CAAA;IAC/B,2DAAW,CAAA;IACX,4EAAyC,CAAA;IACzC,8EAAc,CAAA;IACd,sFAAkB,CAAA;IAClB,wGAA2B,CAAA;IAC3B,4FAAqB,CAAA;IACrB,kFAAgB,CAAA;IAChB,wFAAmB,CAAA;IACnB,4FAAqB,CAAA;IACrB,oHAAiC,CAAA;IACjC,kHAAgC,CAAA;IAChC,sGAA0B,CAAA;IAC1B,4FAAqB,CAAA;IACrB,wGAA2B,CAAA;IAC3B,4FAAqB,CAAA;IACrB,kFAAgB,CAAA;IAChB,8FAAsB,CAAA;IACtB,4EAAa,CAAA;IACb,sFAAkB,CAAA;IAClB,wGAA2B,CAAA;IAC3B,kGAAwB,CAAA;IACxB,eAAe;IACf,8FAAsB,CAAA;IACtB,oGAAyB,CAAA;IACzB,4EAAa,CAAA;IACb,oGAAyB,CAAA;IACzB,kGAAwB,CAAA;IACxB,0EAAY,CAAA;IACZ,wFAAmB,CAAA;IACnB,wFAAmB,CAAA;IACnB,sFAAkB,CAAA;IAClB,4FAAqB,CAAA;IACrB,4FAAqB,CAAA;IACrB,8GAA8B,CAAA;IAC9B,0GAA4B,CAAA;IAC5B,oGAAyB,CAAA;IACzB,kGAAwB,CAAA;IACxB,o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KAAK,CAAE,qBAAqB,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IAEO,sBAAsB,CAAC,UAAyB;QACtD,IAAI,UAAU,CAAC,cAAc,KAAK,qBAAqB,CAAC,oBAAoB;YAC1E,UAAU,CAAC,cAAc,KAAK,qBAAqB,CAAC,eAAe;YACnE,OAAO,IAAI,CAAC;QAEd,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAtOD,gDAsOC;AAED,SAAS,iBAAiB,CAAC,WAAwB,EAAE,UAAkC;IACrF,IAAI,OAAM,CAAC,UAAU,CAAC,KAAK,QAAQ,EAAE,CAAC;QACpC,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,IAAA,yCAAqB,EAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC/E,CAAC;IAED,OAAO,OAAM,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;AAClE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Editing\n */\n\nimport { AnyDiagnostic } from \"../Validation/Diagnostic\";\nimport { AnyEnumerator, CustomAttributeContainerProps, Enumeration, PrimitiveType, primitiveTypeToString, Property, RelationshipConstraint, SchemaItemKey, SchemaItemType, SchemaKey } from \"@itwin/ecschema-metadata\";\n\n/** @alpha */\nexport enum ECEditingStatus {\n EC_EDITING_ERROR_BASE = 0x30000,\n Unknown = 0,\n RuleViolation = EC_EDITING_ERROR_BASE + 1,\n SchemaNotFound,\n SchemaItemNotFound,\n SchemaItemNotFoundInContext,\n PropertyAlreadyExists,\n PropertyNotFound,\n InvalidPropertyType,\n BaseClassIsNotElement,\n BaseClassIsNotElementUniqueAspect,\n BaseClassIsNotElementMultiAspect,\n SchemaItemNameNotSpecified,\n InvalidSchemaItemType,\n SchemaItemNameAlreadyExists,\n InvalidEnumeratorType,\n InvalidBaseClass,\n EnumeratorDoesNotExist,\n InvalidECName,\n InvalidSchemaAlias,\n InvalidFormatUnitsSpecified,\n SchemaAliasAlreadyExists,\n // Outer Errors\n CreateSchemaItemFailed,\n CreateSchemaItemFromProps,\n CreateElement,\n CreateElementUniqueAspect,\n CreateElementMultiAspect,\n SetBaseClass,\n SetSourceConstraint,\n SetTargetConstraint,\n AddConstraintClass,\n RemoveConstraintClass,\n SetAbstractConstraint,\n AddCustomAttributeToConstraint,\n AddCustomAttributeToProperty,\n AddCustomAttributeToClass,\n CreateNavigationProperty,\n CreateNavigationPropertyFromProps,\n SetInvertsUnit,\n SetUnitSystem,\n SetDescription,\n SetLabel,\n SetIsReadOnly,\n SetPriority,\n SetCategory,\n SetKindOfQuantity,\n SetMinOccurs,\n SetMaxOccurs,\n SetExtendedTypeName,\n SetMinLength,\n SetMaxLength,\n SetMinValue,\n SetMaxValue,\n SetPropertyName,\n AddMixin,\n AddEnumerator,\n SetEnumeratorLabel,\n SetEnumeratorDescription,\n AddPresentationUnit,\n AddPresentationOverride,\n CreateFormatOverride,\n SetPropertyCategoryPriority,\n CreatePrimitiveProperty,\n CreatePrimitivePropertyFromProps,\n CreateEnumerationProperty,\n CreateEnumerationPropertyFromProps,\n CreatePrimitiveArrayProperty,\n CreatePrimitiveArrayPropertyFromProps,\n CreateEnumerationArrayProperty,\n CreateEnumerationArrayPropertyFromProps,\n CreateStructProperty,\n CreateStructPropertyFromProps,\n CreateStructArrayProperty,\n CreateStructArrayPropertyFromProps,\n DeleteProperty,\n DeleteClass,\n SetClassName,\n AddSchemaReference,\n SetSchemaVersion,\n IncrementSchemaMinorVersion,\n SetSchemaAlias\n}\n\n/**\n * A type that constrains the possible error types handled by SchemaEditingError\n * @alpha\n */\nexport type AnyEditingError = SchemaEditingError | Error;\n\n/**\n * Defines the possible property type names.\n * @alpha\n */\nexport enum PropertyTypeName {\n ArrayProperty = \"ArrayProperty\",\n PrimitiveProperty = \"PrimitiveProperty\",\n EnumerationProperty = \"EnumerationProperty\",\n NavigationProperty = \"NavigationProperty\",\n StructProperty = \"StructProperty\"\n}\n\n/**\n * Defines the possible schema type identifiers.\n * @alpha\n */\nexport enum SchemaTypeIdentifiers {\n SchemaIdentifier = \"Schema\",\n SchemaItemIdentifier = \"SchemaItem\",\n ClassIdentifier = \"Class\",\n PropertyIdentifier = \"Property\",\n EnumeratorIdentifier = \"Enumerator\",\n CustomAttributeIdentifier = \"CustomAttribute\",\n RelationshipConstraintIdentifier = \"RelationshipConstraint\"\n}\n\n/**\n * Type that constrains SchemaItemType enum to those used by EC Class types.\n * @alpha\n */\nexport type ECClassSchemaItems = SchemaItemType.EntityClass | SchemaItemType.StructClass | SchemaItemType.RelationshipClass | SchemaItemType.Mixin | SchemaItemType.CustomAttributeClass;\n\n/**\n * Type that defines the possible SchemaTypeIdentifiers for SchemaItemId classes.\n * @alpha\n */\nexport type AnySchemaItemTypeIdentifier = SchemaTypeIdentifiers.SchemaItemIdentifier | SchemaTypeIdentifiers.ClassIdentifier;\n\n/**\n * Type that encompasses all ISchemaTypeIdentifier interfaces\n * @alpha\n */\nexport type AnyIdentifier = ISchemaIdentifier | ISchemaItemIdentifier | IClassIdentifier | IPropertyIdentifier | ICustomAttributeIdentifier | IRelationshipConstraintIdentifier | IEnumeratorIdentifier;\n\n/**\n * A base interface that defines what is needed to identity any schema type.\n * @alpha\n */\nexport interface ISchemaTypeIdentifier {\n readonly name: string;\n readonly schemaKey: SchemaKey;\n readonly typeIdentifier: SchemaTypeIdentifiers;\n}\n\n/**\n * Interface that defines the data needed to identify a Schema.\n * @alpha\n */\nexport interface ISchemaIdentifier extends ISchemaTypeIdentifier {\n readonly typeIdentifier: SchemaTypeIdentifiers.SchemaIdentifier;\n}\n\n/**\n * Interface that defines the data needed to identify a SchemaItem.\n * @alpha\n */\nexport interface ISchemaItemIdentifier extends ISchemaTypeIdentifier {\n readonly schemaItemType: SchemaItemType;\n readonly schemaItemKey: SchemaItemKey;\n readonly typeIdentifier: AnySchemaItemTypeIdentifier;\n}\n\n/**\n * Interface that defines the data needed to identify an EC Class.\n * @alpha\n */\nexport interface IClassIdentifier extends ISchemaTypeIdentifier {\n readonly schemaItemType: ECClassSchemaItems;\n readonly schemaItemKey: SchemaItemKey;\n readonly typeIdentifier: SchemaTypeIdentifiers.ClassIdentifier;\n}\n\n/**\n * Interface that defines the data needed to identify an EC Property.\n * @alpha\n */\nexport interface IPropertyIdentifier extends ISchemaTypeIdentifier {\n readonly fullName: string;\n readonly ecClass: ClassId;\n readonly typeName?: PropertyTypeName;\n readonly typeIdentifier: SchemaTypeIdentifiers.PropertyIdentifier;\n}\n\n/**\n * Interface that defines the data needed to identify an Enumerator.\n * @alpha\n */\ninterface IEnumeratorIdentifier extends ISchemaTypeIdentifier {\n readonly enumeratorType: string;\n readonly enumeration: SchemaItemKey;\n readonly enumerationType: string;\n readonly typeIdentifier: SchemaTypeIdentifiers.EnumeratorIdentifier;\n}\n\n/**\n * Interface that defines the data needed to identify a CustomAttribute.\n * @alpha\n */\nexport interface ICustomAttributeIdentifier extends ISchemaTypeIdentifier {\n readonly containerFullName: string;\n readonly typeIdentifier: SchemaTypeIdentifiers.CustomAttributeIdentifier;\n}\n\n/**\n * Interface that defines the data needed to identify a RelationshipConstraint.\n * @alpha\n */\nexport interface IRelationshipConstraintIdentifier extends ISchemaTypeIdentifier {\n readonly relationshipKey: SchemaItemKey;\n readonly typeIdentifier: SchemaTypeIdentifiers.RelationshipConstraintIdentifier;\n}\n\n/**\n * An ISchemaIdentifier implementation to identify Schemas\n * @alpha\n */\nexport class SchemaId implements ISchemaIdentifier {\n public readonly typeIdentifier = SchemaTypeIdentifiers.SchemaIdentifier;\n public readonly name: string;\n public readonly schemaKey: SchemaKey;\n constructor(schemaKey: SchemaKey) {\n this.name = schemaKey.name;\n this.schemaKey = schemaKey;\n }\n}\n\n/**\n * An ISchemItemIdentifier implementation to identify SchemaItems\n * @alpha\n */\nexport class SchemaItemId implements ISchemaItemIdentifier {\n public readonly typeIdentifier: AnySchemaItemTypeIdentifier;\n public readonly name: string;\n public readonly schemaKey: SchemaKey;\n public readonly schemaItemType: SchemaItemType;\n public readonly schemaItemKey: SchemaItemKey;\n\n constructor(schemaItemType: SchemaItemType, schemaItemKeyOrName: SchemaItemKey | string, schemaKey?: SchemaKey) {\n if (typeof(schemaItemKeyOrName) === \"string\") {\n if (!schemaKey)\n throw new Error(\"schemaKey if required if the specified schemaItem the name of the schema item.\");\n\n this.schemaKey = schemaKey!;\n this.schemaItemKey = new SchemaItemKey(schemaItemKeyOrName, schemaKey);\n } else {\n this.schemaKey = schemaItemKeyOrName.schemaKey;\n this.schemaItemKey = schemaItemKeyOrName;\n }\n\n this.schemaItemType = schemaItemType;\n this.name = this.schemaItemKey.fullName;\n this.typeIdentifier = SchemaTypeIdentifiers.SchemaItemIdentifier;\n }\n}\n\n/**\n * An IClassIdentifier implementation to identify Class instances.\n * @alpha\n */\nexport class ClassId extends SchemaItemId implements IClassIdentifier {\n public override readonly typeIdentifier = SchemaTypeIdentifiers.ClassIdentifier;\n public override readonly schemaItemType: ECClassSchemaItems;\n constructor(schemaItemType: ECClassSchemaItems, schemaItemKeyOrName: SchemaItemKey | string, schemaKey?: SchemaKey) {\n super(schemaItemType, schemaItemKeyOrName, schemaKey);\n this.schemaItemType = schemaItemType;\n }\n}\n\n/**\n * An IPropertyIdentifier implementation to identify Property instances.\n * @alpha\n */\nexport class PropertyId implements IPropertyIdentifier {\n public readonly typeIdentifier = SchemaTypeIdentifiers.PropertyIdentifier;\n public readonly name: string;\n public readonly fullName: string;\n public readonly ecClass: ClassId;\n public readonly schemaKey: SchemaKey;\n public readonly typeName?: PropertyTypeName;\n\n constructor(schemaItemType: ECClassSchemaItems, classKey: SchemaItemKey, property: Property | string, typeName?: PropertyTypeName) {\n this.name = property instanceof Property ? property.name : property;\n this.fullName = property instanceof Property ? property.fullName : `${classKey.name}.${property}`;\n this.ecClass = new ClassId(schemaItemType, classKey);\n this.schemaKey = classKey.schemaKey;\n this.typeName = typeName;\n }\n}\n\n/**\n * An IEnumeratorIdentifier implementation to identify Enumerator instances.\n * @alpha\n */\nexport class EnumeratorId implements IEnumeratorIdentifier{\n public readonly typeIdentifier = SchemaTypeIdentifiers.EnumeratorIdentifier;\n public readonly enumeration: SchemaItemKey;\n public readonly enumerationType: string;\n public readonly enumeratorType: string;\n public readonly name: string;\n public readonly schemaKey: SchemaKey;\n\n constructor(enumerator: AnyEnumerator | string, enumeration: Enumeration) {\n this.enumeration = enumeration.key;\n this.enumerationType = enumeration.type ? primitiveTypeToString(enumeration.type): \"string\";\n this.enumeratorType = getEnumeratorType(enumeration ?? PrimitiveType.String, enumerator);\n this.name = typeof(enumerator) === \"string\" ? enumerator : enumerator.name;\n this.schemaKey = enumeration.schema.schemaKey;\n }\n}\n\n/**\n * An ICustomAttributeIdentifier implementation to identify CustomAttribute instances.\n * @alpha\n */\nexport class CustomAttributeId implements ICustomAttributeIdentifier {\n public readonly typeIdentifier = SchemaTypeIdentifiers.CustomAttributeIdentifier;\n public readonly name: string;\n public readonly schemaKey: SchemaKey;\n public readonly containerFullName: string;\n constructor(name: string, container: CustomAttributeContainerProps) {\n this.name = name;\n this.schemaKey = container.schema.schemaKey;\n this.containerFullName = container.fullName;\n }\n}\n\n/**\n * An IRelationshipConstraintIdentifier implementation to identify RelationshipConstraints.\n * @alpha\n */\nexport class RelationshipConstraintId implements IRelationshipConstraintIdentifier {\n public readonly typeIdentifier = SchemaTypeIdentifiers.RelationshipConstraintIdentifier;\n public readonly name: string;\n public readonly relationshipKey: SchemaItemKey;\n public readonly schemaKey: SchemaKey;\n constructor(constraint: RelationshipConstraint) {\n this.name = constraint.isSource ? \"Source\" : \"Target\";\n this.relationshipKey = constraint.relationshipClass.key;\n this.schemaKey = this.relationshipKey.schemaKey;\n }\n}\n\n/**\n * An exception class for the ecschema-editing API. Contains identifiers for schema types involved in the\n * exception. An example being SchemaItemId which contains the name of the SchemaItem, SchemaItemKey, SchemaItemType, etc.\n * Typically will contain an innerError of type SchemaEditingError containing the identifier of the schema item that\n * caused the exception. The containing error instance will identify the method called (identified by the errorNumber)\n * and the identifier of the schema item being modified/created.\n * @alpha\n */\nexport class SchemaEditingError extends Error {\n private _ruleViolations?: AnyDiagnostic[];\n private _schemaKey: SchemaKey;\n\n /**\n * Constructs a new SchemaEditingError instance.\n * @param errorNumber The unique ECEditingStatus code identifying the error.\n * @param identifier The identifier instance containing information about the EC object involved with the exception.\n * @param innerError The SchemaEditingError containing the identifier of the EC object that caused the initial exception.\n * @param ruleViolations Will contain EC rule violations of type [[AnyDiagnostic]] for exceptions with the error code ECEditingStatus.RuleViolation.\n * @param message Optional error message. Most messages on automatically generated by this class based on the ECEditingStatus code.\n */\n public constructor(public readonly errorNumber: ECEditingStatus, public readonly identifier: AnyIdentifier, public readonly innerError?: AnyEditingError, ruleViolations?: AnyDiagnostic[], message?: string) {\n super(message);\n this._ruleViolations = ruleViolations;\n this._schemaKey = identifier.schemaKey,\n this.generateMessage();\n }\n\n /**\n * Gets the SchemaId instance.\n * @throws Error if the identifier is not an instance of SchemaId.\n */\n private get _schemaId(): SchemaId {\n if (this.identifier.typeIdentifier !== SchemaTypeIdentifiers.SchemaIdentifier)\n throw new Error(\"identifier is not a SchemaId.\");\n return this.identifier as SchemaId;\n }\n\n /**\n * Gets the SchemaItemId instance.\n * @throws Error if the identifier is not an instance of SchemaItemId.\n */\n private get _schemaItemId(): SchemaItemId {\n if (this.isSchemaItemIdentifier(this.identifier))\n throw new Error(\"identifier is not a SchemaItemId.\");\n return this.identifier as SchemaItemId;\n }\n\n /**\n * Gets the ClassId instance.\n * @throws Error if the identifier is not an instance of ClassId.\n */\n private get _classId(): ClassId {\n if (this.identifier.typeIdentifier !== SchemaTypeIdentifiers.ClassIdentifier)\n throw new Error(\"identifier is not a ClassId.\");\n return this.identifier as ClassId;\n }\n\n /**\n * Gets the PropertyId instance.\n * @throws Error if the identifier is not an instance of PropertyId.\n */\n private get _propertyId(): PropertyId {\n if (this.identifier.typeIdentifier !== SchemaTypeIdentifiers.PropertyIdentifier)\n throw new Error(\"identifier is not a PropertyId.\");\n return this.identifier;\n }\n\n /**\n * Gets the EnumeratorId instance.\n * @throws Error if the identifier is not an instance of EnumeratorId.\n */\n private get _enumeratorId(): EnumeratorId {\n if (this.identifier.typeIdentifier !== SchemaTypeIdentifiers.EnumeratorIdentifier)\n throw new Error(\"identifier is not a EnumerationId.\");\n return this.identifier as EnumeratorId;\n }\n\n /**\n * Gets the CustomAttributeId instance.\n * @throws Error if the identifier is not an instance of CustomAttributeId.\n */\n private get _customAttributeId(): CustomAttributeId {\n if (this.identifier.typeIdentifier !== SchemaTypeIdentifiers.CustomAttributeIdentifier)\n throw new Error(\"identifier is not a CustomAttributeId.\");\n return this.identifier;\n }\n\n /**\n * Gets the RelationshipConstraintId instance.\n * @throws Error if the identifier is not an instance of RelationshipConstraintId.\n */\n private get _relationshipConstraintId(): RelationshipConstraintId {\n if (this.identifier.typeIdentifier !== SchemaTypeIdentifiers.RelationshipConstraintIdentifier)\n throw new Error(\"identifier is not a RelationshipConstraintId.\");\n return this.identifier;\n }\n\n /** Gets rule violations that were reported during validation. Returns an array of [[AnyDiagnostic]] if\n * the errorNumber is ECEditingStatus.RuleViolation, otherwise undefined.\n */\n public get ruleViolations(): AnyDiagnostic[] | undefined {\n return this._ruleViolations;\n }\n\n /**\n * Returns a readable string containing the ECEditingStatus along with the error message. Any\n * innerError will also be appended.\n * @returns\n */\n public toDebugString(): string {\n let innerMessage = \"\";\n if (this.innerError) {\n if (this.innerError instanceof SchemaEditingError)\n innerMessage = ` Inner error: ${this.innerError.toDebugString()}`;\n else\n innerMessage = ` Inner error: ${this.innerError.message}`;\n }\n return this._appendMessage(`ECEditingStatus.${ECEditingStatus[this.errorNumber]}`) + innerMessage;\n }\n\n private generateMessage() {\n if (this.message)\n return;\n\n switch(this.errorNumber) {\n case ECEditingStatus.SchemaNotFound:\n this.message = `Schema Key ${this._schemaKey.toString(true)} could not be found in the context.`;\n return;\n case ECEditingStatus.SchemaItemNotFound:\n this.message = `${this._schemaItemId.schemaItemType} ${this._schemaItemId.name} could not be found in the schema ${this._schemaKey.name}.`;\n return;\n case ECEditingStatus.SchemaItemNotFoundInContext:\n this.message = `${this._schemaItemId.schemaItemType} ${this._schemaItemId.name} could not be found in the schema context.`;\n return;\n case ECEditingStatus.InvalidSchemaItemType:\n this.message = `Expected ${this._schemaItemId.name} to be of type ${this._schemaItemId.schemaItemType}.`;\n return;\n case ECEditingStatus.SchemaItemNameNotSpecified:\n this.message = `Could not create a new ${this._schemaItemId.schemaItemType} in schema ${this._schemaKey.name}. No name was supplied within props.`;\n return;\n case ECEditingStatus.SchemaItemNameAlreadyExists:\n this.message = `${this._schemaItemId.schemaItemType} ${this._schemaItemId.name} already exists in the schema ${this._schemaKey.name}.`;\n return;\n case ECEditingStatus.RuleViolation:\n this.message = this._getRuleViolationMessage();\n return;\n case ECEditingStatus.PropertyNotFound:\n this.message = `An ECProperty with the name ${this._propertyId.name} could not be found in the class ${this._propertyId.ecClass.name}.`;\n return;\n case ECEditingStatus.PropertyAlreadyExists:\n this.message = `An ECProperty with the name ${this._propertyId.name} already exists in the class ${this._propertyId.ecClass.name}.`;\n return;\n case ECEditingStatus.InvalidPropertyType:\n this.message = `Expected property ${this._propertyId.name} to be of type ${this._propertyId.typeName}.`;\n return;\n case ECEditingStatus.BaseClassIsNotElement:\n this.message = `Expected base class ${this._schemaItemId.name} to derive from BisCore.Element.`;\n return;\n case ECEditingStatus.BaseClassIsNotElementUniqueAspect:\n this.message = `Expected base class ${this._schemaItemId.name} to derive from BisCore.ElementUniqueAspect.`;\n return;\n case ECEditingStatus.BaseClassIsNotElementMultiAspect:\n this.message = `Expected base class ${this._schemaItemId.name} to derive from BisCore.ElementMultiAspect.`;\n return;\n case ECEditingStatus.InvalidFormatUnitsSpecified:\n this.message = `The specified Format unit ${this._schemaItemId.name} is not of type Unit or InvertedUnit`;\n return;\n case ECEditingStatus.InvalidEnumeratorType:\n this.message = `The Enumeration ${this._enumeratorId.enumeration.fullName} has type ${this._enumeratorId.enumerationType}, while Enumerator ${this._enumeratorId.name} has type ${this._enumeratorId.enumeratorType}.`;\n return;\n case ECEditingStatus.EnumeratorDoesNotExist:\n this.message = `Enumerator ${this._enumeratorId.name} does not exists in Enumeration ${this._enumeratorId.enumeration.name}.`;\n return;\n case ECEditingStatus.InvalidECName:\n this.message = `Could not rename class ${this._schemaItemId.name} because the specified name is not a valid ECName.`;\n return;\n case ECEditingStatus.InvalidSchemaAlias:\n this.message = `Could not set the alias for schema ${this._schemaKey.name} because the specified alias is not a valid ECName.`;\n return;\n default:\n this.message = this._createTaskErrorMessage();\n }\n }\n\n private _appendMessage(e: string) {\n return this.message ? `${e}: ${this.message}` : e;\n }\n\n private _getRuleViolationMessage(): string {\n if (!this._ruleViolations)\n return \"\";\n\n let violations = \"\";\n for (const diagnostic of this._ruleViolations) {\n violations += `${diagnostic.code}: ${diagnostic.messageText}\\r\\n`;\n }\n\n switch (this.identifier.typeIdentifier) {\n case SchemaTypeIdentifiers.SchemaIdentifier:\n return `Rule violations occurred from Schema ${this._schemaId.name}: ${violations}`;\n case SchemaTypeIdentifiers.SchemaItemIdentifier:\n return `Rule violations occurred from ${this._schemaItemId.schemaItemType} ${this._schemaItemId.name}: ${violations}`;\n case SchemaTypeIdentifiers.ClassIdentifier:\n return `Rule violations occurred from ${this._schemaItemId.schemaItemType} ${this._schemaItemId.name}: ${violations}`;\n case SchemaTypeIdentifiers.CustomAttributeIdentifier:\n return `Rule violations occurred from CustomAttribute ${this._customAttributeId.name}, container ${this._customAttributeId.containerFullName}: ${violations}`;\n case SchemaTypeIdentifiers.RelationshipConstraintIdentifier:\n return `Rule violations occurred from ${this._relationshipConstraintId.name} constraint of RelationshipClass ${this._relationshipConstraintId.relationshipKey.fullName}: ${violations}`;\n default:\n throw new Error (\"Invalid identifier.\");\n }\n }\n\n private _createTaskErrorMessage() {\n // Make sure we have an inner error or else it is not a task error\n if (!this.innerError)\n return \"\";\n\n switch (this.identifier.typeIdentifier) {\n case SchemaTypeIdentifiers.SchemaIdentifier:\n case SchemaTypeIdentifiers.SchemaItemIdentifier:\n case SchemaTypeIdentifiers.ClassIdentifier:\n case SchemaTypeIdentifiers.RelationshipConstraintIdentifier:\n return `While performing task '${ECEditingStatus[this.errorNumber]}' an error occurred editing ${this.identifier.typeIdentifier} ${this.identifier.name}.`;\n case SchemaTypeIdentifiers.PropertyIdentifier:\n return `While performing task '${ECEditingStatus[this.errorNumber]}' an error occurred editing ${this.identifier.typeIdentifier} ${this.identifier.fullName}.`;\n default:\n throw new Error (\"Invalid identifier.\");\n }\n }\n\n private isSchemaItemIdentifier(identifier: AnyIdentifier) {\n if (identifier.typeIdentifier !== SchemaTypeIdentifiers.SchemaItemIdentifier &&\n identifier.typeIdentifier !== SchemaTypeIdentifiers.ClassIdentifier)\n return true;\n\n return false;\n }\n}\n\nfunction getEnumeratorType(enumeration: Enumeration, enumerator: AnyEnumerator | string) {\n if (typeof(enumerator) === \"string\") {\n return enumeration.type ? primitiveTypeToString(enumeration.type) : \"string\";\n }\n\n return typeof(enumerator.value) === \"string\" ? \"string\" : \"int\";\n}\n"]}
1
+ {"version":3,"file":"Exception.js","sourceRoot":"","sources":["../../../src/Editing/Exception.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,gEAAuN;AAEvN,aAAa;AACb,IAAY,eAmFX;AAnFD,WAAY,eAAe;IACzB,4FAA+B,CAAA;IAC/B,2DAAW,CAAA;IACX,4EAAyC,CAAA;IACzC,8EAAc,CAAA;IACd,sFAAkB,CAAA;IAClB,wGAA2B,CAAA;IAC3B,4FAAqB,CAAA;IACrB,kFAAgB,CAAA;IAChB,wFAAmB,CAAA;IACnB,4FAAqB,CAAA;IACrB,oHAAiC,CAAA;IACjC,kHAAgC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AU,CAAC,cAAc,EAAE,CAAC;YACvC,KAAK,qBAAqB,CAAC,gBAAgB,CAAC;YAC5C,KAAK,qBAAqB,CAAC,oBAAoB,CAAC;YAChD,KAAK,qBAAqB,CAAC,eAAe,CAAC;YAC3C,KAAK,qBAAqB,CAAC,gCAAgC;gBACzD,OAAO,0BAA0B,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,+BAA+B,IAAI,CAAC,UAAU,CAAC,cAAc,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC;YAC7J,KAAK,qBAAqB,CAAC,kBAAkB;gBAC3C,OAAO,0BAA0B,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,+BAA+B,IAAI,CAAC,UAAU,CAAC,cAAc,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,CAAC;YACjK;gBACE,MAAM,IAAI,KAAK,CAAE,qBAAqB,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IAEO,sBAAsB,CAAC,UAAyB;QACtD,IAAI,UAAU,CAAC,cAAc,KAAK,qBAAqB,CAAC,oBAAoB;YAC1E,UAAU,CAAC,cAAc,KAAK,qBAAqB,CAAC,eAAe;YACnE,OAAO,IAAI,CAAC;QAEd,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAtOD,gDAsOC;AAED,SAAS,iBAAiB,CAAC,WAAwB,EAAE,UAAkC;IACrF,IAAI,OAAM,CAAC,UAAU,CAAC,KAAK,QAAQ,EAAE,CAAC;QACpC,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,IAAA,yCAAqB,EAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC/E,CAAC;IAED,OAAO,OAAM,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;AAClE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Editing\r\n */\r\n\r\nimport { AnyDiagnostic } from \"../Validation/Diagnostic\";\r\nimport { AnyEnumerator, CustomAttributeContainerProps, Enumeration, PrimitiveType, primitiveTypeToString, Property, RelationshipConstraint, SchemaItemKey, SchemaItemType, SchemaKey } from \"@itwin/ecschema-metadata\";\r\n\r\n/** @alpha */\r\nexport enum ECEditingStatus {\r\n EC_EDITING_ERROR_BASE = 0x30000,\r\n Unknown = 0,\r\n RuleViolation = EC_EDITING_ERROR_BASE + 1,\r\n SchemaNotFound,\r\n SchemaItemNotFound,\r\n SchemaItemNotFoundInContext,\r\n PropertyAlreadyExists,\r\n PropertyNotFound,\r\n InvalidPropertyType,\r\n BaseClassIsNotElement,\r\n BaseClassIsNotElementUniqueAspect,\r\n BaseClassIsNotElementMultiAspect,\r\n SchemaItemNameNotSpecified,\r\n InvalidSchemaItemType,\r\n SchemaItemNameAlreadyExists,\r\n InvalidEnumeratorType,\r\n InvalidBaseClass,\r\n EnumeratorDoesNotExist,\r\n InvalidECName,\r\n InvalidSchemaAlias,\r\n InvalidFormatUnitsSpecified,\r\n SchemaAliasAlreadyExists,\r\n // Outer Errors\r\n CreateSchemaItemFailed,\r\n CreateSchemaItemFromProps,\r\n CreateElement,\r\n CreateElementUniqueAspect,\r\n CreateElementMultiAspect,\r\n SetBaseClass,\r\n SetSourceConstraint,\r\n SetTargetConstraint,\r\n AddConstraintClass,\r\n RemoveConstraintClass,\r\n SetAbstractConstraint,\r\n AddCustomAttributeToConstraint,\r\n AddCustomAttributeToProperty,\r\n AddCustomAttributeToClass,\r\n CreateNavigationProperty,\r\n CreateNavigationPropertyFromProps,\r\n SetInvertsUnit,\r\n SetUnitSystem,\r\n SetDescription,\r\n SetLabel,\r\n SetIsReadOnly,\r\n SetPriority,\r\n SetCategory,\r\n SetKindOfQuantity,\r\n SetMinOccurs,\r\n SetMaxOccurs,\r\n SetExtendedTypeName,\r\n SetMinLength,\r\n SetMaxLength,\r\n SetMinValue,\r\n SetMaxValue,\r\n SetPropertyName,\r\n AddMixin,\r\n AddEnumerator,\r\n SetEnumeratorLabel,\r\n SetEnumeratorDescription,\r\n AddPresentationUnit,\r\n AddPresentationOverride,\r\n CreateFormatOverride,\r\n SetPropertyCategoryPriority,\r\n CreatePrimitiveProperty,\r\n CreatePrimitivePropertyFromProps,\r\n CreateEnumerationProperty,\r\n CreateEnumerationPropertyFromProps,\r\n CreatePrimitiveArrayProperty,\r\n CreatePrimitiveArrayPropertyFromProps,\r\n CreateEnumerationArrayProperty,\r\n CreateEnumerationArrayPropertyFromProps,\r\n CreateStructProperty,\r\n CreateStructPropertyFromProps,\r\n CreateStructArrayProperty,\r\n CreateStructArrayPropertyFromProps,\r\n DeleteProperty,\r\n DeleteClass,\r\n SetClassName,\r\n AddSchemaReference,\r\n SetSchemaVersion,\r\n IncrementSchemaMinorVersion,\r\n SetSchemaAlias\r\n}\r\n\r\n/**\r\n * A type that constrains the possible error types handled by SchemaEditingError\r\n * @alpha\r\n */\r\nexport type AnyEditingError = SchemaEditingError | Error;\r\n\r\n/**\r\n * Defines the possible property type names.\r\n * @alpha\r\n */\r\nexport enum PropertyTypeName {\r\n ArrayProperty = \"ArrayProperty\",\r\n PrimitiveProperty = \"PrimitiveProperty\",\r\n EnumerationProperty = \"EnumerationProperty\",\r\n NavigationProperty = \"NavigationProperty\",\r\n StructProperty = \"StructProperty\"\r\n}\r\n\r\n/**\r\n * Defines the possible schema type identifiers.\r\n * @alpha\r\n */\r\nexport enum SchemaTypeIdentifiers {\r\n SchemaIdentifier = \"Schema\",\r\n SchemaItemIdentifier = \"SchemaItem\",\r\n ClassIdentifier = \"Class\",\r\n PropertyIdentifier = \"Property\",\r\n EnumeratorIdentifier = \"Enumerator\",\r\n CustomAttributeIdentifier = \"CustomAttribute\",\r\n RelationshipConstraintIdentifier = \"RelationshipConstraint\"\r\n}\r\n\r\n/**\r\n * Type that constrains SchemaItemType enum to those used by EC Class types.\r\n * @alpha\r\n */\r\nexport type ECClassSchemaItems = SchemaItemType.EntityClass | SchemaItemType.StructClass | SchemaItemType.RelationshipClass | SchemaItemType.Mixin | SchemaItemType.CustomAttributeClass;\r\n\r\n/**\r\n * Type that defines the possible SchemaTypeIdentifiers for SchemaItemId classes.\r\n * @alpha\r\n */\r\nexport type AnySchemaItemTypeIdentifier = SchemaTypeIdentifiers.SchemaItemIdentifier | SchemaTypeIdentifiers.ClassIdentifier;\r\n\r\n/**\r\n * Type that encompasses all ISchemaTypeIdentifier interfaces\r\n * @alpha\r\n */\r\nexport type AnyIdentifier = ISchemaIdentifier | ISchemaItemIdentifier | IClassIdentifier | IPropertyIdentifier | ICustomAttributeIdentifier | IRelationshipConstraintIdentifier | IEnumeratorIdentifier;\r\n\r\n/**\r\n * A base interface that defines what is needed to identity any schema type.\r\n * @alpha\r\n */\r\nexport interface ISchemaTypeIdentifier {\r\n readonly name: string;\r\n readonly schemaKey: SchemaKey;\r\n readonly typeIdentifier: SchemaTypeIdentifiers;\r\n}\r\n\r\n/**\r\n * Interface that defines the data needed to identify a Schema.\r\n * @alpha\r\n */\r\nexport interface ISchemaIdentifier extends ISchemaTypeIdentifier {\r\n readonly typeIdentifier: SchemaTypeIdentifiers.SchemaIdentifier;\r\n}\r\n\r\n/**\r\n * Interface that defines the data needed to identify a SchemaItem.\r\n * @alpha\r\n */\r\nexport interface ISchemaItemIdentifier extends ISchemaTypeIdentifier {\r\n readonly schemaItemType: SchemaItemType;\r\n readonly schemaItemKey: SchemaItemKey;\r\n readonly typeIdentifier: AnySchemaItemTypeIdentifier;\r\n}\r\n\r\n/**\r\n * Interface that defines the data needed to identify an EC Class.\r\n * @alpha\r\n */\r\nexport interface IClassIdentifier extends ISchemaTypeIdentifier {\r\n readonly schemaItemType: ECClassSchemaItems;\r\n readonly schemaItemKey: SchemaItemKey;\r\n readonly typeIdentifier: SchemaTypeIdentifiers.ClassIdentifier;\r\n}\r\n\r\n/**\r\n * Interface that defines the data needed to identify an EC Property.\r\n * @alpha\r\n */\r\nexport interface IPropertyIdentifier extends ISchemaTypeIdentifier {\r\n readonly fullName: string;\r\n readonly ecClass: ClassId;\r\n readonly typeName?: PropertyTypeName;\r\n readonly typeIdentifier: SchemaTypeIdentifiers.PropertyIdentifier;\r\n}\r\n\r\n/**\r\n * Interface that defines the data needed to identify an Enumerator.\r\n * @alpha\r\n */\r\ninterface IEnumeratorIdentifier extends ISchemaTypeIdentifier {\r\n readonly enumeratorType: string;\r\n readonly enumeration: SchemaItemKey;\r\n readonly enumerationType: string;\r\n readonly typeIdentifier: SchemaTypeIdentifiers.EnumeratorIdentifier;\r\n}\r\n\r\n/**\r\n * Interface that defines the data needed to identify a CustomAttribute.\r\n * @alpha\r\n */\r\nexport interface ICustomAttributeIdentifier extends ISchemaTypeIdentifier {\r\n readonly containerFullName: string;\r\n readonly typeIdentifier: SchemaTypeIdentifiers.CustomAttributeIdentifier;\r\n}\r\n\r\n/**\r\n * Interface that defines the data needed to identify a RelationshipConstraint.\r\n * @alpha\r\n */\r\nexport interface IRelationshipConstraintIdentifier extends ISchemaTypeIdentifier {\r\n readonly relationshipKey: SchemaItemKey;\r\n readonly typeIdentifier: SchemaTypeIdentifiers.RelationshipConstraintIdentifier;\r\n}\r\n\r\n/**\r\n * An ISchemaIdentifier implementation to identify Schemas\r\n * @alpha\r\n */\r\nexport class SchemaId implements ISchemaIdentifier {\r\n public readonly typeIdentifier = SchemaTypeIdentifiers.SchemaIdentifier;\r\n public readonly name: string;\r\n public readonly schemaKey: SchemaKey;\r\n constructor(schemaKey: SchemaKey) {\r\n this.name = schemaKey.name;\r\n this.schemaKey = schemaKey;\r\n }\r\n}\r\n\r\n/**\r\n * An ISchemItemIdentifier implementation to identify SchemaItems\r\n * @alpha\r\n */\r\nexport class SchemaItemId implements ISchemaItemIdentifier {\r\n public readonly typeIdentifier: AnySchemaItemTypeIdentifier;\r\n public readonly name: string;\r\n public readonly schemaKey: SchemaKey;\r\n public readonly schemaItemType: SchemaItemType;\r\n public readonly schemaItemKey: SchemaItemKey;\r\n\r\n constructor(schemaItemType: SchemaItemType, schemaItemKeyOrName: SchemaItemKey | string, schemaKey?: SchemaKey) {\r\n if (typeof(schemaItemKeyOrName) === \"string\") {\r\n if (!schemaKey)\r\n throw new Error(\"schemaKey if required if the specified schemaItem the name of the schema item.\");\r\n\r\n this.schemaKey = schemaKey!;\r\n this.schemaItemKey = new SchemaItemKey(schemaItemKeyOrName, schemaKey);\r\n } else {\r\n this.schemaKey = schemaItemKeyOrName.schemaKey;\r\n this.schemaItemKey = schemaItemKeyOrName;\r\n }\r\n\r\n this.schemaItemType = schemaItemType;\r\n this.name = this.schemaItemKey.fullName;\r\n this.typeIdentifier = SchemaTypeIdentifiers.SchemaItemIdentifier;\r\n }\r\n}\r\n\r\n/**\r\n * An IClassIdentifier implementation to identify Class instances.\r\n * @alpha\r\n */\r\nexport class ClassId extends SchemaItemId implements IClassIdentifier {\r\n public override readonly typeIdentifier = SchemaTypeIdentifiers.ClassIdentifier;\r\n public override readonly schemaItemType: ECClassSchemaItems;\r\n constructor(schemaItemType: ECClassSchemaItems, schemaItemKeyOrName: SchemaItemKey | string, schemaKey?: SchemaKey) {\r\n super(schemaItemType, schemaItemKeyOrName, schemaKey);\r\n this.schemaItemType = schemaItemType;\r\n }\r\n}\r\n\r\n/**\r\n * An IPropertyIdentifier implementation to identify Property instances.\r\n * @alpha\r\n */\r\nexport class PropertyId implements IPropertyIdentifier {\r\n public readonly typeIdentifier = SchemaTypeIdentifiers.PropertyIdentifier;\r\n public readonly name: string;\r\n public readonly fullName: string;\r\n public readonly ecClass: ClassId;\r\n public readonly schemaKey: SchemaKey;\r\n public readonly typeName?: PropertyTypeName;\r\n\r\n constructor(schemaItemType: ECClassSchemaItems, classKey: SchemaItemKey, property: Property | string, typeName?: PropertyTypeName) {\r\n this.name = property instanceof Property ? property.name : property;\r\n this.fullName = property instanceof Property ? property.fullName : `${classKey.name}.${property}`;\r\n this.ecClass = new ClassId(schemaItemType, classKey);\r\n this.schemaKey = classKey.schemaKey;\r\n this.typeName = typeName;\r\n }\r\n}\r\n\r\n/**\r\n * An IEnumeratorIdentifier implementation to identify Enumerator instances.\r\n * @alpha\r\n */\r\nexport class EnumeratorId implements IEnumeratorIdentifier{\r\n public readonly typeIdentifier = SchemaTypeIdentifiers.EnumeratorIdentifier;\r\n public readonly enumeration: SchemaItemKey;\r\n public readonly enumerationType: string;\r\n public readonly enumeratorType: string;\r\n public readonly name: string;\r\n public readonly schemaKey: SchemaKey;\r\n\r\n constructor(enumerator: AnyEnumerator | string, enumeration: Enumeration) {\r\n this.enumeration = enumeration.key;\r\n this.enumerationType = enumeration.type ? primitiveTypeToString(enumeration.type): \"string\";\r\n this.enumeratorType = getEnumeratorType(enumeration ?? PrimitiveType.String, enumerator);\r\n this.name = typeof(enumerator) === \"string\" ? enumerator : enumerator.name;\r\n this.schemaKey = enumeration.schema.schemaKey;\r\n }\r\n}\r\n\r\n/**\r\n * An ICustomAttributeIdentifier implementation to identify CustomAttribute instances.\r\n * @alpha\r\n */\r\nexport class CustomAttributeId implements ICustomAttributeIdentifier {\r\n public readonly typeIdentifier = SchemaTypeIdentifiers.CustomAttributeIdentifier;\r\n public readonly name: string;\r\n public readonly schemaKey: SchemaKey;\r\n public readonly containerFullName: string;\r\n constructor(name: string, container: CustomAttributeContainerProps) {\r\n this.name = name;\r\n this.schemaKey = container.schema.schemaKey;\r\n this.containerFullName = container.fullName;\r\n }\r\n}\r\n\r\n/**\r\n * An IRelationshipConstraintIdentifier implementation to identify RelationshipConstraints.\r\n * @alpha\r\n */\r\nexport class RelationshipConstraintId implements IRelationshipConstraintIdentifier {\r\n public readonly typeIdentifier = SchemaTypeIdentifiers.RelationshipConstraintIdentifier;\r\n public readonly name: string;\r\n public readonly relationshipKey: SchemaItemKey;\r\n public readonly schemaKey: SchemaKey;\r\n constructor(constraint: RelationshipConstraint) {\r\n this.name = constraint.isSource ? \"Source\" : \"Target\";\r\n this.relationshipKey = constraint.relationshipClass.key;\r\n this.schemaKey = this.relationshipKey.schemaKey;\r\n }\r\n}\r\n\r\n/**\r\n * An exception class for the ecschema-editing API. Contains identifiers for schema types involved in the\r\n * exception. An example being SchemaItemId which contains the name of the SchemaItem, SchemaItemKey, SchemaItemType, etc.\r\n * Typically will contain an innerError of type SchemaEditingError containing the identifier of the schema item that\r\n * caused the exception. The containing error instance will identify the method called (identified by the errorNumber)\r\n * and the identifier of the schema item being modified/created.\r\n * @alpha\r\n */\r\nexport class SchemaEditingError extends Error {\r\n private _ruleViolations?: AnyDiagnostic[];\r\n private _schemaKey: SchemaKey;\r\n\r\n /**\r\n * Constructs a new SchemaEditingError instance.\r\n * @param errorNumber The unique ECEditingStatus code identifying the error.\r\n * @param identifier The identifier instance containing information about the EC object involved with the exception.\r\n * @param innerError The SchemaEditingError containing the identifier of the EC object that caused the initial exception.\r\n * @param ruleViolations Will contain EC rule violations of type [[AnyDiagnostic]] for exceptions with the error code ECEditingStatus.RuleViolation.\r\n * @param message Optional error message. Most messages on automatically generated by this class based on the ECEditingStatus code.\r\n */\r\n public constructor(public readonly errorNumber: ECEditingStatus, public readonly identifier: AnyIdentifier, public readonly innerError?: AnyEditingError, ruleViolations?: AnyDiagnostic[], message?: string) {\r\n super(message);\r\n this._ruleViolations = ruleViolations;\r\n this._schemaKey = identifier.schemaKey,\r\n this.generateMessage();\r\n }\r\n\r\n /**\r\n * Gets the SchemaId instance.\r\n * @throws Error if the identifier is not an instance of SchemaId.\r\n */\r\n private get _schemaId(): SchemaId {\r\n if (this.identifier.typeIdentifier !== SchemaTypeIdentifiers.SchemaIdentifier)\r\n throw new Error(\"identifier is not a SchemaId.\");\r\n return this.identifier as SchemaId;\r\n }\r\n\r\n /**\r\n * Gets the SchemaItemId instance.\r\n * @throws Error if the identifier is not an instance of SchemaItemId.\r\n */\r\n private get _schemaItemId(): SchemaItemId {\r\n if (this.isSchemaItemIdentifier(this.identifier))\r\n throw new Error(\"identifier is not a SchemaItemId.\");\r\n return this.identifier as SchemaItemId;\r\n }\r\n\r\n /**\r\n * Gets the ClassId instance.\r\n * @throws Error if the identifier is not an instance of ClassId.\r\n */\r\n private get _classId(): ClassId {\r\n if (this.identifier.typeIdentifier !== SchemaTypeIdentifiers.ClassIdentifier)\r\n throw new Error(\"identifier is not a ClassId.\");\r\n return this.identifier as ClassId;\r\n }\r\n\r\n /**\r\n * Gets the PropertyId instance.\r\n * @throws Error if the identifier is not an instance of PropertyId.\r\n */\r\n private get _propertyId(): PropertyId {\r\n if (this.identifier.typeIdentifier !== SchemaTypeIdentifiers.PropertyIdentifier)\r\n throw new Error(\"identifier is not a PropertyId.\");\r\n return this.identifier;\r\n }\r\n\r\n /**\r\n * Gets the EnumeratorId instance.\r\n * @throws Error if the identifier is not an instance of EnumeratorId.\r\n */\r\n private get _enumeratorId(): EnumeratorId {\r\n if (this.identifier.typeIdentifier !== SchemaTypeIdentifiers.EnumeratorIdentifier)\r\n throw new Error(\"identifier is not a EnumerationId.\");\r\n return this.identifier as EnumeratorId;\r\n }\r\n\r\n /**\r\n * Gets the CustomAttributeId instance.\r\n * @throws Error if the identifier is not an instance of CustomAttributeId.\r\n */\r\n private get _customAttributeId(): CustomAttributeId {\r\n if (this.identifier.typeIdentifier !== SchemaTypeIdentifiers.CustomAttributeIdentifier)\r\n throw new Error(\"identifier is not a CustomAttributeId.\");\r\n return this.identifier;\r\n }\r\n\r\n /**\r\n * Gets the RelationshipConstraintId instance.\r\n * @throws Error if the identifier is not an instance of RelationshipConstraintId.\r\n */\r\n private get _relationshipConstraintId(): RelationshipConstraintId {\r\n if (this.identifier.typeIdentifier !== SchemaTypeIdentifiers.RelationshipConstraintIdentifier)\r\n throw new Error(\"identifier is not a RelationshipConstraintId.\");\r\n return this.identifier;\r\n }\r\n\r\n /** Gets rule violations that were reported during validation. Returns an array of [[AnyDiagnostic]] if\r\n * the errorNumber is ECEditingStatus.RuleViolation, otherwise undefined.\r\n */\r\n public get ruleViolations(): AnyDiagnostic[] | undefined {\r\n return this._ruleViolations;\r\n }\r\n\r\n /**\r\n * Returns a readable string containing the ECEditingStatus along with the error message. Any\r\n * innerError will also be appended.\r\n * @returns\r\n */\r\n public toDebugString(): string {\r\n let innerMessage = \"\";\r\n if (this.innerError) {\r\n if (this.innerError instanceof SchemaEditingError)\r\n innerMessage = ` Inner error: ${this.innerError.toDebugString()}`;\r\n else\r\n innerMessage = ` Inner error: ${this.innerError.message}`;\r\n }\r\n return this._appendMessage(`ECEditingStatus.${ECEditingStatus[this.errorNumber]}`) + innerMessage;\r\n }\r\n\r\n private generateMessage() {\r\n if (this.message)\r\n return;\r\n\r\n switch(this.errorNumber) {\r\n case ECEditingStatus.SchemaNotFound:\r\n this.message = `Schema Key ${this._schemaKey.toString(true)} could not be found in the context.`;\r\n return;\r\n case ECEditingStatus.SchemaItemNotFound:\r\n this.message = `${this._schemaItemId.schemaItemType} ${this._schemaItemId.name} could not be found in the schema ${this._schemaKey.name}.`;\r\n return;\r\n case ECEditingStatus.SchemaItemNotFoundInContext:\r\n this.message = `${this._schemaItemId.schemaItemType} ${this._schemaItemId.name} could not be found in the schema context.`;\r\n return;\r\n case ECEditingStatus.InvalidSchemaItemType:\r\n this.message = `Expected ${this._schemaItemId.name} to be of type ${this._schemaItemId.schemaItemType}.`;\r\n return;\r\n case ECEditingStatus.SchemaItemNameNotSpecified:\r\n this.message = `Could not create a new ${this._schemaItemId.schemaItemType} in schema ${this._schemaKey.name}. No name was supplied within props.`;\r\n return;\r\n case ECEditingStatus.SchemaItemNameAlreadyExists:\r\n this.message = `${this._schemaItemId.schemaItemType} ${this._schemaItemId.name} already exists in the schema ${this._schemaKey.name}.`;\r\n return;\r\n case ECEditingStatus.RuleViolation:\r\n this.message = this._getRuleViolationMessage();\r\n return;\r\n case ECEditingStatus.PropertyNotFound:\r\n this.message = `An ECProperty with the name ${this._propertyId.name} could not be found in the class ${this._propertyId.ecClass.name}.`;\r\n return;\r\n case ECEditingStatus.PropertyAlreadyExists:\r\n this.message = `An ECProperty with the name ${this._propertyId.name} already exists in the class ${this._propertyId.ecClass.name}.`;\r\n return;\r\n case ECEditingStatus.InvalidPropertyType:\r\n this.message = `Expected property ${this._propertyId.name} to be of type ${this._propertyId.typeName}.`;\r\n return;\r\n case ECEditingStatus.BaseClassIsNotElement:\r\n this.message = `Expected base class ${this._schemaItemId.name} to derive from BisCore.Element.`;\r\n return;\r\n case ECEditingStatus.BaseClassIsNotElementUniqueAspect:\r\n this.message = `Expected base class ${this._schemaItemId.name} to derive from BisCore.ElementUniqueAspect.`;\r\n return;\r\n case ECEditingStatus.BaseClassIsNotElementMultiAspect:\r\n this.message = `Expected base class ${this._schemaItemId.name} to derive from BisCore.ElementMultiAspect.`;\r\n return;\r\n case ECEditingStatus.InvalidFormatUnitsSpecified:\r\n this.message = `The specified Format unit ${this._schemaItemId.name} is not of type Unit or InvertedUnit`;\r\n return;\r\n case ECEditingStatus.InvalidEnumeratorType:\r\n this.message = `The Enumeration ${this._enumeratorId.enumeration.fullName} has type ${this._enumeratorId.enumerationType}, while Enumerator ${this._enumeratorId.name} has type ${this._enumeratorId.enumeratorType}.`;\r\n return;\r\n case ECEditingStatus.EnumeratorDoesNotExist:\r\n this.message = `Enumerator ${this._enumeratorId.name} does not exists in Enumeration ${this._enumeratorId.enumeration.name}.`;\r\n return;\r\n case ECEditingStatus.InvalidECName:\r\n this.message = `Could not rename class ${this._schemaItemId.name} because the specified name is not a valid ECName.`;\r\n return;\r\n case ECEditingStatus.InvalidSchemaAlias:\r\n this.message = `Could not set the alias for schema ${this._schemaKey.name} because the specified alias is not a valid ECName.`;\r\n return;\r\n default:\r\n this.message = this._createTaskErrorMessage();\r\n }\r\n }\r\n\r\n private _appendMessage(e: string) {\r\n return this.message ? `${e}: ${this.message}` : e;\r\n }\r\n\r\n private _getRuleViolationMessage(): string {\r\n if (!this._ruleViolations)\r\n return \"\";\r\n\r\n let violations = \"\";\r\n for (const diagnostic of this._ruleViolations) {\r\n violations += `${diagnostic.code}: ${diagnostic.messageText}\\r\\n`;\r\n }\r\n\r\n switch (this.identifier.typeIdentifier) {\r\n case SchemaTypeIdentifiers.SchemaIdentifier:\r\n return `Rule violations occurred from Schema ${this._schemaId.name}: ${violations}`;\r\n case SchemaTypeIdentifiers.SchemaItemIdentifier:\r\n return `Rule violations occurred from ${this._schemaItemId.schemaItemType} ${this._schemaItemId.name}: ${violations}`;\r\n case SchemaTypeIdentifiers.ClassIdentifier:\r\n return `Rule violations occurred from ${this._schemaItemId.schemaItemType} ${this._schemaItemId.name}: ${violations}`;\r\n case SchemaTypeIdentifiers.CustomAttributeIdentifier:\r\n return `Rule violations occurred from CustomAttribute ${this._customAttributeId.name}, container ${this._customAttributeId.containerFullName}: ${violations}`;\r\n case SchemaTypeIdentifiers.RelationshipConstraintIdentifier:\r\n return `Rule violations occurred from ${this._relationshipConstraintId.name} constraint of RelationshipClass ${this._relationshipConstraintId.relationshipKey.fullName}: ${violations}`;\r\n default:\r\n throw new Error (\"Invalid identifier.\");\r\n }\r\n }\r\n\r\n private _createTaskErrorMessage() {\r\n // Make sure we have an inner error or else it is not a task error\r\n if (!this.innerError)\r\n return \"\";\r\n\r\n switch (this.identifier.typeIdentifier) {\r\n case SchemaTypeIdentifiers.SchemaIdentifier:\r\n case SchemaTypeIdentifiers.SchemaItemIdentifier:\r\n case SchemaTypeIdentifiers.ClassIdentifier:\r\n case SchemaTypeIdentifiers.RelationshipConstraintIdentifier:\r\n return `While performing task '${ECEditingStatus[this.errorNumber]}' an error occurred editing ${this.identifier.typeIdentifier} ${this.identifier.name}.`;\r\n case SchemaTypeIdentifiers.PropertyIdentifier:\r\n return `While performing task '${ECEditingStatus[this.errorNumber]}' an error occurred editing ${this.identifier.typeIdentifier} ${this.identifier.fullName}.`;\r\n default:\r\n throw new Error (\"Invalid identifier.\");\r\n }\r\n }\r\n\r\n private isSchemaItemIdentifier(identifier: AnyIdentifier) {\r\n if (identifier.typeIdentifier !== SchemaTypeIdentifiers.SchemaItemIdentifier &&\r\n identifier.typeIdentifier !== SchemaTypeIdentifiers.ClassIdentifier)\r\n return true;\r\n\r\n return false;\r\n }\r\n}\r\n\r\nfunction getEnumeratorType(enumeration: Enumeration, enumerator: AnyEnumerator | string) {\r\n if (typeof(enumerator) === \"string\") {\r\n return enumeration.type ? primitiveTypeToString(enumeration.type) : \"string\";\r\n }\r\n\r\n return typeof(enumerator.value) === \"string\" ? \"string\" : \"int\";\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Formats.js","sourceRoot":"","sources":["../../../src/Editing/Formats.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAAgK;AAIhK,2CAAgF;AAChF,+CAA4C;AAE5C;;;GAGG;AACH,MAAa,OAAQ,SAAQ,yBAAW;IACtC,IAAuB,aAAa;QAClC,OAAO,0BAAM,CAAC;IAChB,CAAC;IAED,YAAmB,YAAiC;QAClD,KAAK,CAAC,kCAAc,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,CAAkB,CAAC;YAE3J,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACxB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;oBACzB,MAAM,QAAQ,GAAI,MAAM,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;oBAC5E,IAAI,CAAC,QAAQ,E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AAG,MAAM,IAAI,CAAC,yBAAyB,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,8BAAkB,CAAC,2BAAe,CAAC,yBAAyB,EAAE,IAAI,wBAAY,CAAC,IAAI,CAAC,cAAc,EAAE,WAAW,CAAC,IAAK,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;QAClJ,CAAC;IACH,CAAC;CACF;AAtDD,0BAsDC","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 { DelayedPromiseWithProps, 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) ) {\n newFormat.addUnit(new DelayedPromiseWithProps(unitItem.key, async () => unitItem));\n } else if (InvertedUnit.isInvertedUnit(unitItem) ) {\n newFormat.addUnit(new DelayedPromiseWithProps(unitItem.key, async () => unitItem));\n } else {\n throw new SchemaEditingError(ECEditingStatus.InvalidFormatUnitsSpecified, new SchemaItemId(unitItem.schemaItemType, unitItem.key));\n }\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"]}
1
+ {"version":3,"file":"Formats.js","sourceRoot":"","sources":["../../../src/Editing/Formats.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAAgK;AAIhK,2CAAgF;AAChF,+CAA4C;AAE5C;;;GAGG;AACH,MAAa,OAAQ,SAAQ,yBAAW;IACtC,IAAuB,aA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BACN,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,2BAA2B,EAAE,IAAI,wBAAY,CAAC,QAAQ,CAAC,cAAc,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;oBACrI,CAAC;gBACH,CAAC;YACH,CAAC;YAED,IAAI,YAAY;gBACd,SAAS,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;YAE1C,iEAAiE;YACjE,SAAS,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YACpC,OAAO,SAAS,CAAC,GAAG,CAAC;QACvB,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YAChB,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,sBAAsB,EAAE,IAAI,wBAAY,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;QAClI,CAAC;IACH,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,eAAe,CAAC,SAAoB,EAAE,WAAkC;QACnF,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,yBAAyB,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,8BAAkB,CAAC,2BAAe,CAAC,yBAAyB,EAAE,IAAI,wBAAY,CAAC,IAAI,CAAC,cAAc,EAAE,WAAW,CAAC,IAAK,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;QAClJ,CAAC;IACH,CAAC;CACF;AAtDD,0BAsDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Editing\r\n */\r\n\r\nimport { DelayedPromiseWithProps, Format, InvertedUnit, SchemaItemFormatProps, SchemaItemKey, SchemaItemType, SchemaKey, Unit } from \"@itwin/ecschema-metadata\";\r\nimport { FormatType } from \"@itwin/core-quantity\";\r\nimport { SchemaContextEditor } from \"./Editor\";\r\nimport { MutableFormat } from \"./Mutable/MutableFormat\";\r\nimport { ECEditingStatus, SchemaEditingError, SchemaItemId } from \"./Exception\";\r\nimport { SchemaItems } from \"./SchemaItems\";\r\n\r\n/**\r\n * @alpha\r\n * A class allowing you to create schema items of type Format.\r\n */\r\nexport class Formats extends SchemaItems {\r\n protected override get itemTypeClass(): typeof Format {\r\n return Format;\r\n }\r\n\r\n public constructor(schemaEditor: SchemaContextEditor) {\r\n super(SchemaItemType.Format, schemaEditor);\r\n }\r\n\r\n public async create(schemaKey: SchemaKey, name: string, formatType: FormatType, displayLabel?: string, units?: SchemaItemKey[]): Promise<SchemaItemKey> {\r\n try {\r\n const newFormat = await this.createSchemaItem<Format>(schemaKey, this.schemaItemType, (schema) => schema.createFormat.bind(schema), name) as MutableFormat;\r\n\r\n if (units !== undefined) {\r\n for (const unit of units) {\r\n const unitItem = await this.schemaEditor.schemaContext.getSchemaItem(unit);\r\n if (!unitItem) {\r\n throw new SchemaEditingError(ECEditingStatus.SchemaItemNotFoundInContext, new SchemaItemId(SchemaItemType.Unit, unit));\r\n }\r\n\r\n if (Unit.isUnit(unitItem) ) {\r\n newFormat.addUnit(new DelayedPromiseWithProps(unitItem.key, async () => unitItem));\r\n } else if (InvertedUnit.isInvertedUnit(unitItem) ) {\r\n newFormat.addUnit(new DelayedPromiseWithProps(unitItem.key, async () => unitItem));\r\n } else {\r\n throw new SchemaEditingError(ECEditingStatus.InvalidFormatUnitsSpecified, new SchemaItemId(unitItem.schemaItemType, unitItem.key));\r\n }\r\n }\r\n }\r\n\r\n if (displayLabel)\r\n newFormat.setDisplayLabel(displayLabel);\r\n\r\n // TODO: Handle the setting of format traits, separators, etc....\r\n newFormat.setFormatType(formatType);\r\n return newFormat.key;\r\n } catch (e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFailed, new SchemaItemId(this.schemaItemType, name, schemaKey), e);\r\n }\r\n }\r\n\r\n /**\r\n * Creates a format through a SchemaItemFormatProps.\r\n * @param schemaKey a SchemaKey of the Schema that will house the new object.\r\n * @param relationshipProps a json object that will be used to populate the new RelationshipClass. Needs a name value passed in.\r\n */\r\n public async createFromProps(schemaKey: SchemaKey, formatProps: SchemaItemFormatProps): Promise<SchemaItemKey> {\r\n try {\r\n const newFormat = await this.createSchemaItemFromProps(schemaKey, this.schemaItemType, (schema) => schema.createFormat.bind(schema), formatProps);\r\n return newFormat.key;\r\n } catch (e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFromProps, new SchemaItemId(this.schemaItemType, formatProps.name!, schemaKey), e);\r\n }\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"InvertedUnits.js","sourceRoot":"","sources":["../../../src/Editing/InvertedUnits.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAGkC;AAElC,uEAAoE;AACpE,2CAAgF;AAChF,+CAA4C;AAE5C;;;GAGG;AACH,MAAa,aAAc,SAAQ,yBAAW;IAC5C,IAAuB,aAAa;QAClC,OAAO,gCAAY,CAAC;IACtB,CAAC;IAED,YAAmB,YAAiC;QAClD,KAAK,CAAC,kCAAc,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IACnD,CAAC;IACM,KAAK,CAAC,MAAM,CAAC,SAAoB,EAAE,IAAY,EAAE,cAA6B,EAAE,aAA4B,EAAE,YAAqB;QACxI,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAe,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC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":["/*---------------------------------------------------------------------------------------------\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"]}
1
+ {"version":3,"file":"InvertedUnits.js","sourceRoot":"","sources":["../../../src/Editing/InvertedUnits.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAGkC;AAElC,uEAAoE;AACpE,2CAAgF;AAChF,+CAA4C;AAE5C;;;GAGG;AACH,MAAa,aAAc,SAAQ,yBAAW;IAC5C,IAAuB,aAAa;QAClC,OAAO,gCAAY,CAAC;IACtB,CAAC;IAED,YAAmB,YAAiC;QACl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AA4B,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;QAC5H,CAAC;QAAC,OAAM,CAAM,EAAE,CAAC;YACf,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,aAAa,EAAE,IAAI,wBAAY,CAAC,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC;QACzH,CAAC;IACH,CAAC;CACF;AAvDD,sCAuDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Editing\r\n */\r\n\r\nimport {\r\n DelayedPromiseWithProps, InvertedUnit, InvertedUnitProps, SchemaItemKey,\r\n SchemaItemType, SchemaKey, Unit, UnitSystem,\r\n} from \"@itwin/ecschema-metadata\";\r\nimport { SchemaContextEditor } from \"./Editor\";\r\nimport { MutableInvertedUnit } from \"./Mutable/MutableInvertedUnit\";\r\nimport { ECEditingStatus, SchemaEditingError, SchemaItemId } from \"./Exception\";\r\nimport { SchemaItems } from \"./SchemaItems\";\r\n\r\n/**\r\n * @alpha\r\n * A class allowing you to create schema items of type Inverted Unit.\r\n */\r\nexport class InvertedUnits extends SchemaItems {\r\n protected override get itemTypeClass(): typeof InvertedUnit {\r\n return InvertedUnit;\r\n }\r\n\r\n public constructor(schemaEditor: SchemaContextEditor) {\r\n super(SchemaItemType.InvertedUnit, schemaEditor);\r\n }\r\n public async create(schemaKey: SchemaKey, name: string, invertsUnitKey: SchemaItemKey, unitSystemKey: SchemaItemKey, displayLabel?: string): Promise<SchemaItemKey> {\r\n try {\r\n const newUnit = await this.createSchemaItem<InvertedUnit>(schemaKey, this.schemaItemType, (schema) => schema.createInvertedUnit.bind(schema), name) as MutableInvertedUnit;\r\n\r\n const invertsUnit = await this.getSchemaItem(invertsUnitKey, Unit);\r\n newUnit.setInvertsUnit(new DelayedPromiseWithProps<SchemaItemKey, Unit>(invertsUnitKey, async () => invertsUnit));\r\n\r\n const unitSystem = await this.getSchemaItem(unitSystemKey, UnitSystem);\r\n newUnit.setUnitSystem(new DelayedPromiseWithProps<SchemaItemKey, UnitSystem>(unitSystemKey, async () => unitSystem));\r\n\r\n if (displayLabel)\r\n newUnit.setDisplayLabel(displayLabel);\r\n\r\n return newUnit.key;\r\n } catch (e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFailed, new SchemaItemId(this.schemaItemType, name, schemaKey), e);\r\n }\r\n }\r\n\r\n public async createFromProps(schemaKey: SchemaKey, invertedUnitProps: InvertedUnitProps): Promise<SchemaItemKey> {\r\n try {\r\n const newUnit = await this.createSchemaItemFromProps(schemaKey, this.schemaItemType, (schema) => schema.createInvertedUnit.bind(schema), invertedUnitProps);\r\n return newUnit.key;\r\n } catch (e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFromProps, new SchemaItemId(this.schemaItemType, invertedUnitProps.name!, schemaKey), e);\r\n }\r\n }\r\n\r\n public async setInvertsUnit(invertedUnitKey: SchemaItemKey, invertsUnitKey: SchemaItemKey): Promise<void> {\r\n try {\r\n const invertedUnit = await this.getSchemaItem(invertedUnitKey, MutableInvertedUnit);\r\n const invertsUnit = await this.getSchemaItem(invertedUnitKey, Unit);\r\n invertedUnit.setInvertsUnit(new DelayedPromiseWithProps<SchemaItemKey, Unit>(invertsUnitKey, async () => invertsUnit));\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.SetInvertsUnit, new SchemaItemId(this.schemaItemType, invertedUnitKey), e);\r\n }\r\n }\r\n\r\n public async setUnitSystem(invertedUnitKey: SchemaItemKey, unitSystemKey: SchemaItemKey): Promise<void> {\r\n try {\r\n const invertedUnit = await this.getSchemaItem(invertedUnitKey, MutableInvertedUnit);\r\n const unitSystem = await this.getSchemaItem(unitSystemKey, UnitSystem);\r\n invertedUnit.setUnitSystem(new DelayedPromiseWithProps<SchemaItemKey, UnitSystem>(unitSystemKey, async () => unitSystem));\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.SetUnitSystem, new SchemaItemId(this.schemaItemType, invertedUnitKey), e);\r\n }\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"KindOfQuantities.js","sourceRoot":"","sources":["../../../src/Editing/KindOfQuantities.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAIkC;AAElC,2EAAwE;AACxE,2CAAgF;AAChF,+CAA4C;AAE5C;;;GAGG;AACH,MAAa,gBAAiB,SAAQ,yBAAW;IAC/C,IAAuB,aAAa;QAClC,OAAO,kCAAc,CAAC;IACxB,CAAC;IACD,YAAmB,YAAiC;QAClD,KAAK,CAAC,kCAAc,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IACrD,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,SAAoB,EAAE,IAAY,EAAE,kBAAiC,EAAE,YAAqB;QAC9G,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAiB,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAA0B,CAAC;YACjL,MAAM,eAAe,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;YAC5E,IAAI,eAAe,KAAK,SAAS,IAAI,CAAC,CAAC,wBAAI,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,gCAAY,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;gBACnH,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,kBAAkB,EAAE,IAAI,wBAAY,CAAC,kCAAc,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC;YAE9H,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AAY,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,0BAAM,CAAC,CAAC;YAC9D,OAAO,IAAI,kCAAc,CAAC,YAAY,EAAE,SAAS,EAAE,kBAAkB,CAAC,CAAC;QACzE,CAAC;QAAC,OAAM,CAAM,EAAE,CAAC;YACf,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,oBAAoB,EAAE,IAAI,wBAAY,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QACvH,CAAC;IACH,CAAC;CACF;AA/ED,4CA+EC","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, LazyLoadedInvertedUnit, LazyLoadedUnit, 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.setPersistenceUnit(new DelayedPromiseWithProps(persistenceUnit.key, async () => persistenceUnit));\n }\n\n if (InvertedUnit.isInvertedUnit(persistenceUnit)) {\n koqItem.setPersistenceUnit(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(new DelayedPromiseWithProps(presentationFormat.key, async () => 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<[LazyLoadedUnit | LazyLoadedInvertedUnit, 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"]}
1
+ {"version":3,"file":"KindOfQuantities.js","sourceRoot":"","sources":["../../../src/Editing/KindOfQuantities.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAIkC;AAElC,2EAAwE;AACxE,2CAAgF;AAChF,+CAA4C;AAE5C;;;GAGG;AACH,MAAa,gBAAiB,SAAQ,yBAAW;IAC/C,IAAuB,aAAa;QAClC,OAAO,kCAAc,CAAC;IACxB,CAAC;IACD,YAAmB,YAAiC;QAClD,KAAK,CAAC,kCAAc,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IACrD,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,SAAoB,EAAE,IAAY,EAAE,kBAAiC,EAAE,YAAqB;QAC9G,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAiB,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,MA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C;YACH,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,6CAAqB,CAAC,CAAC;YAC/E,cAAc,CAAC,qBAAqB,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;QAClE,CAAC;QAAC,OAAM,CAAM,EAAE,CAAC;YACf,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,uBAAuB,EAAE,IAAI,wBAAY,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QAC1H,CAAC;IACH,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,oBAAoB,CAAC,MAAqB,EAAE,SAAkB,EAAE,kBAAyF;QACpK,IAAI,CAAC;YACH,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,0BAAM,CAAC,CAAC;YAC9D,OAAO,IAAI,kCAAc,CAAC,YAAY,EAAE,SAAS,EAAE,kBAAkB,CAAC,CAAC;QACzE,CAAC;QAAC,OAAM,CAAM,EAAE,CAAC;YACf,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,oBAAoB,EAAE,IAAI,wBAAY,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QACvH,CAAC;IACH,CAAC;CACF;AA/ED,4CA+EC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Editing\r\n */\r\n\r\nimport {\r\n DelayedPromiseWithProps,\r\n Format, InvertedUnit, KindOfQuantity, KindOfQuantityProps, LazyLoadedInvertedUnit, LazyLoadedUnit, OverrideFormat,\r\n SchemaItemKey, SchemaItemType, SchemaKey, Unit,\r\n} from \"@itwin/ecschema-metadata\";\r\nimport { SchemaContextEditor } from \"./Editor\";\r\nimport { MutableKindOfQuantity } from \"./Mutable/MutableKindOfQuantity\";\r\nimport { ECEditingStatus, SchemaEditingError, SchemaItemId } from \"./Exception\";\r\nimport { SchemaItems } from \"./SchemaItems\";\r\n\r\n/**\r\n * @alpha\r\n * A class allowing you to create schema items of type KindOfQuantity.\r\n */\r\nexport class KindOfQuantities extends SchemaItems {\r\n protected override get itemTypeClass(): typeof KindOfQuantity {\r\n return KindOfQuantity;\r\n }\r\n public constructor(schemaEditor: SchemaContextEditor) {\r\n super(SchemaItemType.KindOfQuantity, schemaEditor);\r\n }\r\n\r\n public async create(schemaKey: SchemaKey, name: string, persistenceUnitKey: SchemaItemKey, displayLabel?: string): Promise<SchemaItemKey> {\r\n try {\r\n const koqItem = await this.createSchemaItem<KindOfQuantity>(schemaKey, this.schemaItemType, (schema) => schema.createKindOfQuantity.bind(schema), name) as MutableKindOfQuantity;\r\n const persistenceUnit = await koqItem.schema.lookupItem(persistenceUnitKey);\r\n if (persistenceUnit === undefined || (!Unit.isUnit(persistenceUnit) && !InvertedUnit.isInvertedUnit(persistenceUnit)))\r\n throw new SchemaEditingError(ECEditingStatus.SchemaItemNotFound, new SchemaItemId(SchemaItemType.Unit, persistenceUnitKey));\r\n\r\n if (Unit.isUnit(persistenceUnit)) {\r\n koqItem.setPersistenceUnit(new DelayedPromiseWithProps(persistenceUnit.key, async () => persistenceUnit));\r\n }\r\n\r\n if (InvertedUnit.isInvertedUnit(persistenceUnit)) {\r\n koqItem.setPersistenceUnit(new DelayedPromiseWithProps(persistenceUnit.key, async () => persistenceUnit));\r\n }\r\n\r\n if (displayLabel !== undefined) {\r\n koqItem.setDisplayLabel(displayLabel);\r\n }\r\n\r\n return koqItem.key;\r\n } catch (e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFailed, new SchemaItemId(this.schemaItemType, name, schemaKey), e);\r\n }\r\n }\r\n\r\n public async createFromProps(schemaKey: SchemaKey, koqProps: KindOfQuantityProps): Promise<SchemaItemKey> {\r\n try {\r\n const koqItem = await this.createSchemaItemFromProps(schemaKey, this.schemaItemType, (schema) => schema.createKindOfQuantity.bind(schema), koqProps);\r\n return koqItem.key;\r\n } catch (e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFromProps, new SchemaItemId(this.schemaItemType, koqProps.name!, schemaKey), e);\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param koqKey A schemaItemKey of the editing KindOfQuantity.\r\n * @param format A schemaItemKey of a Format.\r\n * @param isDefault .is set to false when not explicitly passed.\r\n */\r\n public async addPresentationFormat(koqKey: SchemaItemKey, format: SchemaItemKey, isDefault: boolean = false): Promise<void> {\r\n try {\r\n const kindOfQuantity = await this.getSchemaItem(koqKey, MutableKindOfQuantity);\r\n const presentationFormat = await this.getSchemaItem(format, Format);\r\n kindOfQuantity.addPresentationFormat(new DelayedPromiseWithProps(presentationFormat.key, async () => presentationFormat), isDefault);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.AddPresentationUnit, new SchemaItemId(this.schemaItemType, koqKey), e);\r\n }\r\n }\r\n\r\n public async addPresentationOverrideFormat(koqKey: SchemaItemKey, overrideFormat: OverrideFormat, isDefault: boolean = false): Promise<void> {\r\n try {\r\n const kindOfQuantity = await this.getSchemaItem(koqKey, MutableKindOfQuantity);\r\n kindOfQuantity.addPresentationFormat(overrideFormat, isDefault);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.AddPresentationOverride, new SchemaItemId(this.schemaItemType, koqKey), e);\r\n }\r\n }\r\n\r\n /**\r\n * @param parent A SchemaItemKey of the parent Format.\r\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.\r\n */\r\n public async createFormatOverride(parent: SchemaItemKey, precision?: number, unitLabelOverrides?: Array<[LazyLoadedUnit | LazyLoadedInvertedUnit, string | undefined]>): Promise<OverrideFormat> {\r\n try {\r\n const parentFormat = await this.getSchemaItem(parent, Format);\r\n return new OverrideFormat(parentFormat, precision, unitLabelOverrides);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateFormatOverride, new SchemaItemId(this.schemaItemType, parent), e);\r\n }\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Mixins.js","sourceRoot":"","sources":["../../../src/Editing/Mixins.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAGkC;AAElC,2CAAwC;AACxC,yDAAsD;AAEtD,6CAAoD;AACpD,2CAA2E;AAE3E;;;GAGG;AACH,MAAa,MAAO,SAAQ,qBAAS;IACnC,IAAuB,aAAa;QAClC,OAAO,yBAAK,CAAC;IACf,CAAC;IAED,YAAmB,YAAiC;QAClD,KAAK,CAAC,kCAAc,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;IAC5C,CAAC;IAED;;OAEG;IACa,oBAAoB,GAAG,IAAI,iCAAoB,CAAC,kCAAc,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,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,YAAY,CAAiB,CAAC;YACrK,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,+BAAW,CAAC,CAAC;YACtE,QAAQ,CAAC,YAAY,CAAC,IAAI,2CAAuB,CAA6B,YAAY,CAAC,GAAG,EAAE,KAAK,IAAI,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;YAE3H,IAAI,YAAY;gBACd,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;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,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;QAChH,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,wBAAwB,CAAC,QAAuB,EAAE,IAAY,EAAE,YAAwC,EAAE,SAAqC;QAC1J,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,2BAAY,CAAC,CAAC;YAC/D,MAAM,KAAK,CAAC,wBAAwB,CAAC,IAAI,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;QACtE,CAAC;QAAC,OAAM,CAAM,EAAE,CAAC;YACf,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,wBAAwB,EAAE,IAAI,mBAAO,CAAC,kCAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;QACzH,CAAC;IACH,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,iCAAiC,CAAC,QAAuB,EAAE,eAAwC;QAC9G,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,2BAAY,CAAC,CAAC;YAC/D,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,wBAAwB,CAAC,eAAe,CAAC,IAAI,EAAE,eAAe,CAAC,gBAAgB,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;YACzI,MAAM,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;QAC3C,CAAC;QAAC,OAAM,CAAM,EAAE,CAAC;YACf,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,iCAAiC,EAAE,IAAI,mBAAO,CAAC,kCAAc,CAAC,iBAAiB,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;QAC9I,CAAC;IACH,CAAC;CACF;AA5ED,wBA4EC","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"]}
1
+ {"version":3,"file":"Mixins.js","sourceRoot":"","sources":["../../../src/Editing/Mixins.ts"],"names":[],"mappings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EAAE,2BAAY,CAAC,CAAC;YAC/D,MAAM,KAAK,CAAC,wBAAwB,CAAC,IAAI,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;QACtE,CAAC;QAAC,OAAM,CAAM,EAAE,CAAC;YACf,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,wBAAwB,EAAE,IAAI,mBAAO,CAAC,kCAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;QACzH,CAAC;IACH,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,iCAAiC,CAAC,QAAuB,EAAE,eAAwC;QAC9G,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,2BAAY,CAAC,CAAC;YAC/D,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,wBAAwB,CAAC,eAAe,CAAC,IAAI,EAAE,eAAe,CAAC,gBAAgB,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;YACzI,MAAM,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;QAC3C,CAAC;QAAC,OAAM,CAAM,EAAE,CAAC;YACf,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,iCAAiC,EAAE,IAAI,mBAAO,CAAC,kCAAc,CAAC,iBAAiB,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;QAC9I,CAAC;IACH,CAAC;CACF;AA5ED,wBA4EC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Editing\r\n */\r\n\r\nimport {\r\n DelayedPromiseWithProps, EntityClass, Mixin, MixinProps, NavigationPropertyProps, RelationshipClass,\r\n SchemaItemKey, SchemaItemType, SchemaKey, StrengthDirection,\r\n} from \"@itwin/ecschema-metadata\";\r\nimport { SchemaContextEditor } from \"./Editor\";\r\nimport { ECClasses } from \"./ECClasses\";\r\nimport { MutableMixin } from \"./Mutable/MutableMixin\";\r\nimport { MutableEntityClass } from \"./Mutable/MutableEntityClass\";\r\nimport { NavigationProperties } from \"./Properties\";\r\nimport { ClassId, ECEditingStatus, SchemaEditingError } from \"./Exception\";\r\n\r\n/**\r\n * @alpha\r\n * A class extending ECClasses allowing you to create schema items of type Mixin.\r\n */\r\nexport class Mixins extends ECClasses {\r\n protected override get itemTypeClass(): typeof Mixin {\r\n return Mixin;\r\n }\r\n\r\n public constructor(schemaEditor: SchemaContextEditor) {\r\n super(SchemaItemType.Mixin, schemaEditor);\r\n }\r\n\r\n /**\r\n * Allows access for editing of NavigationProperty attributes.\r\n */\r\n public readonly navigationProperties = new NavigationProperties(SchemaItemType.Mixin, this.schemaEditor);\r\n\r\n public async create(schemaKey: SchemaKey, name: string, appliesTo: SchemaItemKey, displayLabel?: string, baseClassKey?: SchemaItemKey): Promise<SchemaItemKey> {\r\n try {\r\n const newClass = await this.createClass<Mixin>(schemaKey, this.schemaItemType, (schema) => schema.createMixinClass.bind(schema), name, baseClassKey) as MutableMixin;\r\n const newAppliesTo = await this.getSchemaItem(appliesTo, EntityClass);\r\n newClass.setAppliesTo(new DelayedPromiseWithProps<SchemaItemKey, EntityClass>(newAppliesTo.key, async () => newAppliesTo));\r\n\r\n if (displayLabel)\r\n newClass.setDisplayLabel(displayLabel);\r\n\r\n return newClass.key;\r\n } catch (e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFailed, new ClassId(this.schemaItemType, name, schemaKey), e);\r\n }\r\n }\r\n\r\n /**\r\n * Creates a MixinClass through a MixinProps.\r\n * @param schemaKey a SchemaKey of the Schema that will house the new object.\r\n * @param mixinProps a json object that will be used to populate the new MixinClass. Needs a name value passed in.\r\n */\r\n public async createFromProps(schemaKey: SchemaKey, mixinProps: MixinProps): Promise<SchemaItemKey> {\r\n try {\r\n const newClass = await this.createSchemaItemFromProps(schemaKey, this.schemaItemType, (schema) => schema.createMixinClass.bind(schema), mixinProps);\r\n return newClass.key;\r\n } catch (e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFromProps, new ClassId(this.schemaItemType, mixinProps.name!, schemaKey), e);\r\n }\r\n }\r\n\r\n public async addMixin(entityKey: SchemaItemKey, mixinKey: SchemaItemKey): Promise<void> {\r\n try {\r\n const entity = await this.getSchemaItem(entityKey, EntityClass);\r\n const mixin = await this.getSchemaItem(mixinKey, Mixin);\r\n (entity as MutableEntityClass).addMixin(mixin);\r\n } catch(e: any){\r\n throw new SchemaEditingError(ECEditingStatus.AddMixin, new ClassId(SchemaItemType.EntityClass, entityKey), e);\r\n }\r\n }\r\n\r\n public async createNavigationProperty(mixinKey: SchemaItemKey, name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<void> {\r\n try {\r\n const mixin = await this.getSchemaItem(mixinKey, MutableMixin);\r\n await mixin.createNavigationProperty(name, relationship, direction);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateNavigationProperty, new ClassId(SchemaItemType.Mixin, mixinKey), e);\r\n }\r\n }\r\n\r\n /**\r\n * Creates a Navigation Property through a NavigationPropertyProps.\r\n * @param classKey a SchemaItemKey of the Mixin that will house the new property.\r\n * @param navigationProps a json object that will be used to populate the new Navigation Property.\r\n */\r\n public async createNavigationPropertyFromProps(classKey: SchemaItemKey, navigationProps: NavigationPropertyProps): Promise<void> {\r\n try {\r\n const mixin = await this.getSchemaItem(classKey, MutableMixin);\r\n const property = await mixin.createNavigationProperty(navigationProps.name, navigationProps.relationshipName, navigationProps.direction);\r\n await property.fromJSON(navigationProps);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateNavigationPropertyFromProps, new ClassId(SchemaItemType.RelationshipClass, classKey), e);\r\n }\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MutableArrayProperty.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableArrayProperty.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAAyD;AAEzD;;;GAGG;AACH,MAAsB,oBAAqB,SAAQ,iCAAa;CAG/D;AAHD,oDAGC","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"]}
1
+ {"version":3,"file":"MutableArrayProperty.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableArrayProperty.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAAyD;AAEzD;;;GAGG;AACH,MAAsB,oBAAqB,SAAQ,iCAAa;CAG/D;AAHD,oDAGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport { ArrayProperty } from \"@itwin/ecschema-metadata\";\r\n\r\n/**\r\n * @internal\r\n * An abstract class used for schema editing.\r\n */\r\nexport abstract class MutableArrayProperty extends ArrayProperty {\r\n public abstract override setMinOccurs(minOccurs: number): void;\r\n public abstract override setMaxOccurs(maxOccurs: number): void;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MutableCAClass.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableCAClass.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA8F;AAE9F;;;GAGG;AACH,MAAsB,cAAe,SAAQ,wCAAoB;CAGhE;AAHD,wCAGC","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"]}
1
+ {"version":3,"file":"MutableCAClass.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableCAClass.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA8F;AAE9F;;;GAGG;AACH,MAAsB,cAAe,SAAQ,wCAAoB;CAGhE;AAHD,wCAGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport { CustomAttributeClass, CustomAttributeContainerType } from \"@itwin/ecschema-metadata\";\r\n\r\n/**\r\n * @internal\r\n * An abstract class used for Schema editing.\r\n */\r\nexport abstract class MutableCAClass extends CustomAttributeClass {\r\n public abstract override setAppliesTo(containerType: CustomAttributeContainerType): void;\r\n public abstract override setDisplayLabel(displayLabel: string): void;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MutableClass.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableClass.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAGkC;AAElC;;;GAGG;AACH,MAAsB,kBAAmB,SAAQ,+BAAW;CAE3D;AAFD,gDAEC;AAED;;;GAGG;AACH,MAAsB,YAAa,SAAQ,2BAAO;CA+BjD;AA/BD,oCA+BC","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"]}
1
+ {"version":3,"file":"MutableClass.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableClass.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAGkC;AAElC;;;GAGG;AACH,MAAsB,kBAAmB,SAAQ,+BAAW;CAE3D;AAFD,gDAEC;AAED;;;GAGG;AACH,MAAsB,YAAa,SAAQ,2BAAO;CA+BjD;AA/BD,oCA+BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport {\r\n CustomAttribute, ECClass, ECClassModifier, Enumeration, EnumerationArrayProperty, EnumerationProperty, LazyLoadedECClass, PrimitiveArrayProperty,\r\n PrimitiveProperty, PrimitiveType, Property, StructArrayProperty, StructClass, StructProperty,\r\n} from \"@itwin/ecschema-metadata\";\r\n\r\n/**\r\n * @internal\r\n * An abstract class used for schema editing.\r\n */\r\nexport abstract class MutableStructClass extends StructClass {\r\n public abstract override setDisplayLabel(displayLabel: string): void;\r\n}\r\n\r\n/**\r\n * Hackish approach that works like a \"friend class\" so we can access protected members without making them public.\r\n * @internal\r\n */\r\nexport abstract class MutableClass extends ECClass {\r\n public abstract override setBaseClass(baseClass: LazyLoadedECClass | undefined): Promise<void>;\r\n public abstract override addCustomAttribute(customAttribute: CustomAttribute): void;\r\n public abstract override setModifier(modifier: ECClassModifier): void;\r\n public abstract override setName(name: string): void;\r\n public abstract override setDescription(description: string): void;\r\n public abstract override setDisplayLabel(displayLabel: string): void;\r\n public abstract override createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty>;\r\n public abstract override createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty>;\r\n public abstract override createPrimitiveProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;\r\n\r\n public abstract override createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty;\r\n public abstract override createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty;\r\n public abstract override createPrimitivePropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;\r\n\r\n public abstract override createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty>;\r\n public abstract override createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty>;\r\n public abstract override createPrimitiveArrayProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;\r\n\r\n public abstract override createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty;\r\n public abstract override createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty;\r\n public abstract override createPrimitiveArrayPropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;\r\n\r\n public abstract override createStructProperty(name: string, structType: string | StructClass): Promise<StructProperty>;\r\n public abstract override createStructPropertySync(name: string, structType: string | StructClass): StructProperty;\r\n\r\n public abstract override createStructArrayProperty(name: string, structType: string | StructClass): Promise<StructArrayProperty>;\r\n public abstract override createStructArrayPropertySync(name: string, structType: string | StructClass): StructArrayProperty;\r\n\r\n public abstract override deleteProperty(name: string): Promise<void>;\r\n public abstract override deletePropertySync(name: string): void;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MutableConstant.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableConstant.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA0E;AAE1E;;;GAGG;AACH,MAAsB,eAAgB,SAAQ,4BAAQ;CAOrD;AAPD,0CAOC","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"]}
1
+ {"version":3,"file":"MutableConstant.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableConstant.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA0E;AAE1E;;;GAGG;AACH,MAAsB,eAAgB,SAAQ,4BAAQ;CAOrD;AAPD,0CAOC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport { Constant, LazyLoadedPhenomenon } from \"@itwin/ecschema-metadata\";\r\n\r\n/**\r\n * @internal\r\n * An abstract class used for schema editing.\r\n */\r\nexport abstract class MutableConstant extends Constant {\r\n public abstract override setPhenomenon(phenomenon: LazyLoadedPhenomenon): void;\r\n public abstract override setDefinition(definition: string): void;\r\n public abstract override setNumerator(numerator: number): void;\r\n public abstract override setDenominator(denominator: number): void;\r\n public abstract override setDisplayLabel(displayLabel: string): void;\r\n public abstract override setDescription(description: string): void;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MutableEntityClass.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableEntityClass.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAGkC;AAElC;;;GAGG;AACH,MAAsB,kBAAmB,SAAQ,+BAAW;CAK3D;AALD,gDAKC","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 EntityClass, Mixin, NavigationProperty,\n RelationshipClass, StrengthDirection,\n} from \"@itwin/ecschema-metadata\";\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 MutableEntityClass extends EntityClass {\n public abstract override addMixin(mixin: Mixin): any;\n public abstract override createNavigationProperty(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty>;\n public abstract override createNavigationPropertySync(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty;\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n"]}
1
+ {"version":3,"file":"MutableEntityClass.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableEntityClass.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAGkC;AAElC;;;GAGG;AACH,MAAsB,kBAAmB,SAAQ,+BAAW;CAK3D;AALD,gDAKC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport {\r\n EntityClass, Mixin, NavigationProperty,\r\n RelationshipClass, StrengthDirection,\r\n} from \"@itwin/ecschema-metadata\";\r\n\r\n/**\r\n * Hackish approach that works like a \"friend class\" so we can access protected members without making them public.\r\n * @internal\r\n */\r\nexport abstract class MutableEntityClass extends EntityClass {\r\n public abstract override addMixin(mixin: Mixin): any;\r\n public abstract override createNavigationProperty(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty>;\r\n public abstract override createNavigationPropertySync(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty;\r\n public abstract override setDisplayLabel(displayLabel: string): void;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MutableEnumeration.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableEnumeration.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAAsE;AAEtE;;GAEG;AACH,MAAsB,kBAAmB,SAAQ,+BAAW;CAK3D;AALD,gDAKC","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 { AnyEnumerator, Enumeration } from \"@itwin/ecschema-metadata\";\n\n/** @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableEnumeration extends Enumeration {\n public abstract override addEnumerator(enumerator: AnyEnumerator): void;\n public abstract override setIsStrict(isStrict: boolean): void;\n public abstract override setDisplayLabel(displayLabel: string): void;\n public abstract override setDescription(description: string): void;\n}\n"]}
1
+ {"version":3,"file":"MutableEnumeration.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableEnumeration.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAAsE;AAEtE;;GAEG;AACH,MAAsB,kBAAmB,SAAQ,+BAAW;CAK3D;AALD,gDAKC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport { AnyEnumerator, Enumeration } from \"@itwin/ecschema-metadata\";\r\n\r\n/** @internal\r\n * An abstract class used for schema editing.\r\n */\r\nexport abstract class MutableEnumeration extends Enumeration {\r\n public abstract override addEnumerator(enumerator: AnyEnumerator): void;\r\n public abstract override setIsStrict(isStrict: boolean): void;\r\n public abstract override setDisplayLabel(displayLabel: string): void;\r\n public abstract override setDescription(description: string): void;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MutableFormat.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableFormat.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA0F;AAG1F;;;GAGG;AACH,MAAsB,aAAc,SAAQ,0BAAM;CAmBjD;AAnBD,sCAmBC","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 { Format, LazyLoadedInvertedUnit, LazyLoadedUnit } from \"@itwin/ecschema-metadata\";\nimport { FormatTraits, FormatType, ScientificType, ShowSignOption } from \"@itwin/core-quantity\";\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableFormat extends Format {\n public abstract override addUnit(unit: LazyLoadedUnit | LazyLoadedInvertedUnit, label?: string): void;\n public abstract override setPrecision(precision: number): void;\n public abstract override setFormatType(formatType: FormatType): void;\n public abstract override setRoundFactor(roundFactor: number): void;\n public abstract override setShowSignOption(signOption: ShowSignOption): void;\n public abstract override setDecimalSeparator(separator: string): void;\n public abstract override setThousandSeparator(separator: string): void;\n public abstract override setUomSeparator(separator: string): void;\n public abstract override setStationSeparator(separator: string): void;\n public abstract override setMinWidth(minWidth: number): void;\n public abstract override setStationOffsetSize(stationOffsetSize: number): void;\n public abstract override setStationBaseFactor(stationBaseFactor: number): void;\n public abstract override setScientificType(scientificType: ScientificType): void;\n public abstract override setSpacer(spacer: string): void;\n public abstract override setIncludeZero(includeZero: boolean): void;\n public abstract override setFormatTraits(formatTraits: FormatTraits): void;\n public abstract override setUnits(units: Array<[LazyLoadedUnit | LazyLoadedInvertedUnit, string | undefined]>): void;\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n"]}
1
+ {"version":3,"file":"MutableFormat.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableFormat.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA0F;AAG1F;;;GAGG;AACH,MAAsB,aAAc,SAAQ,0BAAM;CAmBjD;AAnBD,sCAmBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport { Format, LazyLoadedInvertedUnit, LazyLoadedUnit } from \"@itwin/ecschema-metadata\";\r\nimport { FormatTraits, FormatType, ScientificType, ShowSignOption } from \"@itwin/core-quantity\";\r\n\r\n/**\r\n * @internal\r\n * An abstract class used for schema editing.\r\n */\r\nexport abstract class MutableFormat extends Format {\r\n public abstract override addUnit(unit: LazyLoadedUnit | LazyLoadedInvertedUnit, label?: string): void;\r\n public abstract override setPrecision(precision: number): void;\r\n public abstract override setFormatType(formatType: FormatType): void;\r\n public abstract override setRoundFactor(roundFactor: number): void;\r\n public abstract override setShowSignOption(signOption: ShowSignOption): void;\r\n public abstract override setDecimalSeparator(separator: string): void;\r\n public abstract override setThousandSeparator(separator: string): void;\r\n public abstract override setUomSeparator(separator: string): void;\r\n public abstract override setStationSeparator(separator: string): void;\r\n public abstract override setMinWidth(minWidth: number): void;\r\n public abstract override setStationOffsetSize(stationOffsetSize: number): void;\r\n public abstract override setStationBaseFactor(stationBaseFactor: number): void;\r\n public abstract override setScientificType(scientificType: ScientificType): void;\r\n public abstract override setSpacer(spacer: string): void;\r\n public abstract override setIncludeZero(includeZero: boolean): void;\r\n public abstract override setFormatTraits(formatTraits: FormatTraits): void;\r\n public abstract override setUnits(units: Array<[LazyLoadedUnit | LazyLoadedInvertedUnit, string | undefined]>): void;\r\n public abstract override setDisplayLabel(displayLabel: string): void;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MutableInvertedUnit.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableInvertedUnit.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA8F;AAE9F;;;GAGG;AACH,MAAsB,mBAAoB,SAAQ,gCAAY;CAI7D;AAJD,kDAIC","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 { InvertedUnit, LazyLoadedUnit, LazyLoadedUnitSystem } from \"@itwin/ecschema-metadata\";\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableInvertedUnit extends InvertedUnit {\n public abstract override setInvertsUnit(invertsUnit: LazyLoadedUnit): void;\n public abstract override setUnitSystem(unitSystem: LazyLoadedUnitSystem): void;\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n"]}
1
+ {"version":3,"file":"MutableInvertedUnit.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableInvertedUnit.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA8F;AAE9F;;;GAGG;AACH,MAAsB,mBAAoB,SAAQ,gCAAY;CAI7D;AAJD,kDAIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport { InvertedUnit, LazyLoadedUnit, LazyLoadedUnitSystem } from \"@itwin/ecschema-metadata\";\r\n\r\n/**\r\n * @internal\r\n * An abstract class used for schema editing.\r\n */\r\nexport abstract class MutableInvertedUnit extends InvertedUnit {\r\n public abstract override setInvertsUnit(invertsUnit: LazyLoadedUnit): void;\r\n public abstract override setUnitSystem(unitSystem: LazyLoadedUnitSystem): void;\r\n public abstract override setDisplayLabel(displayLabel: string): void;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MutableKindOfQuantity.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableKindOfQuantity.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA4I;AAE5I;;;GAGG;AACH,MAAsB,qBAAsB,SAAQ,kCAAc;CAOjE;AAPD,sDAOC","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 { Format, KindOfQuantity, LazyLoadedFormat, LazyLoadedInvertedUnit, LazyLoadedUnit, OverrideFormat } from \"@itwin/ecschema-metadata\";\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableKindOfQuantity extends KindOfQuantity {\n public abstract override addPresentationFormat(format: LazyLoadedFormat | OverrideFormat, isDefault: boolean): void;\n public abstract override createFormatOverride(parent: Format, precision?: number, unitLabelOverrides?: Array<[LazyLoadedUnit | LazyLoadedInvertedUnit, string | undefined]>): OverrideFormat;\n public abstract override setDisplayLabel(displayLabel: string): void;\n public abstract override setDescription(description: string): void;\n public abstract override setPersistenceUnit(value: LazyLoadedUnit | LazyLoadedInvertedUnit | undefined): void;\n public abstract override setRelativeError(relativeError: number): void;\n}\n"]}
1
+ {"version":3,"file":"MutableKindOfQuantity.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableKindOfQuantity.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA4I;AAE5I;;;GAGG;AACH,MAAsB,qBAAsB,SAAQ,kCAAc;CAOjE;AAPD,sDAOC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport { Format, KindOfQuantity, LazyLoadedFormat, LazyLoadedInvertedUnit, LazyLoadedUnit, OverrideFormat } from \"@itwin/ecschema-metadata\";\r\n\r\n/**\r\n * @internal\r\n * An abstract class used for schema editing.\r\n */\r\nexport abstract class MutableKindOfQuantity extends KindOfQuantity {\r\n public abstract override addPresentationFormat(format: LazyLoadedFormat | OverrideFormat, isDefault: boolean): void;\r\n public abstract override createFormatOverride(parent: Format, precision?: number, unitLabelOverrides?: Array<[LazyLoadedUnit | LazyLoadedInvertedUnit, string | undefined]>): OverrideFormat;\r\n public abstract override setDisplayLabel(displayLabel: string): void;\r\n public abstract override setDescription(description: string): void;\r\n public abstract override setPersistenceUnit(value: LazyLoadedUnit | LazyLoadedInvertedUnit | undefined): void;\r\n public abstract override setRelativeError(relativeError: number): void;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MutableMixin.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableMixin.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAAkI;AAElI;;;GAGG;AACH,MAAsB,YAAa,SAAQ,yBAAK;CAK/C;AALD,oCAKC","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 { LazyLoadedEntityClass, Mixin, NavigationProperty, RelationshipClass, StrengthDirection } from \"@itwin/ecschema-metadata\";\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableMixin extends Mixin {\n public abstract override setAppliesTo(entityClass: LazyLoadedEntityClass): void;\n public abstract override createNavigationProperty(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty>;\n public abstract override createNavigationPropertySync(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty;\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n"]}
1
+ {"version":3,"file":"MutableMixin.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableMixin.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAAkI;AAElI;;;GAGG;AACH,MAAsB,YAAa,SAAQ,yBAAK;CAK/C;AALD,oCAKC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport { LazyLoadedEntityClass, Mixin, NavigationProperty, RelationshipClass, StrengthDirection } from \"@itwin/ecschema-metadata\";\r\n\r\n/**\r\n * @internal\r\n * An abstract class used for schema editing.\r\n */\r\nexport abstract class MutableMixin extends Mixin {\r\n public abstract override setAppliesTo(entityClass: LazyLoadedEntityClass): void;\r\n public abstract override createNavigationProperty(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty>;\r\n public abstract override createNavigationPropertySync(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty;\r\n public abstract override setDisplayLabel(displayLabel: string): void;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MutableNavigationProperty.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableNavigationProperty.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA8D;AAE9D;;;GAGG;AACH,MAAsB,yBAA0B,SAAQ,sCAAkB;CACzE;AADD,8DACC","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 { NavigationProperty } from \"@itwin/ecschema-metadata\";\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableNavigationProperty extends NavigationProperty {\n}\n"]}
1
+ {"version":3,"file":"MutableNavigationProperty.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableNavigationProperty.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA8D;AAE9D;;;GAGG;AACH,MAAsB,yBAA0B,SAAQ,sCAAkB;CACzE;AADD,8DACC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport { NavigationProperty } from \"@itwin/ecschema-metadata\";\r\n\r\n/**\r\n * @internal\r\n * An abstract class used for schema editing.\r\n */\r\nexport abstract class MutableNavigationProperty extends NavigationProperty {\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MutablePhenomenon.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutablePhenomenon.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAAsD;AAEtD;;;GAGG;AACH,MAAsB,iBAAkB,SAAQ,8BAAU;CAIzD;AAJD,8CAIC","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 { Phenomenon } from \"@itwin/ecschema-metadata\";\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutablePhenomenon extends Phenomenon {\n public abstract override setDefinition(definition: string): Promise<void>;\n public abstract override setDisplayLabel(displayLabel: string): void;\n public abstract override setDescription(description: string): void;\n}\n"]}
1
+ {"version":3,"file":"MutablePhenomenon.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutablePhenomenon.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAAsD;AAEtD;;;GAGG;AACH,MAAsB,iBAAkB,SAAQ,8BAAU;CAIzD;AAJD,8CAIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport { Phenomenon } from \"@itwin/ecschema-metadata\";\r\n\r\n/**\r\n * @internal\r\n * An abstract class used for schema editing.\r\n */\r\nexport abstract class MutablePhenomenon extends Phenomenon {\r\n public abstract override setDefinition(definition: string): Promise<void>;\r\n public abstract override setDisplayLabel(displayLabel: string): void;\r\n public abstract override setDescription(description: string): void;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MutablePrimitiveOrEnumProperty.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutablePrimitiveOrEnumProperty.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAAuE;AAEvE;;;GAGG;AACH,MAAsB,kCAAmC,SAAQ,+CAA2B;CAM3F;AAND,gFAMC","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 { PrimitiveOrEnumPropertyBase } from \"@itwin/ecschema-metadata\";\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutablePrimitiveOrEnumPropertyBase extends PrimitiveOrEnumPropertyBase {\n public abstract override setExtendedTypeName(extendedTypeName: string): void;\n public abstract override setMinLength(minLength: number): void;\n public abstract override setMaxLength(maxLength: number): void;\n public abstract override setMinValue(minValue: number): void;\n public abstract override setMaxValue(maxValue: number): void;\n}\n"]}
1
+ {"version":3,"file":"MutablePrimitiveOrEnumProperty.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutablePrimitiveOrEnumProperty.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAAuE;AAEvE;;;GAGG;AACH,MAAsB,kCAAmC,SAAQ,+CAA2B;CAM3F;AAND,gFAMC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport { PrimitiveOrEnumPropertyBase } from \"@itwin/ecschema-metadata\";\r\n\r\n/**\r\n * @internal\r\n * An abstract class used for schema editing.\r\n */\r\nexport abstract class MutablePrimitiveOrEnumPropertyBase extends PrimitiveOrEnumPropertyBase {\r\n public abstract override setExtendedTypeName(extendedTypeName: string): void;\r\n public abstract override setMinLength(minLength: number): void;\r\n public abstract override setMaxLength(maxLength: number): void;\r\n public abstract override setMinValue(minValue: number): void;\r\n public abstract override setMaxValue(maxValue: number): void;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MutableProperty.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableProperty.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAAmI;AAEnI;;;GAGG;AACH,MAAsB,eAAgB,SAAQ,4BAAQ;CASrD;AATD,0CASC","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 { CustomAttribute, ECName, LazyLoadedKindOfQuantity, LazyLoadedPropertyCategory, Property } from \"@itwin/ecschema-metadata\";\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableProperty extends Property {\n public abstract override setName(name: ECName): void;\n public abstract override setDescription(description: string): void;\n public abstract override setLabel(label: string): void;\n public abstract override setIsReadOnly(isReadOnly: boolean): void;\n public abstract override setPriority(priority: number): void;\n public abstract override setCategory(category: LazyLoadedPropertyCategory): void;\n public abstract override addCustomAttribute(customAttribute: CustomAttribute): void;\n public abstract override setKindOfQuantity(kindOfQuantity: LazyLoadedKindOfQuantity): void;\n}\n"]}
1
+ {"version":3,"file":"MutableProperty.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableProperty.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAAmI;AAEnI;;;GAGG;AACH,MAAsB,eAAgB,SAAQ,4BAAQ;CASrD;AATD,0CASC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport { CustomAttribute, ECName, LazyLoadedKindOfQuantity, LazyLoadedPropertyCategory, Property } from \"@itwin/ecschema-metadata\";\r\n\r\n/**\r\n * @internal\r\n * An abstract class used for schema editing.\r\n */\r\nexport abstract class MutableProperty extends Property {\r\n public abstract override setName(name: ECName): void;\r\n public abstract override setDescription(description: string): void;\r\n public abstract override setLabel(label: string): void;\r\n public abstract override setIsReadOnly(isReadOnly: boolean): void;\r\n public abstract override setPriority(priority: number): void;\r\n public abstract override setCategory(category: LazyLoadedPropertyCategory): void;\r\n public abstract override addCustomAttribute(customAttribute: CustomAttribute): void;\r\n public abstract override setKindOfQuantity(kindOfQuantity: LazyLoadedKindOfQuantity): void;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MutablePropertyCategory.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutablePropertyCategory.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA4D;AAE5D;;;GAGG;AACH,MAAsB,uBAAwB,SAAQ,oCAAgB;CAIrE;AAJD,0DAIC","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 { PropertyCategory } from \"@itwin/ecschema-metadata\";\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutablePropertyCategory extends PropertyCategory {\n public abstract override setPriority(priority: number): void;\n public abstract override setDisplayLabel(displayLabel: string): void;\n public abstract override setDescription(description: string): void;\n}\n"]}
1
+ {"version":3,"file":"MutablePropertyCategory.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutablePropertyCategory.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA4D;AAE5D;;;GAGG;AACH,MAAsB,uBAAwB,SAAQ,oCAAgB;CAIrE;AAJD,0DAIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport { PropertyCategory } from \"@itwin/ecschema-metadata\";\r\n\r\n/**\r\n * @internal\r\n * An abstract class used for schema editing.\r\n */\r\nexport abstract class MutablePropertyCategory extends PropertyCategory {\r\n public abstract override setPriority(priority: number): void;\r\n public abstract override setDisplayLabel(displayLabel: string): void;\r\n public abstract override setDescription(description: string): void;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MutableRelationshipClass.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableRelationshipClass.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA6O;AAE7O;;;GAGG;AACH,MAAsB,6BAA8B,SAAQ,0CAAsB;CAQjF;AARD,sEAQC;AAED;;;GAGG;AACH,MAAsB,wBAAyB,SAAQ,qCAAiB;IACtE,IAAoB,MAAM,KAAK,OAAO,IAAI,CAAC,OAAwC,CAAC,CAAC,CAAC;IACtF,IAAoB,MAAM,KAAK,OAAO,IAAI,CAAC,OAAwC,CAAC,CAAC,CAAC;CAQvF;AAVD,4DAUC","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 { CustomAttribute, LazyLoadedRelationshipConstraintClass, NavigationProperty, RelationshipClass, RelationshipConstraint, RelationshipEnd, RelationshipMultiplicity, StrengthDirection, StrengthType } from \"@itwin/ecschema-metadata\";\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 MutableRelationshipConstraint extends RelationshipConstraint {\n public abstract override addCustomAttribute(customAttribute: CustomAttribute): void;\n public abstract override removeClass(constraint: LazyLoadedRelationshipConstraintClass): void;\n public abstract override setRoleLabel(roleLabel: string | undefined): void;\n public abstract override setRelationshipEnd(relationshipEnd: RelationshipEnd): void;\n public abstract override setPolymorphic(polymorphic: boolean): void;\n public abstract override setMultiplicity(multiplicity: RelationshipMultiplicity): void;\n public abstract override setAbstractConstraint(abstractConstraint: LazyLoadedRelationshipConstraintClass | undefined): void;\n}\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableRelationshipClass extends RelationshipClass {\n public override get source() { return this._source as MutableRelationshipConstraint; }\n public override get target() { return this._target as MutableRelationshipConstraint; }\n public abstract override setStrength(strength: StrengthType): void;\n public abstract override setStrengthDirection(direction: StrengthDirection): void;\n public abstract override setSourceConstraint(source: RelationshipConstraint): void;\n public abstract override setTargetConstraint(target: RelationshipConstraint): void;\n public abstract override createNavigationProperty(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty>;\n public abstract override createNavigationPropertySync(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty;\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n"]}
1
+ {"version":3,"file":"MutableRelationshipClass.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableRelationshipClass.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA6O;AAE7O;;;GAGG;AACH,MAAsB,6BAA8B,SAAQ,0CAAsB;CAQjF;AARD,sEAQC;AAED;;;GAGG;AACH,MAAsB,wBAAyB,SAAQ,qCAAiB;IACtE,IAAoB,MAAM,KAAK,OAAO,IAAI,CAAC,OAAwC,CAAC,CAAC,CAAC;IACtF,IAAoB,MAAM,KAAK,OAAO,IAAI,CAAC,OAAwC,CAAC,CAAC,CAAC;CAQvF;AAVD,4DAUC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport { CustomAttribute, LazyLoadedRelationshipConstraintClass, NavigationProperty, RelationshipClass, RelationshipConstraint, RelationshipEnd, RelationshipMultiplicity, StrengthDirection, StrengthType } from \"@itwin/ecschema-metadata\";\r\n\r\n/**\r\n * Hackish approach that works like a \"friend class\" so we can access protected members without making them public.\r\n * @internal\r\n */\r\nexport abstract class MutableRelationshipConstraint extends RelationshipConstraint {\r\n public abstract override addCustomAttribute(customAttribute: CustomAttribute): void;\r\n public abstract override removeClass(constraint: LazyLoadedRelationshipConstraintClass): void;\r\n public abstract override setRoleLabel(roleLabel: string | undefined): void;\r\n public abstract override setRelationshipEnd(relationshipEnd: RelationshipEnd): void;\r\n public abstract override setPolymorphic(polymorphic: boolean): void;\r\n public abstract override setMultiplicity(multiplicity: RelationshipMultiplicity): void;\r\n public abstract override setAbstractConstraint(abstractConstraint: LazyLoadedRelationshipConstraintClass | undefined): void;\r\n}\r\n\r\n/**\r\n * @internal\r\n * An abstract class used for schema editing.\r\n */\r\nexport abstract class MutableRelationshipClass extends RelationshipClass {\r\n public override get source() { return this._source as MutableRelationshipConstraint; }\r\n public override get target() { return this._target as MutableRelationshipConstraint; }\r\n public abstract override setStrength(strength: StrengthType): void;\r\n public abstract override setStrengthDirection(direction: StrengthDirection): void;\r\n public abstract override setSourceConstraint(source: RelationshipConstraint): void;\r\n public abstract override setTargetConstraint(target: RelationshipConstraint): void;\r\n public abstract override createNavigationProperty(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty>;\r\n public abstract override createNavigationPropertySync(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty;\r\n public abstract override setDisplayLabel(displayLabel: string): void;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MutableSchema.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableSchema.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAIkC;AAElC;;;;;GAKG;AACH,MAAsB,aAAc,SAAQ,0BAAM;CA0CjD;AA1CD,sCA0CC","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 Constant, CustomAttribute, CustomAttributeClass, ECClassModifier, EntityClass, Enumeration,\n Format, InvertedUnit, KindOfQuantity, Mixin, Phenomenon, PrimitiveType, PropertyCategory,\n RelationshipClass, Schema, SchemaContext, SchemaItem, StructClass, Unit, UnitSystem,\n} from \"@itwin/ecschema-metadata\";\n\n/**\n * Hackish approach that works like a \"friend class\" so we can access protected members without making them public.\n * We cannot put this into Helper.ts and make it non-export, because we are importing Helper.ts from this file, and the circular import\n * would prevent this class from extending Schema.\n * @internal\n */\nexport abstract class MutableSchema extends Schema {\n public abstract override addCustomAttribute(customAttribute: CustomAttribute): void;\n public abstract override createEntityClass(name: string, modifier?: ECClassModifier): Promise<EntityClass>;\n public abstract override createEntityClassSync(name: string, modifier?: ECClassModifier): EntityClass;\n public abstract override createMixinClass(name: string): Promise<Mixin>;\n public abstract override createMixinClassSync(name: string): Mixin;\n public abstract override createStructClass(name: string, modifier?: ECClassModifier): Promise<StructClass>;\n public abstract override createStructClassSync(name: string, modifier?: ECClassModifier): StructClass;\n public abstract override createCustomAttributeClass(name: string, modifier?: ECClassModifier): Promise<CustomAttributeClass>;\n public abstract override createCustomAttributeClassSync(name: string, modifier?: ECClassModifier): CustomAttributeClass;\n public abstract override createRelationshipClass(name: string, modifier?: ECClassModifier): Promise<RelationshipClass>;\n public abstract override createRelationshipClassSync(name: string, modifier?: ECClassModifier): RelationshipClass;\n public abstract override createEnumeration(name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String): Promise<Enumeration>;\n public abstract override createEnumerationSync(name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String): Enumeration;\n public abstract override createKindOfQuantity(name: string): Promise<KindOfQuantity>;\n public abstract override createKindOfQuantitySync(name: string): KindOfQuantity;\n public abstract override createUnit(name: string): Promise<Unit>;\n public abstract override createUnitSync(name: string): Unit;\n public abstract override createConstant(name: string): Promise<Constant>;\n public abstract override createConstantSync(name: string): Constant;\n public abstract override createInvertedUnit(name: string): Promise<InvertedUnit>;\n public abstract override createInvertedUnitSync(name: string): InvertedUnit;\n public abstract override createPhenomenon(name: string): Promise<Phenomenon>;\n public abstract override createPhenomenonSync(name: string): Phenomenon;\n public abstract override createFormat(name: string): Promise<Format>;\n public abstract override createFormatSync(name: string): Format;\n public abstract override createUnitSystem(name: string): Promise<UnitSystem>;\n public abstract override createUnitSystemSync(name: string): UnitSystem;\n public abstract override createPropertyCategory(name: string): Promise<PropertyCategory>;\n public abstract override createPropertyCategorySync(name: string): PropertyCategory;\n public abstract override addItem<T extends SchemaItem>(item: T): void;\n public abstract override addReference(refSchema: Schema): Promise<void>;\n public abstract override addReferenceSync(refSchema: Schema): void;\n public abstract override setContext(schemaContext: SchemaContext): void;\n public abstract override setVersion(readVersion?: number, writeVersion?: number, minorVersion?: number): void;\n public abstract override deleteClass(name: string): Promise<void>;\n public abstract override deleteClassSync(name: string): void;\n public abstract override deleteSchemaItem(name: string): Promise<void>;\n public abstract override deleteSchemaItemSync(name: string): Promise<void>;\n public abstract override setDisplayLabel(displayLabel: string): void;\n public abstract override setDescription(displayLabel: string): void;\n public abstract override setAlias(alias: string): void;\n}\n"]}
1
+ {"version":3,"file":"MutableSchema.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableSchema.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAIkC;AAElC;;;;;GAKG;AACH,MAAsB,aAAc,SAAQ,0BAAM;CA0CjD;AA1CD,sCA0CC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport {\r\n Constant, CustomAttribute, CustomAttributeClass, ECClassModifier, EntityClass, Enumeration,\r\n Format, InvertedUnit, KindOfQuantity, Mixin, Phenomenon, PrimitiveType, PropertyCategory,\r\n RelationshipClass, Schema, SchemaContext, SchemaItem, StructClass, Unit, UnitSystem,\r\n} from \"@itwin/ecschema-metadata\";\r\n\r\n/**\r\n * Hackish approach that works like a \"friend class\" so we can access protected members without making them public.\r\n * We cannot put this into Helper.ts and make it non-export, because we are importing Helper.ts from this file, and the circular import\r\n * would prevent this class from extending Schema.\r\n * @internal\r\n */\r\nexport abstract class MutableSchema extends Schema {\r\n public abstract override addCustomAttribute(customAttribute: CustomAttribute): void;\r\n public abstract override createEntityClass(name: string, modifier?: ECClassModifier): Promise<EntityClass>;\r\n public abstract override createEntityClassSync(name: string, modifier?: ECClassModifier): EntityClass;\r\n public abstract override createMixinClass(name: string): Promise<Mixin>;\r\n public abstract override createMixinClassSync(name: string): Mixin;\r\n public abstract override createStructClass(name: string, modifier?: ECClassModifier): Promise<StructClass>;\r\n public abstract override createStructClassSync(name: string, modifier?: ECClassModifier): StructClass;\r\n public abstract override createCustomAttributeClass(name: string, modifier?: ECClassModifier): Promise<CustomAttributeClass>;\r\n public abstract override createCustomAttributeClassSync(name: string, modifier?: ECClassModifier): CustomAttributeClass;\r\n public abstract override createRelationshipClass(name: string, modifier?: ECClassModifier): Promise<RelationshipClass>;\r\n public abstract override createRelationshipClassSync(name: string, modifier?: ECClassModifier): RelationshipClass;\r\n public abstract override createEnumeration(name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String): Promise<Enumeration>;\r\n public abstract override createEnumerationSync(name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String): Enumeration;\r\n public abstract override createKindOfQuantity(name: string): Promise<KindOfQuantity>;\r\n public abstract override createKindOfQuantitySync(name: string): KindOfQuantity;\r\n public abstract override createUnit(name: string): Promise<Unit>;\r\n public abstract override createUnitSync(name: string): Unit;\r\n public abstract override createConstant(name: string): Promise<Constant>;\r\n public abstract override createConstantSync(name: string): Constant;\r\n public abstract override createInvertedUnit(name: string): Promise<InvertedUnit>;\r\n public abstract override createInvertedUnitSync(name: string): InvertedUnit;\r\n public abstract override createPhenomenon(name: string): Promise<Phenomenon>;\r\n public abstract override createPhenomenonSync(name: string): Phenomenon;\r\n public abstract override createFormat(name: string): Promise<Format>;\r\n public abstract override createFormatSync(name: string): Format;\r\n public abstract override createUnitSystem(name: string): Promise<UnitSystem>;\r\n public abstract override createUnitSystemSync(name: string): UnitSystem;\r\n public abstract override createPropertyCategory(name: string): Promise<PropertyCategory>;\r\n public abstract override createPropertyCategorySync(name: string): PropertyCategory;\r\n public abstract override addItem<T extends SchemaItem>(item: T): void;\r\n public abstract override addReference(refSchema: Schema): Promise<void>;\r\n public abstract override addReferenceSync(refSchema: Schema): void;\r\n public abstract override setContext(schemaContext: SchemaContext): void;\r\n public abstract override setVersion(readVersion?: number, writeVersion?: number, minorVersion?: number): void;\r\n public abstract override deleteClass(name: string): Promise<void>;\r\n public abstract override deleteClassSync(name: string): void;\r\n public abstract override deleteSchemaItem(name: string): Promise<void>;\r\n public abstract override deleteSchemaItemSync(name: string): Promise<void>;\r\n public abstract override setDisplayLabel(displayLabel: string): void;\r\n public abstract override setDescription(displayLabel: string): void;\r\n public abstract override setAlias(alias: string): void;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MutableSchemaItem.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableSchemaItem.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAAoD;AAEpD;;;GAGG;AACH,MAAsB,iBAAkB,SAAQ,8BAAU;CAIzD;AAJD,8CAIC","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 {SchemaItem} from \"@itwin/ecschema-metadata\";\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 MutableSchemaItem extends SchemaItem {\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}\n"]}
1
+ {"version":3,"file":"MutableSchemaItem.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableSchemaItem.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAAoD;AAEpD;;;GAGG;AACH,MAAsB,iBAAkB,SAAQ,8BAAU;CAIzD;AAJD,8CAIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport {SchemaItem} from \"@itwin/ecschema-metadata\";\r\n\r\n/**\r\n * Hackish approach that works like a \"friend class\" so we can access protected members without making them public.\r\n * @internal\r\n */\r\nexport abstract class MutableSchemaItem extends SchemaItem {\r\n public abstract override setName(name: string): void;\r\n public abstract override setDescription(description: string): void;\r\n public abstract override setDisplayLabel(displayLabel: string): void;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MutableStructProperty.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableStructProperty.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA0D;AAE1D;;;GAGG;AACH,MAAsB,qBAAsB,SAAQ,kCAAc;CACjE;AADD,sDACC","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 { StructProperty } from \"@itwin/ecschema-metadata\";\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableStructProperty extends StructProperty {\n}\n"]}
1
+ {"version":3,"file":"MutableStructProperty.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableStructProperty.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA0D;AAE1D;;;GAGG;AACH,MAAsB,qBAAsB,SAAQ,kCAAc;CACjE;AADD,sDACC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport { StructProperty } from \"@itwin/ecschema-metadata\";\r\n\r\n/**\r\n * @internal\r\n * An abstract class used for schema editing.\r\n */\r\nexport abstract class MutableStructProperty extends StructProperty {\r\n}\r\n"]}