@itwin/ecschema-editing 5.0.0-dev.9 → 5.0.0-dev.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +51 -1
- package/lib/cjs/Differencing/Errors.js +6 -0
- package/lib/cjs/Differencing/Errors.js.map +1 -1
- package/lib/cjs/Differencing/SchemaConflicts.d.ts +3 -1
- package/lib/cjs/Differencing/SchemaConflicts.d.ts.map +1 -1
- package/lib/cjs/Differencing/SchemaConflicts.js +2 -0
- package/lib/cjs/Differencing/SchemaConflicts.js.map +1 -1
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.d.ts +4 -3
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.d.ts.map +1 -1
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.js +57 -11
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.js.map +1 -1
- package/lib/cjs/Differencing/SchemaDifference.d.ts +33 -4
- package/lib/cjs/Differencing/SchemaDifference.d.ts.map +1 -1
- package/lib/cjs/Differencing/SchemaDifference.js +55 -5
- package/lib/cjs/Differencing/SchemaDifference.js.map +1 -1
- package/lib/cjs/Differencing/SchemaDifferenceValidator.d.ts +2 -1
- package/lib/cjs/Differencing/SchemaDifferenceValidator.d.ts.map +1 -1
- package/lib/cjs/Differencing/SchemaDifferenceValidator.js +78 -19
- package/lib/cjs/Differencing/SchemaDifferenceValidator.js.map +1 -1
- package/lib/cjs/Differencing/SchemaDifferenceVisitor.d.ts.map +1 -1
- package/lib/cjs/Differencing/SchemaDifferenceVisitor.js +5 -0
- package/lib/cjs/Differencing/SchemaDifferenceVisitor.js.map +1 -1
- package/lib/cjs/Differencing/Utils.js.map +1 -1
- package/lib/cjs/Editing/Constants.d.ts +2 -1
- package/lib/cjs/Editing/Constants.d.ts.map +1 -1
- package/lib/cjs/Editing/Constants.js +4 -1
- package/lib/cjs/Editing/Constants.js.map +1 -1
- package/lib/cjs/Editing/CustomAttributes.d.ts +2 -1
- package/lib/cjs/Editing/CustomAttributes.d.ts.map +1 -1
- package/lib/cjs/Editing/CustomAttributes.js +3 -0
- package/lib/cjs/Editing/CustomAttributes.js.map +1 -1
- package/lib/cjs/Editing/ECClasses.d.ts +6 -1
- package/lib/cjs/Editing/ECClasses.d.ts.map +1 -1
- package/lib/cjs/Editing/ECClasses.js +48 -49
- package/lib/cjs/Editing/ECClasses.js.map +1 -1
- package/lib/cjs/Editing/Editor.d.ts +2 -2
- package/lib/cjs/Editing/Editor.d.ts.map +1 -1
- package/lib/cjs/Editing/Editor.js +32 -21
- package/lib/cjs/Editing/Editor.js.map +1 -1
- package/lib/cjs/Editing/Entities.d.ts +2 -1
- package/lib/cjs/Editing/Entities.d.ts.map +1 -1
- package/lib/cjs/Editing/Entities.js +18 -14
- package/lib/cjs/Editing/Entities.js.map +1 -1
- package/lib/cjs/Editing/Enumerations.d.ts +2 -1
- package/lib/cjs/Editing/Enumerations.d.ts.map +1 -1
- package/lib/cjs/Editing/Enumerations.js +6 -3
- package/lib/cjs/Editing/Enumerations.js.map +1 -1
- package/lib/cjs/Editing/Exception.js +35 -6
- package/lib/cjs/Editing/Exception.js.map +1 -1
- package/lib/cjs/Editing/Formats.d.ts +2 -1
- package/lib/cjs/Editing/Formats.d.ts.map +1 -1
- package/lib/cjs/Editing/Formats.js +5 -1
- package/lib/cjs/Editing/Formats.js.map +1 -1
- package/lib/cjs/Editing/InvertedUnits.d.ts +2 -1
- package/lib/cjs/Editing/InvertedUnits.d.ts.map +1 -1
- package/lib/cjs/Editing/InvertedUnits.js +10 -6
- package/lib/cjs/Editing/InvertedUnits.js.map +1 -1
- package/lib/cjs/Editing/KindOfQuantities.d.ts +2 -1
- package/lib/cjs/Editing/KindOfQuantities.d.ts.map +1 -1
- package/lib/cjs/Editing/KindOfQuantities.js +11 -7
- package/lib/cjs/Editing/KindOfQuantities.js.map +1 -1
- package/lib/cjs/Editing/Mixins.d.ts +2 -1
- package/lib/cjs/Editing/Mixins.d.ts.map +1 -1
- package/lib/cjs/Editing/Mixins.js +13 -9
- package/lib/cjs/Editing/Mixins.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableArrayProperty.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableCAClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableClass.d.ts +2 -1
- package/lib/cjs/Editing/Mutable/MutableClass.d.ts.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableConstant.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableEntityClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableEnumeration.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableFormat.d.ts +8 -1
- package/lib/cjs/Editing/Mutable/MutableFormat.d.ts.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableFormat.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableInvertedUnit.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableKindOfQuantity.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableMixin.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableNavigationProperty.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutablePhenomenon.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutablePrimitiveOrEnumProperty.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableProperty.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutablePropertyCategory.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableRelationshipClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableSchema.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableSchemaItem.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableStructProperty.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableUnit.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableUnitSystem.js.map +1 -1
- package/lib/cjs/Editing/Phenomena.d.ts +2 -1
- package/lib/cjs/Editing/Phenomena.d.ts.map +1 -1
- package/lib/cjs/Editing/Phenomena.js +3 -0
- package/lib/cjs/Editing/Phenomena.js.map +1 -1
- package/lib/cjs/Editing/Properties.d.ts +2 -2
- package/lib/cjs/Editing/Properties.d.ts.map +1 -1
- package/lib/cjs/Editing/Properties.js +6 -4
- package/lib/cjs/Editing/Properties.js.map +1 -1
- package/lib/cjs/Editing/PropertyCategories.d.ts +2 -1
- package/lib/cjs/Editing/PropertyCategories.d.ts.map +1 -1
- package/lib/cjs/Editing/PropertyCategories.js +5 -1
- package/lib/cjs/Editing/PropertyCategories.js.map +1 -1
- package/lib/cjs/Editing/RelationshipClasses.d.ts +1 -0
- package/lib/cjs/Editing/RelationshipClasses.d.ts.map +1 -1
- package/lib/cjs/Editing/RelationshipClasses.js +17 -10
- package/lib/cjs/Editing/RelationshipClasses.js.map +1 -1
- package/lib/cjs/Editing/SchemaItems.d.ts +2 -2
- package/lib/cjs/Editing/SchemaItems.d.ts.map +1 -1
- package/lib/cjs/Editing/SchemaItems.js +8 -11
- package/lib/cjs/Editing/SchemaItems.js.map +1 -1
- package/lib/cjs/Editing/Structs.d.ts +2 -1
- package/lib/cjs/Editing/Structs.d.ts.map +1 -1
- package/lib/cjs/Editing/Structs.js +3 -0
- package/lib/cjs/Editing/Structs.js.map +1 -1
- package/lib/cjs/Editing/UnitSystems.d.ts +2 -1
- package/lib/cjs/Editing/UnitSystems.d.ts.map +1 -1
- package/lib/cjs/Editing/UnitSystems.js +3 -0
- package/lib/cjs/Editing/UnitSystems.js.map +1 -1
- package/lib/cjs/Editing/Units.d.ts +2 -1
- package/lib/cjs/Editing/Units.d.ts.map +1 -1
- package/lib/cjs/Editing/Units.js +5 -2
- package/lib/cjs/Editing/Units.js.map +1 -1
- package/lib/cjs/Merging/ClassMerger.js.map +1 -1
- package/lib/cjs/Merging/ConstantMerger.js +4 -4
- package/lib/cjs/Merging/ConstantMerger.js.map +1 -1
- package/lib/cjs/Merging/CustomAttributeClassMerger.js.map +1 -1
- package/lib/cjs/Merging/CustomAttributeMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/CustomAttributeMerger.js +7 -6
- package/lib/cjs/Merging/CustomAttributeMerger.js.map +1 -1
- package/lib/cjs/Merging/Edits/NameMapping.d.ts +22 -0
- package/lib/cjs/Merging/Edits/NameMapping.d.ts.map +1 -0
- package/lib/cjs/Merging/Edits/NameMapping.js +54 -0
- package/lib/cjs/Merging/Edits/NameMapping.js.map +1 -0
- package/lib/cjs/Merging/Edits/RenameEditHandler.d.ts +1 -1
- package/lib/cjs/Merging/Edits/RenameEditHandler.d.ts.map +1 -1
- package/lib/cjs/Merging/Edits/RenameEditHandler.js +1 -260
- package/lib/cjs/Merging/Edits/RenameEditHandler.js.map +1 -1
- package/lib/cjs/Merging/Edits/SchemaEdits.d.ts +9 -6
- package/lib/cjs/Merging/Edits/SchemaEdits.d.ts.map +1 -1
- package/lib/cjs/Merging/Edits/SchemaEdits.js +19 -14
- package/lib/cjs/Merging/Edits/SchemaEdits.js.map +1 -1
- package/lib/cjs/Merging/Edits/SkipEditHandler.js.map +1 -1
- package/lib/cjs/Merging/EntityClassMerger.js +1 -2
- package/lib/cjs/Merging/EntityClassMerger.js.map +1 -1
- package/lib/cjs/Merging/EnumerationMerger.js +1 -1
- package/lib/cjs/Merging/EnumerationMerger.js.map +1 -1
- package/lib/cjs/Merging/EnumeratorMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/EnumeratorMerger.js +2 -2
- package/lib/cjs/Merging/EnumeratorMerger.js.map +1 -1
- package/lib/cjs/Merging/FormatMerger.d.ts +24 -0
- package/lib/cjs/Merging/FormatMerger.d.ts.map +1 -0
- package/lib/cjs/Merging/FormatMerger.js +143 -0
- package/lib/cjs/Merging/FormatMerger.js.map +1 -0
- package/lib/cjs/Merging/InvertedUnitMerger.d.ts +14 -0
- package/lib/cjs/Merging/InvertedUnitMerger.d.ts.map +1 -0
- package/lib/cjs/Merging/InvertedUnitMerger.js +45 -0
- package/lib/cjs/Merging/InvertedUnitMerger.js.map +1 -0
- package/lib/cjs/Merging/KindOfQuantityMerger.d.ts +1 -1
- package/lib/cjs/Merging/KindOfQuantityMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/KindOfQuantityMerger.js +4 -5
- package/lib/cjs/Merging/KindOfQuantityMerger.js.map +1 -1
- package/lib/cjs/Merging/MixinMerger.js +1 -1
- package/lib/cjs/Merging/MixinMerger.js.map +1 -1
- package/lib/cjs/Merging/PhenomenonMerger.js +1 -1
- package/lib/cjs/Merging/PhenomenonMerger.js.map +1 -1
- package/lib/cjs/Merging/PropertyCategoryMerger.js.map +1 -1
- package/lib/cjs/Merging/PropertyMerger.js +28 -26
- package/lib/cjs/Merging/PropertyMerger.js.map +1 -1
- package/lib/cjs/Merging/RelationshipClassMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/RelationshipClassMerger.js +4 -4
- package/lib/cjs/Merging/RelationshipClassMerger.js.map +1 -1
- package/lib/cjs/Merging/SchemaMerger.d.ts +5 -3
- package/lib/cjs/Merging/SchemaMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/SchemaMerger.js +45 -5
- package/lib/cjs/Merging/SchemaMerger.js.map +1 -1
- package/lib/cjs/Merging/SchemaMergingVisitor.d.ts +14 -8
- package/lib/cjs/Merging/SchemaMergingVisitor.d.ts.map +1 -1
- package/lib/cjs/Merging/SchemaMergingVisitor.js +42 -17
- package/lib/cjs/Merging/SchemaMergingVisitor.js.map +1 -1
- package/lib/cjs/Merging/SchemaMergingWalker.d.ts.map +1 -1
- package/lib/cjs/Merging/SchemaMergingWalker.js +2 -0
- package/lib/cjs/Merging/SchemaMergingWalker.js.map +1 -1
- package/lib/cjs/Merging/SchemaReferenceMerger.js.map +1 -1
- package/lib/cjs/Merging/StructClassMerger.js.map +1 -1
- package/lib/cjs/Merging/UnitMerger.d.ts +14 -0
- package/lib/cjs/Merging/UnitMerger.d.ts.map +1 -0
- package/lib/cjs/Merging/UnitMerger.js +62 -0
- package/lib/cjs/Merging/UnitMerger.js.map +1 -0
- package/lib/cjs/Merging/UnitSystemMerger.js.map +1 -1
- package/lib/cjs/Merging/Utils.d.ts +11 -0
- package/lib/cjs/Merging/Utils.d.ts.map +1 -1
- package/lib/cjs/Merging/Utils.js +23 -3
- package/lib/cjs/Merging/Utils.js.map +1 -1
- package/lib/cjs/Validation/Diagnostic.js +18 -16
- package/lib/cjs/Validation/Diagnostic.js.map +1 -1
- package/lib/cjs/Validation/DiagnosticReporter.js +4 -1
- package/lib/cjs/Validation/DiagnosticReporter.js.map +1 -1
- package/lib/cjs/Validation/ECRules.js +1 -1
- package/lib/cjs/Validation/ECRules.js.map +1 -1
- package/lib/cjs/Validation/LoggingDiagnosticReporter.js.map +1 -1
- package/lib/cjs/Validation/RuleSuppressionSet.js.map +1 -1
- package/lib/cjs/Validation/Rules.js.map +1 -1
- package/lib/cjs/Validation/SchemaChanges.js +39 -69
- package/lib/cjs/Validation/SchemaChanges.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareDiagnostics.d.ts +2 -2
- package/lib/cjs/Validation/SchemaCompareDiagnostics.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareReporter.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareResultDelegate.d.ts +1 -1
- package/lib/cjs/Validation/SchemaCompareResultDelegate.d.ts.map +1 -1
- package/lib/cjs/Validation/SchemaCompareResultDelegate.js +4 -1
- package/lib/cjs/Validation/SchemaCompareResultDelegate.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareVisitor.d.ts.map +1 -1
- package/lib/cjs/Validation/SchemaCompareVisitor.js +23 -23
- package/lib/cjs/Validation/SchemaCompareVisitor.js.map +1 -1
- package/lib/cjs/Validation/SchemaComparer.d.ts +22 -1
- package/lib/cjs/Validation/SchemaComparer.d.ts.map +1 -1
- package/lib/cjs/Validation/SchemaComparer.js +30 -5
- package/lib/cjs/Validation/SchemaComparer.js.map +1 -1
- package/lib/cjs/Validation/SchemaValidater.js +1 -4
- package/lib/cjs/Validation/SchemaValidater.js.map +1 -1
- package/lib/cjs/Validation/SchemaValidationVisitor.js +3 -4
- package/lib/cjs/Validation/SchemaValidationVisitor.js.map +1 -1
- package/lib/cjs/Validation/SchemaWalker.d.ts +1 -1
- package/lib/cjs/Validation/SchemaWalker.d.ts.map +1 -1
- package/lib/cjs/Validation/SchemaWalker.js +6 -4
- package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
- package/lib/cjs/ecschema-editing.js.map +1 -1
- package/lib/esm/Differencing/Errors.d.ts +19 -0
- package/lib/esm/Differencing/Errors.d.ts.map +1 -0
- package/lib/esm/Differencing/Errors.js +26 -0
- package/lib/esm/Differencing/Errors.js.map +1 -0
- package/lib/esm/Differencing/SchemaConflicts.d.ts +84 -0
- package/lib/esm/Differencing/SchemaConflicts.d.ts.map +1 -0
- package/lib/esm/Differencing/SchemaConflicts.js +60 -0
- package/lib/esm/Differencing/SchemaConflicts.js.map +1 -0
- package/lib/esm/Differencing/SchemaDiagnosticVisitor.d.ts +41 -0
- package/lib/esm/Differencing/SchemaDiagnosticVisitor.d.ts.map +1 -0
- package/lib/esm/Differencing/SchemaDiagnosticVisitor.js +443 -0
- package/lib/esm/Differencing/SchemaDiagnosticVisitor.js.map +1 -0
- package/lib/esm/Differencing/SchemaDifference.d.ts +357 -0
- package/lib/esm/Differencing/SchemaDifference.d.ts.map +1 -0
- package/lib/esm/Differencing/SchemaDifference.js +106 -0
- package/lib/esm/Differencing/SchemaDifference.js.map +1 -0
- package/lib/esm/Differencing/SchemaDifferenceValidator.d.ts +18 -0
- package/lib/esm/Differencing/SchemaDifferenceValidator.d.ts.map +1 -0
- package/lib/esm/Differencing/SchemaDifferenceValidator.js +521 -0
- package/lib/esm/Differencing/SchemaDifferenceValidator.js.map +1 -0
- package/lib/esm/Differencing/SchemaDifferenceVisitor.d.ts +32 -0
- package/lib/esm/Differencing/SchemaDifferenceVisitor.d.ts.map +1 -0
- package/lib/esm/Differencing/SchemaDifferenceVisitor.js +88 -0
- package/lib/esm/Differencing/SchemaDifferenceVisitor.js.map +1 -0
- package/lib/esm/Differencing/Utils.d.ts +110 -0
- package/lib/esm/Differencing/Utils.d.ts.map +1 -0
- package/lib/esm/Differencing/Utils.js +161 -0
- package/lib/esm/Differencing/Utils.js.map +1 -0
- package/lib/esm/Editing/Constants.d.ts +22 -0
- package/lib/esm/Editing/Constants.d.ts.map +1 -0
- package/lib/esm/Editing/Constants.js +55 -0
- package/lib/esm/Editing/Constants.js.map +1 -0
- package/lib/esm/Editing/CustomAttributes.d.ts +22 -0
- package/lib/esm/Editing/CustomAttributes.d.ts.map +1 -0
- package/lib/esm/Editing/CustomAttributes.js +49 -0
- package/lib/esm/Editing/CustomAttributes.js.map +1 -0
- package/lib/esm/Editing/ECClasses.d.ts +86 -0
- package/lib/esm/Editing/ECClasses.d.ts.map +1 -0
- package/lib/esm/Editing/ECClasses.js +294 -0
- package/lib/esm/Editing/ECClasses.js.map +1 -0
- package/lib/esm/Editing/Editor.d.ts +117 -0
- package/lib/esm/Editing/Editor.d.ts.map +1 -0
- package/lib/esm/Editing/Editor.js +264 -0
- package/lib/esm/Editing/Editor.js.map +1 -0
- package/lib/esm/Editing/Entities.d.ts +38 -0
- package/lib/esm/Editing/Entities.d.ts.map +1 -0
- package/lib/esm/Editing/Entities.js +126 -0
- package/lib/esm/Editing/Entities.js.map +1 -0
- package/lib/esm/Editing/Enumerations.d.ts +25 -0
- package/lib/esm/Editing/Enumerations.d.ts.map +1 -0
- package/lib/esm/Editing/Enumerations.js +90 -0
- package/lib/esm/Editing/Enumerations.js.map +1 -0
- package/lib/esm/Editing/Exception.d.ts +358 -0
- package/lib/esm/Editing/Exception.d.ts.map +1 -0
- package/lib/esm/Editing/Exception.js +471 -0
- package/lib/esm/Editing/Exception.js.map +1 -0
- package/lib/esm/Editing/Formats.d.ts +23 -0
- package/lib/esm/Editing/Formats.d.ts.map +1 -0
- package/lib/esm/Editing/Formats.js +62 -0
- package/lib/esm/Editing/Formats.js.map +1 -0
- package/lib/esm/Editing/InvertedUnits.d.ts +19 -0
- package/lib/esm/Editing/InvertedUnits.d.ts.map +1 -0
- package/lib/esm/Editing/InvertedUnits.js +68 -0
- package/lib/esm/Editing/InvertedUnits.js.map +1 -0
- package/lib/esm/Editing/KindOfQuantities.d.ts +30 -0
- package/lib/esm/Editing/KindOfQuantities.d.ts.map +1 -0
- package/lib/esm/Editing/KindOfQuantities.js +92 -0
- package/lib/esm/Editing/KindOfQuantities.js.map +1 -0
- package/lib/esm/Editing/Mixins.d.ts +35 -0
- package/lib/esm/Editing/Mixins.d.ts.map +1 -0
- package/lib/esm/Editing/Mixins.js +90 -0
- package/lib/esm/Editing/Mixins.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableArrayProperty.d.ts +10 -0
- package/lib/esm/Editing/Mutable/MutableArrayProperty.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableArrayProperty.js +12 -0
- package/lib/esm/Editing/Mutable/MutableArrayProperty.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableCAClass.d.ts +10 -0
- package/lib/esm/Editing/Mutable/MutableCAClass.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableCAClass.js +12 -0
- package/lib/esm/Editing/Mutable/MutableCAClass.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableClass.d.ts +39 -0
- package/lib/esm/Editing/Mutable/MutableClass.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableClass.js +18 -0
- package/lib/esm/Editing/Mutable/MutableClass.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableConstant.d.ts +14 -0
- package/lib/esm/Editing/Mutable/MutableConstant.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableConstant.js +12 -0
- package/lib/esm/Editing/Mutable/MutableConstant.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableEntityClass.d.ts +12 -0
- package/lib/esm/Editing/Mutable/MutableEntityClass.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableEntityClass.js +12 -0
- package/lib/esm/Editing/Mutable/MutableEntityClass.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableEnumeration.d.ts +11 -0
- package/lib/esm/Editing/Mutable/MutableEnumeration.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableEnumeration.js +11 -0
- package/lib/esm/Editing/Mutable/MutableEnumeration.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableFormat.d.ts +26 -0
- package/lib/esm/Editing/Mutable/MutableFormat.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableFormat.js +12 -0
- package/lib/esm/Editing/Mutable/MutableFormat.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableInvertedUnit.d.ts +11 -0
- package/lib/esm/Editing/Mutable/MutableInvertedUnit.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableInvertedUnit.js +12 -0
- package/lib/esm/Editing/Mutable/MutableInvertedUnit.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableKindOfQuantity.d.ts +14 -0
- package/lib/esm/Editing/Mutable/MutableKindOfQuantity.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableKindOfQuantity.js +12 -0
- package/lib/esm/Editing/Mutable/MutableKindOfQuantity.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableMixin.d.ts +12 -0
- package/lib/esm/Editing/Mutable/MutableMixin.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableMixin.js +12 -0
- package/lib/esm/Editing/Mutable/MutableMixin.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableNavigationProperty.d.ts +8 -0
- package/lib/esm/Editing/Mutable/MutableNavigationProperty.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableNavigationProperty.js +12 -0
- package/lib/esm/Editing/Mutable/MutableNavigationProperty.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutablePhenomenon.d.ts +11 -0
- package/lib/esm/Editing/Mutable/MutablePhenomenon.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutablePhenomenon.js +12 -0
- package/lib/esm/Editing/Mutable/MutablePhenomenon.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.d.ts +13 -0
- package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.js +12 -0
- package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableProperty.d.ts +16 -0
- package/lib/esm/Editing/Mutable/MutableProperty.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableProperty.js +12 -0
- package/lib/esm/Editing/Mutable/MutableProperty.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutablePropertyCategory.d.ts +11 -0
- package/lib/esm/Editing/Mutable/MutablePropertyCategory.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutablePropertyCategory.js +12 -0
- package/lib/esm/Editing/Mutable/MutablePropertyCategory.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableRelationshipClass.d.ts +30 -0
- package/lib/esm/Editing/Mutable/MutableRelationshipClass.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableRelationshipClass.js +20 -0
- package/lib/esm/Editing/Mutable/MutableRelationshipClass.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableSchema.d.ts +51 -0
- package/lib/esm/Editing/Mutable/MutableSchema.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableSchema.js +14 -0
- package/lib/esm/Editing/Mutable/MutableSchema.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableSchemaItem.d.ts +11 -0
- package/lib/esm/Editing/Mutable/MutableSchemaItem.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableSchemaItem.js +12 -0
- package/lib/esm/Editing/Mutable/MutableSchemaItem.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableStructProperty.d.ts +8 -0
- package/lib/esm/Editing/Mutable/MutableStructProperty.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableStructProperty.js +12 -0
- package/lib/esm/Editing/Mutable/MutableStructProperty.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableUnit.d.ts +12 -0
- package/lib/esm/Editing/Mutable/MutableUnit.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableUnit.js +12 -0
- package/lib/esm/Editing/Mutable/MutableUnit.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableUnitSystem.d.ts +10 -0
- package/lib/esm/Editing/Mutable/MutableUnitSystem.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableUnitSystem.js +12 -0
- package/lib/esm/Editing/Mutable/MutableUnitSystem.js.map +1 -0
- package/lib/esm/Editing/Phenomena.d.ts +17 -0
- package/lib/esm/Editing/Phenomena.d.ts.map +1 -0
- package/lib/esm/Editing/Phenomena.js +44 -0
- package/lib/esm/Editing/Phenomena.js.map +1 -0
- package/lib/esm/Editing/Properties.d.ts +206 -0
- package/lib/esm/Editing/Properties.d.ts.map +1 -0
- package/lib/esm/Editing/Properties.js +415 -0
- package/lib/esm/Editing/Properties.js.map +1 -0
- package/lib/esm/Editing/PropertyCategories.d.ts +18 -0
- package/lib/esm/Editing/PropertyCategories.d.ts.map +1 -0
- package/lib/esm/Editing/PropertyCategories.js +54 -0
- package/lib/esm/Editing/PropertyCategories.js.map +1 -0
- package/lib/esm/Editing/RelationshipClasses.d.ts +69 -0
- package/lib/esm/Editing/RelationshipClasses.d.ts.map +1 -0
- package/lib/esm/Editing/RelationshipClasses.js +236 -0
- package/lib/esm/Editing/RelationshipClasses.js.map +1 -0
- package/lib/esm/Editing/SchemaItems.d.ts +42 -0
- package/lib/esm/Editing/SchemaItems.d.ts.map +1 -0
- package/lib/esm/Editing/SchemaItems.js +104 -0
- package/lib/esm/Editing/SchemaItems.js.map +1 -0
- package/lib/esm/Editing/Structs.d.ts +21 -0
- package/lib/esm/Editing/Structs.d.ts.map +1 -0
- package/lib/esm/Editing/Structs.js +47 -0
- package/lib/esm/Editing/Structs.js.map +1 -0
- package/lib/esm/Editing/UnitSystems.d.ts +17 -0
- package/lib/esm/Editing/UnitSystems.d.ts.map +1 -0
- package/lib/esm/Editing/UnitSystems.js +43 -0
- package/lib/esm/Editing/UnitSystems.js.map +1 -0
- package/lib/esm/Editing/Units.d.ts +17 -0
- package/lib/esm/Editing/Units.d.ts.map +1 -0
- package/lib/esm/Editing/Units.js +49 -0
- package/lib/esm/Editing/Units.js.map +1 -0
- package/lib/esm/Merging/ClassMerger.d.ts +9 -0
- package/lib/esm/Merging/ClassMerger.d.ts.map +1 -0
- package/lib/esm/Merging/ClassMerger.js +66 -0
- package/lib/esm/Merging/ClassMerger.js.map +1 -0
- package/lib/esm/Merging/ConstantMerger.d.ts +14 -0
- package/lib/esm/Merging/ConstantMerger.d.ts.map +1 -0
- package/lib/esm/Merging/ConstantMerger.js +64 -0
- package/lib/esm/Merging/ConstantMerger.js.map +1 -0
- package/lib/esm/Merging/CustomAttributeClassMerger.d.ts +14 -0
- package/lib/esm/Merging/CustomAttributeClassMerger.d.ts.map +1 -0
- package/lib/esm/Merging/CustomAttributeClassMerger.js +36 -0
- package/lib/esm/Merging/CustomAttributeClassMerger.js.map +1 -0
- package/lib/esm/Merging/CustomAttributeMerger.d.ts +19 -0
- package/lib/esm/Merging/CustomAttributeMerger.d.ts.map +1 -0
- package/lib/esm/Merging/CustomAttributeMerger.js +66 -0
- package/lib/esm/Merging/CustomAttributeMerger.js.map +1 -0
- package/lib/esm/Merging/Edits/NameMapping.d.ts +22 -0
- package/lib/esm/Merging/Edits/NameMapping.d.ts.map +1 -0
- package/lib/esm/Merging/Edits/NameMapping.js +49 -0
- package/lib/esm/Merging/Edits/NameMapping.js.map +1 -0
- package/lib/esm/Merging/Edits/RenameEditHandler.d.ts +14 -0
- package/lib/esm/Merging/Edits/RenameEditHandler.d.ts.map +1 -0
- package/lib/esm/Merging/Edits/RenameEditHandler.js +62 -0
- package/lib/esm/Merging/Edits/RenameEditHandler.js.map +1 -0
- package/lib/esm/Merging/Edits/SchemaEdits.d.ts +81 -0
- package/lib/esm/Merging/Edits/SchemaEdits.d.ts.map +1 -0
- package/lib/esm/Merging/Edits/SchemaEdits.js +112 -0
- package/lib/esm/Merging/Edits/SchemaEdits.js.map +1 -0
- package/lib/esm/Merging/Edits/SkipEditHandler.d.ts +14 -0
- package/lib/esm/Merging/Edits/SkipEditHandler.d.ts.map +1 -0
- package/lib/esm/Merging/Edits/SkipEditHandler.js +60 -0
- package/lib/esm/Merging/Edits/SkipEditHandler.js.map +1 -0
- package/lib/esm/Merging/EntityClassMerger.d.ts +19 -0
- package/lib/esm/Merging/EntityClassMerger.d.ts.map +1 -0
- package/lib/esm/Merging/EntityClassMerger.js +39 -0
- package/lib/esm/Merging/EntityClassMerger.js.map +1 -0
- package/lib/esm/Merging/EnumerationMerger.d.ts +14 -0
- package/lib/esm/Merging/EnumerationMerger.d.ts.map +1 -0
- package/lib/esm/Merging/EnumerationMerger.js +48 -0
- package/lib/esm/Merging/EnumerationMerger.js.map +1 -0
- package/lib/esm/Merging/EnumeratorMerger.d.ts +14 -0
- package/lib/esm/Merging/EnumeratorMerger.d.ts.map +1 -0
- package/lib/esm/Merging/EnumeratorMerger.js +36 -0
- package/lib/esm/Merging/EnumeratorMerger.js.map +1 -0
- package/lib/esm/Merging/FormatMerger.d.ts +24 -0
- package/lib/esm/Merging/FormatMerger.d.ts.map +1 -0
- package/lib/esm/Merging/FormatMerger.js +137 -0
- package/lib/esm/Merging/FormatMerger.js.map +1 -0
- package/lib/esm/Merging/InvertedUnitMerger.d.ts +14 -0
- package/lib/esm/Merging/InvertedUnitMerger.d.ts.map +1 -0
- package/lib/esm/Merging/InvertedUnitMerger.js +41 -0
- package/lib/esm/Merging/InvertedUnitMerger.js.map +1 -0
- package/lib/esm/Merging/KindOfQuantityMerger.d.ts +19 -0
- package/lib/esm/Merging/KindOfQuantityMerger.d.ts.map +1 -0
- package/lib/esm/Merging/KindOfQuantityMerger.js +89 -0
- package/lib/esm/Merging/KindOfQuantityMerger.js.map +1 -0
- package/lib/esm/Merging/MixinMerger.d.ts +14 -0
- package/lib/esm/Merging/MixinMerger.d.ts.map +1 -0
- package/lib/esm/Merging/MixinMerger.js +33 -0
- package/lib/esm/Merging/MixinMerger.js.map +1 -0
- package/lib/esm/Merging/PhenomenonMerger.d.ts +14 -0
- package/lib/esm/Merging/PhenomenonMerger.d.ts.map +1 -0
- package/lib/esm/Merging/PhenomenonMerger.js +36 -0
- package/lib/esm/Merging/PhenomenonMerger.js.map +1 -0
- package/lib/esm/Merging/PropertyCategoryMerger.d.ts +14 -0
- package/lib/esm/Merging/PropertyCategoryMerger.d.ts.map +1 -0
- package/lib/esm/Merging/PropertyCategoryMerger.js +31 -0
- package/lib/esm/Merging/PropertyCategoryMerger.js.map +1 -0
- package/lib/esm/Merging/PropertyMerger.d.ts +12 -0
- package/lib/esm/Merging/PropertyMerger.d.ts.map +1 -0
- package/lib/esm/Merging/PropertyMerger.js +228 -0
- package/lib/esm/Merging/PropertyMerger.js.map +1 -0
- package/lib/esm/Merging/RelationshipClassMerger.d.ts +27 -0
- package/lib/esm/Merging/RelationshipClassMerger.d.ts.map +1 -0
- package/lib/esm/Merging/RelationshipClassMerger.js +136 -0
- package/lib/esm/Merging/RelationshipClassMerger.js.map +1 -0
- package/lib/esm/Merging/SchemaMerger.d.ts +49 -0
- package/lib/esm/Merging/SchemaMerger.d.ts.map +1 -0
- package/lib/esm/Merging/SchemaMerger.js +117 -0
- package/lib/esm/Merging/SchemaMerger.js.map +1 -0
- package/lib/esm/Merging/SchemaMergingVisitor.d.ts +149 -0
- package/lib/esm/Merging/SchemaMergingVisitor.d.ts.map +1 -0
- package/lib/esm/Merging/SchemaMergingVisitor.js +339 -0
- package/lib/esm/Merging/SchemaMergingVisitor.js.map +1 -0
- package/lib/esm/Merging/SchemaMergingWalker.d.ts +19 -0
- package/lib/esm/Merging/SchemaMergingWalker.d.ts.map +1 -0
- package/lib/esm/Merging/SchemaMergingWalker.js +61 -0
- package/lib/esm/Merging/SchemaMergingWalker.js.map +1 -0
- package/lib/esm/Merging/SchemaReferenceMerger.d.ts +13 -0
- package/lib/esm/Merging/SchemaReferenceMerger.d.ts.map +1 -0
- package/lib/esm/Merging/SchemaReferenceMerger.js +57 -0
- package/lib/esm/Merging/SchemaReferenceMerger.js.map +1 -0
- package/lib/esm/Merging/StructClassMerger.d.ts +14 -0
- package/lib/esm/Merging/StructClassMerger.d.ts.map +1 -0
- package/lib/esm/Merging/StructClassMerger.js +20 -0
- package/lib/esm/Merging/StructClassMerger.js.map +1 -0
- package/lib/esm/Merging/UnitMerger.d.ts +14 -0
- package/lib/esm/Merging/UnitMerger.d.ts.map +1 -0
- package/lib/esm/Merging/UnitMerger.js +58 -0
- package/lib/esm/Merging/UnitMerger.js.map +1 -0
- package/lib/esm/Merging/UnitSystemMerger.d.ts +14 -0
- package/lib/esm/Merging/UnitSystemMerger.d.ts.map +1 -0
- package/lib/esm/Merging/UnitSystemMerger.js +24 -0
- package/lib/esm/Merging/UnitSystemMerger.js.map +1 -0
- package/lib/esm/Merging/Utils.d.ts +34 -0
- package/lib/esm/Merging/Utils.d.ts.map +1 -0
- package/lib/esm/Merging/Utils.js +90 -0
- package/lib/esm/Merging/Utils.js.map +1 -0
- package/lib/esm/Validation/Diagnostic.d.ts +322 -0
- package/lib/esm/Validation/Diagnostic.d.ts.map +1 -0
- package/lib/esm/Validation/Diagnostic.js +295 -0
- package/lib/esm/Validation/Diagnostic.js.map +1 -0
- package/lib/esm/Validation/DiagnosticReporter.d.ts +97 -0
- package/lib/esm/Validation/DiagnosticReporter.d.ts.map +1 -0
- package/lib/esm/Validation/DiagnosticReporter.js +105 -0
- package/lib/esm/Validation/DiagnosticReporter.js.map +1 -0
- package/lib/esm/Validation/ECRules.d.ts +454 -0
- package/lib/esm/Validation/ECRules.d.ts.map +1 -0
- package/lib/esm/Validation/ECRules.js +578 -0
- package/lib/esm/Validation/ECRules.js.map +1 -0
- package/lib/esm/Validation/LoggingDiagnosticReporter.d.ts +14 -0
- package/lib/esm/Validation/LoggingDiagnosticReporter.d.ts.map +1 -0
- package/lib/esm/Validation/LoggingDiagnosticReporter.js +37 -0
- package/lib/esm/Validation/LoggingDiagnosticReporter.js.map +1 -0
- package/lib/esm/Validation/RuleSuppressionSet.d.ts +60 -0
- package/lib/esm/Validation/RuleSuppressionSet.d.ts.map +1 -0
- package/lib/esm/Validation/RuleSuppressionSet.js +9 -0
- package/lib/esm/Validation/RuleSuppressionSet.js.map +1 -0
- package/lib/esm/Validation/Rules.d.ts +65 -0
- package/lib/esm/Validation/Rules.d.ts.map +1 -0
- package/lib/esm/Validation/Rules.js +9 -0
- package/lib/esm/Validation/Rules.js.map +1 -0
- package/lib/esm/Validation/SchemaChanges.d.ts +640 -0
- package/lib/esm/Validation/SchemaChanges.d.ts.map +1 -0
- package/lib/esm/Validation/SchemaChanges.js +1141 -0
- package/lib/esm/Validation/SchemaChanges.js.map +1 -0
- package/lib/esm/Validation/SchemaCompareDiagnostics.d.ts +423 -0
- package/lib/esm/Validation/SchemaCompareDiagnostics.d.ts.map +1 -0
- package/lib/esm/Validation/SchemaCompareDiagnostics.js +109 -0
- package/lib/esm/Validation/SchemaCompareDiagnostics.js.map +1 -0
- package/lib/esm/Validation/SchemaCompareReporter.d.ts +12 -0
- package/lib/esm/Validation/SchemaCompareReporter.d.ts.map +1 -0
- package/lib/esm/Validation/SchemaCompareReporter.js +9 -0
- package/lib/esm/Validation/SchemaCompareReporter.js.map +1 -0
- package/lib/esm/Validation/SchemaCompareResultDelegate.d.ts +237 -0
- package/lib/esm/Validation/SchemaCompareResultDelegate.d.ts.map +1 -0
- package/lib/esm/Validation/SchemaCompareResultDelegate.js +346 -0
- package/lib/esm/Validation/SchemaCompareResultDelegate.js.map +1 -0
- package/lib/esm/Validation/SchemaCompareVisitor.d.ts +120 -0
- package/lib/esm/Validation/SchemaCompareVisitor.d.ts.map +1 -0
- package/lib/esm/Validation/SchemaCompareVisitor.js +222 -0
- package/lib/esm/Validation/SchemaCompareVisitor.js.map +1 -0
- package/lib/esm/Validation/SchemaComparer.d.ts +211 -0
- package/lib/esm/Validation/SchemaComparer.d.ts.map +1 -0
- package/lib/esm/Validation/SchemaComparer.js +770 -0
- package/lib/esm/Validation/SchemaComparer.js.map +1 -0
- package/lib/esm/Validation/SchemaValidater.d.ts +20 -0
- package/lib/esm/Validation/SchemaValidater.d.ts.map +1 -0
- package/lib/esm/Validation/SchemaValidater.js +55 -0
- package/lib/esm/Validation/SchemaValidater.js.map +1 -0
- package/lib/esm/Validation/SchemaValidationVisitor.d.ts +171 -0
- package/lib/esm/Validation/SchemaValidationVisitor.d.ts.map +1 -0
- package/lib/esm/Validation/SchemaValidationVisitor.js +488 -0
- package/lib/esm/Validation/SchemaValidationVisitor.js.map +1 -0
- package/lib/esm/Validation/SchemaWalker.d.ts +23 -0
- package/lib/esm/Validation/SchemaWalker.d.ts.map +1 -0
- package/lib/esm/Validation/SchemaWalker.js +50 -0
- package/lib/esm/Validation/SchemaWalker.js.map +1 -0
- package/lib/esm/ecschema-editing.d.ts +49 -0
- package/lib/esm/ecschema-editing.d.ts.map +1 -0
- package/lib/esm/ecschema-editing.js +52 -0
- package/lib/esm/ecschema-editing.js.map +1 -0
- package/package.json +19 -17
- package/public/locales/en/ECSchemaEditing.json +26 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaDifferenceVisitor.js","sourceRoot":"","sources":["../../../src/Differencing/SchemaDifferenceVisitor.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAA0D;AAC1D,yDAAgF;AAWhF;;;;GAIG;AACH,MAAa,sBAAsB;
|
|
1
|
+
{"version":3,"file":"SchemaDifferenceVisitor.js","sourceRoot":"","sources":["../../../src/Differencing/SchemaDifferenceVisitor.ts"],"names":[],"mappings":";AAA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U;gBAC5B,OAAO,IAAI,CAAC,QAAQ,CAAC,yBAAyB,CAAC,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAC7E,CAAC;IACH,CAAC;CACF;AA5ED,wDA4EC","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 Differencing\n */\n\nimport { SchemaItemType } from \"@itwin/ecschema-metadata\";\nimport { type AnySchemaDifference, SchemaOtherTypes } from \"./SchemaDifference\";\n\n/**\n * Defines the interface for a visitor that can be used to traverse schema differences.\n * It dynamically creates a method for each schema difference type.\n * @internal\n */\nexport type SchemaDifferenceVisitor = {\n [Difference in AnySchemaDifference as `visit${Difference[\"schemaType\"]}Difference`]: (entry: Difference, index: number, array: AnySchemaDifference[]) => Promise<void>;\n};\n\n/**\n * Implementation of a walker that traverses schema differences and calls the appropriate\n * method on the visitor.\n * @internal\n */\nexport class SchemaDifferenceWalker {\n\n private readonly _visitor: SchemaDifferenceVisitor;\n\n /** Initializes a new instance of SchemaDifferenceWalker class. */\n constructor(visitor: SchemaDifferenceVisitor) {\n this._visitor = visitor;\n }\n\n /**\n * Traverses the schema differences and calls the appropriate method on the visitor.\n * @param differences The differences to traverse.\n */\n public async traverse(differences: Array<AnySchemaDifference>): Promise<void> {\n for (const [index, entry] of differences.entries()) {\n await this.visit(entry, index, differences);\n }\n }\n\n /**\n * Calls the appropriate method on the visitor based on the schema difference type.\n */\n private async visit(difference: AnySchemaDifference, index: number, array: AnySchemaDifference[]) {\n switch (difference.schemaType) {\n case SchemaOtherTypes.Schema:\n return this._visitor.visitSchemaDifference(difference, index, array);\n case SchemaOtherTypes.SchemaReference:\n return this._visitor.visitSchemaReferenceDifference(difference, index, array);\n case SchemaItemType.Constant:\n return this._visitor.visitConstantDifference(difference, index, array);\n case SchemaItemType.CustomAttributeClass:\n return this._visitor.visitCustomAttributeClassDifference(difference, index, array);\n case SchemaOtherTypes.CustomAttributeInstance:\n return this._visitor.visitCustomAttributeInstanceDifference(difference, index, array);\n case SchemaItemType.EntityClass:\n return this._visitor.visitEntityClassDifference(difference, index, array);\n case SchemaOtherTypes.EntityClassMixin:\n return this._visitor.visitEntityClassMixinDifference(difference, index, array);\n case SchemaItemType.Enumeration:\n return this._visitor.visitEnumerationDifference(difference, index, array);\n case SchemaOtherTypes.Enumerator:\n return this._visitor.visitEnumeratorDifference(difference, index, array);\n case SchemaItemType.Format:\n return this._visitor.visitFormatDifference(difference, index, array);\n case SchemaOtherTypes.FormatUnit:\n return this._visitor.visitFormatUnitDifference(difference, index, array);\n case SchemaOtherTypes.FormatUnitLabel:\n return this._visitor.visitFormatUnitLabelDifference(difference, index, array);\n case SchemaItemType.InvertedUnit:\n return this._visitor.visitInvertedUnitDifference(difference, index, array);\n case SchemaItemType.KindOfQuantity:\n return this._visitor.visitKindOfQuantityDifference(difference, index, array);\n case SchemaOtherTypes.KindOfQuantityPresentationFormat:\n return this._visitor.visitKindOfQuantityPresentationFormatDifference(difference, index, array);\n case SchemaItemType.Mixin:\n return this._visitor.visitMixinDifference(difference, index, array);\n case SchemaItemType.Phenomenon:\n return this._visitor.visitPhenomenonDifference(difference, index, array);\n case SchemaOtherTypes.Property:\n return this._visitor.visitPropertyDifference(difference, index, array);\n case SchemaItemType.PropertyCategory:\n return this._visitor.visitPropertyCategoryDifference(difference, index, array);\n case SchemaItemType.RelationshipClass:\n return this._visitor.visitRelationshipClassDifference(difference, index, array);\n case SchemaOtherTypes.RelationshipConstraint:\n return this._visitor.visitRelationshipConstraintDifference(difference, index, array);\n case SchemaOtherTypes.RelationshipConstraintClass:\n return this._visitor.visitRelationshipConstraintClassDifference(difference, index, array);\n case SchemaItemType.StructClass:\n return this._visitor.visitStructClassDifference(difference, index, array);\n case SchemaItemType.Unit:\n return this._visitor.visitUnitDifference(difference, index, array);\n case SchemaItemType.UnitSystem:\n return this._visitor.visitUnitSystemDifference(difference, index, array);\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../src/Differencing/Utils.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAiCH,oDAEC;AAMD,8DAEC;AAMD,4EAEC;AAMD,kEAEC;AAMD,0DAEC;AAMD,oEAEC;AAMD,0DAEC;AAMD,wDAEC;AAMD,gEAEC;AAMD,wDAEC;AAMD,wDAEC;AAMD,oEAEC;AAMD,gDAEC;AAMD,kEAEC;AAMD,0DAEC;AAMD,wDAEC;AAMD,sEAEC;AAMD,gFAEC;AAMD,0FAEC;AAMD,wDAEC;AAMD,8CAMC;AArMD,gEAA0D;AAC1D,yDAwB4B;AAE5B;;;GAGG;AACH,SAAgB,oBAAoB,CAAC,UAA+B;IAClE,OAAO,UAAU,CAAC,UAAU,KAAK,kCAAc,CAAC,QAAQ,CAAC;AAC3D,CAAC;AAED;;;GAGG;AACH,SAAgB,yBAAyB,CAAC,UAA+B;IACvE,OAAO,UAAU,CAAC,UAAU,KAAK,mCAAgB,CAAC,QAAQ,CAAC;AAC7D,CAAC;AAED;;;GAGG;AACH,SAAgB,gCAAgC,CAAC,UAA+B;IAC9E,OAAO,UAAU,CAAC,UAAU,KAAK,kCAAc,CAAC,oBAAoB,CAAC;AACvE,CAAC;AAED;;;GAGG;AACH,SAAgB,2BAA2B,CAAC,UAA+B;IACzE,OAAO,UAAU,CAAC,UAAU,KAAK,mCAAgB,CAAC,uBAAuB,CAAC;AAC5E,CAAC;AAED;;;GAGG;AACH,SAAgB,uBAAuB,CAAC,UAA+B;IACrE,OAAO,UAAU,CAAC,UAAU,KAAK,kCAAc,CAAC,WAAW,CAAC;AAC9D,CAAC;AAED;;;GAGG;AACH,SAAgB,4BAA4B,CAAC,UAA+B;IAC1E,OAAO,UAAU,CAAC,UAAU,KAAK,mCAAgB,CAAC,gBAAgB,CAAC;AACrE,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AGG;AACH,SAAgB,6BAA6B,CAAC,UAA+B;IAC3E,OAAO,UAAU,CAAC,UAAU,KAAK,kCAAc,CAAC,iBAAiB,CAAC;AACpE,CAAC;AAED;;;GAGG;AACH,SAAgB,kCAAkC,CAAC,UAA+B;IAChF,OAAO,UAAU,CAAC,UAAU,KAAK,mCAAgB,CAAC,sBAAsB,CAAC;AAC3E,CAAC;AAED;;;GAGG;AACH,SAAgB,uCAAuC,CAAC,UAA+B;IACrF,OAAO,UAAU,CAAC,UAAU,KAAK,mCAAgB,CAAC,2BAA2B,CAAC;AAChF,CAAC;AAED;;;GAGG;AACH,SAAgB,sBAAsB,CAAC,UAA+B;IACpE,OAAO,UAAU,CAAC,UAAU,IAAI,kCAAc,CAAC;AACjD,CAAC;AAED;;;GAGG;AACH,SAAgB,iBAAiB,CAAC,UAA+B;IAC/D,OAAO,uBAAuB,CAAC,UAAU,CAAC;WACrC,gCAAgC,CAAC,UAAU,CAAC;WAC5C,uBAAuB,CAAC,UAAU,CAAC;WACnC,sBAAsB,CAAC,UAAU,CAAC;WAClC,6BAA6B,CAAC,UAAU,CAAC,CAAC;AACjD,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 Differencing\r\n */\r\n\r\nimport { SchemaItemType } from \"@itwin/ecschema-metadata\";\r\nimport {\r\n type AnyClassItemDifference,\r\n type AnySchemaDifference,\r\n type AnySchemaItemDifference,\r\n type ClassPropertyDifference,\r\n type ConstantDifference,\r\n type CustomAttributeClassDifference,\r\n type CustomAttributeDifference,\r\n type EntityClassDifference,\r\n type EntityClassMixinDifference,\r\n type EnumerationDifference,\r\n type EnumeratorDifference,\r\n type KindOfQuantityDifference,\r\n type MixinClassDifference,\r\n type PhenomenonDifference,\r\n type PropertyCategoryDifference,\r\n type RelationshipClassDifference,\r\n type RelationshipConstraintClassDifference,\r\n type RelationshipConstraintDifference,\r\n type SchemaDifference,\r\n SchemaOtherTypes,\r\n type SchemaReferenceDifference,\r\n type StructClassDifference,\r\n type UnitSystemDifference,\r\n} from \"./SchemaDifference\";\r\n\r\n/**\r\n * Indicates whether the given difference is type of ConstantDifference.\r\n * @alpha\r\n */\r\nexport function isConstantDifference(difference: AnySchemaDifference): difference is ConstantDifference {\r\n return difference.schemaType === SchemaItemType.Constant;\r\n}\r\n\r\n/**\r\n * Indicates whether the given difference is type of ClassPropertyDifference.\r\n * @alpha\r\n */\r\nexport function isClassPropertyDifference(difference: AnySchemaDifference): difference is ClassPropertyDifference {\r\n return difference.schemaType === SchemaOtherTypes.Property;\r\n}\r\n\r\n/**\r\n * Indicates whether the given difference is type of CustomAttributeClassDifference.\r\n * @alpha\r\n */\r\nexport function isCustomAttributeClassDifference(difference: AnySchemaDifference): difference is CustomAttributeClassDifference {\r\n return difference.schemaType === SchemaItemType.CustomAttributeClass;\r\n}\r\n\r\n/**\r\n * Indicates whether the given difference is type of CustomAttributeDifference.\r\n * @alpha\r\n */\r\nexport function isCustomAttributeDifference(difference: AnySchemaDifference): difference is CustomAttributeDifference {\r\n return difference.schemaType === SchemaOtherTypes.CustomAttributeInstance;\r\n}\r\n\r\n/**\r\n * Indicates whether the given difference is type of EntityClassDifference.\r\n * @alpha\r\n */\r\nexport function isEntityClassDifference(difference: AnySchemaDifference): difference is EntityClassDifference {\r\n return difference.schemaType === SchemaItemType.EntityClass;\r\n}\r\n\r\n/**\r\n * Indicates whether the given difference is type of EntityClassMixinDifference.\r\n * @alpha\r\n */\r\nexport function isEntityClassMixinDifference(difference: AnySchemaDifference): difference is EntityClassMixinDifference {\r\n return difference.schemaType === SchemaOtherTypes.EntityClassMixin;\r\n}\r\n\r\n/**\r\n * Indicates whether the given difference is type of EnumerationDifference.\r\n * @alpha\r\n */\r\nexport function isEnumerationDifference(difference: AnySchemaDifference): difference is EnumerationDifference {\r\n return difference.schemaType === SchemaItemType.Enumeration;\r\n}\r\n\r\n/**\r\n * Indicates whether the given difference is type of EnumeratorDifference.\r\n * @alpha\r\n */\r\nexport function isEnumeratorDifference(difference: AnySchemaDifference): difference is EnumeratorDifference {\r\n return difference.schemaType === SchemaOtherTypes.Enumerator;\r\n}\r\n\r\n/**\r\n * Indicates whether the given difference is type of KindOfQuantityDifference.\r\n * @alpha\r\n */\r\nexport function isKindOfQuantityDifference(difference: AnySchemaDifference): difference is KindOfQuantityDifference {\r\n return difference.schemaType === SchemaItemType.KindOfQuantity;\r\n}\r\n\r\n/**\r\n * Indicates whether the given difference is type of MixinClassDifference.\r\n * @alpha\r\n */\r\nexport function isMixinClassDifference(difference: AnySchemaDifference): difference is MixinClassDifference {\r\n return difference.schemaType === SchemaItemType.Mixin;\r\n}\r\n\r\n/**\r\n * Indicates whether the given difference is type of PhenomenonDifference.\r\n * @alpha\r\n */\r\nexport function isPhenomenonDifference(difference: AnySchemaDifference): difference is PhenomenonDifference {\r\n return difference.schemaType === SchemaItemType.Phenomenon;\r\n}\r\n\r\n/**\r\n * Indicates whether the given difference is type of PropertyCategoryDifference.\r\n * @alpha\r\n */\r\nexport function isPropertyCategoryDifference(difference: AnySchemaDifference): difference is PropertyCategoryDifference {\r\n return difference.schemaType === SchemaItemType.PropertyCategory;\r\n}\r\n\r\n/**\r\n * Indicates whether the given difference is type of SchemaDifference.\r\n * @alpha\r\n */\r\nexport function isSchemaDifference(difference: AnySchemaDifference): difference is SchemaDifference {\r\n return difference.schemaType === SchemaOtherTypes.Schema;\r\n}\r\n\r\n/**\r\n * Indicates whether the given difference is type of SchemaReferenceDifference.\r\n * @alpha\r\n */\r\nexport function isSchemaReferenceDifference(difference: AnySchemaDifference): difference is SchemaReferenceDifference {\r\n return difference.schemaType === SchemaOtherTypes.SchemaReference;\r\n}\r\n\r\n/**\r\n * Indicates whether the given difference is type of CustomAttributeDifference.\r\n * @alpha\r\n */\r\nexport function isStructClassDifference(difference: AnySchemaDifference): difference is StructClassDifference {\r\n return difference.schemaType === SchemaItemType.StructClass;\r\n}\r\n\r\n/**\r\n * Indicates whether the given difference is type of UnitSystemDifference.\r\n * @alpha\r\n */\r\nexport function isUnitSystemDifference(difference: AnySchemaDifference): difference is UnitSystemDifference {\r\n return difference.schemaType === SchemaItemType.UnitSystem;\r\n}\r\n\r\n/**\r\n * Indicates whether the given difference is type of RelationshipClassDifference.\r\n * @alpha\r\n */\r\nexport function isRelationshipClassDifference(difference: AnySchemaDifference): difference is RelationshipClassDifference {\r\n return difference.schemaType === SchemaItemType.RelationshipClass;\r\n}\r\n\r\n/**\r\n * Indicates whether the given difference is type of RelationshipConstraintDifference.\r\n * @alpha\r\n */\r\nexport function isRelationshipConstraintDifference(difference: AnySchemaDifference): difference is RelationshipConstraintDifference {\r\n return difference.schemaType === SchemaOtherTypes.RelationshipConstraint;\r\n}\r\n\r\n/**\r\n * Indicates whether the given difference is type of RelationshipConstraintClassDifference.\r\n * @alpha\r\n */\r\nexport function isRelationshipConstraintClassDifference(difference: AnySchemaDifference): difference is RelationshipConstraintClassDifference {\r\n return difference.schemaType === SchemaOtherTypes.RelationshipConstraintClass;\r\n}\r\n\r\n/**\r\n * Indicates whether the given difference is type of AnySchemaItemDifference.\r\n * @alpha\r\n */\r\nexport function isSchemaItemDifference(difference: AnySchemaDifference): difference is AnySchemaItemDifference {\r\n return difference.schemaType in SchemaItemType;\r\n}\r\n\r\n/**\r\n * Indicates whether the given difference is type of ClassItemDifference.\r\n * @alpha\r\n */\r\nexport function isClassDifference(difference: AnySchemaDifference): difference is AnyClassItemDifference {\r\n return isStructClassDifference(difference)\r\n || isCustomAttributeClassDifference(difference)\r\n || isEntityClassDifference(difference)\r\n || isMixinClassDifference(difference)\r\n || isRelationshipClassDifference(difference);\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../src/Differencing/Utils.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAi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UAAU,KAAK,mCAAgB,CAAC,sBAAsB,CAAC;AAC3E,CAAC;AAED;;;GAGG;AACH,SAAgB,uCAAuC,CAAC,UAA+B;IACrF,OAAO,UAAU,CAAC,UAAU,KAAK,mCAAgB,CAAC,2BAA2B,CAAC;AAChF,CAAC;AAED;;;GAGG;AACH,SAAgB,sBAAsB,CAAC,UAA+B;IACpE,OAAO,UAAU,CAAC,UAAU,IAAI,kCAAc,CAAC;AACjD,CAAC;AAED;;;GAGG;AACH,SAAgB,iBAAiB,CAAC,UAA+B;IAC/D,OAAO,uBAAuB,CAAC,UAAU,CAAC;WACrC,gCAAgC,CAAC,UAAU,CAAC;WAC5C,uBAAuB,CAAC,UAAU,CAAC;WACnC,sBAAsB,CAAC,UAAU,CAAC;WAClC,6BAA6B,CAAC,UAAU,CAAC,CAAC;AACjD,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 Differencing\n */\n\nimport { SchemaItemType } from \"@itwin/ecschema-metadata\";\nimport {\n type AnyClassItemDifference,\n type AnySchemaDifference,\n type AnySchemaItemDifference,\n type ClassPropertyDifference,\n type ConstantDifference,\n type CustomAttributeClassDifference,\n type CustomAttributeDifference,\n type EntityClassDifference,\n type EntityClassMixinDifference,\n type EnumerationDifference,\n type EnumeratorDifference,\n type KindOfQuantityDifference,\n type MixinClassDifference,\n type PhenomenonDifference,\n type PropertyCategoryDifference,\n type RelationshipClassDifference,\n type RelationshipConstraintClassDifference,\n type RelationshipConstraintDifference,\n type SchemaDifference,\n SchemaOtherTypes,\n type SchemaReferenceDifference,\n type StructClassDifference,\n type UnitSystemDifference,\n} from \"./SchemaDifference\";\n\n/**\n * Indicates whether the given difference is type of ConstantDifference.\n * @alpha\n */\nexport function isConstantDifference(difference: AnySchemaDifference): difference is ConstantDifference {\n return difference.schemaType === SchemaItemType.Constant;\n}\n\n/**\n * Indicates whether the given difference is type of ClassPropertyDifference.\n * @alpha\n */\nexport function isClassPropertyDifference(difference: AnySchemaDifference): difference is ClassPropertyDifference {\n return difference.schemaType === SchemaOtherTypes.Property;\n}\n\n/**\n * Indicates whether the given difference is type of CustomAttributeClassDifference.\n * @alpha\n */\nexport function isCustomAttributeClassDifference(difference: AnySchemaDifference): difference is CustomAttributeClassDifference {\n return difference.schemaType === SchemaItemType.CustomAttributeClass;\n}\n\n/**\n * Indicates whether the given difference is type of CustomAttributeDifference.\n * @alpha\n */\nexport function isCustomAttributeDifference(difference: AnySchemaDifference): difference is CustomAttributeDifference {\n return difference.schemaType === SchemaOtherTypes.CustomAttributeInstance;\n}\n\n/**\n * Indicates whether the given difference is type of EntityClassDifference.\n * @alpha\n */\nexport function isEntityClassDifference(difference: AnySchemaDifference): difference is EntityClassDifference {\n return difference.schemaType === SchemaItemType.EntityClass;\n}\n\n/**\n * Indicates whether the given difference is type of EntityClassMixinDifference.\n * @alpha\n */\nexport function isEntityClassMixinDifference(difference: AnySchemaDifference): difference is EntityClassMixinDifference {\n return difference.schemaType === SchemaOtherTypes.EntityClassMixin;\n}\n\n/**\n * Indicates whether the given difference is type of EnumerationDifference.\n * @alpha\n */\nexport function isEnumerationDifference(difference: AnySchemaDifference): difference is EnumerationDifference {\n return difference.schemaType === SchemaItemType.Enumeration;\n}\n\n/**\n * Indicates whether the given difference is type of EnumeratorDifference.\n * @alpha\n */\nexport function isEnumeratorDifference(difference: AnySchemaDifference): difference is EnumeratorDifference {\n return difference.schemaType === SchemaOtherTypes.Enumerator;\n}\n\n/**\n * Indicates whether the given difference is type of KindOfQuantityDifference.\n * @alpha\n */\nexport function isKindOfQuantityDifference(difference: AnySchemaDifference): difference is KindOfQuantityDifference {\n return difference.schemaType === SchemaItemType.KindOfQuantity;\n}\n\n/**\n * Indicates whether the given difference is type of MixinClassDifference.\n * @alpha\n */\nexport function isMixinClassDifference(difference: AnySchemaDifference): difference is MixinClassDifference {\n return difference.schemaType === SchemaItemType.Mixin;\n}\n\n/**\n * Indicates whether the given difference is type of PhenomenonDifference.\n * @alpha\n */\nexport function isPhenomenonDifference(difference: AnySchemaDifference): difference is PhenomenonDifference {\n return difference.schemaType === SchemaItemType.Phenomenon;\n}\n\n/**\n * Indicates whether the given difference is type of PropertyCategoryDifference.\n * @alpha\n */\nexport function isPropertyCategoryDifference(difference: AnySchemaDifference): difference is PropertyCategoryDifference {\n return difference.schemaType === SchemaItemType.PropertyCategory;\n}\n\n/**\n * Indicates whether the given difference is type of SchemaDifference.\n * @alpha\n */\nexport function isSchemaDifference(difference: AnySchemaDifference): difference is SchemaDifference {\n return difference.schemaType === SchemaOtherTypes.Schema;\n}\n\n/**\n * Indicates whether the given difference is type of SchemaReferenceDifference.\n * @alpha\n */\nexport function isSchemaReferenceDifference(difference: AnySchemaDifference): difference is SchemaReferenceDifference {\n return difference.schemaType === SchemaOtherTypes.SchemaReference;\n}\n\n/**\n * Indicates whether the given difference is type of CustomAttributeDifference.\n * @alpha\n */\nexport function isStructClassDifference(difference: AnySchemaDifference): difference is StructClassDifference {\n return difference.schemaType === SchemaItemType.StructClass;\n}\n\n/**\n * Indicates whether the given difference is type of UnitSystemDifference.\n * @alpha\n */\nexport function isUnitSystemDifference(difference: AnySchemaDifference): difference is UnitSystemDifference {\n return difference.schemaType === SchemaItemType.UnitSystem;\n}\n\n/**\n * Indicates whether the given difference is type of RelationshipClassDifference.\n * @alpha\n */\nexport function isRelationshipClassDifference(difference: AnySchemaDifference): difference is RelationshipClassDifference {\n return difference.schemaType === SchemaItemType.RelationshipClass;\n}\n\n/**\n * Indicates whether the given difference is type of RelationshipConstraintDifference.\n * @alpha\n */\nexport function isRelationshipConstraintDifference(difference: AnySchemaDifference): difference is RelationshipConstraintDifference {\n return difference.schemaType === SchemaOtherTypes.RelationshipConstraint;\n}\n\n/**\n * Indicates whether the given difference is type of RelationshipConstraintClassDifference.\n * @alpha\n */\nexport function isRelationshipConstraintClassDifference(difference: AnySchemaDifference): difference is RelationshipConstraintClassDifference {\n return difference.schemaType === SchemaOtherTypes.RelationshipConstraintClass;\n}\n\n/**\n * Indicates whether the given difference is type of AnySchemaItemDifference.\n * @alpha\n */\nexport function isSchemaItemDifference(difference: AnySchemaDifference): difference is AnySchemaItemDifference {\n return difference.schemaType in SchemaItemType;\n}\n\n/**\n * Indicates whether the given difference is type of ClassItemDifference.\n * @alpha\n */\nexport function isClassDifference(difference: AnySchemaDifference): difference is AnyClassItemDifference {\n return isStructClassDifference(difference)\n || isCustomAttributeClassDifference(difference)\n || isEntityClassDifference(difference)\n || isMixinClassDifference(difference)\n || isRelationshipClassDifference(difference);\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Editing
|
|
3
3
|
*/
|
|
4
|
-
import { ConstantProps, SchemaItemKey, SchemaKey } from "@itwin/ecschema-metadata";
|
|
4
|
+
import { Constant, ConstantProps, SchemaItemKey, SchemaKey } from "@itwin/ecschema-metadata";
|
|
5
5
|
import { SchemaContextEditor } from "./Editor";
|
|
6
6
|
import { SchemaItems } from "./SchemaItems";
|
|
7
7
|
/**
|
|
@@ -9,6 +9,7 @@ import { SchemaItems } from "./SchemaItems";
|
|
|
9
9
|
* A class allowing you to create schema items of type Constant.
|
|
10
10
|
*/
|
|
11
11
|
export declare class Constants extends SchemaItems {
|
|
12
|
+
protected get itemTypeClass(): typeof Constant;
|
|
12
13
|
constructor(schemaEditor: SchemaContextEditor);
|
|
13
14
|
create(schemaKey: SchemaKey, name: string, phenomenon: SchemaItemKey, definition: string, displayLabel?: string, numerator?: number, denominator?: number): Promise<SchemaItemKey>;
|
|
14
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../src/Editing/Constants.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../src/Editing/Constants.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAuC,aAAa,EAAkB,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAClJ,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;GAGG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC,cAAuB,aAAa,IAAI,OAAO,QAAQ,CAEtD;gBAEkB,YAAY,EAAE,mBAAmB;IAIvC,MAAM,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAwB/L;;;;OAIG;IACU,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;CAQzG"}
|
|
@@ -16,13 +16,16 @@ const SchemaItems_1 = require("./SchemaItems");
|
|
|
16
16
|
* A class allowing you to create schema items of type Constant.
|
|
17
17
|
*/
|
|
18
18
|
class Constants extends SchemaItems_1.SchemaItems {
|
|
19
|
+
get itemTypeClass() {
|
|
20
|
+
return ecschema_metadata_1.Constant;
|
|
21
|
+
}
|
|
19
22
|
constructor(schemaEditor) {
|
|
20
23
|
super(ecschema_metadata_1.SchemaItemType.Constant, schemaEditor);
|
|
21
24
|
}
|
|
22
25
|
async create(schemaKey, name, phenomenon, definition, displayLabel, numerator, denominator) {
|
|
23
26
|
try {
|
|
24
27
|
const newConstant = await this.createSchemaItem(schemaKey, this.schemaItemType, (schema) => schema.createConstant.bind(schema), name);
|
|
25
|
-
const newPhenomenon = (await this.getSchemaItem(phenomenon, ecschema_metadata_1.
|
|
28
|
+
const newPhenomenon = (await this.getSchemaItem(phenomenon, ecschema_metadata_1.Phenomenon));
|
|
26
29
|
newConstant.setPhenomenon(new ecschema_metadata_1.DelayedPromiseWithProps(newPhenomenon.key, async () => newPhenomenon));
|
|
27
30
|
newConstant.setDefinition(definition);
|
|
28
31
|
if (numerator)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Constants.js","sourceRoot":"","sources":["../../../src/Editing/Constants.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAAkJ;AAGlJ,2CAAgF;AAChF,+CAA4C;AAE5C;;;GAGG;AACH,MAAa,SAAU,SAAQ,yBAAW;IACxC,YAAmB,YAAiC;QAClD,KAAK,CAAC,kCAAc,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAC/C,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,SAAoB,EAAE,IAAY,EAAE,UAAyB,EAAE,UAAkB,EAAE,YAAqB,EAAE,SAAkB,EAAE,WAAoB;QACpK,IAAI,CAAC;YACH,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAW,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAoB,CAAC;YAEnK,MAAM,aAAa,GAAG,CAAC,MAAM,IAAI,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"Constants.js","sourceRoot":"","sources":["../../../src/Editing/Constants.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAAkJ;AAGlJ,2CAAgF;AAChF,+CAA4C;AAE5C;;;GAGG;AACH,MAAa,SAAU,SAAQ,yBAAW;IACxC,IAAuB,aAAa;QAClC,OAAO,4BAAQ,CAAC;IAClB,CAAC;IAED,YAAmB,YAAiC;QAClD,KAAK,CAAC,kCAAc,C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AAyB,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,CAAC;YACxJ,OAAO,WAAW,CAAC,GAAG,CAAC;QACzB,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YAChB,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,yBAAyB,EAAE,IAAI,wBAAY,CAAC,IAAI,CAAC,cAAc,EAAE,aAAa,CAAC,IAAK,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;QACpJ,CAAC;IACH,CAAC;CACF;AA9CD,8BA8CC","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 { Constant, ConstantProps, DelayedPromiseWithProps, Phenomenon, SchemaItemKey, SchemaItemType, SchemaKey } from \"@itwin/ecschema-metadata\";\nimport { SchemaContextEditor } from \"./Editor\";\nimport { MutableConstant } from \"./Mutable/MutableConstant\";\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 Constant.\n */\nexport class Constants extends SchemaItems {\n protected override get itemTypeClass(): typeof Constant {\n return Constant;\n }\n\n public constructor(schemaEditor: SchemaContextEditor) {\n super(SchemaItemType.Constant, schemaEditor);\n }\n\n public async create(schemaKey: SchemaKey, name: string, phenomenon: SchemaItemKey, definition: string, displayLabel?: string, numerator?: number, denominator?: number): Promise<SchemaItemKey> {\n try {\n const newConstant = await this.createSchemaItem<Constant>(schemaKey, this.schemaItemType, (schema) => schema.createConstant.bind(schema), name) as MutableConstant;\n\n const newPhenomenon = (await this.getSchemaItem(phenomenon, Phenomenon));\n newConstant.setPhenomenon(new DelayedPromiseWithProps<SchemaItemKey, Phenomenon>(newPhenomenon.key, async () => newPhenomenon));\n\n newConstant.setDefinition(definition);\n\n if (numerator)\n newConstant.setNumerator(numerator);\n\n if (denominator)\n newConstant.setDenominator(denominator);\n\n if (displayLabel)\n newConstant.setDisplayLabel(displayLabel);\n\n return newConstant.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 Constant through a ConstantProps.\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, constantProps: ConstantProps): Promise<SchemaItemKey> {\n try {\n const newConstant = await this.createSchemaItemFromProps(schemaKey, this.schemaItemType, (schema) => schema.createConstant.bind(schema), constantProps);\n return newConstant.key;\n } catch (e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFromProps, new SchemaItemId(this.schemaItemType, constantProps.name!, schemaKey), e);\n }\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Editing
|
|
3
3
|
*/
|
|
4
|
-
import { CustomAttributeClassProps, CustomAttributeContainerType, SchemaItemKey, SchemaKey } from "@itwin/ecschema-metadata";
|
|
4
|
+
import { CustomAttributeClass, CustomAttributeClassProps, CustomAttributeContainerType, SchemaItemKey, SchemaKey } from "@itwin/ecschema-metadata";
|
|
5
5
|
import { SchemaContextEditor } from "./Editor";
|
|
6
6
|
import { ECClasses } from "./ECClasses";
|
|
7
7
|
/**
|
|
@@ -10,6 +10,7 @@ import { ECClasses } from "./ECClasses";
|
|
|
10
10
|
*/
|
|
11
11
|
export declare class CustomAttributes extends ECClasses {
|
|
12
12
|
constructor(schemaEditor: SchemaContextEditor);
|
|
13
|
+
protected get itemTypeClass(): typeof CustomAttributeClass;
|
|
13
14
|
create(schemaKey: SchemaKey, name: string, appliesTo: CustomAttributeContainerType, displayLabel?: string, baseClassKey?: SchemaItemKey): Promise<SchemaItemKey>;
|
|
14
15
|
/**
|
|
15
16
|
* Creates a CustomAttributeClass through a CustomAttributeClassProps.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomAttributes.d.ts","sourceRoot":"","sources":["../../../src/Editing/CustomAttributes.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"CustomAttributes.d.ts","sourceRoot":"","sources":["../../../src/Editing/CustomAttributes.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EAAE,4BAA4B,EACvD,aAAa,EAAkB,SAAS,EACzC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,SAAS;gBAC1B,YAAY,EAAE,mBAAmB;IAIpD,cAAuB,aAAa,IAAI,OAAO,oBAAoB,CAElE;IAEY,MAAM,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,4BAA4B,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;IAc7K;;;;OAIG;IACU,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,aAAa,CAAC;CAQ/G"}
|
|
@@ -19,6 +19,9 @@ class CustomAttributes extends ECClasses_1.ECClasses {
|
|
|
19
19
|
constructor(schemaEditor) {
|
|
20
20
|
super(ecschema_metadata_1.SchemaItemType.CustomAttributeClass, schemaEditor);
|
|
21
21
|
}
|
|
22
|
+
get itemTypeClass() {
|
|
23
|
+
return ecschema_metadata_1.CustomAttributeClass;
|
|
24
|
+
}
|
|
22
25
|
async create(schemaKey, name, appliesTo, displayLabel, baseClassKey) {
|
|
23
26
|
try {
|
|
24
27
|
const newClass = await this.createClass(schemaKey, this.schemaItemType, (schema) => schema.createCustomAttributeClass.bind(schema), name, baseClassKey);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomAttributes.js","sourceRoot":"","sources":["../../../src/Editing/CustomAttributes.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAIkC;AAElC,2CAAwC;AAExC,2CAA2E;AAE3E;;;GAGG;AACH,MAAa,gBAAiB,SAAQ,qBAAS;IAC7C,YAAmB,YAAiC;QAClD,KAAK,CAAC,kCAAc,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAAC;IAC3D,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,SAAoB,EAAE,IAAY,EAAE,SAAuC,EAAE,YAAqB,EAAE,YAA4B;QAClJ,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CAAuB,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,0BAA0B,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,YAAY,CAAmB,CAAC;YAEhM,IAAI,YAAY;gBACd,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;YAEzC,QAAQ,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;YACjC,OAAO,QAAQ,CAAC,GAAG,CAAC;QACtB,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YAChB,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,sBAAsB,EAAE,IAAI,mBAAO,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;QAC7H,CAAC;IACH,CAAC;I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mB,CAAC;YAEhM,IAAI,YAAY;gBACd,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;YAEzC,QAAQ,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;YACjC,OAAO,QAAQ,CAAC,GAAG,CAAC;QACtB,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YAChB,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,sBAAsB,EAAE,IAAI,mBAAO,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;QAC7H,CAAC;IACH,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,eAAe,CAAC,SAAoB,EAAE,OAAkC;QACnF,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,0BAA0B,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC;YAC3J,OAAO,QAAQ,CAAC,GAAG,CAAC;QACtB,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YAChB,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,yBAAyB,EAAE,IAAI,mBAAO,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,IAAK,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;QACzI,CAAC;IACH,CAAC;CACF;AApCD,4CAoCC","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 CustomAttributeClass,\n CustomAttributeClassProps, CustomAttributeContainerType,\n SchemaItemKey, SchemaItemType, SchemaKey,\n} from \"@itwin/ecschema-metadata\";\nimport { SchemaContextEditor } from \"./Editor\";\nimport { ECClasses } from \"./ECClasses\";\nimport { MutableCAClass } from \"./Mutable/MutableCAClass\";\nimport { ClassId, ECEditingStatus, SchemaEditingError } from \"./Exception\";\n\n/**\n * @alpha\n * A class extending ECClasses allowing you to create schema items of type CustomAttributeClass.\n */\nexport class CustomAttributes extends ECClasses {\n public constructor(schemaEditor: SchemaContextEditor) {\n super(SchemaItemType.CustomAttributeClass, schemaEditor);\n }\n\n protected override get itemTypeClass(): typeof CustomAttributeClass {\n return CustomAttributeClass;\n }\n\n public async create(schemaKey: SchemaKey, name: string, appliesTo: CustomAttributeContainerType, displayLabel?: string, baseClassKey?: SchemaItemKey): Promise<SchemaItemKey> {\n try {\n const newClass = await this.createClass<CustomAttributeClass>(schemaKey, this.schemaItemType, (schema) => schema.createCustomAttributeClass.bind(schema), name, baseClassKey) as MutableCAClass;\n\n if (displayLabel)\n newClass.setDisplayLabel(displayLabel);\n\n newClass.setAppliesTo(appliesTo);\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 CustomAttributeClass through a CustomAttributeClassProps.\n * @param schemaKey a SchemaKey of the Schema that will house the new object.\n * @param caProps a json object that will be used to populate the new CustomAttributeClass. Needs a name value passed in.\n */\n public async createFromProps(schemaKey: SchemaKey, caProps: CustomAttributeClassProps): Promise<SchemaItemKey> {\n try {\n const newClass = await this.createSchemaItemFromProps(schemaKey, this.schemaItemType, (schema) => schema.createCustomAttributeClass.bind(schema), caProps);\n return newClass.key;\n } catch (e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFromProps, new ClassId(this.schemaItemType, caProps.name!, schemaKey), e);\n }\n }\n}\n"]}
|
|
@@ -13,6 +13,12 @@ export type ECClassSchemaItems = SchemaItemType.EntityClass | SchemaItemType.Str
|
|
|
13
13
|
export declare class ECClasses extends SchemaItems {
|
|
14
14
|
protected constructor(schemaItemType: ECClassSchemaItems, schemaEditor: SchemaContextEditor);
|
|
15
15
|
protected schemaItemType: ECClassSchemaItems;
|
|
16
|
+
/**
|
|
17
|
+
* Allows access for the editors itemType class instance.
|
|
18
|
+
* It returns ECClass here, but editors for subclasses will override this to return the
|
|
19
|
+
* appropriate subclass.
|
|
20
|
+
*/
|
|
21
|
+
protected get itemTypeClass(): typeof ECClass;
|
|
16
22
|
/**
|
|
17
23
|
* Allows access for editing of base Property attributes.
|
|
18
24
|
*/
|
|
@@ -76,6 +82,5 @@ export declare class ECClasses extends SchemaItems {
|
|
|
76
82
|
setBaseClass(itemKey: SchemaItemKey, baseClassKey?: SchemaItemKey): Promise<void>;
|
|
77
83
|
private getClass;
|
|
78
84
|
protected removeCustomAttribute(container: CustomAttributeContainerProps, customAttribute: CustomAttribute): void;
|
|
79
|
-
private findDerivedClasses;
|
|
80
85
|
}
|
|
81
86
|
//# sourceMappingURL=ECClasses.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ECClasses.d.ts","sourceRoot":"","sources":["../../../src/Editing/ECClasses.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EACL,eAAe,EACf,6BAA6B,EAE7B,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,2BAA2B,EAC3E,sBAAsB,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"ECClasses.d.ts","sourceRoot":"","sources":["../../../src/Editing/ECClasses.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EACL,eAAe,EACf,6BAA6B,EAE7B,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,2BAA2B,EAC3E,sBAAsB,EAAE,aAAa,EAAc,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,wBAAwB,EACrH,WAAW,EAAE,mBAAmB,EACjC,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG/C,OAAO,EAAE,eAAe,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AAE,WAAW,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAUxI,yBAAyB,CAAC,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IASlG,kCAAkC,CAAC,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;IAUlJ,cAAc,CAAC,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASpE,MAAM,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAa3D;;;;OAIG;IACU,kBAAkB,CAAC,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBzG;;;;OAIG;IACU,YAAY,CAAC,OAAO,EAAE,aAAa,EAAE,YAAY,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;YAsBhF,QAAQ;IAatB,SAAS,CAAC,qBAAqB,CAAC,SAAS,EAAE,6BAA6B,EAAE,eAAe,EAAE,eAAe;CAK3G"}
|
|
@@ -21,34 +21,50 @@ const SchemaItems_1 = require("./SchemaItems");
|
|
|
21
21
|
class ECClasses extends SchemaItems_1.SchemaItems {
|
|
22
22
|
constructor(schemaItemType, schemaEditor) {
|
|
23
23
|
super(schemaItemType, schemaEditor);
|
|
24
|
-
|
|
25
|
-
* Allows access for editing of base Property attributes.
|
|
26
|
-
*/
|
|
24
|
+
this.schemaItemType = schemaItemType;
|
|
27
25
|
this.properties = new Properties_1.Properties(this.schemaItemType, this.schemaEditor);
|
|
28
|
-
/**
|
|
29
|
-
* Allows access for editing of ArrayProperty attributes.
|
|
30
|
-
*/
|
|
31
26
|
this.arrayProperties = new Properties_1.ArrayProperties(this.schemaItemType, this.schemaEditor);
|
|
32
|
-
/**
|
|
33
|
-
* Allows access for editing of PrimitiveProperty attributes.
|
|
34
|
-
*/
|
|
35
27
|
this.primitiveProperties = new Properties_1.PrimitiveProperties(this.schemaItemType, this.schemaEditor);
|
|
36
|
-
/**
|
|
37
|
-
* Allows access for editing of EnumerationProperty attributes.
|
|
38
|
-
*/
|
|
39
28
|
this.enumerationProperties = new Properties_1.EnumerationProperties(this.schemaItemType, this.schemaEditor);
|
|
40
|
-
/**
|
|
41
|
-
* Allows access for editing of StructProperty attributes.
|
|
42
|
-
*/
|
|
43
29
|
this.structProperties = new Properties_1.StructProperties(this.schemaItemType, this.schemaEditor);
|
|
44
|
-
this.schemaItemType = schemaItemType;
|
|
45
30
|
}
|
|
31
|
+
schemaItemType;
|
|
32
|
+
/**
|
|
33
|
+
* Allows access for the editors itemType class instance.
|
|
34
|
+
* It returns ECClass here, but editors for subclasses will override this to return the
|
|
35
|
+
* appropriate subclass.
|
|
36
|
+
*/
|
|
37
|
+
get itemTypeClass() {
|
|
38
|
+
return ecschema_metadata_1.ECClass;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Allows access for editing of base Property attributes.
|
|
42
|
+
*/
|
|
43
|
+
properties;
|
|
44
|
+
/**
|
|
45
|
+
* Allows access for editing of ArrayProperty attributes.
|
|
46
|
+
*/
|
|
47
|
+
arrayProperties;
|
|
48
|
+
/**
|
|
49
|
+
* Allows access for editing of PrimitiveProperty attributes.
|
|
50
|
+
*/
|
|
51
|
+
primitiveProperties;
|
|
52
|
+
/**
|
|
53
|
+
* Allows access for editing of EnumerationProperty attributes.
|
|
54
|
+
*/
|
|
55
|
+
enumerationProperties;
|
|
56
|
+
/**
|
|
57
|
+
* Allows access for editing of StructProperty attributes.
|
|
58
|
+
*/
|
|
59
|
+
structProperties;
|
|
46
60
|
async createClass(schemaKey, type, create, name, baseClassKey, ...args) {
|
|
47
61
|
const newClass = await this.createSchemaItem(schemaKey, type, create, name, ...args);
|
|
48
62
|
if (baseClassKey !== undefined) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
63
|
+
if (!await this.schemaEditor.schemaContext.getSchema(baseClassKey.schemaKey)) {
|
|
64
|
+
throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.SchemaNotFound, new Exception_1.SchemaId(baseClassKey.schemaKey));
|
|
65
|
+
}
|
|
66
|
+
const baseClassItem = await this.getSchemaItem(baseClassKey, this.itemTypeClass);
|
|
67
|
+
await newClass.setBaseClass(new ecschema_metadata_1.DelayedPromiseWithProps(baseClassKey, async () => baseClassItem));
|
|
52
68
|
}
|
|
53
69
|
return newClass;
|
|
54
70
|
}
|
|
@@ -204,7 +220,7 @@ class ECClasses extends SchemaItems_1.SchemaItems {
|
|
|
204
220
|
async delete(classKey) {
|
|
205
221
|
try {
|
|
206
222
|
const schema = await this.getSchema(classKey.schemaKey);
|
|
207
|
-
const ecClass = await schema.getItem(classKey.name);
|
|
223
|
+
const ecClass = await schema.getItem(classKey.name, this.itemTypeClass);
|
|
208
224
|
if (ecClass === undefined)
|
|
209
225
|
return;
|
|
210
226
|
await schema.deleteClass(ecClass.name);
|
|
@@ -243,16 +259,18 @@ class ECClasses extends SchemaItems_1.SchemaItems {
|
|
|
243
259
|
*/
|
|
244
260
|
async setBaseClass(itemKey, baseClassKey) {
|
|
245
261
|
try {
|
|
246
|
-
const classItem = await this.getSchemaItem(itemKey);
|
|
262
|
+
const classItem = await this.getSchemaItem(itemKey, this.itemTypeClass);
|
|
247
263
|
if (!baseClassKey) {
|
|
248
|
-
classItem.
|
|
264
|
+
await classItem.setBaseClass(undefined);
|
|
249
265
|
return;
|
|
250
266
|
}
|
|
251
|
-
|
|
252
|
-
|
|
267
|
+
if (!await this.schemaEditor.schemaContext.getSchema(baseClassKey.schemaKey)) {
|
|
268
|
+
throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.SchemaNotFound, new Exception_1.SchemaId(baseClassKey.schemaKey));
|
|
269
|
+
}
|
|
270
|
+
const baseClassItem = await this.getSchemaItem(baseClassKey, this.itemTypeClass);
|
|
253
271
|
if (classItem.baseClass !== undefined && !await baseClassItem.is(await classItem.baseClass))
|
|
254
272
|
throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.InvalidBaseClass, new Exception_1.ClassId(this.schemaItemType, baseClassKey), undefined, undefined, `Base class ${baseClassKey.fullName} must derive from ${(await classItem.baseClass).fullName}.`);
|
|
255
|
-
classItem.
|
|
273
|
+
await classItem.setBaseClass(new ecschema_metadata_1.DelayedPromiseWithProps(baseClassKey, async () => baseClassItem));
|
|
256
274
|
}
|
|
257
275
|
catch (e) {
|
|
258
276
|
throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.SetBaseClass, new Exception_1.ClassId(this.schemaItemType, itemKey), e);
|
|
@@ -263,16 +281,8 @@ class ECClasses extends SchemaItems_1.SchemaItems {
|
|
|
263
281
|
const ecClass = await schema.getItem(classKey.name);
|
|
264
282
|
if (ecClass === undefined)
|
|
265
283
|
throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.SchemaItemNotFound, new Exception_1.ClassId(this.schemaItemType, classKey));
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
case ecschema_metadata_1.SchemaItemType.Mixin:
|
|
269
|
-
case ecschema_metadata_1.SchemaItemType.StructClass:
|
|
270
|
-
case ecschema_metadata_1.SchemaItemType.CustomAttributeClass:
|
|
271
|
-
case ecschema_metadata_1.SchemaItemType.RelationshipClass:
|
|
272
|
-
break;
|
|
273
|
-
default:
|
|
274
|
-
throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.InvalidSchemaItemType, new Exception_1.ClassId(this.schemaItemType, classKey));
|
|
275
|
-
}
|
|
284
|
+
if (!isMutableClass(ecClass))
|
|
285
|
+
throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.InvalidSchemaItemType, new Exception_1.ClassId(this.schemaItemType, classKey));
|
|
276
286
|
return ecClass;
|
|
277
287
|
}
|
|
278
288
|
removeCustomAttribute(container, customAttribute) {
|
|
@@ -280,20 +290,9 @@ class ECClasses extends SchemaItems_1.SchemaItems {
|
|
|
280
290
|
const map = container.customAttributes;
|
|
281
291
|
map.delete(customAttribute.className);
|
|
282
292
|
}
|
|
283
|
-
async findDerivedClasses(mutableClass) {
|
|
284
|
-
const derivedClasses = [];
|
|
285
|
-
const schemaItems = this.schemaEditor.schemaContext.getSchemaItems();
|
|
286
|
-
let { value, done } = schemaItems.next();
|
|
287
|
-
while (!done) {
|
|
288
|
-
if (await value.is(mutableClass)) {
|
|
289
|
-
if (!mutableClass.key.matches(value.key)) {
|
|
290
|
-
derivedClasses.push(value);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
({ value, done } = schemaItems.next());
|
|
294
|
-
}
|
|
295
|
-
return derivedClasses;
|
|
296
|
-
}
|
|
297
293
|
}
|
|
298
294
|
exports.ECClasses = ECClasses;
|
|
295
|
+
function isMutableClass(schemaItem) {
|
|
296
|
+
return ecschema_metadata_1.ECClass.isECClass(schemaItem);
|
|
297
|
+
}
|
|
299
298
|
//# sourceMappingURL=ECClasses.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ECClasses.js","sourceRoot":"","sources":["../../../src/Editing/ECClasses.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAOkC;AAClC,sDAA6C;AAG7C,+CAA+C;AAC/C,6CAAyH;AACzH,2CAAwH;AAExH,+CAA8D;AAK9D;;;GAGG;AACH,MAAa,SAAU,SAAQ,yBAAW;IAExC,YAAsB,cAAkC,EAAE,YAAiC;QACzF,KAAK,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;QAMtC;;WAEG;QACa,eAAU,GAAG,IAAI,uBAAU,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QACpF;;WAEG;QACa,oBAAe,GAAG,IAAI,4BAAe,CAAC,IAAI,CAAC,cAA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,CAAC,IAAI,EAAE,CAAC;YACb,IAAI,MAAM,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC;gBACjC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;oBACzC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAC7B,CAAC;YACH,CAAC;YACD,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;QACzC,CAAC;QAED,OAAO,cAAc,CAAC;IACxB,CAAC;CACF;AA9SD,8BA8SC","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 CustomAttribute,\r\n CustomAttributeContainerProps,\r\n DelayedPromiseWithProps,\r\n ECClass, Enumeration, EnumerationPropertyProps, PrimitiveArrayPropertyProps,\r\n PrimitivePropertyProps, PrimitiveType, SchemaItemKey, SchemaItemType, SchemaKey, StructArrayPropertyProps,\r\n StructClass, StructPropertyProps,\r\n} from \"@itwin/ecschema-metadata\";\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { SchemaContextEditor } from \"./Editor\";\r\nimport { MutableClass } from \"./Mutable/MutableClass\";\r\nimport * as Rules from \"../Validation/ECRules\";\r\nimport { ArrayProperties, EnumerationProperties, PrimitiveProperties, Properties, StructProperties } from \"./Properties\";\r\nimport { ClassId, CustomAttributeId, ECEditingStatus, PropertyId, SchemaEditingError, SchemaItemId } from \"./Exception\";\r\nimport { AnyDiagnostic } from \"../Validation/Diagnostic\";\r\nimport { CreateSchemaItem, SchemaItems } from \"./SchemaItems\";\r\nimport { MutableSchema } from \"./Mutable/MutableSchema\";\r\n\r\nexport type ECClassSchemaItems = SchemaItemType.EntityClass | SchemaItemType.StructClass | SchemaItemType.RelationshipClass | SchemaItemType.Mixin | SchemaItemType.CustomAttributeClass;\r\n\r\n/**\r\n * @alpha\r\n * Acts as a base class for schema class creation. Enables property creation.\r\n */\r\nexport class ECClasses extends SchemaItems{\r\n\r\n protected constructor(schemaItemType: ECClassSchemaItems, schemaEditor: SchemaContextEditor) {\r\n super(schemaItemType, schemaEditor);\r\n this.schemaItemType = schemaItemType;\r\n }\r\n\r\n protected override schemaItemType: ECClassSchemaItems;\r\n\r\n /**\r\n * Allows access for editing of base Property attributes.\r\n */\r\n public readonly properties = new Properties(this.schemaItemType, this.schemaEditor);\r\n /**\r\n * Allows access for editing of ArrayProperty attributes.\r\n */\r\n public readonly arrayProperties = new ArrayProperties(this.schemaItemType, this.schemaEditor);\r\n /**\r\n * Allows access for editing of PrimitiveProperty attributes.\r\n */\r\n public readonly primitiveProperties = new PrimitiveProperties(this.schemaItemType, this.schemaEditor);\r\n /**\r\n * Allows access for editing of EnumerationProperty attributes.\r\n */\r\n public readonly enumerationProperties = new EnumerationProperties(this.schemaItemType, this.schemaEditor);\r\n /**\r\n * Allows access for editing of StructProperty attributes.\r\n */\r\n public readonly structProperties = new StructProperties(this.schemaItemType, this.schemaEditor);\r\n\r\n public async createClass<T extends ECClass>(schemaKey: SchemaKey, type: SchemaItemType, create: CreateSchemaItem<T>, name: string, baseClassKey?: SchemaItemKey, ...args: any[]): Promise<T> {\r\n const newClass = await this.createSchemaItem(schemaKey, type, create, name, ...args);\r\n\r\n if (baseClassKey !== undefined) {\r\n const baseClassSchema = !baseClassKey.schemaKey.matches(newClass.schema.schemaKey) ? await this.getSchema(baseClassKey.schemaKey) : newClass.schema as MutableSchema;\r\n const baseClassItem = await this.lookupSchemaItem<ECClass>(baseClassSchema, baseClassKey);\r\n newClass.baseClass = new DelayedPromiseWithProps<SchemaItemKey, T>(baseClassKey, async () => baseClassItem as T);\r\n }\r\n\r\n return newClass;\r\n }\r\n\r\n /**\r\n * Creates a property on class identified by the given SchemaItemKey. This method restricts the\r\n * property type to primitives of type Double, String, DateTime and Integer.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param name The name of the new property.\r\n * @param type The PrimitiveType assigned to the new property.\r\n */\r\n public async createProperty(classKey: SchemaItemKey, name: string, type: PrimitiveType, prefix: string): Promise<void> {\r\n if (type !== PrimitiveType.Double && type !== PrimitiveType.String && type !== PrimitiveType.DateTime\r\n && type !== PrimitiveType.Integer)\r\n throw new Error (\"Property creation is restricted to type Double, String, DateTime, and Integer.\");\r\n\r\n if (\"\" === prefix)\r\n throw new Error(\"The specified property name prefix is invalid\");\r\n\r\n const prefixedName = `${prefix}_${name}`;\r\n\r\n const mutableClass = await this.getClass(classKey);\r\n\r\n await mutableClass.createPrimitiveProperty(prefixedName, type);\r\n }\r\n\r\n /**\r\n * Create a primitive property on class identified by the given SchemaItemKey.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param name The name of the new property.\r\n * @param type The PrimitiveType assigned to the new property.\r\n */\r\n public async createPrimitiveProperty(classKey: SchemaItemKey, name: string, type: PrimitiveType): Promise<void> {\r\n try {\r\n const mutableClass = await this.getClass(classKey);\r\n await mutableClass.createPrimitiveProperty(name, type);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreatePrimitiveProperty, new PropertyId(this.schemaItemType, classKey, name), e);\r\n }\r\n }\r\n\r\n public async createPrimitivePropertyFromProps(classKey: SchemaItemKey, name: string, type: PrimitiveType, primitiveProps: PrimitivePropertyProps): Promise<void> {\r\n try {\r\n const mutableClass = await this.getClass(classKey);\r\n const newProperty = await mutableClass.createPrimitiveProperty(name, type);\r\n await newProperty.fromJSON(primitiveProps);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreatePrimitivePropertyFromProps, new PropertyId(this.schemaItemType, classKey, name), e);\r\n }\r\n }\r\n\r\n public async createEnumerationProperty(classKey: SchemaItemKey, name: string, type: Enumeration): Promise<void> {\r\n try {\r\n const mutableClass = await this.getClass(classKey);\r\n const enumSchemaItemKey = mutableClass.schema.getSchemaItemKey(type.fullName);\r\n if (enumSchemaItemKey === undefined)\r\n throw new SchemaEditingError(ECEditingStatus.SchemaItemNotFound, new SchemaItemId(SchemaItemType.Enumeration, type.name, mutableClass.schema.schemaKey));\r\n\r\n await mutableClass.createPrimitiveProperty(name, type);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateEnumerationProperty, new PropertyId(this.schemaItemType, classKey, name), e);\r\n }\r\n }\r\n\r\n public async createEnumerationPropertyFromProps(classKey: SchemaItemKey, name: string, type: Enumeration, enumProps: EnumerationPropertyProps): Promise<void> {\r\n try {\r\n const mutableClass = await this.getClass(classKey);\r\n const newProperty = await mutableClass.createPrimitiveProperty(name, type);\r\n await newProperty.fromJSON(enumProps);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateEnumerationArrayPropertyFromProps, new PropertyId(this.schemaItemType, classKey, name), e);\r\n }\r\n }\r\n\r\n public async createPrimitiveArrayProperty(classKey: SchemaItemKey, name: string, type: PrimitiveType): Promise<void> {\r\n try {\r\n const mutableClass = await this.getClass(classKey);\r\n await mutableClass.createPrimitiveArrayProperty(name, type);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreatePrimitiveArrayProperty, new PropertyId(this.schemaItemType, classKey, name), e);\r\n }\r\n }\r\n\r\n public async createPrimitiveArrayPropertyFromProps(classKey: SchemaItemKey, name: string, type: PrimitiveType, primitiveProps: PrimitiveArrayPropertyProps): Promise<void> {\r\n try {\r\n const mutableClass = await this.getClass(classKey);\r\n const newProperty = await mutableClass.createPrimitiveArrayProperty(name, type);\r\n await newProperty.fromJSON(primitiveProps);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreatePrimitiveArrayPropertyFromProps, new PropertyId(this.schemaItemType, classKey, name), e);\r\n }\r\n }\r\n\r\n public async createEnumerationArrayProperty(classKey: SchemaItemKey, name: string, type: Enumeration): Promise<void> {\r\n try {\r\n const mutableClass = await this.getClass(classKey);\r\n await mutableClass.createPrimitiveArrayProperty(name, type);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateEnumerationArrayProperty, new PropertyId(this.schemaItemType, classKey, name), e);\r\n }\r\n }\r\n\r\n public async createEnumerationArrayPropertyFromProps(classKey: SchemaItemKey, name: string, type: Enumeration, props: PrimitiveArrayPropertyProps): Promise<void> {\r\n try {\r\n const mutableClass = await this.getClass(classKey);\r\n const newProperty = await mutableClass.createPrimitiveArrayProperty(name, type);\r\n await newProperty.fromJSON(props);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateEnumerationArrayPropertyFromProps, new PropertyId(this.schemaItemType, classKey, name), e);\r\n }\r\n }\r\n\r\n public async createStructProperty(classKey: SchemaItemKey, name: string, type: StructClass): Promise<void> {\r\n try {\r\n const mutableClass = await this.getClass(classKey);\r\n await mutableClass.createStructProperty(name, type);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateStructProperty, new PropertyId(this.schemaItemType, classKey, name), e);\r\n }\r\n }\r\n\r\n public async createStructPropertyFromProps(classKey: SchemaItemKey, name: string, type: StructClass, structProps: StructPropertyProps): Promise<void> {\r\n try {\r\n const mutableClass = await this.getClass(classKey);\r\n const newProperty = await mutableClass.createStructProperty(name, type);\r\n await newProperty.fromJSON(structProps);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateStructPropertyFromProps, new PropertyId(this.schemaItemType, classKey, name), e);\r\n }\r\n }\r\n\r\n public async createStructArrayProperty(classKey: SchemaItemKey, name: string, type: StructClass): Promise<void> {\r\n try {\r\n const mutableClass = await this.getClass(classKey);\r\n await mutableClass.createStructArrayProperty(name, type);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateStructArrayProperty, new PropertyId(this.schemaItemType, classKey, name), e);\r\n }\r\n }\r\n\r\n public async createStructArrayPropertyFromProps(classKey: SchemaItemKey, name: string, type: StructClass, structProps: StructArrayPropertyProps): Promise<void> {\r\n try {\r\n const mutableClass = await this.getClass(classKey);\r\n const newProperty = await mutableClass.createStructArrayProperty(name, type);\r\n await newProperty.fromJSON(structProps);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateStructArrayPropertyFromProps, new PropertyId(this.schemaItemType, classKey, name), e);\r\n }\r\n }\r\n\r\n public async deleteProperty(classKey: SchemaItemKey, name: string): Promise<void> {\r\n try {\r\n const mutableClass = await this.getClass(classKey);\r\n await mutableClass.deleteProperty(name);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.DeleteProperty, new PropertyId(this.schemaItemType, classKey, name), e);\r\n }\r\n }\r\n\r\n public async delete(classKey: SchemaItemKey): Promise<void> {\r\n try {\r\n const schema = await this.getSchema(classKey.schemaKey);\r\n const ecClass = await schema.getItem<ECClass>(classKey.name);\r\n if (ecClass === undefined)\r\n return;\r\n\r\n await schema.deleteClass(ecClass.name);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.DeleteClass, new ClassId(this.schemaItemType, classKey), e);\r\n }\r\n }\r\n\r\n /**\r\n * Adds a CustomAttribute instance to the Class identified by the given SchemaItemKey\r\n * @param classKey The SchemaItemKey identifying the schema.\r\n * @param customAttribute The CustomAttribute instance to add.\r\n */\r\n public async addCustomAttribute(classKey: SchemaItemKey, customAttribute: CustomAttribute): Promise<void> {\r\n try {\r\n const mutableClass = await this.getClass(classKey);\r\n mutableClass.addCustomAttribute(customAttribute);\r\n\r\n const diagnosticIterable = Rules.validateCustomAttributeInstance(mutableClass, customAttribute);\r\n\r\n const diagnostics: AnyDiagnostic[] = [];\r\n for await (const diagnostic of diagnosticIterable) {\r\n diagnostics.push(diagnostic);\r\n }\r\n\r\n if (diagnostics.length > 0) {\r\n this.removeCustomAttribute(mutableClass, customAttribute);\r\n throw new SchemaEditingError(ECEditingStatus.RuleViolation, new CustomAttributeId(customAttribute.className, mutableClass), undefined, diagnostics);\r\n }\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.AddCustomAttributeToClass, new ClassId(this.schemaItemType, classKey), e);\r\n }\r\n }\r\n\r\n /**\r\n * Sets the base class of a SchemaItem.\r\n * @param itemKey The SchemaItemKey of the Item.\r\n * @param baseClassKey The SchemaItemKey of the base class. Specifying 'undefined' removes the base class.\r\n */\r\n public async setBaseClass(itemKey: SchemaItemKey, baseClassKey?: SchemaItemKey): Promise<void> {\r\n try {\r\n const classItem = await this.getSchemaItem<ECClass>(itemKey);\r\n if (!baseClassKey) {\r\n classItem.baseClass = undefined;\r\n return;\r\n }\r\n\r\n const baseClassSchema = !baseClassKey.schemaKey.matches(itemKey.schemaKey) ? await this.getSchema(baseClassKey.schemaKey) : classItem.schema as MutableSchema;\r\n const baseClassItem = await this.lookupSchemaItem<ECClass>(baseClassSchema, baseClassKey);\r\n if (classItem.baseClass !== undefined && !await baseClassItem.is(await classItem.baseClass))\r\n throw new SchemaEditingError(ECEditingStatus.InvalidBaseClass, new ClassId(this.schemaItemType, baseClassKey), undefined, undefined, `Base class ${baseClassKey.fullName} must derive from ${(await classItem.baseClass).fullName}.`);\r\n\r\n classItem.baseClass = new DelayedPromiseWithProps<SchemaItemKey, ECClass>(baseClassKey, async () => baseClassItem);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.SetBaseClass, new ClassId(this.schemaItemType, itemKey), e);\r\n }\r\n }\r\n\r\n private async getClass(classKey: SchemaItemKey): Promise<MutableClass> {\r\n const schema = await this.getSchema(classKey.schemaKey);\r\n\r\n const ecClass = await schema.getItem<MutableClass>(classKey.name);\r\n if (ecClass === undefined)\r\n throw new SchemaEditingError(ECEditingStatus.SchemaItemNotFound, new ClassId(this.schemaItemType, classKey));\r\n\r\n switch (ecClass.schemaItemType) {\r\n case SchemaItemType.EntityClass:\r\n case SchemaItemType.Mixin:\r\n case SchemaItemType.StructClass:\r\n case SchemaItemType.CustomAttributeClass:\r\n case SchemaItemType.RelationshipClass:\r\n break;\r\n default:\r\n throw new SchemaEditingError(ECEditingStatus.InvalidSchemaItemType, new ClassId(this.schemaItemType, classKey));\r\n }\r\n\r\n return ecClass;\r\n }\r\n\r\n protected removeCustomAttribute(container: CustomAttributeContainerProps, customAttribute: CustomAttribute) {\r\n assert(container.customAttributes !== undefined);\r\n const map = container.customAttributes as Map<string, CustomAttribute>;\r\n map.delete(customAttribute.className);\r\n }\r\n\r\n private async findDerivedClasses(mutableClass: MutableClass): Promise<Array<MutableClass>>{\r\n const derivedClasses: Array<MutableClass> = [];\r\n const schemaItems = this.schemaEditor.schemaContext.getSchemaItems();\r\n let { value, done } = schemaItems.next();\r\n while (!done) {\r\n if (await value.is(mutableClass)) {\r\n if (!mutableClass.key.matches(value.key)) {\r\n derivedClasses.push(value);\r\n }\r\n }\r\n ({ value, done } = schemaItems.next());\r\n }\r\n\r\n return derivedClasses;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ECClasses.js","sourceRoot":"","sources":["../../../src/Editing/ECClasses.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAOkC;AAClC,sDAA6C;AAG7C,+CAA+C;AAC/C,6CAAyH;AACzH,2CAAkI;AAElI,+CAA8D;AAI9D;;;GAGG;AACH,MAAa,SAAU,SAAQ,yBAAW;IAExC,YAAsB,cAAkC,EAAE,YAAiC;QACzF,KAAK,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;QACpC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,IAAI,uBAAU,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QACzE,IAAI,CAAC,eAAe,GAAG,IAAI,4BAAe,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QACnF,IAAI,CAAC,mBAAmB,GAAG,IAAI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AI,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;QAC/I,CAAC;QAAC,OAAM,CAAM,EAAE,CAAC;YACf,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,YAAY,EAAE,IAAI,mBAAO,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;QAC3G,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,QAAQ,CAAC,QAAuB;QAC5C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAExD,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,OAAO,KAAK,SAAS;YACvB,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,kBAAkB,EAAE,IAAI,mBAAO,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC;QAE/G,IAAG,CAAC,cAAc,CAAC,OAAO,CAAC;YACzB,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,qBAAqB,EAAE,IAAI,mBAAO,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC;QAElH,OAAO,OAAO,CAAC;IACjB,CAAC;IAES,qBAAqB,CAAC,SAAwC,EAAE,eAAgC;QACxG,IAAA,qBAAM,EAAC,SAAS,CAAC,gBAAgB,KAAK,SAAS,CAAC,CAAC;QACjD,MAAM,GAAG,GAAG,SAAS,CAAC,gBAAgD,CAAC;QACvE,GAAG,CAAC,MAAM,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC;CACF;AA1SD,8BA0SC;AAED,SAAS,cAAc,CAAC,UAAsB;IAC5C,OAAO,2BAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;AACvC,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 {\n CustomAttribute,\n CustomAttributeContainerProps,\n DelayedPromiseWithProps,\n ECClass, Enumeration, EnumerationPropertyProps, PrimitiveArrayPropertyProps,\n PrimitivePropertyProps, PrimitiveType, SchemaItem, SchemaItemKey, SchemaItemType, SchemaKey, StructArrayPropertyProps,\n StructClass, StructPropertyProps,\n} from \"@itwin/ecschema-metadata\";\nimport { assert } from \"@itwin/core-bentley\";\nimport { SchemaContextEditor } from \"./Editor\";\nimport { MutableClass } from \"./Mutable/MutableClass\";\nimport * as Rules from \"../Validation/ECRules\";\nimport { ArrayProperties, EnumerationProperties, PrimitiveProperties, Properties, StructProperties } from \"./Properties\";\nimport { ClassId, CustomAttributeId, ECEditingStatus, PropertyId, SchemaEditingError, SchemaId, SchemaItemId } from \"./Exception\";\nimport { AnyDiagnostic } from \"../Validation/Diagnostic\";\nimport { CreateSchemaItem, SchemaItems } from \"./SchemaItems\";\n\nexport type ECClassSchemaItems = SchemaItemType.EntityClass | SchemaItemType.StructClass | SchemaItemType.RelationshipClass | SchemaItemType.Mixin | SchemaItemType.CustomAttributeClass;\n\n/**\n * @alpha\n * Acts as a base class for schema class creation. Enables property creation.\n */\nexport class ECClasses extends SchemaItems{\n\n protected constructor(schemaItemType: ECClassSchemaItems, schemaEditor: SchemaContextEditor) {\n super(schemaItemType, schemaEditor);\n this.schemaItemType = schemaItemType;\n this.properties = new Properties(this.schemaItemType, this.schemaEditor);\n this.arrayProperties = new ArrayProperties(this.schemaItemType, this.schemaEditor);\n this.primitiveProperties = new PrimitiveProperties(this.schemaItemType, this.schemaEditor);\n this.enumerationProperties = new EnumerationProperties(this.schemaItemType, this.schemaEditor);\n this.structProperties = new StructProperties(this.schemaItemType, this.schemaEditor);\n }\n\n protected override schemaItemType: ECClassSchemaItems;\n\n /**\n * Allows access for the editors itemType class instance.\n * It returns ECClass here, but editors for subclasses will override this to return the\n * appropriate subclass.\n */\n protected override get itemTypeClass(): typeof ECClass {\n return ECClass;\n }\n\n /**\n * Allows access for editing of base Property attributes.\n */\n public readonly properties: Properties;\n /**\n * Allows access for editing of ArrayProperty attributes.\n */\n public readonly arrayProperties: ArrayProperties;\n /**\n * Allows access for editing of PrimitiveProperty attributes.\n */\n public readonly primitiveProperties: PrimitiveProperties;\n /**\n * Allows access for editing of EnumerationProperty attributes.\n */\n public readonly enumerationProperties: EnumerationProperties;\n /**\n * Allows access for editing of StructProperty attributes.\n */\n public readonly structProperties: StructProperties;\n\n public async createClass<T extends ECClass>(schemaKey: SchemaKey, type: SchemaItemType, create: CreateSchemaItem<T>, name: string, baseClassKey?: SchemaItemKey, ...args: any[]): Promise<T> {\n const newClass = await this.createSchemaItem(schemaKey, type, create, name, ...args);\n\n if (baseClassKey !== undefined) {\n if(!await this.schemaEditor.schemaContext.getSchema(baseClassKey.schemaKey)) {\n throw new SchemaEditingError(ECEditingStatus.SchemaNotFound, new SchemaId(baseClassKey.schemaKey));\n }\n\n const baseClassItem = await this.getSchemaItem(baseClassKey, this.itemTypeClass);\n await (newClass as ECClass as MutableClass).setBaseClass(new DelayedPromiseWithProps<SchemaItemKey, T>(baseClassKey, async () => baseClassItem as T));\n }\n\n return newClass;\n }\n\n /**\n * Creates a property on class identified by the given SchemaItemKey. This method restricts the\n * property type to primitives of type Double, String, DateTime and Integer.\n * @param classKey The SchemaItemKey of the class.\n * @param name The name of the new property.\n * @param type The PrimitiveType assigned to the new property.\n */\n public async createProperty(classKey: SchemaItemKey, name: string, type: PrimitiveType, prefix: string): Promise<void> {\n if (type !== PrimitiveType.Double && type !== PrimitiveType.String && type !== PrimitiveType.DateTime\n && type !== PrimitiveType.Integer)\n throw new Error (\"Property creation is restricted to type Double, String, DateTime, and Integer.\");\n\n if (\"\" === prefix)\n throw new Error(\"The specified property name prefix is invalid\");\n\n const prefixedName = `${prefix}_${name}`;\n\n const mutableClass = await this.getClass(classKey);\n\n await mutableClass.createPrimitiveProperty(prefixedName, type);\n }\n\n /**\n * Create a primitive property on class identified by the given SchemaItemKey.\n * @param classKey The SchemaItemKey of the class.\n * @param name The name of the new property.\n * @param type The PrimitiveType assigned to the new property.\n */\n public async createPrimitiveProperty(classKey: SchemaItemKey, name: string, type: PrimitiveType): Promise<void> {\n try {\n const mutableClass = await this.getClass(classKey);\n await mutableClass.createPrimitiveProperty(name, type);\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreatePrimitiveProperty, new PropertyId(this.schemaItemType, classKey, name), e);\n }\n }\n\n public async createPrimitivePropertyFromProps(classKey: SchemaItemKey, name: string, type: PrimitiveType, primitiveProps: PrimitivePropertyProps): Promise<void> {\n try {\n const mutableClass = await this.getClass(classKey);\n const newProperty = await mutableClass.createPrimitiveProperty(name, type);\n await newProperty.fromJSON(primitiveProps);\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreatePrimitivePropertyFromProps, new PropertyId(this.schemaItemType, classKey, name), e);\n }\n }\n\n public async createEnumerationProperty(classKey: SchemaItemKey, name: string, type: Enumeration): Promise<void> {\n try {\n const mutableClass = await this.getClass(classKey);\n const enumSchemaItemKey = mutableClass.schema.getSchemaItemKey(type.fullName);\n if (enumSchemaItemKey === undefined)\n throw new SchemaEditingError(ECEditingStatus.SchemaItemNotFound, new SchemaItemId(SchemaItemType.Enumeration, type.name, mutableClass.schema.schemaKey));\n\n await mutableClass.createPrimitiveProperty(name, type);\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateEnumerationProperty, new PropertyId(this.schemaItemType, classKey, name), e);\n }\n }\n\n public async createEnumerationPropertyFromProps(classKey: SchemaItemKey, name: string, type: Enumeration, enumProps: EnumerationPropertyProps): Promise<void> {\n try {\n const mutableClass = await this.getClass(classKey);\n const newProperty = await mutableClass.createPrimitiveProperty(name, type);\n await newProperty.fromJSON(enumProps);\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateEnumerationArrayPropertyFromProps, new PropertyId(this.schemaItemType, classKey, name), e);\n }\n }\n\n public async createPrimitiveArrayProperty(classKey: SchemaItemKey, name: string, type: PrimitiveType): Promise<void> {\n try {\n const mutableClass = await this.getClass(classKey);\n await mutableClass.createPrimitiveArrayProperty(name, type);\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreatePrimitiveArrayProperty, new PropertyId(this.schemaItemType, classKey, name), e);\n }\n }\n\n public async createPrimitiveArrayPropertyFromProps(classKey: SchemaItemKey, name: string, type: PrimitiveType, primitiveProps: PrimitiveArrayPropertyProps): Promise<void> {\n try {\n const mutableClass = await this.getClass(classKey);\n const newProperty = await mutableClass.createPrimitiveArrayProperty(name, type);\n await newProperty.fromJSON(primitiveProps);\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreatePrimitiveArrayPropertyFromProps, new PropertyId(this.schemaItemType, classKey, name), e);\n }\n }\n\n public async createEnumerationArrayProperty(classKey: SchemaItemKey, name: string, type: Enumeration): Promise<void> {\n try {\n const mutableClass = await this.getClass(classKey);\n await mutableClass.createPrimitiveArrayProperty(name, type);\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateEnumerationArrayProperty, new PropertyId(this.schemaItemType, classKey, name), e);\n }\n }\n\n public async createEnumerationArrayPropertyFromProps(classKey: SchemaItemKey, name: string, type: Enumeration, props: PrimitiveArrayPropertyProps): Promise<void> {\n try {\n const mutableClass = await this.getClass(classKey);\n const newProperty = await mutableClass.createPrimitiveArrayProperty(name, type);\n await newProperty.fromJSON(props);\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateEnumerationArrayPropertyFromProps, new PropertyId(this.schemaItemType, classKey, name), e);\n }\n }\n\n public async createStructProperty(classKey: SchemaItemKey, name: string, type: StructClass): Promise<void> {\n try {\n const mutableClass = await this.getClass(classKey);\n await mutableClass.createStructProperty(name, type);\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateStructProperty, new PropertyId(this.schemaItemType, classKey, name), e);\n }\n }\n\n public async createStructPropertyFromProps(classKey: SchemaItemKey, name: string, type: StructClass, structProps: StructPropertyProps): Promise<void> {\n try {\n const mutableClass = await this.getClass(classKey);\n const newProperty = await mutableClass.createStructProperty(name, type);\n await newProperty.fromJSON(structProps);\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateStructPropertyFromProps, new PropertyId(this.schemaItemType, classKey, name), e);\n }\n }\n\n public async createStructArrayProperty(classKey: SchemaItemKey, name: string, type: StructClass): Promise<void> {\n try {\n const mutableClass = await this.getClass(classKey);\n await mutableClass.createStructArrayProperty(name, type);\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateStructArrayProperty, new PropertyId(this.schemaItemType, classKey, name), e);\n }\n }\n\n public async createStructArrayPropertyFromProps(classKey: SchemaItemKey, name: string, type: StructClass, structProps: StructArrayPropertyProps): Promise<void> {\n try {\n const mutableClass = await this.getClass(classKey);\n const newProperty = await mutableClass.createStructArrayProperty(name, type);\n await newProperty.fromJSON(structProps);\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.CreateStructArrayPropertyFromProps, new PropertyId(this.schemaItemType, classKey, name), e);\n }\n }\n\n public async deleteProperty(classKey: SchemaItemKey, name: string): Promise<void> {\n try {\n const mutableClass = await this.getClass(classKey);\n await mutableClass.deleteProperty(name);\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.DeleteProperty, new PropertyId(this.schemaItemType, classKey, name), e);\n }\n }\n\n public async delete(classKey: SchemaItemKey): Promise<void> {\n try {\n const schema = await this.getSchema(classKey.schemaKey);\n const ecClass = await schema.getItem(classKey.name, this.itemTypeClass);\n if (ecClass === undefined)\n return;\n\n await schema.deleteClass(ecClass.name);\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.DeleteClass, new ClassId(this.schemaItemType, classKey), e);\n }\n }\n\n /**\n * Adds a CustomAttribute instance to the Class identified by the given SchemaItemKey\n * @param classKey The SchemaItemKey identifying the schema.\n * @param customAttribute The CustomAttribute instance to add.\n */\n public async addCustomAttribute(classKey: SchemaItemKey, customAttribute: CustomAttribute): Promise<void> {\n try {\n const mutableClass = await this.getClass(classKey);\n mutableClass.addCustomAttribute(customAttribute);\n\n const diagnosticIterable = Rules.validateCustomAttributeInstance(mutableClass, customAttribute);\n\n const diagnostics: AnyDiagnostic[] = [];\n for await (const diagnostic of diagnosticIterable) {\n diagnostics.push(diagnostic);\n }\n\n if (diagnostics.length > 0) {\n this.removeCustomAttribute(mutableClass, customAttribute);\n throw new SchemaEditingError(ECEditingStatus.RuleViolation, new CustomAttributeId(customAttribute.className, mutableClass), undefined, diagnostics);\n }\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.AddCustomAttributeToClass, new ClassId(this.schemaItemType, classKey), e);\n }\n }\n\n /**\n * Sets the base class of a SchemaItem.\n * @param itemKey The SchemaItemKey of the Item.\n * @param baseClassKey The SchemaItemKey of the base class. Specifying 'undefined' removes the base class.\n */\n public async setBaseClass(itemKey: SchemaItemKey, baseClassKey?: SchemaItemKey): Promise<void> {\n try {\n const classItem = await this.getSchemaItem(itemKey, this.itemTypeClass);\n if (!baseClassKey) {\n await (classItem as MutableClass).setBaseClass(undefined);\n return;\n }\n\n if(!await this.schemaEditor.schemaContext.getSchema(baseClassKey.schemaKey)) {\n throw new SchemaEditingError(ECEditingStatus.SchemaNotFound, new SchemaId(baseClassKey.schemaKey));\n }\n\n const baseClassItem = await this.getSchemaItem(baseClassKey, this.itemTypeClass);\n if (classItem.baseClass !== undefined && !await baseClassItem.is(await classItem.baseClass))\n throw new SchemaEditingError(ECEditingStatus.InvalidBaseClass, new ClassId(this.schemaItemType, baseClassKey), undefined, undefined, `Base class ${baseClassKey.fullName} must derive from ${(await classItem.baseClass).fullName}.`);\n\n await (classItem as MutableClass).setBaseClass(new DelayedPromiseWithProps<SchemaItemKey, ECClass>(baseClassKey, async () => baseClassItem));\n } catch(e: any) {\n throw new SchemaEditingError(ECEditingStatus.SetBaseClass, new ClassId(this.schemaItemType, itemKey), e);\n }\n }\n\n private async getClass(classKey: SchemaItemKey): Promise<MutableClass> {\n const schema = await this.getSchema(classKey.schemaKey);\n\n const ecClass = await schema.getItem(classKey.name);\n if (ecClass === undefined)\n throw new SchemaEditingError(ECEditingStatus.SchemaItemNotFound, new ClassId(this.schemaItemType, classKey));\n\n if(!isMutableClass(ecClass))\n throw new SchemaEditingError(ECEditingStatus.InvalidSchemaItemType, new ClassId(this.schemaItemType, classKey));\n\n return ecClass;\n }\n\n protected removeCustomAttribute(container: CustomAttributeContainerProps, customAttribute: CustomAttribute) {\n assert(container.customAttributes !== undefined);\n const map = container.customAttributes as Map<string, CustomAttribute>;\n map.delete(customAttribute.className);\n }\n}\n\nfunction isMutableClass(schemaItem: SchemaItem): schemaItem is MutableClass {\n return ECClass.isECClass(schemaItem);\n}\n"]}
|
|
@@ -89,9 +89,9 @@ export declare class SchemaContextEditor {
|
|
|
89
89
|
*/
|
|
90
90
|
incrementMinorVersion(schemaKey: SchemaKey): Promise<SchemaKey>;
|
|
91
91
|
/** @internal */
|
|
92
|
-
lookupSchemaItem
|
|
92
|
+
lookupSchemaItem(schemaOrKey: Schema | SchemaKey, schemaItemKey: SchemaItemKey, schemaItemType: SchemaItemType): Promise<SchemaItem>;
|
|
93
93
|
/** @internal */
|
|
94
|
-
getSchemaItem<T extends SchemaItem>(schemaItemKey: SchemaItemKey,
|
|
94
|
+
getSchemaItem<T extends typeof SchemaItem>(schemaItemKey: SchemaItemKey, itemConstructor: T): Promise<InstanceType<T>>;
|
|
95
95
|
private removeReference;
|
|
96
96
|
private removeCustomAttribute;
|
|
97
97
|
private lookupSchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["../../../src/Editing/Editor.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":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