@itwin/core-backend 5.3.0-dev.9 → 5.4.0-dev.3
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 +26 -1
- package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
- package/lib/cjs/BriefcaseManager.js +14 -0
- package/lib/cjs/BriefcaseManager.js.map +1 -1
- package/lib/cjs/CloudSqlite.d.ts +11 -0
- package/lib/cjs/CloudSqlite.d.ts.map +1 -1
- package/lib/cjs/CloudSqlite.js.map +1 -1
- package/lib/cjs/DisplayStyle.d.ts +2 -2
- package/lib/cjs/DisplayStyle.d.ts.map +1 -1
- package/lib/cjs/DisplayStyle.js +4 -4
- package/lib/cjs/DisplayStyle.js.map +1 -1
- package/lib/cjs/ECDb.js +1 -1
- package/lib/cjs/ECDb.js.map +1 -1
- package/lib/cjs/Element.d.ts +31 -3
- package/lib/cjs/Element.d.ts.map +1 -1
- package/lib/cjs/Element.js +55 -3
- package/lib/cjs/Element.js.map +1 -1
- package/lib/cjs/ElementAspect.d.ts +24 -1
- package/lib/cjs/ElementAspect.d.ts.map +1 -1
- package/lib/cjs/ElementAspect.js +102 -1
- package/lib/cjs/ElementAspect.js.map +1 -1
- package/lib/cjs/IModelDb.d.ts +26 -3
- package/lib/cjs/IModelDb.d.ts.map +1 -1
- package/lib/cjs/IModelDb.js +60 -5
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/IModelElementCloneContext.d.ts +1 -1
- package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
- package/lib/cjs/IModelElementCloneContext.js +2 -2
- package/lib/cjs/IModelElementCloneContext.js.map +1 -1
- package/lib/cjs/Material.d.ts +1 -1
- package/lib/cjs/Material.d.ts.map +1 -1
- package/lib/cjs/Material.js +2 -2
- package/lib/cjs/Material.js.map +1 -1
- package/lib/cjs/NavigationRelationship.d.ts +15 -0
- package/lib/cjs/NavigationRelationship.d.ts.map +1 -1
- package/lib/cjs/NavigationRelationship.js +22 -1
- package/lib/cjs/NavigationRelationship.js.map +1 -1
- package/lib/cjs/Relationship.d.ts +5 -0
- package/lib/cjs/Relationship.d.ts.map +1 -1
- package/lib/cjs/Relationship.js +7 -0
- package/lib/cjs/Relationship.js.map +1 -1
- package/lib/cjs/TxnManager.d.ts +8 -0
- package/lib/cjs/TxnManager.d.ts.map +1 -1
- package/lib/cjs/TxnManager.js +30 -2
- package/lib/cjs/TxnManager.js.map +1 -1
- package/lib/cjs/ViewDefinition.d.ts +1 -1
- package/lib/cjs/ViewDefinition.d.ts.map +1 -1
- package/lib/cjs/ViewDefinition.js +2 -2
- package/lib/cjs/ViewDefinition.js.map +1 -1
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts +1 -1
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.js +4 -4
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -1
- package/lib/cjs/annotations/LeaderGeometry.d.ts +13 -1
- package/lib/cjs/annotations/LeaderGeometry.d.ts.map +1 -1
- package/lib/cjs/annotations/LeaderGeometry.js +90 -10
- package/lib/cjs/annotations/LeaderGeometry.js.map +1 -1
- package/lib/cjs/annotations/TextAnnotationElement.d.ts +6 -5
- package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -1
- package/lib/cjs/annotations/TextAnnotationElement.js +34 -14
- package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
- package/lib/cjs/internal/ElementLRUCache.d.ts.map +1 -1
- package/lib/cjs/internal/ElementLRUCache.js +2 -0
- package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
- package/lib/esm/BriefcaseManager.d.ts.map +1 -1
- package/lib/esm/BriefcaseManager.js +14 -0
- package/lib/esm/BriefcaseManager.js.map +1 -1
- package/lib/esm/CloudSqlite.d.ts +11 -0
- package/lib/esm/CloudSqlite.d.ts.map +1 -1
- package/lib/esm/CloudSqlite.js.map +1 -1
- package/lib/esm/DisplayStyle.d.ts +2 -2
- package/lib/esm/DisplayStyle.d.ts.map +1 -1
- package/lib/esm/DisplayStyle.js +4 -4
- package/lib/esm/DisplayStyle.js.map +1 -1
- package/lib/esm/ECDb.js +1 -1
- package/lib/esm/ECDb.js.map +1 -1
- package/lib/esm/Element.d.ts +31 -3
- package/lib/esm/Element.d.ts.map +1 -1
- package/lib/esm/Element.js +55 -4
- package/lib/esm/Element.js.map +1 -1
- package/lib/esm/ElementAspect.d.ts +24 -1
- package/lib/esm/ElementAspect.d.ts.map +1 -1
- package/lib/esm/ElementAspect.js +101 -1
- package/lib/esm/ElementAspect.js.map +1 -1
- package/lib/esm/IModelDb.d.ts +26 -3
- package/lib/esm/IModelDb.d.ts.map +1 -1
- package/lib/esm/IModelDb.js +60 -5
- package/lib/esm/IModelDb.js.map +1 -1
- package/lib/esm/IModelElementCloneContext.d.ts +1 -1
- package/lib/esm/IModelElementCloneContext.d.ts.map +1 -1
- package/lib/esm/IModelElementCloneContext.js +2 -2
- package/lib/esm/IModelElementCloneContext.js.map +1 -1
- package/lib/esm/Material.d.ts +1 -1
- package/lib/esm/Material.d.ts.map +1 -1
- package/lib/esm/Material.js +2 -2
- package/lib/esm/Material.js.map +1 -1
- package/lib/esm/NavigationRelationship.d.ts +15 -0
- package/lib/esm/NavigationRelationship.d.ts.map +1 -1
- package/lib/esm/NavigationRelationship.js +19 -0
- package/lib/esm/NavigationRelationship.js.map +1 -1
- package/lib/esm/Relationship.d.ts +5 -0
- package/lib/esm/Relationship.d.ts.map +1 -1
- package/lib/esm/Relationship.js +7 -0
- package/lib/esm/Relationship.js.map +1 -1
- package/lib/esm/TxnManager.d.ts +8 -0
- package/lib/esm/TxnManager.d.ts.map +1 -1
- package/lib/esm/TxnManager.js +30 -2
- package/lib/esm/TxnManager.js.map +1 -1
- package/lib/esm/ViewDefinition.d.ts +1 -1
- package/lib/esm/ViewDefinition.d.ts.map +1 -1
- package/lib/esm/ViewDefinition.js +2 -2
- package/lib/esm/ViewDefinition.js.map +1 -1
- package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts +1 -1
- package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
- package/lib/esm/annotations/ElementDrivesTextAnnotation.js +4 -4
- package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -1
- package/lib/esm/annotations/LeaderGeometry.d.ts +13 -1
- package/lib/esm/annotations/LeaderGeometry.d.ts.map +1 -1
- package/lib/esm/annotations/LeaderGeometry.js +91 -12
- package/lib/esm/annotations/LeaderGeometry.js.map +1 -1
- package/lib/esm/annotations/TextAnnotationElement.d.ts +6 -5
- package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -1
- package/lib/esm/annotations/TextAnnotationElement.js +34 -14
- package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
- package/lib/esm/internal/ElementLRUCache.d.ts.map +1 -1
- package/lib/esm/internal/ElementLRUCache.js +2 -0
- package/lib/esm/internal/ElementLRUCache.js.map +1 -1
- package/lib/esm/test/ElementDrivesElement.test.d.ts +93 -0
- package/lib/esm/test/ElementDrivesElement.test.d.ts.map +1 -0
- package/lib/esm/test/ElementDrivesElement.test.js +862 -0
- package/lib/esm/test/ElementDrivesElement.test.js.map +1 -0
- package/lib/esm/test/ElementLRUCache.test.js +19 -0
- package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
- package/lib/esm/test/annotations/Fields.test.js +44 -0
- package/lib/esm/test/annotations/Fields.test.js.map +1 -1
- package/lib/esm/test/annotations/LeaderGeometry.test.js +48 -2
- package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -1
- package/lib/esm/test/annotations/TextAnnotation.test.js +73 -27
- package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
- package/lib/esm/test/ecdb/ConcurrentQuery.test.js +2 -2
- package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlStatement.test.js +33 -2
- package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
- package/lib/esm/test/element/ProjectInformationRecord.test.d.ts +2 -0
- package/lib/esm/test/element/ProjectInformationRecord.test.d.ts.map +1 -0
- package/lib/esm/test/element/ProjectInformationRecord.test.js +80 -0
- package/lib/esm/test/element/ProjectInformationRecord.test.js.map +1 -0
- package/lib/esm/test/element/SheetInformationAspect.test.d.ts +2 -0
- package/lib/esm/test/element/SheetInformationAspect.test.d.ts.map +1 -0
- package/lib/esm/test/element/SheetInformationAspect.test.js +182 -0
- package/lib/esm/test/element/SheetInformationAspect.test.js.map +1 -0
- package/lib/esm/test/hubaccess/Rebase.test.js +169 -2
- package/lib/esm/test/hubaccess/Rebase.test.js.map +1 -1
- package/lib/esm/test/imodel/Code.test.d.ts +2 -0
- package/lib/esm/test/imodel/Code.test.d.ts.map +1 -0
- package/lib/esm/test/imodel/Code.test.js +272 -0
- package/lib/esm/test/imodel/Code.test.js.map +1 -0
- package/lib/esm/test/imodel/IModel.test.js +175 -2
- package/lib/esm/test/imodel/IModel.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -1
- package/lib/esm/test/standalone/ChangesetReader.test.js +66 -60
- package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
- package/lib/esm/test/standalone/DisplayStyle.test.js +6 -6
- package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -1
- package/lib/esm/test/standalone/ElementGraphics.test.js +75 -6
- package/lib/esm/test/standalone/ElementGraphics.test.js.map +1 -1
- package/lib/esm/test/standalone/RenderMaterialElement.test.js +4 -4
- package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
- package/lib/esm/test/standalone/TxnManager.test.js +33 -5
- package/lib/esm/test/standalone/TxnManager.test.js.map +1 -1
- package/package.json +14 -14
|
@@ -76,7 +76,7 @@ export declare class IModelElementCloneContext {
|
|
|
76
76
|
/** Clone the specified source Element into ElementProps for the target iModel.
|
|
77
77
|
* @internal
|
|
78
78
|
*/
|
|
79
|
-
cloneElement(sourceElement: Element, cloneOptions?: IModelJsNative.CloneElementOptions): ElementProps
|
|
79
|
+
cloneElement(sourceElement: Element, cloneOptions?: IModelJsNative.CloneElementOptions): Promise<ElementProps>;
|
|
80
80
|
/**
|
|
81
81
|
* serialize state to a sqlite database at a given path
|
|
82
82
|
* assumes the database has not already had any context state serialized to it
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelElementCloneContext.d.ts","sourceRoot":"","sources":["../../src/IModelElementCloneContext.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAQ,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAiC,YAAY,EAA4C,MAAM,oBAAoB,CAAC;AAC3H,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC;;GAEG;AACH,qBAAa,yBAAyB;IACpC,2BAA2B;IAC3B,SAAgB,QAAQ,EAAE,QAAQ,CAAC;IACnC,2BAA2B;IAC3B,SAAgB,QAAQ,EAAE,QAAQ,CAAC;IACnC,gCAAgC;IAChC,OAAO,CAAC,cAAc,CAA+B;IAErD;;;OAGG;gBACgB,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,QAAQ;IAM1D,0HAA0H;IAC7G,UAAU;IAGvB,iHAAiH;WAC7F,MAAM,CAAC,GAAG,IAAI,EAAE,qBAAqB,CAAC,OAAO,yBAAyB,CAAC,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAMhI,sIAAsI;IACtI,IAAW,gBAAgB,IAAI,OAAO,CAA4C;IAElF,mFAAmF;IAC5E,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI;IAE/B,qGAAqG;IAC9F,OAA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oBAAoB,IAAI,OAAO,CAEzC;IAED,4DAA4D;IACrD,qBAAqB,CAAC,aAAa,EAAE,UAAU,GAAG,OAAO;IAIhE;;OAEG;IACI,UAAU,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI;IAKjD;;OAEG;IACI,cAAc,CAAC,gBAAgB,EAAE,UAAU,GAAG,IAAI;IAIzD;;OAEG;IACU,YAAY,CAAC,aAAa,EAAE,OAAO,EAAE,YAAY,CAAC,EAAE,cAAc,CAAC,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC;IA0B3H;;;;OAIG;IACI,aAAa,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI;IAIxC;;;OAGG;IACI,eAAe,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI;CAG3C"}
|
|
@@ -127,7 +127,7 @@ class IModelElementCloneContext {
|
|
|
127
127
|
/** Clone the specified source Element into ElementProps for the target iModel.
|
|
128
128
|
* @internal
|
|
129
129
|
*/
|
|
130
|
-
cloneElement(sourceElement, cloneOptions) {
|
|
130
|
+
async cloneElement(sourceElement, cloneOptions) {
|
|
131
131
|
const targetElementProps = this._nativeContext.cloneElement(sourceElement.id, cloneOptions);
|
|
132
132
|
// Ensure that all NavigationProperties in targetElementProps have a defined value so "clearing" changes will be part of the JSON used for update
|
|
133
133
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
@@ -149,7 +149,7 @@ class IModelElementCloneContext {
|
|
|
149
149
|
}
|
|
150
150
|
const jsClass = this.sourceDb.getJsClass(sourceElement.classFullName);
|
|
151
151
|
// eslint-disable-next-line @typescript-eslint/dot-notation
|
|
152
|
-
jsClass["onCloned"](this, sourceElement.toJSON(), targetElementProps);
|
|
152
|
+
await jsClass["onCloned"](this, sourceElement.toJSON(), targetElementProps);
|
|
153
153
|
return targetElementProps;
|
|
154
154
|
}
|
|
155
155
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelElementCloneContext.js","sourceRoot":"","sources":["../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,eAAe,CAAC,EAAE,CAAC,mBAAS,CAAC,CAAC,CAAC;IACrD,CAAC;CACF;AA5KD,8DA4KC","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 iModels\n */\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\nimport { Code, CodeScopeSpec, CodeSpec, ElementProps, IModel, PropertyMetaData, RelatedElement } from \"@itwin/core-common\";\nimport { IModelJsNative } from \"@bentley/imodeljs-native\";\nimport { SubCategory } from \"./Category\";\nimport { Element } from \"./Element\";\nimport { IModelDb } from \"./IModelDb\";\nimport { IModelNative } from \"./internal/NativePlatform\";\nimport { SQLiteDb } from \"./SQLiteDb\";\nimport { _nativeDb } from \"./internal/Symbols\";\n\n/** The context for transforming a *source* Element to a *target* Element and remapping internal identifiers to the target iModel.\n * @beta\n */\nexport class IModelElementCloneContext {\n /** The source IModelDb. */\n public readonly sourceDb: IModelDb;\n /** The target IModelDb. */\n public readonly targetDb: IModelDb;\n /** The native import context */\n private _nativeContext: IModelJsNative.ImportContext;\n\n /** Construct a new IModelElementCloneContext. It must be initialized with `initialize`, consider using [[IModelElementCloneContext.create]] instead\n * @param sourceDb The source IModelDb.\n * @param targetDb If provided the target IModelDb. If not provided, the source and target are the same IModelDb.\n */\n public constructor(sourceDb: IModelDb, targetDb?: IModelDb) {\n this.sourceDb = sourceDb;\n this.targetDb = (undefined !== targetDb) ? targetDb : sourceDb;\n this._nativeContext = new IModelNative.platform.ImportContext(this.sourceDb[_nativeDb], this.targetDb[_nativeDb]);\n }\n\n /** perform necessary initialization to use a clone context, namely caching the reference types in the source's schemas */\n public async initialize() {\n }\n\n /** construct and initialize an IModelElementCloneContext at once, for where you construct in an async context */\n public static async create(...args: ConstructorParameters<typeof IModelElementCloneContext>): Promise<IModelElementCloneContext> {\n const instance = new this(...args);\n await instance.initialize();\n return instance;\n }\n\n /** Returns `true` if this context is for transforming between 2 iModels and `false` if it for transforming within the same iModel. */\n public get isBetweenIModels(): boolean { return this.sourceDb !== this.targetDb; }\n\n /** Dispose any native resources associated with this IModelElementCloneContext. */\n public [Symbol.dispose](): void { this._nativeContext.dispose(); }\n\n /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [Symbol.dispose] instead. */\n public dispose() {\n this[Symbol.dispose]();\n }\n\n /** Debugging aid that dumps the Id remapping details and other information to the specified output file.\n * @internal\n */\n public dump(outputFileName: string): void { this._nativeContext.dump(outputFileName); }\n\n /** Add a rule that remaps the specified source [CodeSpec]($common) to the specified target [CodeSpec]($common).\n * @param sourceCodeSpecName The name of the CodeSpec from the source iModel.\n * @param targetCodeSpecName The name of the CodeSpec from the target iModel.\n * @throws [[IModelError]] if either CodeSpec could not be found.\n */\n public remapCodeSpec(sourceCodeSpecName: string, targetCodeSpecName: string): void {\n const sourceCodeSpec: CodeSpec = this.sourceDb.codeSpecs.getByName(sourceCodeSpecName);\n const targetCodeSpec: CodeSpec = this.targetDb.codeSpecs.getByName(targetCodeSpecName);\n this._nativeContext.addCodeSpecId(sourceCodeSpec.id, targetCodeSpec.id);\n }\n\n /** Add a rule that remaps the specified source class to the specified target class. */\n public remapElementClass(sourceClassFullName: string, targetClassFullName: string): void {\n this._nativeContext.addClass(sourceClassFullName, targetClassFullName);\n }\n\n /** Add a rule that remaps the specified source Element to the specified target Element. */\n public remapElement(sourceId: Id64String, targetId: Id64String): void {\n this._nativeContext.addElementId(sourceId, targetId);\n }\n\n /** Remove a rule that remaps the specified source Element. */\n public removeElement(sourceId: Id64String): void {\n this._nativeContext.removeElementId(sourceId);\n }\n\n /** Look up a target CodeSpecId from the source CodeSpecId.\n * @returns the target CodeSpecId or [Id64.invalid]($bentley) if a mapping not found.\n */\n public findTargetCodeSpecId(sourceId: Id64String): Id64String {\n if (Id64.invalid === sourceId) {\n return Id64.invalid;\n }\n return this._nativeContext.findCodeSpecId(sourceId);\n }\n\n /** Look up a target ElementId from the source ElementId.\n * @returns the target ElementId or [Id64.invalid]($bentley) if a mapping not found.\n */\n public findTargetElementId(sourceElementId: Id64String): Id64String {\n if (Id64.invalid === sourceElementId) {\n return Id64.invalid;\n }\n return this._nativeContext.findElementId(sourceElementId);\n }\n\n /** Filter out geometry entries in the specified SubCategory from GeometryStreams in the target iModel.\n * @note It is not possible to filter out a *default* SubCategory. A request to do so will be ignored.\n * @see [SubCategory.isDefaultSubCategory]($backend)\n */\n public filterSubCategory(sourceSubCategoryId: Id64String): void {\n const sourceSubCategory = this.sourceDb.elements.tryGetElement<SubCategory>(sourceSubCategoryId, SubCategory);\n if (sourceSubCategory && !sourceSubCategory.isDefaultSubCategory) {\n this._nativeContext.filterSubCategoryId(sourceSubCategoryId);\n }\n }\n\n /** Returns `true` if there are any SubCategories being filtered. */\n public get hasSubCategoryFilter(): boolean {\n return this._nativeContext.hasSubCategoryFilter();\n }\n\n /** Returns `true` if this SubCategory is being filtered. */\n public isSubCategoryFiltered(subCategoryId: Id64String): boolean {\n return this._nativeContext.isSubCategoryFiltered(subCategoryId);\n }\n\n /** Import the specified font from the source iModel into the target iModel.\n * @internal\n */\n public importFont(sourceFontNumber: number): void {\n this.targetDb.clearFontMap(); // so it will be reloaded with new font info\n this._nativeContext.importFont(sourceFontNumber);\n }\n\n /** Import a single CodeSpec from the source iModel into the target iModel.\n * @internal\n */\n public importCodeSpec(sourceCodeSpecId: Id64String): void {\n this._nativeContext.importCodeSpec(sourceCodeSpecId);\n }\n\n /** Clone the specified source Element into ElementProps for the target iModel.\n * @internal\n */\n public cloneElement(sourceElement: Element, cloneOptions?: IModelJsNative.CloneElementOptions): ElementProps {\n const targetElementProps: ElementProps = this._nativeContext.cloneElement(sourceElement.id, cloneOptions);\n // Ensure that all NavigationProperties in targetElementProps have a defined value so \"clearing\" changes will be part of the JSON used for update\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n sourceElement.forEachProperty((propertyName: string, meta: PropertyMetaData) => {\n if ((meta.isNavigation) && (undefined === (sourceElement as any)[propertyName])) {\n (targetElementProps as any)[propertyName] = RelatedElement.none;\n }\n }, false); // exclude custom because C++ has already handled them\n if (this.isBetweenIModels) {\n // The native C++ cloneElement strips off federationGuid, want to put it back if transformation is between iModels\n targetElementProps.federationGuid = sourceElement.federationGuid;\n if (CodeScopeSpec.Type.Repository === this.targetDb.codeSpecs.getById(targetElementProps.code.spec).scopeType) {\n targetElementProps.code.scope = IModel.rootSubjectId;\n }\n }\n // unlike other references, code cannot be null. If it is null, use an empty code instead\n if (targetElementProps.code.scope === Id64.invalid || targetElementProps.code.spec === Id64.invalid) {\n targetElementProps.code = Code.createEmpty();\n }\n const jsClass = this.sourceDb.getJsClass<typeof Element>(sourceElement.classFullName);\n // eslint-disable-next-line @typescript-eslint/dot-notation\n jsClass[\"onCloned\"](this, sourceElement.toJSON(), targetElementProps);\n return targetElementProps;\n }\n\n /**\n * serialize state to a sqlite database at a given path\n * assumes the database has not already had any context state serialized to it\n * @internal\n */\n public saveStateToDb(db: SQLiteDb): void {\n this._nativeContext.saveStateToDb(db[_nativeDb]);\n }\n\n /**\n * load state from a sqlite database at a given path\n * @internal\n */\n public loadStateFromDb(db: SQLiteDb): void {\n this._nativeContext.loadStateFromDb(db[_nativeDb]);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IModelElementCloneContext.js","sourceRoot":"","sources":["../../src/IModelElementCloneContext.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,sDAAuD;AACvD,oDAA2H;AAE3H,yCAAyC;AAGzC,8DAAyD;AAEzD,gDAA+C;AAE/C;;GAEG;AACH,MAAa,yBAAyB;IACpC,2BAA2B;IACX,QAAQ,CAAW;IACnC,2BAA2B;IACX,QAAQ,CAAW;IACnC,gCAAgC;IACxB,cAAc,CAA+B;IAErD;;;OAGG;IACH,YAAmB,QAAkB,EAAE,QAAmB;QACxD,IAAI,CAAC,QAAQ,GAAG,QA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AK,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;gBAC9G,kBAAkB,CAAC,IAAI,CAAC,KAAK,GAAG,oBAAM,CAAC,aAAa,CAAC;YACvD,CAAC;QACH,CAAC;QACD,yFAAyF;QACzF,IAAI,kBAAkB,CAAC,IAAI,CAAC,KAAK,KAAK,mBAAI,CAAC,OAAO,IAAI,kBAAkB,CAAC,IAAI,CAAC,IAAI,KAAK,mBAAI,CAAC,OAAO,EAAE,CAAC;YACpG,kBAAkB,CAAC,IAAI,GAAG,kBAAI,CAAC,WAAW,EAAE,CAAC;QAC/C,CAAC;QACD,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAiB,aAAa,CAAC,aAAa,CAAC,CAAC;QACtF,2DAA2D;QAC3D,MAAM,OAAO,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,EAAE,EAAE,kBAAkB,CAAC,CAAC;QAC5E,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACI,aAAa,CAAC,EAAY;QAC/B,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,CAAC,mBAAS,CAAC,CAAC,CAAC;IACnD,CAAC;IAED;;;OAGG;IACI,eAAe,CAAC,EAAY;QACjC,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,CAAC,mBAAS,CAAC,CAAC,CAAC;IACrD,CAAC;CACF;AA5KD,8DA4KC","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 iModels\n */\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\nimport { Code, CodeScopeSpec, CodeSpec, ElementProps, IModel, PropertyMetaData, RelatedElement } from \"@itwin/core-common\";\nimport { IModelJsNative } from \"@bentley/imodeljs-native\";\nimport { SubCategory } from \"./Category\";\nimport { Element } from \"./Element\";\nimport { IModelDb } from \"./IModelDb\";\nimport { IModelNative } from \"./internal/NativePlatform\";\nimport { SQLiteDb } from \"./SQLiteDb\";\nimport { _nativeDb } from \"./internal/Symbols\";\n\n/** The context for transforming a *source* Element to a *target* Element and remapping internal identifiers to the target iModel.\n * @beta\n */\nexport class IModelElementCloneContext {\n /** The source IModelDb. */\n public readonly sourceDb: IModelDb;\n /** The target IModelDb. */\n public readonly targetDb: IModelDb;\n /** The native import context */\n private _nativeContext: IModelJsNative.ImportContext;\n\n /** Construct a new IModelElementCloneContext. It must be initialized with `initialize`, consider using [[IModelElementCloneContext.create]] instead\n * @param sourceDb The source IModelDb.\n * @param targetDb If provided the target IModelDb. If not provided, the source and target are the same IModelDb.\n */\n public constructor(sourceDb: IModelDb, targetDb?: IModelDb) {\n this.sourceDb = sourceDb;\n this.targetDb = (undefined !== targetDb) ? targetDb : sourceDb;\n this._nativeContext = new IModelNative.platform.ImportContext(this.sourceDb[_nativeDb], this.targetDb[_nativeDb]);\n }\n\n /** perform necessary initialization to use a clone context, namely caching the reference types in the source's schemas */\n public async initialize() {\n }\n\n /** construct and initialize an IModelElementCloneContext at once, for where you construct in an async context */\n public static async create(...args: ConstructorParameters<typeof IModelElementCloneContext>): Promise<IModelElementCloneContext> {\n const instance = new this(...args);\n await instance.initialize();\n return instance;\n }\n\n /** Returns `true` if this context is for transforming between 2 iModels and `false` if it for transforming within the same iModel. */\n public get isBetweenIModels(): boolean { return this.sourceDb !== this.targetDb; }\n\n /** Dispose any native resources associated with this IModelElementCloneContext. */\n public [Symbol.dispose](): void { this._nativeContext.dispose(); }\n\n /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [Symbol.dispose] instead. */\n public dispose() {\n this[Symbol.dispose]();\n }\n\n /** Debugging aid that dumps the Id remapping details and other information to the specified output file.\n * @internal\n */\n public dump(outputFileName: string): void { this._nativeContext.dump(outputFileName); }\n\n /** Add a rule that remaps the specified source [CodeSpec]($common) to the specified target [CodeSpec]($common).\n * @param sourceCodeSpecName The name of the CodeSpec from the source iModel.\n * @param targetCodeSpecName The name of the CodeSpec from the target iModel.\n * @throws [[IModelError]] if either CodeSpec could not be found.\n */\n public remapCodeSpec(sourceCodeSpecName: string, targetCodeSpecName: string): void {\n const sourceCodeSpec: CodeSpec = this.sourceDb.codeSpecs.getByName(sourceCodeSpecName);\n const targetCodeSpec: CodeSpec = this.targetDb.codeSpecs.getByName(targetCodeSpecName);\n this._nativeContext.addCodeSpecId(sourceCodeSpec.id, targetCodeSpec.id);\n }\n\n /** Add a rule that remaps the specified source class to the specified target class. */\n public remapElementClass(sourceClassFullName: string, targetClassFullName: string): void {\n this._nativeContext.addClass(sourceClassFullName, targetClassFullName);\n }\n\n /** Add a rule that remaps the specified source Element to the specified target Element. */\n public remapElement(sourceId: Id64String, targetId: Id64String): void {\n this._nativeContext.addElementId(sourceId, targetId);\n }\n\n /** Remove a rule that remaps the specified source Element. */\n public removeElement(sourceId: Id64String): void {\n this._nativeContext.removeElementId(sourceId);\n }\n\n /** Look up a target CodeSpecId from the source CodeSpecId.\n * @returns the target CodeSpecId or [Id64.invalid]($bentley) if a mapping not found.\n */\n public findTargetCodeSpecId(sourceId: Id64String): Id64String {\n if (Id64.invalid === sourceId) {\n return Id64.invalid;\n }\n return this._nativeContext.findCodeSpecId(sourceId);\n }\n\n /** Look up a target ElementId from the source ElementId.\n * @returns the target ElementId or [Id64.invalid]($bentley) if a mapping not found.\n */\n public findTargetElementId(sourceElementId: Id64String): Id64String {\n if (Id64.invalid === sourceElementId) {\n return Id64.invalid;\n }\n return this._nativeContext.findElementId(sourceElementId);\n }\n\n /** Filter out geometry entries in the specified SubCategory from GeometryStreams in the target iModel.\n * @note It is not possible to filter out a *default* SubCategory. A request to do so will be ignored.\n * @see [SubCategory.isDefaultSubCategory]($backend)\n */\n public filterSubCategory(sourceSubCategoryId: Id64String): void {\n const sourceSubCategory = this.sourceDb.elements.tryGetElement<SubCategory>(sourceSubCategoryId, SubCategory);\n if (sourceSubCategory && !sourceSubCategory.isDefaultSubCategory) {\n this._nativeContext.filterSubCategoryId(sourceSubCategoryId);\n }\n }\n\n /** Returns `true` if there are any SubCategories being filtered. */\n public get hasSubCategoryFilter(): boolean {\n return this._nativeContext.hasSubCategoryFilter();\n }\n\n /** Returns `true` if this SubCategory is being filtered. */\n public isSubCategoryFiltered(subCategoryId: Id64String): boolean {\n return this._nativeContext.isSubCategoryFiltered(subCategoryId);\n }\n\n /** Import the specified font from the source iModel into the target iModel.\n * @internal\n */\n public importFont(sourceFontNumber: number): void {\n this.targetDb.clearFontMap(); // so it will be reloaded with new font info\n this._nativeContext.importFont(sourceFontNumber);\n }\n\n /** Import a single CodeSpec from the source iModel into the target iModel.\n * @internal\n */\n public importCodeSpec(sourceCodeSpecId: Id64String): void {\n this._nativeContext.importCodeSpec(sourceCodeSpecId);\n }\n\n /** Clone the specified source Element into ElementProps for the target iModel.\n * @internal\n */\n public async cloneElement(sourceElement: Element, cloneOptions?: IModelJsNative.CloneElementOptions): Promise<ElementProps> {\n const targetElementProps: ElementProps = this._nativeContext.cloneElement(sourceElement.id, cloneOptions);\n // Ensure that all NavigationProperties in targetElementProps have a defined value so \"clearing\" changes will be part of the JSON used for update\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n sourceElement.forEachProperty((propertyName: string, meta: PropertyMetaData) => {\n if ((meta.isNavigation) && (undefined === (sourceElement as any)[propertyName])) {\n (targetElementProps as any)[propertyName] = RelatedElement.none;\n }\n }, false); // exclude custom because C++ has already handled them\n if (this.isBetweenIModels) {\n // The native C++ cloneElement strips off federationGuid, want to put it back if transformation is between iModels\n targetElementProps.federationGuid = sourceElement.federationGuid;\n if (CodeScopeSpec.Type.Repository === this.targetDb.codeSpecs.getById(targetElementProps.code.spec).scopeType) {\n targetElementProps.code.scope = IModel.rootSubjectId;\n }\n }\n // unlike other references, code cannot be null. If it is null, use an empty code instead\n if (targetElementProps.code.scope === Id64.invalid || targetElementProps.code.spec === Id64.invalid) {\n targetElementProps.code = Code.createEmpty();\n }\n const jsClass = this.sourceDb.getJsClass<typeof Element>(sourceElement.classFullName);\n // eslint-disable-next-line @typescript-eslint/dot-notation\n await jsClass[\"onCloned\"](this, sourceElement.toJSON(), targetElementProps);\n return targetElementProps;\n }\n\n /**\n * serialize state to a sqlite database at a given path\n * assumes the database has not already had any context state serialized to it\n * @internal\n */\n public saveStateToDb(db: SQLiteDb): void {\n this._nativeContext.saveStateToDb(db[_nativeDb]);\n }\n\n /**\n * load state from a sqlite database at a given path\n * @internal\n */\n public loadStateFromDb(db: SQLiteDb): void {\n this._nativeContext.loadStateFromDb(db[_nativeDb]);\n }\n}\n"]}
|
package/lib/cjs/Material.d.ts
CHANGED
|
@@ -85,7 +85,7 @@ export declare class RenderMaterialElement extends DefinitionElement {
|
|
|
85
85
|
*/
|
|
86
86
|
static insert(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): Id64String;
|
|
87
87
|
/** @beta */
|
|
88
|
-
protected static onCloned(context: IModelElementCloneContext, sourceProps: ElementProps, targetProps: ElementProps): void
|
|
88
|
+
protected static onCloned(context: IModelElementCloneContext, sourceProps: ElementProps, targetProps: ElementProps): Promise<void>;
|
|
89
89
|
}
|
|
90
90
|
/** @public */
|
|
91
91
|
export declare namespace RenderMaterialElement {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Material.d.ts","sourceRoot":"","sources":["../../src/Material.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAQ,UAAU,EAAa,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACQ,IAAI,EAAE,cAAc,EAAoC,YAAY,EAAE,cAAc,EAAgC,mBAAmB,EAAE,cAAc,EAAE,eAAe,EACtL,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CA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;QACxB,yEAAyE;QAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;QACzB,wBAAwB;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACxB,wBAAwB;QACjB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QAC/B;;;WAGG;QACI,UAAU,CAAC,EAAE,eAAe,CAAC;QACpC;;;;WAIG;QACI,SAAS,CAAC,EAAE,cAAc,GAAG;YAClC;;eAEG;YACH,KAAK,CAAC,EAAE,MAAM,CAAC;SAChB,CAAC;QAEF,gJAAgJ;oBAC7H,WAAW,EAAE,MAAM;KAGvC;CACF;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA4B,SAAQ,qBAAqB,CAAC,MAAM;CAChF"}
|
package/lib/cjs/Material.js
CHANGED
|
@@ -196,8 +196,8 @@ class RenderMaterialElement extends Element_1.DefinitionElement {
|
|
|
196
196
|
return iModelDb.elements.insertElement(renderMaterial.toJSON());
|
|
197
197
|
}
|
|
198
198
|
/** @beta */
|
|
199
|
-
static onCloned(context, sourceProps, targetProps) {
|
|
200
|
-
super.onCloned(context, sourceProps, targetProps);
|
|
199
|
+
static async onCloned(context, sourceProps, targetProps) {
|
|
200
|
+
await super.onCloned(context, sourceProps, targetProps);
|
|
201
201
|
for (const mapName in sourceProps.jsonProperties?.materialAssets?.renderMaterial?.Map ?? {}) {
|
|
202
202
|
if (typeof mapName !== "string")
|
|
203
203
|
continue;
|
package/lib/cjs/Material.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Material.js","sourceRoot":"","sources":["../../src/Material.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAkE;AAClE,oDAE4B;AAC5B,uCAA8C;AAK9C,yDAAyD;AAEzD;;;GAGG;AACH,MAAsB,gBAAiB,SAAQ,2BAAiB;IACvD,MAAM,KAAc,SAAS,KAAa,OAAO,kBAAkB,CAAC,CAAC,CAAC;IAC7E;;;;OAIG;IACI,MAA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AAS,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,SAAS,KAAK,SAAS;gBACzE,SAAS;YACX,WAAW,CAAC,cAAc,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,SAAS,GAAG,OAAO,CAAC,mBAAmB,CAAC,SAAS,CAAC,SAAS,IAAI,mBAAI,CAAC,OAAO,CAAC,CAAC;QACrJ,CAAC;IACH,CAAC;;AApLH,sDAqLC;AAED,cAAc;AACd,WAAiB,qBAAqB;IACpC;;;;OAIG;IACH,MAAa,MAAM;QACjB,mEAAmE;QAC5D,WAAW,CAAS;QAC3B,qDAAqD;QAC9C,WAAW,CAAU;QAC5B,iHAAiH;QAC1G,KAAK,CAAkB;QAC9B,kEAAkE;QAC3D,aAAa,CAAkB;QACtC;;WAEG;QACI,MAAM,CAAU;QACvB;;;;WAIG;QACI,QAAQ,CAAU;QACzB,wEAAwE;QACjE,OAAO,CAAU;QACxB,yEAAyE;QAClE,QAAQ,CAAU;QACzB,wBAAwB;QACjB,OAAO,CAAU;QACxB,wBAAwB;QACjB,YAAY,CAAY;QAC/B;;;WAGG;QACI,UAAU,CAAmB;QACpC;;;;WAIG;QACI,SAAS,CAKd;QAEF,gJAAgJ;QAChJ,YAAmB,WAAmB;YACpC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QACjC,CAAC;KACF;IAhDY,4BAAM,SAgDlB,CAAA;AACH,CAAC,EAvDgB,qBAAqB,qCAArB,qBAAqB,QAuDrC","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 Elements\n */\n\nimport { Id64, Id64String, JsonUtils } from \"@itwin/core-bentley\";\nimport {\n BisCodeSpec, Code, CodeScopeProps, CodeSpec, DefinitionElementProps, ElementProps, NormalMapProps, RenderMaterialAssetMapsProps, RenderMaterialProps, RgbFactorProps, TextureMapProps,\n} from \"@itwin/core-common\";\nimport { DefinitionElement } from \"./Element\";\nimport { IModelDb } from \"./IModelDb\";\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\nimport { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow } from \"./Entity\";\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\n/** A PhysicalMaterial defines the matter that makes up physical elements.\n * @note See [[RenderMaterialElement]] for the DefinitionElement used to define rendering characteristics.\n * @public\n */\nexport abstract class PhysicalMaterial extends DefinitionElement {\n public static override get className(): string { return \"PhysicalMaterial\"; }\n /** Create a Code for a PhysicalMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\n * @param name The name (codeValue) of the PhysicalMaterial\n */\n public static createCode(iModel: IModelDb, definitionModelId: CodeScopeProps, name: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.physicalMaterial);\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: name });\n }\n /** Create a PhysicalMaterial\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\n * @param name The name (codeValue) of the PhysicalMaterial\n * @returns The newly constructed PhysicalMaterial\n * @throws [[IModelError]] if there is a problem creating the PhysicalMaterial\n */\n public static create<T extends PhysicalMaterial>(iModelDb: IModelDb, definitionModelId: CodeScopeProps, name: string): T {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n };\n return iModelDb.elements.createElement(elementProps);\n }\n}\n\n/** Defines a rendering material.\n * @note See [[PhysicalMaterial]] for the DefinitionElement used to define the matter that makes up physical elements.\n * @public\n */\nexport class RenderMaterialElement extends DefinitionElement {\n public static override get className(): string { return \"RenderMaterial\"; }\n\n /** The name of a palette that can be used to categorize multiple materials. */\n public paletteName: string;\n /** An optional description of the material. */\n public description?: string;\n\n private constructor(props: RenderMaterialProps, iModel: IModelDb) {\n super(props, iModel);\n this.paletteName = props.paletteName;\n this.description = props.description;\n }\n\n public override toJSON(): RenderMaterialProps {\n const val = super.toJSON() as RenderMaterialProps;\n val.paletteName = this.paletteName;\n val.description = this.description;\n return val;\n }\n\n /**\n * RenderMaterialElement custom HandledProps includes 'paletteName'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"paletteName\", source: \"Class\" },\n ];\n\n /**\n * RenderMaterialElement deserializes 'paletteName'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): RenderMaterialProps {\n const elProps = super.deserialize(props) as RenderMaterialProps;\n const instance = props.row;\n elProps.paletteName = JsonUtils.asString(instance.paletteName);\n return elProps;\n }\n\n /**\n * RenderMaterialElement serializes 'paletteName'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: RenderMaterialProps, iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, iModel);\n inst.paletteName = props.paletteName;\n return inst;\n }\n\n /** Create a Code for a RenderMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the RenderMaterial and provides the scope for its name.\n * @param name The RenderMaterial name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, name: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.renderMaterial);\n return 0 === name.length ? Code.createEmpty() : new Code({ spec: codeSpec.id, scope: scopeModelId, value: name });\n }\n /**\n * Create a RenderMaterial with given parameters.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param materialName The name/CodeValue of the RenderMaterial\n * @param params Parameters object which describes how to construct the RenderMaterial\n * @returns The newly constructed RenderMaterial element.\n * @throws [[IModelError]] if unable to create the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): RenderMaterialElement {\n let maps: RenderMaterialAssetMapsProps | undefined;\n const pbr_normal = params.normalMap?.scale;\n if (params.patternMap || params.normalMap) {\n // If both normal and pattern map are present, their texture mapping modes, angles, scales, etc are expected to match.\n type TexMap = Omit<TextureMapProps, \"TextureId\">;\n function choose<K extends keyof TexMap>(obj: TexMap, key: K): void {\n const pat = params.patternMap;\n if (pat && undefined !== pat[key])\n obj[key] = pat[key];\n else if (params.normalMap && undefined !== params.normalMap[key])\n obj[key] = params.normalMap[key];\n }\n\n const baseProps: TexMap = {};\n choose(baseProps, \"pattern_angle\");\n choose(baseProps, \"pattern_u_flip\");\n choose(baseProps, \"pattern_flip\");\n choose(baseProps, \"pattern_scale\");\n choose(baseProps, \"pattern_offset\");\n choose(baseProps, \"pattern_scalemode\");\n choose(baseProps, \"pattern_mapping\");\n choose(baseProps, \"pattern_weight\");\n choose(baseProps, \"pattern_useconstantlod\");\n choose(baseProps, \"pattern_constantlod_repetitions\");\n choose(baseProps, \"pattern_constantlod_offset\");\n choose(baseProps, \"pattern_constantlod_mindistanceclamp\");\n choose(baseProps, \"pattern_constantlod_maxdistanceclamp\");\n\n maps = {};\n if (params.patternMap)\n maps.Pattern = { ...params.patternMap, ...baseProps };\n\n if (params.normalMap) {\n maps.Normal = {\n ...params.normalMap,\n ...baseProps,\n };\n\n delete (maps.Normal as any).scale;\n }\n }\n\n const renderMaterialProps: RenderMaterialProps = {\n classFullName: this.classFullName,\n code: this.createCode(iModelDb, definitionModelId, materialName),\n paletteName: params.paletteName,\n description: params.description,\n jsonProperties: {\n materialAssets: {\n renderMaterial: {\n HasBaseColor: params.color !== undefined,\n color: params.color,\n HasSpecularColor: params.specularColor !== undefined,\n specular_color: params.specularColor,\n HasFinish: params.finish !== undefined,\n finish: params.finish,\n HasTransmit: params.transmit !== undefined ? true : undefined,\n transmit: params.transmit,\n HasDiffuse: params.diffuse !== undefined,\n diffuse: params.diffuse,\n HasSpecular: params.specular !== undefined,\n specular: params.specular,\n HasReflect: params.reflect !== undefined,\n reflect: params.reflect,\n HasReflectColor: params.reflectColor !== undefined,\n reflect_color: params.reflectColor,\n Map: maps,\n pbr_normal,\n },\n },\n },\n model: definitionModelId,\n isPrivate: false,\n };\n\n return new RenderMaterialElement(renderMaterialProps, iModelDb);\n }\n\n /**\n * Insert a new RenderMaterial into a model.\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new Texture into this DefinitionModel\n * @param materialName The name/CodeValue of the RenderMaterial\n * @param params Parameters object which describes how to construct the RenderMaterial\n * @returns The Id of the newly inserted RenderMaterial element.\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): Id64String {\n const renderMaterial = this.create(iModelDb, definitionModelId, materialName, params);\n return iModelDb.elements.insertElement(renderMaterial.toJSON());\n }\n\n /** @beta */\n protected static override onCloned(context: IModelElementCloneContext, sourceProps: ElementProps, targetProps: ElementProps) {\n super.onCloned(context, sourceProps, targetProps);\n for (const mapName in sourceProps.jsonProperties?.materialAssets?.renderMaterial?.Map ?? {}) {\n if (typeof mapName !== \"string\")\n continue;\n const sourceMap = sourceProps.jsonProperties.materialAssets.renderMaterial.Map[mapName];\n // sourceMap could be null/undefined, keep it the same in targetProps\n if (!sourceMap) {\n targetProps.jsonProperties.materialAssets.renderMaterial.Map[mapName] = sourceMap;\n continue;\n }\n if (!Id64.isValid(sourceMap.TextureId) || sourceMap.TextureId === undefined)\n continue;\n targetProps.jsonProperties.materialAssets.renderMaterial.Map[mapName].TextureId = context.findTargetElementId(sourceMap.TextureId ?? Id64.invalid);\n }\n }\n}\n\n/** @public */\nexport namespace RenderMaterialElement {\n /** Parameters used to construct a [[RenderMaterial]].\n * The persistent JSON representation - [RenderMaterialAssetProps]($common) - is quite verbose and unwieldy. This representation simplifies it somewhat.\n * @see [[RenderMaterialElement.create]] and [[RenderMaterialElement.insert]] to create a [[RenderMaterial]] from parameters of this type.\n * @deprecated in 3.6 - might be removed in next major version. Because it is not useful to use a `class` - just use [[RenderMaterialElementParams]] directly instead.\n */\n export class Params {\n /** A required palette name that categorizes this RenderMaterial */\n public paletteName: string;\n /** An optional description of this RenderMaterial */\n public description?: string;\n /** If defined, the color to use for surface fill or diffuse illumination, overriding the surface's own color. */\n public color?: RgbFactorProps;\n /** The color to use for specular illumination. Default: black. */\n public specularColor?: RgbFactorProps;\n /** The specular exponent describing the surface's shininess, in the range 0 through 128.\n * Default: 0.\n */\n public finish?: number;\n /** A transparency to be applied to the surface, ranging from 0 (fully opaque) to 1 (fully transparent).\n * If defined, then the material transparency overrides the transparency of whatever surface the material is applied to.\n * If undefined, the material has no effect on surface transparency.\n * Default: undefined.\n */\n public transmit?: number;\n /** The surface's diffuse reflectivity from 0.0 to 1.0. Default: 0.6. */\n public diffuse?: number;\n /** The surface's specular reflectivity from 0.0 to 1.0. Default: 0.0. */\n public specular?: number;\n /** Currently unused. */\n public reflect?: number;\n /** Currently unused. */\n public reflectColor?: number[];\n /** Specifies a texture image to map onto the surface, replacing or mixing with the surface's own color and transparency.\n * @note With the exception of `TextureId`, the [TextureMapProps]($common) of [[patternMap]] and [[normalMap]] are expected to be identical. If a property is defined in both\n * [[patternMap]]] and [[normalMap]], the value in [[patternMap]] takes precedence.\n */\n public patternMap?: TextureMapProps;\n /** Specifies a [normal map](https://en.wikipedia.org/wiki/Normal_mapping) to apply to the surface to simulate more surface detail than is present in the\n * surface's geometry.\n * @note With the exception of `TextureId`, the [TextureMapProps]($common) of [[patternMap]] and [[normalMap]] are expected to be identical. If a property is defined in both\n * [[patternMap]]] and [[normalMap]], the value in [[patternMap]] takes precedence.\n */\n public normalMap?: NormalMapProps & {\n /** A factor by which to multiply the components of the normal vectors read from the texture.\n * Default: 1.\n */\n scale?: number;\n };\n\n /** Construct a new RenderMaterial.Params object with the specified paletteName. Alter the public members on that object to specify settings. */\n public constructor(paletteName: string) {\n this.paletteName = paletteName;\n }\n }\n}\n\n/** Parameters used to create a [[RenderMaterial]] element.\n * The persistent JSON representation - [RenderMaterialAssetProps]($common) - is quite verbose and unwieldy. This representation simplifies it somewhat.\n * @see [[RenderMaterialElement.create]] and [[RenderMaterialElement.insert]] to create a [[RenderMaterial]] from parameters of this type.\n * @public\n */\nexport interface RenderMaterialElementParams extends RenderMaterialElement.Params { // eslint-disable-line @typescript-eslint/no-deprecated, @typescript-eslint/no-empty-object-type\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Material.js","sourceRoot":"","sources":["../../src/Material.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAkE;AAClE,oDAE4B;AAC5B,uCAA8C;AAK9C,yDAAyD;AAEzD;;;GAGG;AACH,MAAsB,gBAAiB,SAAQ,2BAAiB;IACvD,MAAM,KAAc,SAAS,KAAa,OAAO,kBAAkB,CAAC,CAAC,CAAC;IAC7E;;;;OAIG;IACI,MAAM,CAAC,UAAU,CAAC,MAAgB,EAAE,iBAAiC,EAAE,IAAY;QACxF,MAAM,QAAQ,GAAa,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,yBAAW,CAAC,gBAAgB,CAAC,CAAC;QACpF,OAAO,IAAI,kBAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAChF,CAAC;IACD;;;;;;OAMG;IACI,MAAM,CAAC,MAAM,CAA6B,QAAkB,EAAE,iBAAiC,EAAE,IAAY;QAClH,MAAM,YAAY,GAA2B;YAC3C,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,iBAAiB,EAAE,IAAI,CAAC;SACzD,CAAC;QACF,OAAO,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAC,CAA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E,QAAQ,CAAU;QACzB,wBAAwB;QACjB,OAAO,CAAU;QACxB,wBAAwB;QACjB,YAAY,CAAY;QAC/B;;;WAGG;QACI,UAAU,CAAmB;QACpC;;;;WAIG;QACI,SAAS,CAKd;QAEF,gJAAgJ;QAChJ,YAAmB,WAAmB;YACpC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QACjC,CAAC;KACF;IAhDY,4BAAM,SAgDlB,CAAA;AACH,CAAC,EAvDgB,qBAAqB,qCAArB,qBAAqB,QAuDrC","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 Elements\n */\n\nimport { Id64, Id64String, JsonUtils } from \"@itwin/core-bentley\";\nimport {\n BisCodeSpec, Code, CodeScopeProps, CodeSpec, DefinitionElementProps, ElementProps, NormalMapProps, RenderMaterialAssetMapsProps, RenderMaterialProps, RgbFactorProps, TextureMapProps,\n} from \"@itwin/core-common\";\nimport { DefinitionElement } from \"./Element\";\nimport { IModelDb } from \"./IModelDb\";\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\nimport { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow } from \"./Entity\";\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\n/** A PhysicalMaterial defines the matter that makes up physical elements.\n * @note See [[RenderMaterialElement]] for the DefinitionElement used to define rendering characteristics.\n * @public\n */\nexport abstract class PhysicalMaterial extends DefinitionElement {\n public static override get className(): string { return \"PhysicalMaterial\"; }\n /** Create a Code for a PhysicalMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\n * @param name The name (codeValue) of the PhysicalMaterial\n */\n public static createCode(iModel: IModelDb, definitionModelId: CodeScopeProps, name: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.physicalMaterial);\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: name });\n }\n /** Create a PhysicalMaterial\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\n * @param name The name (codeValue) of the PhysicalMaterial\n * @returns The newly constructed PhysicalMaterial\n * @throws [[IModelError]] if there is a problem creating the PhysicalMaterial\n */\n public static create<T extends PhysicalMaterial>(iModelDb: IModelDb, definitionModelId: CodeScopeProps, name: string): T {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n };\n return iModelDb.elements.createElement(elementProps);\n }\n}\n\n/** Defines a rendering material.\n * @note See [[PhysicalMaterial]] for the DefinitionElement used to define the matter that makes up physical elements.\n * @public\n */\nexport class RenderMaterialElement extends DefinitionElement {\n public static override get className(): string { return \"RenderMaterial\"; }\n\n /** The name of a palette that can be used to categorize multiple materials. */\n public paletteName: string;\n /** An optional description of the material. */\n public description?: string;\n\n private constructor(props: RenderMaterialProps, iModel: IModelDb) {\n super(props, iModel);\n this.paletteName = props.paletteName;\n this.description = props.description;\n }\n\n public override toJSON(): RenderMaterialProps {\n const val = super.toJSON() as RenderMaterialProps;\n val.paletteName = this.paletteName;\n val.description = this.description;\n return val;\n }\n\n /**\n * RenderMaterialElement custom HandledProps includes 'paletteName'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"paletteName\", source: \"Class\" },\n ];\n\n /**\n * RenderMaterialElement deserializes 'paletteName'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): RenderMaterialProps {\n const elProps = super.deserialize(props) as RenderMaterialProps;\n const instance = props.row;\n elProps.paletteName = JsonUtils.asString(instance.paletteName);\n return elProps;\n }\n\n /**\n * RenderMaterialElement serializes 'paletteName'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: RenderMaterialProps, iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, iModel);\n inst.paletteName = props.paletteName;\n return inst;\n }\n\n /** Create a Code for a RenderMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the RenderMaterial and provides the scope for its name.\n * @param name The RenderMaterial name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, name: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.renderMaterial);\n return 0 === name.length ? Code.createEmpty() : new Code({ spec: codeSpec.id, scope: scopeModelId, value: name });\n }\n /**\n * Create a RenderMaterial with given parameters.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param materialName The name/CodeValue of the RenderMaterial\n * @param params Parameters object which describes how to construct the RenderMaterial\n * @returns The newly constructed RenderMaterial element.\n * @throws [[IModelError]] if unable to create the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): RenderMaterialElement {\n let maps: RenderMaterialAssetMapsProps | undefined;\n const pbr_normal = params.normalMap?.scale;\n if (params.patternMap || params.normalMap) {\n // If both normal and pattern map are present, their texture mapping modes, angles, scales, etc are expected to match.\n type TexMap = Omit<TextureMapProps, \"TextureId\">;\n function choose<K extends keyof TexMap>(obj: TexMap, key: K): void {\n const pat = params.patternMap;\n if (pat && undefined !== pat[key])\n obj[key] = pat[key];\n else if (params.normalMap && undefined !== params.normalMap[key])\n obj[key] = params.normalMap[key];\n }\n\n const baseProps: TexMap = {};\n choose(baseProps, \"pattern_angle\");\n choose(baseProps, \"pattern_u_flip\");\n choose(baseProps, \"pattern_flip\");\n choose(baseProps, \"pattern_scale\");\n choose(baseProps, \"pattern_offset\");\n choose(baseProps, \"pattern_scalemode\");\n choose(baseProps, \"pattern_mapping\");\n choose(baseProps, \"pattern_weight\");\n choose(baseProps, \"pattern_useconstantlod\");\n choose(baseProps, \"pattern_constantlod_repetitions\");\n choose(baseProps, \"pattern_constantlod_offset\");\n choose(baseProps, \"pattern_constantlod_mindistanceclamp\");\n choose(baseProps, \"pattern_constantlod_maxdistanceclamp\");\n\n maps = {};\n if (params.patternMap)\n maps.Pattern = { ...params.patternMap, ...baseProps };\n\n if (params.normalMap) {\n maps.Normal = {\n ...params.normalMap,\n ...baseProps,\n };\n\n delete (maps.Normal as any).scale;\n }\n }\n\n const renderMaterialProps: RenderMaterialProps = {\n classFullName: this.classFullName,\n code: this.createCode(iModelDb, definitionModelId, materialName),\n paletteName: params.paletteName,\n description: params.description,\n jsonProperties: {\n materialAssets: {\n renderMaterial: {\n HasBaseColor: params.color !== undefined,\n color: params.color,\n HasSpecularColor: params.specularColor !== undefined,\n specular_color: params.specularColor,\n HasFinish: params.finish !== undefined,\n finish: params.finish,\n HasTransmit: params.transmit !== undefined ? true : undefined,\n transmit: params.transmit,\n HasDiffuse: params.diffuse !== undefined,\n diffuse: params.diffuse,\n HasSpecular: params.specular !== undefined,\n specular: params.specular,\n HasReflect: params.reflect !== undefined,\n reflect: params.reflect,\n HasReflectColor: params.reflectColor !== undefined,\n reflect_color: params.reflectColor,\n Map: maps,\n pbr_normal,\n },\n },\n },\n model: definitionModelId,\n isPrivate: false,\n };\n\n return new RenderMaterialElement(renderMaterialProps, iModelDb);\n }\n\n /**\n * Insert a new RenderMaterial into a model.\n * @param iModelDb Insert into this iModel\n * @param definitionModelId Insert the new Texture into this DefinitionModel\n * @param materialName The name/CodeValue of the RenderMaterial\n * @param params Parameters object which describes how to construct the RenderMaterial\n * @returns The Id of the newly inserted RenderMaterial element.\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): Id64String {\n const renderMaterial = this.create(iModelDb, definitionModelId, materialName, params);\n return iModelDb.elements.insertElement(renderMaterial.toJSON());\n }\n\n /** @beta */\n protected static override async onCloned(context: IModelElementCloneContext, sourceProps: ElementProps, targetProps: ElementProps) {\n await super.onCloned(context, sourceProps, targetProps);\n for (const mapName in sourceProps.jsonProperties?.materialAssets?.renderMaterial?.Map ?? {}) {\n if (typeof mapName !== \"string\")\n continue;\n const sourceMap = sourceProps.jsonProperties.materialAssets.renderMaterial.Map[mapName];\n // sourceMap could be null/undefined, keep it the same in targetProps\n if (!sourceMap) {\n targetProps.jsonProperties.materialAssets.renderMaterial.Map[mapName] = sourceMap;\n continue;\n }\n if (!Id64.isValid(sourceMap.TextureId) || sourceMap.TextureId === undefined)\n continue;\n targetProps.jsonProperties.materialAssets.renderMaterial.Map[mapName].TextureId = context.findTargetElementId(sourceMap.TextureId ?? Id64.invalid);\n }\n }\n}\n\n/** @public */\nexport namespace RenderMaterialElement {\n /** Parameters used to construct a [[RenderMaterial]].\n * The persistent JSON representation - [RenderMaterialAssetProps]($common) - is quite verbose and unwieldy. This representation simplifies it somewhat.\n * @see [[RenderMaterialElement.create]] and [[RenderMaterialElement.insert]] to create a [[RenderMaterial]] from parameters of this type.\n * @deprecated in 3.6 - might be removed in next major version. Because it is not useful to use a `class` - just use [[RenderMaterialElementParams]] directly instead.\n */\n export class Params {\n /** A required palette name that categorizes this RenderMaterial */\n public paletteName: string;\n /** An optional description of this RenderMaterial */\n public description?: string;\n /** If defined, the color to use for surface fill or diffuse illumination, overriding the surface's own color. */\n public color?: RgbFactorProps;\n /** The color to use for specular illumination. Default: black. */\n public specularColor?: RgbFactorProps;\n /** The specular exponent describing the surface's shininess, in the range 0 through 128.\n * Default: 0.\n */\n public finish?: number;\n /** A transparency to be applied to the surface, ranging from 0 (fully opaque) to 1 (fully transparent).\n * If defined, then the material transparency overrides the transparency of whatever surface the material is applied to.\n * If undefined, the material has no effect on surface transparency.\n * Default: undefined.\n */\n public transmit?: number;\n /** The surface's diffuse reflectivity from 0.0 to 1.0. Default: 0.6. */\n public diffuse?: number;\n /** The surface's specular reflectivity from 0.0 to 1.0. Default: 0.0. */\n public specular?: number;\n /** Currently unused. */\n public reflect?: number;\n /** Currently unused. */\n public reflectColor?: number[];\n /** Specifies a texture image to map onto the surface, replacing or mixing with the surface's own color and transparency.\n * @note With the exception of `TextureId`, the [TextureMapProps]($common) of [[patternMap]] and [[normalMap]] are expected to be identical. If a property is defined in both\n * [[patternMap]]] and [[normalMap]], the value in [[patternMap]] takes precedence.\n */\n public patternMap?: TextureMapProps;\n /** Specifies a [normal map](https://en.wikipedia.org/wiki/Normal_mapping) to apply to the surface to simulate more surface detail than is present in the\n * surface's geometry.\n * @note With the exception of `TextureId`, the [TextureMapProps]($common) of [[patternMap]] and [[normalMap]] are expected to be identical. If a property is defined in both\n * [[patternMap]]] and [[normalMap]], the value in [[patternMap]] takes precedence.\n */\n public normalMap?: NormalMapProps & {\n /** A factor by which to multiply the components of the normal vectors read from the texture.\n * Default: 1.\n */\n scale?: number;\n };\n\n /** Construct a new RenderMaterial.Params object with the specified paletteName. Alter the public members on that object to specify settings. */\n public constructor(paletteName: string) {\n this.paletteName = paletteName;\n }\n }\n}\n\n/** Parameters used to create a [[RenderMaterial]] element.\n * The persistent JSON representation - [RenderMaterialAssetProps]($common) - is quite verbose and unwieldy. This representation simplifies it somewhat.\n * @see [[RenderMaterialElement.create]] and [[RenderMaterialElement.insert]] to create a [[RenderMaterial]] from parameters of this type.\n * @public\n */\nexport interface RenderMaterialElementParams extends RenderMaterialElement.Params { // eslint-disable-line @typescript-eslint/no-deprecated, @typescript-eslint/no-empty-object-type\n}\n"]}
|
|
@@ -182,4 +182,19 @@ export declare class SheetIndexReferenceRefersToSheetIndex extends RelatedElemen
|
|
|
182
182
|
static classFullName: string;
|
|
183
183
|
constructor(sheetIndexId: Id64String, relClassName?: string);
|
|
184
184
|
}
|
|
185
|
+
/** Relates a [[Subject]] to the [[ProjectInformationRecord]] that describes its project-level properties.
|
|
186
|
+
* @beta
|
|
187
|
+
*/
|
|
188
|
+
export declare class SubjectOwnsProjectInformationRecord extends ElementOwnsChildElements {
|
|
189
|
+
static classFullName: string;
|
|
190
|
+
constructor(parentId: Id64String, relClassName?: string);
|
|
191
|
+
}
|
|
192
|
+
/** Relates a [[Sheet]] to the [[SheetInformationAspect]] that hosts its basic [SheetInformation]($common).
|
|
193
|
+
* @see [[SheetInformationAspect.setSheetInformation]] to create an instance of this relationship.
|
|
194
|
+
* @beta
|
|
195
|
+
*/
|
|
196
|
+
export declare class SheetOwnsSheetInformationAspect extends ElementOwnsUniqueAspect {
|
|
197
|
+
static classFullName: string;
|
|
198
|
+
constructor(sheetId: Id64String, relClassName?: string);
|
|
199
|
+
}
|
|
185
200
|
//# sourceMappingURL=NavigationRelationship.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationRelationship.d.ts","sourceRoot":"","sources":["../../src/NavigationRelationship.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpE;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,cAAc;IAC1D,OAAc,aAAa,SAAsC;gBAC9C,QAAQ,EAAE,UAAU,EAAE,YAAY,GAAE,MAA+C;CAGvG;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,wBAAwB;IAC/D,OAAuB,aAAa,SAAiC;gBAClD,QAAQ,EAAE,UAAU,EAAE,YAAY,GAAE,MAA0C;CAGlG;AAED;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,wBAAwB;IACxE,OAAuB,aAAa,SAA0C;gBAC3D,QAAQ,EAAE,UAAU,EAAE,YAAY,GAAE,MAAmD;CAG3G;AAED;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,wBAAwB;IACrE,OAAuB,aAAa,SAAuC;gBACxD,QAAQ,EAAE,UAAU,EAAE,YAAY,GAAE,MAAgD;CAGxG;AAED;;GAEG;AACH,qBAAa,iCAAkC,SAAQ,wBAAwB;IA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;AAED;;GAEG;AACH,qBAAa,mCAAoC,SAAQ,wBAAwB;IAC/E,OAAuB,aAAa,SAAiD;gBAClE,QAAQ,EAAE,UAAU,EAAE,YAAY,SAAoD;CAG1G;AAED;;;GAGG;AACH,qBAAa,+BAAgC,SAAQ,uBAAuB;IAC1E,OAAuB,aAAa,SAA6C;gBAE9D,OAAO,EAAE,UAAU,EAAE,YAAY,SAAgD;CAGrG"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module Relationships
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.SheetIndexReferenceRefersToSheetIndex = exports.SheetReferenceRefersToSheet = exports.ExternalSourceAttachmentAttachesSource = exports.ExternalSourceIsInRepository = exports.ElementOwnsExternalSourceAspects = exports.ElementOwnsMultiAspects = exports.ElementOwnsUniqueAspect = exports.PhysicalTypeIsOfPhysicalMaterial = exports.PhysicalElementIsOfPhysicalMaterial = exports.PhysicalElementIsOfType = exports.SpatialLocationIsOfType = exports.GeometricElement3dHasTypeDefinition = exports.GraphicalElement2dIsOfType = exports.GeometricElement2dHasTypeDefinition = exports.SheetIndexOwnsEntries = exports.SheetIndexFolderOwnsEntries = exports.FolderContainsRepositories = exports.ExternalSourceOwnsAttachments = exports.PhysicalElementAssemblesElements = exports.ElementEncapsulatesElements = exports.RenderMaterialOwnsRenderMaterials = exports.CategoryOwnsSubCategories = exports.SubjectOwnsPartitionElements = exports.SubjectOwnsSubjects = exports.ElementOwnsChildElements = void 0;
|
|
10
|
+
exports.SheetOwnsSheetInformationAspect = exports.SubjectOwnsProjectInformationRecord = exports.SheetIndexReferenceRefersToSheetIndex = exports.SheetReferenceRefersToSheet = exports.ExternalSourceAttachmentAttachesSource = exports.ExternalSourceIsInRepository = exports.ElementOwnsExternalSourceAspects = exports.ElementOwnsMultiAspects = exports.ElementOwnsUniqueAspect = exports.PhysicalTypeIsOfPhysicalMaterial = exports.PhysicalElementIsOfPhysicalMaterial = exports.PhysicalElementIsOfType = exports.SpatialLocationIsOfType = exports.GeometricElement3dHasTypeDefinition = exports.GraphicalElement2dIsOfType = exports.GeometricElement2dHasTypeDefinition = exports.SheetIndexOwnsEntries = exports.SheetIndexFolderOwnsEntries = exports.FolderContainsRepositories = exports.ExternalSourceOwnsAttachments = exports.PhysicalElementAssemblesElements = exports.ElementEncapsulatesElements = exports.RenderMaterialOwnsRenderMaterials = exports.CategoryOwnsSubCategories = exports.SubjectOwnsPartitionElements = exports.SubjectOwnsSubjects = exports.ElementOwnsChildElements = void 0;
|
|
11
11
|
const core_common_1 = require("@itwin/core-common");
|
|
12
12
|
/** Relates a parent Element to child Elements which represent parts of the Entity modeled by the parent Element.
|
|
13
13
|
* @public
|
|
@@ -263,4 +263,25 @@ class SheetIndexReferenceRefersToSheetIndex extends core_common_1.RelatedElement
|
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
exports.SheetIndexReferenceRefersToSheetIndex = SheetIndexReferenceRefersToSheetIndex;
|
|
266
|
+
/** Relates a [[Subject]] to the [[ProjectInformationRecord]] that describes its project-level properties.
|
|
267
|
+
* @beta
|
|
268
|
+
*/
|
|
269
|
+
class SubjectOwnsProjectInformationRecord extends ElementOwnsChildElements {
|
|
270
|
+
static classFullName = "BisCore:SubjectOwnsProjectInformationRecord";
|
|
271
|
+
constructor(parentId, relClassName = SubjectOwnsProjectInformationRecord.classFullName) {
|
|
272
|
+
super(parentId, relClassName);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
exports.SubjectOwnsProjectInformationRecord = SubjectOwnsProjectInformationRecord;
|
|
276
|
+
/** Relates a [[Sheet]] to the [[SheetInformationAspect]] that hosts its basic [SheetInformation]($common).
|
|
277
|
+
* @see [[SheetInformationAspect.setSheetInformation]] to create an instance of this relationship.
|
|
278
|
+
* @beta
|
|
279
|
+
*/
|
|
280
|
+
class SheetOwnsSheetInformationAspect extends ElementOwnsUniqueAspect {
|
|
281
|
+
static classFullName = "BisCore:SheetOwnsSheetInformationAspect";
|
|
282
|
+
constructor(sheetId, relClassName = SheetOwnsSheetInformationAspect.classFullName) {
|
|
283
|
+
super(sheetId, relClassName);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
exports.SheetOwnsSheetInformationAspect = SheetOwnsSheetInformationAspect;
|
|
266
287
|
//# sourceMappingURL=NavigationRelationship.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationRelationship.js","sourceRoot":"","sources":["../../src/NavigationRelationship.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAMH,oDAAoE;AAEpE;;GAEG;AACH,MAAa,wBAAyB,SAAQ,4BAAc;IACnD,MAAM,CAAC,aAAa,GAAG,kCAAkC,CAAC;IACjE,YAAmB,QAAoB,EAAE,eAAuB,wBAAwB,CAAC,aAAa;QACpG,KAAK,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,CAAC;IACxC,CAAC;;AAJH,4DAKC;AAED;;GAEG;AACH,MAAa,mBAAoB,SAAQ,wBAAwB;IACxD,MAAM,CAAU,aAAa,GAAG,6BAA6B,CAAC;IACrE,YAAmB,QAAoB,EAAE,eAAuB,mBAAmB,CAAC,aAAa;QAC/F,KAAK,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAChC,CAAC;;AAJH,kDAKC;AAED;;GAEG;AACH,MAAa,4BAA6B,SAAQ,wBAAwB;IACjE,MAAM,CAAU,aAAa,GAAG,sCAAsC,CAAC;IAC9E,YAAmB,QAAoB,EAAE,eAAuB,4BAA4B,CAAC,aAAa;QACxG,KAAK,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAChC,CAAC;;AAJH,oEAKC;AAED;;GAEG;AACH,MAAa,yBAA0B,SAAQ,wBAAwB;IAC9D,MAAM,CAAU,aAAa,GAAG,mCAAmC,CAAC;IAC3E,YAAmB,QAAoB,EAAE,eAAuB,yBAAyB,CAAC,aAAa;QAC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a,GAAG,0CAA0C,CAAC;IAClF,YAAmB,SAAqB,EAAE,eAAuB,gCAAgC,CAAC,aAAa;QAC7G,KAAK,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IACjC,CAAC;;AAJH,4EAKC;AAED;;;GAGG;AACH,MAAa,4BAA6B,SAAQ,4BAAc;IACvD,MAAM,CAAC,aAAa,GAAG,sCAAsC,CAAC;IACrE,YAAmB,YAAwB,EAAE,eAAuB,4BAA4B,CAAC,aAAa;QAC5G,KAAK,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC,CAAC;IAC5C,CAAC;;AAJH,oEAKC;AAED;;;GAGG;AACH,MAAa,sCAAuC,SAAQ,4BAAc;IACjE,MAAM,CAAC,aAAa,GAAG,gDAAgD,CAAC;IAC/E,YAAmB,gBAA4B,EAAE,eAAuB,sCAAsC,CAAC,aAAa;QAC1H,KAAK,CAAC,EAAE,EAAE,EAAE,gBAAgB,EAAE,YAAY,EAAE,CAAC,CAAC;IAChD,CAAC;;AAJH,wFAKC;AAED;;GAEG;AACH,MAAa,2BAA4B,SAAQ,4BAAc;IACtD,MAAM,CAAC,aAAa,GAAG,qCAAqC,CAAC;IACpE,YAAmB,OAAmB,EAAE,eAAuB,2BAA2B,CAAC,aAAa;QACtG,KAAK,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;IACvC,CAAC;;AAJH,kEAKC;AAED;;GAEG;AACH,MAAa,qCAAsC,SAAQ,4BAAc;IAChE,MAAM,CAAC,aAAa,GAAG,+CAA+C,CAAC;IAC9E,YAAmB,YAAwB,EAAE,eAAuB,qCAAqC,CAAC,aAAa;QACrH,KAAK,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC,CAAC;IAC5C,CAAC;;AAJH,sFAKC","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 Relationships\n */\n\n// NOTE: A NavigationRelationship is not an Entity, so is not registered in the ClassRegistry.\n// NOTE: It does, however, have a classFullName property for consistency with Entity subclasses.\n\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { RelatedElement, TypeDefinition } from \"@itwin/core-common\";\n\n/** Relates a parent Element to child Elements which represent parts of the Entity modeled by the parent Element.\n * @public\n */\nexport class ElementOwnsChildElements extends RelatedElement {\n public static classFullName = \"BisCore:ElementOwnsChildElements\";\n public constructor(parentId: Id64String, relClassName: string = ElementOwnsChildElements.classFullName) {\n super({ id: parentId, relClassName });\n }\n}\n\n/** Relates a parent [[Subject]] to [[Subject]] child elements.\n * @public\n */\nexport class SubjectOwnsSubjects extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:SubjectOwnsSubjects\";\n public constructor(parentId: Id64String, relClassName: string = SubjectOwnsSubjects.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[Subject]] to [[InformationPartitionElement]] child elements.\n * @public\n */\nexport class SubjectOwnsPartitionElements extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:SubjectOwnsPartitionElements\";\n public constructor(parentId: Id64String, relClassName: string = SubjectOwnsPartitionElements.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[Category]] to [[SubCategory]] child elements.\n * @public\n */\nexport class CategoryOwnsSubCategories extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:CategoryOwnsSubCategories\";\n public constructor(parentId: Id64String, relClassName: string = CategoryOwnsSubCategories.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[RenderMaterial]] to [[RenderMaterial]] child elements.\n * @public\n */\nexport class RenderMaterialOwnsRenderMaterials extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:RenderMaterialOwnsRenderMaterials\";\n public constructor(parentId: Id64String, relClassName: string = RenderMaterialOwnsRenderMaterials.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent Element to child Elements which represent **hidden** parts of the Entity.\n * @public\n */\nexport class ElementEncapsulatesElements extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:ElementEncapsulatesElements\";\n public constructor(parentId: Id64String, relClassName: string = ElementEncapsulatesElements.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[PhysicalElement]] to [[PhysicalElement]] children that it assembles.\n * @public\n */\nexport class PhysicalElementAssemblesElements extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:PhysicalElementAssemblesElements\";\n public constructor(parentId: Id64String, relClassName: string = PhysicalElementAssemblesElements.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[ExternalSource]] to its [[ExternalSourceAttachment]] children.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class ExternalSourceOwnsAttachments extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:ExternalSourceOwnsAttachments\";\n public constructor(parentId: Id64String, relClassName: string = ExternalSourceOwnsAttachments.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[FolderLink]] to its [[RepositoryLink]] children.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class FolderContainsRepositories extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:FolderContainsRepositories\";\n public constructor(parentId: Id64String, relClassName: string = FolderContainsRepositories.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a [[SheetIndexFolder]] to the [[SheetIndexEntry]]'s that it contains.\n * @beta\n */\nexport class SheetIndexFolderOwnsEntries extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:SheetIndexFolderOwnsEntries\";\n public constructor(parentId: Id64String, relClassName: string = SheetIndexFolderOwnsEntries.classFullName) {\n super(parentId, relClassName );\n }\n}\n\n/** Relates a [[SheetIndex]] to the [SheetIndexEntry]]'s that it contains.\n * @beta\n */\nexport class SheetIndexOwnsEntries extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:SheetIndexOwnsEntries\";\n public constructor(parentId: Id64String, relClassName: string = SheetIndexOwnsEntries.classFullName) {\n super(parentId, relClassName );\n }\n}\n\n/** Relates a [[GeometricElement2d]] to its [[TypeDefinitionElement]]\n * @public\n */\nexport class GeometricElement2dHasTypeDefinition extends TypeDefinition {\n public static classFullName = \"BisCore:GeometricElement2dHasTypeDefinition\";\n public constructor(id: Id64String, relClassName: string = GeometricElement2dHasTypeDefinition.classFullName) {\n super({ id, relClassName });\n }\n}\n\n/** Relates a [[GraphicalElement2d]] to its [[GraphicalType2d]]\n * @public\n */\nexport class GraphicalElement2dIsOfType extends GeometricElement2dHasTypeDefinition {\n public static override classFullName = \"BisCore:GraphicalElement2dIsOfType\";\n public constructor(id: Id64String, relClassName: string = GraphicalElement2dIsOfType.classFullName) {\n super(id, relClassName);\n }\n}\n\n/** Relates a [[GeometricElement3d]] to its [[TypeDefinitionElement]]\n * @public\n */\nexport class GeometricElement3dHasTypeDefinition extends TypeDefinition {\n public static classFullName = \"BisCore:GeometricElement3dHasTypeDefinition\";\n public constructor(id: Id64String, relClassName: string = GeometricElement3dHasTypeDefinition.classFullName) {\n super({ id, relClassName });\n }\n}\n\n/** Relates a [[SpatialLocationElement]] to its [[SpatialLocationType]]\n * @public\n */\nexport class SpatialLocationIsOfType extends GeometricElement3dHasTypeDefinition {\n public static override classFullName = \"BisCore:SpatialLocationIsOfType\";\n public constructor(id: Id64String, relClassName: string = SpatialLocationIsOfType.classFullName) {\n super(id, relClassName);\n }\n}\n\n/** Relates a [[PhysicalElement]] to its [[PhysicalType]]\n * @public\n */\nexport class PhysicalElementIsOfType extends GeometricElement3dHasTypeDefinition {\n public static override classFullName = \"BisCore:PhysicalElementIsOfType\";\n public constructor(id: Id64String, relClassName: string = PhysicalElementIsOfType.classFullName) {\n super(id, relClassName);\n }\n}\n\n/** Relates a [[PhysicalElement]] to its [[PhysicalMaterial]]\n * @public\n */\nexport class PhysicalElementIsOfPhysicalMaterial extends RelatedElement {\n public static classFullName = \"BisCore:PhysicalElementIsOfPhysicalMaterial\";\n public constructor(id: Id64String) {\n super({ id });\n }\n}\n\n/** Relates a [[PhysicalType]] to its [[PhysicalMaterial]]\n * @public\n */\nexport class PhysicalTypeIsOfPhysicalMaterial extends RelatedElement {\n public static classFullName = \"BisCore:PhysicalTypeIsOfPhysicalMaterial\";\n public constructor(id: Id64String) {\n super({ id });\n }\n}\n\n/** Relates an [[Element]] and an [[ElementUniqueAspect]] that it owns.\n * @public\n */\nexport class ElementOwnsUniqueAspect extends RelatedElement {\n public static classFullName = \"BisCore:ElementOwnsUniqueAspect\";\n public constructor(elementId: Id64String, relClassName: string = ElementOwnsUniqueAspect.classFullName) {\n super({ id: elementId, relClassName });\n }\n}\n\n/** Relates an [[Element]] and an [[ElementMultiAspect]] that it owns.\n * @public\n */\nexport class ElementOwnsMultiAspects extends RelatedElement {\n public static classFullName = \"BisCore:ElementOwnsMultiAspects\";\n public constructor(elementId: Id64String, relClassName: string = ElementOwnsMultiAspects.classFullName) {\n super({ id: elementId, relClassName });\n }\n}\n\n/** Relates an [[Element]] and an [[ExternalSourceAspect]] that it owns.\n * @public\n */\nexport class ElementOwnsExternalSourceAspects extends ElementOwnsMultiAspects {\n public static override classFullName = \"BisCore:ElementOwnsExternalSourceAspects\";\n public constructor(elementId: Id64String, relClassName: string = ElementOwnsExternalSourceAspects.classFullName) {\n super(elementId, relClassName);\n }\n}\n\n/** Relates an [[ExternalSource]] to the [[RepositoryLink]] that it is persisted in.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class ExternalSourceIsInRepository extends RelatedElement {\n public static classFullName = \"BisCore:ExternalSourceIsInRepository\";\n public constructor(repositoryId: Id64String, relClassName: string = ExternalSourceIsInRepository.classFullName) {\n super({ id: repositoryId, relClassName });\n }\n}\n\n/** Relates an [[ExternalSource]] to the [[RepositoryLink]] that it is persisted in.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class ExternalSourceAttachmentAttachesSource extends RelatedElement {\n public static classFullName = \"BisCore:ExternalSourceAttachmentAttachesSource\";\n public constructor(externalSourceId: Id64String, relClassName: string = ExternalSourceAttachmentAttachesSource.classFullName) {\n super({ id: externalSourceId, relClassName });\n }\n}\n\n/** Relates a [[SheetReference]] and [[Sheet]] that it refers.\n * @beta\n */\nexport class SheetReferenceRefersToSheet extends RelatedElement {\n public static classFullName = \"BisCore:SheetReferenceRefersToSheet\";\n public constructor(sheetId: Id64String, relClassName: string = SheetReferenceRefersToSheet.classFullName) {\n super({ id: sheetId, relClassName });\n }\n}\n\n/** Relates a [[SheetIndexReference]] to a [[SheetIndex]] it refers.\n * @beta\n */\nexport class SheetIndexReferenceRefersToSheetIndex extends RelatedElement {\n public static classFullName = \"BisCore:SheetIndexReferenceRefersToSheetIndex\";\n public constructor(sheetIndexId: Id64String, relClassName: string = SheetIndexReferenceRefersToSheetIndex.classFullName) {\n super({ id: sheetIndexId, relClassName });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"NavigationRelationship.js","sourceRoot":"","sources":["../../src/NavigationRelationship.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAMH,oDAAoE;AAEpE;;GAEG;AACH,MAAa,wBAAyB,SAAQ,4BAAc;IACnD,MAAM,CAAC,aAAa,GAAG,kCAAkC,CAAC;IACjE,YAAmB,QAAoB,EAAE,eAAuB,wBAAwB,CAAC,aAAa;QACpG,KAAK,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,CAAC;IACxC,CAAC;;AAJH,4DAKC;AAED;;GAEG;AACH,MAAa,mBAAoB,SAAQ,wBAAwB;IACxD,MAAM,CAAU,aAAa,GAAG,6BAA6B,CAAC;IACrE,YAAmB,QAAoB,EAAE,eAAuB,mBAAmB,CAAC,aAAa;QAC/F,KAAK,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAChC,CAA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YAAY,EAAE,CAAC,CAAC;IACvC,CAAC;;AAJH,kEAKC;AAED;;GAEG;AACH,MAAa,qCAAsC,SAAQ,4BAAc;IAChE,MAAM,CAAC,aAAa,GAAG,+CAA+C,CAAC;IAC9E,YAAmB,YAAwB,EAAE,eAAuB,qCAAqC,CAAC,aAAa;QACrH,KAAK,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC,CAAC;IAC5C,CAAC;;AAJH,sFAKC;AAED;;GAEG;AACH,MAAa,mCAAoC,SAAQ,wBAAwB;IACxE,MAAM,CAAU,aAAa,GAAG,6CAA6C,CAAC;IACrF,YAAmB,QAAoB,EAAE,YAAY,GAAG,mCAAmC,CAAC,aAAa;QACvG,KAAK,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAChC,CAAC;;AAJH,kFAKC;AAED;;;GAGG;AACH,MAAa,+BAAgC,SAAQ,uBAAuB;IACnE,MAAM,CAAU,aAAa,GAAG,yCAAyC,CAAC;IAEjF,YAAmB,OAAmB,EAAE,YAAY,GAAG,+BAA+B,CAAC,aAAa;QAClG,KAAK,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAC/B,CAAC;;AALH,0EAMC","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 Relationships\n */\n\n// NOTE: A NavigationRelationship is not an Entity, so is not registered in the ClassRegistry.\n// NOTE: It does, however, have a classFullName property for consistency with Entity subclasses.\n\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { RelatedElement, TypeDefinition } from \"@itwin/core-common\";\n\n/** Relates a parent Element to child Elements which represent parts of the Entity modeled by the parent Element.\n * @public\n */\nexport class ElementOwnsChildElements extends RelatedElement {\n public static classFullName = \"BisCore:ElementOwnsChildElements\";\n public constructor(parentId: Id64String, relClassName: string = ElementOwnsChildElements.classFullName) {\n super({ id: parentId, relClassName });\n }\n}\n\n/** Relates a parent [[Subject]] to [[Subject]] child elements.\n * @public\n */\nexport class SubjectOwnsSubjects extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:SubjectOwnsSubjects\";\n public constructor(parentId: Id64String, relClassName: string = SubjectOwnsSubjects.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[Subject]] to [[InformationPartitionElement]] child elements.\n * @public\n */\nexport class SubjectOwnsPartitionElements extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:SubjectOwnsPartitionElements\";\n public constructor(parentId: Id64String, relClassName: string = SubjectOwnsPartitionElements.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[Category]] to [[SubCategory]] child elements.\n * @public\n */\nexport class CategoryOwnsSubCategories extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:CategoryOwnsSubCategories\";\n public constructor(parentId: Id64String, relClassName: string = CategoryOwnsSubCategories.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[RenderMaterial]] to [[RenderMaterial]] child elements.\n * @public\n */\nexport class RenderMaterialOwnsRenderMaterials extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:RenderMaterialOwnsRenderMaterials\";\n public constructor(parentId: Id64String, relClassName: string = RenderMaterialOwnsRenderMaterials.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent Element to child Elements which represent **hidden** parts of the Entity.\n * @public\n */\nexport class ElementEncapsulatesElements extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:ElementEncapsulatesElements\";\n public constructor(parentId: Id64String, relClassName: string = ElementEncapsulatesElements.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[PhysicalElement]] to [[PhysicalElement]] children that it assembles.\n * @public\n */\nexport class PhysicalElementAssemblesElements extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:PhysicalElementAssemblesElements\";\n public constructor(parentId: Id64String, relClassName: string = PhysicalElementAssemblesElements.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[ExternalSource]] to its [[ExternalSourceAttachment]] children.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class ExternalSourceOwnsAttachments extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:ExternalSourceOwnsAttachments\";\n public constructor(parentId: Id64String, relClassName: string = ExternalSourceOwnsAttachments.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a parent [[FolderLink]] to its [[RepositoryLink]] children.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class FolderContainsRepositories extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:FolderContainsRepositories\";\n public constructor(parentId: Id64String, relClassName: string = FolderContainsRepositories.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a [[SheetIndexFolder]] to the [[SheetIndexEntry]]'s that it contains.\n * @beta\n */\nexport class SheetIndexFolderOwnsEntries extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:SheetIndexFolderOwnsEntries\";\n public constructor(parentId: Id64String, relClassName: string = SheetIndexFolderOwnsEntries.classFullName) {\n super(parentId, relClassName );\n }\n}\n\n/** Relates a [[SheetIndex]] to the [SheetIndexEntry]]'s that it contains.\n * @beta\n */\nexport class SheetIndexOwnsEntries extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:SheetIndexOwnsEntries\";\n public constructor(parentId: Id64String, relClassName: string = SheetIndexOwnsEntries.classFullName) {\n super(parentId, relClassName );\n }\n}\n\n/** Relates a [[GeometricElement2d]] to its [[TypeDefinitionElement]]\n * @public\n */\nexport class GeometricElement2dHasTypeDefinition extends TypeDefinition {\n public static classFullName = \"BisCore:GeometricElement2dHasTypeDefinition\";\n public constructor(id: Id64String, relClassName: string = GeometricElement2dHasTypeDefinition.classFullName) {\n super({ id, relClassName });\n }\n}\n\n/** Relates a [[GraphicalElement2d]] to its [[GraphicalType2d]]\n * @public\n */\nexport class GraphicalElement2dIsOfType extends GeometricElement2dHasTypeDefinition {\n public static override classFullName = \"BisCore:GraphicalElement2dIsOfType\";\n public constructor(id: Id64String, relClassName: string = GraphicalElement2dIsOfType.classFullName) {\n super(id, relClassName);\n }\n}\n\n/** Relates a [[GeometricElement3d]] to its [[TypeDefinitionElement]]\n * @public\n */\nexport class GeometricElement3dHasTypeDefinition extends TypeDefinition {\n public static classFullName = \"BisCore:GeometricElement3dHasTypeDefinition\";\n public constructor(id: Id64String, relClassName: string = GeometricElement3dHasTypeDefinition.classFullName) {\n super({ id, relClassName });\n }\n}\n\n/** Relates a [[SpatialLocationElement]] to its [[SpatialLocationType]]\n * @public\n */\nexport class SpatialLocationIsOfType extends GeometricElement3dHasTypeDefinition {\n public static override classFullName = \"BisCore:SpatialLocationIsOfType\";\n public constructor(id: Id64String, relClassName: string = SpatialLocationIsOfType.classFullName) {\n super(id, relClassName);\n }\n}\n\n/** Relates a [[PhysicalElement]] to its [[PhysicalType]]\n * @public\n */\nexport class PhysicalElementIsOfType extends GeometricElement3dHasTypeDefinition {\n public static override classFullName = \"BisCore:PhysicalElementIsOfType\";\n public constructor(id: Id64String, relClassName: string = PhysicalElementIsOfType.classFullName) {\n super(id, relClassName);\n }\n}\n\n/** Relates a [[PhysicalElement]] to its [[PhysicalMaterial]]\n * @public\n */\nexport class PhysicalElementIsOfPhysicalMaterial extends RelatedElement {\n public static classFullName = \"BisCore:PhysicalElementIsOfPhysicalMaterial\";\n public constructor(id: Id64String) {\n super({ id });\n }\n}\n\n/** Relates a [[PhysicalType]] to its [[PhysicalMaterial]]\n * @public\n */\nexport class PhysicalTypeIsOfPhysicalMaterial extends RelatedElement {\n public static classFullName = \"BisCore:PhysicalTypeIsOfPhysicalMaterial\";\n public constructor(id: Id64String) {\n super({ id });\n }\n}\n\n/** Relates an [[Element]] and an [[ElementUniqueAspect]] that it owns.\n * @public\n */\nexport class ElementOwnsUniqueAspect extends RelatedElement {\n public static classFullName = \"BisCore:ElementOwnsUniqueAspect\";\n public constructor(elementId: Id64String, relClassName: string = ElementOwnsUniqueAspect.classFullName) {\n super({ id: elementId, relClassName });\n }\n}\n\n/** Relates an [[Element]] and an [[ElementMultiAspect]] that it owns.\n * @public\n */\nexport class ElementOwnsMultiAspects extends RelatedElement {\n public static classFullName = \"BisCore:ElementOwnsMultiAspects\";\n public constructor(elementId: Id64String, relClassName: string = ElementOwnsMultiAspects.classFullName) {\n super({ id: elementId, relClassName });\n }\n}\n\n/** Relates an [[Element]] and an [[ExternalSourceAspect]] that it owns.\n * @public\n */\nexport class ElementOwnsExternalSourceAspects extends ElementOwnsMultiAspects {\n public static override classFullName = \"BisCore:ElementOwnsExternalSourceAspects\";\n public constructor(elementId: Id64String, relClassName: string = ElementOwnsExternalSourceAspects.classFullName) {\n super(elementId, relClassName);\n }\n}\n\n/** Relates an [[ExternalSource]] to the [[RepositoryLink]] that it is persisted in.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class ExternalSourceIsInRepository extends RelatedElement {\n public static classFullName = \"BisCore:ExternalSourceIsInRepository\";\n public constructor(repositoryId: Id64String, relClassName: string = ExternalSourceIsInRepository.classFullName) {\n super({ id: repositoryId, relClassName });\n }\n}\n\n/** Relates an [[ExternalSource]] to the [[RepositoryLink]] that it is persisted in.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @beta\n */\nexport class ExternalSourceAttachmentAttachesSource extends RelatedElement {\n public static classFullName = \"BisCore:ExternalSourceAttachmentAttachesSource\";\n public constructor(externalSourceId: Id64String, relClassName: string = ExternalSourceAttachmentAttachesSource.classFullName) {\n super({ id: externalSourceId, relClassName });\n }\n}\n\n/** Relates a [[SheetReference]] and [[Sheet]] that it refers.\n * @beta\n */\nexport class SheetReferenceRefersToSheet extends RelatedElement {\n public static classFullName = \"BisCore:SheetReferenceRefersToSheet\";\n public constructor(sheetId: Id64String, relClassName: string = SheetReferenceRefersToSheet.classFullName) {\n super({ id: sheetId, relClassName });\n }\n}\n\n/** Relates a [[SheetIndexReference]] to a [[SheetIndex]] it refers.\n * @beta\n */\nexport class SheetIndexReferenceRefersToSheetIndex extends RelatedElement {\n public static classFullName = \"BisCore:SheetIndexReferenceRefersToSheetIndex\";\n public constructor(sheetIndexId: Id64String, relClassName: string = SheetIndexReferenceRefersToSheetIndex.classFullName) {\n super({ id: sheetIndexId, relClassName });\n }\n}\n\n/** Relates a [[Subject]] to the [[ProjectInformationRecord]] that describes its project-level properties.\n * @beta\n */\nexport class SubjectOwnsProjectInformationRecord extends ElementOwnsChildElements {\n public static override classFullName = \"BisCore:SubjectOwnsProjectInformationRecord\";\n public constructor(parentId: Id64String, relClassName = SubjectOwnsProjectInformationRecord.classFullName) {\n super(parentId, relClassName);\n }\n}\n\n/** Relates a [[Sheet]] to the [[SheetInformationAspect]] that hosts its basic [SheetInformation]($common).\n * @see [[SheetInformationAspect.setSheetInformation]] to create an instance of this relationship.\n * @beta\n */\nexport class SheetOwnsSheetInformationAspect extends ElementOwnsUniqueAspect {\n public static override classFullName = \"BisCore:SheetOwnsSheetInformationAspect\";\n\n public constructor(sheetId: Id64String, relClassName = SheetOwnsSheetInformationAspect.classFullName) {\n super(sheetId, relClassName);\n }\n}\n"]}
|
|
@@ -368,6 +368,11 @@ export declare class Relationships {
|
|
|
368
368
|
updateInstance(props: RelationshipProps): void;
|
|
369
369
|
/** Delete an Relationship instance from this iModel. */
|
|
370
370
|
deleteInstance(props: RelationshipProps): void;
|
|
371
|
+
/** Delete multiple Relationship instances from this iModel.
|
|
372
|
+
* @param props The properties of the relationship instances to delete.
|
|
373
|
+
* @remarks This method handles bulk deletion of relationships and supports mixed collections containing instances from different relationship classes.
|
|
374
|
+
*/
|
|
375
|
+
deleteInstances(props: ReadonlyArray<RelationshipProps>): void;
|
|
371
376
|
/** Get the props of a Relationship instance
|
|
372
377
|
* @param relClassFullName The full class name of the relationship in the form of "schema:class"
|
|
373
378
|
* @param criteria Either the relationship instanceId or the source and target Ids
|
|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,cAAc,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;IAIrD;;;OAGG;IACI,eAAe,CAAC,KAAK,EAAE,aAAa,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAIrE;;;;;OAKG;IACI,gBAAgB,CAAC,CAAC,SAAS,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,GAAG,eAAe,GAAG,CAAC;IAQzH;;;;;;OAMG;IACI,mBAAmB,CAAC,CAAC,SAAS,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,GAAG,eAAe,GAAG,CAAC,GAAG,SAAS;IAsBxI;;;;;OAKG;IACI,WAAW,CAAC,CAAC,SAAS,YAAY,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,GAAG,eAAe,GAAG,CAAC;IAI9G;;;;;;OAMG;IACI,cAAc,CAAC,CAAC,SAAS,YAAY,EAAE,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,GAAG,eAAe,GAAG,CAAC,GAAG,SAAS;CAI/H"}
|
package/lib/cjs/Relationship.js
CHANGED
|
@@ -440,6 +440,13 @@ class Relationships {
|
|
|
440
440
|
deleteInstance(props) {
|
|
441
441
|
this._iModel[Symbols_1._nativeDb].deleteLinkTableRelationship(props);
|
|
442
442
|
}
|
|
443
|
+
/** Delete multiple Relationship instances from this iModel.
|
|
444
|
+
* @param props The properties of the relationship instances to delete.
|
|
445
|
+
* @remarks This method handles bulk deletion of relationships and supports mixed collections containing instances from different relationship classes.
|
|
446
|
+
*/
|
|
447
|
+
deleteInstances(props) {
|
|
448
|
+
this._iModel[Symbols_1._nativeDb].deleteLinkTableRelationships(props);
|
|
449
|
+
}
|
|
443
450
|
/** Get the props of a Relationship instance
|
|
444
451
|
* @param relClassFullName The full class name of the relationship in the form of "schema:class"
|
|
445
452
|
* @param criteria Either the relationship instanceId or the source and target Ids
|