@itwin/ecschema-editing 3.4.0-dev.50 → 3.4.0-dev.56
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/lib/cjs/Editing/Constants.d.ts +20 -20
- package/lib/cjs/Editing/Constants.d.ts.map +1 -1
- package/lib/cjs/Editing/Constants.js +60 -64
- package/lib/cjs/Editing/Constants.js.map +1 -1
- package/lib/cjs/Editing/CustomAttributes.d.ts +20 -20
- package/lib/cjs/Editing/CustomAttributes.d.ts.map +1 -1
- package/lib/cjs/Editing/CustomAttributes.js +59 -62
- package/lib/cjs/Editing/CustomAttributes.js.map +1 -1
- package/lib/cjs/Editing/ECClasses.d.ts +54 -54
- package/lib/cjs/Editing/ECClasses.d.ts.map +1 -1
- package/lib/cjs/Editing/ECClasses.js +269 -269
- package/lib/cjs/Editing/ECClasses.js.map +1 -1
- package/lib/cjs/Editing/Editor.d.ts +112 -112
- package/lib/cjs/Editing/Editor.d.ts.map +1 -1
- package/lib/cjs/Editing/Editor.js +166 -166
- package/lib/cjs/Editing/Editor.js.map +1 -1
- package/lib/cjs/Editing/Entities.d.ts +25 -25
- package/lib/cjs/Editing/Entities.d.ts.map +1 -1
- package/lib/cjs/Editing/Entities.js +116 -124
- package/lib/cjs/Editing/Entities.js.map +1 -1
- package/lib/cjs/Editing/Enumerations.d.ts +21 -21
- package/lib/cjs/Editing/Enumerations.d.ts.map +1 -1
- package/lib/cjs/Editing/Enumerations.js +66 -76
- package/lib/cjs/Editing/Enumerations.js.map +1 -1
- package/lib/cjs/Editing/Formats.d.ts +21 -21
- package/lib/cjs/Editing/Formats.d.ts.map +1 -1
- package/lib/cjs/Editing/Formats.js +61 -63
- package/lib/cjs/Editing/Formats.js.map +1 -1
- package/lib/cjs/Editing/InvertedUnits.d.ts +17 -17
- package/lib/cjs/Editing/InvertedUnits.d.ts.map +1 -1
- package/lib/cjs/Editing/InvertedUnits.js +82 -85
- package/lib/cjs/Editing/InvertedUnits.js.map +1 -1
- package/lib/cjs/Editing/KindOfQuantities.d.ts +28 -28
- package/lib/cjs/Editing/KindOfQuantities.d.ts.map +1 -1
- package/lib/cjs/Editing/KindOfQuantities.js +78 -79
- package/lib/cjs/Editing/KindOfQuantities.js.map +1 -1
- package/lib/cjs/Editing/Mixins.d.ts +22 -22
- package/lib/cjs/Editing/Mixins.d.ts.map +1 -1
- package/lib/cjs/Editing/Mixins.js +84 -88
- package/lib/cjs/Editing/Mixins.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableCAClass.d.ts +9 -9
- package/lib/cjs/Editing/Mutable/MutableCAClass.js +15 -15
- package/lib/cjs/Editing/Mutable/MutableCAClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableClass.d.ts +34 -34
- package/lib/cjs/Editing/Mutable/MutableClass.js +22 -22
- package/lib/cjs/Editing/Mutable/MutableClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableConstant.d.ts +12 -12
- package/lib/cjs/Editing/Mutable/MutableConstant.js +15 -15
- package/lib/cjs/Editing/Mutable/MutableConstant.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableEntityClass.d.ts +15 -15
- package/lib/cjs/Editing/Mutable/MutableEntityClass.js +59 -59
- package/lib/cjs/Editing/Mutable/MutableEntityClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableEnumeration.d.ts +9 -9
- package/lib/cjs/Editing/Mutable/MutableEnumeration.js +14 -14
- package/lib/cjs/Editing/Mutable/MutableEnumeration.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableFormat.d.ts +18 -18
- package/lib/cjs/Editing/Mutable/MutableFormat.js +15 -15
- package/lib/cjs/Editing/Mutable/MutableFormat.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableInvertedUnit.d.ts +10 -10
- package/lib/cjs/Editing/Mutable/MutableInvertedUnit.js +15 -15
- package/lib/cjs/Editing/Mutable/MutableInvertedUnit.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableKindOfQuantity.d.ts +10 -10
- package/lib/cjs/Editing/Mutable/MutableKindOfQuantity.js +15 -15
- package/lib/cjs/Editing/Mutable/MutableKindOfQuantity.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableMixin.d.ts +11 -11
- package/lib/cjs/Editing/Mutable/MutableMixin.js +15 -15
- package/lib/cjs/Editing/Mutable/MutableMixin.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutablePhenomenon.d.ts +9 -9
- package/lib/cjs/Editing/Mutable/MutablePhenomenon.js +15 -15
- package/lib/cjs/Editing/Mutable/MutablePhenomenon.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableProperty.d.ts +8 -8
- package/lib/cjs/Editing/Mutable/MutableProperty.js +15 -15
- package/lib/cjs/Editing/Mutable/MutableProperty.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutablePropertyCategory.d.ts +9 -9
- package/lib/cjs/Editing/Mutable/MutablePropertyCategory.js +15 -15
- package/lib/cjs/Editing/Mutable/MutablePropertyCategory.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableRelationshipClass.d.ts +21 -21
- package/lib/cjs/Editing/Mutable/MutableRelationshipClass.js +24 -24
- package/lib/cjs/Editing/Mutable/MutableRelationshipClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableSchema.d.ts +45 -45
- package/lib/cjs/Editing/Mutable/MutableSchema.js +17 -17
- package/lib/cjs/Editing/Mutable/MutableSchema.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableUnit.d.ts +11 -11
- package/lib/cjs/Editing/Mutable/MutableUnit.js +15 -15
- package/lib/cjs/Editing/Mutable/MutableUnit.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableUnitSystem.d.ts +8 -8
- package/lib/cjs/Editing/Mutable/MutableUnitSystem.js +15 -15
- package/lib/cjs/Editing/Mutable/MutableUnitSystem.js.map +1 -1
- package/lib/cjs/Editing/Phenomena.d.ts +15 -15
- package/lib/cjs/Editing/Phenomena.d.ts.map +1 -1
- package/lib/cjs/Editing/Phenomena.js +44 -47
- package/lib/cjs/Editing/Phenomena.js.map +1 -1
- package/lib/cjs/Editing/PropertyCategories.d.ts +16 -16
- package/lib/cjs/Editing/PropertyCategories.d.ts.map +1 -1
- package/lib/cjs/Editing/PropertyCategories.js +51 -53
- package/lib/cjs/Editing/PropertyCategories.js.map +1 -1
- package/lib/cjs/Editing/RelationshipClasses.d.ts +21 -21
- package/lib/cjs/Editing/RelationshipClasses.d.ts.map +1 -1
- package/lib/cjs/Editing/RelationshipClasses.js +68 -69
- package/lib/cjs/Editing/RelationshipClasses.js.map +1 -1
- package/lib/cjs/Editing/Structs.d.ts +19 -19
- package/lib/cjs/Editing/Structs.d.ts.map +1 -1
- package/lib/cjs/Editing/Structs.js +57 -60
- package/lib/cjs/Editing/Structs.js.map +1 -1
- package/lib/cjs/Editing/UnitSystems.d.ts +15 -15
- package/lib/cjs/Editing/UnitSystems.d.ts.map +1 -1
- package/lib/cjs/Editing/UnitSystems.js +41 -43
- package/lib/cjs/Editing/UnitSystems.js.map +1 -1
- package/lib/cjs/Editing/Units.d.ts +15 -15
- package/lib/cjs/Editing/Units.d.ts.map +1 -1
- package/lib/cjs/Editing/Units.js +58 -61
- package/lib/cjs/Editing/Units.js.map +1 -1
- package/lib/cjs/Validation/Diagnostic.d.ts +321 -321
- package/lib/cjs/Validation/Diagnostic.js +310 -310
- package/lib/cjs/Validation/Diagnostic.js.map +1 -1
- package/lib/cjs/Validation/DiagnosticReporter.d.ts +96 -96
- package/lib/cjs/Validation/DiagnosticReporter.d.ts.map +1 -1
- package/lib/cjs/Validation/DiagnosticReporter.js +106 -106
- package/lib/cjs/Validation/DiagnosticReporter.js.map +1 -1
- package/lib/cjs/Validation/ECRules.d.ts +448 -438
- package/lib/cjs/Validation/ECRules.d.ts.map +1 -1
- package/lib/cjs/Validation/ECRules.js +593 -583
- package/lib/cjs/Validation/ECRules.js.map +1 -1
- package/lib/cjs/Validation/LoggingDiagnosticReporter.d.ts +13 -13
- package/lib/cjs/Validation/LoggingDiagnosticReporter.js +40 -40
- package/lib/cjs/Validation/LoggingDiagnosticReporter.js.map +1 -1
- package/lib/cjs/Validation/RuleSuppressionSet.d.ts +59 -58
- package/lib/cjs/Validation/RuleSuppressionSet.d.ts.map +1 -1
- package/lib/cjs/Validation/RuleSuppressionSet.js +9 -9
- package/lib/cjs/Validation/RuleSuppressionSet.js.map +1 -1
- package/lib/cjs/Validation/Rules.d.ts +64 -64
- package/lib/cjs/Validation/Rules.js +9 -9
- package/lib/cjs/Validation/Rules.js.map +1 -1
- package/lib/cjs/Validation/SchemaChanges.d.ts +607 -607
- package/lib/cjs/Validation/SchemaChanges.js +1135 -1135
- package/lib/cjs/Validation/SchemaChanges.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareDiagnostics.d.ts +422 -422
- package/lib/cjs/Validation/SchemaCompareDiagnostics.js +111 -111
- package/lib/cjs/Validation/SchemaCompareDiagnostics.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareReporter.d.ts +11 -11
- package/lib/cjs/Validation/SchemaCompareReporter.js +9 -9
- package/lib/cjs/Validation/SchemaCompareReporter.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareResultDelegate.d.ts +236 -236
- package/lib/cjs/Validation/SchemaCompareResultDelegate.js +348 -348
- package/lib/cjs/Validation/SchemaCompareResultDelegate.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareVisitor.d.ts +119 -119
- package/lib/cjs/Validation/SchemaCompareVisitor.js +206 -206
- package/lib/cjs/Validation/SchemaCompareVisitor.js.map +1 -1
- package/lib/cjs/Validation/SchemaComparer.d.ts +171 -171
- package/lib/cjs/Validation/SchemaComparer.js +666 -666
- package/lib/cjs/Validation/SchemaComparer.js.map +1 -1
- package/lib/cjs/Validation/SchemaValidater.d.ts +19 -19
- package/lib/cjs/Validation/SchemaValidater.js +61 -61
- package/lib/cjs/Validation/SchemaValidater.js.map +1 -1
- package/lib/cjs/Validation/SchemaValidationVisitor.d.ts +170 -170
- package/lib/cjs/Validation/SchemaValidationVisitor.d.ts.map +1 -1
- package/lib/cjs/Validation/SchemaValidationVisitor.js +492 -490
- package/lib/cjs/Validation/SchemaValidationVisitor.js.map +1 -1
- package/lib/cjs/Validation/SchemaWalker.d.ts +22 -22
- package/lib/cjs/Validation/SchemaWalker.js +51 -51
- package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
- package/lib/cjs/ecschema-editing.d.ts +33 -33
- package/lib/cjs/ecschema-editing.js +54 -54
- package/lib/cjs/ecschema-editing.js.map +1 -1
- package/package.json +10 -10
- package/public/locales/en/ECSchemaEditing.json +26 -26
|
@@ -1,89 +1,85 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
/** @packageDocumentation
|
|
7
|
-
* @module Editing
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.Mixins = void 0;
|
|
11
|
-
const ecschema_metadata_1 = require("@itwin/ecschema-metadata");
|
|
12
|
-
const ECClasses_1 = require("./ECClasses");
|
|
13
|
-
/**
|
|
14
|
-
* @alpha
|
|
15
|
-
* A class extending ECClasses allowing you to create schema items of type Mixin.
|
|
16
|
-
*/
|
|
17
|
-
class Mixins extends ECClasses_1.ECClasses {
|
|
18
|
-
constructor(_schemaEditor) {
|
|
19
|
-
super(_schemaEditor);
|
|
20
|
-
}
|
|
21
|
-
async create(schemaKey, name, appliesTo, displayLabel, baseClass) {
|
|
22
|
-
const schema = await this._schemaEditor.getSchema(schemaKey);
|
|
23
|
-
if (schema === undefined)
|
|
24
|
-
return { errorMessage: `Schema Key ${schemaKey.toString(true)} not found in context` };
|
|
25
|
-
const newClass = (await schema.createMixinClass(name));
|
|
26
|
-
if (newClass === undefined)
|
|
27
|
-
return { errorMessage: `Failed to create class ${name} in schema ${schemaKey.toString(true)}.` };
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
if (
|
|
57
|
-
return { errorMessage: `
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
await
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if (entity
|
|
69
|
-
throw new ecschema_metadata_1.ECObjectsError(ecschema_metadata_1.ECObjectsStatus.
|
|
70
|
-
if (mixin
|
|
71
|
-
throw new ecschema_metadata_1.ECObjectsError(ecschema_metadata_1.ECObjectsStatus.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
return { itemKey: mixinKey, propertyName: name };
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
exports.Mixins = Mixins;
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module Editing
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.Mixins = void 0;
|
|
11
|
+
const ecschema_metadata_1 = require("@itwin/ecschema-metadata");
|
|
12
|
+
const ECClasses_1 = require("./ECClasses");
|
|
13
|
+
/**
|
|
14
|
+
* @alpha
|
|
15
|
+
* A class extending ECClasses allowing you to create schema items of type Mixin.
|
|
16
|
+
*/
|
|
17
|
+
class Mixins extends ECClasses_1.ECClasses {
|
|
18
|
+
constructor(_schemaEditor) {
|
|
19
|
+
super(_schemaEditor);
|
|
20
|
+
}
|
|
21
|
+
async create(schemaKey, name, appliesTo, displayLabel, baseClass) {
|
|
22
|
+
const schema = await this._schemaEditor.getSchema(schemaKey);
|
|
23
|
+
if (schema === undefined)
|
|
24
|
+
return { errorMessage: `Schema Key ${schemaKey.toString(true)} not found in context` };
|
|
25
|
+
const newClass = (await schema.createMixinClass(name));
|
|
26
|
+
if (newClass === undefined)
|
|
27
|
+
return { errorMessage: `Failed to create class ${name} in schema ${schemaKey.toString(true)}.` };
|
|
28
|
+
if (baseClass !== undefined) {
|
|
29
|
+
const baseClassItem = await schema.lookupItem(baseClass);
|
|
30
|
+
if (baseClassItem === undefined)
|
|
31
|
+
return { errorMessage: `Unable to locate base class ${baseClass.fullName} in schema ${schema.fullName}.` };
|
|
32
|
+
if (baseClassItem.schemaItemType !== ecschema_metadata_1.SchemaItemType.Mixin)
|
|
33
|
+
return { errorMessage: `${baseClassItem.fullName} is not of type Mixin.` };
|
|
34
|
+
newClass.baseClass = new ecschema_metadata_1.DelayedPromiseWithProps(baseClass, async () => baseClassItem);
|
|
35
|
+
}
|
|
36
|
+
const newAppliesTo = (await this._schemaEditor.schemaContext.getSchemaItem(appliesTo));
|
|
37
|
+
if (newAppliesTo === undefined || newAppliesTo.schemaItemType !== ecschema_metadata_1.SchemaItemType.EntityClass)
|
|
38
|
+
return { errorMessage: `Failed to locate the appliedTo entity class ${appliesTo.name}.` };
|
|
39
|
+
newClass.setAppliesTo(new ecschema_metadata_1.DelayedPromiseWithProps(newAppliesTo.key, async () => newAppliesTo));
|
|
40
|
+
if (displayLabel)
|
|
41
|
+
newClass.setDisplayLabel(displayLabel);
|
|
42
|
+
return { itemKey: newClass.key };
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Creates a MixinClass through a MixinProps.
|
|
46
|
+
* @param schemaKey a SchemaKey of the Schema that will house the new object.
|
|
47
|
+
* @param mixinProps a json object that will be used to populate the new MixinClass. Needs a name value passed in.
|
|
48
|
+
*/
|
|
49
|
+
async createFromProps(schemaKey, mixinProps) {
|
|
50
|
+
const schema = await this._schemaEditor.getSchema(schemaKey);
|
|
51
|
+
if (schema === undefined)
|
|
52
|
+
return { errorMessage: `Schema Key ${schemaKey.toString(true)} not found in context` };
|
|
53
|
+
if (mixinProps.name === undefined)
|
|
54
|
+
return { errorMessage: `No name was supplied within props.` };
|
|
55
|
+
const newClass = (await schema.createMixinClass(mixinProps.name));
|
|
56
|
+
if (newClass === undefined)
|
|
57
|
+
return { errorMessage: `Failed to create class ${mixinProps.name} in schema ${schemaKey.toString(true)}.` };
|
|
58
|
+
await newClass.fromJSON(mixinProps);
|
|
59
|
+
return { itemKey: newClass.key };
|
|
60
|
+
}
|
|
61
|
+
async addMixin(entityKey, mixinKey) {
|
|
62
|
+
const entity = (await this._schemaEditor.schemaContext.getSchemaItem(entityKey));
|
|
63
|
+
const mixin = (await this._schemaEditor.schemaContext.getSchemaItem(mixinKey));
|
|
64
|
+
if (entity === undefined)
|
|
65
|
+
throw new ecschema_metadata_1.ECObjectsError(ecschema_metadata_1.ECObjectsStatus.ClassNotFound, `Entity Class ${entityKey.fullName} not found in schema context.`);
|
|
66
|
+
if (mixin === undefined)
|
|
67
|
+
throw new ecschema_metadata_1.ECObjectsError(ecschema_metadata_1.ECObjectsStatus.ClassNotFound, `Mixin Class ${mixinKey.fullName} not found in schema context.`);
|
|
68
|
+
if (entity.schemaItemType !== ecschema_metadata_1.SchemaItemType.EntityClass)
|
|
69
|
+
throw new ecschema_metadata_1.ECObjectsError(ecschema_metadata_1.ECObjectsStatus.InvalidSchemaItemType, `Expected ${entityKey.fullName} to be of type Entity Class.`);
|
|
70
|
+
if (mixin.schemaItemType !== ecschema_metadata_1.SchemaItemType.Mixin)
|
|
71
|
+
throw new ecschema_metadata_1.ECObjectsError(ecschema_metadata_1.ECObjectsStatus.InvalidSchemaItemType, `Expected ${mixinKey.fullName} to be of type Mixin.`);
|
|
72
|
+
entity.addMixin(mixin);
|
|
73
|
+
}
|
|
74
|
+
async createNavigationProperty(mixinKey, name, relationship, direction) {
|
|
75
|
+
const mixin = (await this._schemaEditor.schemaContext.getSchemaItem(mixinKey));
|
|
76
|
+
if (mixin === undefined)
|
|
77
|
+
throw new ecschema_metadata_1.ECObjectsError(ecschema_metadata_1.ECObjectsStatus.ClassNotFound, `Mixin Class ${mixinKey.fullName} not found in schema context.`);
|
|
78
|
+
if (mixin.schemaItemType !== ecschema_metadata_1.SchemaItemType.Mixin)
|
|
79
|
+
throw new ecschema_metadata_1.ECObjectsError(ecschema_metadata_1.ECObjectsStatus.InvalidSchemaItemType, `Expected ${mixinKey.fullName} to be of type Mixin.`);
|
|
80
|
+
await mixin.createNavigationProperty(name, relationship, direction);
|
|
81
|
+
return { itemKey: mixinKey, propertyName: name };
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.Mixins = Mixins;
|
|
89
85
|
//# sourceMappingURL=Mixins.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Mixins.js","sourceRoot":"","sources":["../../../src/Editing/Mixins.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAGkC;AAElC,2CAAwC;AAIxC;;;GAGG;AACH,MAAa,MAAO,SAAQ,qBAAS;IACnC,YAAmB,aAAkC;QACnD,KAAK,CAAC,aAAa,CAAC,CAAC;IACvB,CAAC;IAEM,KAAK,CAAC,MAAM,CA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,CAAC,QAAuB,EAAE,IAAY,EAAE,YAAwC,EAAE,SAAqC;QAC1J,MAAM,KAAK,GAAG,CAAC,MAAM,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,aAAa,CAAe,QAAQ,CAAC,CAAC,CAAC;QAE7F,IAAI,KAAK,KAAK,SAAS;YACrB,MAAM,IAAI,kCAAc,CAAC,mCAAe,CAAC,aAAa,EAAE,eAAe,QAAQ,CAAC,QAAQ,+BAA+B,CAAC,CAAC;QAE3H,IAAI,KAAK,CAAC,cAAc,KAAK,kCAAc,CAAC,KAAK;YAC/C,MAAM,IAAI,kCAAc,CAAC,mCAAe,CAAC,qBAAqB,EAAE,YAAY,QAAQ,CAAC,QAAQ,uBAAuB,CAAC,CAAC;QAExH,MAAM,KAAK,CAAC,wBAAwB,CAAC,IAAI,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;QACpE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;IACnD,CAAC;CACF;AAzFD,wBAyFC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Editing\n */\n\nimport {\n DelayedPromiseWithProps, ECObjectsError, ECObjectsStatus, EntityClass, Mixin, MixinProps, RelationshipClass,\n SchemaItemKey, SchemaItemType, SchemaKey, StrengthDirection,\n} from \"@itwin/ecschema-metadata\";\nimport { PropertyEditResults, SchemaContextEditor, SchemaItemEditResults } from \"./Editor\";\nimport { ECClasses } from \"./ECClasses\";\nimport { MutableMixin } from \"./Mutable/MutableMixin\";\nimport { MutableEntityClass } from \"./Mutable/MutableEntityClass\";\n\n/**\n * @alpha\n * A class extending ECClasses allowing you to create schema items of type Mixin.\n */\nexport class Mixins extends ECClasses {\n public constructor(_schemaEditor: SchemaContextEditor) {\n super(_schemaEditor);\n }\n\n public async create(schemaKey: SchemaKey, name: string, appliesTo: SchemaItemKey, displayLabel?: string, baseClass?: SchemaItemKey): Promise<SchemaItemEditResults> {\n const schema = await this._schemaEditor.getSchema(schemaKey);\n if (schema === undefined)\n return { errorMessage: `Schema Key ${schemaKey.toString(true)} not found in context` };\n\n const newClass = ((await schema.createMixinClass(name)) as MutableMixin);\n if (newClass === undefined)\n return { errorMessage: `Failed to create class ${name} in schema ${schemaKey.toString(true)}.` };\n\n if (baseClass !== undefined) {\n const baseClassItem = await schema.lookupItem<Mixin>(baseClass);\n if (baseClassItem === undefined)\n return { errorMessage: `Unable to locate base class ${baseClass.fullName} in schema ${schema.fullName}.` };\n\n if (baseClassItem.schemaItemType !== SchemaItemType.Mixin)\n return { errorMessage: `${baseClassItem.fullName} is not of type Mixin.` };\n\n newClass.baseClass = new DelayedPromiseWithProps<SchemaItemKey, Mixin>(baseClass, async () => baseClassItem);\n }\n\n const newAppliesTo = (await this._schemaEditor.schemaContext.getSchemaItem<EntityClass>(appliesTo));\n if (newAppliesTo === undefined || newAppliesTo.schemaItemType !== SchemaItemType.EntityClass)\n return { errorMessage: `Failed to locate the appliedTo entity class ${appliesTo.name}.` };\n\n newClass.setAppliesTo(new DelayedPromiseWithProps<SchemaItemKey, EntityClass>(newAppliesTo.key, async () => newAppliesTo));\n\n if (displayLabel)\n newClass.setDisplayLabel(displayLabel);\n\n return { itemKey: newClass.key };\n }\n\n /**\n * Creates a MixinClass through a MixinProps.\n * @param schemaKey a SchemaKey of the Schema that will house the new object.\n * @param mixinProps a json object that will be used to populate the new MixinClass. Needs a name value passed in.\n */\n public async createFromProps(schemaKey: SchemaKey, mixinProps: MixinProps): Promise<SchemaItemEditResults> {\n const schema = await this._schemaEditor.getSchema(schemaKey);\n if (schema === undefined)\n return { errorMessage: `Schema Key ${schemaKey.toString(true)} not found in context` };\n\n if (mixinProps.name === undefined)\n return { errorMessage: `No name was supplied within props.` };\n\n const newClass = (await schema.createMixinClass(mixinProps.name)) as MutableMixin;\n if (newClass === undefined)\n return { errorMessage: `Failed to create class ${mixinProps.name} in schema ${schemaKey.toString(true)}.` };\n\n await newClass.fromJSON(mixinProps);\n return { itemKey: newClass.key };\n }\n\n public async addMixin(entityKey: SchemaItemKey, mixinKey: SchemaItemKey): Promise<void> {\n const entity = (await this._schemaEditor.schemaContext.getSchemaItem<MutableEntityClass>(entityKey));\n const mixin = (await this._schemaEditor.schemaContext.getSchemaItem<Mixin>(mixinKey));\n\n if (entity === undefined)\n throw new ECObjectsError(ECObjectsStatus.ClassNotFound, `Entity Class ${entityKey.fullName} not found in schema context.`);\n\n if (mixin === undefined)\n throw new ECObjectsError(ECObjectsStatus.ClassNotFound, `Mixin Class ${mixinKey.fullName} not found in schema context.`);\n\n if (entity.schemaItemType !== SchemaItemType.EntityClass)\n throw new ECObjectsError(ECObjectsStatus.InvalidSchemaItemType, `Expected ${entityKey.fullName} to be of type Entity Class.`);\n\n if (mixin.schemaItemType !== SchemaItemType.Mixin)\n throw new ECObjectsError(ECObjectsStatus.InvalidSchemaItemType, `Expected ${mixinKey.fullName} to be of type Mixin.`);\n\n entity.addMixin(mixin);\n }\n\n public async createNavigationProperty(mixinKey: SchemaItemKey, name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<PropertyEditResults> {\n const mixin = (await this._schemaEditor.schemaContext.getSchemaItem<MutableMixin>(mixinKey));\n\n if (mixin === undefined)\n throw new ECObjectsError(ECObjectsStatus.ClassNotFound, `Mixin Class ${mixinKey.fullName} not found in schema context.`);\n\n if (mixin.schemaItemType !== SchemaItemType.Mixin)\n throw new ECObjectsError(ECObjectsStatus.InvalidSchemaItemType, `Expected ${mixinKey.fullName} to be of type Mixin.`);\n\n await mixin.createNavigationProperty(name, relationship, direction);\n return { itemKey: mixinKey, propertyName: name };\n }\n}\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CustomAttributeClass, CustomAttributeContainerType } from "@itwin/ecschema-metadata";
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
* An abstract class used for Schema editing.
|
|
5
|
-
*/
|
|
6
|
-
export declare abstract class MutableCAClass extends CustomAttributeClass {
|
|
7
|
-
abstract setContainerType(containerType: CustomAttributeContainerType): void;
|
|
8
|
-
abstract setDisplayLabel(displayLabel: string): void;
|
|
9
|
-
}
|
|
1
|
+
import { CustomAttributeClass, CustomAttributeContainerType } from "@itwin/ecschema-metadata";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* An abstract class used for Schema editing.
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class MutableCAClass extends CustomAttributeClass {
|
|
7
|
+
abstract setContainerType(containerType: CustomAttributeContainerType): void;
|
|
8
|
+
abstract setDisplayLabel(displayLabel: string): void;
|
|
9
|
+
}
|
|
10
10
|
//# sourceMappingURL=MutableCAClass.d.ts.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MutableCAClass = void 0;
|
|
4
|
-
/*---------------------------------------------------------------------------------------------
|
|
5
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
7
|
-
*--------------------------------------------------------------------------------------------*/
|
|
8
|
-
const ecschema_metadata_1 = require("@itwin/ecschema-metadata");
|
|
9
|
-
/**
|
|
10
|
-
* @internal
|
|
11
|
-
* An abstract class used for Schema editing.
|
|
12
|
-
*/
|
|
13
|
-
class MutableCAClass extends ecschema_metadata_1.CustomAttributeClass {
|
|
14
|
-
}
|
|
15
|
-
exports.MutableCAClass = MutableCAClass;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MutableCAClass = void 0;
|
|
4
|
+
/*---------------------------------------------------------------------------------------------
|
|
5
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
7
|
+
*--------------------------------------------------------------------------------------------*/
|
|
8
|
+
const ecschema_metadata_1 = require("@itwin/ecschema-metadata");
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
* An abstract class used for Schema editing.
|
|
12
|
+
*/
|
|
13
|
+
class MutableCAClass extends ecschema_metadata_1.CustomAttributeClass {
|
|
14
|
+
}
|
|
15
|
+
exports.MutableCAClass = MutableCAClass;
|
|
16
16
|
//# sourceMappingURL=MutableCAClass.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MutableCAClass.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableCAClass.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA8F;AAE9F;;;GAGG;AACH,MAAsB,cAAe,SAAQ,wCAAoB;CAGhE;AAHD,wCAGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"MutableCAClass.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableCAClass.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA8F;AAE9F;;;GAGG;AACH,MAAsB,cAAe,SAAQ,wCAAoB;CAGhE;AAHD,wCAGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { CustomAttributeClass, CustomAttributeContainerType } from \"@itwin/ecschema-metadata\";\n\n/**\n * @internal\n * An abstract class used for Schema editing.\n */\nexport abstract class MutableCAClass extends CustomAttributeClass {\n public abstract override setContainerType(containerType: CustomAttributeContainerType): void;\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n"]}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { CustomAttribute, ECClass, ECClassModifier, Enumeration, EnumerationArrayProperty, EnumerationProperty, PrimitiveArrayProperty, PrimitiveProperty, PrimitiveType, Property, StructArrayProperty, StructClass, StructProperty } from "@itwin/ecschema-metadata";
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
* An abstract class used for schema editing.
|
|
5
|
-
*/
|
|
6
|
-
export declare abstract class MutableStructClass extends StructClass {
|
|
7
|
-
abstract setDisplayLabel(displayLabel: string): void;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Hackish approach that works like a "friend class" so we can access protected members without making them public.
|
|
11
|
-
* @internal
|
|
12
|
-
*/
|
|
13
|
-
export declare abstract class MutableClass extends ECClass {
|
|
14
|
-
abstract addCustomAttribute(customAttribute: CustomAttribute): void;
|
|
15
|
-
abstract setModifier(modifier: ECClassModifier): void;
|
|
16
|
-
abstract createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty>;
|
|
17
|
-
abstract createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty>;
|
|
18
|
-
abstract createPrimitiveProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;
|
|
19
|
-
abstract createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty;
|
|
20
|
-
abstract createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty;
|
|
21
|
-
abstract createPrimitivePropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;
|
|
22
|
-
abstract createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty>;
|
|
23
|
-
abstract createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty>;
|
|
24
|
-
abstract createPrimitiveArrayProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;
|
|
25
|
-
abstract createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty;
|
|
26
|
-
abstract createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty;
|
|
27
|
-
abstract createPrimitiveArrayPropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;
|
|
28
|
-
abstract createStructProperty(name: string, structType: string | StructClass): Promise<StructProperty>;
|
|
29
|
-
abstract createStructPropertySync(name: string, structType: string | StructClass): StructProperty;
|
|
30
|
-
abstract createStructArrayProperty(name: string, structType: string | StructClass): Promise<StructArrayProperty>;
|
|
31
|
-
abstract createStructArrayPropertySync(name: string, structType: string | StructClass): StructArrayProperty;
|
|
32
|
-
abstract deleteProperty(name: string): Promise<void>;
|
|
33
|
-
abstract deletePropertySync(name: string): void;
|
|
34
|
-
}
|
|
1
|
+
import { CustomAttribute, ECClass, ECClassModifier, Enumeration, EnumerationArrayProperty, EnumerationProperty, PrimitiveArrayProperty, PrimitiveProperty, PrimitiveType, Property, StructArrayProperty, StructClass, StructProperty } from "@itwin/ecschema-metadata";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* An abstract class used for schema editing.
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class MutableStructClass extends StructClass {
|
|
7
|
+
abstract setDisplayLabel(displayLabel: string): void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Hackish approach that works like a "friend class" so we can access protected members without making them public.
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare abstract class MutableClass extends ECClass {
|
|
14
|
+
abstract addCustomAttribute(customAttribute: CustomAttribute): void;
|
|
15
|
+
abstract setModifier(modifier: ECClassModifier): void;
|
|
16
|
+
abstract createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty>;
|
|
17
|
+
abstract createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty>;
|
|
18
|
+
abstract createPrimitiveProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;
|
|
19
|
+
abstract createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty;
|
|
20
|
+
abstract createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty;
|
|
21
|
+
abstract createPrimitivePropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;
|
|
22
|
+
abstract createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty>;
|
|
23
|
+
abstract createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty>;
|
|
24
|
+
abstract createPrimitiveArrayProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;
|
|
25
|
+
abstract createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty;
|
|
26
|
+
abstract createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty;
|
|
27
|
+
abstract createPrimitiveArrayPropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;
|
|
28
|
+
abstract createStructProperty(name: string, structType: string | StructClass): Promise<StructProperty>;
|
|
29
|
+
abstract createStructPropertySync(name: string, structType: string | StructClass): StructProperty;
|
|
30
|
+
abstract createStructArrayProperty(name: string, structType: string | StructClass): Promise<StructArrayProperty>;
|
|
31
|
+
abstract createStructArrayPropertySync(name: string, structType: string | StructClass): StructArrayProperty;
|
|
32
|
+
abstract deleteProperty(name: string): Promise<void>;
|
|
33
|
+
abstract deletePropertySync(name: string): void;
|
|
34
|
+
}
|
|
35
35
|
//# sourceMappingURL=MutableClass.d.ts.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MutableClass = exports.MutableStructClass = void 0;
|
|
4
|
-
/*---------------------------------------------------------------------------------------------
|
|
5
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
7
|
-
*--------------------------------------------------------------------------------------------*/
|
|
8
|
-
const ecschema_metadata_1 = require("@itwin/ecschema-metadata");
|
|
9
|
-
/**
|
|
10
|
-
* @internal
|
|
11
|
-
* An abstract class used for schema editing.
|
|
12
|
-
*/
|
|
13
|
-
class MutableStructClass extends ecschema_metadata_1.StructClass {
|
|
14
|
-
}
|
|
15
|
-
exports.MutableStructClass = MutableStructClass;
|
|
16
|
-
/**
|
|
17
|
-
* Hackish approach that works like a "friend class" so we can access protected members without making them public.
|
|
18
|
-
* @internal
|
|
19
|
-
*/
|
|
20
|
-
class MutableClass extends ecschema_metadata_1.ECClass {
|
|
21
|
-
}
|
|
22
|
-
exports.MutableClass = MutableClass;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MutableClass = exports.MutableStructClass = void 0;
|
|
4
|
+
/*---------------------------------------------------------------------------------------------
|
|
5
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
7
|
+
*--------------------------------------------------------------------------------------------*/
|
|
8
|
+
const ecschema_metadata_1 = require("@itwin/ecschema-metadata");
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
* An abstract class used for schema editing.
|
|
12
|
+
*/
|
|
13
|
+
class MutableStructClass extends ecschema_metadata_1.StructClass {
|
|
14
|
+
}
|
|
15
|
+
exports.MutableStructClass = MutableStructClass;
|
|
16
|
+
/**
|
|
17
|
+
* Hackish approach that works like a "friend class" so we can access protected members without making them public.
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
class MutableClass extends ecschema_metadata_1.ECClass {
|
|
21
|
+
}
|
|
22
|
+
exports.MutableClass = MutableClass;
|
|
23
23
|
//# sourceMappingURL=MutableClass.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MutableClass.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableClass.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAGkC;AAElC;;;GAGG;AACH,MAAsB,kBAAmB,SAAQ,+BAAW;CAE3D;AAFD,gDAEC;AAED;;;GAGG;AACH,MAAsB,YAAa,SAAQ,2BAAO;CA2BjD;AA3BD,oCA2BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"MutableClass.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableClass.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAGkC;AAElC;;;GAGG;AACH,MAAsB,kBAAmB,SAAQ,+BAAW;CAE3D;AAFD,gDAEC;AAED;;;GAGG;AACH,MAAsB,YAAa,SAAQ,2BAAO;CA2BjD;AA3BD,oCA2BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport {\n CustomAttribute, ECClass, ECClassModifier, Enumeration, EnumerationArrayProperty, EnumerationProperty, PrimitiveArrayProperty,\n PrimitiveProperty, PrimitiveType, Property, StructArrayProperty, StructClass, StructProperty,\n} from \"@itwin/ecschema-metadata\";\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableStructClass extends StructClass {\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n\n/**\n * Hackish approach that works like a \"friend class\" so we can access protected members without making them public.\n * @internal\n */\nexport abstract class MutableClass extends ECClass {\n public abstract override addCustomAttribute(customAttribute: CustomAttribute): void;\n public abstract override setModifier(modifier: ECClassModifier): void;\n public abstract override createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty>;\n public abstract override createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty>;\n public abstract override createPrimitiveProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;\n\n public abstract override createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty;\n public abstract override createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty;\n public abstract override createPrimitivePropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;\n\n public abstract override createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty>;\n public abstract override createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty>;\n public abstract override createPrimitiveArrayProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;\n\n public abstract override createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty;\n public abstract override createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty;\n public abstract override createPrimitiveArrayPropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;\n\n public abstract override createStructProperty(name: string, structType: string | StructClass): Promise<StructProperty>;\n public abstract override createStructPropertySync(name: string, structType: string | StructClass): StructProperty;\n\n public abstract override createStructArrayProperty(name: string, structType: string | StructClass): Promise<StructArrayProperty>;\n public abstract override createStructArrayPropertySync(name: string, structType: string | StructClass): StructArrayProperty;\n\n public abstract override deleteProperty(name: string): Promise<void>;\n public abstract override deletePropertySync(name: string): void;\n}\n"]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Constant, LazyLoadedPhenomenon } from "@itwin/ecschema-metadata";
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
* An abstract class used for schema editing.
|
|
5
|
-
*/
|
|
6
|
-
export declare abstract class MutableConstant extends Constant {
|
|
7
|
-
abstract setPhenomenon(phenomenon: LazyLoadedPhenomenon): void;
|
|
8
|
-
abstract setDefinition(definition: string): void;
|
|
9
|
-
abstract setNumerator(numerator: number): void;
|
|
10
|
-
abstract setDenominator(denominator: number): void;
|
|
11
|
-
abstract setDisplayLabel(displayLabel: string): void;
|
|
12
|
-
}
|
|
1
|
+
import { Constant, LazyLoadedPhenomenon } from "@itwin/ecschema-metadata";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* An abstract class used for schema editing.
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class MutableConstant extends Constant {
|
|
7
|
+
abstract setPhenomenon(phenomenon: LazyLoadedPhenomenon): void;
|
|
8
|
+
abstract setDefinition(definition: string): void;
|
|
9
|
+
abstract setNumerator(numerator: number): void;
|
|
10
|
+
abstract setDenominator(denominator: number): void;
|
|
11
|
+
abstract setDisplayLabel(displayLabel: string): void;
|
|
12
|
+
}
|
|
13
13
|
//# sourceMappingURL=MutableConstant.d.ts.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MutableConstant = void 0;
|
|
4
|
-
/*---------------------------------------------------------------------------------------------
|
|
5
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
7
|
-
*--------------------------------------------------------------------------------------------*/
|
|
8
|
-
const ecschema_metadata_1 = require("@itwin/ecschema-metadata");
|
|
9
|
-
/**
|
|
10
|
-
* @internal
|
|
11
|
-
* An abstract class used for schema editing.
|
|
12
|
-
*/
|
|
13
|
-
class MutableConstant extends ecschema_metadata_1.Constant {
|
|
14
|
-
}
|
|
15
|
-
exports.MutableConstant = MutableConstant;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MutableConstant = void 0;
|
|
4
|
+
/*---------------------------------------------------------------------------------------------
|
|
5
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
7
|
+
*--------------------------------------------------------------------------------------------*/
|
|
8
|
+
const ecschema_metadata_1 = require("@itwin/ecschema-metadata");
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
* An abstract class used for schema editing.
|
|
12
|
+
*/
|
|
13
|
+
class MutableConstant extends ecschema_metadata_1.Constant {
|
|
14
|
+
}
|
|
15
|
+
exports.MutableConstant = MutableConstant;
|
|
16
16
|
//# sourceMappingURL=MutableConstant.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MutableConstant.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableConstant.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA0E;AAE1E;;;GAGG;AACH,MAAsB,eAAgB,SAAQ,4BAAQ;CAMrD;AAND,0CAMC","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"MutableConstant.js","sourceRoot":"","sources":["../../../../src/Editing/Mutable/MutableConstant.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAA0E;AAE1E;;;GAGG;AACH,MAAsB,eAAgB,SAAQ,4BAAQ;CAMrD;AAND,0CAMC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { Constant, LazyLoadedPhenomenon } from \"@itwin/ecschema-metadata\";\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableConstant extends Constant {\n public abstract override setPhenomenon(phenomenon: LazyLoadedPhenomenon): void;\n public abstract override setDefinition(definition: string): void;\n public abstract override setNumerator(numerator: number): void;\n public abstract override setDenominator(denominator: number): void;\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n"]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { ECClass, EntityClass, Mixin, NavigationProperty, RelationshipClass, StrengthDirection } from "@itwin/ecschema-metadata";
|
|
2
|
-
/**
|
|
3
|
-
* Hackish approach that works like a "friend class" so we can access protected members without making them public.
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export declare abstract class MutableEntityClass extends EntityClass {
|
|
7
|
-
abstract addMixin(mixin: Mixin): any;
|
|
8
|
-
abstract createNavigationProperty(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty>;
|
|
9
|
-
abstract createNavigationPropertySync(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty;
|
|
10
|
-
abstract setDisplayLabel(displayLabel: string): void;
|
|
11
|
-
}
|
|
12
|
-
/** @internal */
|
|
13
|
-
export declare function createNavigationProperty(ecClass: ECClass, name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty>;
|
|
14
|
-
/** @internal */
|
|
15
|
-
export declare function createNavigationPropertySync(ecClass: ECClass, name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty;
|
|
1
|
+
import { ECClass, EntityClass, Mixin, NavigationProperty, RelationshipClass, StrengthDirection } from "@itwin/ecschema-metadata";
|
|
2
|
+
/**
|
|
3
|
+
* Hackish approach that works like a "friend class" so we can access protected members without making them public.
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class MutableEntityClass extends EntityClass {
|
|
7
|
+
abstract addMixin(mixin: Mixin): any;
|
|
8
|
+
abstract createNavigationProperty(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty>;
|
|
9
|
+
abstract createNavigationPropertySync(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty;
|
|
10
|
+
abstract setDisplayLabel(displayLabel: string): void;
|
|
11
|
+
}
|
|
12
|
+
/** @internal */
|
|
13
|
+
export declare function createNavigationProperty(ecClass: ECClass, name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty>;
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare function createNavigationPropertySync(ecClass: ECClass, name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty;
|
|
16
16
|
//# sourceMappingURL=MutableEntityClass.d.ts.map
|