@itwin/core-backend 5.4.0-dev.2 → 5.4.0-dev.4

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.
Files changed (65) hide show
  1. package/lib/cjs/Element.d.ts +29 -1
  2. package/lib/cjs/Element.d.ts.map +1 -1
  3. package/lib/cjs/Element.js +53 -1
  4. package/lib/cjs/Element.js.map +1 -1
  5. package/lib/cjs/ElementAspect.d.ts +24 -1
  6. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  7. package/lib/cjs/ElementAspect.js +102 -1
  8. package/lib/cjs/ElementAspect.js.map +1 -1
  9. package/lib/cjs/IModelDb.d.ts +11 -0
  10. package/lib/cjs/IModelDb.d.ts.map +1 -1
  11. package/lib/cjs/IModelDb.js +18 -0
  12. package/lib/cjs/IModelDb.js.map +1 -1
  13. package/lib/cjs/NavigationRelationship.d.ts +15 -0
  14. package/lib/cjs/NavigationRelationship.d.ts.map +1 -1
  15. package/lib/cjs/NavigationRelationship.js +22 -1
  16. package/lib/cjs/NavigationRelationship.js.map +1 -1
  17. package/lib/cjs/annotations/LeaderGeometry.d.ts +13 -1
  18. package/lib/cjs/annotations/LeaderGeometry.d.ts.map +1 -1
  19. package/lib/cjs/annotations/LeaderGeometry.js +88 -10
  20. package/lib/cjs/annotations/LeaderGeometry.js.map +1 -1
  21. package/lib/cjs/annotations/TextAnnotationElement.d.ts +1 -1
  22. package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -1
  23. package/lib/cjs/annotations/TextAnnotationElement.js +7 -3
  24. package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
  25. package/lib/esm/Element.d.ts +29 -1
  26. package/lib/esm/Element.d.ts.map +1 -1
  27. package/lib/esm/Element.js +53 -2
  28. package/lib/esm/Element.js.map +1 -1
  29. package/lib/esm/ElementAspect.d.ts +24 -1
  30. package/lib/esm/ElementAspect.d.ts.map +1 -1
  31. package/lib/esm/ElementAspect.js +101 -1
  32. package/lib/esm/ElementAspect.js.map +1 -1
  33. package/lib/esm/IModelDb.d.ts +11 -0
  34. package/lib/esm/IModelDb.d.ts.map +1 -1
  35. package/lib/esm/IModelDb.js +18 -0
  36. package/lib/esm/IModelDb.js.map +1 -1
  37. package/lib/esm/NavigationRelationship.d.ts +15 -0
  38. package/lib/esm/NavigationRelationship.d.ts.map +1 -1
  39. package/lib/esm/NavigationRelationship.js +19 -0
  40. package/lib/esm/NavigationRelationship.js.map +1 -1
  41. package/lib/esm/annotations/LeaderGeometry.d.ts +13 -1
  42. package/lib/esm/annotations/LeaderGeometry.d.ts.map +1 -1
  43. package/lib/esm/annotations/LeaderGeometry.js +89 -12
  44. package/lib/esm/annotations/LeaderGeometry.js.map +1 -1
  45. package/lib/esm/annotations/TextAnnotationElement.d.ts +1 -1
  46. package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -1
  47. package/lib/esm/annotations/TextAnnotationElement.js +7 -3
  48. package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
  49. package/lib/esm/test/annotations/LeaderGeometry.test.js +47 -2
  50. package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -1
  51. package/lib/esm/test/annotations/TextAnnotation.test.js +46 -5
  52. package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
  53. package/lib/esm/test/element/ProjectInformationRecord.test.d.ts +2 -0
  54. package/lib/esm/test/element/ProjectInformationRecord.test.d.ts.map +1 -0
  55. package/lib/esm/test/element/ProjectInformationRecord.test.js +80 -0
  56. package/lib/esm/test/element/ProjectInformationRecord.test.js.map +1 -0
  57. package/lib/esm/test/element/SheetInformationAspect.test.d.ts +2 -0
  58. package/lib/esm/test/element/SheetInformationAspect.test.d.ts.map +1 -0
  59. package/lib/esm/test/element/SheetInformationAspect.test.js +182 -0
  60. package/lib/esm/test/element/SheetInformationAspect.test.js.map +1 -0
  61. package/lib/esm/test/imodel/IModel.test.js +32 -2
  62. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  63. package/lib/esm/test/standalone/ChangesetReader.test.js +8 -11
  64. package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
  65. package/package.json +14 -14
@@ -1 +1 @@
1
- {"version":3,"file":"TextAnnotationElement.js","sourceRoot":"","sources":["../../../src/annotations/TextAnnotationElement.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA8DH,0DAIC;AAhED,oDAAic;AAEjc,wCAAoI;AACpI,sDAA+D;AAC/D,uDAAuE;AACvE,qEAAwE;AACxE,+EAAkI;AAGlI,iCAAiC;AAEjC;;;EAGE;AACW,QAAA,4BAA4B,GAAG,OAAO,CAAC;AAEpD,SAAS,+BAA+B,CACtC,IAAY,EACZ,cAA+B,EAC/B,OAAqC;IAErC,IAAI,MAAM,CAAC;IACX,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAqB,CAAC;IAChD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAC/B,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;QACvD,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IAEzD,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI;QACzD,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IAEtD,QAAQ;IACR,IAAI,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,gBAAgB,MAAM,CAAC,OAAO,oCAAoC,cAAc,mDAAmD,CAAC,CAAC;IAEvJ,QAAQ;IACR,IAAI,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,CAAC,EAAE,CAAC;QACvC,MAAM,CAAC,IAAI,GAAG,OAAO,C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IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBACxF,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC1B,CAAC;QACH,CAAC;QAED,MAAM,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACtG,CAAC;;AAlMH,kDAmMC","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 { AnnotationTextStyleProps, BisCodeSpec, Code, CodeProps, CodeScopeProps, CodeSpec, ECVersionString, ElementGeometry, ElementGeometryBuilderParams, EntityReferenceSet, Placement2d, Placement2dProps, Placement3d, Placement3dProps, PlacementProps, TextAnnotation, TextAnnotation2dProps, TextAnnotation3dProps, TextAnnotationProps, TextStyleSettings, TextStyleSettingsProps, traverseTextBlockComponent, VersionedJSON } from \"@itwin/core-common\";\nimport { IModelDb } from \"../IModelDb\";\nimport { AnnotationElement2d, DefinitionElement, Drawing, GraphicalElement3d, OnElementIdArg, OnElementPropsArg } from \"../Element\";\nimport { assert, Id64, Id64String } from \"@itwin/core-bentley\";\nimport { layoutTextBlock, TextStyleResolver } from \"./TextBlockLayout\";\nimport { appendTextAnnotationGeometry } from \"./TextAnnotationGeometry\";\nimport { ElementDrivesTextAnnotation, TextAnnotationUsesTextStyleByDefault, TextBlockAndId } from \"./ElementDrivesTextAnnotation\";\nimport { IModelElementCloneContext } from \"../IModelElementCloneContext\";\nimport { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow } from \"../Entity\";\nimport * as semver from \"semver\";\n\n/** The version of the JSON stored in `TextAnnotation2d/3dProps.textAnnotationData` used by the code.\n * Uses the same semantics as [ECVersion]($ecschema-metadata).\n * @internal\n*/\nexport const TEXT_ANNOTATION_JSON_VERSION = \"1.0.0\";\n\nfunction validateAndMigrateVersionedJSON<T>(\n json: string,\n currentVersion: ECVersionString,\n migrate: (old: VersionedJSON<T>) => T\n): VersionedJSON<T> | undefined {\n let parsed;\n try {\n parsed = JSON.parse(json) as VersionedJSON<T>;\n } catch {\n return undefined;\n }\n\n const version = parsed.version;\n if (typeof version !== \"string\" || !semver.valid(version))\n throw new Error(\"JSON version is missing or invalid.\");\n\n if (typeof parsed.data !== \"object\" || parsed.data === null)\n throw new Error(\"JSON data is missing or invalid.\");\n\n // Newer\n if (semver.gt(version, currentVersion))\n throw new Error(`JSON version ${parsed.version} is newer than supported version ${currentVersion}. Application update required to understand data.`);\n\n // Older\n if (semver.lt(version, currentVersion)) {\n parsed.data = migrate(parsed);\n parsed.version = currentVersion;\n }\n\n return parsed;\n}\n\nfunction migrateTextAnnotationData(oldData: VersionedJSON<TextAnnotationProps>): TextAnnotationProps {\n if (oldData.version === TEXT_ANNOTATION_JSON_VERSION) return oldData.data;\n\n // Place migration logic here.\n\n throw new Error(`Migration for textAnnotationData from version ${oldData.version} to ${TEXT_ANNOTATION_JSON_VERSION} failed.`);\n}\n\n/** Parses, validates, and potentially migrates the text annotation data from a JSON string.\n * @internal\n */\nexport function parseTextAnnotationData(json: string | undefined): VersionedJSON<TextAnnotationProps> | undefined {\n if (!json) return undefined;\n\n return validateAndMigrateVersionedJSON<TextAnnotationProps>(json, TEXT_ANNOTATION_JSON_VERSION, migrateTextAnnotationData);\n}\n\nfunction getElementGeometryBuilderParams(iModel: IModelDb, modelId: Id64String, categoryId: Id64String, _placementProps: PlacementProps, annotationProps?: TextAnnotationProps, textStyleId?: Id64String, _subCategory?: Id64String): ElementGeometryBuilderParams {\n const textBlock = TextAnnotation.fromJSON(annotationProps).textBlock;\n const textStyleResolver = new TextStyleResolver({textBlock, textStyleId: textStyleId ?? \"\", iModel});\n const layout = layoutTextBlock({ iModel, textBlock, textStyleResolver });\n const builder = new ElementGeometry.Builder();\n let scaleFactor = 1;\n const element = iModel.elements.getElement(modelId);\n if (element instanceof Drawing)\n scaleFactor = element.scaleFactor;\n appendTextAnnotationGeometry({ layout, textStyleResolver, scaleFactor, annotationProps: annotationProps ?? {}, builder, categoryId });\n\n return { entryArray: builder.entries };\n}\n\n/** Arguments supplied when creating a [[TextAnnotation2d]].\n * @beta\n */\nexport interface TextAnnotation2dCreateArgs {\n /** The category ID for the annotation. */\n category: Id64String;\n /** The model ID where the annotation will be placed. */\n model: Id64String;\n /** The placement properties for the annotation. */\n placement: Placement2dProps;\n /** The default text style ID for the annotation. */\n defaultTextStyleId?: Id64String;\n /** Optional [[TextAnnotation]] JSON representation used to create the `TextAnnotation2d`. Essentially an empty element if not provided. */\n textAnnotationProps?: TextAnnotationProps;\n /** Optional code for the element. */\n code?: CodeProps;\n}\n\n/** Arguments supplied when creating a [[TextAnnotation3d]].\n * @beta\n */\nexport interface TextAnnotation3dCreateArgs {\n /** The category ID for the annotation. */\n category: Id64String;\n /** The model ID where the annotation will be placed. */\n model: Id64String;\n /** The placement properties for the annotation. */\n placement: Placement3dProps;\n /** The default text style ID for the annotation. */\n defaultTextStyleId?: Id64String;\n /** Optional [[TextAnnotation]] JSON representation used to create the `TextAnnotation3d`. Essentially an empty element if not provided. */\n textAnnotationProps?: TextAnnotationProps;\n /** Optional code for the element. */\n code?: CodeProps;\n}\n\n/** An element that displays textual content within a 2d model.\n * The text is stored as a [TextAnnotation]($common) from which the element's [geometry]($docs/learning/common/GeometryStream.md) and [Placement]($common) are computed.\n * @see [[setAnnotation]] to change the textual content.\n * @public @preview\n */\nexport class TextAnnotation2d extends AnnotationElement2d /* implements ITextAnnotation */ {\n /** @internal */\n public static override get className(): string { return \"TextAnnotation2d\"; }\n /**\n * The default [[AnnotationTextStyle]] used by the TextAnnotation2d.\n * @beta\n */\n public defaultTextStyle?: TextAnnotationUsesTextStyleByDefault;\n /** The data associated with the text annotation. */\n private _textAnnotationProps?: TextAnnotationProps;\n\n /** Extract the textual content, if present.\n * @see [[setAnnotation]] to change it.\n */\n public getAnnotation(): TextAnnotation | undefined {\n return this._textAnnotationProps ? TextAnnotation.fromJSON(this._textAnnotationProps) : undefined;\n }\n\n /** Change the textual content of the `TextAnnotation2d`.\n * @see [[getAnnotation]] to extract the current annotation.\n * @param annotation The new annotation\n */\n public setAnnotation(annotation: TextAnnotation) {\n this._textAnnotationProps = annotation.toJSON();\n }\n\n protected constructor(props: TextAnnotation2dProps, iModel: IModelDb) {\n super(props, iModel);\n if (props.defaultTextStyle) {\n this.defaultTextStyle = new TextAnnotationUsesTextStyleByDefault(props.defaultTextStyle.id);\n }\n this._textAnnotationProps = parseTextAnnotationData(props.textAnnotationData)?.data;\n }\n\n /** Creates a new instance of `TextAnnotation2d` from its JSON representation. */\n public static fromJSON(props: TextAnnotation2dProps, iModel: IModelDb): TextAnnotation2d {\n return new TextAnnotation2d(props, iModel);\n }\n\n /**\n * Converts the current `TextAnnotation2d` instance to its JSON representation.\n * It also computes the `elementGeometryBuilderParams` property used to create the GeometryStream.\n * @inheritdoc\n */\n public override toJSON(): TextAnnotation2dProps {\n const props = super.toJSON() as TextAnnotation2dProps;\n props.textAnnotationData = this._textAnnotationProps ? JSON.stringify({ version: TEXT_ANNOTATION_JSON_VERSION, data: this._textAnnotationProps }) : undefined;\n if (this._textAnnotationProps) {\n props.elementGeometryBuilderParams = getElementGeometryBuilderParams(this.iModel, this.model, this.category, this.placement, this._textAnnotationProps, this.defaultTextStyle ? this.defaultTextStyle.id : undefined);\n }\n\n return props;\n }\n\n /** Creates a new `TextAnnotation2d` instance with the specified properties.\n * @param iModelDb The iModel.\n * @param arg The arguments for creating the TextAnnotation2d.\n * @beta\n */\n public static create(iModelDb: IModelDb, arg: TextAnnotation2dCreateArgs): TextAnnotation2d {\n const elementProps: TextAnnotation2dProps = {\n classFullName: this.classFullName,\n textAnnotationData: arg.textAnnotationProps ? JSON.stringify({ version: TEXT_ANNOTATION_JSON_VERSION, data: arg.textAnnotationProps }) : undefined,\n defaultTextStyle: arg.defaultTextStyleId ? new TextAnnotationUsesTextStyleByDefault(arg.defaultTextStyleId).toJSON() : undefined,\n placement: arg.placement,\n model: arg.model,\n category: arg.category,\n code: arg.code ?? Code.createEmpty(),\n };\n return new this(elementProps, iModelDb);\n }\n\n /**\n * Updates the geometry of the TextAnnotation2d on insert and validates version.\n * @inheritdoc\n * @beta\n */\n protected static override onInsert(arg: OnElementPropsArg): void {\n super.onInsert(arg);\n this.validateVersionAndUpdateGeometry(arg);\n }\n\n /**\n * Updates the geometry of the TextAnnotation2d on update and validates version.\n * @inheritdoc\n * @beta\n */\n protected static override onUpdate(arg: OnElementPropsArg): void {\n super.onUpdate(arg);\n this.validateVersionAndUpdateGeometry(arg);\n }\n\n /**\n * Populates the `elementGeometryBuilderParams` property in the [TextAnnotation2dProps]($common).\n * Only does this if the `elementGeometryBuilderParams` is not already set and if there is actually a text annotation to produce geometry for.\n * Also, validates the version of the text annotation data and migrates it if necessary.\n * @beta\n */\n protected static validateVersionAndUpdateGeometry(arg: OnElementPropsArg): void {\n const props = arg.props as TextAnnotation2dProps;\n const textAnnotationData = parseTextAnnotationData(props.textAnnotationData);\n if (!props.elementGeometryBuilderParams && textAnnotationData) {\n props.elementGeometryBuilderParams = getElementGeometryBuilderParams(arg.iModel, props.model, props.category, props.placement ?? Placement2d.fromJSON(), textAnnotationData.data, props.defaultTextStyle?.id);\n }\n }\n\n /**\n * TextAnnotation2d custom HandledProps include 'textAnnotationData'.\n * @inheritdoc\n * @internal\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"textAnnotationData\", source: \"Class\" },\n ];\n\n /**\n * TextAnnotation2d deserializes 'textAnnotationData'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): TextAnnotation2dProps {\n const elProps = super.deserialize(props) as TextAnnotation2dProps;\n const textAnnotationData = parseTextAnnotationData(props.row.textAnnotationData);\n if (textAnnotationData) {\n elProps.textAnnotationData = JSON.stringify(textAnnotationData);\n }\n return elProps;\n }\n\n /**\n * TextAnnotation2d serializes 'textAnnotationData'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: TextAnnotation2dProps, iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, iModel);\n if (props.textAnnotationData !== undefined) {\n inst.textAnnotationData = props.textAnnotationData;\n }\n return inst;\n }\n\n /** @internal */\n public getTextBlocks(): Iterable<TextBlockAndId> {\n return getTextBlocks(this);\n }\n\n /** @internal */\n public updateTextBlocks(textBlocks: TextBlockAndId[]): void {\n return updateTextBlocks(this, textBlocks);\n }\n\n /** @internal */\n public static override onInserted(arg: OnElementIdArg): void {\n super.onInserted(arg);\n ElementDrivesTextAnnotation.updateFieldDependencies(arg.id, arg.iModel);\n }\n\n /** @internal */\n public static override onUpdated(arg: OnElementIdArg): void {\n super.onUpdated(arg);\n ElementDrivesTextAnnotation.updateFieldDependencies(arg.id, arg.iModel);\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n collectReferenceIds(this, referenceIds);\n }\n\n /** @internal */\n protected static override async onCloned(context: IModelElementCloneContext, srcProps: TextAnnotation2dProps, dstProps: TextAnnotation2dProps): Promise<void> {\n await super.onCloned(context, srcProps, dstProps);\n\n const srcElem = TextAnnotation2d.fromJSON(srcProps, context.sourceDb);\n ElementDrivesTextAnnotation.remapFields(srcElem, context);\n const anno = srcElem.getAnnotation();\ndstProps.textAnnotationData = anno ? JSON.stringify({ version: TEXT_ANNOTATION_JSON_VERSION, data: anno.toJSON() }) : undefined;\n\n return remapTextStyle(context, srcElem, dstProps);\n }\n}\n\n/** An element that displays textual content within a 3d model.\n * The text is stored as a [TextAnnotation]($common) from which the element's [geometry]($docs/learning/common/GeometryStream.md) and [Placement]($common) are computed.\n * @see [[setAnnotation]] to change the textual content.\n * @public @preview\n */\nexport class TextAnnotation3d extends GraphicalElement3d /* implements ITextAnnotation */ {\n /** @internal */\n public static override get className(): string { return \"TextAnnotation3d\"; }\n /**\n * The default [[AnnotationTextStyle]] used by the TextAnnotation3d.\n * @beta\n */\n public defaultTextStyle?: TextAnnotationUsesTextStyleByDefault;\n /** The data associated with the text annotation. */\n private _textAnnotationProps?: TextAnnotationProps;\n\n /** Extract the textual content, if present.\n * @see [[setAnnotation]] to change it.\n */\n public getAnnotation(): TextAnnotation | undefined {\n return this._textAnnotationProps ? TextAnnotation.fromJSON(this._textAnnotationProps) : undefined;\n }\n\n /** Change the textual content of the `TextAnnotation3d`.\n * @see [[getAnnotation]] to extract the current annotation.\n * @param annotation The new annotation\n */\n public setAnnotation(annotation: TextAnnotation) {\n this._textAnnotationProps = annotation.toJSON();\n }\n\n protected constructor(props: TextAnnotation3dProps, iModel: IModelDb) {\n super(props, iModel);\n if (props.defaultTextStyle) {\n this.defaultTextStyle = new TextAnnotationUsesTextStyleByDefault(props.defaultTextStyle.id);\n }\n this._textAnnotationProps = parseTextAnnotationData(props.textAnnotationData)?.data;\n }\n\n /** Creates a new instance of `TextAnnotation3d` from its JSON representation. */\n public static fromJSON(props: TextAnnotation3dProps, iModel: IModelDb): TextAnnotation3d {\n return new TextAnnotation3d(props, iModel);\n }\n\n /**\n * Converts the current `TextAnnotation3d` instance to its JSON representation.\n * It also computes the `elementGeometryBuilderParams` property used to create the GeometryStream.\n * @inheritdoc\n */\n public override toJSON(): TextAnnotation3dProps {\n const props = super.toJSON() as TextAnnotation3dProps;\n props.textAnnotationData = this._textAnnotationProps ? JSON.stringify({ version: TEXT_ANNOTATION_JSON_VERSION, data: this._textAnnotationProps }) : undefined;\n if (this._textAnnotationProps) {\n props.elementGeometryBuilderParams = getElementGeometryBuilderParams(this.iModel, this.model, this.category, this.placement, this._textAnnotationProps, this.defaultTextStyle ? this.defaultTextStyle.id : undefined);\n }\n\n return props;\n }\n\n /** Creates a new `TextAnnotation3d` instance with the specified properties.\n * @param iModelDb The iModel.\n * @param arg The arguments for creating the TextAnnotation3d.\n * @beta\n */\n public static create(iModelDb: IModelDb, arg: TextAnnotation3dCreateArgs): TextAnnotation3d {\n const elementProps: TextAnnotation3dProps = {\n classFullName: this.classFullName,\n textAnnotationData: arg.textAnnotationProps ? JSON.stringify({ version: TEXT_ANNOTATION_JSON_VERSION, data: arg.textAnnotationProps }) : undefined,\n defaultTextStyle: arg.defaultTextStyleId ? new TextAnnotationUsesTextStyleByDefault(arg.defaultTextStyleId).toJSON() : undefined,\n placement: arg.placement,\n model: arg.model,\n category: arg.category,\n code: arg.code ?? Code.createEmpty(),\n };\n return new this(elementProps, iModelDb);\n }\n\n /**\n * Updates the geometry of the TextAnnotation3d on insert and validates version..\n * @inheritdoc\n * @beta\n */\n protected static override onInsert(arg: OnElementPropsArg): void {\n super.onInsert(arg);\n this.validateVersionAndUpdateGeometry(arg);\n }\n\n /**\n * Updates the geometry of the TextAnnotation3d on update and validates version..\n * @inheritdoc\n * @beta\n */\n protected static override onUpdate(arg: OnElementPropsArg): void {\n super.onUpdate(arg);\n this.validateVersionAndUpdateGeometry(arg);\n }\n\n /**\n * Populates the `elementGeometryBuilderParams` property in the [TextAnnotation3dProps]($common).\n * Only does this if the `elementGeometryBuilderParams` is not already set and if there is actually a text annotation to produce geometry for.\n * Also, validates the version of the text annotation data and migrates it if necessary.\n * @beta\n */\n protected static validateVersionAndUpdateGeometry(arg: OnElementPropsArg): void {\n const props = arg.props as TextAnnotation3dProps;\n const textAnnotationData = parseTextAnnotationData(props.textAnnotationData);\n if (!props.elementGeometryBuilderParams && textAnnotationData) {\n props.elementGeometryBuilderParams = getElementGeometryBuilderParams(arg.iModel, props.model, props.category, props.placement ?? Placement3d.fromJSON(), textAnnotationData.data, props.defaultTextStyle?.id);\n }\n }\n\n /**\n * TextAnnotation3d custom HandledProps include 'textAnnotationData'.\n * @inheritdoc\n * @internal\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"textAnnotationData\", source: \"Class\" },\n ];\n\n /**\n * TextAnnotation3d deserializes 'textAnnotationData'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): TextAnnotation3dProps {\n const elProps = super.deserialize(props) as TextAnnotation3dProps;\n const textAnnotationData = parseTextAnnotationData(props.row.textAnnotationData);\n if (textAnnotationData) {\n elProps.textAnnotationData = JSON.stringify(textAnnotationData);\n }\n return elProps;\n }\n\n /**\n * TextAnnotation3d serializes 'textAnnotationData'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: TextAnnotation3dProps, iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, iModel);\n if (props.textAnnotationData !== undefined) {\n inst.textAnnotationData = props.textAnnotationData;\n }\n return inst;\n }\n\n /** @internal */\n public getTextBlocks(): Iterable<TextBlockAndId> {\n return getTextBlocks(this);\n }\n\n /** @internal */\n public updateTextBlocks(textBlocks: TextBlockAndId[]): void {\n return updateTextBlocks(this, textBlocks);\n }\n\n /** @internal */\n public static override onInserted(arg: OnElementIdArg): void {\n super.onInserted(arg);\n ElementDrivesTextAnnotation.updateFieldDependencies(arg.id, arg.iModel);\n }\n\n /** @internal */\n public static override onUpdated(arg: OnElementIdArg): void {\n super.onUpdated(arg);\n ElementDrivesTextAnnotation.updateFieldDependencies(arg.id, arg.iModel);\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n collectReferenceIds(this, referenceIds);\n }\n\n /** @internal */\n protected static override async onCloned(context: IModelElementCloneContext, srcProps: TextAnnotation3dProps, dstProps: TextAnnotation3dProps): Promise<void> {\n await super.onCloned(context, srcProps, dstProps);\n\n const srcElem = TextAnnotation3d.fromJSON(srcProps, context.sourceDb);\n ElementDrivesTextAnnotation.remapFields(srcElem, context);\n const anno = srcElem.getAnnotation();\n dstProps.textAnnotationData = anno ? JSON.stringify({ version: TEXT_ANNOTATION_JSON_VERSION, data: anno.toJSON() }) : undefined;\n\n return remapTextStyle(context, srcElem, dstProps);\n }\n}\n\nasync function remapTextStyle(\n context: IModelElementCloneContext,\n srcElem: TextAnnotation2d | TextAnnotation3d,\n dstProps: TextAnnotation2dProps | TextAnnotation3dProps\n): Promise<void> {\n const dstStyleId = await AnnotationTextStyle.remapTextStyleId(srcElem.defaultTextStyle?.id ?? Id64.invalid, context);\n dstProps.defaultTextStyle = Id64.isValid(dstStyleId) ? new TextAnnotationUsesTextStyleByDefault(dstStyleId).toJSON() : undefined;\n}\n\nfunction collectReferenceIds(elem: TextAnnotation2d | TextAnnotation3d, referenceIds: EntityReferenceSet): void {\n const style = elem.defaultTextStyle?.id;\n if (style && Id64.isValidId64(style)) {\n referenceIds.addElement(style);\n }\n\n const block = elem.getAnnotation()?.textBlock;\n if (block) {\n for (const { child } of traverseTextBlockComponent(block)) {\n if (child.type === \"field\") {\n const hostId = child.propertyHost.elementId;\n if (Id64.isValidId64(hostId)) {\n referenceIds.addElement(hostId);\n }\n }\n }\n }\n}\n\nfunction getTextBlocks(elem: TextAnnotation2d | TextAnnotation3d): Iterable<TextBlockAndId> {\n const annotation = elem.getAnnotation();\n return annotation ? [{ textBlock: annotation.textBlock, id: undefined }] : [];\n}\n\nfunction updateTextBlocks(elem: TextAnnotation2d | TextAnnotation3d, textBlocks: TextBlockAndId[]): void {\n assert(textBlocks.length === 1);\n assert(textBlocks[0].id === undefined);\n\n const annotation = elem.getAnnotation();\n if (!annotation) {\n // We must obtain the TextBlockAndId from the element in the first place, so the only way we could end up here is if\n // somebody removed the text annotation after we called getTextBlocks. That's gotta be a mistake.\n throw new Error(\"Text annotation element has no text\");\n }\n\n annotation.textBlock = textBlocks[0].textBlock;\n\n elem.setAnnotation(annotation);\n}\n\n/** The version of the JSON stored in `AnnotationTextStyleProps.settings` used by the code.\n * Uses the same semantics as [ECVersion]($ecschema-metadata).\n * @internal\n*/\nexport const TEXT_STYLE_SETTINGS_JSON_VERSION = \"1.0.0\";\n\nfunction migrateTextStyleSettings(oldData: VersionedJSON<TextStyleSettingsProps>): TextStyleSettingsProps {\n if (oldData.version === TEXT_STYLE_SETTINGS_JSON_VERSION) return oldData.data;\n\n // Place migration logic here.\n\n throw new Error(`Migration for settings from version ${oldData.version} to ${TEXT_STYLE_SETTINGS_JSON_VERSION} failed.`);\n}\n\n/** Arguments supplied when creating an [[AnnotationTextStyle]].\n * @beta\n */\nexport interface TextStyleCreateArgs {\n /** The ID of the [[DefinitionModel]]. */\n definitionModelId: Id64String;\n /** The name to assign to the [[AnnotationTextStyle]]. */\n name: string;\n /** Optional text style settings used to create the [[AnnotationTextStyle]]. Default settings will be used if not provided. */\n settings?: TextStyleSettingsProps;\n /** Optional description for the [[AnnotationTextStyle]]. */\n description?: string;\n}\n\n/**\n * The definition element that holds text style information.\n * The style is stored as a [TextStyleSettings]($common).\n * @beta\n */\nexport class AnnotationTextStyle extends DefinitionElement {\n /** @internal */\n public static override get className(): string { return \"AnnotationTextStyle\"; }\n /**\n * Optional text describing the `AnnotationTextStyle`.\n */\n public description?: string;\n /**\n * The text style settings for the `AnnotationTextStyle`.\n * @see [[TextStyleSettings]] for more information.\n */\n public settings: TextStyleSettings;\n\n protected constructor(props: AnnotationTextStyleProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n const settingsProps = AnnotationTextStyle.parseTextStyleSettings(props.settings);\n this.settings = TextStyleSettings.fromJSON(settingsProps?.data);\n }\n\n /**\n * Creates a Code for an `AnnotationTextStyle` given a name that is meant to be unique within the scope of the specified DefinitionModel.\n *\n * @param iModel - The IModelDb.\n * @param definitionModelId - The ID of the DefinitionModel that contains the AnnotationTextStyle and provides the scope for its name.\n * @param name - The AnnotationTextStyle name.\n * @beta\n */\n public static createCode(iModel: IModelDb, definitionModelId: CodeScopeProps, name: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.annotationTextStyle);\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: name });\n }\n\n /**\n * Creates a new instance of `AnnotationTextStyle` with the specified properties.\n *\n * @param iModelDb - The iModelDb.\n * @param arg - The arguments for creating the AnnotationTextStyle.\n * @beta\n */\n public static create(iModelDb: IModelDb, arg: TextStyleCreateArgs): AnnotationTextStyle {\n const props: AnnotationTextStyleProps = {\n classFullName: this.classFullName,\n model: arg.definitionModelId,\n code: this.createCode(iModelDb, arg.definitionModelId, arg.name).toJSON(),\n description: arg.description,\n settings: arg.settings ? JSON.stringify({version: TEXT_STYLE_SETTINGS_JSON_VERSION, data: arg.settings}) : undefined,\n }\n return new this(props, iModelDb);\n }\n\n /**\n * Converts the current `AnnotationTextStyle` instance to its JSON representation.\n * @inheritdoc\n */\n public override toJSON(): AnnotationTextStyleProps {\n const props = super.toJSON() as AnnotationTextStyleProps;\n props.description = this.description;\n props.settings = JSON.stringify({version: TEXT_STYLE_SETTINGS_JSON_VERSION, data: this.settings.toJSON()});\n return props;\n }\n\n /** Creates a new instance of `AnnotationTextStyle` from its JSON representation. */\n public static fromJSON(props: AnnotationTextStyleProps, iModel: IModelDb): AnnotationTextStyle {\n return new AnnotationTextStyle(props, iModel);\n }\n\n /**\n * Validates that the AnnotationTextStyle's settings are valid before insert.\n * @inheritdoc\n * @beta\n */\n protected static override onInsert(arg: OnElementPropsArg): void {\n super.onInsert(arg);\n this.validateSettings(arg.props as AnnotationTextStyleProps);\n }\n\n /**\n * Validates that the AnnotationTextStyle's settings are valid before update.\n * @inheritdoc\n * @beta\n */\n protected static override onUpdate(arg: OnElementPropsArg): void {\n super.onUpdate(arg);\n this.validateSettings(arg.props as AnnotationTextStyleProps);\n }\n\n private static validateSettings(props: AnnotationTextStyleProps): void {\n const settingProps = AnnotationTextStyle.parseTextStyleSettings(props.settings);\n if (!settingProps) return;\n const settings = TextStyleSettings.fromJSON(settingProps.data);\n const errors = settings.getValidationErrors();\n if (errors.length > 0) {\n throw new Error(`Invalid AnnotationTextStyle settings: ${errors.join(\", \")}`);\n }\n }\n\n /**\n * AnnotationTextStyle custom HandledProps include 'settings'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"settings\", source: \"Class\" },\n ];\n\n /**\n * AnnotationTextStyle deserializes 'settings'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): AnnotationTextStyleProps {\n const elProps = super.deserialize(props) as AnnotationTextStyleProps;\n const settings = this.parseTextStyleSettings(props.row.settings);\n if (settings) {\n elProps.settings = JSON.stringify(settings);\n }\n return elProps;\n }\n\n /**\n * AnnotationTextStyle serializes 'settings'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: AnnotationTextStyleProps, iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, iModel);\n if (props.settings !== undefined) {\n inst.settings = props.settings;\n }\n return inst;\n }\n\n /** Parses, validates, and potentially migrates the text style settings data from a JSON string. */\n private static parseTextStyleSettings(json: string | undefined): VersionedJSON<TextStyleSettingsProps> | undefined {\n if (!json) return undefined;\n return validateAndMigrateVersionedJSON<TextStyleSettingsProps>(json, TEXT_STYLE_SETTINGS_JSON_VERSION, migrateTextStyleSettings);\n }\n\n /** When copying an element from one iModel to another, returns the Id of the AnnotationTextStyle in the `context`'s target iModel\n * corresponding to `sourceTextStyleId`, or [Id64.invalid]($bentley) if no corresponding text style exists.\n * If a text style with the same [Code]($common) exists in the target iModel, the style Id will be remapped to refer to that style.\n * Otherwise, a copy of the style will be imported into the target iModel and its element Id returned.\n * Implementations of [[ITextAnnotation]] should invoke this function when implementing their [[Element.onCloned]] method.\n * @throws Error if an attempt to import the text style failed.\n */\n public static async remapTextStyleId(sourceTextStyleId: Id64String, context: IModelElementCloneContext): Promise<Id64String> {\n // No remapping necessary if there's no text style or we're not copying to a different iModel.\n if (!Id64.isValid(sourceTextStyleId) || !context.isBetweenIModels) {\n return sourceTextStyleId;\n }\n\n // If the style's already been remapped, we're finished.\n let dstStyleId: Id64String | undefined = context.findTargetElementId(sourceTextStyleId);\n if (Id64.isValid(dstStyleId)) {\n return dstStyleId;\n }\n\n // Look up the style. It really ought to exist.\n const srcStyle = context.sourceDb.elements.tryGetElement<AnnotationTextStyle>(sourceTextStyleId);\n if (!srcStyle) {\n return Id64.invalid;\n }\n\n // If a style with the same code exists in the target iModel, remap to that one.\n dstStyleId = context.targetDb.elements.queryElementIdByCode(srcStyle.code);\n if (undefined !== dstStyleId) {\n return dstStyleId;\n }\n\n // Copy the style into the target iModel and remap its Id.\n const dstStyleProps = await context.cloneElement(srcStyle);\n dstStyleId = context.targetDb.elements.insertElement(dstStyleProps);\n context.remapElement(sourceTextStyleId, dstStyleId);\n return dstStyleId;\n }\n\n protected static override async onCloned(context: IModelElementCloneContext, srcProps: AnnotationTextStyleProps, dstProps: AnnotationTextStyleProps): Promise<void> {\n await super.onCloned(context, srcProps, dstProps);\n if (!context.isBetweenIModels) {\n return;\n }\n\n const settingsProps = AnnotationTextStyle.parseTextStyleSettings(srcProps.settings);\n const font = TextStyleSettings.fromJSON(settingsProps?.data).font;\n\n const fontsToEmbed = [];\n for (const file of context.sourceDb.fonts.queryEmbeddedFontFiles()) {\n if (file.type === font.type && file.faces.some((face) => face.familyName === font.name)) {\n fontsToEmbed.push(file);\n }\n }\n\n await Promise.all(fontsToEmbed.map(async (file) => context.targetDb.fonts.embedFontFile({ file })));\n }\n}\n"]}
1
+ {"version":3,"file":"TextAnnotationElement.js","sourceRoot":"","sources":["../../../src/annotations/TextAnnotationElement.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA8DH,0DAIC;AAhED,oDAAic;AAEjc,wCAAoI;AACpI,sDAA+D;AAC/D,uDAAuE;AACvE,qEAAwE;AACxE,+EAAkI;AAGlI,iCAAiC;AAEjC;;;EAGE;AACW,QAAA,4BAA4B,GAAG,OAAO,CAAC;AAEpD,SAA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AAC,CAAC;YAC1B,CAAC;QACH,CAAC;QAED,MAAM,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACtG,CAAC;;AAlMH,kDAmMC","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 { AnnotationTextStyleProps, BisCodeSpec, Code, CodeProps, CodeScopeProps, CodeSpec, ECVersionString, ElementGeometry, ElementGeometryBuilderParams, EntityReferenceSet, Placement2d, Placement2dProps, Placement3d, Placement3dProps, PlacementProps, TextAnnotation, TextAnnotation2dProps, TextAnnotation3dProps, TextAnnotationProps, TextStyleSettings, TextStyleSettingsProps, traverseTextBlockComponent, VersionedJSON } from \"@itwin/core-common\";\nimport { IModelDb } from \"../IModelDb\";\nimport { AnnotationElement2d, DefinitionElement, Drawing, GraphicalElement3d, OnElementIdArg, OnElementPropsArg } from \"../Element\";\nimport { assert, Id64, Id64String } from \"@itwin/core-bentley\";\nimport { layoutTextBlock, TextStyleResolver } from \"./TextBlockLayout\";\nimport { appendTextAnnotationGeometry } from \"./TextAnnotationGeometry\";\nimport { ElementDrivesTextAnnotation, TextAnnotationUsesTextStyleByDefault, TextBlockAndId } from \"./ElementDrivesTextAnnotation\";\nimport { IModelElementCloneContext } from \"../IModelElementCloneContext\";\nimport { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow } from \"../Entity\";\nimport * as semver from \"semver\";\n\n/** The version of the JSON stored in `TextAnnotation2d/3dProps.textAnnotationData` used by the code.\n * Uses the same semantics as [ECVersion]($ecschema-metadata).\n * @internal\n*/\nexport const TEXT_ANNOTATION_JSON_VERSION = \"1.0.0\";\n\nfunction validateAndMigrateVersionedJSON<T>(\n json: string,\n currentVersion: ECVersionString,\n migrate: (old: VersionedJSON<T>) => T\n): VersionedJSON<T> | undefined {\n let parsed;\n try {\n parsed = JSON.parse(json) as VersionedJSON<T>;\n } catch {\n return undefined;\n }\n\n const version = parsed.version;\n if (typeof version !== \"string\" || !semver.valid(version))\n throw new Error(\"JSON version is missing or invalid.\");\n\n if (typeof parsed.data !== \"object\" || parsed.data === null)\n throw new Error(\"JSON data is missing or invalid.\");\n\n // Newer\n if (semver.gt(version, currentVersion))\n throw new Error(`JSON version ${parsed.version} is newer than supported version ${currentVersion}. Application update required to understand data.`);\n\n // Older\n if (semver.lt(version, currentVersion)) {\n parsed.data = migrate(parsed);\n parsed.version = currentVersion;\n }\n\n return parsed;\n}\n\nfunction migrateTextAnnotationData(oldData: VersionedJSON<TextAnnotationProps>): TextAnnotationProps {\n if (oldData.version === TEXT_ANNOTATION_JSON_VERSION) return oldData.data;\n\n // Place migration logic here.\n\n throw new Error(`Migration for textAnnotationData from version ${oldData.version} to ${TEXT_ANNOTATION_JSON_VERSION} failed.`);\n}\n\n/** Parses, validates, and potentially migrates the text annotation data from a JSON string.\n * @internal\n */\nexport function parseTextAnnotationData(json: string | undefined): VersionedJSON<TextAnnotationProps> | undefined {\n if (!json) return undefined;\n\n return validateAndMigrateVersionedJSON<TextAnnotationProps>(json, TEXT_ANNOTATION_JSON_VERSION, migrateTextAnnotationData);\n}\n\nfunction getElementGeometryBuilderParams(iModel: IModelDb, modelId: Id64String, categoryId: Id64String, _placementProps: PlacementProps, annotationProps?: TextAnnotationProps, textStyleId?: Id64String, _subCategory?: Id64String): ElementGeometryBuilderParams {\n const textBlock = TextAnnotation.fromJSON(annotationProps).textBlock;\n const textStyleResolver = new TextStyleResolver({ textBlock, textStyleId: textStyleId ?? \"\", iModel });\n const layout = layoutTextBlock({ iModel, textBlock, textStyleResolver });\n const builder = new ElementGeometry.Builder();\n let scaleFactor = 1;\n const element = iModel.elements.getElement(modelId);\n if (element instanceof Drawing)\n scaleFactor = element.scaleFactor;\n appendTextAnnotationGeometry({ layout, textStyleResolver, scaleFactor, annotationProps: annotationProps ?? {}, builder, categoryId });\n\n return { entryArray: builder.entries };\n}\n\n/** Arguments supplied when creating a [[TextAnnotation2d]].\n * @beta\n */\nexport interface TextAnnotation2dCreateArgs {\n /** The category ID for the annotation. */\n category: Id64String;\n /** The model ID where the annotation will be placed. */\n model: Id64String;\n /** The placement properties for the annotation. */\n placement: Placement2dProps;\n /** The default text style ID for the annotation. */\n defaultTextStyleId?: Id64String;\n /** Optional [[TextAnnotation]] JSON representation used to create the `TextAnnotation2d`. Essentially an empty element if not provided. */\n textAnnotationProps?: TextAnnotationProps;\n /** Optional code for the element. */\n code?: CodeProps;\n}\n\n/** Arguments supplied when creating a [[TextAnnotation3d]].\n * @beta\n */\nexport interface TextAnnotation3dCreateArgs {\n /** The category ID for the annotation. */\n category: Id64String;\n /** The model ID where the annotation will be placed. */\n model: Id64String;\n /** The placement properties for the annotation. */\n placement: Placement3dProps;\n /** The default text style ID for the annotation. */\n defaultTextStyleId?: Id64String;\n /** Optional [[TextAnnotation]] JSON representation used to create the `TextAnnotation3d`. Essentially an empty element if not provided. */\n textAnnotationProps?: TextAnnotationProps;\n /** Optional code for the element. */\n code?: CodeProps;\n}\n\n/** An element that displays textual content within a 2d model.\n * The text is stored as a [TextAnnotation]($common) from which the element's [geometry]($docs/learning/common/GeometryStream.md) and [Placement]($common) are computed.\n * @see [[setAnnotation]] to change the textual content.\n * @public @preview\n */\nexport class TextAnnotation2d extends AnnotationElement2d /* implements ITextAnnotation */ {\n /** @internal */\n public static override get className(): string { return \"TextAnnotation2d\"; }\n /**\n * The default [[AnnotationTextStyle]] used by the TextAnnotation2d.\n * @beta\n */\n public defaultTextStyle?: TextAnnotationUsesTextStyleByDefault;\n /** The data associated with the text annotation. */\n private _textAnnotationProps?: TextAnnotationProps;\n\n /** Extract the textual content, if present.\n * @see [[setAnnotation]] to change it.\n */\n public getAnnotation(): TextAnnotation | undefined {\n return this._textAnnotationProps ? TextAnnotation.fromJSON(this._textAnnotationProps) : undefined;\n }\n\n /** Change the textual content of the `TextAnnotation2d`.\n * @see [[getAnnotation]] to extract the current annotation.\n * @param annotation The new annotation\n */\n public setAnnotation(annotation: TextAnnotation) {\n this._textAnnotationProps = annotation.toJSON();\n }\n\n protected constructor(props: TextAnnotation2dProps, iModel: IModelDb) {\n super(props, iModel);\n if (props.defaultTextStyle) {\n this.defaultTextStyle = new TextAnnotationUsesTextStyleByDefault(props.defaultTextStyle.id);\n }\n this._textAnnotationProps = parseTextAnnotationData(props.textAnnotationData)?.data;\n }\n\n /** Creates a new instance of `TextAnnotation2d` from its JSON representation. */\n public static fromJSON(props: TextAnnotation2dProps, iModel: IModelDb): TextAnnotation2d {\n return new TextAnnotation2d(props, iModel);\n }\n\n /**\n * Converts the current `TextAnnotation2d` instance to its JSON representation.\n * It also computes the `elementGeometryBuilderParams` property used to create the GeometryStream.\n * @inheritdoc\n */\n public override toJSON(): TextAnnotation2dProps {\n const props = super.toJSON() as TextAnnotation2dProps;\n props.textAnnotationData = this._textAnnotationProps ? JSON.stringify({ version: TEXT_ANNOTATION_JSON_VERSION, data: this._textAnnotationProps }) : undefined;\n if (this._textAnnotationProps) {\n props.elementGeometryBuilderParams = getElementGeometryBuilderParams(this.iModel, this.model, this.category, this.placement, this._textAnnotationProps, this.defaultTextStyle ? this.defaultTextStyle.id : undefined);\n }\n\n return props;\n }\n\n /** Creates a new `TextAnnotation2d` instance with the specified properties.\n * @param iModelDb The iModel.\n * @param arg The arguments for creating the TextAnnotation2d.\n * @beta\n */\n public static create(iModelDb: IModelDb, arg: TextAnnotation2dCreateArgs): TextAnnotation2d {\n const elementProps: TextAnnotation2dProps = {\n classFullName: this.classFullName,\n textAnnotationData: arg.textAnnotationProps ? JSON.stringify({ version: TEXT_ANNOTATION_JSON_VERSION, data: arg.textAnnotationProps }) : undefined,\n defaultTextStyle: arg.defaultTextStyleId ? new TextAnnotationUsesTextStyleByDefault(arg.defaultTextStyleId).toJSON() : undefined,\n placement: arg.placement,\n model: arg.model,\n category: arg.category,\n code: arg.code ?? Code.createEmpty(),\n };\n return new this(elementProps, iModelDb);\n }\n\n /**\n * Updates the geometry of the TextAnnotation2d on insert and validates version.\n * @inheritdoc\n * @beta\n */\n protected static override onInsert(arg: OnElementPropsArg): void {\n super.onInsert(arg);\n this.validateVersionAndUpdateGeometry(arg);\n }\n\n /**\n * Updates the geometry of the TextAnnotation2d on update and validates version.\n * @inheritdoc\n * @beta\n */\n protected static override onUpdate(arg: OnElementPropsArg): void {\n super.onUpdate(arg);\n this.validateVersionAndUpdateGeometry(arg);\n }\n\n /**\n * Populates the `elementGeometryBuilderParams` property in the [TextAnnotation2dProps]($common).\n * Only does this if the `elementGeometryBuilderParams` is not already set and if there is actually a text annotation to produce geometry for.\n * Also, validates the version of the text annotation data and migrates it if necessary.\n * @beta\n */\n protected static validateVersionAndUpdateGeometry(arg: OnElementPropsArg): void {\n const props = arg.props as TextAnnotation2dProps;\n const textAnnotationData = parseTextAnnotationData(props.textAnnotationData);\n if (!props.elementGeometryBuilderParams && textAnnotationData) {\n props.elementGeometryBuilderParams = getElementGeometryBuilderParams(arg.iModel, props.model, props.category, props.placement ?? Placement2d.fromJSON(), textAnnotationData.data, props.defaultTextStyle?.id);\n }\n }\n\n /**\n * TextAnnotation2d custom HandledProps include 'textAnnotationData'.\n * @inheritdoc\n * @internal\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"textAnnotationData\", source: \"Class\" },\n ];\n\n /**\n * TextAnnotation2d deserializes 'textAnnotationData'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): TextAnnotation2dProps {\n const elProps = super.deserialize(props) as TextAnnotation2dProps;\n const textAnnotationData = parseTextAnnotationData(props.row.textAnnotationData);\n if (textAnnotationData) {\n elProps.textAnnotationData = JSON.stringify(textAnnotationData);\n }\n return elProps;\n }\n\n /**\n * TextAnnotation2d serializes 'textAnnotationData'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: TextAnnotation2dProps, iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, iModel);\n if (props.textAnnotationData !== undefined) {\n inst.textAnnotationData = props.textAnnotationData;\n }\n return inst;\n }\n\n /** @internal */\n public getTextBlocks(): Iterable<TextBlockAndId> {\n return getTextBlocks(this);\n }\n\n /** @internal */\n public updateTextBlocks(textBlocks: TextBlockAndId[]): void {\n return updateTextBlocks(this, textBlocks);\n }\n\n /** @internal */\n public static override onInserted(arg: OnElementIdArg): void {\n super.onInserted(arg);\n ElementDrivesTextAnnotation.updateFieldDependencies(arg.id, arg.iModel);\n }\n\n /** @internal */\n public static override onUpdated(arg: OnElementIdArg): void {\n super.onUpdated(arg);\n ElementDrivesTextAnnotation.updateFieldDependencies(arg.id, arg.iModel);\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n collectReferenceIds(this, referenceIds);\n }\n\n /** @internal */\n protected static override async onCloned(context: IModelElementCloneContext, srcProps: TextAnnotation2dProps, dstProps: TextAnnotation2dProps): Promise<void> {\n await super.onCloned(context, srcProps, dstProps);\n\n const srcElem = TextAnnotation2d.fromJSON(srcProps, context.sourceDb);\n ElementDrivesTextAnnotation.remapFields(srcElem, context);\n const anno = srcElem.getAnnotation();\n dstProps.textAnnotationData = anno ? JSON.stringify({ version: TEXT_ANNOTATION_JSON_VERSION, data: anno.toJSON() }) : undefined;\n\n return remapTextStyle(context, srcElem, dstProps);\n }\n}\n\n/** An element that displays textual content within a 3d model.\n * The text is stored as a [TextAnnotation]($common) from which the element's [geometry]($docs/learning/common/GeometryStream.md) and [Placement]($common) are computed.\n * @see [[setAnnotation]] to change the textual content.\n * @public @preview\n */\nexport class TextAnnotation3d extends GraphicalElement3d /* implements ITextAnnotation */ {\n /** @internal */\n public static override get className(): string { return \"TextAnnotation3d\"; }\n /**\n * The default [[AnnotationTextStyle]] used by the TextAnnotation3d.\n * @beta\n */\n public defaultTextStyle?: TextAnnotationUsesTextStyleByDefault;\n /** The data associated with the text annotation. */\n private _textAnnotationProps?: TextAnnotationProps;\n\n /** Extract the textual content, if present.\n * @see [[setAnnotation]] to change it.\n */\n public getAnnotation(): TextAnnotation | undefined {\n return this._textAnnotationProps ? TextAnnotation.fromJSON(this._textAnnotationProps) : undefined;\n }\n\n /** Change the textual content of the `TextAnnotation3d`.\n * @see [[getAnnotation]] to extract the current annotation.\n * @param annotation The new annotation\n */\n public setAnnotation(annotation: TextAnnotation) {\n this._textAnnotationProps = annotation.toJSON();\n }\n\n protected constructor(props: TextAnnotation3dProps, iModel: IModelDb) {\n super(props, iModel);\n if (props.defaultTextStyle) {\n this.defaultTextStyle = new TextAnnotationUsesTextStyleByDefault(props.defaultTextStyle.id);\n }\n this._textAnnotationProps = parseTextAnnotationData(props.textAnnotationData)?.data;\n }\n\n /** Creates a new instance of `TextAnnotation3d` from its JSON representation. */\n public static fromJSON(props: TextAnnotation3dProps, iModel: IModelDb): TextAnnotation3d {\n return new TextAnnotation3d(props, iModel);\n }\n\n /**\n * Converts the current `TextAnnotation3d` instance to its JSON representation.\n * It also computes the `elementGeometryBuilderParams` property used to create the GeometryStream.\n * @inheritdoc\n */\n public override toJSON(): TextAnnotation3dProps {\n const props = super.toJSON() as TextAnnotation3dProps;\n props.textAnnotationData = this._textAnnotationProps ? JSON.stringify({ version: TEXT_ANNOTATION_JSON_VERSION, data: this._textAnnotationProps }) : undefined;\n if (this._textAnnotationProps) {\n props.elementGeometryBuilderParams = getElementGeometryBuilderParams(this.iModel, this.model, this.category, this.placement, this._textAnnotationProps, this.defaultTextStyle ? this.defaultTextStyle.id : undefined);\n }\n\n return props;\n }\n\n /** Creates a new `TextAnnotation3d` instance with the specified properties.\n * @param iModelDb The iModel.\n * @param arg The arguments for creating the TextAnnotation3d.\n * @beta\n */\n public static create(iModelDb: IModelDb, arg: TextAnnotation3dCreateArgs): TextAnnotation3d {\n const elementProps: TextAnnotation3dProps = {\n classFullName: this.classFullName,\n textAnnotationData: arg.textAnnotationProps ? JSON.stringify({ version: TEXT_ANNOTATION_JSON_VERSION, data: arg.textAnnotationProps }) : undefined,\n defaultTextStyle: arg.defaultTextStyleId ? new TextAnnotationUsesTextStyleByDefault(arg.defaultTextStyleId).toJSON() : undefined,\n placement: arg.placement,\n model: arg.model,\n category: arg.category,\n code: arg.code ?? Code.createEmpty(),\n };\n return new this(elementProps, iModelDb);\n }\n\n /**\n * Updates the geometry of the TextAnnotation3d on insert and validates version..\n * @inheritdoc\n * @beta\n */\n protected static override onInsert(arg: OnElementPropsArg): void {\n super.onInsert(arg);\n this.validateVersionAndUpdateGeometry(arg);\n }\n\n /**\n * Updates the geometry of the TextAnnotation3d on update and validates version..\n * @inheritdoc\n * @beta\n */\n protected static override onUpdate(arg: OnElementPropsArg): void {\n super.onUpdate(arg);\n this.validateVersionAndUpdateGeometry(arg);\n }\n\n /**\n * Populates the `elementGeometryBuilderParams` property in the [TextAnnotation3dProps]($common).\n * Only does this if the `elementGeometryBuilderParams` is not already set and if there is actually a text annotation to produce geometry for.\n * Also, validates the version of the text annotation data and migrates it if necessary.\n * @beta\n */\n protected static validateVersionAndUpdateGeometry(arg: OnElementPropsArg): void {\n const props = arg.props as TextAnnotation3dProps;\n const textAnnotationData = parseTextAnnotationData(props.textAnnotationData);\n if (!props.elementGeometryBuilderParams && textAnnotationData) {\n props.elementGeometryBuilderParams = getElementGeometryBuilderParams(arg.iModel, props.model, props.category, props.placement ?? Placement3d.fromJSON(), textAnnotationData.data, props.defaultTextStyle?.id);\n }\n }\n\n /**\n * TextAnnotation3d custom HandledProps include 'textAnnotationData'.\n * @inheritdoc\n * @internal\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"textAnnotationData\", source: \"Class\" },\n ];\n\n /**\n * TextAnnotation3d deserializes 'textAnnotationData'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): TextAnnotation3dProps {\n const elProps = super.deserialize(props) as TextAnnotation3dProps;\n const textAnnotationData = parseTextAnnotationData(props.row.textAnnotationData);\n if (textAnnotationData) {\n elProps.textAnnotationData = JSON.stringify(textAnnotationData);\n }\n return elProps;\n }\n\n /**\n * TextAnnotation3d serializes 'textAnnotationData'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: TextAnnotation3dProps, iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, iModel);\n if (props.textAnnotationData !== undefined) {\n inst.textAnnotationData = props.textAnnotationData;\n }\n return inst;\n }\n\n /** @internal */\n public getTextBlocks(): Iterable<TextBlockAndId> {\n return getTextBlocks(this);\n }\n\n /** @internal */\n public updateTextBlocks(textBlocks: TextBlockAndId[]): void {\n return updateTextBlocks(this, textBlocks);\n }\n\n /** @internal */\n public static override onInserted(arg: OnElementIdArg): void {\n super.onInserted(arg);\n ElementDrivesTextAnnotation.updateFieldDependencies(arg.id, arg.iModel);\n }\n\n /** @internal */\n public static override onUpdated(arg: OnElementIdArg): void {\n super.onUpdated(arg);\n ElementDrivesTextAnnotation.updateFieldDependencies(arg.id, arg.iModel);\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n collectReferenceIds(this, referenceIds);\n }\n\n /** @internal */\n protected static override async onCloned(context: IModelElementCloneContext, srcProps: TextAnnotation3dProps, dstProps: TextAnnotation3dProps): Promise<void> {\n await super.onCloned(context, srcProps, dstProps);\n\n const srcElem = TextAnnotation3d.fromJSON(srcProps, context.sourceDb);\n ElementDrivesTextAnnotation.remapFields(srcElem, context);\n const anno = srcElem.getAnnotation();\n dstProps.textAnnotationData = anno ? JSON.stringify({ version: TEXT_ANNOTATION_JSON_VERSION, data: anno.toJSON() }) : undefined;\n\n return remapTextStyle(context, srcElem, dstProps);\n }\n}\n\nasync function remapTextStyle(\n context: IModelElementCloneContext,\n srcElem: TextAnnotation2d | TextAnnotation3d,\n dstProps: TextAnnotation2dProps | TextAnnotation3dProps\n): Promise<void> {\n const dstStyleId = await AnnotationTextStyle.remapTextStyleId(srcElem.defaultTextStyle?.id ?? Id64.invalid, context);\n dstProps.defaultTextStyle = Id64.isValid(dstStyleId) ? new TextAnnotationUsesTextStyleByDefault(dstStyleId).toJSON() : undefined;\n}\n\nfunction collectReferenceIds(elem: TextAnnotation2d | TextAnnotation3d, referenceIds: EntityReferenceSet): void {\n const style = elem.defaultTextStyle?.id;\n if (style && Id64.isValidId64(style)) {\n referenceIds.addElement(style);\n }\n\n const block = elem.getAnnotation()?.textBlock;\n if (block) {\n for (const { child } of traverseTextBlockComponent(block)) {\n if (child.type === \"field\") {\n const hostId = child.propertyHost.elementId;\n if (Id64.isValidId64(hostId)) {\n referenceIds.addElement(hostId);\n }\n }\n }\n }\n}\n\nfunction getTextBlocks(elem: TextAnnotation2d | TextAnnotation3d): Iterable<TextBlockAndId> {\n const annotation = elem.getAnnotation();\n return annotation ? [{ textBlock: annotation.textBlock, id: undefined }] : [];\n}\n\nfunction updateTextBlocks(elem: TextAnnotation2d | TextAnnotation3d, textBlocks: TextBlockAndId[]): void {\n assert(textBlocks.length === 1);\n assert(textBlocks[0].id === undefined);\n\n const annotation = elem.getAnnotation();\n if (!annotation) {\n // We must obtain the TextBlockAndId from the element in the first place, so the only way we could end up here is if\n // somebody removed the text annotation after we called getTextBlocks. That's gotta be a mistake.\n throw new Error(\"Text annotation element has no text\");\n }\n\n annotation.textBlock = textBlocks[0].textBlock;\n\n elem.setAnnotation(annotation);\n}\n\n/** The version of the JSON stored in `AnnotationTextStyleProps.settings` used by the code.\n * Uses the same semantics as [ECVersion]($ecschema-metadata).\n * @internal\n*/\n// 1.0.1 - Added terminatorShapes for leaders\nexport const TEXT_STYLE_SETTINGS_JSON_VERSION = \"1.0.1\";\n\nfunction migrateTextStyleSettings(oldData: VersionedJSON<TextStyleSettingsProps>): TextStyleSettingsProps {\n if (oldData.version === TEXT_STYLE_SETTINGS_JSON_VERSION) return oldData.data;\n\n // Migrate from 1.0.0 to 1.0.1\n if (oldData.data.leader && !oldData.data.leader.terminatorShape) {\n oldData.data.leader.terminatorShape = TextStyleSettings.defaultProps.leader.terminatorShape;\n }\n return oldData.data;\n\n}\n\n/** Arguments supplied when creating an [[AnnotationTextStyle]].\n * @beta\n */\nexport interface TextStyleCreateArgs {\n /** The ID of the [[DefinitionModel]]. */\n definitionModelId: Id64String;\n /** The name to assign to the [[AnnotationTextStyle]]. */\n name: string;\n /** Optional text style settings used to create the [[AnnotationTextStyle]]. Default settings will be used if not provided. */\n settings?: TextStyleSettingsProps;\n /** Optional description for the [[AnnotationTextStyle]]. */\n description?: string;\n}\n\n/**\n * The definition element that holds text style information.\n * The style is stored as a [TextStyleSettings]($common).\n * @beta\n */\nexport class AnnotationTextStyle extends DefinitionElement {\n /** @internal */\n public static override get className(): string { return \"AnnotationTextStyle\"; }\n /**\n * Optional text describing the `AnnotationTextStyle`.\n */\n public description?: string;\n /**\n * The text style settings for the `AnnotationTextStyle`.\n * @see [[TextStyleSettings]] for more information.\n */\n public settings: TextStyleSettings;\n\n protected constructor(props: AnnotationTextStyleProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n const settingsProps = AnnotationTextStyle.parseTextStyleSettings(props.settings);\n this.settings = TextStyleSettings.fromJSON(settingsProps?.data);\n }\n\n /**\n * Creates a Code for an `AnnotationTextStyle` given a name that is meant to be unique within the scope of the specified DefinitionModel.\n *\n * @param iModel - The IModelDb.\n * @param definitionModelId - The ID of the DefinitionModel that contains the AnnotationTextStyle and provides the scope for its name.\n * @param name - The AnnotationTextStyle name.\n * @beta\n */\n public static createCode(iModel: IModelDb, definitionModelId: CodeScopeProps, name: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.annotationTextStyle);\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: name });\n }\n\n /**\n * Creates a new instance of `AnnotationTextStyle` with the specified properties.\n *\n * @param iModelDb - The iModelDb.\n * @param arg - The arguments for creating the AnnotationTextStyle.\n * @beta\n */\n public static create(iModelDb: IModelDb, arg: TextStyleCreateArgs): AnnotationTextStyle {\n const props: AnnotationTextStyleProps = {\n classFullName: this.classFullName,\n model: arg.definitionModelId,\n code: this.createCode(iModelDb, arg.definitionModelId, arg.name).toJSON(),\n description: arg.description,\n settings: arg.settings ? JSON.stringify({ version: TEXT_STYLE_SETTINGS_JSON_VERSION, data: arg.settings }) : undefined,\n }\n return new this(props, iModelDb);\n }\n\n /**\n * Converts the current `AnnotationTextStyle` instance to its JSON representation.\n * @inheritdoc\n */\n public override toJSON(): AnnotationTextStyleProps {\n const props = super.toJSON() as AnnotationTextStyleProps;\n props.description = this.description;\n props.settings = JSON.stringify({ version: TEXT_STYLE_SETTINGS_JSON_VERSION, data: this.settings.toJSON() });\n return props;\n }\n\n /** Creates a new instance of `AnnotationTextStyle` from its JSON representation. */\n public static fromJSON(props: AnnotationTextStyleProps, iModel: IModelDb): AnnotationTextStyle {\n return new AnnotationTextStyle(props, iModel);\n }\n\n /**\n * Validates that the AnnotationTextStyle's settings are valid before insert.\n * @inheritdoc\n * @beta\n */\n protected static override onInsert(arg: OnElementPropsArg): void {\n super.onInsert(arg);\n this.validateSettings(arg.props as AnnotationTextStyleProps);\n }\n\n /**\n * Validates that the AnnotationTextStyle's settings are valid before update.\n * @inheritdoc\n * @beta\n */\n protected static override onUpdate(arg: OnElementPropsArg): void {\n super.onUpdate(arg);\n this.validateSettings(arg.props as AnnotationTextStyleProps);\n }\n\n private static validateSettings(props: AnnotationTextStyleProps): void {\n const settingProps = AnnotationTextStyle.parseTextStyleSettings(props.settings);\n if (!settingProps) return;\n const settings = TextStyleSettings.fromJSON(settingProps.data);\n const errors = settings.getValidationErrors();\n if (errors.length > 0) {\n throw new Error(`Invalid AnnotationTextStyle settings: ${errors.join(\", \")}`);\n }\n }\n\n /**\n * AnnotationTextStyle custom HandledProps include 'settings'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"settings\", source: \"Class\" },\n ];\n\n /**\n * AnnotationTextStyle deserializes 'settings'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): AnnotationTextStyleProps {\n const elProps = super.deserialize(props) as AnnotationTextStyleProps;\n const settings = this.parseTextStyleSettings(props.row.settings);\n if (settings) {\n elProps.settings = JSON.stringify(settings);\n }\n return elProps;\n }\n\n /**\n * AnnotationTextStyle serializes 'settings'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: AnnotationTextStyleProps, iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, iModel);\n if (props.settings !== undefined) {\n inst.settings = props.settings;\n }\n return inst;\n }\n\n /** Parses, validates, and potentially migrates the text style settings data from a JSON string. */\n private static parseTextStyleSettings(json: string | undefined): VersionedJSON<TextStyleSettingsProps> | undefined {\n if (!json) return undefined;\n return validateAndMigrateVersionedJSON<TextStyleSettingsProps>(json, TEXT_STYLE_SETTINGS_JSON_VERSION, migrateTextStyleSettings);\n }\n\n /** When copying an element from one iModel to another, returns the Id of the AnnotationTextStyle in the `context`'s target iModel\n * corresponding to `sourceTextStyleId`, or [Id64.invalid]($bentley) if no corresponding text style exists.\n * If a text style with the same [Code]($common) exists in the target iModel, the style Id will be remapped to refer to that style.\n * Otherwise, a copy of the style will be imported into the target iModel and its element Id returned.\n * Implementations of [[ITextAnnotation]] should invoke this function when implementing their [[Element.onCloned]] method.\n * @throws Error if an attempt to import the text style failed.\n */\n public static async remapTextStyleId(sourceTextStyleId: Id64String, context: IModelElementCloneContext): Promise<Id64String> {\n // No remapping necessary if there's no text style or we're not copying to a different iModel.\n if (!Id64.isValid(sourceTextStyleId) || !context.isBetweenIModels) {\n return sourceTextStyleId;\n }\n\n // If the style's already been remapped, we're finished.\n let dstStyleId: Id64String | undefined = context.findTargetElementId(sourceTextStyleId);\n if (Id64.isValid(dstStyleId)) {\n return dstStyleId;\n }\n\n // Look up the style. It really ought to exist.\n const srcStyle = context.sourceDb.elements.tryGetElement<AnnotationTextStyle>(sourceTextStyleId);\n if (!srcStyle) {\n return Id64.invalid;\n }\n\n // If a style with the same code exists in the target iModel, remap to that one.\n dstStyleId = context.targetDb.elements.queryElementIdByCode(srcStyle.code);\n if (undefined !== dstStyleId) {\n return dstStyleId;\n }\n\n // Copy the style into the target iModel and remap its Id.\n const dstStyleProps = await context.cloneElement(srcStyle);\n dstStyleId = context.targetDb.elements.insertElement(dstStyleProps);\n context.remapElement(sourceTextStyleId, dstStyleId);\n return dstStyleId;\n }\n\n protected static override async onCloned(context: IModelElementCloneContext, srcProps: AnnotationTextStyleProps, dstProps: AnnotationTextStyleProps): Promise<void> {\n await super.onCloned(context, srcProps, dstProps);\n if (!context.isBetweenIModels) {\n return;\n }\n\n const settingsProps = AnnotationTextStyle.parseTextStyleSettings(srcProps.settings);\n const font = TextStyleSettings.fromJSON(settingsProps?.data).font;\n\n const fontsToEmbed = [];\n for (const file of context.sourceDb.fonts.queryEmbeddedFontFiles()) {\n if (file.type === font.type && file.faces.some((face) => face.familyName === font.name)) {\n fontsToEmbed.push(file);\n }\n }\n\n await Promise.all(fontsToEmbed.map(async (file) => context.targetDb.fonts.embedFontFile({ file })));\n }\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  * @module Elements
3
3
  */
4
4
  import { GuidString, Id64String } from "@itwin/core-bentley";
5
- import { AxisAlignedBox3d, Code, CodeScopeProps, ConcreteEntityTypes, DefinitionElementProps, DrawingProps, ElementAlignedBox3d, ElementProps, EntityMetaData, EntityReferenceSet, GeometricElement2dProps, GeometricElement3dProps, GeometricElementProps, GeometryPartProps, GeometryStreamProps, InformationPartitionElementProps, LineStyleProps, ModelProps, PhysicalElementProps, PhysicalTypeProps, Placement2d, Placement3d, RelatedElement, RenderSchedule, RenderTimelineProps, RepositoryLinkProps, SectionDrawingLocationProps, SectionDrawingProps, SectionType, SheetBorderTemplateProps, SheetProps, SheetTemplateProps, SubjectProps, TypeDefinition, TypeDefinitionElementProps, UrlLinkProps } from "@itwin/core-common";
5
+ import { AxisAlignedBox3d, Code, CodeScopeProps, ConcreteEntityTypes, DefinitionElementProps, DrawingProps, ElementAlignedBox3d, ElementProps, EntityMetaData, EntityReferenceSet, GeometricElement2dProps, GeometricElement3dProps, GeometricElementProps, GeometryPartProps, GeometryStreamProps, InformationPartitionElementProps, LineStyleProps, ModelProps, PhysicalElementProps, PhysicalTypeProps, Placement2d, Placement3d, ProjectInformation, ProjectInformationRecordProps, RelatedElement, RenderSchedule, RenderTimelineProps, RepositoryLinkProps, SectionDrawingLocationProps, SectionDrawingProps, SectionType, SheetBorderTemplateProps, SheetProps, SheetTemplateProps, SubjectProps, TypeDefinition, TypeDefinitionElementProps, UrlLinkProps } from "@itwin/core-common";
6
6
  import { ClipVector, Transform } from "@itwin/core-geometry";
7
7
  import { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow, Entity } from "./Entity";
8
8
  import { IModelDb } from "./IModelDb";
@@ -1155,4 +1155,32 @@ export declare class RenderTimeline extends InformationRecordElement {
1155
1155
  */
1156
1156
  static remapScript(context: IModelElementCloneContext, input: RenderSchedule.ScriptProps): RenderSchedule.ScriptProps;
1157
1157
  }
1158
+ /** Arguments supplied to [[ProjectInformationRecord.create]].
1159
+ * @beta
1160
+ */
1161
+ export interface ProjectInformationRecordCreateArgs extends ProjectInformation {
1162
+ /** The iModel in which to create the new element. */
1163
+ iModel: IModelDb;
1164
+ /** The new element's code. Defaults to an empty code. */
1165
+ code?: Code;
1166
+ /** The Id of the parent [[Subject]] whose project-level properties the ProjectInformationRecord element describes.
1167
+ * The ProjectInformationRecord element will reside in the same [[Model]] as the parent Subject.
1168
+ */
1169
+ parentSubjectId: Id64String;
1170
+ }
1171
+ /** Captures project-level properties of the real-world entity represented by its parent [[Subject]].
1172
+ * @beta
1173
+ */
1174
+ export declare class ProjectInformationRecord extends InformationRecordElement {
1175
+ static get className(): string;
1176
+ /** The properties of the project. */
1177
+ projectInformation: ProjectInformation;
1178
+ private constructor();
1179
+ protected static onInsert(arg: OnElementPropsArg): void;
1180
+ /** Create a new ProjectInformationRecord element ready to be inserted into the iModel.
1181
+ * @throws Error if the iModel contains a version of the BisCore schema older than 01.00.25.
1182
+ */
1183
+ static create(args: ProjectInformationRecordCreateArgs): ProjectInformationRecord;
1184
+ toJSON(): ProjectInformationRecordProps;
1185
+ }
1158
1186
  //# sourceMappingURL=Element.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Element.d.ts","sourceRoot":"","sources":["../../src/Element.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAqB,UAAU,EAAQ,UAAU,EAA+B,MAAM,qBAAqB,CAAC;AACnH,OAAO,EACL,gBAAgB,EAAe,IAAI,EAAE,cAAc,EAAY,mBAAmB,EAAE,sBAAsB,EAAE,YAAY,EAAE,mBAAmB,EAC7I,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,qBAAqB,EAC3E,iBAAiB,EAAE,mBAAmB,EAAU,gCAAgC,EAAE,cAAc,EAAE,UAAU,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,WAAW,EAAoB,WAAW,EAAoB,cAAc,EAAE,cAAc,EACjS,mBAAmB,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,WAAW,EACvG,wBAAwB,EAAE,UAAU,EAAE,kBAAkB,EAAE,YAAY,EAAE,cAAc,EAAE,0BAA0B,EAAE,YAAY,EACjI,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAA+B,SAAS,EAAsB,MAAM,sBAAsB,CAAC;AAC9G,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAIxE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awPitchRollAngles } from "@itwin/core-geometry";
11
11
  import { Entity } from "./Entity";
12
12
  import { DefinitionModel, DrawingModel, PhysicalModel, SectionDrawingModel } from "./Model";
13
- import { SubjectOwnsSubjects } from "./NavigationRelationship";
13
+ import { SubjectOwnsProjectInformationRecord, SubjectOwnsSubjects } from "./NavigationRelationship";
14
14
  import { _cache, _elementWasCreated, _nativeDb, _verifyChannel } from "./internal/Symbols";
15
- import { EntityClass } from "@itwin/ecschema-metadata";
15
+ import { ECVersion, EntityClass } from "@itwin/ecschema-metadata";
16
16
  /** The smallest individually identifiable building block for modeling the real world in an iModel.
17
17
  * Each element represents an [[Entity]] in the real world. Sets of Elements (contained in [[Model]]s) are used to model
18
18
  * other Elements that represent larger scale real world entities. Using this recursive modeling strategy,
@@ -1888,4 +1888,55 @@ export class RenderTimeline extends InformationRecordElement {
1888
1888
  return scriptProps;
1889
1889
  }
1890
1890
  }
1891
+ /** Captures project-level properties of the real-world entity represented by its parent [[Subject]].
1892
+ * @beta
1893
+ */
1894
+ export class ProjectInformationRecord extends InformationRecordElement {
1895
+ static get className() { return "ProjectInformationRecord"; }
1896
+ /** The properties of the project. */
1897
+ projectInformation;
1898
+ constructor(props, iModel) {
1899
+ super(props, iModel);
1900
+ this.projectInformation = {
1901
+ projectNumber: props.projectNumber,
1902
+ projectName: props.projectName,
1903
+ location: props.location,
1904
+ };
1905
+ }
1906
+ static onInsert(arg) {
1907
+ super.onInsert(arg);
1908
+ const parentId = arg.props.parent?.id;
1909
+ const subject = undefined !== parentId ? arg.iModel.elements.tryGetElement(parentId) : undefined;
1910
+ if (!(subject instanceof Subject)) {
1911
+ throw new Error("ProjectInformationRecord must be a child of a Subject");
1912
+ }
1913
+ }
1914
+ /** Create a new ProjectInformationRecord element ready to be inserted into the iModel.
1915
+ * @throws Error if the iModel contains a version of the BisCore schema older than 01.00.25.
1916
+ */
1917
+ static create(args) {
1918
+ args.iModel.requireMinimumSchemaVersion("BisCore", new ECVersion(1, 0, 25), "ProjectInformationRecord");
1919
+ const parent = args.iModel.elements.getElement(args.parentSubjectId);
1920
+ const props = {
1921
+ classFullName: this.classFullName,
1922
+ model: parent.model,
1923
+ code: args.code ?? Code.createEmpty(),
1924
+ parent: new SubjectOwnsProjectInformationRecord(args.parentSubjectId),
1925
+ projectName: args.projectName,
1926
+ projectNumber: args.projectNumber,
1927
+ location: args.location,
1928
+ };
1929
+ return new this(props, args.iModel);
1930
+ }
1931
+ toJSON() {
1932
+ const props = super.toJSON();
1933
+ for (const key of ["projectNumber", "projectName", "location"]) {
1934
+ const value = this.projectInformation[key];
1935
+ if (undefined !== value) {
1936
+ props[key] = value;
1937
+ }
1938
+ }
1939
+ return props;
1940
+ }
1941
+ }
1891
1942
  //# sourceMappingURL=Element.js.map