@itwin/core-backend 5.0.0-dev.83 → 5.0.0-dev.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/Element.d.ts +0 -1
- package/lib/cjs/Element.d.ts.map +1 -1
- package/lib/cjs/Element.js +0 -1
- package/lib/cjs/Element.js.map +1 -1
- package/lib/cjs/TextAnnotationGeometry.d.ts.map +1 -1
- package/lib/cjs/TextAnnotationGeometry.js +38 -11
- package/lib/cjs/TextAnnotationGeometry.js.map +1 -1
- package/lib/cjs/TextAnnotationLayout.d.ts +4 -0
- package/lib/cjs/TextAnnotationLayout.d.ts.map +1 -1
- package/lib/cjs/TextAnnotationLayout.js +26 -6
- package/lib/cjs/TextAnnotationLayout.js.map +1 -1
- package/package.json +13 -13
package/lib/cjs/Element.d.ts
CHANGED
|
@@ -461,7 +461,6 @@ export declare abstract class InformationReferenceElement extends InformationCon
|
|
|
461
461
|
protected constructor(props: ElementProps, iModel: IModelDb);
|
|
462
462
|
}
|
|
463
463
|
/** A Subject is an information element that describes what this repository (or part thereof) is about.
|
|
464
|
-
* See [how to create a Subject element]($docs/learning/backend/CreateElements.md#Subject).
|
|
465
464
|
* @public
|
|
466
465
|
*/
|
|
467
466
|
export declare class Subject extends InformationReferenceElement {
|
package/lib/cjs/Element.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Element.d.ts","sourceRoot":"","sources":["../../src/Element.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAqB,UAAU,EAAQ,OAAO,EAAE,UAAU,EAA+B,MAAM,qBAAqB,CAAC;AAC5H,OAAO,EACL,gBAAgB,EAAe,IAAI,EAAE,cAAc,EAAY,mBAAmB,EAAE,sBAAsB,EAAE,mBAAmB,EAC/H,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,qBAAqB,EAC3E,iBAAiB,EAAE,mB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Ac,CAAC,WAAW,CAAC;IAE/C,SAAS,aAAa,KAAK,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ;WAMpD,QAAQ,CAAC,KAAK,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,GAAG,cAAc;IAIpE,MAAM,IAAI,mBAAmB;IAS7C,OAAO,CAAC,MAAM,CAAC,gBAAgB;cAQZ,mBAAmB,CAAC,GAAG,EAAE,kBAAkB,GAAG,IAAI;IAMrE,aAAa;qBACa,QAAQ,CAAC,OAAO,EAAE,yBAAyB,EAAE,WAAW,EAAE,mBAAmB,EAAE,WAAW,EAAE,mBAAmB,GAAG,IAAI;IAMhJ;;OAEG;WACW,WAAW,CAAC,OAAO,EAAE,yBAAyB,EAAE,KAAK,EAAE,cAAc,CAAC,WAAW,GAAG,cAAc,CAAC,WAAW;CA2B7H"}
|
package/lib/cjs/Element.js
CHANGED
|
@@ -554,7 +554,6 @@ class InformationReferenceElement extends InformationContentElement {
|
|
|
554
554
|
}
|
|
555
555
|
exports.InformationReferenceElement = InformationReferenceElement;
|
|
556
556
|
/** A Subject is an information element that describes what this repository (or part thereof) is about.
|
|
557
|
-
* See [how to create a Subject element]($docs/learning/backend/CreateElements.md#Subject).
|
|
558
557
|
* @public
|
|
559
558
|
*/
|
|
560
559
|
class Subject extends InformationReferenceElement {
|
package/lib/cjs/Element.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Element.js","sourceRoot":"","sources":["../../src/Element.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;AAEH,sDAA4H;AAC5H,oDAO4B;AAC5B,wDAAsE;AACtE,qCAAkC;AAGlC,mCAA4F;AAC5F,qEAA+D;AAC/D,gDAAwE;AAuExE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAa,OAAQ,SAAQ,eAAM;IAC1B,MAAM,KAAc,SAAS,KAAa,OAAO,SAAS,CAAC,CAAC,CAAC;IACpE,gBAAg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AAC;oBACvD,IAAI,mBAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;wBACxB,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;gBAChC,CAAC;gBAED,OAAO,CAAC,UAAU,GAAG,gCAAiB,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YACjE,CAAC;QACH,CAAC;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;CACF;AA/ED,wCA+EC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Elements\n */\n\nimport { CompressedId64Set, GuidString, Id64, Id64Set, Id64String, JsonUtils, OrderedId64Array } from \"@itwin/core-bentley\";\nimport {\n AxisAlignedBox3d, BisCodeSpec, Code, CodeScopeProps, CodeSpec, ConcreteEntityTypes, DefinitionElementProps, ElementAlignedBox3d,\n ElementProps, EntityMetaData, EntityReferenceSet, GeometricElement2dProps, GeometricElement3dProps, GeometricElementProps,\n GeometricModel2dProps, GeometricModel3dProps, GeometryPartProps, GeometryStreamProps, IModel, InformationPartitionElementProps, LineStyleProps,\n ModelProps, PhysicalElementProps, PhysicalTypeProps, Placement2d, Placement3d, RelatedElement, RenderSchedule, RenderTimelineProps,\n RepositoryLinkProps, SectionDrawingLocationProps, SectionDrawingProps, SectionType, SheetBorderTemplateProps,\n SheetProps, SheetTemplateProps, SubjectProps, TypeDefinition, TypeDefinitionElementProps, UrlLinkProps,\n} from \"@itwin/core-common\";\nimport { ClipVector, Range3d, Transform } from \"@itwin/core-geometry\";\nimport { Entity } from \"./Entity\";\nimport { IModelDb } from \"./IModelDb\";\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\nimport { DefinitionModel, DrawingModel, PhysicalModel, SectionDrawingModel } from \"./Model\";\nimport { SubjectOwnsSubjects } from \"./NavigationRelationship\";\nimport { _elementWasCreated, _verifyChannel } from \"./internal/Symbols\";\n\n/** Argument for the `Element.onXxx` static methods\n * @beta\n */\nexport interface OnElementArg {\n /** The iModel for the Element affected by this method. */\n iModel: IModelDb;\n}\n\n/** Argument for `Element.onInsert` and `Element.onUpdate` static methods.\n * @beta\n */\nexport interface OnElementPropsArg extends OnElementArg {\n /** The properties of the Element affected by this method.\n * @note the properties may be modified. If so the modified values will be inserted/updated.\n */\n props: ElementProps;\n}\n\n/** Argument for the `Element.onXxx` static methods that notify of operations to an existing Element supplying its Id, ModelId and FederationGuid.\n * @beta\n */\nexport interface OnElementIdArg extends OnElementArg {\n /** The Id of the Element affected by this method */\n id: Id64String;\n /** The ModelId of the element affected by this method */\n model: Id64String;\n /** The federationGuid of the element affected by this method */\n federationGuid: GuidString;\n}\n\n/** Argument for the `Element.onChildXxx` static methods\n * @beta\n */\nexport interface OnChildElementArg extends OnElementArg {\n parentId: Id64String;\n}\n\n/** Argument for the `Element.onChildXxx` static methods that supply the properties of the child Element to be inserted or updated.\n * @beta\n */\nexport interface OnChildElementPropsArg extends OnChildElementArg {\n /** The new properties of the child Element for this method. */\n childProps: Readonly<ElementProps>;\n}\n\n/** Argument for the `Element.onChildXxx` static methods that only supply the Id of the child Element.\n * @beta\n */\nexport interface OnChildElementIdArg extends OnChildElementArg {\n /** The Id of the child element for this method */\n childId: Id64String;\n}\n\n/** Argument for the `Element.onSubModelInsert` static method\n * @beta\n */\nexport interface OnSubModelPropsArg extends OnElementArg {\n /** The properties of the prospective sub-model */\n subModelProps: ModelProps;\n}\n\n/** Argument for several `Element.onSubModelXxx` static methods\n * @beta\n */\nexport interface OnSubModelIdArg extends OnElementArg {\n /** The modelId of the sub Model */\n subModelId: Id64String;\n}\n\n/** The smallest individually identifiable building block for modeling the real world in an iModel.\n * Each element represents an [[Entity]] in the real world. Sets of Elements (contained in [[Model]]s) are used to model\n * other Elements that represent larger scale real world entities. Using this recursive modeling strategy,\n * Elements can represent entities at any scale. Elements can represent physical things or abstract concepts\n * or simply be information records.\n *\n * Every Element has a 64-bit id (inherited from Entity) that uniquely identifies it within an iModel. Every Element also\n * has a [[code]] that identifies its meaning in the real world. Additionally, Elements may have a [[federationGuid]]\n * to hold a GUID, if the element was assigned that GUID by some other federated database. The iModel database enforces\n * uniqueness of id, code, and federationGuid.\n *\n * The Element class provides `static` methods like [[onInsert]], [[onUpdated]], [[onCloned]], and [[onChildAdded]] that enable\n * it to customize persistence operations. For example, the base implementations of [[onInsert]], [[onUpdate]], and [[onDelete]]\n * validate that the appropriate [locks]($docs/learning/backend/ConcurrencyControl.md), [codes]($docs/learning/backend/CodeService.md),\n * and [channel permissions]($docs/learning/backend/Channel.md) are obtained before a change to the element is written to the iModel.\n * A subclass of Element that overrides any of these methods **must** call the `super` method as well. An application that supplies its\n * own Element subclasses should register them at startup via [[ClassRegistry.registerModule]] or [[ClassRegistry.register]].\n *\n * See:\n * * [Element Fundamentals]($docs/bis/guide/fundamentals/element-fundamentals.md)\n * * [Working with schemas and elements in TypeScript]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\n * * [Creating elements]($docs/learning/backend/CreateElements.md)\n * @public\n */\nexport class Element extends Entity {\n public static override get className(): string { return \"Element\"; }\n /** @internal */\n public static override get protectedOperations() { return [\"onInsert\", \"onUpdate\", \"onDelete\"]; }\n\n /** The ModelId of the [Model]($docs/bis/guide/fundamentals/model-fundamentals.md) containing this element */\n public readonly model: Id64String;\n /** The [Code]($docs/bis/guide/fundamentals/codes.md) for this element */\n public code: Code;\n /** The parent element, if present, of this element. */\n public parent?: RelatedElement;\n /** A [FederationGuid]($docs/bis/guide/fundamentals/element-fundamentals.md#federationguid) assigned to this element by some other federated database */\n public federationGuid?: GuidString;\n /** A [user-assigned label]($docs/bis/guide/fundamentals/element-fundamentals.md#userlabel) for this element. */\n public userLabel?: string;\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this element. */\n public readonly jsonProperties: { [key: string]: any };\n\n protected constructor(props: ElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.code = Code.fromJSON(props.code); // TODO: Validate props.code - don't silently fail if it is the wrong type\n this.model = RelatedElement.idFromJson(props.model);\n this.parent = RelatedElement.fromJSON(props.parent);\n this.federationGuid = props.federationGuid;\n this.userLabel = props.userLabel;\n this.jsonProperties = { ...props.jsonProperties }; // make sure we have our own copy\n }\n\n /** Called before a new Element is inserted.\n * @note throw an exception to disallow the insert\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element to be inserted\n * @beta\n */\n protected static onInsert(arg: OnElementPropsArg): void {\n const { iModel, props } = arg;\n const operation = \"insert\";\n iModel.channels[_verifyChannel](arg.props.model);\n iModel.locks.checkSharedLock(props.model, \"model\", operation); // inserting requires shared lock on model\n if (props.parent) // inserting requires shared lock on parent, if present\n iModel.locks.checkSharedLock(props.parent.id, \"parent\", operation);\n iModel.codeService?.verifyCode(arg);\n }\n\n /** Called after a new Element was inserted.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element that was inserted\n * @beta\n */\n protected static onInserted(arg: OnElementIdArg): void {\n const locks = arg.iModel.locks;\n if (locks && !locks.holdsExclusiveLock(arg.model))\n locks[_elementWasCreated](arg.id);\n }\n\n /** Called before an Element is updated.\n * @note throw an exception to disallow the update\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element to be updated\n * @beta\n */\n protected static onUpdate(arg: OnElementPropsArg): void {\n const { iModel, props } = arg;\n iModel.channels[_verifyChannel](props.model);\n iModel.locks.checkExclusiveLock(props.id!, \"element\", \"update\"); // eslint-disable-line @typescript-eslint/no-non-null-assertion\n iModel.codeService?.verifyCode(arg);\n }\n\n /** Called after an Element was updated.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element that was updated\n * @beta\n */\n protected static onUpdated(_arg: OnElementIdArg): void { }\n\n /** Called before an Element is deleted.\n * @note throw an exception to disallow the delete\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element to be deleted\n * @beta\n */\n protected static onDelete(arg: OnElementIdArg): void {\n arg.iModel.channels[_verifyChannel](arg.model);\n arg.iModel.locks.checkExclusiveLock(arg.id, \"element\", \"delete\");\n }\n\n /** Called after an Element was deleted.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element that was deleted\n * @beta\n */\n protected static onDeleted(_arg: OnElementIdArg): void { }\n\n /** Called when an element with an instance of this class as its parent is about to be deleted.\n * @note throw an exception if the element should not be deleted\n * @note implementers should not presume that the element was deleted if this method does not throw,\n * since the delete may fail for other reasons. Instead, rely on [[onChildDeleted]] for that purpose.\n * @note `this` is the class of the parent Element whose child will be deleted\n * @beta\n */\n protected static onChildDelete(_arg: OnChildElementIdArg): void { }\n\n /** Called after an element with an instance of this class as its parent was successfully deleted.\n * @note `this` is the class of the parent Element whose child was deleted\n * @beta\n */\n protected static onChildDeleted(_arg: OnChildElementIdArg): void { }\n\n /** Called when a *new element* with an instance of this class as its parent is about to be inserted.\n * @note throw an exception if the element should not be inserted\n * @note `this` is the class of the prospective parent Element.\n * @beta\n */\n protected static onChildInsert(_arg: OnChildElementPropsArg): void { }\n\n /** Called after a *new element* with an instance of this class as its parent was inserted.\n * @note `this` is the class of the parent Element.\n * @beta\n */\n protected static onChildInserted(_arg: OnChildElementIdArg): void { }\n\n /** Called when an element with an instance of this class as its parent is about to be updated.\n * @note throw an exception if the element should not be updated\n * @note `this` is the class of the parent Element.\n * @beta\n */\n protected static onChildUpdate(_arg: OnChildElementPropsArg): void { }\n\n /** Called after an element with an instance of this the class as its parent was updated.\n * @note `this` is the class of the parent Element.\n * @beta\n */\n protected static onChildUpdated(_arg: OnChildElementIdArg): void { }\n\n /** Called when an *existing element* is about to be updated so that an instance of this class will become its new parent.\n * @note throw an exception if the element should not be added\n * @note `this` is the class of the prospective parent Element.\n * @beta\n */\n protected static onChildAdd(_arg: OnChildElementPropsArg): void { }\n\n /** Called after an *existing element* has been updated so that an instance of this class is its new parent.\n * @note `this` is the class of the new parent Element.\n * @beta\n */\n protected static onChildAdded(_arg: OnChildElementIdArg): void { }\n\n /** Called when an element with an instance of this class as its parent is about to be updated change to a different parent.\n * @note throw an exception if the element should not be dropped\n * @note `this` is the class of the parent Element.\n * @beta\n */\n protected static onChildDrop(_arg: OnChildElementIdArg): void { }\n\n /** Called after an element with an instance of this class as its previous parent was updated to have a new parent.\n * @note `this` is the class of the previous parent Element.\n * @beta\n */\n protected static onChildDropped(_arg: OnChildElementIdArg): void { }\n\n /** Called when an instance of this class is being *sub-modeled* by a new Model.\n * @note throw an exception if model should not be inserted\n * @note `this` is the class of Element to be sub-modeled.\n * @beta\n */\n protected static onSubModelInsert(_arg: OnSubModelPropsArg): void { }\n\n /** Called after an instance of this class was *sub-modeled* by a new Model.\n * @note `this` is the class of Element that is now sub-modeled.\n * @beta\n */\n protected static onSubModelInserted(_arg: OnSubModelIdArg): void { }\n\n /** Called when a sub-model of an instance of this class is being deleted.\n * @note throw an exception if model should not be deleted\n * @note `this` is the class of Element that is sub-modeled.\n * @beta\n */\n protected static onSubModelDelete(_arg: OnSubModelIdArg): void { }\n\n /** Called after a sub-model of an instance of this class was deleted.\n * @note `this` is the class of Element that was sub-modeled.\n * @beta\n */\n protected static onSubModelDeleted(_arg: OnSubModelIdArg): void { }\n\n /** Called during the iModel transformation process after an Element from the source iModel was *cloned* for the target iModel.\n * The transformation process automatically handles remapping BisCore properties and those that are properly described in ECSchema.\n * This callback is only meant to be overridden if there are other Ids in non-standard locations that need to be remapped or other data that needs to be fixed up after the clone.\n * @param _context The context that persists any remapping between the source iModel and target iModel.\n * @param _sourceProps The ElementProps for the source Element that was cloned.\n * @param _targetProps The ElementProps that are a result of the clone. These can be further modified.\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onCloned(_context: IModelElementCloneContext, _sourceProps: ElementProps, _targetProps: ElementProps): void { }\n\n /** Called when a *root* element in a subgraph is changed and before its outputs are processed.\n * This special callback is made when:\n * * the element is part of an [[ElementDrivesElement]] graph, and\n * * the element has no inputs, and\n * * none of the element's outputs have been processed.\n * @see [[ElementDrivesElement]] for more on element dependency graphs.\n * @beta\n */\n protected static onBeforeOutputsHandled(_id: Id64String, _iModel: IModelDb): void { }\n\n /** Called on an element in a graph after all of its inputs have been processed and before its outputs are processed.\n * This callback is made when:\n * * the specified element is part of an [[ElementDrivesElement]] graph, and\n * * there was a direct change to some element upstream in the dependency graph.\n * * all upstream elements in the graph have been processed.\n * * none of the downstream elements have been processed.\n * This method is not called if none of the element's inputs were changed.\n * @see [[ElementDrivesElement]] for more on element dependency graphs.\n * @beta\n */\n protected static onAllInputsHandled(_id: Id64String, _iModel: IModelDb): void { }\n\n public override toJSON(): ElementProps {\n const val = super.toJSON() as ElementProps;\n\n if (Code.isValid(this.code))\n val.code = this.code;\n\n val.model = this.model;\n if (undefined !== this.userLabel) // NOTE: blank string should be included in JSON\n val.userLabel = this.userLabel;\n if (this.federationGuid)\n val.federationGuid = this.federationGuid;\n if (this.parent)\n val.parent = this.parent;\n\n if (Object.keys(this.jsonProperties).length > 0)\n val.jsonProperties = this.jsonProperties;\n\n return val;\n }\n\n /** Collect the Ids of this element's *references* at this level of the class hierarchy.\n * @deprecated in 3.x. use [[collectReferenceIds]] instead, the use of the term *predecessors* was confusing and became inaccurate when the transformer could handle cycles\n * @beta\n */\n protected collectPredecessorIds(predecessorIds: EntityReferenceSet): void {\n return this.collectReferenceIds(predecessorIds);\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addModel(this.model); // The modeledElement is a reference\n if (this.code.scope && Id64.isValidId64(this.code.scope))\n referenceIds.addElement(this.code.scope); // The element that scopes the code is a reference\n if (this.parent)\n referenceIds.addElement(this.parent.id); // A parent element is a reference\n }\n\n /** Get the Ids of this element's *references*. A *reference* is any element whose id is stored in the EC data of this element\n * This is important for cloning operations but can be useful in other situations as well.\n * @beta\n * @deprecated in 3.x. use [[getReferenceIds]] instead, the use of the term *predecessors* was confusing and became inaccurate when the transformer could handle cycles\n */\n public getPredecessorIds(): Id64Set {\n return this.getReferenceIds();\n }\n\n /** A *required reference* is an element that had to be inserted before this element could have been inserted.\n * This is the list of property keys on this element that store references to those elements\n * @note This should be overridden (with `super` called) at each level of the class hierarchy that introduces required references.\n * @note any property listed here must be added to the reference ids in [[collectReferenceIds]]\n * @beta\n */\n public static readonly requiredReferenceKeys: ReadonlyArray<string> = [\"parent\", \"model\"];\n\n /** A map of every [[requiredReferenceKeys]] on this class to their entity type.\n * @note This should be overridden (with `super` called) at each level of the class hierarchy that introduces required references.\n * @alpha\n */\n public static readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n parent: ConcreteEntityTypes.Element,\n model: ConcreteEntityTypes.Model,\n };\n\n /** Get the class metadata for this element. */\n public getClassMetaData(): EntityMetaData | undefined { return this.iModel.classMetaDataRegistry.find(this.classFullName); }\n\n private getAllUserProperties(): any {\n if (!this.jsonProperties.UserProps)\n this.jsonProperties.UserProps = new Object();\n\n return this.jsonProperties.UserProps;\n }\n\n /** Get a set of JSON user properties by namespace */\n public getUserProperties(namespace: string) { return this.getAllUserProperties()[namespace]; }\n\n /** Change a set of user JSON properties of this Element by namespace. */\n public setUserProperties(nameSpace: string, value: any) { this.getAllUserProperties()[nameSpace] = value; }\n\n /** Remove a set of JSON user properties, specified by namespace, from this Element */\n public removeUserProperties(nameSpace: string) { delete this.getAllUserProperties()[nameSpace]; }\n\n /** Get a JSON property of this element, by namespace */\n public getJsonProperty(nameSpace: string): any { return this.jsonProperties[nameSpace]; }\n public setJsonProperty(nameSpace: string, value: any) { this.jsonProperties[nameSpace] = value; }\n\n /** Get a display label for this Element. By default returns userLabel if present, otherwise code value. */\n public getDisplayLabel(): string { return this.userLabel ?? this.code.value; }\n\n /** Get a list of HTML strings that describe this Element for the tooltip. Strings will be listed on separate lines in the tooltip.\n * Any instances of the pattern `%{tag}` will be replaced by the localized value of tag.\n */\n public getToolTipMessage(): string[] {\n const addKey = (key: string) => `<b>%{iModelJs:Element.${key}}:</b> `; // %{iModelJs:Element.xxx} is replaced with localized value of xxx in frontend.\n const msg: string[] = [];\n const display = this.getDisplayLabel();\n msg.push(display ? display : `${addKey(\"Id\") + this.id}, ${addKey(\"Type\")}${this.className}`);\n\n if (this instanceof GeometricElement)\n msg.push(addKey(\"Category\") + this.iModel.elements.getElement(this.category).getDisplayLabel());\n\n msg.push(addKey(\"Model\") + this.iModel.elements.getElement(this.model).getDisplayLabel());\n return msg;\n }\n\n /**\n * Insert this Element into the iModel.\n * @see [[IModelDb.Elements.insertElement]]\n * @note For convenience, the value of `this.id` is updated to reflect the resultant element's id.\n * However when `this.federationGuid` is not present or undefined, a new Guid will be generated and stored on the resultant element. But\n * the value of `this.federationGuid` is *not* updated. Generally, it is best to re-read the element after inserting (e.g. via [[IModelDb.Elements.getElement]])\n * if you intend to continue working with it. That will ensure its values reflect the persistent state.\n */\n public insert() {\n return this.id = this.iModel.elements.insertElement(this.toJSON());\n }\n /** Update this Element in the iModel. */\n public update() { this.iModel.elements.updateElement(this.toJSON()); }\n /** Delete this Element from the iModel. */\n public delete() { this.iModel.elements.deleteElement(this.id); }\n}\n\n/** An abstract base class to model real world entities that intrinsically have geometry.\n * @public\n */\nexport abstract class GeometricElement extends Element {\n public static override get className(): string { return \"GeometricElement\"; }\n /** The Id of the [[Category]] for this GeometricElement. */\n public category: Id64String;\n /** The GeometryStream for this GeometricElement. */\n public geom?: GeometryStreamProps;\n /** The origin, orientation, and bounding box of this GeometricElement. */\n public abstract get placement(): Placement2d | Placement3d;\n\n protected constructor(props: GeometricElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.category = Id64.fromJSON(props.category);\n this.geom = props.geom;\n }\n\n /** Type guard for instanceof [[GeometricElement3d]] */\n public is3d(): this is GeometricElement3d { return this instanceof GeometricElement3d; }\n /** Type guard for instanceof [[GeometricElement2d]] */\n public is2d(): this is GeometricElement2d { return this instanceof GeometricElement2d; }\n /** Get the [Transform]($geometry) from the Placement of this GeometricElement */\n public getPlacementTransform(): Transform { return this.placement.transform; }\n public calculateRange3d(): AxisAlignedBox3d { return this.placement.calculateRange(); }\n\n public override toJSON(): GeometricElementProps {\n const val = super.toJSON() as GeometricElementProps;\n val.category = this.category;\n if (this.geom)\n val.geom = this.geom;\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.category);\n // TODO: GeometryPartIds?\n }\n\n /** @beta */\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"category\"];\n /** @alpha */\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n ...super.requiredReferenceKeyTypeMap,\n category: ConcreteEntityTypes.Element,\n };\n}\n\n/** An abstract base class to model real world entities that intrinsically have 3d geometry.\n * See [how to create a GeometricElement3d]($docs/learning/backend/CreateElements.md#GeometricElement3d).\n * @public\n */\nexport abstract class GeometricElement3d extends GeometricElement {\n public static override get className(): string { return \"GeometricElement3d\"; }\n public placement: Placement3d;\n public typeDefinition?: TypeDefinition;\n\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) {\n super(props, iModel);\n this.placement = Placement3d.fromJSON(props.placement);\n if (props.typeDefinition)\n this.typeDefinition = TypeDefinition.fromJSON(props.typeDefinition);\n }\n\n public override toJSON(): GeometricElement3dProps {\n const val = super.toJSON() as GeometricElement3dProps;\n val.placement = this.placement;\n if (undefined !== this.typeDefinition)\n val.typeDefinition = this.typeDefinition;\n\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.typeDefinition)\n referenceIds.addElement(this.typeDefinition.id);\n }\n}\n\n/** A 3d Graphical Element\n * @public\n */\nexport abstract class GraphicalElement3d extends GeometricElement3d {\n public static override get className(): string { return \"GraphicalElement3d\"; }\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** An abstract base class to model information entities that intrinsically have 2d geometry.\n * @public\n */\nexport abstract class GeometricElement2d extends GeometricElement {\n public static override get className(): string { return \"GeometricElement2d\"; }\n public placement: Placement2d;\n public typeDefinition?: TypeDefinition;\n\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) {\n super(props, iModel);\n this.placement = Placement2d.fromJSON(props.placement);\n if (props.typeDefinition)\n this.typeDefinition = TypeDefinition.fromJSON(props.typeDefinition);\n }\n\n public override toJSON(): GeometricElement2dProps {\n const val = super.toJSON() as GeometricElement2dProps;\n val.placement = this.placement;\n if (undefined !== this.typeDefinition)\n val.typeDefinition = this.typeDefinition;\n\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.typeDefinition)\n referenceIds.addElement(this.typeDefinition.id);\n }\n}\n\n/** An abstract base class for 2d Geometric Elements that are used to convey information within graphical presentations (like drawings).\n * @public\n */\nexport abstract class GraphicalElement2d extends GeometricElement2d {\n public static override get className(): string { return \"GraphicalElement2d\"; }\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** 2d element used to annotate drawings and sheets.\n * @public\n */\nexport class AnnotationElement2d extends GraphicalElement2d {\n public static override get className(): string { return \"AnnotationElement2d\"; }\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** 2d element used to persist graphics for use in drawings.\n * @public\n */\nexport class DrawingGraphic extends GraphicalElement2d {\n public static override get className(): string { return \"DrawingGraphic\"; }\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** An Element that occupies real world space. Its coordinates are in the project space of its iModel.\n * @public\n */\nexport abstract class SpatialElement extends GeometricElement3d {\n public static override get className(): string { return \"SpatialElement\"; }\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** An Element that is spatially located, has mass, and can be *touched*.\n * @public\n */\nexport abstract class PhysicalElement extends SpatialElement {\n public static override get className(): string { return \"PhysicalElement\"; }\n /** If defined, the [[PhysicalMaterial]] that makes up this PhysicalElement. */\n public physicalMaterial?: RelatedElement;\n protected constructor(props: PhysicalElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.physicalMaterial = RelatedElement.fromJSON(props.physicalMaterial);\n }\n\n public override toJSON(): PhysicalElementProps {\n const val = super.toJSON() as PhysicalElementProps;\n val.physicalMaterial = this.physicalMaterial?.toJSON();\n return val;\n }\n}\n\n/** Identifies a *tracked* real world location but has no mass and cannot be *touched*.\n * @public\n */\nexport abstract class SpatialLocationElement extends SpatialElement {\n public static override get className(): string { return \"SpatialLocationElement\"; }\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A Volume Element is a Spatial Location Element that is restricted to defining a volume.\n * @public\n */\nexport class VolumeElement extends SpatialLocationElement {\n public static override get className(): string { return \"VolumeElement\"; }\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A SectionDrawingLocation element identifies the location of a [[SectionDrawing]] in the context of a [[SpatialModel]],\n * enabling [HyperModeling]($hypermodeling).\n * @note The associated ECClass was added to the BisCore schema in version 1.0.11.\n * @public\n */\nexport class SectionDrawingLocation extends SpatialLocationElement {\n /** The Id of the [[ViewDefinition]] to which this location refers. */\n public sectionView: RelatedElement;\n\n public static override get className(): string { return \"SectionDrawingLocation\"; }\n\n public constructor(props: SectionDrawingLocationProps, iModel: IModelDb) {\n super(props, iModel);\n this.sectionView = RelatedElement.fromJSON(props.sectionView) ?? RelatedElement.none;\n }\n\n public override toJSON(): SectionDrawingLocationProps {\n return {\n ...super.toJSON(),\n sectionView: this.sectionView.toJSON(),\n };\n }\n}\n\n/** Information Content Element is an abstract base class for modeling pure information entities. Only the\n * core framework should directly subclass from Information Content Element. Domain and application developers\n * should start with the most appropriate subclass of Information Content Element.\n * @public\n */\nexport abstract class InformationContentElement extends Element {\n public static override get className(): string { return \"InformationContentElement\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** Element used in conjunction with bis:ElementDrivesElement relationships to bundle multiple inputs before\n * driving the output element.\n * @beta\n */\nexport abstract class DriverBundleElement extends InformationContentElement {\n public static override get className(): string { return \"DriverBundleElement\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** Information Reference is an abstract base class for modeling entities whose main purpose is to reference something else.\n * @public\n */\nexport abstract class InformationReferenceElement extends InformationContentElement {\n public static override get className(): string { return \"InformationReferenceElement\"; }\n\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A Subject is an information element that describes what this repository (or part thereof) is about.\n * See [how to create a Subject element]($docs/learning/backend/CreateElements.md#Subject).\n * @public\n */\nexport class Subject extends InformationReferenceElement {\n public static override get className(): string { return \"Subject\"; }\n public description?: string;\n protected constructor(props: SubjectProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n }\n\n public override toJSON(): SubjectProps { // This override only specializes the return type\n return super.toJSON() as SubjectProps; // Entity.toJSON takes care of auto-handled properties\n }\n /** Create a Code for a Subject given a name that is meant to be unique within the scope of its parent Subject.\n * @param iModelDb The IModelDb\n * @param parentSubjectId The Id of the parent Subject that provides the scope for names of its child Subjects.\n * @param codeValue The child Subject name\n */\n public static createCode(iModelDb: IModelDb, parentSubjectId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.subject);\n return new Code({ spec: codeSpec.id, scope: parentSubjectId, value: codeValue });\n }\n /** Create a Subject\n * @param iModelDb The IModelDb\n * @param parentSubjectId The new Subject will be a child of this Subject\n * @param name The name (codeValue) of the Subject\n * @param description The optional description of the Subject\n * @returns The newly constructed Subject\n * @throws [[IModelError]] if there is a problem creating the Subject\n */\n public static create(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, description?: string): Subject {\n const subjectProps: SubjectProps = {\n classFullName: this.classFullName,\n model: IModel.repositoryModelId,\n parent: new SubjectOwnsSubjects(parentSubjectId),\n code: this.createCode(iModelDb, parentSubjectId, name),\n description,\n };\n return new Subject(subjectProps, iModelDb);\n }\n\n /** Insert a Subject\n * @param iModelDb Insert into this IModelDb\n * @param parentSubjectId The new Subject will be inserted as a child of this Subject\n * @param name The name (codeValue) of the Subject\n * @param description The optional description of the Subject\n * @returns The Id of the newly inserted Subject\n * @throws [[IModelError]] if there is a problem inserting the Subject\n */\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, description?: string): Id64String {\n const subject = this.create(iModelDb, parentSubjectId, name, description);\n return iModelDb.elements.insertElement(subject.toJSON());\n }\n}\n\n/** An InformationContentElement that identifies the content of a document.\n * The realized form of a document is called a DocumentCarrier (different class than Document).\n * For example, a will is a legal document. The will published into a PDF file is an ElectronicDocumentCopy.\n * The will printed onto paper is a PrintedDocumentCopy.\n * In this example, the Document only identifies, names, and tracks the content of the will.\n * @public\n */\nexport abstract class Document extends InformationContentElement {\n public static override get className(): string { return \"Document\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A document that represents a drawing, that is, a two-dimensional graphical representation of engineering data. A Drawing element is usually modelled by a [[DrawingModel]].\n * @public\n */\nexport class Drawing extends Document {\n public static override get className(): string { return \"Drawing\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** The name of the DrawingModel class modeled by this element type. */\n protected static get drawingModelFullClassName(): string { return DrawingModel.classFullName; }\n\n /** Create a Code for a Drawing given a name that is meant to be unique within the scope of the specified DocumentListModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DocumentListModel that contains the Drawing and provides the scope for its name.\n * @param codeValue The Drawing name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.drawing);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n\n /** Insert a Drawing element and a DrawingModel that breaks it down.\n * @param iModelDb Insert into this iModel\n * @param documentListModelId Insert the new Drawing into this DocumentListModel\n * @param name The name of the Drawing.\n * @returns The Id of the newly inserted Drawing element and the DrawingModel that breaks it down (same value).\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, documentListModelId: Id64String, name: string): Id64String {\n const drawingProps: ElementProps = {\n classFullName: this.classFullName,\n model: documentListModelId,\n code: this.createCode(iModelDb, documentListModelId, name),\n };\n const drawingId: Id64String = iModelDb.elements.insertElement(drawingProps);\n const model: DrawingModel = iModelDb.models.createModel({\n classFullName: this.drawingModelFullClassName,\n modeledElement: { id: drawingId },\n });\n return iModelDb.models.insertModel(model.toJSON());\n }\n}\n\n/** A document that represents a section drawing, that is, a graphical documentation derived from a planar\n * section of a spatial view. A SectionDrawing element is modelled by a [[SectionDrawingModel]] or a [[GraphicalModel3d]].\n * A [[SectionDrawingLocation]] can associate the drawing with a spatial location, enabling [HyperModeling]($hypermodeling).\n * @public\n */\nexport class SectionDrawing extends Drawing {\n /** The type of section used to generate the drawing. */\n public sectionType: SectionType;\n /** The spatial view from which the section was generated. */\n public spatialView: RelatedElement;\n /** A transform from the section drawing model's coordinates to spatial coordinates. */\n public drawingToSpatialTransform?: Transform;\n /** If the section drawing is placed onto a [[Sheet]] via a [[ViewAttachment]], a transform from the sheet's coordinates to spatial coordinates. */\n public sheetToSpatialTransform?: Transform;\n /** If the section drawing is placed onto a [[Sheet]] via a [[ViewAttachment]], the clip to apply to the sheet graphics when drawn in the context\n * of the spatial view.\n * @note The ClipVector is defined in spatial coordinates.\n */\n public drawingBoundaryClip?: ClipVector;\n /** If true, when displaying the section drawing as a [DrawingViewState]($frontend), the [[spatialView]] will also be displayed. */\n public displaySpatialView: boolean;\n\n public static override get className(): string { return \"SectionDrawing\"; }\n\n protected static override get drawingModelFullClassName(): string { return SectionDrawingModel.classFullName; }\n\n protected constructor(props: SectionDrawingProps, iModel: IModelDb) {\n super(props, iModel);\n this.sectionType = JsonUtils.asInt(props.sectionType, SectionType.Section);\n this.spatialView = RelatedElement.fromJSON(props.spatialView) ?? RelatedElement.none;\n this.displaySpatialView = JsonUtils.asBool(props.jsonProperties?.displaySpatialView);\n\n const json = props.jsonProperties;\n if (!json)\n return;\n\n if (json.drawingToSpatialTransform)\n this.drawingToSpatialTransform = Transform.fromJSON(json.drawingToSpatialTransform);\n\n if (json.sheetToSpatialTransform)\n this.sheetToSpatialTransform = Transform.fromJSON(json.sheetToSpatialTransform);\n\n if (json.drawingBoundaryClip)\n this.drawingBoundaryClip = ClipVector.fromJSON(json.drawingBoundaryClip);\n }\n\n public override toJSON(): SectionDrawingProps {\n const props: SectionDrawingProps = {\n ...super.toJSON(),\n sectionType: this.sectionType,\n spatialView: this.spatialView.toJSON(),\n };\n\n if (!props.jsonProperties)\n props.jsonProperties = {};\n\n props.jsonProperties.displaySpatialView = this.displaySpatialView ? true : undefined;\n props.jsonProperties.drawingToSpatialTransform = this.drawingToSpatialTransform?.toJSON();\n props.jsonProperties.sheetToSpatialTransform = this.sheetToSpatialTransform?.toJSON();\n props.jsonProperties.drawingBoundaryClip = this.drawingBoundaryClip?.toJSON();\n\n return props;\n }\n}\n\n/** The template for a SheetBorder\n * @public\n */\nexport class SheetBorderTemplate extends Document {\n public static override get className(): string { return \"SheetBorderTemplate\"; }\n public height?: number;\n public width?: number;\n protected constructor(props: SheetBorderTemplateProps, iModel: IModelDb) {\n super(props, iModel);\n this.height = props.height;\n this.width = props.width;\n }\n}\n\n/** The template for a [[Sheet]]\n * @public\n */\nexport class SheetTemplate extends Document {\n public static override get className(): string { return \"SheetTemplate\"; }\n public height?: number;\n public width?: number;\n public border?: Id64String;\n\n protected constructor(props: SheetTemplateProps, iModel: IModelDb) {\n super(props, iModel);\n this.height = props.height;\n this.width = props.width;\n this.border = props.border;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.border)\n referenceIds.addElement(this.border);\n }\n}\n\n/** A digital representation of a *sheet of paper*. Modeled by a [[SheetModel]].\n * @public\n */\nexport class Sheet extends Document {\n public static override get className(): string { return \"Sheet\"; }\n public height: number;\n public width: number;\n public scale?: number;\n public sheetTemplate?: Id64String;\n\n protected constructor(props: SheetProps, iModel: IModelDb) {\n super(props, iModel);\n this.height = JsonUtils.asDouble(props.height);\n this.width = JsonUtils.asDouble(props.width);\n this.scale = props.scale;\n this.sheetTemplate = props.sheetTemplate ? Id64.fromJSON(props.sheetTemplate) : undefined;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.sheetTemplate)\n referenceIds.addElement(this.sheetTemplate);\n }\n\n /** Create a Code for a Sheet given a name that is meant to be unique within the scope of the specified DocumentListModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DocumentListModel that contains the Sheet and provides the scope for its name.\n * @param codeValue The Sheet name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.sheet);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Information Record Element is an abstract base class for modeling information records. Information Record\n * Element is the default choice if no other subclass of Information Content Element makes sense.\n * @public\n */\nexport abstract class InformationRecordElement extends InformationContentElement {\n public static override get className(): string { return \"InformationRecordElement\"; }\n\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A Definition Element holds configuration-related information that is meant to be referenced / shared.\n * @public\n */\nexport abstract class DefinitionElement extends InformationContentElement {\n public static override get className(): string { return \"DefinitionElement\"; }\n /** If true, don't show this DefinitionElement in user interface lists. */\n public isPrivate: boolean;\n\n protected constructor(props: DefinitionElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.isPrivate = true === props.isPrivate;\n }\n\n public override toJSON(): DefinitionElementProps {\n const val = super.toJSON() as DefinitionElementProps;\n val.isPrivate = this.isPrivate;\n return val;\n }\n}\n\n/** This abstract class unifies DefinitionGroup and DefinitionContainer for relationship endpoint purposes.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.10\n * @public\n */\nexport abstract class DefinitionSet extends DefinitionElement {\n public static override get className(): string { return \"DefinitionSet\"; }\n}\n\n/** A DefinitionContainer exclusively owns a set of DefinitionElements contained within its sub-model (of type DefinitionModel).\n * @note The associated ECClass was added to the BisCore schema in version 1.0.10\n * @public\n */\nexport class DefinitionContainer extends DefinitionSet {\n public static override get className(): string { return \"DefinitionContainer\"; }\n /** Create a DefinitionContainer\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionContainer element.\n * @param code The Code for this DefinitionContainer.\n * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.\n * @returns The newly constructed DefinitionContainer\n * @note There is not a predefined CodeSpec for DefinitionContainer elements, so it is the responsibility of the domain or application to create one.\n * @throws [[IModelError]] if there is a problem creating the DefinitionContainer\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, code: Code, isPrivate?: boolean): DefinitionContainer {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code,\n isPrivate,\n };\n return new DefinitionContainer(elementProps, iModelDb);\n }\n /** Insert a DefinitionContainer and its sub-model.\n * @param iModelDb Insert into this IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionContainer element.\n * @param code The Code for this DefinitionContainer.\n * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.\n * @returns The Id of the newly inserted DefinitionContainer and its newly inserted sub-model (of type DefinitionModel).\n * @note There is not a predefined CodeSpec for DefinitionContainer elements, so it is the responsibility of the domain or application to create one.\n * @throws [[IModelError]] if there is a problem inserting the DefinitionContainer\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, code: Code, isPrivate?: boolean): Id64String {\n const containerElement = this.create(iModelDb, definitionModelId, code, isPrivate);\n const containerElementId = iModelDb.elements.insertElement(containerElement.toJSON());\n const containerSubModelProps: ModelProps = {\n classFullName: DefinitionModel.classFullName,\n modeledElement: { id: containerElementId },\n isPrivate,\n };\n iModelDb.models.insertModel(containerSubModelProps);\n return containerElementId;\n }\n}\n\n/** A non-exclusive set of DefinitionElements grouped using the DefinitionGroupGroupsDefinitions relationship.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.10\n * @public\n */\nexport class DefinitionGroup extends DefinitionSet {\n public static override get className(): string { return \"DefinitionGroup\"; }\n /** Create a DefinitionGroup\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionGroup element.\n * @param code The Code for this DefinitionGroup\n * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.\n * @returns The newly constructed DefinitionGroup\n * @note There is not a predefined CodeSpec for DefinitionGroup elements, so it is the responsibility of the domain or application to create one.\n * @throws [[IModelError]] if there is a problem creating the DefinitionGroup\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, code: Code, isPrivate?: boolean): DefinitionGroup {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code,\n isPrivate,\n };\n return new DefinitionGroup(elementProps, iModelDb);\n }\n}\n\n/** Defines a set of properties (the *type*) that may be associated with an element.\n * @public\n */\nexport abstract class TypeDefinitionElement extends DefinitionElement {\n public static override get className(): string { return \"TypeDefinitionElement\"; }\n public recipe?: RelatedElement;\n\n protected constructor(props: TypeDefinitionElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.recipe = this.recipe;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.recipe)\n referenceIds.addElement(this.recipe.id);\n }\n}\n\n/** Defines a recipe for generating instances from a definition.\n * @beta\n */\nexport abstract class RecipeDefinitionElement extends DefinitionElement {\n public static override get className(): string { return \"RecipeDefinitionElement\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** Defines a set of properties (the *type*) that can be associated with a Physical Element. A Physical\n * Type has a strong correlation with something that can be ordered from a catalog since all instances\n * share a common set of properties.\n * @public\n */\nexport abstract class PhysicalType extends TypeDefinitionElement {\n public static override get className(): string { return \"PhysicalType\"; }\n /** If defined, the [[PhysicalMaterial]] that makes up this PhysicalType. */\n public physicalMaterial?: RelatedElement;\n protected constructor(props: PhysicalTypeProps, iModel: IModelDb) {\n super(props, iModel);\n this.physicalMaterial = RelatedElement.fromJSON(props.physicalMaterial);\n }\n\n public override toJSON(): PhysicalTypeProps {\n const val = super.toJSON() as PhysicalTypeProps;\n val.physicalMaterial = this.physicalMaterial?.toJSON();\n return val;\n }\n /** Create a Code for a PhysicalType element 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 PhysicalType element and provides the scope for its name.\n * @param codeValue The PhysicalType name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.physicalType);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Defines a set of properties (the *type*) that can be associated with a spatial location.\n * @public\n */\nexport abstract class SpatialLocationType extends TypeDefinitionElement {\n public static override get className(): string { return \"SpatialLocationType\"; }\n protected constructor(props: TypeDefinitionElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a SpatialLocationType element 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 SpatialLocationType element and provides the scope for its name.\n * @param codeValue The SpatialLocationType name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.spatialLocationType);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A TemplateRecipe3d is a DefinitionElement that has a sub-model that contains the 3d template elements.\n * @beta\n */\nexport class TemplateRecipe3d extends RecipeDefinitionElement {\n public static override get className(): string { return \"TemplateRecipe3d\"; }\n\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a TemplateRecipe3d given a name that is meant to be unique within the scope of its Model.\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.\n * @param codeValue The name of the TemplateRecipe3d element.\n */\n public static createCode(iModelDb: IModelDb, definitionModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.templateRecipe3d);\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: codeValue });\n }\n\n /** Create a TemplateRecipe3d\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.\n * @param name The name (Code.value) of the TemplateRecipe3d\n * @returns The newly constructed TemplateRecipe3d\n * @throws [[IModelError]] if there is a problem creating the TemplateRecipe3d\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): TemplateRecipe3d {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n isPrivate,\n };\n return new TemplateRecipe3d(elementProps, iModelDb);\n }\n /** Insert a TemplateRecipe3d and a PhysicalModel (sub-model) that will contain the 3d template elements.\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.\n * @param name The name (Code.value) of the TemplateRecipe3d\n * @returns The Id of the newly inserted TemplateRecipe3d and the PhysicalModel that sub-models it.\n * @throws [[IModelError]] if there is a problem inserting the TemplateRecipe3d or its sub-model.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): Id64String {\n const element = this.create(iModelDb, definitionModelId, name, isPrivate);\n const modeledElementId: Id64String = iModelDb.elements.insertElement(element.toJSON());\n const modelProps: GeometricModel3dProps = {\n classFullName: PhysicalModel.classFullName,\n modeledElement: { id: modeledElementId },\n isTemplate: true,\n };\n return iModelDb.models.insertModel(modelProps); // will be the same value as modeledElementId\n }\n}\n\n/** Defines a set of properties (the *type*) that can be associated with a 2D Graphical Element.\n * @public\n */\nexport abstract class GraphicalType2d extends TypeDefinitionElement {\n public static override get className(): string { return \"GraphicalType2d\"; }\n\n protected constructor(props: TypeDefinitionElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a GraphicalType2d element 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 GraphicalType2d element and provides the scope for its name.\n * @param codeValue The GraphicalType2d name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.graphicalType2d);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A recipe that uses a 2D template for creating new instances.\n * @beta\n */\nexport class TemplateRecipe2d extends RecipeDefinitionElement {\n public static override get className(): string { return \"TemplateRecipe2d\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a TemplateRecipe2d given a name that is meant to be unique within the scope of its Model.\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.\n * @param codeValue The name of the TemplateRecipe2d element.\n */\n public static createCode(iModelDb: IModelDb, definitionModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.templateRecipe2d);\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: codeValue });\n }\n\n /** Create a TemplateRecipe2d\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.\n * @param name The name (Code.value) of the TemplateRecipe2d\n * @returns The newly constructed TemplateRecipe2d\n * @throws [[IModelError]] if there is a problem creating the TemplateRecipe2d\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): TemplateRecipe2d {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n isPrivate,\n };\n return new TemplateRecipe2d(elementProps, iModelDb);\n }\n /** Insert a TemplateRecipe2d and a DrawingModel (sub-model) that will contain the 2d template elements.\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.\n * @param name The name (Code.value) of the TemplateRecipe2d\n * @returns The Id of the newly inserted TemplateRecipe2d and the PhysicalModel that sub-models it.\n * @throws [[IModelError]] if there is a problem inserting the TemplateRecipe2d or its sub-model.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): Id64String {\n const element = this.create(iModelDb, definitionModelId, name, isPrivate);\n const modeledElementId: Id64String = iModelDb.elements.insertElement(element.toJSON());\n const modelProps: GeometricModel2dProps = {\n classFullName: DrawingModel.classFullName,\n modeledElement: { id: modeledElementId },\n isTemplate: true,\n };\n return iModelDb.models.insertModel(modelProps); // will be the same value as modeledElementId\n }\n}\n\n/** An abstract base class for elements that establishes a particular modeling perspective for its parent Subject.\n * Instances are always sub-modeled by a specialization of Model of the appropriate modeling perspective.\n * @see [iModel Information Hierarchy]($docs/bis/guide/data-organization/top-of-the-world), [[Subject]], [[Model]]\n * @public\n */\nexport abstract class InformationPartitionElement extends InformationContentElement {\n public static override get className(): string { return \"InformationPartitionElement\"; }\n /** A human-readable string describing the intent of the partition. */\n public description?: string;\n\n protected constructor(props: InformationPartitionElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n }\n\n public override toJSON(): InformationPartitionElementProps { // This override only specializes the return type\n return super.toJSON() as InformationPartitionElementProps; // Entity.toJSON takes care of auto-handled properties\n }\n /** Create a code that can be used for any subclass of InformationPartitionElement.\n * @param iModelDb The IModelDb\n * @param parentSubjectId The Id of the parent Subject that provides the scope for names of its child InformationPartitionElements.\n * @param codeValue The InformationPartitionElement name\n */\n public static createCode(iModel: IModelDb, parentSubjectId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.informationPartitionElement);\n return new Code({ spec: codeSpec.id, scope: parentSubjectId, value: codeValue });\n }\n}\n\n/** A DefinitionPartition element establishes a *Definition* modeling perspective for its parent Subject.\n * A DefinitionPartition is always sub-modeled by a DefinitionModel.\n * @see [[DefinitionModel]]\n * @public\n */\nexport class DefinitionPartition extends InformationPartitionElement {\n public static override get className(): string { return \"DefinitionPartition\"; }\n}\n\n/** A DocumentPartition element establishes a *Document* modeling perspective for its parent Subject.\n * A DocumentPartition is always sub-modeled by a DocumentListModel.\n * @see [[DocumentListModel]]\n * @public\n */\nexport class DocumentPartition extends InformationPartitionElement {\n public static override get className(): string { return \"DocumentPartition\"; }\n}\n\n/** A GroupInformationPartition element establishes a *Group Information* modeling perspective for its parent Subject.\n * A GroupInformationPartition is always sub-modeled by a GroupInformationModel.\n * @see [[GroupInformationModel]]\n * @public\n */\nexport class GroupInformationPartition extends InformationPartitionElement {\n public static override get className(): string { return \"GroupInformationPartition\"; }\n}\n\n/** A GraphicalPartition3d element establishes a *3D Graphical* modeling perspective for its parent Subject.\n * A GraphicalPartition3d is always sub-modeled by a GraphicalModel3d.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.8\n * @see [[GraphicalModel3d]]\n * @public\n */\nexport class GraphicalPartition3d extends InformationPartitionElement {\n public static override get className(): string { return \"GraphicalPartition3d\"; }\n}\n\n/** An InformationRecordPartition element establishes a *Information Record* modeling perspective for its parent Subject.\n * A InformationRecordPartition is always sub-modeled by an InformationRecordModel.\n * @see [[InformationRecordModel]]\n * @public\n */\nexport class InformationRecordPartition extends InformationPartitionElement {\n public static override get className(): string { return \"InformationRecordPartition\"; }\n}\n\n/** A LinkPartition element establishes a *Link* modeling perspective for its parent Subject. A LinkPartition is always sub-modeled by a LinkModel.\n * @see [[LinkModel]]\n * @public\n */\nexport class LinkPartition extends InformationPartitionElement {\n public static override get className(): string { return \"LinkPartition\"; }\n}\n\n/** A PhysicalPartition element establishes a *Physical* modeling perspective for its parent Subject. A PhysicalPartition is always sub-modeled by a PhysicalModel.\n * @see [[PhysicalModel]]\n * @public\n */\nexport class PhysicalPartition extends InformationPartitionElement {\n public static override get className(): string { return \"PhysicalPartition\"; }\n}\n\n/** A SpatialLocationPartition element establishes a *SpatialLocation* modeling perspective for its parent Subject.\n * A SpatialLocationPartition is always sub-modeled by a SpatialLocationModel.\n * @see [[SpatialLocationModel]]\n * @public\n */\nexport class SpatialLocationPartition extends InformationPartitionElement {\n public static override get className(): string { return \"SpatialLocationPartition\"; }\n}\n\n/** A SheetIndexPartition element establishes a [[SheetIndex]] modeling perspective for its parent [[Subject]].\n * A SheetIndexPartition is always sub-modeled by a [[SheetIndexModel]].\n * @beta\n */\nexport class SheetIndexPartition extends InformationPartitionElement {\n public static override get className(): string { return \"SheetIndexPartition\"; }\n}\n\n/** Group Information is an abstract base class for modeling entities whose main purpose is to reference a group of related elements.\n * @public\n */\nexport abstract class GroupInformationElement extends InformationReferenceElement {\n public static override get className(): string { return \"GroupInformationElement\"; }\n}\n\n/** An information element that specifies a link.\n * @public\n */\nexport abstract class LinkElement extends InformationReferenceElement {\n public static override get className(): string { return \"LinkElement\"; }\n /** Create a Code for a LinkElement given a name that is meant to be unique within the scope of the specified Model.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the Model that contains the LinkElement and provides the scope for its name.\n * @param codeValue The LinkElement name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.linkElement);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** An information element that specifies a URL link.\n * @public\n */\nexport class UrlLink extends LinkElement {\n public static override get className(): string { return \"UrlLink\"; }\n public description?: string;\n public url?: string;\n\n protected constructor(props: UrlLinkProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n this.url = props.url;\n }\n\n public override toJSON(): UrlLinkProps {\n const val = super.toJSON() as UrlLinkProps;\n val.description = this.description;\n val.url = this.url;\n return val;\n }\n}\n\n/** Represents a folder-like structure that organizes repositories (typically files) in an external system.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @alpha\n */\nexport class FolderLink extends UrlLink {\n public static override get className(): string { return \"FolderLink\"; }\n}\n\n/** An information element that links to a repository.\n * @public\n */\nexport class RepositoryLink extends UrlLink {\n public static override get className(): string { return \"RepositoryLink\"; }\n public repositoryGuid?: GuidString;\n /** @note This property was added to the BisCore schema in version 1.0.13 */\n public format?: string;\n\n protected constructor(props: RepositoryLinkProps, iModel: IModelDb) {\n super(props, iModel);\n this.repositoryGuid = props.repositoryGuid;\n this.format = props.format;\n }\n\n public override toJSON(): RepositoryLinkProps {\n const val = super.toJSON() as RepositoryLinkProps;\n val.repositoryGuid = this.repositoryGuid;\n val.format = this.format;\n return val;\n }\n}\n\n/** An information element that links to an embedded file.\n * @public\n */\nexport class EmbeddedFileLink extends LinkElement {\n public static override get className(): string { return \"EmbeddedFileLink\"; }\n}\n\n/** A real world entity is modeled as a Role Element when a set of external circumstances define an important\n * role (one that is worth tracking) that is not intrinsic to the entity playing the role. For example,\n * a person can play the role of a teacher or a rock can play the role of a boundary marker.\n * @public\n */\nexport abstract class RoleElement extends Element {\n public static override get className(): string { return \"RoleElement\"; }\n}\n\n/** A Definition Element that specifies a collection of geometry that is meant to be reused across Geometric\n * Element instances. Leveraging Geometry Parts can help reduce file size and improve display performance.\n * @public\n */\nexport class GeometryPart extends DefinitionElement {\n public static override get className(): string { return \"GeometryPart\"; }\n public geom?: GeometryStreamProps;\n public bbox: ElementAlignedBox3d;\n\n protected constructor(props: GeometryPartProps, iModel: IModelDb) {\n super(props, iModel);\n this.geom = props.geom;\n this.bbox = Range3d.fromJSON(props.bbox);\n }\n\n public override toJSON(): GeometryPartProps {\n const val = super.toJSON() as GeometryPartProps;\n val.geom = this.geom;\n val.bbox = this.bbox;\n return val;\n }\n\n /** Create a Code for a GeometryPart element 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 GeometryPart element and provides the scope for its name.\n * @param codeValue The GeometryPart name\n * @note GeometryPart elements are not required to be named (have a non-empty Code).\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.geometryPart);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** The definition element for a line style\n * @public\n */\nexport class LineStyle extends DefinitionElement {\n public static override get className(): string { return \"LineStyle\"; }\n public description?: string;\n public data: string;\n\n protected constructor(props: LineStyleProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n this.data = props.data;\n }\n\n /** Create a Code for a LineStyle definition given a name that is meant to be unique within the scope of the specified model.\n * @param iModel The IModel\n * @param scopeModelId The Id of the DefinitionModel that contains the LineStyle and provides the scope for its name.\n * @param codeValue The name of the LineStyle\n * @returns A LineStyle Code\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n return new Code({ spec: iModel.codeSpecs.getByName(BisCodeSpec.lineStyle).id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Describes how to animate a view of a [[GeometricModel]] to show change over time using a [RenderSchedule.Script]($common).\n * @note This class was introduced in version 01.00.13 of the BisCore ECSchema. It should only be used with [[IModelDb]]s containing that version or newer.\n * @public\n */\nexport class RenderTimeline extends InformationRecordElement {\n public static override get className(): string { return \"RenderTimeline\"; }\n /** A human-readable description of the timeline, which may be an empty string. */\n public description: string;\n /** The JSON representation of the instructions for visualizing change over time.\n * @see [RenderSchedule.Script]($common) for the API for working with the script.\n */\n public scriptProps: RenderSchedule.ScriptProps;\n\n protected constructor(props: RenderTimelineProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description ?? \"\";\n this.scriptProps = RenderTimeline.parseScriptProps(props.script);\n }\n\n public static fromJSON(props: RenderTimelineProps, iModel: IModelDb): RenderTimeline {\n return new RenderTimeline(props, iModel);\n }\n\n public override toJSON(): RenderTimelineProps {\n const props = super.toJSON() as RenderTimelineProps;\n if (this.description.length > 0)\n props.description = this.description;\n\n props.script = JSON.stringify(this.scriptProps);\n return props;\n }\n\n private static parseScriptProps(json: string): RenderSchedule.ScriptProps {\n try {\n return JSON.parse(json);\n } catch {\n return [];\n }\n }\n\n protected override collectReferenceIds(ids: EntityReferenceSet): void {\n super.collectReferenceIds(ids);\n const script = RenderSchedule.Script.fromJSON(this.scriptProps);\n script?.discloseIds(ids);\n }\n\n /** @alpha */\n protected static override onCloned(context: IModelElementCloneContext, sourceProps: RenderTimelineProps, targetProps: RenderTimelineProps): void {\n super.onCloned(context, sourceProps, targetProps);\n if (context.isBetweenIModels)\n targetProps.script = JSON.stringify(this.remapScript(context, this.parseScriptProps(targetProps.script)));\n }\n\n /** Remap Ids when cloning a RenderSchedule.Script between iModels on a DisplayStyle or RenderTimeline.\n * @beta\n */\n public static remapScript(context: IModelElementCloneContext, input: RenderSchedule.ScriptProps): RenderSchedule.ScriptProps {\n const scriptProps: RenderSchedule.ScriptProps = [];\n if (!Array.isArray(input))\n return scriptProps;\n\n const elementIds = new OrderedId64Array();\n for (const model of input) {\n const modelId = context.findTargetElementId(model.modelId);\n if (!Id64.isValid(modelId))\n continue;\n\n model.modelId = modelId;\n scriptProps.push(model);\n for (const element of model.elementTimelines) {\n elementIds.clear();\n for (const sourceId of RenderSchedule.ElementTimeline.getElementIds(element.elementIds)) {\n const targetId = context.findTargetElementId(sourceId);\n if (Id64.isValid(targetId))\n elementIds.insert(targetId);\n }\n\n element.elementIds = CompressedId64Set.compressIds(elementIds);\n }\n }\n\n return scriptProps;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Element.js","sourceRoot":"","sources":["../../src/Element.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;AAEH,sDAA4H;AAC5H,oDAO4B;AAC5B,wDAAsE;AACtE,qCAAkC;AAGlC,mCAA4F;AAC5F,qEAA+D;AAC/D,gDAAwE;AAuExE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAa,OAAQ,SAAQ,eAAM;IAC1B,MAAM,KAAc,SAAS,KAAa,OAAO,SAAS,CAAC,CAAC,CAAC;IACpE,gBAAgB;IACT,MAAM,KAAc,mBAAmB,KAAK,OAAO,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAEjG,6GAA6G;IAC7F,KAAK,CAAa;IAClC,yEAAyE;IAClE,IAAI,CAAO;IAClB,uDAAuD;IAChD,MAAM,CAAkB;IAC/B,wJAAwJ;IACjJ,cAAc,CAAc;IACnC,gHAAgH;IACzG,SAAS,CAAU;IAC1B,uHAAuH;IACvG,cAAc,CAAyB;IAEvD,YAAsB,KAAmB,EAAE,MAAgB;QACzD,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,kBAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAE,0EAA0E;QAClH,IAAI,CAAC,KAAK,GAAG,4BAAc,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACpD,IAAI,CAAC,MAAM,GAAG,4BAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC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AK,CAAC,OAAO,CAAC,CAAC;YAC3D,IAAI,CAAC,mBAAI,CAAC,OAAO,CAAC,OAAO,CAAC;gBACxB,SAAS;YAEX,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;YACxB,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACxB,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,gBAAgB,EAAE,CAAC;gBAC7C,UAAU,CAAC,KAAK,EAAE,CAAC;gBACnB,KAAK,MAAM,QAAQ,IAAI,4BAAc,CAAC,eAAe,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;oBACxF,MAAM,QAAQ,GAAG,OAAO,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;oBACvD,IAAI,mBAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;wBACxB,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;gBAChC,CAAC;gBAED,OAAO,CAAC,UAAU,GAAG,gCAAiB,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YACjE,CAAC;QACH,CAAC;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;CACF;AA/ED,wCA+EC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Elements\n */\n\nimport { CompressedId64Set, GuidString, Id64, Id64Set, Id64String, JsonUtils, OrderedId64Array } from \"@itwin/core-bentley\";\nimport {\n AxisAlignedBox3d, BisCodeSpec, Code, CodeScopeProps, CodeSpec, ConcreteEntityTypes, DefinitionElementProps, ElementAlignedBox3d,\n ElementProps, EntityMetaData, EntityReferenceSet, GeometricElement2dProps, GeometricElement3dProps, GeometricElementProps,\n GeometricModel2dProps, GeometricModel3dProps, GeometryPartProps, GeometryStreamProps, IModel, InformationPartitionElementProps, LineStyleProps,\n ModelProps, PhysicalElementProps, PhysicalTypeProps, Placement2d, Placement3d, RelatedElement, RenderSchedule, RenderTimelineProps,\n RepositoryLinkProps, SectionDrawingLocationProps, SectionDrawingProps, SectionType, SheetBorderTemplateProps,\n SheetProps, SheetTemplateProps, SubjectProps, TypeDefinition, TypeDefinitionElementProps, UrlLinkProps,\n} from \"@itwin/core-common\";\nimport { ClipVector, Range3d, Transform } from \"@itwin/core-geometry\";\nimport { Entity } from \"./Entity\";\nimport { IModelDb } from \"./IModelDb\";\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\nimport { DefinitionModel, DrawingModel, PhysicalModel, SectionDrawingModel } from \"./Model\";\nimport { SubjectOwnsSubjects } from \"./NavigationRelationship\";\nimport { _elementWasCreated, _verifyChannel } from \"./internal/Symbols\";\n\n/** Argument for the `Element.onXxx` static methods\n * @beta\n */\nexport interface OnElementArg {\n /** The iModel for the Element affected by this method. */\n iModel: IModelDb;\n}\n\n/** Argument for `Element.onInsert` and `Element.onUpdate` static methods.\n * @beta\n */\nexport interface OnElementPropsArg extends OnElementArg {\n /** The properties of the Element affected by this method.\n * @note the properties may be modified. If so the modified values will be inserted/updated.\n */\n props: ElementProps;\n}\n\n/** Argument for the `Element.onXxx` static methods that notify of operations to an existing Element supplying its Id, ModelId and FederationGuid.\n * @beta\n */\nexport interface OnElementIdArg extends OnElementArg {\n /** The Id of the Element affected by this method */\n id: Id64String;\n /** The ModelId of the element affected by this method */\n model: Id64String;\n /** The federationGuid of the element affected by this method */\n federationGuid: GuidString;\n}\n\n/** Argument for the `Element.onChildXxx` static methods\n * @beta\n */\nexport interface OnChildElementArg extends OnElementArg {\n parentId: Id64String;\n}\n\n/** Argument for the `Element.onChildXxx` static methods that supply the properties of the child Element to be inserted or updated.\n * @beta\n */\nexport interface OnChildElementPropsArg extends OnChildElementArg {\n /** The new properties of the child Element for this method. */\n childProps: Readonly<ElementProps>;\n}\n\n/** Argument for the `Element.onChildXxx` static methods that only supply the Id of the child Element.\n * @beta\n */\nexport interface OnChildElementIdArg extends OnChildElementArg {\n /** The Id of the child element for this method */\n childId: Id64String;\n}\n\n/** Argument for the `Element.onSubModelInsert` static method\n * @beta\n */\nexport interface OnSubModelPropsArg extends OnElementArg {\n /** The properties of the prospective sub-model */\n subModelProps: ModelProps;\n}\n\n/** Argument for several `Element.onSubModelXxx` static methods\n * @beta\n */\nexport interface OnSubModelIdArg extends OnElementArg {\n /** The modelId of the sub Model */\n subModelId: Id64String;\n}\n\n/** The smallest individually identifiable building block for modeling the real world in an iModel.\n * Each element represents an [[Entity]] in the real world. Sets of Elements (contained in [[Model]]s) are used to model\n * other Elements that represent larger scale real world entities. Using this recursive modeling strategy,\n * Elements can represent entities at any scale. Elements can represent physical things or abstract concepts\n * or simply be information records.\n *\n * Every Element has a 64-bit id (inherited from Entity) that uniquely identifies it within an iModel. Every Element also\n * has a [[code]] that identifies its meaning in the real world. Additionally, Elements may have a [[federationGuid]]\n * to hold a GUID, if the element was assigned that GUID by some other federated database. The iModel database enforces\n * uniqueness of id, code, and federationGuid.\n *\n * The Element class provides `static` methods like [[onInsert]], [[onUpdated]], [[onCloned]], and [[onChildAdded]] that enable\n * it to customize persistence operations. For example, the base implementations of [[onInsert]], [[onUpdate]], and [[onDelete]]\n * validate that the appropriate [locks]($docs/learning/backend/ConcurrencyControl.md), [codes]($docs/learning/backend/CodeService.md),\n * and [channel permissions]($docs/learning/backend/Channel.md) are obtained before a change to the element is written to the iModel.\n * A subclass of Element that overrides any of these methods **must** call the `super` method as well. An application that supplies its\n * own Element subclasses should register them at startup via [[ClassRegistry.registerModule]] or [[ClassRegistry.register]].\n *\n * See:\n * * [Element Fundamentals]($docs/bis/guide/fundamentals/element-fundamentals.md)\n * * [Working with schemas and elements in TypeScript]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\n * * [Creating elements]($docs/learning/backend/CreateElements.md)\n * @public\n */\nexport class Element extends Entity {\n public static override get className(): string { return \"Element\"; }\n /** @internal */\n public static override get protectedOperations() { return [\"onInsert\", \"onUpdate\", \"onDelete\"]; }\n\n /** The ModelId of the [Model]($docs/bis/guide/fundamentals/model-fundamentals.md) containing this element */\n public readonly model: Id64String;\n /** The [Code]($docs/bis/guide/fundamentals/codes.md) for this element */\n public code: Code;\n /** The parent element, if present, of this element. */\n public parent?: RelatedElement;\n /** A [FederationGuid]($docs/bis/guide/fundamentals/element-fundamentals.md#federationguid) assigned to this element by some other federated database */\n public federationGuid?: GuidString;\n /** A [user-assigned label]($docs/bis/guide/fundamentals/element-fundamentals.md#userlabel) for this element. */\n public userLabel?: string;\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this element. */\n public readonly jsonProperties: { [key: string]: any };\n\n protected constructor(props: ElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.code = Code.fromJSON(props.code); // TODO: Validate props.code - don't silently fail if it is the wrong type\n this.model = RelatedElement.idFromJson(props.model);\n this.parent = RelatedElement.fromJSON(props.parent);\n this.federationGuid = props.federationGuid;\n this.userLabel = props.userLabel;\n this.jsonProperties = { ...props.jsonProperties }; // make sure we have our own copy\n }\n\n /** Called before a new Element is inserted.\n * @note throw an exception to disallow the insert\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element to be inserted\n * @beta\n */\n protected static onInsert(arg: OnElementPropsArg): void {\n const { iModel, props } = arg;\n const operation = \"insert\";\n iModel.channels[_verifyChannel](arg.props.model);\n iModel.locks.checkSharedLock(props.model, \"model\", operation); // inserting requires shared lock on model\n if (props.parent) // inserting requires shared lock on parent, if present\n iModel.locks.checkSharedLock(props.parent.id, \"parent\", operation);\n iModel.codeService?.verifyCode(arg);\n }\n\n /** Called after a new Element was inserted.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element that was inserted\n * @beta\n */\n protected static onInserted(arg: OnElementIdArg): void {\n const locks = arg.iModel.locks;\n if (locks && !locks.holdsExclusiveLock(arg.model))\n locks[_elementWasCreated](arg.id);\n }\n\n /** Called before an Element is updated.\n * @note throw an exception to disallow the update\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element to be updated\n * @beta\n */\n protected static onUpdate(arg: OnElementPropsArg): void {\n const { iModel, props } = arg;\n iModel.channels[_verifyChannel](props.model);\n iModel.locks.checkExclusiveLock(props.id!, \"element\", \"update\"); // eslint-disable-line @typescript-eslint/no-non-null-assertion\n iModel.codeService?.verifyCode(arg);\n }\n\n /** Called after an Element was updated.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element that was updated\n * @beta\n */\n protected static onUpdated(_arg: OnElementIdArg): void { }\n\n /** Called before an Element is deleted.\n * @note throw an exception to disallow the delete\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element to be deleted\n * @beta\n */\n protected static onDelete(arg: OnElementIdArg): void {\n arg.iModel.channels[_verifyChannel](arg.model);\n arg.iModel.locks.checkExclusiveLock(arg.id, \"element\", \"delete\");\n }\n\n /** Called after an Element was deleted.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element that was deleted\n * @beta\n */\n protected static onDeleted(_arg: OnElementIdArg): void { }\n\n /** Called when an element with an instance of this class as its parent is about to be deleted.\n * @note throw an exception if the element should not be deleted\n * @note implementers should not presume that the element was deleted if this method does not throw,\n * since the delete may fail for other reasons. Instead, rely on [[onChildDeleted]] for that purpose.\n * @note `this` is the class of the parent Element whose child will be deleted\n * @beta\n */\n protected static onChildDelete(_arg: OnChildElementIdArg): void { }\n\n /** Called after an element with an instance of this class as its parent was successfully deleted.\n * @note `this` is the class of the parent Element whose child was deleted\n * @beta\n */\n protected static onChildDeleted(_arg: OnChildElementIdArg): void { }\n\n /** Called when a *new element* with an instance of this class as its parent is about to be inserted.\n * @note throw an exception if the element should not be inserted\n * @note `this` is the class of the prospective parent Element.\n * @beta\n */\n protected static onChildInsert(_arg: OnChildElementPropsArg): void { }\n\n /** Called after a *new element* with an instance of this class as its parent was inserted.\n * @note `this` is the class of the parent Element.\n * @beta\n */\n protected static onChildInserted(_arg: OnChildElementIdArg): void { }\n\n /** Called when an element with an instance of this class as its parent is about to be updated.\n * @note throw an exception if the element should not be updated\n * @note `this` is the class of the parent Element.\n * @beta\n */\n protected static onChildUpdate(_arg: OnChildElementPropsArg): void { }\n\n /** Called after an element with an instance of this the class as its parent was updated.\n * @note `this` is the class of the parent Element.\n * @beta\n */\n protected static onChildUpdated(_arg: OnChildElementIdArg): void { }\n\n /** Called when an *existing element* is about to be updated so that an instance of this class will become its new parent.\n * @note throw an exception if the element should not be added\n * @note `this` is the class of the prospective parent Element.\n * @beta\n */\n protected static onChildAdd(_arg: OnChildElementPropsArg): void { }\n\n /** Called after an *existing element* has been updated so that an instance of this class is its new parent.\n * @note `this` is the class of the new parent Element.\n * @beta\n */\n protected static onChildAdded(_arg: OnChildElementIdArg): void { }\n\n /** Called when an element with an instance of this class as its parent is about to be updated change to a different parent.\n * @note throw an exception if the element should not be dropped\n * @note `this` is the class of the parent Element.\n * @beta\n */\n protected static onChildDrop(_arg: OnChildElementIdArg): void { }\n\n /** Called after an element with an instance of this class as its previous parent was updated to have a new parent.\n * @note `this` is the class of the previous parent Element.\n * @beta\n */\n protected static onChildDropped(_arg: OnChildElementIdArg): void { }\n\n /** Called when an instance of this class is being *sub-modeled* by a new Model.\n * @note throw an exception if model should not be inserted\n * @note `this` is the class of Element to be sub-modeled.\n * @beta\n */\n protected static onSubModelInsert(_arg: OnSubModelPropsArg): void { }\n\n /** Called after an instance of this class was *sub-modeled* by a new Model.\n * @note `this` is the class of Element that is now sub-modeled.\n * @beta\n */\n protected static onSubModelInserted(_arg: OnSubModelIdArg): void { }\n\n /** Called when a sub-model of an instance of this class is being deleted.\n * @note throw an exception if model should not be deleted\n * @note `this` is the class of Element that is sub-modeled.\n * @beta\n */\n protected static onSubModelDelete(_arg: OnSubModelIdArg): void { }\n\n /** Called after a sub-model of an instance of this class was deleted.\n * @note `this` is the class of Element that was sub-modeled.\n * @beta\n */\n protected static onSubModelDeleted(_arg: OnSubModelIdArg): void { }\n\n /** Called during the iModel transformation process after an Element from the source iModel was *cloned* for the target iModel.\n * The transformation process automatically handles remapping BisCore properties and those that are properly described in ECSchema.\n * This callback is only meant to be overridden if there are other Ids in non-standard locations that need to be remapped or other data that needs to be fixed up after the clone.\n * @param _context The context that persists any remapping between the source iModel and target iModel.\n * @param _sourceProps The ElementProps for the source Element that was cloned.\n * @param _targetProps The ElementProps that are a result of the clone. These can be further modified.\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onCloned(_context: IModelElementCloneContext, _sourceProps: ElementProps, _targetProps: ElementProps): void { }\n\n /** Called when a *root* element in a subgraph is changed and before its outputs are processed.\n * This special callback is made when:\n * * the element is part of an [[ElementDrivesElement]] graph, and\n * * the element has no inputs, and\n * * none of the element's outputs have been processed.\n * @see [[ElementDrivesElement]] for more on element dependency graphs.\n * @beta\n */\n protected static onBeforeOutputsHandled(_id: Id64String, _iModel: IModelDb): void { }\n\n /** Called on an element in a graph after all of its inputs have been processed and before its outputs are processed.\n * This callback is made when:\n * * the specified element is part of an [[ElementDrivesElement]] graph, and\n * * there was a direct change to some element upstream in the dependency graph.\n * * all upstream elements in the graph have been processed.\n * * none of the downstream elements have been processed.\n * This method is not called if none of the element's inputs were changed.\n * @see [[ElementDrivesElement]] for more on element dependency graphs.\n * @beta\n */\n protected static onAllInputsHandled(_id: Id64String, _iModel: IModelDb): void { }\n\n public override toJSON(): ElementProps {\n const val = super.toJSON() as ElementProps;\n\n if (Code.isValid(this.code))\n val.code = this.code;\n\n val.model = this.model;\n if (undefined !== this.userLabel) // NOTE: blank string should be included in JSON\n val.userLabel = this.userLabel;\n if (this.federationGuid)\n val.federationGuid = this.federationGuid;\n if (this.parent)\n val.parent = this.parent;\n\n if (Object.keys(this.jsonProperties).length > 0)\n val.jsonProperties = this.jsonProperties;\n\n return val;\n }\n\n /** Collect the Ids of this element's *references* at this level of the class hierarchy.\n * @deprecated in 3.x. use [[collectReferenceIds]] instead, the use of the term *predecessors* was confusing and became inaccurate when the transformer could handle cycles\n * @beta\n */\n protected collectPredecessorIds(predecessorIds: EntityReferenceSet): void {\n return this.collectReferenceIds(predecessorIds);\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addModel(this.model); // The modeledElement is a reference\n if (this.code.scope && Id64.isValidId64(this.code.scope))\n referenceIds.addElement(this.code.scope); // The element that scopes the code is a reference\n if (this.parent)\n referenceIds.addElement(this.parent.id); // A parent element is a reference\n }\n\n /** Get the Ids of this element's *references*. A *reference* is any element whose id is stored in the EC data of this element\n * This is important for cloning operations but can be useful in other situations as well.\n * @beta\n * @deprecated in 3.x. use [[getReferenceIds]] instead, the use of the term *predecessors* was confusing and became inaccurate when the transformer could handle cycles\n */\n public getPredecessorIds(): Id64Set {\n return this.getReferenceIds();\n }\n\n /** A *required reference* is an element that had to be inserted before this element could have been inserted.\n * This is the list of property keys on this element that store references to those elements\n * @note This should be overridden (with `super` called) at each level of the class hierarchy that introduces required references.\n * @note any property listed here must be added to the reference ids in [[collectReferenceIds]]\n * @beta\n */\n public static readonly requiredReferenceKeys: ReadonlyArray<string> = [\"parent\", \"model\"];\n\n /** A map of every [[requiredReferenceKeys]] on this class to their entity type.\n * @note This should be overridden (with `super` called) at each level of the class hierarchy that introduces required references.\n * @alpha\n */\n public static readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n parent: ConcreteEntityTypes.Element,\n model: ConcreteEntityTypes.Model,\n };\n\n /** Get the class metadata for this element. */\n public getClassMetaData(): EntityMetaData | undefined { return this.iModel.classMetaDataRegistry.find(this.classFullName); }\n\n private getAllUserProperties(): any {\n if (!this.jsonProperties.UserProps)\n this.jsonProperties.UserProps = new Object();\n\n return this.jsonProperties.UserProps;\n }\n\n /** Get a set of JSON user properties by namespace */\n public getUserProperties(namespace: string) { return this.getAllUserProperties()[namespace]; }\n\n /** Change a set of user JSON properties of this Element by namespace. */\n public setUserProperties(nameSpace: string, value: any) { this.getAllUserProperties()[nameSpace] = value; }\n\n /** Remove a set of JSON user properties, specified by namespace, from this Element */\n public removeUserProperties(nameSpace: string) { delete this.getAllUserProperties()[nameSpace]; }\n\n /** Get a JSON property of this element, by namespace */\n public getJsonProperty(nameSpace: string): any { return this.jsonProperties[nameSpace]; }\n public setJsonProperty(nameSpace: string, value: any) { this.jsonProperties[nameSpace] = value; }\n\n /** Get a display label for this Element. By default returns userLabel if present, otherwise code value. */\n public getDisplayLabel(): string { return this.userLabel ?? this.code.value; }\n\n /** Get a list of HTML strings that describe this Element for the tooltip. Strings will be listed on separate lines in the tooltip.\n * Any instances of the pattern `%{tag}` will be replaced by the localized value of tag.\n */\n public getToolTipMessage(): string[] {\n const addKey = (key: string) => `<b>%{iModelJs:Element.${key}}:</b> `; // %{iModelJs:Element.xxx} is replaced with localized value of xxx in frontend.\n const msg: string[] = [];\n const display = this.getDisplayLabel();\n msg.push(display ? display : `${addKey(\"Id\") + this.id}, ${addKey(\"Type\")}${this.className}`);\n\n if (this instanceof GeometricElement)\n msg.push(addKey(\"Category\") + this.iModel.elements.getElement(this.category).getDisplayLabel());\n\n msg.push(addKey(\"Model\") + this.iModel.elements.getElement(this.model).getDisplayLabel());\n return msg;\n }\n\n /**\n * Insert this Element into the iModel.\n * @see [[IModelDb.Elements.insertElement]]\n * @note For convenience, the value of `this.id` is updated to reflect the resultant element's id.\n * However when `this.federationGuid` is not present or undefined, a new Guid will be generated and stored on the resultant element. But\n * the value of `this.federationGuid` is *not* updated. Generally, it is best to re-read the element after inserting (e.g. via [[IModelDb.Elements.getElement]])\n * if you intend to continue working with it. That will ensure its values reflect the persistent state.\n */\n public insert() {\n return this.id = this.iModel.elements.insertElement(this.toJSON());\n }\n /** Update this Element in the iModel. */\n public update() { this.iModel.elements.updateElement(this.toJSON()); }\n /** Delete this Element from the iModel. */\n public delete() { this.iModel.elements.deleteElement(this.id); }\n}\n\n/** An abstract base class to model real world entities that intrinsically have geometry.\n * @public\n */\nexport abstract class GeometricElement extends Element {\n public static override get className(): string { return \"GeometricElement\"; }\n /** The Id of the [[Category]] for this GeometricElement. */\n public category: Id64String;\n /** The GeometryStream for this GeometricElement. */\n public geom?: GeometryStreamProps;\n /** The origin, orientation, and bounding box of this GeometricElement. */\n public abstract get placement(): Placement2d | Placement3d;\n\n protected constructor(props: GeometricElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.category = Id64.fromJSON(props.category);\n this.geom = props.geom;\n }\n\n /** Type guard for instanceof [[GeometricElement3d]] */\n public is3d(): this is GeometricElement3d { return this instanceof GeometricElement3d; }\n /** Type guard for instanceof [[GeometricElement2d]] */\n public is2d(): this is GeometricElement2d { return this instanceof GeometricElement2d; }\n /** Get the [Transform]($geometry) from the Placement of this GeometricElement */\n public getPlacementTransform(): Transform { return this.placement.transform; }\n public calculateRange3d(): AxisAlignedBox3d { return this.placement.calculateRange(); }\n\n public override toJSON(): GeometricElementProps {\n const val = super.toJSON() as GeometricElementProps;\n val.category = this.category;\n if (this.geom)\n val.geom = this.geom;\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.category);\n // TODO: GeometryPartIds?\n }\n\n /** @beta */\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"category\"];\n /** @alpha */\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n ...super.requiredReferenceKeyTypeMap,\n category: ConcreteEntityTypes.Element,\n };\n}\n\n/** An abstract base class to model real world entities that intrinsically have 3d geometry.\n * See [how to create a GeometricElement3d]($docs/learning/backend/CreateElements.md#GeometricElement3d).\n * @public\n */\nexport abstract class GeometricElement3d extends GeometricElement {\n public static override get className(): string { return \"GeometricElement3d\"; }\n public placement: Placement3d;\n public typeDefinition?: TypeDefinition;\n\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) {\n super(props, iModel);\n this.placement = Placement3d.fromJSON(props.placement);\n if (props.typeDefinition)\n this.typeDefinition = TypeDefinition.fromJSON(props.typeDefinition);\n }\n\n public override toJSON(): GeometricElement3dProps {\n const val = super.toJSON() as GeometricElement3dProps;\n val.placement = this.placement;\n if (undefined !== this.typeDefinition)\n val.typeDefinition = this.typeDefinition;\n\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.typeDefinition)\n referenceIds.addElement(this.typeDefinition.id);\n }\n}\n\n/** A 3d Graphical Element\n * @public\n */\nexport abstract class GraphicalElement3d extends GeometricElement3d {\n public static override get className(): string { return \"GraphicalElement3d\"; }\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** An abstract base class to model information entities that intrinsically have 2d geometry.\n * @public\n */\nexport abstract class GeometricElement2d extends GeometricElement {\n public static override get className(): string { return \"GeometricElement2d\"; }\n public placement: Placement2d;\n public typeDefinition?: TypeDefinition;\n\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) {\n super(props, iModel);\n this.placement = Placement2d.fromJSON(props.placement);\n if (props.typeDefinition)\n this.typeDefinition = TypeDefinition.fromJSON(props.typeDefinition);\n }\n\n public override toJSON(): GeometricElement2dProps {\n const val = super.toJSON() as GeometricElement2dProps;\n val.placement = this.placement;\n if (undefined !== this.typeDefinition)\n val.typeDefinition = this.typeDefinition;\n\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.typeDefinition)\n referenceIds.addElement(this.typeDefinition.id);\n }\n}\n\n/** An abstract base class for 2d Geometric Elements that are used to convey information within graphical presentations (like drawings).\n * @public\n */\nexport abstract class GraphicalElement2d extends GeometricElement2d {\n public static override get className(): string { return \"GraphicalElement2d\"; }\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** 2d element used to annotate drawings and sheets.\n * @public\n */\nexport class AnnotationElement2d extends GraphicalElement2d {\n public static override get className(): string { return \"AnnotationElement2d\"; }\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** 2d element used to persist graphics for use in drawings.\n * @public\n */\nexport class DrawingGraphic extends GraphicalElement2d {\n public static override get className(): string { return \"DrawingGraphic\"; }\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** An Element that occupies real world space. Its coordinates are in the project space of its iModel.\n * @public\n */\nexport abstract class SpatialElement extends GeometricElement3d {\n public static override get className(): string { return \"SpatialElement\"; }\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** An Element that is spatially located, has mass, and can be *touched*.\n * @public\n */\nexport abstract class PhysicalElement extends SpatialElement {\n public static override get className(): string { return \"PhysicalElement\"; }\n /** If defined, the [[PhysicalMaterial]] that makes up this PhysicalElement. */\n public physicalMaterial?: RelatedElement;\n protected constructor(props: PhysicalElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.physicalMaterial = RelatedElement.fromJSON(props.physicalMaterial);\n }\n\n public override toJSON(): PhysicalElementProps {\n const val = super.toJSON() as PhysicalElementProps;\n val.physicalMaterial = this.physicalMaterial?.toJSON();\n return val;\n }\n}\n\n/** Identifies a *tracked* real world location but has no mass and cannot be *touched*.\n * @public\n */\nexport abstract class SpatialLocationElement extends SpatialElement {\n public static override get className(): string { return \"SpatialLocationElement\"; }\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A Volume Element is a Spatial Location Element that is restricted to defining a volume.\n * @public\n */\nexport class VolumeElement extends SpatialLocationElement {\n public static override get className(): string { return \"VolumeElement\"; }\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A SectionDrawingLocation element identifies the location of a [[SectionDrawing]] in the context of a [[SpatialModel]],\n * enabling [HyperModeling]($hypermodeling).\n * @note The associated ECClass was added to the BisCore schema in version 1.0.11.\n * @public\n */\nexport class SectionDrawingLocation extends SpatialLocationElement {\n /** The Id of the [[ViewDefinition]] to which this location refers. */\n public sectionView: RelatedElement;\n\n public static override get className(): string { return \"SectionDrawingLocation\"; }\n\n public constructor(props: SectionDrawingLocationProps, iModel: IModelDb) {\n super(props, iModel);\n this.sectionView = RelatedElement.fromJSON(props.sectionView) ?? RelatedElement.none;\n }\n\n public override toJSON(): SectionDrawingLocationProps {\n return {\n ...super.toJSON(),\n sectionView: this.sectionView.toJSON(),\n };\n }\n}\n\n/** Information Content Element is an abstract base class for modeling pure information entities. Only the\n * core framework should directly subclass from Information Content Element. Domain and application developers\n * should start with the most appropriate subclass of Information Content Element.\n * @public\n */\nexport abstract class InformationContentElement extends Element {\n public static override get className(): string { return \"InformationContentElement\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** Element used in conjunction with bis:ElementDrivesElement relationships to bundle multiple inputs before\n * driving the output element.\n * @beta\n */\nexport abstract class DriverBundleElement extends InformationContentElement {\n public static override get className(): string { return \"DriverBundleElement\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** Information Reference is an abstract base class for modeling entities whose main purpose is to reference something else.\n * @public\n */\nexport abstract class InformationReferenceElement extends InformationContentElement {\n public static override get className(): string { return \"InformationReferenceElement\"; }\n\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A Subject is an information element that describes what this repository (or part thereof) is about.\n * @public\n */\nexport class Subject extends InformationReferenceElement {\n public static override get className(): string { return \"Subject\"; }\n public description?: string;\n protected constructor(props: SubjectProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n }\n\n public override toJSON(): SubjectProps { // This override only specializes the return type\n return super.toJSON() as SubjectProps; // Entity.toJSON takes care of auto-handled properties\n }\n /** Create a Code for a Subject given a name that is meant to be unique within the scope of its parent Subject.\n * @param iModelDb The IModelDb\n * @param parentSubjectId The Id of the parent Subject that provides the scope for names of its child Subjects.\n * @param codeValue The child Subject name\n */\n public static createCode(iModelDb: IModelDb, parentSubjectId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.subject);\n return new Code({ spec: codeSpec.id, scope: parentSubjectId, value: codeValue });\n }\n /** Create a Subject\n * @param iModelDb The IModelDb\n * @param parentSubjectId The new Subject will be a child of this Subject\n * @param name The name (codeValue) of the Subject\n * @param description The optional description of the Subject\n * @returns The newly constructed Subject\n * @throws [[IModelError]] if there is a problem creating the Subject\n */\n public static create(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, description?: string): Subject {\n const subjectProps: SubjectProps = {\n classFullName: this.classFullName,\n model: IModel.repositoryModelId,\n parent: new SubjectOwnsSubjects(parentSubjectId),\n code: this.createCode(iModelDb, parentSubjectId, name),\n description,\n };\n return new Subject(subjectProps, iModelDb);\n }\n\n /** Insert a Subject\n * @param iModelDb Insert into this IModelDb\n * @param parentSubjectId The new Subject will be inserted as a child of this Subject\n * @param name The name (codeValue) of the Subject\n * @param description The optional description of the Subject\n * @returns The Id of the newly inserted Subject\n * @throws [[IModelError]] if there is a problem inserting the Subject\n */\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, description?: string): Id64String {\n const subject = this.create(iModelDb, parentSubjectId, name, description);\n return iModelDb.elements.insertElement(subject.toJSON());\n }\n}\n\n/** An InformationContentElement that identifies the content of a document.\n * The realized form of a document is called a DocumentCarrier (different class than Document).\n * For example, a will is a legal document. The will published into a PDF file is an ElectronicDocumentCopy.\n * The will printed onto paper is a PrintedDocumentCopy.\n * In this example, the Document only identifies, names, and tracks the content of the will.\n * @public\n */\nexport abstract class Document extends InformationContentElement {\n public static override get className(): string { return \"Document\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A document that represents a drawing, that is, a two-dimensional graphical representation of engineering data. A Drawing element is usually modelled by a [[DrawingModel]].\n * @public\n */\nexport class Drawing extends Document {\n public static override get className(): string { return \"Drawing\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** The name of the DrawingModel class modeled by this element type. */\n protected static get drawingModelFullClassName(): string { return DrawingModel.classFullName; }\n\n /** Create a Code for a Drawing given a name that is meant to be unique within the scope of the specified DocumentListModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DocumentListModel that contains the Drawing and provides the scope for its name.\n * @param codeValue The Drawing name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.drawing);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n\n /** Insert a Drawing element and a DrawingModel that breaks it down.\n * @param iModelDb Insert into this iModel\n * @param documentListModelId Insert the new Drawing into this DocumentListModel\n * @param name The name of the Drawing.\n * @returns The Id of the newly inserted Drawing element and the DrawingModel that breaks it down (same value).\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, documentListModelId: Id64String, name: string): Id64String {\n const drawingProps: ElementProps = {\n classFullName: this.classFullName,\n model: documentListModelId,\n code: this.createCode(iModelDb, documentListModelId, name),\n };\n const drawingId: Id64String = iModelDb.elements.insertElement(drawingProps);\n const model: DrawingModel = iModelDb.models.createModel({\n classFullName: this.drawingModelFullClassName,\n modeledElement: { id: drawingId },\n });\n return iModelDb.models.insertModel(model.toJSON());\n }\n}\n\n/** A document that represents a section drawing, that is, a graphical documentation derived from a planar\n * section of a spatial view. A SectionDrawing element is modelled by a [[SectionDrawingModel]] or a [[GraphicalModel3d]].\n * A [[SectionDrawingLocation]] can associate the drawing with a spatial location, enabling [HyperModeling]($hypermodeling).\n * @public\n */\nexport class SectionDrawing extends Drawing {\n /** The type of section used to generate the drawing. */\n public sectionType: SectionType;\n /** The spatial view from which the section was generated. */\n public spatialView: RelatedElement;\n /** A transform from the section drawing model's coordinates to spatial coordinates. */\n public drawingToSpatialTransform?: Transform;\n /** If the section drawing is placed onto a [[Sheet]] via a [[ViewAttachment]], a transform from the sheet's coordinates to spatial coordinates. */\n public sheetToSpatialTransform?: Transform;\n /** If the section drawing is placed onto a [[Sheet]] via a [[ViewAttachment]], the clip to apply to the sheet graphics when drawn in the context\n * of the spatial view.\n * @note The ClipVector is defined in spatial coordinates.\n */\n public drawingBoundaryClip?: ClipVector;\n /** If true, when displaying the section drawing as a [DrawingViewState]($frontend), the [[spatialView]] will also be displayed. */\n public displaySpatialView: boolean;\n\n public static override get className(): string { return \"SectionDrawing\"; }\n\n protected static override get drawingModelFullClassName(): string { return SectionDrawingModel.classFullName; }\n\n protected constructor(props: SectionDrawingProps, iModel: IModelDb) {\n super(props, iModel);\n this.sectionType = JsonUtils.asInt(props.sectionType, SectionType.Section);\n this.spatialView = RelatedElement.fromJSON(props.spatialView) ?? RelatedElement.none;\n this.displaySpatialView = JsonUtils.asBool(props.jsonProperties?.displaySpatialView);\n\n const json = props.jsonProperties;\n if (!json)\n return;\n\n if (json.drawingToSpatialTransform)\n this.drawingToSpatialTransform = Transform.fromJSON(json.drawingToSpatialTransform);\n\n if (json.sheetToSpatialTransform)\n this.sheetToSpatialTransform = Transform.fromJSON(json.sheetToSpatialTransform);\n\n if (json.drawingBoundaryClip)\n this.drawingBoundaryClip = ClipVector.fromJSON(json.drawingBoundaryClip);\n }\n\n public override toJSON(): SectionDrawingProps {\n const props: SectionDrawingProps = {\n ...super.toJSON(),\n sectionType: this.sectionType,\n spatialView: this.spatialView.toJSON(),\n };\n\n if (!props.jsonProperties)\n props.jsonProperties = {};\n\n props.jsonProperties.displaySpatialView = this.displaySpatialView ? true : undefined;\n props.jsonProperties.drawingToSpatialTransform = this.drawingToSpatialTransform?.toJSON();\n props.jsonProperties.sheetToSpatialTransform = this.sheetToSpatialTransform?.toJSON();\n props.jsonProperties.drawingBoundaryClip = this.drawingBoundaryClip?.toJSON();\n\n return props;\n }\n}\n\n/** The template for a SheetBorder\n * @public\n */\nexport class SheetBorderTemplate extends Document {\n public static override get className(): string { return \"SheetBorderTemplate\"; }\n public height?: number;\n public width?: number;\n protected constructor(props: SheetBorderTemplateProps, iModel: IModelDb) {\n super(props, iModel);\n this.height = props.height;\n this.width = props.width;\n }\n}\n\n/** The template for a [[Sheet]]\n * @public\n */\nexport class SheetTemplate extends Document {\n public static override get className(): string { return \"SheetTemplate\"; }\n public height?: number;\n public width?: number;\n public border?: Id64String;\n\n protected constructor(props: SheetTemplateProps, iModel: IModelDb) {\n super(props, iModel);\n this.height = props.height;\n this.width = props.width;\n this.border = props.border;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.border)\n referenceIds.addElement(this.border);\n }\n}\n\n/** A digital representation of a *sheet of paper*. Modeled by a [[SheetModel]].\n * @public\n */\nexport class Sheet extends Document {\n public static override get className(): string { return \"Sheet\"; }\n public height: number;\n public width: number;\n public scale?: number;\n public sheetTemplate?: Id64String;\n\n protected constructor(props: SheetProps, iModel: IModelDb) {\n super(props, iModel);\n this.height = JsonUtils.asDouble(props.height);\n this.width = JsonUtils.asDouble(props.width);\n this.scale = props.scale;\n this.sheetTemplate = props.sheetTemplate ? Id64.fromJSON(props.sheetTemplate) : undefined;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.sheetTemplate)\n referenceIds.addElement(this.sheetTemplate);\n }\n\n /** Create a Code for a Sheet given a name that is meant to be unique within the scope of the specified DocumentListModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DocumentListModel that contains the Sheet and provides the scope for its name.\n * @param codeValue The Sheet name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.sheet);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Information Record Element is an abstract base class for modeling information records. Information Record\n * Element is the default choice if no other subclass of Information Content Element makes sense.\n * @public\n */\nexport abstract class InformationRecordElement extends InformationContentElement {\n public static override get className(): string { return \"InformationRecordElement\"; }\n\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A Definition Element holds configuration-related information that is meant to be referenced / shared.\n * @public\n */\nexport abstract class DefinitionElement extends InformationContentElement {\n public static override get className(): string { return \"DefinitionElement\"; }\n /** If true, don't show this DefinitionElement in user interface lists. */\n public isPrivate: boolean;\n\n protected constructor(props: DefinitionElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.isPrivate = true === props.isPrivate;\n }\n\n public override toJSON(): DefinitionElementProps {\n const val = super.toJSON() as DefinitionElementProps;\n val.isPrivate = this.isPrivate;\n return val;\n }\n}\n\n/** This abstract class unifies DefinitionGroup and DefinitionContainer for relationship endpoint purposes.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.10\n * @public\n */\nexport abstract class DefinitionSet extends DefinitionElement {\n public static override get className(): string { return \"DefinitionSet\"; }\n}\n\n/** A DefinitionContainer exclusively owns a set of DefinitionElements contained within its sub-model (of type DefinitionModel).\n * @note The associated ECClass was added to the BisCore schema in version 1.0.10\n * @public\n */\nexport class DefinitionContainer extends DefinitionSet {\n public static override get className(): string { return \"DefinitionContainer\"; }\n /** Create a DefinitionContainer\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionContainer element.\n * @param code The Code for this DefinitionContainer.\n * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.\n * @returns The newly constructed DefinitionContainer\n * @note There is not a predefined CodeSpec for DefinitionContainer elements, so it is the responsibility of the domain or application to create one.\n * @throws [[IModelError]] if there is a problem creating the DefinitionContainer\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, code: Code, isPrivate?: boolean): DefinitionContainer {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code,\n isPrivate,\n };\n return new DefinitionContainer(elementProps, iModelDb);\n }\n /** Insert a DefinitionContainer and its sub-model.\n * @param iModelDb Insert into this IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionContainer element.\n * @param code The Code for this DefinitionContainer.\n * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.\n * @returns The Id of the newly inserted DefinitionContainer and its newly inserted sub-model (of type DefinitionModel).\n * @note There is not a predefined CodeSpec for DefinitionContainer elements, so it is the responsibility of the domain or application to create one.\n * @throws [[IModelError]] if there is a problem inserting the DefinitionContainer\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, code: Code, isPrivate?: boolean): Id64String {\n const containerElement = this.create(iModelDb, definitionModelId, code, isPrivate);\n const containerElementId = iModelDb.elements.insertElement(containerElement.toJSON());\n const containerSubModelProps: ModelProps = {\n classFullName: DefinitionModel.classFullName,\n modeledElement: { id: containerElementId },\n isPrivate,\n };\n iModelDb.models.insertModel(containerSubModelProps);\n return containerElementId;\n }\n}\n\n/** A non-exclusive set of DefinitionElements grouped using the DefinitionGroupGroupsDefinitions relationship.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.10\n * @public\n */\nexport class DefinitionGroup extends DefinitionSet {\n public static override get className(): string { return \"DefinitionGroup\"; }\n /** Create a DefinitionGroup\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionGroup element.\n * @param code The Code for this DefinitionGroup\n * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.\n * @returns The newly constructed DefinitionGroup\n * @note There is not a predefined CodeSpec for DefinitionGroup elements, so it is the responsibility of the domain or application to create one.\n * @throws [[IModelError]] if there is a problem creating the DefinitionGroup\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, code: Code, isPrivate?: boolean): DefinitionGroup {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code,\n isPrivate,\n };\n return new DefinitionGroup(elementProps, iModelDb);\n }\n}\n\n/** Defines a set of properties (the *type*) that may be associated with an element.\n * @public\n */\nexport abstract class TypeDefinitionElement extends DefinitionElement {\n public static override get className(): string { return \"TypeDefinitionElement\"; }\n public recipe?: RelatedElement;\n\n protected constructor(props: TypeDefinitionElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.recipe = this.recipe;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.recipe)\n referenceIds.addElement(this.recipe.id);\n }\n}\n\n/** Defines a recipe for generating instances from a definition.\n * @beta\n */\nexport abstract class RecipeDefinitionElement extends DefinitionElement {\n public static override get className(): string { return \"RecipeDefinitionElement\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** Defines a set of properties (the *type*) that can be associated with a Physical Element. A Physical\n * Type has a strong correlation with something that can be ordered from a catalog since all instances\n * share a common set of properties.\n * @public\n */\nexport abstract class PhysicalType extends TypeDefinitionElement {\n public static override get className(): string { return \"PhysicalType\"; }\n /** If defined, the [[PhysicalMaterial]] that makes up this PhysicalType. */\n public physicalMaterial?: RelatedElement;\n protected constructor(props: PhysicalTypeProps, iModel: IModelDb) {\n super(props, iModel);\n this.physicalMaterial = RelatedElement.fromJSON(props.physicalMaterial);\n }\n\n public override toJSON(): PhysicalTypeProps {\n const val = super.toJSON() as PhysicalTypeProps;\n val.physicalMaterial = this.physicalMaterial?.toJSON();\n return val;\n }\n /** Create a Code for a PhysicalType element 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 PhysicalType element and provides the scope for its name.\n * @param codeValue The PhysicalType name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.physicalType);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Defines a set of properties (the *type*) that can be associated with a spatial location.\n * @public\n */\nexport abstract class SpatialLocationType extends TypeDefinitionElement {\n public static override get className(): string { return \"SpatialLocationType\"; }\n protected constructor(props: TypeDefinitionElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a SpatialLocationType element 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 SpatialLocationType element and provides the scope for its name.\n * @param codeValue The SpatialLocationType name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.spatialLocationType);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A TemplateRecipe3d is a DefinitionElement that has a sub-model that contains the 3d template elements.\n * @beta\n */\nexport class TemplateRecipe3d extends RecipeDefinitionElement {\n public static override get className(): string { return \"TemplateRecipe3d\"; }\n\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a TemplateRecipe3d given a name that is meant to be unique within the scope of its Model.\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.\n * @param codeValue The name of the TemplateRecipe3d element.\n */\n public static createCode(iModelDb: IModelDb, definitionModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.templateRecipe3d);\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: codeValue });\n }\n\n /** Create a TemplateRecipe3d\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.\n * @param name The name (Code.value) of the TemplateRecipe3d\n * @returns The newly constructed TemplateRecipe3d\n * @throws [[IModelError]] if there is a problem creating the TemplateRecipe3d\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): TemplateRecipe3d {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n isPrivate,\n };\n return new TemplateRecipe3d(elementProps, iModelDb);\n }\n /** Insert a TemplateRecipe3d and a PhysicalModel (sub-model) that will contain the 3d template elements.\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.\n * @param name The name (Code.value) of the TemplateRecipe3d\n * @returns The Id of the newly inserted TemplateRecipe3d and the PhysicalModel that sub-models it.\n * @throws [[IModelError]] if there is a problem inserting the TemplateRecipe3d or its sub-model.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): Id64String {\n const element = this.create(iModelDb, definitionModelId, name, isPrivate);\n const modeledElementId: Id64String = iModelDb.elements.insertElement(element.toJSON());\n const modelProps: GeometricModel3dProps = {\n classFullName: PhysicalModel.classFullName,\n modeledElement: { id: modeledElementId },\n isTemplate: true,\n };\n return iModelDb.models.insertModel(modelProps); // will be the same value as modeledElementId\n }\n}\n\n/** Defines a set of properties (the *type*) that can be associated with a 2D Graphical Element.\n * @public\n */\nexport abstract class GraphicalType2d extends TypeDefinitionElement {\n public static override get className(): string { return \"GraphicalType2d\"; }\n\n protected constructor(props: TypeDefinitionElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a GraphicalType2d element 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 GraphicalType2d element and provides the scope for its name.\n * @param codeValue The GraphicalType2d name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.graphicalType2d);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A recipe that uses a 2D template for creating new instances.\n * @beta\n */\nexport class TemplateRecipe2d extends RecipeDefinitionElement {\n public static override get className(): string { return \"TemplateRecipe2d\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a TemplateRecipe2d given a name that is meant to be unique within the scope of its Model.\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.\n * @param codeValue The name of the TemplateRecipe2d element.\n */\n public static createCode(iModelDb: IModelDb, definitionModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.templateRecipe2d);\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: codeValue });\n }\n\n /** Create a TemplateRecipe2d\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.\n * @param name The name (Code.value) of the TemplateRecipe2d\n * @returns The newly constructed TemplateRecipe2d\n * @throws [[IModelError]] if there is a problem creating the TemplateRecipe2d\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): TemplateRecipe2d {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n isPrivate,\n };\n return new TemplateRecipe2d(elementProps, iModelDb);\n }\n /** Insert a TemplateRecipe2d and a DrawingModel (sub-model) that will contain the 2d template elements.\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.\n * @param name The name (Code.value) of the TemplateRecipe2d\n * @returns The Id of the newly inserted TemplateRecipe2d and the PhysicalModel that sub-models it.\n * @throws [[IModelError]] if there is a problem inserting the TemplateRecipe2d or its sub-model.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): Id64String {\n const element = this.create(iModelDb, definitionModelId, name, isPrivate);\n const modeledElementId: Id64String = iModelDb.elements.insertElement(element.toJSON());\n const modelProps: GeometricModel2dProps = {\n classFullName: DrawingModel.classFullName,\n modeledElement: { id: modeledElementId },\n isTemplate: true,\n };\n return iModelDb.models.insertModel(modelProps); // will be the same value as modeledElementId\n }\n}\n\n/** An abstract base class for elements that establishes a particular modeling perspective for its parent Subject.\n * Instances are always sub-modeled by a specialization of Model of the appropriate modeling perspective.\n * @see [iModel Information Hierarchy]($docs/bis/guide/data-organization/top-of-the-world), [[Subject]], [[Model]]\n * @public\n */\nexport abstract class InformationPartitionElement extends InformationContentElement {\n public static override get className(): string { return \"InformationPartitionElement\"; }\n /** A human-readable string describing the intent of the partition. */\n public description?: string;\n\n protected constructor(props: InformationPartitionElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n }\n\n public override toJSON(): InformationPartitionElementProps { // This override only specializes the return type\n return super.toJSON() as InformationPartitionElementProps; // Entity.toJSON takes care of auto-handled properties\n }\n /** Create a code that can be used for any subclass of InformationPartitionElement.\n * @param iModelDb The IModelDb\n * @param parentSubjectId The Id of the parent Subject that provides the scope for names of its child InformationPartitionElements.\n * @param codeValue The InformationPartitionElement name\n */\n public static createCode(iModel: IModelDb, parentSubjectId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.informationPartitionElement);\n return new Code({ spec: codeSpec.id, scope: parentSubjectId, value: codeValue });\n }\n}\n\n/** A DefinitionPartition element establishes a *Definition* modeling perspective for its parent Subject.\n * A DefinitionPartition is always sub-modeled by a DefinitionModel.\n * @see [[DefinitionModel]]\n * @public\n */\nexport class DefinitionPartition extends InformationPartitionElement {\n public static override get className(): string { return \"DefinitionPartition\"; }\n}\n\n/** A DocumentPartition element establishes a *Document* modeling perspective for its parent Subject.\n * A DocumentPartition is always sub-modeled by a DocumentListModel.\n * @see [[DocumentListModel]]\n * @public\n */\nexport class DocumentPartition extends InformationPartitionElement {\n public static override get className(): string { return \"DocumentPartition\"; }\n}\n\n/** A GroupInformationPartition element establishes a *Group Information* modeling perspective for its parent Subject.\n * A GroupInformationPartition is always sub-modeled by a GroupInformationModel.\n * @see [[GroupInformationModel]]\n * @public\n */\nexport class GroupInformationPartition extends InformationPartitionElement {\n public static override get className(): string { return \"GroupInformationPartition\"; }\n}\n\n/** A GraphicalPartition3d element establishes a *3D Graphical* modeling perspective for its parent Subject.\n * A GraphicalPartition3d is always sub-modeled by a GraphicalModel3d.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.8\n * @see [[GraphicalModel3d]]\n * @public\n */\nexport class GraphicalPartition3d extends InformationPartitionElement {\n public static override get className(): string { return \"GraphicalPartition3d\"; }\n}\n\n/** An InformationRecordPartition element establishes a *Information Record* modeling perspective for its parent Subject.\n * A InformationRecordPartition is always sub-modeled by an InformationRecordModel.\n * @see [[InformationRecordModel]]\n * @public\n */\nexport class InformationRecordPartition extends InformationPartitionElement {\n public static override get className(): string { return \"InformationRecordPartition\"; }\n}\n\n/** A LinkPartition element establishes a *Link* modeling perspective for its parent Subject. A LinkPartition is always sub-modeled by a LinkModel.\n * @see [[LinkModel]]\n * @public\n */\nexport class LinkPartition extends InformationPartitionElement {\n public static override get className(): string { return \"LinkPartition\"; }\n}\n\n/** A PhysicalPartition element establishes a *Physical* modeling perspective for its parent Subject. A PhysicalPartition is always sub-modeled by a PhysicalModel.\n * @see [[PhysicalModel]]\n * @public\n */\nexport class PhysicalPartition extends InformationPartitionElement {\n public static override get className(): string { return \"PhysicalPartition\"; }\n}\n\n/** A SpatialLocationPartition element establishes a *SpatialLocation* modeling perspective for its parent Subject.\n * A SpatialLocationPartition is always sub-modeled by a SpatialLocationModel.\n * @see [[SpatialLocationModel]]\n * @public\n */\nexport class SpatialLocationPartition extends InformationPartitionElement {\n public static override get className(): string { return \"SpatialLocationPartition\"; }\n}\n\n/** A SheetIndexPartition element establishes a [[SheetIndex]] modeling perspective for its parent [[Subject]].\n * A SheetIndexPartition is always sub-modeled by a [[SheetIndexModel]].\n * @beta\n */\nexport class SheetIndexPartition extends InformationPartitionElement {\n public static override get className(): string { return \"SheetIndexPartition\"; }\n}\n\n/** Group Information is an abstract base class for modeling entities whose main purpose is to reference a group of related elements.\n * @public\n */\nexport abstract class GroupInformationElement extends InformationReferenceElement {\n public static override get className(): string { return \"GroupInformationElement\"; }\n}\n\n/** An information element that specifies a link.\n * @public\n */\nexport abstract class LinkElement extends InformationReferenceElement {\n public static override get className(): string { return \"LinkElement\"; }\n /** Create a Code for a LinkElement given a name that is meant to be unique within the scope of the specified Model.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the Model that contains the LinkElement and provides the scope for its name.\n * @param codeValue The LinkElement name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.linkElement);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** An information element that specifies a URL link.\n * @public\n */\nexport class UrlLink extends LinkElement {\n public static override get className(): string { return \"UrlLink\"; }\n public description?: string;\n public url?: string;\n\n protected constructor(props: UrlLinkProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n this.url = props.url;\n }\n\n public override toJSON(): UrlLinkProps {\n const val = super.toJSON() as UrlLinkProps;\n val.description = this.description;\n val.url = this.url;\n return val;\n }\n}\n\n/** Represents a folder-like structure that organizes repositories (typically files) in an external system.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @alpha\n */\nexport class FolderLink extends UrlLink {\n public static override get className(): string { return \"FolderLink\"; }\n}\n\n/** An information element that links to a repository.\n * @public\n */\nexport class RepositoryLink extends UrlLink {\n public static override get className(): string { return \"RepositoryLink\"; }\n public repositoryGuid?: GuidString;\n /** @note This property was added to the BisCore schema in version 1.0.13 */\n public format?: string;\n\n protected constructor(props: RepositoryLinkProps, iModel: IModelDb) {\n super(props, iModel);\n this.repositoryGuid = props.repositoryGuid;\n this.format = props.format;\n }\n\n public override toJSON(): RepositoryLinkProps {\n const val = super.toJSON() as RepositoryLinkProps;\n val.repositoryGuid = this.repositoryGuid;\n val.format = this.format;\n return val;\n }\n}\n\n/** An information element that links to an embedded file.\n * @public\n */\nexport class EmbeddedFileLink extends LinkElement {\n public static override get className(): string { return \"EmbeddedFileLink\"; }\n}\n\n/** A real world entity is modeled as a Role Element when a set of external circumstances define an important\n * role (one that is worth tracking) that is not intrinsic to the entity playing the role. For example,\n * a person can play the role of a teacher or a rock can play the role of a boundary marker.\n * @public\n */\nexport abstract class RoleElement extends Element {\n public static override get className(): string { return \"RoleElement\"; }\n}\n\n/** A Definition Element that specifies a collection of geometry that is meant to be reused across Geometric\n * Element instances. Leveraging Geometry Parts can help reduce file size and improve display performance.\n * @public\n */\nexport class GeometryPart extends DefinitionElement {\n public static override get className(): string { return \"GeometryPart\"; }\n public geom?: GeometryStreamProps;\n public bbox: ElementAlignedBox3d;\n\n protected constructor(props: GeometryPartProps, iModel: IModelDb) {\n super(props, iModel);\n this.geom = props.geom;\n this.bbox = Range3d.fromJSON(props.bbox);\n }\n\n public override toJSON(): GeometryPartProps {\n const val = super.toJSON() as GeometryPartProps;\n val.geom = this.geom;\n val.bbox = this.bbox;\n return val;\n }\n\n /** Create a Code for a GeometryPart element 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 GeometryPart element and provides the scope for its name.\n * @param codeValue The GeometryPart name\n * @note GeometryPart elements are not required to be named (have a non-empty Code).\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.geometryPart);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** The definition element for a line style\n * @public\n */\nexport class LineStyle extends DefinitionElement {\n public static override get className(): string { return \"LineStyle\"; }\n public description?: string;\n public data: string;\n\n protected constructor(props: LineStyleProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n this.data = props.data;\n }\n\n /** Create a Code for a LineStyle definition given a name that is meant to be unique within the scope of the specified model.\n * @param iModel The IModel\n * @param scopeModelId The Id of the DefinitionModel that contains the LineStyle and provides the scope for its name.\n * @param codeValue The name of the LineStyle\n * @returns A LineStyle Code\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n return new Code({ spec: iModel.codeSpecs.getByName(BisCodeSpec.lineStyle).id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Describes how to animate a view of a [[GeometricModel]] to show change over time using a [RenderSchedule.Script]($common).\n * @note This class was introduced in version 01.00.13 of the BisCore ECSchema. It should only be used with [[IModelDb]]s containing that version or newer.\n * @public\n */\nexport class RenderTimeline extends InformationRecordElement {\n public static override get className(): string { return \"RenderTimeline\"; }\n /** A human-readable description of the timeline, which may be an empty string. */\n public description: string;\n /** The JSON representation of the instructions for visualizing change over time.\n * @see [RenderSchedule.Script]($common) for the API for working with the script.\n */\n public scriptProps: RenderSchedule.ScriptProps;\n\n protected constructor(props: RenderTimelineProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description ?? \"\";\n this.scriptProps = RenderTimeline.parseScriptProps(props.script);\n }\n\n public static fromJSON(props: RenderTimelineProps, iModel: IModelDb): RenderTimeline {\n return new RenderTimeline(props, iModel);\n }\n\n public override toJSON(): RenderTimelineProps {\n const props = super.toJSON() as RenderTimelineProps;\n if (this.description.length > 0)\n props.description = this.description;\n\n props.script = JSON.stringify(this.scriptProps);\n return props;\n }\n\n private static parseScriptProps(json: string): RenderSchedule.ScriptProps {\n try {\n return JSON.parse(json);\n } catch {\n return [];\n }\n }\n\n protected override collectReferenceIds(ids: EntityReferenceSet): void {\n super.collectReferenceIds(ids);\n const script = RenderSchedule.Script.fromJSON(this.scriptProps);\n script?.discloseIds(ids);\n }\n\n /** @alpha */\n protected static override onCloned(context: IModelElementCloneContext, sourceProps: RenderTimelineProps, targetProps: RenderTimelineProps): void {\n super.onCloned(context, sourceProps, targetProps);\n if (context.isBetweenIModels)\n targetProps.script = JSON.stringify(this.remapScript(context, this.parseScriptProps(targetProps.script)));\n }\n\n /** Remap Ids when cloning a RenderSchedule.Script between iModels on a DisplayStyle or RenderTimeline.\n * @beta\n */\n public static remapScript(context: IModelElementCloneContext, input: RenderSchedule.ScriptProps): RenderSchedule.ScriptProps {\n const scriptProps: RenderSchedule.ScriptProps = [];\n if (!Array.isArray(input))\n return scriptProps;\n\n const elementIds = new OrderedId64Array();\n for (const model of input) {\n const modelId = context.findTargetElementId(model.modelId);\n if (!Id64.isValid(modelId))\n continue;\n\n model.modelId = modelId;\n scriptProps.push(model);\n for (const element of model.elementTimelines) {\n elementIds.clear();\n for (const sourceId of RenderSchedule.ElementTimeline.getElementIds(element.elementIds)) {\n const targetId = context.findTargetElementId(sourceId);\n if (Id64.isValid(targetId))\n elementIds.insert(targetId);\n }\n\n element.elementIds = CompressedId64Set.compressIds(elementIds);\n }\n }\n\n return scriptProps;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAnnotationGeometry.d.ts","sourceRoot":"","sources":["../../src/TextAnnotationGeometry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAY,cAAc,EAAE,sBAAsB,EAA2D,MAAM,oBAAoB,CAAC;AAC/I,OAAO,EAAE,0BAA0B,EAAE,UAAU,EAAE,aAAa,EAA+C,MAAM,wBAAwB,CAAC;AAG5I,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"TextAnnotationGeometry.d.ts","sourceRoot":"","sources":["../../src/TextAnnotationGeometry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAY,cAAc,EAAE,sBAAsB,EAA2D,MAAM,oBAAoB,CAAC;AAC/I,OAAO,EAAE,0BAA0B,EAAE,UAAU,EAAE,aAAa,EAA+C,MAAM,wBAAwB,CAAC;AAG5I,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAiMtC;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD,yDAAyD;IACzD,UAAU,EAAE,cAAc,CAAC;IAC3B,6DAA6D;IAC7D,MAAM,EAAE,QAAQ,CAAC;IACjB;;OAEG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,kCAAkC;IAClC,gBAAgB,CAAC,EAAE,0BAA0B,CAAC;IAC9C,kCAAkC;IAClC,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,kCAAkC;IAClC,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,iCAAiC,GAAG,sBAAsB,CAW7G"}
|
|
@@ -116,26 +116,53 @@ function produceTextBlockGeometry(layout, documentTransform, debugAnchorPt) {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
if (debugAnchorPt) {
|
|
119
|
-
// Draw lines representing the horizontal and vertical ranges, intersecting at the anchor point.
|
|
120
119
|
context.entries.push({
|
|
121
|
-
color: core_common_1.ColorDef.
|
|
120
|
+
color: core_common_1.ColorDef.blue.toJSON()
|
|
121
|
+
});
|
|
122
|
+
// Draw a blue box to show the element's margin
|
|
123
|
+
const marginCorners = layout.range.corners3d(true);
|
|
124
|
+
documentTransform.multiplyPoint3dArrayInPlace(marginCorners);
|
|
125
|
+
marginCorners.forEach((corner, index) => {
|
|
126
|
+
const next = marginCorners[index + 1];
|
|
127
|
+
if (!next)
|
|
128
|
+
return;
|
|
129
|
+
context.entries.push({
|
|
130
|
+
separator: {
|
|
131
|
+
startPoint: [corner.x, corner.y, 0],
|
|
132
|
+
endPoint: [next.x, next.y, 0],
|
|
133
|
+
},
|
|
134
|
+
});
|
|
122
135
|
});
|
|
123
|
-
|
|
124
|
-
const ly = layout.range.low.y - debugAnchorPt.y;
|
|
125
|
-
const hx = layout.range.high.x - debugAnchorPt.x;
|
|
126
|
-
const hy = layout.range.high.y - debugAnchorPt.y;
|
|
136
|
+
// Draw a blue x to show the anchor point - Rotation occurs around this point. The x will be 1 m by 1 m.
|
|
127
137
|
context.entries.push({
|
|
128
138
|
separator: {
|
|
129
|
-
startPoint: [
|
|
130
|
-
endPoint: [
|
|
139
|
+
startPoint: [debugAnchorPt.x - 1, debugAnchorPt.y - 1, 0],
|
|
140
|
+
endPoint: [debugAnchorPt.x + 1, debugAnchorPt.y + 1, 0],
|
|
131
141
|
},
|
|
132
142
|
});
|
|
133
143
|
context.entries.push({
|
|
134
144
|
separator: {
|
|
135
|
-
startPoint: [
|
|
136
|
-
endPoint: [
|
|
145
|
+
startPoint: [debugAnchorPt.x + 1, debugAnchorPt.y - 1, 0],
|
|
146
|
+
endPoint: [debugAnchorPt.x - 1, debugAnchorPt.y + 1, 0],
|
|
137
147
|
},
|
|
138
148
|
});
|
|
149
|
+
// Draw a red box to show the text range
|
|
150
|
+
context.entries.push({
|
|
151
|
+
color: core_common_1.ColorDef.red.toJSON(),
|
|
152
|
+
});
|
|
153
|
+
const rangeCorners = layout.textRange.corners3d(true);
|
|
154
|
+
documentTransform.multiplyPoint3dArrayInPlace(rangeCorners);
|
|
155
|
+
rangeCorners.forEach((corner, index) => {
|
|
156
|
+
const next = rangeCorners[index + 1];
|
|
157
|
+
if (!next)
|
|
158
|
+
return;
|
|
159
|
+
context.entries.push({
|
|
160
|
+
separator: {
|
|
161
|
+
startPoint: [corner.x, corner.y, 0],
|
|
162
|
+
endPoint: [next.x, next.y, 0],
|
|
163
|
+
},
|
|
164
|
+
});
|
|
165
|
+
});
|
|
139
166
|
}
|
|
140
167
|
return { entries: context.entries };
|
|
141
168
|
}
|
|
@@ -151,7 +178,7 @@ function produceTextAnnotationGeometry(args) {
|
|
|
151
178
|
});
|
|
152
179
|
const dimensions = layout.range;
|
|
153
180
|
const transform = args.annotation.computeTransform(dimensions);
|
|
154
|
-
const anchorPoint = args.debugAnchorPointAndRange ? args.annotation.computeAnchorPoint(dimensions) : undefined;
|
|
181
|
+
const anchorPoint = args.debugAnchorPointAndRange ? transform.multiplyPoint3d(args.annotation.computeAnchorPoint(dimensions)) : undefined;
|
|
155
182
|
return produceTextBlockGeometry(layout, transform, anchorPoint);
|
|
156
183
|
}
|
|
157
184
|
//# sourceMappingURL=TextAnnotationGeometry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAnnotationGeometry.js","sourceRoot":"","sources":["../../src/TextAnnotationGeometry.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAkMH,sEAWC;AA3MD,oDAA+I;AAC/I,iEAA4I;AAC5I,wDAA4F;AAC5F,sDAA6C;AAQ7C,SAAS,QAAQ,CAAC,KAAqB,EAAE,OAAwB;IAC/D,IAAI,KAAK,KAAK,OAAO,CAAC,QAAQ,EAAE,CAAC;QAC/B,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC;QACzB,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAClC,CAAC;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAY,EAAE,GAAc,EAAE,MAAgB;IACtE,IAAA,qBAAM,EAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAExB,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC;IAE9E,OAAO,IAAI,wBAAU,CAAC;QACpB,IAAI;QACJ,IAAI,EAAE,GAAG,CAAC,MAAM;QAChB,MAAM,EAAE,UAAU;QAClB,WAAW;QACX,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,QAAQ;QAChB,SAAS,EAAE,YAAY;QACvB,MAAM;KACP,CAAC,CAAC;AACL,CAAC;AAED,SAAS,cAAc,CAAC,GAAc,EAAE,SAAoB,EAAE,OAAwB;IACpF,IAAA,qBAAM,EAAC,GAAG,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC;IACnC,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,G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;IAED,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;AACtC,CAAC;AAsBD;;;;GAIG;AACH,SAAgB,6BAA6B,CAAC,IAAuC;IACnF,MAAM,MAAM,GAAG,IAAA,sCAAe,EAAC;QAC7B,GAAG,IAAI;QACP,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,SAAS;KACrC,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC;IAChC,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAE/D,MAAM,WAAW,GAAG,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/G,OAAO,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;AAClE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ElementGeometry\n */\n\nimport { ColorDef, TextAnnotation, TextBlockGeometryProps, TextBlockGeometryPropsEntry, TextString, TextStyleColor } from \"@itwin/core-common\";\nimport { ComputeRangesForTextLayout, FindFontId, FindTextStyle, layoutTextBlock, RunLayout, TextBlockLayout } from \"./TextAnnotationLayout\";\nimport { LineSegment3d, Point3d, Range2d, Transform, Vector2d } from \"@itwin/core-geometry\";\nimport { assert } from \"@itwin/core-bentley\";\nimport { IModelDb } from \"./IModelDb\";\n\ninterface GeometryContext {\n curColor?: TextStyleColor;\n entries: TextBlockGeometryPropsEntry[];\n}\n\nfunction setColor(color: TextStyleColor, context: GeometryContext): void {\n if (color !== context.curColor) {\n context.curColor = color;\n context.entries.push({ color });\n }\n}\n\nfunction createTextString(text: string, run: RunLayout, origin?: Point3d): TextString {\n assert(text.length > 0);\n\n const { lineHeight, widthFactor, isBold, isItalic, isUnderlined } = run.style;\n\n return new TextString({\n text,\n font: run.fontId,\n height: lineHeight,\n widthFactor,\n bold: isBold,\n italic: isItalic,\n underline: isUnderlined,\n origin,\n });\n}\n\nfunction processTextRun(run: RunLayout, transform: Transform, context: GeometryContext): void {\n assert(run.source.type === \"text\");\n const text = run.source.content.substring(run.charOffset, run.charOffset + run.numChars);\n if (text.length === 0) {\n return;\n }\n\n const ts = createTextString(text, run);\n if (\"none\" !== run.source.baselineShift) {\n const isSub = \"subscript\" === run.source.baselineShift;\n const offsetFactor = run.style[isSub ? \"subScriptOffsetFactor\" : \"superScriptOffsetFactor\"];\n const scale = run.style[isSub ? \"subScriptScale\" : \"superScriptScale\"];\n\n ts.origin.y += offsetFactor * ts.height;\n ts.height *= scale;\n }\n\n ts.transformInPlace(transform);\n\n setColor(run.style.color, context);\n context.entries.push({ text: ts});\n}\n\nfunction createFractionTextString(text: string, run: RunLayout, origin: Point3d, transform: Transform): TextString {\n const ts = createTextString(text, run, origin);\n assert(undefined !== ts.widthFactor);\n\n ts.height *= run.style.stackedFractionScale;\n\n ts.transformInPlace(transform);\n\n return ts;\n}\n\nfunction processFractionRun(run: RunLayout, transform: Transform, context: GeometryContext): void {\n const source = run.source;\n assert(source.type === \"fraction\");\n\n if (source.numerator.length === 0 && source.denominator.length === 0) {\n return;\n }\n\n assert(undefined !== run.numeratorRange && undefined !== run.denominatorRange);\n\n const fontSize = new Vector2d(run.style.lineHeight * run.style.widthFactor, run.style.lineHeight);\n fontSize.scale(run.style.stackedFractionScale, fontSize);\n\n const numeratorOffset = new Point3d(run.numeratorRange.low.x, run.numeratorRange.low.y, 0);\n const denominatorOffset = new Point3d(run.denominatorRange.low.x, run.denominatorRange.low.y, 0);\n\n setColor(run.style.color, context);\n\n if (source.numerator.length > 0) {\n context.entries.push({ text: createFractionTextString(source.numerator, run, numeratorOffset, transform) });\n }\n\n const numeratorRange = Range2d.fromJSON(run.numeratorRange);\n const denominatorRange = Range2d.fromJSON(run.denominatorRange);\n\n let separator: LineSegment3d;\n if (run.style.stackedFractionType === \"horizontal\") {\n const fractionWidth = Math.max(numeratorRange.xLength(), denominatorRange.xLength());\n const y = 1.25 * denominatorRange.yLength();\n separator = LineSegment3d.createXYXY(0, y, fractionWidth, y);\n } else {\n const p0 = new Point3d(denominatorRange.low.x - fontSize.x / 2, denominatorRange.low.y + fontSize.y * (1 / 3), 0);\n const p1 = new Point3d(p0.x + fontSize.x, p0.y + fontSize.y * 1.5, 0);\n separator = LineSegment3d.createCapture(p0, p1);\n }\n\n separator.tryTransformInPlace(transform);\n\n context.entries.push({\n separator: {\n startPoint: separator.point0Ref.toJSON(),\n endPoint: separator.point1Ref.toJSON(),\n },\n });\n\n if (source.denominator.length > 0) {\n context.entries.push({ text: createFractionTextString(source.denominator, run,denominatorOffset, transform) });\n }\n}\n\nfunction produceTextBlockGeometry(layout: TextBlockLayout, documentTransform: Transform, debugAnchorPt?: Point3d): TextBlockGeometryProps {\n const context: GeometryContext = { entries: [] };\n for (const line of layout.lines) {\n const lineTrans = Transform.createTranslationXYZ(line.offsetFromDocument.x, line.offsetFromDocument.y, 0);\n for (const run of line.runs) {\n if (\"linebreak\" === run.source.type) {\n continue;\n }\n\n const runTrans = Transform.createTranslationXYZ(run.offsetFromLine.x, run.offsetFromLine.y, 0);\n lineTrans.multiplyTransformTransform(runTrans, runTrans);\n documentTransform.multiplyTransformTransform(runTrans, runTrans);\n if (\"text\" === run.source.type) {\n processTextRun(run, runTrans, context);\n } else {\n processFractionRun(run, runTrans, context);\n }\n }\n }\n\n if (debugAnchorPt) {\n // Draw lines representing the horizontal and vertical ranges, intersecting at the anchor point.\n context.entries.push({\n color: ColorDef.red.toJSON(),\n });\n\n const lx = layout.range.low.x - debugAnchorPt.x;\n const ly = layout.range.low.y - debugAnchorPt.y;\n const hx = layout.range.high.x - debugAnchorPt.x;\n const hy = layout.range.high.y - debugAnchorPt.y;\n\n context.entries.push({\n separator: {\n startPoint: [lx, 0, 0],\n endPoint: [hx, 0, 0],\n },\n });\n context.entries.push({\n separator: {\n startPoint: [0, ly, 0],\n endPoint: [0, hy, 0],\n },\n });\n }\n\n return { entries: context.entries };\n}\n\n/** Arguments supplied to [[produceTextAnnotationGeometry]].\n * @beta\n */\nexport interface ProduceTextAnnotationGeometryArgs {\n /** The annotation from which to produce the geometry. */\n annotation: TextAnnotation;\n /** The iModel from which to obtain fonts and text styles. */\n iModel: IModelDb;\n /** For debugging purposes only, whether to include geometry representing the bounding box and anchor point of the annotation.\n * If true, two red lines indicating the horizontal and vertical extents of the bounding box will be included, intersecting at the anchor point.\n */\n debugAnchorPointAndRange?: boolean;\n /** @internal chiefly for tests */\n computeTextRange?: ComputeRangesForTextLayout;\n /** @internal chiefly for tests */\n findTextStyle?: FindTextStyle;\n /** @internal chiefly for tests */\n findFontId?: FindFontId;\n}\n\n/** Produce a geometric representation of a text annotation, with the annotation's anchor point at the origin.\n * The result can be supplied to [GeometryStreamBuilder.appendTextBlock]($common).\n * @see [[TextAnnotation2d.setAnnotation]] and [[TextAnnotation3d.setAnnotation]] to update the annotation, geometry, and placement of an annotation element.\n * @beta\n */\nexport function produceTextAnnotationGeometry(args: ProduceTextAnnotationGeometryArgs): TextBlockGeometryProps {\n const layout = layoutTextBlock({\n ...args,\n textBlock: args.annotation.textBlock,\n });\n\n const dimensions = layout.range;\n const transform = args.annotation.computeTransform(dimensions);\n\n const anchorPoint = args.debugAnchorPointAndRange ? args.annotation.computeAnchorPoint(dimensions) : undefined;\n return produceTextBlockGeometry(layout, transform, anchorPoint);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TextAnnotationGeometry.js","sourceRoot":"","sources":["../../src/TextAnnotationGeometry.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAgOH,sEAWC;AAzOD,oDAA+I;AAC/I,iEAA4I;AAC5I,wDAA4F;AAC5F,sDAA6C;AA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AAC,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC1I,OAAO,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;AAClE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ElementGeometry\n */\n\nimport { ColorDef, TextAnnotation, TextBlockGeometryProps, TextBlockGeometryPropsEntry, TextString, TextStyleColor } from \"@itwin/core-common\";\nimport { ComputeRangesForTextLayout, FindFontId, FindTextStyle, layoutTextBlock, RunLayout, TextBlockLayout } from \"./TextAnnotationLayout\";\nimport { LineSegment3d, Point3d, Range2d, Transform, Vector2d } from \"@itwin/core-geometry\";\nimport { assert } from \"@itwin/core-bentley\";\nimport { IModelDb } from \"./IModelDb\";\n\ninterface GeometryContext {\n curColor?: TextStyleColor;\n entries: TextBlockGeometryPropsEntry[];\n}\n\nfunction setColor(color: TextStyleColor, context: GeometryContext): void {\n if (color !== context.curColor) {\n context.curColor = color;\n context.entries.push({ color });\n }\n}\n\nfunction createTextString(text: string, run: RunLayout, origin?: Point3d): TextString {\n assert(text.length > 0);\n\n const { lineHeight, widthFactor, isBold, isItalic, isUnderlined } = run.style;\n\n return new TextString({\n text,\n font: run.fontId,\n height: lineHeight,\n widthFactor,\n bold: isBold,\n italic: isItalic,\n underline: isUnderlined,\n origin,\n });\n}\n\nfunction processTextRun(run: RunLayout, transform: Transform, context: GeometryContext): void {\n assert(run.source.type === \"text\");\n const text = run.source.content.substring(run.charOffset, run.charOffset + run.numChars);\n if (text.length === 0) {\n return;\n }\n\n const ts = createTextString(text, run);\n if (\"none\" !== run.source.baselineShift) {\n const isSub = \"subscript\" === run.source.baselineShift;\n const offsetFactor = run.style[isSub ? \"subScriptOffsetFactor\" : \"superScriptOffsetFactor\"];\n const scale = run.style[isSub ? \"subScriptScale\" : \"superScriptScale\"];\n\n ts.origin.y += offsetFactor * ts.height;\n ts.height *= scale;\n }\n\n ts.transformInPlace(transform);\n\n setColor(run.style.color, context);\n context.entries.push({ text: ts });\n}\n\nfunction createFractionTextString(text: string, run: RunLayout, origin: Point3d, transform: Transform): TextString {\n const ts = createTextString(text, run, origin);\n assert(undefined !== ts.widthFactor);\n\n ts.height *= run.style.stackedFractionScale;\n\n ts.transformInPlace(transform);\n\n return ts;\n}\n\nfunction processFractionRun(run: RunLayout, transform: Transform, context: GeometryContext): void {\n const source = run.source;\n assert(source.type === \"fraction\");\n\n if (source.numerator.length === 0 && source.denominator.length === 0) {\n return;\n }\n\n assert(undefined !== run.numeratorRange && undefined !== run.denominatorRange);\n\n const fontSize = new Vector2d(run.style.lineHeight * run.style.widthFactor, run.style.lineHeight);\n fontSize.scale(run.style.stackedFractionScale, fontSize);\n\n const numeratorOffset = new Point3d(run.numeratorRange.low.x, run.numeratorRange.low.y, 0);\n const denominatorOffset = new Point3d(run.denominatorRange.low.x, run.denominatorRange.low.y, 0);\n\n setColor(run.style.color, context);\n\n if (source.numerator.length > 0) {\n context.entries.push({ text: createFractionTextString(source.numerator, run, numeratorOffset, transform) });\n }\n\n const numeratorRange = Range2d.fromJSON(run.numeratorRange);\n const denominatorRange = Range2d.fromJSON(run.denominatorRange);\n\n let separator: LineSegment3d;\n if (run.style.stackedFractionType === \"horizontal\") {\n const fractionWidth = Math.max(numeratorRange.xLength(), denominatorRange.xLength());\n const y = 1.25 * denominatorRange.yLength();\n separator = LineSegment3d.createXYXY(0, y, fractionWidth, y);\n } else {\n const p0 = new Point3d(denominatorRange.low.x - fontSize.x / 2, denominatorRange.low.y + fontSize.y * (1 / 3), 0);\n const p1 = new Point3d(p0.x + fontSize.x, p0.y + fontSize.y * 1.5, 0);\n separator = LineSegment3d.createCapture(p0, p1);\n }\n\n separator.tryTransformInPlace(transform);\n\n context.entries.push({\n separator: {\n startPoint: separator.point0Ref.toJSON(),\n endPoint: separator.point1Ref.toJSON(),\n },\n });\n\n if (source.denominator.length > 0) {\n context.entries.push({ text: createFractionTextString(source.denominator, run, denominatorOffset, transform) });\n }\n}\n\nfunction produceTextBlockGeometry(layout: TextBlockLayout, documentTransform: Transform, debugAnchorPt?: Point3d): TextBlockGeometryProps {\n const context: GeometryContext = { entries: [] };\n for (const line of layout.lines) {\n const lineTrans = Transform.createTranslationXYZ(line.offsetFromDocument.x, line.offsetFromDocument.y, 0);\n for (const run of line.runs) {\n if (\"linebreak\" === run.source.type) {\n continue;\n }\n\n const runTrans = Transform.createTranslationXYZ(run.offsetFromLine.x, run.offsetFromLine.y, 0);\n lineTrans.multiplyTransformTransform(runTrans, runTrans);\n documentTransform.multiplyTransformTransform(runTrans, runTrans);\n if (\"text\" === run.source.type) {\n processTextRun(run, runTrans, context);\n } else {\n processFractionRun(run, runTrans, context);\n }\n }\n }\n\n if (debugAnchorPt) {\n context.entries.push({\n color: ColorDef.blue.toJSON()\n });\n\n // Draw a blue box to show the element's margin\n const marginCorners = layout.range.corners3d(true);\n documentTransform.multiplyPoint3dArrayInPlace(marginCorners);\n marginCorners.forEach((corner, index) => {\n const next = marginCorners[index + 1];\n if (!next) return;\n\n context.entries.push({\n separator: {\n startPoint: [corner.x, corner.y, 0],\n endPoint: [next.x, next.y, 0],\n },\n });\n });\n\n // Draw a blue x to show the anchor point - Rotation occurs around this point. The x will be 1 m by 1 m.\n context.entries.push({\n separator: {\n startPoint: [debugAnchorPt.x - 1, debugAnchorPt.y - 1, 0],\n endPoint: [debugAnchorPt.x + 1, debugAnchorPt.y + 1, 0],\n },\n });\n\n context.entries.push({\n separator: {\n startPoint: [debugAnchorPt.x + 1, debugAnchorPt.y - 1, 0],\n endPoint: [debugAnchorPt.x - 1, debugAnchorPt.y + 1, 0],\n },\n });\n\n // Draw a red box to show the text range\n context.entries.push({\n color: ColorDef.red.toJSON(),\n });\n\n const rangeCorners = layout.textRange.corners3d(true);\n documentTransform.multiplyPoint3dArrayInPlace(rangeCorners);\n rangeCorners.forEach((corner, index) => {\n const next = rangeCorners[index + 1];\n if (!next) return;\n\n context.entries.push({\n separator: {\n startPoint: [corner.x, corner.y, 0],\n endPoint: [next.x, next.y, 0],\n },\n });\n });\n }\n\n return { entries: context.entries };\n}\n\n/** Arguments supplied to [[produceTextAnnotationGeometry]].\n * @beta\n */\nexport interface ProduceTextAnnotationGeometryArgs {\n /** The annotation from which to produce the geometry. */\n annotation: TextAnnotation;\n /** The iModel from which to obtain fonts and text styles. */\n iModel: IModelDb;\n /** For debugging purposes only, whether to include geometry representing the bounding box and anchor point of the annotation.\n * If true, two red lines indicating the horizontal and vertical extents of the bounding box will be included, intersecting at the anchor point.\n */\n debugAnchorPointAndRange?: boolean;\n /** @internal chiefly for tests */\n computeTextRange?: ComputeRangesForTextLayout;\n /** @internal chiefly for tests */\n findTextStyle?: FindTextStyle;\n /** @internal chiefly for tests */\n findFontId?: FindFontId;\n}\n\n/** Produce a geometric representation of a text annotation, with the annotation's anchor point at the origin.\n * The result can be supplied to [GeometryStreamBuilder.appendTextBlock]($common).\n * @see [[TextAnnotation2d.setAnnotation]] and [[TextAnnotation3d.setAnnotation]] to update the annotation, geometry, and placement of an annotation element.\n * @beta\n */\nexport function produceTextAnnotationGeometry(args: ProduceTextAnnotationGeometryArgs): TextBlockGeometryProps {\n const layout = layoutTextBlock({\n ...args,\n textBlock: args.annotation.textBlock,\n });\n\n const dimensions = layout.range;\n const transform = args.annotation.computeTransform(dimensions);\n\n const anchorPoint = args.debugAnchorPointAndRange ? transform.multiplyPoint3d(args.annotation.computeAnchorPoint(dimensions)) : undefined;\n return produceTextBlockGeometry(layout, transform, anchorPoint);\n}\n"]}
|
|
@@ -157,6 +157,9 @@ export declare class LineLayout {
|
|
|
157
157
|
*/
|
|
158
158
|
export declare class TextBlockLayout {
|
|
159
159
|
source: TextBlock;
|
|
160
|
+
/** @internal: This is primarily for debugging purposes. This is the range of text geometry */
|
|
161
|
+
textRange: Range2d;
|
|
162
|
+
/** The range including margins of the [[TextBlock]]. */
|
|
160
163
|
range: Range2d;
|
|
161
164
|
lines: LineLayout[];
|
|
162
165
|
private _context;
|
|
@@ -168,6 +171,7 @@ export declare class TextBlockLayout {
|
|
|
168
171
|
private populateLines;
|
|
169
172
|
private justifyLines;
|
|
170
173
|
private flushLine;
|
|
174
|
+
private applyMargins;
|
|
171
175
|
}
|
|
172
176
|
export {};
|
|
173
177
|
//# sourceMappingURL=TextAnnotationLayout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAnnotationLayout.d.ts","sourceRoot":"","sources":["../../src/TextAnnotationLayout.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAE,GAAG,EAAE,eAAe,EAAE,SAAS,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"TextAnnotationLayout.d.ts","sourceRoot":"","sources":["../../src/TextAnnotationLayout.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAE,GAAG,EAAE,eAAe,EAAE,SAAS,EAAE,qBAAqB,EAAoB,OAAO,EAAE,iBAAiB,EAA0B,MAAM,oBAAoB,CAAC;AAC7O,OAAO,EAAY,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAItC,gBAAgB;AAChB,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAA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B;IAOxC,yEAAyE;IAClE,SAAS,IAAI,MAAM;IAI1B,OAAO,KAAK,KAAK,GAGhB;IAED,OAAO,CAAC,aAAa;IAqDrB,OAAO,CAAC,YAAY;IA6BpB,OAAO,CAAC,SAAS;IAqCjB,OAAO,CAAC,YAAY;CAoBrB"}
|
|
@@ -373,6 +373,9 @@ exports.LineLayout = LineLayout;
|
|
|
373
373
|
*/
|
|
374
374
|
class TextBlockLayout {
|
|
375
375
|
source;
|
|
376
|
+
/** @internal: This is primarily for debugging purposes. This is the range of text geometry */
|
|
377
|
+
textRange = new core_geometry_1.Range2d();
|
|
378
|
+
/** The range including margins of the [[TextBlock]]. */
|
|
376
379
|
range = new core_geometry_1.Range2d();
|
|
377
380
|
lines = [];
|
|
378
381
|
_context;
|
|
@@ -380,16 +383,17 @@ class TextBlockLayout {
|
|
|
380
383
|
this._context = context;
|
|
381
384
|
this.source = source;
|
|
382
385
|
if (source.width > 0) {
|
|
383
|
-
this.
|
|
384
|
-
this.
|
|
386
|
+
this.textRange.low.x = 0;
|
|
387
|
+
this.textRange.high.x = source.width;
|
|
385
388
|
}
|
|
386
389
|
this.populateLines(context);
|
|
387
390
|
this.justifyLines();
|
|
391
|
+
this.applyMargins(source.margins);
|
|
388
392
|
}
|
|
389
393
|
toResult() {
|
|
390
394
|
return {
|
|
391
395
|
lines: this.lines.map((x) => x.toResult(this.source)),
|
|
392
|
-
range: this.
|
|
396
|
+
range: this.textRange.toJSON(),
|
|
393
397
|
};
|
|
394
398
|
}
|
|
395
399
|
/** Compute a string representation, primarily for debugging purposes. */
|
|
@@ -465,8 +469,8 @@ class TextBlockLayout {
|
|
|
465
469
|
}
|
|
466
470
|
if (minOffset < 0) {
|
|
467
471
|
// Shift left to accommodate lines that exceeded the document's minimum width.
|
|
468
|
-
this.
|
|
469
|
-
this.
|
|
472
|
+
this.textRange.low.x += minOffset;
|
|
473
|
+
this.textRange.high.x += minOffset;
|
|
470
474
|
}
|
|
471
475
|
}
|
|
472
476
|
flushLine(context, line, nextParagraph) {
|
|
@@ -493,10 +497,26 @@ class TextBlockLayout {
|
|
|
493
497
|
}
|
|
494
498
|
line.offsetFromDocument = lineOffset;
|
|
495
499
|
// Update document range from computed line range and position
|
|
496
|
-
this.
|
|
500
|
+
this.textRange.extendRange(line.range.cloneTranslated(lineOffset));
|
|
497
501
|
this.lines.push(line);
|
|
498
502
|
return new LineLayout(nextParagraph);
|
|
499
503
|
}
|
|
504
|
+
applyMargins(margins) {
|
|
505
|
+
this.range = this.textRange.clone();
|
|
506
|
+
if (this.range.isNull)
|
|
507
|
+
return;
|
|
508
|
+
// Disregard negative margins.
|
|
509
|
+
const right = margins.right >= 0 ? margins.right : 0;
|
|
510
|
+
const left = margins.left >= 0 ? margins.left : 0;
|
|
511
|
+
const top = margins.top >= 0 ? margins.top : 0;
|
|
512
|
+
const bottom = margins.bottom >= 0 ? margins.bottom : 0;
|
|
513
|
+
const xHigh = this.textRange.high.x + right;
|
|
514
|
+
const yHigh = this.textRange.high.y + top;
|
|
515
|
+
const xLow = this.textRange.low.x - left;
|
|
516
|
+
const yLow = this.textRange.low.y - bottom;
|
|
517
|
+
this.range.extendXY(xHigh, yHigh);
|
|
518
|
+
this.range.extendXY(xLow, yLow);
|
|
519
|
+
}
|
|
500
520
|
}
|
|
501
521
|
exports.TextBlockLayout = TextBlockLayout;
|
|
502
522
|
//# sourceMappingURL=TextAnnotationLayout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAnnotationLayout.js","sourceRoot":"","sources":["../../src/TextAnnotationLayout.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAmEH,0CAQC;AAQD,oEAGC;AAsBD,wDAqBC;AA/HD,oDAA2N;AAC3N,wDAAyD;AAEzD,sDAAsE;AACtE,yCAAyC;AAoDzC;;;;;;;;GAQG;AACH,SAAgB,eAAe,CAAC,IAAyB;IACvD,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,C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I,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;QAC1D,CAAC;QAED,+BAA+B;QAC/B,MAAM,UAAU,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;QAEtD,oCAAoC;QACpC,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1B,UAAU,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC;YAChD,UAAU,CAAC,CAAC,IAAI,OAAO,CAAC,aAAa,CAAC,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC;QAC7F,CAAC;QAED,IAAI,CAAC,kBAAkB,GAAG,UAAU,CAAC;QAErC,8DAA8D;QAC9D,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC;QAE/D,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtB,OAAO,IAAI,UAAU,CAAC,aAAa,CAAC,CAAC;IACvC,CAAC;CACF;AA1JD,0CA0JC","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 ElementGeometry\n */\n\nimport { BaselineShift, FontId, FontType, FractionRun, LineLayoutResult, Paragraph, Run, RunLayoutResult, TextBlock, TextBlockLayoutResult, TextRun, TextStyleSettings, TextStyleSettingsProps } from \"@itwin/core-common\";\nimport { Geometry, Range2d } from \"@itwin/core-geometry\";\nimport { IModelDb } from \"./IModelDb\";\nimport { assert, NonFunctionPropertiesOf } from \"@itwin/core-bentley\";\nimport * as LineBreaker from \"linebreak\";\n\n/** @internal */\nexport interface TextLayoutRanges {\n layout: Range2d;\n justification: Range2d;\n}\n\n/** Arguments to [[ComputeRangesForTextLayout]].\n * @internal\n */\nexport interface ComputeRangesForTextLayoutArgs {\n chars: string;\n bold: boolean;\n italic: boolean;\n baselineShift: BaselineShift;\n fontId: FontId;\n widthFactor: number;\n lineHeight: number;\n}\n\n/** A function that uses a font to compute the layout and justification ranges of a string of text.\n * @internal\n */\nexport type ComputeRangesForTextLayout = (args: ComputeRangesForTextLayoutArgs) => TextLayoutRanges;\n\n/** A function that looks up the font Id corresponding to a [FontFamilyDescriptor]($common).\n * If no type is provided, the function can return a font of any type matching `name` (there may be more than one, of different types).\n * @internal\n */\nexport type FindFontId = (name: string, type?: FontType) => FontId;\n\n/** @internal */\nexport type FindTextStyle = (name: string) => TextStyleSettings;\n\n/**\n * Arguments supplied to [[computeLayoutTextBlockResult]].\n * @beta\n */\nexport interface LayoutTextBlockArgs {\n /** The text block whose extents are to be computed. */\n textBlock: TextBlock;\n /** The iModel from which to obtain fonts and [TextStyle]($common)s when laying out glyphs. */\n iModel: IModelDb;\n /** @internal chiefly for tests, by default uses IModelJsNative.DgnDb.computeRangesForText. */\n computeTextRange?: ComputeRangesForTextLayout;\n /** @internal chiefly for tests, by default looks up styles from a workspace. */\n findTextStyle?: FindTextStyle;\n /** @internal chiefly for tests, by default uses IModelDb.fontMap. */\n findFontId?: FindFontId;\n}\n\n/**\n * Lays out the contents of a TextBlock into a series of lines containing runs.\n * Each paragraph is decomposed into a series of lines.\n * Each series of consecutive non-linebreak runs within a paragraph is concatenated into one line.\n * If the document specifies a width > 0, individual lines are split to try to avoid exceeding that width.\n * Individual TextRuns can be split onto multiple lines at word boundaries if necessary. Individual FractionRuns are never split.\n * @see [[computeLayoutTextBlockResult]]\n * @internal\n */\nexport function layoutTextBlock(args: LayoutTextBlockArgs): TextBlockLayout {\n const findFontId = args.findFontId ?? ((name, type) => args.iModel.fonts.findId({ name, type }) ?? 0);\n const computeTextRange = args.computeTextRange ?? ((x) => args.iModel.computeRangesForText(x));\n\n // ###TODO finding text styles in workspaces.\n const findTextStyle = args.findTextStyle ?? (() => TextStyleSettings.fromJSON());\n\n return new TextBlockLayout(args.textBlock, new LayoutContext(args.textBlock, computeTextRange, findTextStyle, findFontId));\n}\n\n/**\n * Gets the result of laying out the the contents of a TextBlock into a series of lines containing runs.\n * The visual layout accounts for the [TextStyle]($common)s, fonts, and [TextBlock.width]($common). It applies word-wrapping if needed.\n * The layout returned matches the visual layout of the geometry produced by [[produceTextAnnotationGeometry]].\n * @beta\n */\nexport function computeLayoutTextBlockResult(args: LayoutTextBlockArgs): TextBlockLayoutResult {\n const layout = layoutTextBlock(args);\n return layout.toResult();\n}\n\n/**\n * Arguments supplied to [[computeGraphemeOffsets]].\n * @beta\n */\nexport interface ComputeGraphemeOffsetsArgs extends LayoutTextBlockArgs {\n /** The index of the [Paragraph]($common) in the text block that contains the run layout result text. */\n paragraphIndex: number;\n /** The run layout result for which grapheme ranges will be computed. */\n runLayoutResult: RunLayoutResult;\n /** An array of starting character indexes for each grapheme. Each entry represents the index of the first character in a grapheme. */\n graphemeCharIndexes: number[];\n};\n\n/**\n * Computes the range from the start of a [RunLayoutResult]($common) to the trailing edge of each grapheme.\n * It is the responsibility of the caller to determine the number and character indexes of the graphemes.\n * @returns If the [RunLayoutResult]($common)'s source is a [TextRun]($common), it returns an array containing the range of each grapheme.\n * Otherwise, it returns and empty array.\n * @beta\n */\nexport function computeGraphemeOffsets(args: ComputeGraphemeOffsetsArgs): Range2d[] {\n const { textBlock, paragraphIndex, runLayoutResult, graphemeCharIndexes, iModel } = args;\n const findFontId = args.findFontId ?? ((name, type) => iModel.fonts.findId({ name, type }) ?? 0);\n const computeTextRange = args.computeTextRange ?? ((x) => iModel.computeRangesForText(x));\n const findTextStyle = args.findTextStyle ?? (() => TextStyleSettings.fromJSON());\n const source = textBlock.paragraphs[paragraphIndex].runs[runLayoutResult.sourceRunIndex];\n\n if (source.type !== \"text\" || runLayoutResult.characterCount === 0) {\n return [];\n }\n\n const style = TextStyleSettings.fromJSON(runLayoutResult.textStyle);\n\n const layoutContext = new LayoutContext(textBlock, computeTextRange, findTextStyle, findFontId);\n const graphemeRanges: Range2d[] = [];\n\n graphemeCharIndexes.forEach((_, index) => {\n const nextGraphemeCharIndex = graphemeCharIndexes[index + 1] ?? runLayoutResult.characterCount;\n graphemeRanges.push(layoutContext.computeRangeForTextRun(style, source, runLayoutResult.characterOffset, nextGraphemeCharIndex).layout);\n });\n return graphemeRanges;\n}\n\nfunction scaleRange(range: Range2d, scale: number): void {\n range.low.scaleInPlace(scale);\n range.high.scaleInPlace(scale);\n}\n\nfunction applyBlockSettings(target: TextStyleSettings, source: TextStyleSettings | TextStyleSettingsProps): TextStyleSettings {\n if (source === target) {\n return target;\n }\n\n const lineSpacingFactor = source.lineSpacingFactor ?? target.lineSpacingFactor;\n const lineHeight = source.lineHeight ?? target.lineHeight;\n const widthFactor = source.widthFactor ?? target.widthFactor;\n\n if (lineSpacingFactor !== target.lineSpacingFactor || lineHeight !== target.lineHeight || widthFactor !== target.widthFactor) {\n target = target.clone({ lineSpacingFactor, lineHeight, widthFactor });\n }\n\n return target;\n}\n\nclass LayoutContext {\n private readonly _textStyles = new Map<string, TextStyleSettings>();\n private readonly _fontIds = new Map<string, FontId>();\n public readonly blockSettings: TextStyleSettings;\n\n public constructor(block: TextBlock, private readonly _computeTextRange: ComputeRangesForTextLayout, private readonly _findTextStyle: FindTextStyle, private readonly _findFontId: FindFontId) {\n const settings = this.findTextStyle(block.styleName);\n this.blockSettings = applyBlockSettings(settings, block.styleOverrides);\n }\n\n public findFontId(name: string): FontId {\n let fontId = this._fontIds.get(name);\n if (undefined === fontId) {\n this._fontIds.set(name, fontId = this._findFontId(name));\n }\n\n return fontId;\n }\n\n public findTextStyle(name: string): TextStyleSettings {\n let style = this._textStyles.get(name);\n if (undefined === style) {\n this._textStyles.set(name, style = this._findTextStyle(name));\n }\n\n return style;\n }\n\n public createRunSettings(run: Run): TextStyleSettings {\n let settings = this.findTextStyle(run.styleName);\n if (run.overridesStyle) {\n settings = settings.clone(run.styleOverrides);\n }\n\n return applyBlockSettings(settings, this.blockSettings);\n }\n\n public computeRangeForText(chars: string, style: TextStyleSettings, baselineShift: BaselineShift): TextLayoutRanges {\n if (chars.length === 0) {\n return {\n layout: new Range2d(0, 0, 0, style.lineHeight),\n justification: new Range2d(),\n };\n }\n\n const fontId = this.findFontId(style.fontName);\n const { layout, justification } = this._computeTextRange({\n chars,\n fontId,\n baselineShift,\n bold: style.isBold,\n italic: style.isItalic,\n lineHeight: this.blockSettings.lineHeight,\n widthFactor: this.blockSettings.widthFactor,\n });\n\n if (\"none\" !== baselineShift) {\n const isSub = \"subscript\" === baselineShift;\n const scale = isSub ? style.subScriptScale : style.superScriptScale;\n const offsetFactor = isSub ? style.subScriptOffsetFactor : style.superScriptOffsetFactor;\n const offset = { x: 0, y: style.lineHeight * offsetFactor };\n\n scaleRange(layout, scale);\n layout.cloneTranslated(offset, layout);\n\n scaleRange(justification, scale);\n justification.cloneTranslated(offset, justification);\n }\n\n return { layout, justification };\n }\n\n public computeRangeForTextRun(style: TextStyleSettings, run: TextRun, charOffset: number, numChars: number): TextLayoutRanges {\n return this.computeRangeForText(run.content.substring(charOffset, charOffset + numChars), style, run.baselineShift);\n }\n\n public computeRangeForFractionRun(style: TextStyleSettings, source: FractionRun): { layout: Range2d, numerator: Range2d, denominator: Range2d } {\n const numerator = this.computeRangeForText(source.numerator, style, \"none\").layout;\n scaleRange(numerator, style.stackedFractionScale);\n\n const denominator = this.computeRangeForText(source.denominator, style, \"none\").layout;\n scaleRange(denominator, style.stackedFractionScale);\n\n const numLen = numerator.xLength();\n const denomLen = denominator.xLength();\n switch (style.stackedFractionType) {\n case \"horizontal\": {\n if (numLen > denomLen) {\n denominator.cloneTranslated({ x: (numLen - denomLen) / 2, y: 0 }, denominator);\n } else {\n numerator.cloneTranslated({ x: (denomLen - numLen) / 2, y: 0 }, numerator);\n }\n\n numerator.cloneTranslated({ x: 0, y: 1.5 * denominator.yLength() }, numerator);\n break;\n }\n case \"diagonal\": {\n numerator.cloneTranslated({ x: 0, y: denominator.yLength() }, numerator);\n denominator.cloneTranslated({ x: numLen, y: 0 }, denominator);\n break;\n }\n }\n\n const layout = numerator.clone();\n layout.extendRange(denominator);\n return { layout, numerator, denominator };\n }\n}\n\ninterface Segment {\n segment: string;\n index: number;\n}\n\nfunction split(source: string): Segment[] {\n if (source.length === 0) {\n return [];\n }\n\n let index = 0;\n const segments: Segment[] = [];\n const breaker = new LineBreaker(source);\n for (let brk = breaker.nextBreak(); brk; brk = breaker.nextBreak()) {\n segments.push({\n segment: source.slice(index, brk.position),\n index,\n });\n\n index = brk.position;\n }\n\n return segments;\n}\n\n/** @internal */\nexport class RunLayout {\n public source: Run;\n public charOffset: number;\n public numChars: number;\n public range: Range2d;\n public justificationRange?: Range2d;\n public denominatorRange?: Range2d;\n public numeratorRange?: Range2d;\n public offsetFromLine: { x: number, y: number };\n public style: TextStyleSettings;\n public fontId: FontId;\n\n private constructor(props: NonFunctionPropertiesOf<RunLayout>) {\n this.source = props.source;\n this.charOffset = props.charOffset;\n this.numChars = props.numChars;\n this.range = props.range;\n this.justificationRange = props.justificationRange;\n this.denominatorRange = props.denominatorRange;\n this.numeratorRange = props.numeratorRange;\n this.offsetFromLine = props.offsetFromLine;\n this.style = props.style;\n this.fontId = props.fontId;\n }\n\n public static create(source: Run, context: LayoutContext): RunLayout {\n const style = context.createRunSettings(source);\n const fontId = context.findFontId(style.fontName);\n const charOffset = 0;\n const offsetFromLine = { x: 0, y: 0 };\n let numChars = 0;\n\n let range, justificationRange, numeratorRange, denominatorRange;\n\n switch (source.type) {\n case \"text\": {\n numChars = source.content.length;\n const ranges = context.computeRangeForTextRun(style, source, charOffset, numChars);\n range = ranges.layout;\n justificationRange = ranges.justification;\n break;\n }\n case \"fraction\": {\n numChars = 1;\n const ranges = context.computeRangeForFractionRun(style, source);\n range = ranges.layout;\n numeratorRange = ranges.numerator;\n denominatorRange = ranges.denominator;\n break;\n }\n default: {\n // We do this so that blank lines space correctly without special casing later.\n range = new Range2d(0, 0, 0, style.lineHeight);\n break;\n }\n }\n\n return new RunLayout({ source, charOffset, numChars, range, justificationRange, denominatorRange, numeratorRange, offsetFromLine, style, fontId });\n }\n\n /** Compute a string representation, primarily for debugging purposes. */\n public stringify(): string {\n return this.source.type === \"text\" ? this.source.content.substring(this.charOffset, this.charOffset + this.numChars) : this.source.stringify();\n }\n\n public canWrap(): this is { source: TextRun } {\n return this.source.type === \"text\";\n }\n\n private cloneForWrap(args: { ranges: TextLayoutRanges, charOffset: number, numChars: number }): RunLayout {\n assert(this.canWrap());\n\n return new RunLayout({\n ...this,\n charOffset: args.charOffset,\n numChars: args.numChars,\n range: args.ranges.layout,\n justificationRange: args.ranges.justification,\n offsetFromLine: { ...this.offsetFromLine },\n });\n }\n\n public split(context: LayoutContext): RunLayout[] {\n assert(this.charOffset === 0, \"cannot re-split a run\");\n if (!this.canWrap() || this.charOffset > 0) {\n return [this];\n }\n\n const myText = this.source.content.substring(this.charOffset, this.charOffset + this.numChars);\n const segments = split(myText);\n\n if (segments.length <= 1) {\n return [this];\n }\n\n return segments.map((segment: any) => {\n return this.cloneForWrap({\n ranges: context.computeRangeForText(segment.segment, this.style, this.source.baselineShift),\n charOffset: segment.index,\n numChars: segment.segment.length,\n });\n });\n }\n\n public toResult(paragraph: Paragraph): RunLayoutResult {\n const result: RunLayoutResult = {\n sourceRunIndex: paragraph.runs.indexOf(this.source),\n fontId: this.fontId,\n characterOffset: this.charOffset,\n characterCount: this.numChars,\n range: this.range.toJSON(),\n offsetFromLine: this.offsetFromLine,\n textStyle: this.style.toJSON(),\n };\n\n if (this.justificationRange) {\n result.justificationRange = this.justificationRange.toJSON();\n }\n\n if (this.numeratorRange) {\n result.numeratorRange = this.numeratorRange.toJSON();\n }\n\n if (this.denominatorRange) {\n result.denominatorRange = this.denominatorRange.toJSON();\n }\n\n return result;\n }\n}\n\n/** @internal */\nexport class LineLayout {\n public source: Paragraph;\n public range = new Range2d(0, 0, 0, 0);\n public justificationRange = new Range2d(0, 0, 0, 0);\n public offsetFromDocument = { x: 0, y: 0 };\n private _runs: RunLayout[] = [];\n\n public constructor(source: Paragraph) {\n this.source = source;\n }\n\n /** Compute a string representation, primarily for debugging purposes. */\n public stringify(): string {\n const runs = this._runs.map((run) => run.stringify());\n return `${runs.join(\"\")}`;\n }\n\n public get runs(): ReadonlyArray<RunLayout> { return this._runs; }\n public get isEmpty() { return this._runs.length === 0; }\n public get back(): RunLayout {\n assert(!this.isEmpty);\n return this._runs[this._runs.length - 1];\n }\n\n public append(run: RunLayout): void {\n this._runs.push(run);\n this.computeRanges();\n }\n\n /** Invoked every time a run is appended,. */\n private computeRanges(): void {\n this.range.low.setZero();\n this.range.high.setZero();\n\n // Some runs (fractions) are taller than others.\n // We want to center each run vertically inside the line.\n let lineHeight = 0;\n for (const run of this._runs) {\n lineHeight = Math.max(lineHeight, run.range.yLength());\n }\n\n for (const run of this._runs) {\n const runHeight = run.range.yLength();\n const runOffset = { x: this.range.high.x, y: (lineHeight - runHeight) / 2 };\n run.offsetFromLine = runOffset;\n\n const runLayoutRange = run.range.cloneTranslated(runOffset);\n this.range.extendRange(runLayoutRange);\n\n if (\"linebreak\" !== run.source.type) {\n const runJustificationRange = run.justificationRange?.cloneTranslated(runOffset);\n this.justificationRange.extendRange(runJustificationRange ?? runLayoutRange);\n }\n }\n }\n\n public toResult(textBlock: TextBlock): LineLayoutResult {\n return {\n sourceParagraphIndex: textBlock.paragraphs.indexOf(this.source),\n runs: this.runs.map((x) => x.toResult(this.source)),\n range: this.range.toJSON(),\n justificationRange: this.justificationRange.toJSON(),\n offsetFromDocument: this.offsetFromDocument,\n };\n }\n}\n\n/**\n * Describes the layout of a text block as a collection of lines containing runs.\n * @internal\n */\nexport class TextBlockLayout {\n public source: TextBlock;\n public range = new Range2d();\n public lines: LineLayout[] = [];\n private _context: LayoutContext;\n\n public constructor(source: TextBlock, context: LayoutContext) {\n this._context = context;\n this.source = source;\n\n if (source.width > 0) {\n this.range.low.x = 0;\n this.range.high.x = source.width;\n }\n\n this.populateLines(context);\n this.justifyLines();\n }\n\n public toResult(): TextBlockLayoutResult {\n return {\n lines: this.lines.map((x) => x.toResult(this.source)),\n range: this.range.toJSON(),\n };\n }\n\n /** Compute a string representation, primarily for debugging purposes. */\n public stringify(): string {\n return this.lines.map((line) => line.stringify()).join(\"\\n\");\n }\n\n private get _back(): LineLayout {\n assert(this.lines.length > 0);\n return this.lines[this.lines.length - 1];\n }\n\n private populateLines(context: LayoutContext): void {\n const doc = this.source;\n if (doc.paragraphs.length === 0) {\n return;\n }\n\n const doWrap = doc.width > 0;\n let curLine = new LineLayout(doc.paragraphs[0]);\n for (let i = 0; i < doc.paragraphs.length; i++) {\n const paragraph = doc.paragraphs[i];\n if (i > 0) {\n curLine = this.flushLine(context, curLine, paragraph);\n }\n\n let runs = paragraph.runs.map((run) => RunLayout.create(run, context));\n if (doWrap) {\n runs = runs.map((run) => run.split(context)).flat();\n }\n\n for (const run of runs) {\n if (\"linebreak\" === run.source.type) {\n curLine.append(run);\n curLine = this.flushLine(context, curLine);\n continue;\n }\n\n if (!doWrap) {\n curLine.append(run);\n continue;\n }\n\n const runWidth = run.range.xLength();\n const lineWidth = curLine.range.xLength();\n if (runWidth + lineWidth < doc.width || Geometry.isAlmostEqualNumber(runWidth + lineWidth, doc.width, Geometry.smallMetricDistance)) {\n curLine.append(run);\n continue;\n }\n\n if (curLine.runs.length === 0) {\n curLine.append(run);\n curLine = this.flushLine(context, curLine);\n } else {\n curLine = this.flushLine(context, curLine);\n curLine.append(run);\n }\n }\n }\n\n if (curLine.runs.length > 0) {\n this.flushLine(context, curLine);\n }\n }\n\n private justifyLines(): void {\n // We don't want to justify empty text, or a single line of text whose width is 0. By default text is already left justified.\n if (this.lines.length < 1 || (this.lines.length === 1 && this.source.width === 0) || \"left\" === this.source.justification) {\n return;\n }\n\n // This is the minimum width of the document's bounding box.\n const docWidth = this.source.width;\n\n let minOffset = Number.MAX_VALUE;\n for (const line of this.lines) {\n const lineWidth = line.justificationRange.xLength();\n\n let offset = docWidth - lineWidth;\n if (\"center\" === this.source.justification) {\n offset = offset / 2;\n }\n\n line.offsetFromDocument.x += offset;\n minOffset = Math.min(offset, minOffset);\n }\n\n if (minOffset < 0) {\n // Shift left to accommodate lines that exceeded the document's minimum width.\n this.range.low.x += minOffset;\n this.range.high.x += minOffset;\n }\n }\n\n private flushLine(context: LayoutContext, line: LineLayout, nextParagraph?: Paragraph): LineLayout {\n nextParagraph = nextParagraph ?? line.source;\n\n // We want to guarantee that each layout line has at least one run.\n if (line.runs.length === 0) {\n // If we're empty, there should always be a preceding run, and it should be a line break.\n if (this.lines.length === 0 || this._back.runs.length === 0) {\n return new LineLayout(nextParagraph);\n }\n\n const prevRun = this._back.back.source;\n assert(prevRun.type === \"linebreak\");\n if (prevRun.type !== \"linebreak\") {\n return new LineLayout(nextParagraph);\n }\n\n line.append(RunLayout.create(prevRun.clone(), context));\n }\n\n // Line origin is its baseline.\n const lineOffset = { x: 0, y: -line.range.yLength() };\n\n // Place it below any existing lines\n if (this.lines.length > 0) {\n lineOffset.y += this._back.offsetFromDocument.y;\n lineOffset.y -= context.blockSettings.lineSpacingFactor * context.blockSettings.lineHeight;\n }\n\n line.offsetFromDocument = lineOffset;\n\n // Update document range from computed line range and position\n this.range.extendRange(line.range.cloneTranslated(lineOffset));\n\n this.lines.push(line);\n return new LineLayout(nextParagraph);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TextAnnotationLayout.js","sourceRoot":"","sources":["../../src/TextAnnotationLayout.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAmEH,0CAQC;AAQD,oEAGC;AAsBD,wDAqBC;AA/HD,oDAA6O;AAC7O,wDAAyD;AAEzD,sDAAsE;AACtE,yCAAyC;AAoDzC;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OAAO,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACrD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAClD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/C,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAExD,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC;QAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC;QAC1C,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;QACzC,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;QAE3C,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAClC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAClC,CAAC;CACF;AArLD,0CAqLC","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 ElementGeometry\n */\n\nimport { BaselineShift, FontId, FontType, FractionRun, LineLayoutResult, Paragraph, Run, RunLayoutResult, TextBlock, TextBlockLayoutResult, TextBlockMargins, TextRun, TextStyleSettings, TextStyleSettingsProps } from \"@itwin/core-common\";\nimport { Geometry, Range2d } from \"@itwin/core-geometry\";\nimport { IModelDb } from \"./IModelDb\";\nimport { assert, NonFunctionPropertiesOf } from \"@itwin/core-bentley\";\nimport * as LineBreaker from \"linebreak\";\n\n/** @internal */\nexport interface TextLayoutRanges {\n layout: Range2d;\n justification: Range2d;\n}\n\n/** Arguments to [[ComputeRangesForTextLayout]].\n * @internal\n */\nexport interface ComputeRangesForTextLayoutArgs {\n chars: string;\n bold: boolean;\n italic: boolean;\n baselineShift: BaselineShift;\n fontId: FontId;\n widthFactor: number;\n lineHeight: number;\n}\n\n/** A function that uses a font to compute the layout and justification ranges of a string of text.\n * @internal\n */\nexport type ComputeRangesForTextLayout = (args: ComputeRangesForTextLayoutArgs) => TextLayoutRanges;\n\n/** A function that looks up the font Id corresponding to a [FontFamilyDescriptor]($common).\n * If no type is provided, the function can return a font of any type matching `name` (there may be more than one, of different types).\n * @internal\n */\nexport type FindFontId = (name: string, type?: FontType) => FontId;\n\n/** @internal */\nexport type FindTextStyle = (name: string) => TextStyleSettings;\n\n/**\n * Arguments supplied to [[computeLayoutTextBlockResult]].\n * @beta\n */\nexport interface LayoutTextBlockArgs {\n /** The text block whose extents are to be computed. */\n textBlock: TextBlock;\n /** The iModel from which to obtain fonts and [TextStyle]($common)s when laying out glyphs. */\n iModel: IModelDb;\n /** @internal chiefly for tests, by default uses IModelJsNative.DgnDb.computeRangesForText. */\n computeTextRange?: ComputeRangesForTextLayout;\n /** @internal chiefly for tests, by default looks up styles from a workspace. */\n findTextStyle?: FindTextStyle;\n /** @internal chiefly for tests, by default uses IModelDb.fontMap. */\n findFontId?: FindFontId;\n}\n\n/**\n * Lays out the contents of a TextBlock into a series of lines containing runs.\n * Each paragraph is decomposed into a series of lines.\n * Each series of consecutive non-linebreak runs within a paragraph is concatenated into one line.\n * If the document specifies a width > 0, individual lines are split to try to avoid exceeding that width.\n * Individual TextRuns can be split onto multiple lines at word boundaries if necessary. Individual FractionRuns are never split.\n * @see [[computeLayoutTextBlockResult]]\n * @internal\n */\nexport function layoutTextBlock(args: LayoutTextBlockArgs): TextBlockLayout {\n const findFontId = args.findFontId ?? ((name, type) => args.iModel.fonts.findId({ name, type }) ?? 0);\n const computeTextRange = args.computeTextRange ?? ((x) => args.iModel.computeRangesForText(x));\n\n // ###TODO finding text styles in workspaces.\n const findTextStyle = args.findTextStyle ?? (() => TextStyleSettings.fromJSON());\n\n return new TextBlockLayout(args.textBlock, new LayoutContext(args.textBlock, computeTextRange, findTextStyle, findFontId));\n}\n\n/**\n * Gets the result of laying out the the contents of a TextBlock into a series of lines containing runs.\n * The visual layout accounts for the [TextStyle]($common)s, fonts, and [TextBlock.width]($common). It applies word-wrapping if needed.\n * The layout returned matches the visual layout of the geometry produced by [[produceTextAnnotationGeometry]].\n * @beta\n */\nexport function computeLayoutTextBlockResult(args: LayoutTextBlockArgs): TextBlockLayoutResult {\n const layout = layoutTextBlock(args);\n return layout.toResult();\n}\n\n/**\n * Arguments supplied to [[computeGraphemeOffsets]].\n * @beta\n */\nexport interface ComputeGraphemeOffsetsArgs extends LayoutTextBlockArgs {\n /** The index of the [Paragraph]($common) in the text block that contains the run layout result text. */\n paragraphIndex: number;\n /** The run layout result for which grapheme ranges will be computed. */\n runLayoutResult: RunLayoutResult;\n /** An array of starting character indexes for each grapheme. Each entry represents the index of the first character in a grapheme. */\n graphemeCharIndexes: number[];\n};\n\n/**\n * Computes the range from the start of a [RunLayoutResult]($common) to the trailing edge of each grapheme.\n * It is the responsibility of the caller to determine the number and character indexes of the graphemes.\n * @returns If the [RunLayoutResult]($common)'s source is a [TextRun]($common), it returns an array containing the range of each grapheme.\n * Otherwise, it returns and empty array.\n * @beta\n */\nexport function computeGraphemeOffsets(args: ComputeGraphemeOffsetsArgs): Range2d[] {\n const { textBlock, paragraphIndex, runLayoutResult, graphemeCharIndexes, iModel } = args;\n const findFontId = args.findFontId ?? ((name, type) => iModel.fonts.findId({ name, type }) ?? 0);\n const computeTextRange = args.computeTextRange ?? ((x) => iModel.computeRangesForText(x));\n const findTextStyle = args.findTextStyle ?? (() => TextStyleSettings.fromJSON());\n const source = textBlock.paragraphs[paragraphIndex].runs[runLayoutResult.sourceRunIndex];\n\n if (source.type !== \"text\" || runLayoutResult.characterCount === 0) {\n return [];\n }\n\n const style = TextStyleSettings.fromJSON(runLayoutResult.textStyle);\n\n const layoutContext = new LayoutContext(textBlock, computeTextRange, findTextStyle, findFontId);\n const graphemeRanges: Range2d[] = [];\n\n graphemeCharIndexes.forEach((_, index) => {\n const nextGraphemeCharIndex = graphemeCharIndexes[index + 1] ?? runLayoutResult.characterCount;\n graphemeRanges.push(layoutContext.computeRangeForTextRun(style, source, runLayoutResult.characterOffset, nextGraphemeCharIndex).layout);\n });\n return graphemeRanges;\n}\n\nfunction scaleRange(range: Range2d, scale: number): void {\n range.low.scaleInPlace(scale);\n range.high.scaleInPlace(scale);\n}\n\nfunction applyBlockSettings(target: TextStyleSettings, source: TextStyleSettings | TextStyleSettingsProps): TextStyleSettings {\n if (source === target) {\n return target;\n }\n\n const lineSpacingFactor = source.lineSpacingFactor ?? target.lineSpacingFactor;\n const lineHeight = source.lineHeight ?? target.lineHeight;\n const widthFactor = source.widthFactor ?? target.widthFactor;\n\n if (lineSpacingFactor !== target.lineSpacingFactor || lineHeight !== target.lineHeight || widthFactor !== target.widthFactor) {\n target = target.clone({ lineSpacingFactor, lineHeight, widthFactor });\n }\n\n return target;\n}\n\nclass LayoutContext {\n private readonly _textStyles = new Map<string, TextStyleSettings>();\n private readonly _fontIds = new Map<string, FontId>();\n public readonly blockSettings: TextStyleSettings;\n\n public constructor(block: TextBlock, private readonly _computeTextRange: ComputeRangesForTextLayout, private readonly _findTextStyle: FindTextStyle, private readonly _findFontId: FindFontId) {\n const settings = this.findTextStyle(block.styleName);\n this.blockSettings = applyBlockSettings(settings, block.styleOverrides);\n }\n\n public findFontId(name: string): FontId {\n let fontId = this._fontIds.get(name);\n if (undefined === fontId) {\n this._fontIds.set(name, fontId = this._findFontId(name));\n }\n\n return fontId;\n }\n\n public findTextStyle(name: string): TextStyleSettings {\n let style = this._textStyles.get(name);\n if (undefined === style) {\n this._textStyles.set(name, style = this._findTextStyle(name));\n }\n\n return style;\n }\n\n public createRunSettings(run: Run): TextStyleSettings {\n let settings = this.findTextStyle(run.styleName);\n if (run.overridesStyle) {\n settings = settings.clone(run.styleOverrides);\n }\n\n return applyBlockSettings(settings, this.blockSettings);\n }\n\n public computeRangeForText(chars: string, style: TextStyleSettings, baselineShift: BaselineShift): TextLayoutRanges {\n if (chars.length === 0) {\n return {\n layout: new Range2d(0, 0, 0, style.lineHeight),\n justification: new Range2d(),\n };\n }\n\n const fontId = this.findFontId(style.fontName);\n const { layout, justification } = this._computeTextRange({\n chars,\n fontId,\n baselineShift,\n bold: style.isBold,\n italic: style.isItalic,\n lineHeight: this.blockSettings.lineHeight,\n widthFactor: this.blockSettings.widthFactor,\n });\n\n if (\"none\" !== baselineShift) {\n const isSub = \"subscript\" === baselineShift;\n const scale = isSub ? style.subScriptScale : style.superScriptScale;\n const offsetFactor = isSub ? style.subScriptOffsetFactor : style.superScriptOffsetFactor;\n const offset = { x: 0, y: style.lineHeight * offsetFactor };\n\n scaleRange(layout, scale);\n layout.cloneTranslated(offset, layout);\n\n scaleRange(justification, scale);\n justification.cloneTranslated(offset, justification);\n }\n\n return { layout, justification };\n }\n\n public computeRangeForTextRun(style: TextStyleSettings, run: TextRun, charOffset: number, numChars: number): TextLayoutRanges {\n return this.computeRangeForText(run.content.substring(charOffset, charOffset + numChars), style, run.baselineShift);\n }\n\n public computeRangeForFractionRun(style: TextStyleSettings, source: FractionRun): { layout: Range2d, numerator: Range2d, denominator: Range2d } {\n const numerator = this.computeRangeForText(source.numerator, style, \"none\").layout;\n scaleRange(numerator, style.stackedFractionScale);\n\n const denominator = this.computeRangeForText(source.denominator, style, \"none\").layout;\n scaleRange(denominator, style.stackedFractionScale);\n\n const numLen = numerator.xLength();\n const denomLen = denominator.xLength();\n switch (style.stackedFractionType) {\n case \"horizontal\": {\n if (numLen > denomLen) {\n denominator.cloneTranslated({ x: (numLen - denomLen) / 2, y: 0 }, denominator);\n } else {\n numerator.cloneTranslated({ x: (denomLen - numLen) / 2, y: 0 }, numerator);\n }\n\n numerator.cloneTranslated({ x: 0, y: 1.5 * denominator.yLength() }, numerator);\n break;\n }\n case \"diagonal\": {\n numerator.cloneTranslated({ x: 0, y: denominator.yLength() }, numerator);\n denominator.cloneTranslated({ x: numLen, y: 0 }, denominator);\n break;\n }\n }\n\n const layout = numerator.clone();\n layout.extendRange(denominator);\n return { layout, numerator, denominator };\n }\n}\n\ninterface Segment {\n segment: string;\n index: number;\n}\n\nfunction split(source: string): Segment[] {\n if (source.length === 0) {\n return [];\n }\n\n let index = 0;\n const segments: Segment[] = [];\n const breaker = new LineBreaker(source);\n for (let brk = breaker.nextBreak(); brk; brk = breaker.nextBreak()) {\n segments.push({\n segment: source.slice(index, brk.position),\n index,\n });\n\n index = brk.position;\n }\n\n return segments;\n}\n\n/** @internal */\nexport class RunLayout {\n public source: Run;\n public charOffset: number;\n public numChars: number;\n public range: Range2d;\n public justificationRange?: Range2d;\n public denominatorRange?: Range2d;\n public numeratorRange?: Range2d;\n public offsetFromLine: { x: number, y: number };\n public style: TextStyleSettings;\n public fontId: FontId;\n\n private constructor(props: NonFunctionPropertiesOf<RunLayout>) {\n this.source = props.source;\n this.charOffset = props.charOffset;\n this.numChars = props.numChars;\n this.range = props.range;\n this.justificationRange = props.justificationRange;\n this.denominatorRange = props.denominatorRange;\n this.numeratorRange = props.numeratorRange;\n this.offsetFromLine = props.offsetFromLine;\n this.style = props.style;\n this.fontId = props.fontId;\n }\n\n public static create(source: Run, context: LayoutContext): RunLayout {\n const style = context.createRunSettings(source);\n const fontId = context.findFontId(style.fontName);\n const charOffset = 0;\n const offsetFromLine = { x: 0, y: 0 };\n let numChars = 0;\n\n let range, justificationRange, numeratorRange, denominatorRange;\n\n switch (source.type) {\n case \"text\": {\n numChars = source.content.length;\n const ranges = context.computeRangeForTextRun(style, source, charOffset, numChars);\n range = ranges.layout;\n justificationRange = ranges.justification;\n break;\n }\n case \"fraction\": {\n numChars = 1;\n const ranges = context.computeRangeForFractionRun(style, source);\n range = ranges.layout;\n numeratorRange = ranges.numerator;\n denominatorRange = ranges.denominator;\n break;\n }\n default: {\n // We do this so that blank lines space correctly without special casing later.\n range = new Range2d(0, 0, 0, style.lineHeight);\n break;\n }\n }\n\n return new RunLayout({ source, charOffset, numChars, range, justificationRange, denominatorRange, numeratorRange, offsetFromLine, style, fontId });\n }\n\n /** Compute a string representation, primarily for debugging purposes. */\n public stringify(): string {\n return this.source.type === \"text\" ? this.source.content.substring(this.charOffset, this.charOffset + this.numChars) : this.source.stringify();\n }\n\n public canWrap(): this is { source: TextRun } {\n return this.source.type === \"text\";\n }\n\n private cloneForWrap(args: { ranges: TextLayoutRanges, charOffset: number, numChars: number }): RunLayout {\n assert(this.canWrap());\n\n return new RunLayout({\n ...this,\n charOffset: args.charOffset,\n numChars: args.numChars,\n range: args.ranges.layout,\n justificationRange: args.ranges.justification,\n offsetFromLine: { ...this.offsetFromLine },\n });\n }\n\n public split(context: LayoutContext): RunLayout[] {\n assert(this.charOffset === 0, \"cannot re-split a run\");\n if (!this.canWrap() || this.charOffset > 0) {\n return [this];\n }\n\n const myText = this.source.content.substring(this.charOffset, this.charOffset + this.numChars);\n const segments = split(myText);\n\n if (segments.length <= 1) {\n return [this];\n }\n\n return segments.map((segment: any) => {\n return this.cloneForWrap({\n ranges: context.computeRangeForText(segment.segment, this.style, this.source.baselineShift),\n charOffset: segment.index,\n numChars: segment.segment.length,\n });\n });\n }\n\n public toResult(paragraph: Paragraph): RunLayoutResult {\n const result: RunLayoutResult = {\n sourceRunIndex: paragraph.runs.indexOf(this.source),\n fontId: this.fontId,\n characterOffset: this.charOffset,\n characterCount: this.numChars,\n range: this.range.toJSON(),\n offsetFromLine: this.offsetFromLine,\n textStyle: this.style.toJSON(),\n };\n\n if (this.justificationRange) {\n result.justificationRange = this.justificationRange.toJSON();\n }\n\n if (this.numeratorRange) {\n result.numeratorRange = this.numeratorRange.toJSON();\n }\n\n if (this.denominatorRange) {\n result.denominatorRange = this.denominatorRange.toJSON();\n }\n\n return result;\n }\n}\n\n/** @internal */\nexport class LineLayout {\n public source: Paragraph;\n public range = new Range2d(0, 0, 0, 0);\n public justificationRange = new Range2d(0, 0, 0, 0);\n public offsetFromDocument = { x: 0, y: 0 };\n private _runs: RunLayout[] = [];\n\n public constructor(source: Paragraph) {\n this.source = source;\n }\n\n /** Compute a string representation, primarily for debugging purposes. */\n public stringify(): string {\n const runs = this._runs.map((run) => run.stringify());\n return `${runs.join(\"\")}`;\n }\n\n public get runs(): ReadonlyArray<RunLayout> { return this._runs; }\n public get isEmpty() { return this._runs.length === 0; }\n public get back(): RunLayout {\n assert(!this.isEmpty);\n return this._runs[this._runs.length - 1];\n }\n\n public append(run: RunLayout): void {\n this._runs.push(run);\n this.computeRanges();\n }\n\n /** Invoked every time a run is appended,. */\n private computeRanges(): void {\n this.range.low.setZero();\n this.range.high.setZero();\n\n // Some runs (fractions) are taller than others.\n // We want to center each run vertically inside the line.\n let lineHeight = 0;\n for (const run of this._runs) {\n lineHeight = Math.max(lineHeight, run.range.yLength());\n }\n\n for (const run of this._runs) {\n const runHeight = run.range.yLength();\n const runOffset = { x: this.range.high.x, y: (lineHeight - runHeight) / 2 };\n run.offsetFromLine = runOffset;\n\n const runLayoutRange = run.range.cloneTranslated(runOffset);\n this.range.extendRange(runLayoutRange);\n\n if (\"linebreak\" !== run.source.type) {\n const runJustificationRange = run.justificationRange?.cloneTranslated(runOffset);\n this.justificationRange.extendRange(runJustificationRange ?? runLayoutRange);\n }\n }\n }\n\n public toResult(textBlock: TextBlock): LineLayoutResult {\n return {\n sourceParagraphIndex: textBlock.paragraphs.indexOf(this.source),\n runs: this.runs.map((x) => x.toResult(this.source)),\n range: this.range.toJSON(),\n justificationRange: this.justificationRange.toJSON(),\n offsetFromDocument: this.offsetFromDocument,\n };\n }\n}\n\n/**\n * Describes the layout of a text block as a collection of lines containing runs.\n * @internal\n */\nexport class TextBlockLayout {\n public source: TextBlock;\n\n /** @internal: This is primarily for debugging purposes. This is the range of text geometry */\n public textRange = new Range2d();\n\n /** The range including margins of the [[TextBlock]]. */\n public range = new Range2d();\n public lines: LineLayout[] = [];\n private _context: LayoutContext;\n\n public constructor(source: TextBlock, context: LayoutContext) {\n this._context = context;\n this.source = source;\n\n if (source.width > 0) {\n this.textRange.low.x = 0;\n this.textRange.high.x = source.width;\n }\n\n this.populateLines(context);\n this.justifyLines();\n this.applyMargins(source.margins);\n }\n\n public toResult(): TextBlockLayoutResult {\n return {\n lines: this.lines.map((x) => x.toResult(this.source)),\n range: this.textRange.toJSON(),\n };\n }\n\n /** Compute a string representation, primarily for debugging purposes. */\n public stringify(): string {\n return this.lines.map((line) => line.stringify()).join(\"\\n\");\n }\n\n private get _back(): LineLayout {\n assert(this.lines.length > 0);\n return this.lines[this.lines.length - 1];\n }\n\n private populateLines(context: LayoutContext): void {\n const doc = this.source;\n if (doc.paragraphs.length === 0) {\n return;\n }\n\n const doWrap = doc.width > 0;\n let curLine = new LineLayout(doc.paragraphs[0]);\n for (let i = 0; i < doc.paragraphs.length; i++) {\n const paragraph = doc.paragraphs[i];\n if (i > 0) {\n curLine = this.flushLine(context, curLine, paragraph);\n }\n\n let runs = paragraph.runs.map((run) => RunLayout.create(run, context));\n if (doWrap) {\n runs = runs.map((run) => run.split(context)).flat();\n }\n\n for (const run of runs) {\n if (\"linebreak\" === run.source.type) {\n curLine.append(run);\n curLine = this.flushLine(context, curLine);\n continue;\n }\n\n if (!doWrap) {\n curLine.append(run);\n continue;\n }\n\n const runWidth = run.range.xLength();\n const lineWidth = curLine.range.xLength();\n if (runWidth + lineWidth < doc.width || Geometry.isAlmostEqualNumber(runWidth + lineWidth, doc.width, Geometry.smallMetricDistance)) {\n curLine.append(run);\n continue;\n }\n\n if (curLine.runs.length === 0) {\n curLine.append(run);\n curLine = this.flushLine(context, curLine);\n } else {\n curLine = this.flushLine(context, curLine);\n curLine.append(run);\n }\n }\n }\n\n if (curLine.runs.length > 0) {\n this.flushLine(context, curLine);\n }\n }\n\n private justifyLines(): void {\n // We don't want to justify empty text, or a single line of text whose width is 0. By default text is already left justified.\n if (this.lines.length < 1 || (this.lines.length === 1 && this.source.width === 0) || \"left\" === this.source.justification) {\n return;\n }\n\n // This is the minimum width of the document's bounding box.\n const docWidth = this.source.width;\n\n let minOffset = Number.MAX_VALUE;\n for (const line of this.lines) {\n const lineWidth = line.justificationRange.xLength();\n\n let offset = docWidth - lineWidth;\n if (\"center\" === this.source.justification) {\n offset = offset / 2;\n }\n\n line.offsetFromDocument.x += offset;\n minOffset = Math.min(offset, minOffset);\n }\n\n if (minOffset < 0) {\n // Shift left to accommodate lines that exceeded the document's minimum width.\n this.textRange.low.x += minOffset;\n this.textRange.high.x += minOffset;\n }\n }\n\n private flushLine(context: LayoutContext, line: LineLayout, nextParagraph?: Paragraph): LineLayout {\n nextParagraph = nextParagraph ?? line.source;\n\n // We want to guarantee that each layout line has at least one run.\n if (line.runs.length === 0) {\n // If we're empty, there should always be a preceding run, and it should be a line break.\n if (this.lines.length === 0 || this._back.runs.length === 0) {\n return new LineLayout(nextParagraph);\n }\n\n const prevRun = this._back.back.source;\n assert(prevRun.type === \"linebreak\");\n if (prevRun.type !== \"linebreak\") {\n return new LineLayout(nextParagraph);\n }\n\n line.append(RunLayout.create(prevRun.clone(), context));\n }\n\n // Line origin is its baseline.\n const lineOffset = { x: 0, y: -line.range.yLength() };\n\n // Place it below any existing lines\n if (this.lines.length > 0) {\n lineOffset.y += this._back.offsetFromDocument.y;\n lineOffset.y -= context.blockSettings.lineSpacingFactor * context.blockSettings.lineHeight;\n }\n\n line.offsetFromDocument = lineOffset;\n\n // Update document range from computed line range and position\n this.textRange.extendRange(line.range.cloneTranslated(lineOffset));\n\n this.lines.push(line);\n return new LineLayout(nextParagraph);\n }\n\n private applyMargins(margins: TextBlockMargins) {\n this.range = this.textRange.clone();\n\n if (this.range.isNull)\n return;\n\n // Disregard negative margins.\n const right = margins.right >= 0 ? margins.right : 0;\n const left = margins.left >= 0 ? margins.left : 0;\n const top = margins.top >= 0 ? margins.top : 0;\n const bottom = margins.bottom >= 0 ? margins.bottom : 0;\n\n const xHigh = this.textRange.high.x + right;\n const yHigh = this.textRange.high.y + top;\n const xLow = this.textRange.low.x - left;\n const yLow = this.textRange.low.y - bottom;\n\n this.range.extendXY(xHigh, yHigh);\n this.range.extendXY(xLow, yLow);\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/core-backend",
|
|
3
|
-
"version": "5.0.0-dev.
|
|
3
|
+
"version": "5.0.0-dev.85",
|
|
4
4
|
"description": "iTwin.js backend components",
|
|
5
5
|
"main": "lib/cjs/core-backend.js",
|
|
6
6
|
"typings": "lib/cjs/core-backend",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@opentelemetry/api": "^1.0.4",
|
|
29
|
-
"@itwin/core-bentley": "5.0.0-dev.
|
|
30
|
-
"@itwin/core-
|
|
31
|
-
"@itwin/core-
|
|
32
|
-
"@itwin/ecschema-metadata": "5.0.0-dev.
|
|
29
|
+
"@itwin/core-bentley": "5.0.0-dev.85",
|
|
30
|
+
"@itwin/core-common": "5.0.0-dev.85",
|
|
31
|
+
"@itwin/core-geometry": "5.0.0-dev.85",
|
|
32
|
+
"@itwin/ecschema-metadata": "5.0.0-dev.85"
|
|
33
33
|
},
|
|
34
34
|
"peerDependenciesMeta": {
|
|
35
35
|
"@opentelemetry/api": {
|
|
@@ -71,16 +71,16 @@
|
|
|
71
71
|
"marked": "^14.1.3",
|
|
72
72
|
"sql-formatter": "^15.4.6",
|
|
73
73
|
"webpack": "^5.97.1",
|
|
74
|
-
"@itwin/build-tools": "5.0.0-dev.
|
|
75
|
-
"@itwin/core-geometry": "5.0.0-dev.
|
|
76
|
-
"@itwin/core-bentley": "5.0.0-dev.
|
|
77
|
-
"
|
|
78
|
-
"@itwin/
|
|
79
|
-
"@itwin/
|
|
80
|
-
"
|
|
74
|
+
"@itwin/build-tools": "5.0.0-dev.85",
|
|
75
|
+
"@itwin/core-geometry": "5.0.0-dev.85",
|
|
76
|
+
"@itwin/core-bentley": "5.0.0-dev.85",
|
|
77
|
+
"@itwin/core-common": "5.0.0-dev.85",
|
|
78
|
+
"@itwin/ecsql-common": "5.0.0-dev.85",
|
|
79
|
+
"@itwin/ecschema-metadata": "5.0.0-dev.85",
|
|
80
|
+
"internal-tools": "3.0.0-dev.69"
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@bentley/imodeljs-native": "5.0.
|
|
83
|
+
"@bentley/imodeljs-native": "5.0.81",
|
|
84
84
|
"@itwin/cloud-agnostic-core": "^2.2.4",
|
|
85
85
|
"@itwin/object-storage-azure": "^2.3.0",
|
|
86
86
|
"@itwin/object-storage-core": "^2.3.0",
|