@itwin/ecschema-editing 4.10.0-dev.9 → 5.0.0-dev.0
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 +21 -1
- package/lib/cjs/Differencing/Errors.d.ts +3 -3
- package/lib/cjs/Differencing/Errors.d.ts.map +1 -1
- package/lib/cjs/Differencing/Errors.js.map +1 -1
- package/lib/cjs/Differencing/SchemaConflicts.d.ts +17 -15
- package/lib/cjs/Differencing/SchemaConflicts.d.ts.map +1 -1
- package/lib/cjs/Differencing/SchemaConflicts.js +1 -0
- package/lib/cjs/Differencing/SchemaConflicts.js.map +1 -1
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.d.ts +3 -2
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.d.ts.map +1 -1
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.js +30 -11
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.js.map +1 -1
- package/lib/cjs/Differencing/SchemaDifference.d.ts +16 -5
- package/lib/cjs/Differencing/SchemaDifference.d.ts.map +1 -1
- package/lib/cjs/Differencing/SchemaDifference.js +3 -2
- package/lib/cjs/Differencing/SchemaDifference.js.map +1 -1
- package/lib/cjs/Differencing/SchemaDifferenceValidator.d.ts +2 -2
- package/lib/cjs/Differencing/SchemaDifferenceValidator.d.ts.map +1 -1
- package/lib/cjs/Differencing/SchemaDifferenceValidator.js +37 -44
- 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 +2 -0
- package/lib/cjs/Differencing/SchemaDifferenceVisitor.js.map +1 -1
- package/lib/cjs/Differencing/Utils.js +21 -22
- package/lib/cjs/Differencing/Utils.js.map +1 -1
- package/lib/cjs/Editing/Exception.d.ts.map +1 -1
- package/lib/cjs/Editing/KindOfQuantities.d.ts +1 -2
- package/lib/cjs/Editing/KindOfQuantities.d.ts.map +1 -1
- package/lib/cjs/Editing/KindOfQuantities.js +2 -4
- package/lib/cjs/Editing/KindOfQuantities.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableRelationshipClass.d.ts.map +1 -1
- package/lib/cjs/Editing/Properties.js +2 -2
- package/lib/cjs/Editing/Properties.js.map +1 -1
- package/lib/cjs/Merging/ClassMerger.js +1 -2
- package/lib/cjs/Merging/ClassMerger.js.map +1 -1
- package/lib/cjs/Merging/ConstantMerger.js +2 -3
- package/lib/cjs/Merging/ConstantMerger.js.map +1 -1
- package/lib/cjs/Merging/CustomAttributeClassMerger.js +2 -3
- 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/RenameEditHandler.js +4 -5
- package/lib/cjs/Merging/Edits/RenameEditHandler.js.map +1 -1
- package/lib/cjs/Merging/Edits/SkipEditHandler.d.ts.map +1 -1
- package/lib/cjs/Merging/Edits/SkipEditHandler.js +6 -6
- package/lib/cjs/Merging/Edits/SkipEditHandler.js.map +1 -1
- package/lib/cjs/Merging/EntityClassMerger.js +3 -4
- package/lib/cjs/Merging/EntityClassMerger.js.map +1 -1
- package/lib/cjs/Merging/EnumerationMerger.js +2 -3
- package/lib/cjs/Merging/EnumerationMerger.js.map +1 -1
- package/lib/cjs/Merging/EnumeratorMerger.js +2 -3
- package/lib/cjs/Merging/EnumeratorMerger.js.map +1 -1
- package/lib/cjs/Merging/KindOfQuantityMerger.d.ts +7 -2
- package/lib/cjs/Merging/KindOfQuantityMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/KindOfQuantityMerger.js +38 -17
- package/lib/cjs/Merging/KindOfQuantityMerger.js.map +1 -1
- package/lib/cjs/Merging/MixinMerger.js +2 -3
- package/lib/cjs/Merging/MixinMerger.js.map +1 -1
- package/lib/cjs/Merging/PhenomenonMerger.js +2 -3
- package/lib/cjs/Merging/PhenomenonMerger.js.map +1 -1
- package/lib/cjs/Merging/PropertyCategoryMerger.js +2 -3
- package/lib/cjs/Merging/PropertyCategoryMerger.js.map +1 -1
- package/lib/cjs/Merging/PropertyMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/PropertyMerger.js +9 -29
- package/lib/cjs/Merging/PropertyMerger.js.map +1 -1
- package/lib/cjs/Merging/RelationshipClassMerger.js +4 -5
- package/lib/cjs/Merging/RelationshipClassMerger.js.map +1 -1
- package/lib/cjs/Merging/SchemaMergingVisitor.d.ts +6 -1
- package/lib/cjs/Merging/SchemaMergingVisitor.d.ts.map +1 -1
- package/lib/cjs/Merging/SchemaMergingVisitor.js +9 -0
- 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 +1 -0
- package/lib/cjs/Merging/SchemaMergingWalker.js.map +1 -1
- package/lib/cjs/Merging/SchemaReferenceMerger.js +2 -3
- package/lib/cjs/Merging/SchemaReferenceMerger.js.map +1 -1
- package/lib/cjs/Merging/StructClassMerger.js +2 -3
- package/lib/cjs/Merging/StructClassMerger.js.map +1 -1
- package/lib/cjs/Merging/UnitSystemMerger.js +2 -3
- package/lib/cjs/Merging/UnitSystemMerger.js.map +1 -1
- package/lib/cjs/Merging/Utils.d.ts +6 -1
- package/lib/cjs/Merging/Utils.d.ts.map +1 -1
- package/lib/cjs/Merging/Utils.js +26 -4
- package/lib/cjs/Merging/Utils.js.map +1 -1
- package/lib/cjs/Validation/Diagnostic.d.ts +2 -2
- package/lib/cjs/Validation/Diagnostic.d.ts.map +1 -1
- package/lib/cjs/Validation/Diagnostic.js +9 -9
- package/lib/cjs/Validation/Diagnostic.js.map +1 -1
- package/lib/cjs/Validation/DiagnosticReporter.js +1 -1
- package/lib/cjs/Validation/DiagnosticReporter.js.map +1 -1
- package/lib/cjs/Validation/ECRules.js +19 -19
- package/lib/cjs/Validation/ECRules.js.map +1 -1
- package/lib/cjs/Validation/RuleSuppressionSet.d.ts +2 -2
- package/lib/cjs/Validation/RuleSuppressionSet.d.ts.map +1 -1
- package/lib/cjs/Validation/RuleSuppressionSet.js.map +1 -1
- package/lib/cjs/Validation/Rules.d.ts +1 -1
- package/lib/cjs/Validation/Rules.d.ts.map +1 -1
- package/lib/cjs/Validation/Rules.js.map +1 -1
- package/lib/cjs/Validation/SchemaComparer.js +6 -6
- package/lib/cjs/Validation/SchemaComparer.js.map +1 -1
- package/lib/cjs/Validation/SchemaValidationVisitor.js.map +1 -1
- package/lib/cjs/ecschema-editing.d.ts.map +1 -1
- package/lib/cjs/ecschema-editing.js +0 -1
- package/lib/cjs/ecschema-editing.js.map +1 -1
- package/package.json +13 -13
|
@@ -7,7 +7,27 @@
|
|
|
7
7
|
* @module Differencing
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
10
|
+
exports.isConstantDifference = isConstantDifference;
|
|
11
|
+
exports.isClassPropertyDifference = isClassPropertyDifference;
|
|
12
|
+
exports.isCustomAttributeClassDifference = isCustomAttributeClassDifference;
|
|
13
|
+
exports.isCustomAttributeDifference = isCustomAttributeDifference;
|
|
14
|
+
exports.isEntityClassDifference = isEntityClassDifference;
|
|
15
|
+
exports.isEntityClassMixinDifference = isEntityClassMixinDifference;
|
|
16
|
+
exports.isEnumerationDifference = isEnumerationDifference;
|
|
17
|
+
exports.isEnumeratorDifference = isEnumeratorDifference;
|
|
18
|
+
exports.isKindOfQuantityDifference = isKindOfQuantityDifference;
|
|
19
|
+
exports.isMixinClassDifference = isMixinClassDifference;
|
|
20
|
+
exports.isPhenomenonDifference = isPhenomenonDifference;
|
|
21
|
+
exports.isPropertyCategoryDifference = isPropertyCategoryDifference;
|
|
22
|
+
exports.isSchemaDifference = isSchemaDifference;
|
|
23
|
+
exports.isSchemaReferenceDifference = isSchemaReferenceDifference;
|
|
24
|
+
exports.isStructClassDifference = isStructClassDifference;
|
|
25
|
+
exports.isUnitSystemDifference = isUnitSystemDifference;
|
|
26
|
+
exports.isRelationshipClassDifference = isRelationshipClassDifference;
|
|
27
|
+
exports.isRelationshipConstraintDifference = isRelationshipConstraintDifference;
|
|
28
|
+
exports.isRelationshipConstraintClassDifference = isRelationshipConstraintClassDifference;
|
|
29
|
+
exports.isSchemaItemDifference = isSchemaItemDifference;
|
|
30
|
+
exports.isClassDifference = isClassDifference;
|
|
11
31
|
const ecschema_metadata_1 = require("@itwin/ecschema-metadata");
|
|
12
32
|
const SchemaDifference_1 = require("./SchemaDifference");
|
|
13
33
|
/**
|
|
@@ -17,7 +37,6 @@ const SchemaDifference_1 = require("./SchemaDifference");
|
|
|
17
37
|
function isConstantDifference(difference) {
|
|
18
38
|
return difference.schemaType === ecschema_metadata_1.SchemaItemType.Constant;
|
|
19
39
|
}
|
|
20
|
-
exports.isConstantDifference = isConstantDifference;
|
|
21
40
|
/**
|
|
22
41
|
* Indicates whether the given difference is type of ClassPropertyDifference.
|
|
23
42
|
* @alpha
|
|
@@ -25,7 +44,6 @@ exports.isConstantDifference = isConstantDifference;
|
|
|
25
44
|
function isClassPropertyDifference(difference) {
|
|
26
45
|
return difference.schemaType === SchemaDifference_1.SchemaOtherTypes.Property;
|
|
27
46
|
}
|
|
28
|
-
exports.isClassPropertyDifference = isClassPropertyDifference;
|
|
29
47
|
/**
|
|
30
48
|
* Indicates whether the given difference is type of CustomAttributeClassDifference.
|
|
31
49
|
* @alpha
|
|
@@ -33,7 +51,6 @@ exports.isClassPropertyDifference = isClassPropertyDifference;
|
|
|
33
51
|
function isCustomAttributeClassDifference(difference) {
|
|
34
52
|
return difference.schemaType === ecschema_metadata_1.SchemaItemType.CustomAttributeClass;
|
|
35
53
|
}
|
|
36
|
-
exports.isCustomAttributeClassDifference = isCustomAttributeClassDifference;
|
|
37
54
|
/**
|
|
38
55
|
* Indicates whether the given difference is type of CustomAttributeDifference.
|
|
39
56
|
* @alpha
|
|
@@ -41,7 +58,6 @@ exports.isCustomAttributeClassDifference = isCustomAttributeClassDifference;
|
|
|
41
58
|
function isCustomAttributeDifference(difference) {
|
|
42
59
|
return difference.schemaType === SchemaDifference_1.SchemaOtherTypes.CustomAttributeInstance;
|
|
43
60
|
}
|
|
44
|
-
exports.isCustomAttributeDifference = isCustomAttributeDifference;
|
|
45
61
|
/**
|
|
46
62
|
* Indicates whether the given difference is type of EntityClassDifference.
|
|
47
63
|
* @alpha
|
|
@@ -49,7 +65,6 @@ exports.isCustomAttributeDifference = isCustomAttributeDifference;
|
|
|
49
65
|
function isEntityClassDifference(difference) {
|
|
50
66
|
return difference.schemaType === ecschema_metadata_1.SchemaItemType.EntityClass;
|
|
51
67
|
}
|
|
52
|
-
exports.isEntityClassDifference = isEntityClassDifference;
|
|
53
68
|
/**
|
|
54
69
|
* Indicates whether the given difference is type of EntityClassMixinDifference.
|
|
55
70
|
* @alpha
|
|
@@ -57,7 +72,6 @@ exports.isEntityClassDifference = isEntityClassDifference;
|
|
|
57
72
|
function isEntityClassMixinDifference(difference) {
|
|
58
73
|
return difference.schemaType === SchemaDifference_1.SchemaOtherTypes.EntityClassMixin;
|
|
59
74
|
}
|
|
60
|
-
exports.isEntityClassMixinDifference = isEntityClassMixinDifference;
|
|
61
75
|
/**
|
|
62
76
|
* Indicates whether the given difference is type of EnumerationDifference.
|
|
63
77
|
* @alpha
|
|
@@ -65,7 +79,6 @@ exports.isEntityClassMixinDifference = isEntityClassMixinDifference;
|
|
|
65
79
|
function isEnumerationDifference(difference) {
|
|
66
80
|
return difference.schemaType === ecschema_metadata_1.SchemaItemType.Enumeration;
|
|
67
81
|
}
|
|
68
|
-
exports.isEnumerationDifference = isEnumerationDifference;
|
|
69
82
|
/**
|
|
70
83
|
* Indicates whether the given difference is type of EnumeratorDifference.
|
|
71
84
|
* @alpha
|
|
@@ -73,7 +86,6 @@ exports.isEnumerationDifference = isEnumerationDifference;
|
|
|
73
86
|
function isEnumeratorDifference(difference) {
|
|
74
87
|
return difference.schemaType === SchemaDifference_1.SchemaOtherTypes.Enumerator;
|
|
75
88
|
}
|
|
76
|
-
exports.isEnumeratorDifference = isEnumeratorDifference;
|
|
77
89
|
/**
|
|
78
90
|
* Indicates whether the given difference is type of KindOfQuantityDifference.
|
|
79
91
|
* @alpha
|
|
@@ -81,7 +93,6 @@ exports.isEnumeratorDifference = isEnumeratorDifference;
|
|
|
81
93
|
function isKindOfQuantityDifference(difference) {
|
|
82
94
|
return difference.schemaType === ecschema_metadata_1.SchemaItemType.KindOfQuantity;
|
|
83
95
|
}
|
|
84
|
-
exports.isKindOfQuantityDifference = isKindOfQuantityDifference;
|
|
85
96
|
/**
|
|
86
97
|
* Indicates whether the given difference is type of MixinClassDifference.
|
|
87
98
|
* @alpha
|
|
@@ -89,7 +100,6 @@ exports.isKindOfQuantityDifference = isKindOfQuantityDifference;
|
|
|
89
100
|
function isMixinClassDifference(difference) {
|
|
90
101
|
return difference.schemaType === ecschema_metadata_1.SchemaItemType.Mixin;
|
|
91
102
|
}
|
|
92
|
-
exports.isMixinClassDifference = isMixinClassDifference;
|
|
93
103
|
/**
|
|
94
104
|
* Indicates whether the given difference is type of PhenomenonDifference.
|
|
95
105
|
* @alpha
|
|
@@ -97,7 +107,6 @@ exports.isMixinClassDifference = isMixinClassDifference;
|
|
|
97
107
|
function isPhenomenonDifference(difference) {
|
|
98
108
|
return difference.schemaType === ecschema_metadata_1.SchemaItemType.Phenomenon;
|
|
99
109
|
}
|
|
100
|
-
exports.isPhenomenonDifference = isPhenomenonDifference;
|
|
101
110
|
/**
|
|
102
111
|
* Indicates whether the given difference is type of PropertyCategoryDifference.
|
|
103
112
|
* @alpha
|
|
@@ -105,7 +114,6 @@ exports.isPhenomenonDifference = isPhenomenonDifference;
|
|
|
105
114
|
function isPropertyCategoryDifference(difference) {
|
|
106
115
|
return difference.schemaType === ecschema_metadata_1.SchemaItemType.PropertyCategory;
|
|
107
116
|
}
|
|
108
|
-
exports.isPropertyCategoryDifference = isPropertyCategoryDifference;
|
|
109
117
|
/**
|
|
110
118
|
* Indicates whether the given difference is type of SchemaDifference.
|
|
111
119
|
* @alpha
|
|
@@ -113,7 +121,6 @@ exports.isPropertyCategoryDifference = isPropertyCategoryDifference;
|
|
|
113
121
|
function isSchemaDifference(difference) {
|
|
114
122
|
return difference.schemaType === SchemaDifference_1.SchemaOtherTypes.Schema;
|
|
115
123
|
}
|
|
116
|
-
exports.isSchemaDifference = isSchemaDifference;
|
|
117
124
|
/**
|
|
118
125
|
* Indicates whether the given difference is type of SchemaReferenceDifference.
|
|
119
126
|
* @alpha
|
|
@@ -121,7 +128,6 @@ exports.isSchemaDifference = isSchemaDifference;
|
|
|
121
128
|
function isSchemaReferenceDifference(difference) {
|
|
122
129
|
return difference.schemaType === SchemaDifference_1.SchemaOtherTypes.SchemaReference;
|
|
123
130
|
}
|
|
124
|
-
exports.isSchemaReferenceDifference = isSchemaReferenceDifference;
|
|
125
131
|
/**
|
|
126
132
|
* Indicates whether the given difference is type of CustomAttributeDifference.
|
|
127
133
|
* @alpha
|
|
@@ -129,7 +135,6 @@ exports.isSchemaReferenceDifference = isSchemaReferenceDifference;
|
|
|
129
135
|
function isStructClassDifference(difference) {
|
|
130
136
|
return difference.schemaType === ecschema_metadata_1.SchemaItemType.StructClass;
|
|
131
137
|
}
|
|
132
|
-
exports.isStructClassDifference = isStructClassDifference;
|
|
133
138
|
/**
|
|
134
139
|
* Indicates whether the given difference is type of UnitSystemDifference.
|
|
135
140
|
* @alpha
|
|
@@ -137,7 +142,6 @@ exports.isStructClassDifference = isStructClassDifference;
|
|
|
137
142
|
function isUnitSystemDifference(difference) {
|
|
138
143
|
return difference.schemaType === ecschema_metadata_1.SchemaItemType.UnitSystem;
|
|
139
144
|
}
|
|
140
|
-
exports.isUnitSystemDifference = isUnitSystemDifference;
|
|
141
145
|
/**
|
|
142
146
|
* Indicates whether the given difference is type of RelationshipClassDifference.
|
|
143
147
|
* @alpha
|
|
@@ -145,7 +149,6 @@ exports.isUnitSystemDifference = isUnitSystemDifference;
|
|
|
145
149
|
function isRelationshipClassDifference(difference) {
|
|
146
150
|
return difference.schemaType === ecschema_metadata_1.SchemaItemType.RelationshipClass;
|
|
147
151
|
}
|
|
148
|
-
exports.isRelationshipClassDifference = isRelationshipClassDifference;
|
|
149
152
|
/**
|
|
150
153
|
* Indicates whether the given difference is type of RelationshipConstraintDifference.
|
|
151
154
|
* @alpha
|
|
@@ -153,7 +156,6 @@ exports.isRelationshipClassDifference = isRelationshipClassDifference;
|
|
|
153
156
|
function isRelationshipConstraintDifference(difference) {
|
|
154
157
|
return difference.schemaType === SchemaDifference_1.SchemaOtherTypes.RelationshipConstraint;
|
|
155
158
|
}
|
|
156
|
-
exports.isRelationshipConstraintDifference = isRelationshipConstraintDifference;
|
|
157
159
|
/**
|
|
158
160
|
* Indicates whether the given difference is type of RelationshipConstraintClassDifference.
|
|
159
161
|
* @alpha
|
|
@@ -161,7 +163,6 @@ exports.isRelationshipConstraintDifference = isRelationshipConstraintDifference;
|
|
|
161
163
|
function isRelationshipConstraintClassDifference(difference) {
|
|
162
164
|
return difference.schemaType === SchemaDifference_1.SchemaOtherTypes.RelationshipConstraintClass;
|
|
163
165
|
}
|
|
164
|
-
exports.isRelationshipConstraintClassDifference = isRelationshipConstraintClassDifference;
|
|
165
166
|
/**
|
|
166
167
|
* Indicates whether the given difference is type of AnySchemaItemDifference.
|
|
167
168
|
* @alpha
|
|
@@ -169,7 +170,6 @@ exports.isRelationshipConstraintClassDifference = isRelationshipConstraintClassD
|
|
|
169
170
|
function isSchemaItemDifference(difference) {
|
|
170
171
|
return difference.schemaType in ecschema_metadata_1.SchemaItemType;
|
|
171
172
|
}
|
|
172
|
-
exports.isSchemaItemDifference = isSchemaItemDifference;
|
|
173
173
|
/**
|
|
174
174
|
* Indicates whether the given difference is type of ClassItemDifference.
|
|
175
175
|
* @alpha
|
|
@@ -181,5 +181,4 @@ function isClassDifference(difference) {
|
|
|
181
181
|
|| isMixinClassDifference(difference)
|
|
182
182
|
|| isRelationshipClassDifference(difference);
|
|
183
183
|
}
|
|
184
|
-
exports.isClassDifference = isClassDifference;
|
|
185
184
|
//# sourceMappingURL=Utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../src/Differencing/Utils.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAA0D;AAC1D,yDAwB4B;AAE5B;;;GAGG;AACH,SAAgB,oBAAoB,CAAC,UAA+B;IAClE,OAAO,UAAU,CAAC,UAAU,KAAK,kCAAc,CAAC,QAAQ,CAAC;AAC3D,CAAC;AAFD,oDAEC;AAED;;;GAGG;AACH,SAAgB,yBAAyB,CAAC,UAA+B;IACvE,OAAO,UAAU,CAAC,UAAU,KAAK,mCAAgB,CAAC,QAAQ,CAAC;AAC7D,CAAC;AAFD,8DAEC;AAED;;;GAGG;AACH,SAAgB,gCAAgC,CAAC,UAA+B;IAC9E,OAAO,UAAU,CAAC,UAAU,KAAK,kCAAc,CAAC,oBAAoB,CAAC;AACvE,CAAC;AAFD,4EAEC;AAED;;;GAGG;AACH,SAAgB,2BAA2B,CAAC,UAA+B;IACzE,OAAO,UAAU,CAAC,UAAU,KAAK,mCAAgB,CAAC,uBAAuB,CAAC;AAC5E,CAAC;AAFD,kEAEC;AAED;;;GAGG;AACH,SAAgB,uBAAuB,CAAC,UAA+B;IACrE,OAAO,UAAU,CAAC,UAAU,KAAK,kCAAc,CAAC,WAAW,CAAC;AAC9D,CAAC;AAFD,0DAEC;AAED;;;GAGG;AACH,SAAgB,4BAA4B,CAAC,UAA+B;IAC1E,OAAO,UAAU,CAAC,UAAU,KAAK,mCAAgB,CAAC,gBAAgB,CAAC;AACrE,CAAC;AAFD,oEAEC;AAED;;;GAGG;AACH,SAAgB,uBAAuB,CAAC,UA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UAAU,CAAC,UAAU,KAAK,kCAAc,CAAC,UAAU,CAAC;AAC7D,CAAC;AAFD,wDAEC;AAED;;;GAGG;AACH,SAAgB,6BAA6B,CAAC,UAA+B;IAC3E,OAAO,UAAU,CAAC,UAAU,KAAK,kCAAc,CAAC,iBAAiB,CAAC;AACpE,CAAC;AAFD,sEAEC;AAED;;;GAGG;AACH,SAAgB,kCAAkC,CAAC,UAA+B;IAChF,OAAO,UAAU,CAAC,UAAU,KAAK,mCAAgB,CAAC,sBAAsB,CAAC;AAC3E,CAAC;AAFD,gFAEC;AAED;;;GAGG;AACH,SAAgB,uCAAuC,CAAC,UAA+B;IACrF,OAAO,UAAU,CAAC,UAAU,KAAK,mCAAgB,CAAC,2BAA2B,CAAC;AAChF,CAAC;AAFD,0FAEC;AAED;;;GAGG;AACH,SAAgB,sBAAsB,CAAC,UAA+B;IACpE,OAAO,UAAU,CAAC,UAAU,IAAI,kCAAc,CAAC;AACjD,CAAC;AAFD,wDAEC;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;AAND,8CAMC","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;;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,CAAC;AAED;;;GAGG;AACH,SAAgB,uBAAu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;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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Exception.d.ts","sourceRoot":"","sources":["../../../src/Editing/Exception.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,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ey, isDefault?: boolean): Promise<void>;
|
|
22
22
|
addPresentationOverrideFormat(koqKey: SchemaItemKey, overrideFormat: OverrideFormat, isDefault?: boolean): Promise<void>;
|
|
23
23
|
/**
|
|
24
|
-
* @param koqKey A schemaItemKey of the editing KindOfQuantity.
|
|
25
24
|
* @param parent A SchemaItemKey of the parent Format.
|
|
26
25
|
* @param unitLabelOverrides The list of Unit (or InvertedUnit) and label overrides. The length of list should be equal to the number of units in the parent Format.
|
|
27
26
|
*/
|
|
28
|
-
createFormatOverride(
|
|
27
|
+
createFormatOverride(parent: SchemaItemKey, precision?: number, unitLabelOverrides?: Array<[Unit | InvertedUnit, string | undefined]>): Promise<OverrideFormat>;
|
|
29
28
|
}
|
|
30
29
|
//# sourceMappingURL=KindOfQuantities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KindOfQuantities.d.ts","sourceRoot":"","sources":["../../../src/Editing/KindOfQuantities.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAEG,YAAY,EAAkB,mBAAmB,EAAE,cAAc,EACzE,aAAa,EAAkB,SAAS,EAAE,IAAI,EAC/C,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;gBAC5B,YAAY,EAAE,mBAAmB;IAIvC,MAAM,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,kBAAkB,EAAE,aAAa,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAyB5H,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,CAAC;IASzG;;;;;OAKG;IACU,qBAAqB,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,aA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,MAAM,GAAG,SAAS,CAAC,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;CAQ7K"}
|
|
@@ -75,18 +75,16 @@ class KindOfQuantities extends SchemaItems_1.SchemaItems {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
|
-
* @param koqKey A schemaItemKey of the editing KindOfQuantity.
|
|
79
78
|
* @param parent A SchemaItemKey of the parent Format.
|
|
80
79
|
* @param unitLabelOverrides The list of Unit (or InvertedUnit) and label overrides. The length of list should be equal to the number of units in the parent Format.
|
|
81
80
|
*/
|
|
82
|
-
async createFormatOverride(
|
|
81
|
+
async createFormatOverride(parent, precision, unitLabelOverrides) {
|
|
83
82
|
try {
|
|
84
|
-
await this.getSchemaItem(koqKey);
|
|
85
83
|
const parentFormat = await this.getSchemaItem(parent, ecschema_metadata_1.SchemaItemType.Format);
|
|
86
84
|
return new ecschema_metadata_1.OverrideFormat(parentFormat, precision, unitLabelOverrides);
|
|
87
85
|
}
|
|
88
86
|
catch (e) {
|
|
89
|
-
throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.
|
|
87
|
+
throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.CreateFormatOverride, new Exception_1.SchemaItemId(this.schemaItemType, parent), e);
|
|
90
88
|
}
|
|
91
89
|
}
|
|
92
90
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KindOfQuantities.js","sourceRoot":"","sources":["../../../src/Editing/KindOfQuantities.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAIkC;AAGlC,2CAAgF;AAChF,+CAA4C;AAE5C;;;GAGG;AACH,MAAa,gBAAiB,SAAQ,yBAAW;IAC/C,YAAmB,YAAiC;QAClD,KAAK,CAAC,kCAAc,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IACrD,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,SAAoB,EAAE,IAAY,EAAE,kBAAiC,E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CAAC;QAAC,OAAM,CAAM,EAAE,CAAC;YACf,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,oBAAoB,EAAE,IAAI,wBAAY,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QACvH,CAAC;IACH,CAAC;CACF;AA5ED,4CA4EC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Editing\r\n */\r\n\r\nimport {\r\n DelayedPromiseWithProps,\r\n Format, InvertedUnit, KindOfQuantity, KindOfQuantityProps, OverrideFormat,\r\n SchemaItemKey, SchemaItemType, SchemaKey, Unit,\r\n} from \"@itwin/ecschema-metadata\";\r\nimport { SchemaContextEditor } from \"./Editor\";\r\nimport { MutableKindOfQuantity } from \"./Mutable/MutableKindOfQuantity\";\r\nimport { ECEditingStatus, SchemaEditingError, SchemaItemId } from \"./Exception\";\r\nimport { SchemaItems } from \"./SchemaItems\";\r\n\r\n/**\r\n * @alpha\r\n * A class allowing you to create schema items of type KindOfQuantity.\r\n */\r\nexport class KindOfQuantities extends SchemaItems {\r\n public constructor(schemaEditor: SchemaContextEditor) {\r\n super(SchemaItemType.KindOfQuantity, schemaEditor);\r\n }\r\n\r\n public async create(schemaKey: SchemaKey, name: string, persistenceUnitKey: SchemaItemKey, displayLabel?: string): Promise<SchemaItemKey> {\r\n try {\r\n const koqItem = await this.createSchemaItem<KindOfQuantity>(schemaKey, this.schemaItemType, (schema) => schema.createKindOfQuantity.bind(schema), name) as MutableKindOfQuantity;\r\n const persistenceUnit = await koqItem.schema.lookupItem<Unit | InvertedUnit>(persistenceUnitKey);\r\n if (persistenceUnit === undefined)\r\n throw new SchemaEditingError(ECEditingStatus.SchemaItemNotFound, new SchemaItemId(SchemaItemType.Unit, persistenceUnitKey));\r\n\r\n if (persistenceUnit.schemaItemType === SchemaItemType.Unit) {\r\n koqItem.persistenceUnit = new DelayedPromiseWithProps(persistenceUnit.key, async () => persistenceUnit);\r\n }\r\n\r\n if (persistenceUnit.schemaItemType === SchemaItemType.InvertedUnit) {\r\n koqItem.persistenceUnit = new DelayedPromiseWithProps(persistenceUnit.key, async () => persistenceUnit);\r\n }\r\n\r\n if (displayLabel !== undefined) {\r\n koqItem.setDisplayLabel(displayLabel);\r\n }\r\n\r\n return koqItem.key;\r\n } catch (e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFailed, new SchemaItemId(this.schemaItemType, name, schemaKey), e);\r\n }\r\n }\r\n\r\n public async createFromProps(schemaKey: SchemaKey, koqProps: KindOfQuantityProps): Promise<SchemaItemKey> {\r\n try {\r\n const koqItem = await this.createSchemaItemFromProps(schemaKey, this.schemaItemType, (schema) => schema.createKindOfQuantity.bind(schema), koqProps);\r\n return koqItem.key;\r\n } catch (e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFromProps, new SchemaItemId(this.schemaItemType, koqProps.name!, schemaKey), e);\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param koqKey A schemaItemKey of the editing KindOfQuantity.\r\n * @param format A schemaItemKey of a Format.\r\n * @param isDefault .is set to false when not explicitly passed.\r\n */\r\n public async addPresentationFormat(koqKey: SchemaItemKey, format: SchemaItemKey, isDefault: boolean = false): Promise<void> {\r\n try {\r\n const kindOfQuantity = await this.getSchemaItem<MutableKindOfQuantity>(koqKey);\r\n const presentationFormat = await this.getSchemaItem<Format>(format, SchemaItemType.Format);\r\n kindOfQuantity.addPresentationFormat(presentationFormat, isDefault);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.AddPresentationUnit, new SchemaItemId(this.schemaItemType, koqKey), e);\r\n }\r\n }\r\n\r\n public async addPresentationOverrideFormat(koqKey: SchemaItemKey, overrideFormat: OverrideFormat, isDefault: boolean = false): Promise<void> {\r\n try {\r\n const kindOfQuantity = await this.getSchemaItem<MutableKindOfQuantity>(koqKey);\r\n kindOfQuantity.addPresentationFormat(overrideFormat, isDefault);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.AddPresentationOverride, new SchemaItemId(this.schemaItemType, koqKey), e);\r\n }\r\n }\r\n\r\n /**\r\n * @param parent A SchemaItemKey of the parent Format.\r\n * @param unitLabelOverrides The list of Unit (or InvertedUnit) and label overrides. The length of list should be equal to the number of units in the parent Format.\r\n */\r\n public async createFormatOverride(parent: SchemaItemKey, precision?: number, unitLabelOverrides?: Array<[Unit | InvertedUnit, string | undefined]>): Promise<OverrideFormat> {\r\n try {\r\n const parentFormat = await this.getSchemaItem<Format>(parent, SchemaItemType.Format);\r\n return new OverrideFormat(parentFormat, precision, unitLabelOverrides);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateFormatOverride, new SchemaItemId(this.schemaItemType, parent), e);\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MutableRelationshipClass.d.ts","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableRelationshipClass.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,qCAAqC,EAAE,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,eAAe,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEjQ;;;GAGG;AACH,8BAAsB,6BAA8B,SAAQ,sBAAsB;aACvD,kBAAkB,CAAC,eAAe,EAAE,eAAe,GAAG,IAAI;IACnF,aAA6B,YAAY,CAAC,YAAY,EAAE,wBAAwB,EAAE;IAClF,aAA6B,WAAW,CAAC,WAAW,EAAE,OAAO,EAAE;IAC/D,aAA6B,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE;IACtE,aAA6B,eAAe,CAAC,eAAe,EAA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;aACxD,mBAAmB,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI;aACzD,mBAAmB,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI;aACzD,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,iBAAiB,EAAE,SAAS,EAAE,MAAM,GAAG,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;aACpJ,4BAA4B,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,iBAAiB,EAAE,SAAS,EAAE,MAAM,GAAG,iBAAiB,GAAG,kBAAkB;aAC/I,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;CACrE"}
|
|
@@ -19,7 +19,7 @@ class Properties {
|
|
|
19
19
|
try {
|
|
20
20
|
newName = new ecschema_metadata_1.ECName(newPropertyName);
|
|
21
21
|
}
|
|
22
|
-
catch
|
|
22
|
+
catch {
|
|
23
23
|
throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.SetPropertyName, new Exception_1.PropertyId(this.ecClassType, classKey, propertyName), new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.InvalidECName, new Exception_1.PropertyId(this.ecClassType, classKey, newPropertyName)));
|
|
24
24
|
}
|
|
25
25
|
const existingProperty = await this.getProperty(classKey, propertyName)
|
|
@@ -185,7 +185,7 @@ class Properties {
|
|
|
185
185
|
}
|
|
186
186
|
async findDerivedClasses(mutableClass) {
|
|
187
187
|
const derivedClasses = [];
|
|
188
|
-
for
|
|
188
|
+
for (const schemaItem of this._schemaEditor.schemaContext.getSchemaItems()) {
|
|
189
189
|
if (ecschema_metadata_1.ECClass.isECClass(schemaItem) && await schemaItem.is(mutableClass)) {
|
|
190
190
|
if (!mutableClass.key.matches(schemaItem.key)) {
|
|
191
191
|
derivedClasses.push(schemaItem);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Properties.js","sourceRoot":"","sources":["../../../src/Editing/Properties.ts"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,CAAC,mBAAmB,EAAE,IAAI,sBAAU,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,4BAAgB,CAAC,kBAAkB,CAAC,CAAC,CAAC;QACnK,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAjBD,oDAiBC;AAED;;;GAGG;AACH,MAAa,gBAAiB,SAAQ,UAAU;IAC9C,YAAmB,WAA+B,EAAE,aAAkC;QACpF,KAAK,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;IACpC,CAAC;IAED;;;;OAIG;IACgB,KAAK,CAAC,WAAW,CAAgC,QAAuB,EAAE,YAAoB;QAC/G,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,WAAW,CAAwB,QAAQ,EAAE,YAAY,CAAM,CAAC;QAC7F,IAAI,CAAC,CAAC,QAAQ,YAAY,kCAAc,CAAC,EAAC,CAAC;YACzC,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,mBAAmB,EAAE,IAAI,sBAAU,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,4BAAgB,CAAC,cAAc,CAAC,CAAC,CAAC;QAC/J,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAjBD,4CAiBC","sourcesContent":["import { CustomAttribute, CustomAttributeContainerProps, DelayedPromiseWithProps, ECClass, ECName,\r\n EnumerationProperty, KindOfQuantity, NavigationProperty, PrimitiveProperty,\r\n PropertyCategory, SchemaItemKey, SchemaItemType, StructProperty } from \"@itwin/ecschema-metadata\";\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { SchemaContextEditor } from \"./Editor\";\r\nimport * as Rules from \"../Validation/ECRules\";\r\nimport { MutableArrayProperty } from \"./Mutable/MutableArrayProperty\";\r\nimport { MutableProperty } from \"./Mutable/MutableProperty\";\r\nimport { MutablePrimitiveOrEnumPropertyBase } from \"./Mutable/MutablePrimitiveOrEnumProperty\";\r\nimport { MutableClass } from \"./Mutable/MutableClass\";\r\nimport { MutableStructProperty } from \"./Mutable/MutableStructProperty\";\r\nimport { MutableNavigationProperty } from \"./Mutable/MutableNavigationProperty\";\r\nimport { ECClassSchemaItems } from \"./ECClasses\";\r\nimport { ClassId, CustomAttributeId, ECEditingStatus, PropertyId, PropertyTypeName, SchemaEditingError, SchemaId } from \"./Exception\";\r\nimport { AnyDiagnostic } from \"../Validation/Diagnostic\";\r\n\r\ntype MutablePropertyType = MutableProperty | MutableArrayProperty | MutablePrimitiveOrEnumPropertyBase | MutableNavigationProperty | MutableStructProperty;\r\n\r\n/**\r\n * @alpha\r\n * A class allowing editing of attributes of the base Property class.\r\n */\r\nexport class Properties {\r\n public constructor(protected ecClassType: ECClassSchemaItems, protected _schemaEditor: SchemaContextEditor) {\r\n }\r\n\r\n public async setName(classKey: SchemaItemKey, propertyName: string, newPropertyName: string) {\r\n let newName: ECName;\r\n try {\r\n newName = new ECName(newPropertyName);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.SetPropertyName, new PropertyId(this.ecClassType, classKey, propertyName),\r\n new SchemaEditingError(ECEditingStatus.InvalidECName, new PropertyId(this.ecClassType, classKey, newPropertyName)));\r\n }\r\n\r\n const existingProperty = await this.getProperty<MutableProperty>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetPropertyName, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n\r\n const baseProperty = await existingProperty.class.getProperty(newPropertyName, true) as MutableProperty;\r\n if (baseProperty) {\r\n throw new SchemaEditingError(ECEditingStatus.SetPropertyName, new PropertyId(this.ecClassType, classKey, propertyName),\r\n new SchemaEditingError(ECEditingStatus.PropertyAlreadyExists, new PropertyId(this.ecClassType, baseProperty.class.key, newPropertyName)));\r\n }\r\n\r\n // Handle derived classes\r\n const derivedProperties: Array<MutableProperty> = [];\r\n const derivedClasses = await this.findDerivedClasses(existingProperty.class as MutableClass);\r\n for (const derivedClass of derivedClasses) {\r\n if (await derivedClass.getProperty(newPropertyName)) {\r\n throw new SchemaEditingError(ECEditingStatus.SetPropertyName, new PropertyId(this.ecClassType, classKey, propertyName),\r\n new SchemaEditingError(ECEditingStatus.PropertyAlreadyExists, new PropertyId(this.ecClassType, derivedClass.key, newPropertyName)));\r\n }\r\n\r\n const propertyOverride = await derivedClass.getProperty(propertyName) as MutableProperty;\r\n // If found the property is overridden in the derived class.\r\n if (propertyOverride)\r\n derivedProperties.push(propertyOverride);\r\n }\r\n\r\n // Re-name the overridden property in all derived classes\r\n derivedProperties.forEach((prop: MutableProperty) => {\r\n prop.setName(newName);\r\n });\r\n\r\n existingProperty.setName(newName);\r\n }\r\n\r\n /**\r\n * Sets the property description.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param description The new description to set.\r\n */\r\n public async setDescription(classKey: SchemaItemKey, propertyName: string, description: string) {\r\n const property = await this.getProperty<MutableProperty>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetDescription, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setDescription(description);\r\n }\r\n\r\n /**\r\n * Sets the property label.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param label The new label to set.\r\n */\r\n public async setLabel(classKey: SchemaItemKey, propertyName: string, label: string) {\r\n const property = await this.getProperty<MutableProperty>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetLabel, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setLabel(label);\r\n }\r\n\r\n /**\r\n * Sets the property isReadOnly attribute.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param isReadOnly The new isReadOnly value.\r\n */\r\n public async setIsReadOnly(classKey: SchemaItemKey, propertyName: string, isReadOnly: boolean) {\r\n const property = await this.getProperty<MutableProperty>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetIsReadOnly, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setIsReadOnly(isReadOnly);\r\n }\r\n\r\n /**\r\n * Sets the property priority.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param priority The new priority.\r\n */\r\n public async setPriority(classKey: SchemaItemKey, propertyName: string, priority: number) {\r\n const property = await this.getProperty<MutableProperty>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetPriority, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setPriority(priority);\r\n }\r\n\r\n /**\r\n * Sets the property category.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param categoryKey The SchemaItemKey of the property category.\r\n */\r\n public async setCategory(classKey: SchemaItemKey, propertyName: string, categoryKey: SchemaItemKey) {\r\n const property = await this.getProperty<MutableProperty>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetCategory, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n\r\n const category = await this._schemaEditor.lookupSchemaItem<PropertyCategory>(property.class.schema, categoryKey, SchemaItemType.PropertyCategory)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetCategory, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n\r\n property.setCategory(new DelayedPromiseWithProps<SchemaItemKey, PropertyCategory>(categoryKey, async () => category));\r\n }\r\n\r\n /**\r\n * Sets the KindOfQuantity of a property.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param kindOfQuantityKey The SchemaItemKey of the KindOfQuantity.\r\n */\r\n public async setKindOfQuantity(classKey: SchemaItemKey, propertyName: string, kindOfQuantityKey: SchemaItemKey) {\r\n const property = await this.getProperty<MutableProperty>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetKindOfQuantity, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n\r\n const koq = await this._schemaEditor.lookupSchemaItem<KindOfQuantity>(property.class.schema, kindOfQuantityKey, SchemaItemType.KindOfQuantity)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetKindOfQuantity, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n\r\n const currentKoq = await property.kindOfQuantity;\r\n if(currentKoq && currentKoq.persistenceUnit && koq.persistenceUnit && !currentKoq.persistenceUnit.matchesFullName(koq.persistenceUnit.fullName)) {\r\n throw new SchemaEditingError(ECEditingStatus.SetKindOfQuantity, new PropertyId(this.ecClassType, classKey, propertyName), undefined, undefined, \"KindOfQuantity can only be changed if it has the same persistence unit as the property.\");\r\n }\r\n\r\n property.setKindOfQuantity(new DelayedPromiseWithProps<SchemaItemKey, KindOfQuantity>(kindOfQuantityKey, async () => koq));\r\n }\r\n\r\n /**\r\n * Adds a CustomAttribute instance to the Property identified by the given SchemaItemKey and property name.\r\n * @param classKey The SchemaItemKey identifying the class.\r\n * @param propertyName The name of the property.\r\n * @param customAttribute The CustomAttribute instance to add.\r\n */\r\n public async addCustomAttribute(classKey: SchemaItemKey, propertyName: string, customAttribute: CustomAttribute) {\r\n const property = await this.getProperty<MutableProperty>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.AddCustomAttributeToProperty, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n\r\n property.addCustomAttribute(customAttribute);\r\n\r\n const diagnosticsIterable = Rules.validateCustomAttributeInstance(property, customAttribute);\r\n\r\n const diagnostics: AnyDiagnostic[] = [];\r\n for await (const diagnostic of diagnosticsIterable) {\r\n diagnostics.push(diagnostic);\r\n }\r\n\r\n if (diagnostics.length > 0) {\r\n this.removeCustomAttribute(property, customAttribute);\r\n throw new SchemaEditingError(ECEditingStatus.AddCustomAttributeToProperty, new PropertyId(this.ecClassType, classKey, propertyName),\r\n new SchemaEditingError(ECEditingStatus.RuleViolation, new CustomAttributeId(customAttribute.className, property)));\r\n }\r\n }\r\n\r\n /**\r\n * Removes a CustomAttribute from a property.\r\n * @param container\r\n * @param customAttribute\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 /**\r\n * Gets the property with the specified name from the class identified by the given key.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property to retrieve.\r\n */\r\n protected async getProperty<T extends MutablePropertyType>(classKey: SchemaItemKey, propertyName: string): Promise<T> {\r\n const mutableClass = await this.getClass(classKey);\r\n\r\n const property = await mutableClass.getProperty(propertyName) as T;\r\n if (property === undefined) {\r\n throw new SchemaEditingError(ECEditingStatus.PropertyNotFound, new PropertyId(mutableClass.schemaItemType as ECClassSchemaItems, classKey, propertyName));\r\n }\r\n\r\n return property;\r\n }\r\n\r\n private async findDerivedClasses(mutableClass: MutableClass): Promise<Array<MutableClass>>{\r\n const derivedClasses: Array<MutableClass> = [];\r\n\r\n for await (const schemaItem of this._schemaEditor.schemaContext.getSchemaItems()) {\r\n if(ECClass.isECClass(schemaItem) && await schemaItem.is(mutableClass)) {\r\n if (!mutableClass.key.matches(schemaItem.key)) {\r\n derivedClasses.push(schemaItem as MutableClass);\r\n }\r\n }\r\n }\r\n\r\n return derivedClasses;\r\n }\r\n\r\n private async getClass(classKey: SchemaItemKey): Promise<MutableClass> {\r\n const schema = await this._schemaEditor.getSchema(classKey.schemaKey);\r\n if (schema === undefined)\r\n throw new SchemaEditingError(ECEditingStatus.SchemaNotFound, new SchemaId(classKey.schemaKey));\r\n\r\n const ecClass = await schema.getItem(classKey.name);\r\n if (ecClass === undefined)\r\n throw new SchemaEditingError(ECEditingStatus.SchemaItemNotFound, new ClassId(this.ecClassType, classKey));\r\n\r\n if (ecClass.schemaItemType !== this.ecClassType){\r\n throw new SchemaEditingError(ECEditingStatus.InvalidSchemaItemType, new ClassId(this.ecClassType, classKey));\r\n }\r\n\r\n return ecClass as MutableClass;\r\n }\r\n}\r\n\r\n/**\r\n * @alpha\r\n * A class extending Properties allowing editing of attributes of PrimitiveArrayProperty,\r\n * EnumerationArrayProperty and StructArrayProperty.\r\n */\r\nexport class ArrayProperties extends Properties {\r\n public constructor(ecClassType: ECClassSchemaItems, _schemaEditor: SchemaContextEditor) {\r\n super(ecClassType, _schemaEditor);\r\n }\r\n\r\n /**\r\n * Sets the array property minOccurs attribute.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param minOccurs The new minOccurs value.\r\n */\r\n public async setMinOccurs(classKey: SchemaItemKey, propertyName: string, minOccurs: number) {\r\n const property = await this.getProperty<MutableArrayProperty>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetMinOccurs, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setMinOccurs(minOccurs);\r\n }\r\n\r\n /**\r\n * Sets the array property maxOccurs attribute.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param maxOccurs The new maxOccurs value.\r\n */\r\n public async setMaxOccurs(classKey: SchemaItemKey, propertyName: string, maxOccurs: number) {\r\n const property = await this.getProperty<MutableArrayProperty>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetMaxOccurs, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setMaxOccurs(maxOccurs);\r\n }\r\n\r\n /**\r\n * Override to validate that the found property is an ArrayProperty.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n */\r\n protected override async getProperty<T extends MutablePropertyType>(classKey: SchemaItemKey, propertyName: string): Promise<T> {\r\n const property = await super.getProperty<MutableArrayProperty>(classKey, propertyName) as T;\r\n if (!property.isArray()){\r\n throw new SchemaEditingError(ECEditingStatus.InvalidPropertyType, new PropertyId(this.ecClassType, classKey, propertyName, PropertyTypeName.ArrayProperty));\r\n }\r\n return property;\r\n }\r\n}\r\n\r\n/**\r\n * @alpha\r\n * A class extending Properties allowing editing of attributes of PrimitiveProperty and EnumerationProperty.\r\n */\r\nclass PrimitiveOrEnumProperties extends Properties {\r\n public constructor(ecClassType: ECClassSchemaItems, _schemaEditor: SchemaContextEditor) {\r\n super(ecClassType, _schemaEditor);\r\n }\r\n\r\n /**\r\n * Sets the extendTypeName attribute value.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param extendTypeName The extended type name of the property.\r\n */\r\n public async setExtendedTypeName(classKey: SchemaItemKey, propertyName: string, extendedTypeName: string) {\r\n const property = await this.getProperty<MutablePrimitiveOrEnumPropertyBase>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetExtendedTypeName, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setExtendedTypeName(extendedTypeName);\r\n }\r\n\r\n /**\r\n * Sets the minLength attribute value.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param minLength The minimum length of the property.\r\n */\r\n public async setMinLength(classKey: SchemaItemKey, propertyName: string, minLength: number) {\r\n const property = await this.getProperty<MutablePrimitiveOrEnumPropertyBase>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetMinLength, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setMinLength(minLength);\r\n }\r\n\r\n /**\r\n * Sets the maxLength attribute value.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param maxLength The maximum length of the property.\r\n */\r\n public async setMaxLength(classKey: SchemaItemKey, propertyName: string, maxLength: number) {\r\n const property = await this.getProperty<MutablePrimitiveOrEnumPropertyBase>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetMaxLength, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setMaxLength(maxLength);\r\n }\r\n\r\n /**\r\n * Sets the minValue attribute value.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param minValue The minimum value of the property.\r\n */\r\n public async setMinValue(classKey: SchemaItemKey, propertyName: string, minValue: number) {\r\n const property = await this.getProperty<MutablePrimitiveOrEnumPropertyBase>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetMinValue, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setMinValue(minValue);\r\n }\r\n\r\n /**\r\n * Sets the maxValue attribute value.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param maxValue The maximum value of the property.\r\n */\r\n public async setMaxValue(classKey: SchemaItemKey, propertyName: string, maxValue: number) {\r\n const property = await this.getProperty<MutablePrimitiveOrEnumPropertyBase>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetMaxValue, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setMaxValue(maxValue);\r\n }\r\n}\r\n\r\n/**\r\n * @alpha\r\n * A class extending Properties allowing editing of PrimitiveProperty attributes.\r\n */\r\nexport class PrimitiveProperties extends PrimitiveOrEnumProperties {\r\n public constructor(ecClassType: ECClassSchemaItems, _schemaEditor: SchemaContextEditor) {\r\n super(ecClassType, _schemaEditor);\r\n }\r\n\r\n /**\r\n * Override to validate that the found property is a PrimitiveProperty.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n */\r\n protected override async getProperty<T extends MutablePropertyType>(classKey: SchemaItemKey, propertyName: string): Promise<T> {\r\n const property = await super.getProperty<MutablePrimitiveOrEnumPropertyBase>(classKey, propertyName) as T;\r\n if (!(property instanceof PrimitiveProperty)){\r\n throw new SchemaEditingError(ECEditingStatus.InvalidPropertyType, new PropertyId(this.ecClassType, classKey, propertyName, PropertyTypeName.PrimitiveProperty));\r\n }\r\n return property;\r\n }\r\n}\r\n\r\n/**\r\n * @alpha\r\n * A class extending Properties allowing editing of EnumerationProperty attributes.\r\n */\r\nexport class EnumerationProperties extends PrimitiveOrEnumProperties {\r\n public constructor(ecClassType: ECClassSchemaItems, _schemaEditor: SchemaContextEditor) {\r\n super(ecClassType, _schemaEditor);\r\n }\r\n\r\n /**\r\n * Override to validate that the found property is a EnumerationProperty.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n */\r\n protected override async getProperty<T extends MutablePropertyType>(classKey: SchemaItemKey, propertyName: string): Promise<T> {\r\n const property = await super.getProperty<MutablePrimitiveOrEnumPropertyBase>(classKey, propertyName) as T;\r\n if (!(property instanceof EnumerationProperty)){\r\n throw new SchemaEditingError(ECEditingStatus.InvalidPropertyType, new PropertyId(this.ecClassType, classKey, propertyName, PropertyTypeName.EnumerationProperty));\r\n }\r\n return property;\r\n }\r\n}\r\n\r\n/**\r\n * @alpha\r\n * A class extending Properties allowing editing of NavigationProperties attributes.\r\n */\r\nexport class NavigationProperties extends Properties {\r\n public constructor(ecClassType: ECClassSchemaItems, _schemaEditor: SchemaContextEditor) {\r\n super(ecClassType, _schemaEditor);\r\n }\r\n\r\n /**\r\n * Override to validate that the found property is a NavigationProperty.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n */\r\n protected override async getProperty<T extends MutablePropertyType>(classKey: SchemaItemKey, propertyName: string): Promise<T> {\r\n const property = await super.getProperty<MutableNavigationProperty>(classKey, propertyName) as T;\r\n if (!(property instanceof NavigationProperty)){\r\n throw new SchemaEditingError(ECEditingStatus.InvalidPropertyType, new PropertyId(this.ecClassType, classKey, propertyName, PropertyTypeName.NavigationProperty));\r\n }\r\n return property;\r\n }\r\n}\r\n\r\n/**\r\n * @alpha\r\n * A class extending Properties allowing editing of StructProperty attributes.\r\n */\r\nexport class StructProperties extends Properties {\r\n public constructor(ecClassType: ECClassSchemaItems, _schemaEditor: SchemaContextEditor) {\r\n super(ecClassType, _schemaEditor);\r\n }\r\n\r\n /**\r\n * Override to validate that the found property is a StructProperty.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n */\r\n protected override async getProperty<T extends MutablePropertyType>(classKey: SchemaItemKey, propertyName: string): Promise<T> {\r\n const property = await super.getProperty<MutableStructProperty>(classKey, propertyName) as T;\r\n if (!(property instanceof StructProperty)){\r\n throw new SchemaEditingError(ECEditingStatus.InvalidPropertyType, new PropertyId(this.ecClassType, classKey, propertyName, PropertyTypeName.StructProperty));\r\n }\r\n return property;\r\n }\r\n}\r\n\r\n"]}
|
|
1
|
+
{"version":3,"file":"Properties.js","sourceRoot":"","sources":["../../../src/Editing/Properties.ts"],"names":[],"mappings":";;;AAAA,gEAEoG;AACpG,sDAA6C;AAE7C,+CAA+C;AAQ/C,2CAAsI;AAKtI;;;GAGG;AACH,MAAa,UAAU;IACrB,YAA6B,WAA+B,EAAY,aAAkC;QAA7E,gBAAW,GAAX,WAAW,CAAoB;QAAY,kBAAa,GAAb,aAAa,CAAqB;IAC1G,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,QAAuB,EAAE,YAAoB,EAAE,eAAuB;QACzF,IAAI,OAAe,CAAC;QACpB,IAAI,CAAC;YACH,OAAO,GAAG,IAAI,0BAAM,CAAC,eAAe,CAAC,CAAC;QACxC,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,eAAe,EAAE,IAAI,sBAAU,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,YAAY,CAAC,EACpH,IAAI,8BAAkB,CAAC,2BAAe,CAAC,aAAa,EAAE,IAAI,sBAAU,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,C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,CAAC,cAAc,CAAC,CAAC,CAAC;QAC/J,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAjBD,4CAiBC","sourcesContent":["import { CustomAttribute, CustomAttributeContainerProps, DelayedPromiseWithProps, ECClass, ECName,\r\n EnumerationProperty, KindOfQuantity, NavigationProperty, PrimitiveProperty,\r\n PropertyCategory, SchemaItemKey, SchemaItemType, StructProperty } from \"@itwin/ecschema-metadata\";\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { SchemaContextEditor } from \"./Editor\";\r\nimport * as Rules from \"../Validation/ECRules\";\r\nimport { MutableArrayProperty } from \"./Mutable/MutableArrayProperty\";\r\nimport { MutableProperty } from \"./Mutable/MutableProperty\";\r\nimport { MutablePrimitiveOrEnumPropertyBase } from \"./Mutable/MutablePrimitiveOrEnumProperty\";\r\nimport { MutableClass } from \"./Mutable/MutableClass\";\r\nimport { MutableStructProperty } from \"./Mutable/MutableStructProperty\";\r\nimport { MutableNavigationProperty } from \"./Mutable/MutableNavigationProperty\";\r\nimport { ECClassSchemaItems } from \"./ECClasses\";\r\nimport { ClassId, CustomAttributeId, ECEditingStatus, PropertyId, PropertyTypeName, SchemaEditingError, SchemaId } from \"./Exception\";\r\nimport { AnyDiagnostic } from \"../Validation/Diagnostic\";\r\n\r\ntype MutablePropertyType = MutableProperty | MutableArrayProperty | MutablePrimitiveOrEnumPropertyBase | MutableNavigationProperty | MutableStructProperty;\r\n\r\n/**\r\n * @alpha\r\n * A class allowing editing of attributes of the base Property class.\r\n */\r\nexport class Properties {\r\n public constructor(protected ecClassType: ECClassSchemaItems, protected _schemaEditor: SchemaContextEditor) {\r\n }\r\n\r\n public async setName(classKey: SchemaItemKey, propertyName: string, newPropertyName: string) {\r\n let newName: ECName;\r\n try {\r\n newName = new ECName(newPropertyName);\r\n } catch {\r\n throw new SchemaEditingError(ECEditingStatus.SetPropertyName, new PropertyId(this.ecClassType, classKey, propertyName),\r\n new SchemaEditingError(ECEditingStatus.InvalidECName, new PropertyId(this.ecClassType, classKey, newPropertyName)));\r\n }\r\n\r\n const existingProperty = await this.getProperty<MutableProperty>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetPropertyName, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n\r\n const baseProperty = await existingProperty.class.getProperty(newPropertyName, true) as MutableProperty;\r\n if (baseProperty) {\r\n throw new SchemaEditingError(ECEditingStatus.SetPropertyName, new PropertyId(this.ecClassType, classKey, propertyName),\r\n new SchemaEditingError(ECEditingStatus.PropertyAlreadyExists, new PropertyId(this.ecClassType, baseProperty.class.key, newPropertyName)));\r\n }\r\n\r\n // Handle derived classes\r\n const derivedProperties: Array<MutableProperty> = [];\r\n const derivedClasses = await this.findDerivedClasses(existingProperty.class as MutableClass);\r\n for (const derivedClass of derivedClasses) {\r\n if (await derivedClass.getProperty(newPropertyName)) {\r\n throw new SchemaEditingError(ECEditingStatus.SetPropertyName, new PropertyId(this.ecClassType, classKey, propertyName),\r\n new SchemaEditingError(ECEditingStatus.PropertyAlreadyExists, new PropertyId(this.ecClassType, derivedClass.key, newPropertyName)));\r\n }\r\n\r\n const propertyOverride = await derivedClass.getProperty(propertyName) as MutableProperty;\r\n // If found the property is overridden in the derived class.\r\n if (propertyOverride)\r\n derivedProperties.push(propertyOverride);\r\n }\r\n\r\n // Re-name the overridden property in all derived classes\r\n derivedProperties.forEach((prop: MutableProperty) => {\r\n prop.setName(newName);\r\n });\r\n\r\n existingProperty.setName(newName);\r\n }\r\n\r\n /**\r\n * Sets the property description.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param description The new description to set.\r\n */\r\n public async setDescription(classKey: SchemaItemKey, propertyName: string, description: string) {\r\n const property = await this.getProperty<MutableProperty>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetDescription, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setDescription(description);\r\n }\r\n\r\n /**\r\n * Sets the property label.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param label The new label to set.\r\n */\r\n public async setLabel(classKey: SchemaItemKey, propertyName: string, label: string) {\r\n const property = await this.getProperty<MutableProperty>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetLabel, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setLabel(label);\r\n }\r\n\r\n /**\r\n * Sets the property isReadOnly attribute.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param isReadOnly The new isReadOnly value.\r\n */\r\n public async setIsReadOnly(classKey: SchemaItemKey, propertyName: string, isReadOnly: boolean) {\r\n const property = await this.getProperty<MutableProperty>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetIsReadOnly, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setIsReadOnly(isReadOnly);\r\n }\r\n\r\n /**\r\n * Sets the property priority.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param priority The new priority.\r\n */\r\n public async setPriority(classKey: SchemaItemKey, propertyName: string, priority: number) {\r\n const property = await this.getProperty<MutableProperty>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetPriority, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setPriority(priority);\r\n }\r\n\r\n /**\r\n * Sets the property category.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param categoryKey The SchemaItemKey of the property category.\r\n */\r\n public async setCategory(classKey: SchemaItemKey, propertyName: string, categoryKey: SchemaItemKey) {\r\n const property = await this.getProperty<MutableProperty>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetCategory, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n\r\n const category = await this._schemaEditor.lookupSchemaItem<PropertyCategory>(property.class.schema, categoryKey, SchemaItemType.PropertyCategory)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetCategory, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n\r\n property.setCategory(new DelayedPromiseWithProps<SchemaItemKey, PropertyCategory>(categoryKey, async () => category));\r\n }\r\n\r\n /**\r\n * Sets the KindOfQuantity of a property.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param kindOfQuantityKey The SchemaItemKey of the KindOfQuantity.\r\n */\r\n public async setKindOfQuantity(classKey: SchemaItemKey, propertyName: string, kindOfQuantityKey: SchemaItemKey) {\r\n const property = await this.getProperty<MutableProperty>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetKindOfQuantity, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n\r\n const koq = await this._schemaEditor.lookupSchemaItem<KindOfQuantity>(property.class.schema, kindOfQuantityKey, SchemaItemType.KindOfQuantity)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetKindOfQuantity, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n\r\n const currentKoq = await property.kindOfQuantity;\r\n if(currentKoq && currentKoq.persistenceUnit && koq.persistenceUnit && !currentKoq.persistenceUnit.matchesFullName(koq.persistenceUnit.fullName)) {\r\n throw new SchemaEditingError(ECEditingStatus.SetKindOfQuantity, new PropertyId(this.ecClassType, classKey, propertyName), undefined, undefined, \"KindOfQuantity can only be changed if it has the same persistence unit as the property.\");\r\n }\r\n\r\n property.setKindOfQuantity(new DelayedPromiseWithProps<SchemaItemKey, KindOfQuantity>(kindOfQuantityKey, async () => koq));\r\n }\r\n\r\n /**\r\n * Adds a CustomAttribute instance to the Property identified by the given SchemaItemKey and property name.\r\n * @param classKey The SchemaItemKey identifying the class.\r\n * @param propertyName The name of the property.\r\n * @param customAttribute The CustomAttribute instance to add.\r\n */\r\n public async addCustomAttribute(classKey: SchemaItemKey, propertyName: string, customAttribute: CustomAttribute) {\r\n const property = await this.getProperty<MutableProperty>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.AddCustomAttributeToProperty, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n\r\n property.addCustomAttribute(customAttribute);\r\n\r\n const diagnosticsIterable = Rules.validateCustomAttributeInstance(property, customAttribute);\r\n\r\n const diagnostics: AnyDiagnostic[] = [];\r\n for await (const diagnostic of diagnosticsIterable) {\r\n diagnostics.push(diagnostic);\r\n }\r\n\r\n if (diagnostics.length > 0) {\r\n this.removeCustomAttribute(property, customAttribute);\r\n throw new SchemaEditingError(ECEditingStatus.AddCustomAttributeToProperty, new PropertyId(this.ecClassType, classKey, propertyName),\r\n new SchemaEditingError(ECEditingStatus.RuleViolation, new CustomAttributeId(customAttribute.className, property)));\r\n }\r\n }\r\n\r\n /**\r\n * Removes a CustomAttribute from a property.\r\n * @param container\r\n * @param customAttribute\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 /**\r\n * Gets the property with the specified name from the class identified by the given key.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property to retrieve.\r\n */\r\n protected async getProperty<T extends MutablePropertyType>(classKey: SchemaItemKey, propertyName: string): Promise<T> {\r\n const mutableClass = await this.getClass(classKey);\r\n\r\n const property = await mutableClass.getProperty(propertyName) as T;\r\n if (property === undefined) {\r\n throw new SchemaEditingError(ECEditingStatus.PropertyNotFound, new PropertyId(mutableClass.schemaItemType as ECClassSchemaItems, classKey, propertyName));\r\n }\r\n\r\n return property;\r\n }\r\n\r\n private async findDerivedClasses(mutableClass: MutableClass): Promise<Array<MutableClass>>{\r\n const derivedClasses: Array<MutableClass> = [];\r\n\r\n for (const schemaItem of this._schemaEditor.schemaContext.getSchemaItems()) {\r\n if(ECClass.isECClass(schemaItem) && await schemaItem.is(mutableClass)) {\r\n if (!mutableClass.key.matches(schemaItem.key)) {\r\n derivedClasses.push(schemaItem as MutableClass);\r\n }\r\n }\r\n }\r\n\r\n return derivedClasses;\r\n }\r\n\r\n private async getClass(classKey: SchemaItemKey): Promise<MutableClass> {\r\n const schema = await this._schemaEditor.getSchema(classKey.schemaKey);\r\n if (schema === undefined)\r\n throw new SchemaEditingError(ECEditingStatus.SchemaNotFound, new SchemaId(classKey.schemaKey));\r\n\r\n const ecClass = await schema.getItem(classKey.name);\r\n if (ecClass === undefined)\r\n throw new SchemaEditingError(ECEditingStatus.SchemaItemNotFound, new ClassId(this.ecClassType, classKey));\r\n\r\n if (ecClass.schemaItemType !== this.ecClassType){\r\n throw new SchemaEditingError(ECEditingStatus.InvalidSchemaItemType, new ClassId(this.ecClassType, classKey));\r\n }\r\n\r\n return ecClass as MutableClass;\r\n }\r\n}\r\n\r\n/**\r\n * @alpha\r\n * A class extending Properties allowing editing of attributes of PrimitiveArrayProperty,\r\n * EnumerationArrayProperty and StructArrayProperty.\r\n */\r\nexport class ArrayProperties extends Properties {\r\n public constructor(ecClassType: ECClassSchemaItems, _schemaEditor: SchemaContextEditor) {\r\n super(ecClassType, _schemaEditor);\r\n }\r\n\r\n /**\r\n * Sets the array property minOccurs attribute.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param minOccurs The new minOccurs value.\r\n */\r\n public async setMinOccurs(classKey: SchemaItemKey, propertyName: string, minOccurs: number) {\r\n const property = await this.getProperty<MutableArrayProperty>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetMinOccurs, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setMinOccurs(minOccurs);\r\n }\r\n\r\n /**\r\n * Sets the array property maxOccurs attribute.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param maxOccurs The new maxOccurs value.\r\n */\r\n public async setMaxOccurs(classKey: SchemaItemKey, propertyName: string, maxOccurs: number) {\r\n const property = await this.getProperty<MutableArrayProperty>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetMaxOccurs, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setMaxOccurs(maxOccurs);\r\n }\r\n\r\n /**\r\n * Override to validate that the found property is an ArrayProperty.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n */\r\n protected override async getProperty<T extends MutablePropertyType>(classKey: SchemaItemKey, propertyName: string): Promise<T> {\r\n const property = await super.getProperty<MutableArrayProperty>(classKey, propertyName) as T;\r\n if (!property.isArray()){\r\n throw new SchemaEditingError(ECEditingStatus.InvalidPropertyType, new PropertyId(this.ecClassType, classKey, propertyName, PropertyTypeName.ArrayProperty));\r\n }\r\n return property;\r\n }\r\n}\r\n\r\n/**\r\n * @alpha\r\n * A class extending Properties allowing editing of attributes of PrimitiveProperty and EnumerationProperty.\r\n */\r\nclass PrimitiveOrEnumProperties extends Properties {\r\n public constructor(ecClassType: ECClassSchemaItems, _schemaEditor: SchemaContextEditor) {\r\n super(ecClassType, _schemaEditor);\r\n }\r\n\r\n /**\r\n * Sets the extendTypeName attribute value.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param extendTypeName The extended type name of the property.\r\n */\r\n public async setExtendedTypeName(classKey: SchemaItemKey, propertyName: string, extendedTypeName: string) {\r\n const property = await this.getProperty<MutablePrimitiveOrEnumPropertyBase>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetExtendedTypeName, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setExtendedTypeName(extendedTypeName);\r\n }\r\n\r\n /**\r\n * Sets the minLength attribute value.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param minLength The minimum length of the property.\r\n */\r\n public async setMinLength(classKey: SchemaItemKey, propertyName: string, minLength: number) {\r\n const property = await this.getProperty<MutablePrimitiveOrEnumPropertyBase>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetMinLength, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setMinLength(minLength);\r\n }\r\n\r\n /**\r\n * Sets the maxLength attribute value.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param maxLength The maximum length of the property.\r\n */\r\n public async setMaxLength(classKey: SchemaItemKey, propertyName: string, maxLength: number) {\r\n const property = await this.getProperty<MutablePrimitiveOrEnumPropertyBase>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetMaxLength, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setMaxLength(maxLength);\r\n }\r\n\r\n /**\r\n * Sets the minValue attribute value.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param minValue The minimum value of the property.\r\n */\r\n public async setMinValue(classKey: SchemaItemKey, propertyName: string, minValue: number) {\r\n const property = await this.getProperty<MutablePrimitiveOrEnumPropertyBase>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetMinValue, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setMinValue(minValue);\r\n }\r\n\r\n /**\r\n * Sets the maxValue attribute value.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n * @param maxValue The maximum value of the property.\r\n */\r\n public async setMaxValue(classKey: SchemaItemKey, propertyName: string, maxValue: number) {\r\n const property = await this.getProperty<MutablePrimitiveOrEnumPropertyBase>(classKey, propertyName)\r\n .catch((e: any) => {\r\n throw new SchemaEditingError(ECEditingStatus.SetMaxValue, new PropertyId(this.ecClassType, classKey, propertyName), e);\r\n });\r\n property.setMaxValue(maxValue);\r\n }\r\n}\r\n\r\n/**\r\n * @alpha\r\n * A class extending Properties allowing editing of PrimitiveProperty attributes.\r\n */\r\nexport class PrimitiveProperties extends PrimitiveOrEnumProperties {\r\n public constructor(ecClassType: ECClassSchemaItems, _schemaEditor: SchemaContextEditor) {\r\n super(ecClassType, _schemaEditor);\r\n }\r\n\r\n /**\r\n * Override to validate that the found property is a PrimitiveProperty.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n */\r\n protected override async getProperty<T extends MutablePropertyType>(classKey: SchemaItemKey, propertyName: string): Promise<T> {\r\n const property = await super.getProperty<MutablePrimitiveOrEnumPropertyBase>(classKey, propertyName) as T;\r\n if (!(property instanceof PrimitiveProperty)){\r\n throw new SchemaEditingError(ECEditingStatus.InvalidPropertyType, new PropertyId(this.ecClassType, classKey, propertyName, PropertyTypeName.PrimitiveProperty));\r\n }\r\n return property;\r\n }\r\n}\r\n\r\n/**\r\n * @alpha\r\n * A class extending Properties allowing editing of EnumerationProperty attributes.\r\n */\r\nexport class EnumerationProperties extends PrimitiveOrEnumProperties {\r\n public constructor(ecClassType: ECClassSchemaItems, _schemaEditor: SchemaContextEditor) {\r\n super(ecClassType, _schemaEditor);\r\n }\r\n\r\n /**\r\n * Override to validate that the found property is a EnumerationProperty.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n */\r\n protected override async getProperty<T extends MutablePropertyType>(classKey: SchemaItemKey, propertyName: string): Promise<T> {\r\n const property = await super.getProperty<MutablePrimitiveOrEnumPropertyBase>(classKey, propertyName) as T;\r\n if (!(property instanceof EnumerationProperty)){\r\n throw new SchemaEditingError(ECEditingStatus.InvalidPropertyType, new PropertyId(this.ecClassType, classKey, propertyName, PropertyTypeName.EnumerationProperty));\r\n }\r\n return property;\r\n }\r\n}\r\n\r\n/**\r\n * @alpha\r\n * A class extending Properties allowing editing of NavigationProperties attributes.\r\n */\r\nexport class NavigationProperties extends Properties {\r\n public constructor(ecClassType: ECClassSchemaItems, _schemaEditor: SchemaContextEditor) {\r\n super(ecClassType, _schemaEditor);\r\n }\r\n\r\n /**\r\n * Override to validate that the found property is a NavigationProperty.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n */\r\n protected override async getProperty<T extends MutablePropertyType>(classKey: SchemaItemKey, propertyName: string): Promise<T> {\r\n const property = await super.getProperty<MutableNavigationProperty>(classKey, propertyName) as T;\r\n if (!(property instanceof NavigationProperty)){\r\n throw new SchemaEditingError(ECEditingStatus.InvalidPropertyType, new PropertyId(this.ecClassType, classKey, propertyName, PropertyTypeName.NavigationProperty));\r\n }\r\n return property;\r\n }\r\n}\r\n\r\n/**\r\n * @alpha\r\n * A class extending Properties allowing editing of StructProperty attributes.\r\n */\r\nexport class StructProperties extends Properties {\r\n public constructor(ecClassType: ECClassSchemaItems, _schemaEditor: SchemaContextEditor) {\r\n super(ecClassType, _schemaEditor);\r\n }\r\n\r\n /**\r\n * Override to validate that the found property is a StructProperty.\r\n * @param classKey The SchemaItemKey of the class.\r\n * @param propertyName The name of the property.\r\n */\r\n protected override async getProperty<T extends MutablePropertyType>(classKey: SchemaItemKey, propertyName: string): Promise<T> {\r\n const property = await super.getProperty<MutableStructProperty>(classKey, propertyName) as T;\r\n if (!(property instanceof StructProperty)){\r\n throw new SchemaEditingError(ECEditingStatus.InvalidPropertyType, new PropertyId(this.ecClassType, classKey, propertyName, PropertyTypeName.StructProperty));\r\n }\r\n return property;\r\n }\r\n}\r\n\r\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.modifyClass =
|
|
3
|
+
exports.modifyClass = modifyClass;
|
|
4
4
|
const Utils_1 = require("./Utils");
|
|
5
5
|
const ecschema_metadata_1 = require("@itwin/ecschema-metadata");
|
|
6
6
|
const PropertyMerger_1 = require("./PropertyMerger");
|
|
@@ -36,7 +36,6 @@ async function modifyClass(context, change, itemKey, item) {
|
|
|
36
36
|
}
|
|
37
37
|
return (0, PropertyMerger_1.mergeClassProperties)(context, change, itemKey);
|
|
38
38
|
}
|
|
39
|
-
exports.modifyClass = modifyClass;
|
|
40
39
|
async function setBaseClass(context, item, baseClass, isInitial) {
|
|
41
40
|
if (!isInitial && (item.baseClass === undefined))
|
|
42
41
|
throw new Error(`Changing the class '${item.key.name}' baseClass is not supported.`);
|