@itwin/core-common 5.3.0-dev.2 → 5.3.0-dev.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -1
- package/lib/cjs/ElementProps.d.ts +24 -6
- package/lib/cjs/ElementProps.d.ts.map +1 -1
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/annotation/TextBlock.d.ts +4 -29
- package/lib/cjs/annotation/TextBlock.d.ts.map +1 -1
- package/lib/cjs/annotation/TextBlock.js +8 -35
- package/lib/cjs/annotation/TextBlock.js.map +1 -1
- package/lib/cjs/annotation/TextField.d.ts +4 -2
- package/lib/cjs/annotation/TextField.d.ts.map +1 -1
- package/lib/cjs/annotation/TextField.js.map +1 -1
- package/lib/cjs/annotation/TextStyle.d.ts +64 -36
- package/lib/cjs/annotation/TextStyle.d.ts.map +1 -1
- package/lib/cjs/annotation/TextStyle.js +63 -44
- package/lib/cjs/annotation/TextStyle.js.map +1 -1
- package/lib/esm/ElementProps.d.ts +24 -6
- package/lib/esm/ElementProps.d.ts.map +1 -1
- package/lib/esm/ElementProps.js.map +1 -1
- package/lib/esm/annotation/TextBlock.d.ts +4 -29
- package/lib/esm/annotation/TextBlock.d.ts.map +1 -1
- package/lib/esm/annotation/TextBlock.js +8 -35
- package/lib/esm/annotation/TextBlock.js.map +1 -1
- package/lib/esm/annotation/TextField.d.ts +4 -2
- package/lib/esm/annotation/TextField.d.ts.map +1 -1
- package/lib/esm/annotation/TextField.js.map +1 -1
- package/lib/esm/annotation/TextStyle.d.ts +64 -36
- package/lib/esm/annotation/TextStyle.d.ts.map +1 -1
- package/lib/esm/annotation/TextStyle.js +63 -44
- package/lib/esm/annotation/TextStyle.js.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
# Change Log - @itwin/core-common
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 16 Oct 2025 23:02:22 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 5.2.3
|
|
6
|
+
Thu, 16 Oct 2025 23:00:31 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
9
|
+
|
|
10
|
+
## 5.2.2
|
|
11
|
+
Fri, 10 Oct 2025 14:49:15 GMT
|
|
12
|
+
|
|
13
|
+
_Version update only_
|
|
14
|
+
|
|
15
|
+
## 5.2.1
|
|
16
|
+
Thu, 09 Oct 2025 17:10:26 GMT
|
|
17
|
+
|
|
18
|
+
_Version update only_
|
|
19
|
+
|
|
20
|
+
## 5.2.0
|
|
21
|
+
Wed, 01 Oct 2025 20:22:54 GMT
|
|
22
|
+
|
|
23
|
+
### Updates
|
|
24
|
+
|
|
25
|
+
- Added new `VersionedJSON<T>` interface for wrapping JSON data that should be versioned.
|
|
26
|
+
- Removing `styleId` property from `TextBlock`.
|
|
27
|
+
- Multiple changes were made to the `TextStyleSettings` class. `lineHeight` is replaced with `textHeight`. Frame style names were changed to be more descriptive. `fontName` is now `font` and has both the font's name and type. `justification` and `margins` were moved from the `TextBlock` into `TextStyleSettings`.
|
|
28
|
+
- Adding support for lists to TextBlock
|
|
29
|
+
- fix bug where iModel crs extent latitude would always be 0 on desktop
|
|
30
|
+
- Briefcase Manager now provides deviceName to acquired briefcases
|
|
31
|
+
- Add support for formatting text fields.
|
|
32
|
+
- Fix spurious assertions in FeatureAppearance.equals.
|
|
4
33
|
|
|
5
34
|
## 5.1.9
|
|
6
35
|
Wed, 24 Sep 2025 17:38:08 GMT
|
|
@@ -120,8 +120,9 @@ export interface GeometricElement3dProps extends GeometricElementProps {
|
|
|
120
120
|
* @extensions
|
|
121
121
|
*/
|
|
122
122
|
export interface TextAnnotation3dProps extends GeometricElement3dProps {
|
|
123
|
-
/** The stringified JSON representation of the text annotation.
|
|
124
|
-
* @see [[
|
|
123
|
+
/** The stringified versioned JSON representation of the text annotation.
|
|
124
|
+
* @see [[VersionedJSON]] for the JSON representation.
|
|
125
|
+
* @see [[TextAnnotationProps]] for the data model.
|
|
125
126
|
* @note Don't set this property directly - use [TextAnnotation3d.setAnnotation]($backend) instead.
|
|
126
127
|
*/
|
|
127
128
|
textAnnotationData?: string;
|
|
@@ -204,8 +205,9 @@ export interface GeometricElement2dProps extends GeometricElementProps {
|
|
|
204
205
|
* @extensions
|
|
205
206
|
*/
|
|
206
207
|
export interface TextAnnotation2dProps extends GeometricElement2dProps {
|
|
207
|
-
/** The stringified JSON representation of the text annotation.
|
|
208
|
-
* @see [[
|
|
208
|
+
/** The stringified versioned JSON representation of the text annotation.
|
|
209
|
+
* @see [[VersionedJSON]] for the JSON representation.
|
|
210
|
+
* @see [[TextAnnotationProps]] for the data model.
|
|
209
211
|
* @note Don't set this property directly - use [TextAnnotation2d.setAnnotation]($backend) instead.
|
|
210
212
|
*/
|
|
211
213
|
textAnnotationData?: string;
|
|
@@ -555,9 +557,25 @@ export interface SheetReferenceProps extends SheetIndexEntryProps {
|
|
|
555
557
|
export interface AnnotationTextStyleProps extends DefinitionElementProps {
|
|
556
558
|
/** An optional human-readable description of the text style.*/
|
|
557
559
|
description?: string;
|
|
558
|
-
/** The stringified JSON representation of the text style.
|
|
559
|
-
* @see [[
|
|
560
|
+
/** The stringified versioned JSON representation of the text style.
|
|
561
|
+
* @see [[VersionedJSON]] for the JSON representation.
|
|
562
|
+
* @see [[TextStyleSettingsProps]] for the data model.
|
|
560
563
|
*/
|
|
561
564
|
settings?: string;
|
|
562
565
|
}
|
|
566
|
+
/** A string in the format `read.write.minor` where the semantics match those of [ECVersion]($ecschema-metadata).
|
|
567
|
+
* @beta
|
|
568
|
+
*/
|
|
569
|
+
export type ECVersionString = `${string}.${string}.${string}`;
|
|
570
|
+
/** Wrapper for versioned JSON data.
|
|
571
|
+
* @beta
|
|
572
|
+
*/
|
|
573
|
+
export interface VersionedJSON<T> {
|
|
574
|
+
/** The semver version of the JSON data.
|
|
575
|
+
* Uses the same semantics as [ECVersion]($ecschema-metadata).
|
|
576
|
+
*/
|
|
577
|
+
version: ECVersionString;
|
|
578
|
+
/** The JSON data. */
|
|
579
|
+
data: T;
|
|
580
|
+
}
|
|
563
581
|
//# sourceMappingURL=ElementProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElementProps.d.ts","sourceRoot":"","sources":["../../src/ElementProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAQ,UAAU,EAAgB,MAAM,qBAAqB,CAAC;AACjF,OAAO,EACL,UAAU,EAAE,eAAe,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EACzH,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,4BAA4B,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAC;AAC/G,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,8DAA8D;IAC9D,EAAE,EAAE,UAAU,CAAC;IACf,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC/C,wGAAwG;IACxG,KAAK,EAAE,UAAU,CAAC;IAClB,yEAAyE;IACzE,IAAI,EAAE,SAAS,CAAC;IAChB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B;;;OAGG;IACH,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,gHAAgH;IAChH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uHAAuH;IACvH,cAAc,CAAC,EAAE,GAA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C,kBAAkB,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AAmCD;;;GAGG;AACH,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,mDAAW,CAAA;IACX,iDAAU,CAAA;IACV,uDAAa,CAAA;IACb,6CAAQ,CAAA;AACV,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAqSD;;GAEG;AACH,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACtC,gEAAgE;IAChE,mGAAkB,CAAA;IAClB,0EAA0E;IAC1E,6FAAe,CAAA;AACjB,CAAC,EALW,4BAA4B,4CAA5B,4BAA4B,QAKvC;AAyCD;;;GAGG;AACH,IAAY,IASX;AATD,WAAY,IAAI;IACd,gDAAgD;IAChD,mCAAU,CAAA;IACV,4GAA4G;IAC5G,mCAAU,CAAA;IACV,6HAA6H;IAC7H,6CAAe,CAAA;IACf,mIAAmI;IACnI,+BAAQ,CAAA;AACV,CAAC,EATW,IAAI,oBAAJ,IAAI,QASf","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 Entities\n */\n\nimport { GuidString, Id64, Id64String, IModelStatus } from \"@itwin/core-bentley\";\nimport {\n AngleProps, ClipVectorProps, LowAndHighXYProps, LowAndHighXYZProps, TransformProps, XYProps, XYZProps, YawPitchRollProps,\n} from \"@itwin/core-geometry\";\nimport { CodeProps } from \"./Code\";\nimport { EntityProps } from \"./EntityProps\";\nimport { ElementGeometryBuilderParams, ElementGeometryBuilderParamsForPart } from \"./geometry/ElementGeometry\";\nimport { GeometryStreamProps } from \"./geometry/GeometryStream\";\nimport { IModelError } from \"./IModelError\";\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\n\n/** Properties of a NavigationProperty.\n * @public @preview\n * @extensions\n */\nexport interface RelatedElementProps {\n /** The Id of the element to which this element is related. */\n id: Id64String;\n /** The full className of the relationship class. */\n relClassName?: string;\n}\n\n/** Properties of an [Element]($docs/bis/guide/fundamentals/element-fundamentals)\n * @public @preview\n * @extensions\n */\nexport interface ElementProps extends EntityProps {\n /** The Id of the [Model]($docs/bis/guide/fundamentals/model-fundamentals.md) containing this element */\n model: Id64String;\n /** The [Code]($docs/bis/guide/fundamentals/codes.md) for this element */\n code: CodeProps;\n /** The Parent of this element, if defined. */\n parent?: RelatedElementProps;\n /** A [FederationGuid]($docs/bis/guide/fundamentals/element-fundamentals.md#federationguid) assigned to this element.\n * @note On insert, if this is a valid Guid, the value is preserved. If it is `undefined`, a new Guid is created. If it is an invalid Guid (e.g. Guid.empty), the\n * resultant element will have a `null` federationGuid. For update, `undefined` means \"don't change.\"\n */\n federationGuid?: GuidString;\n /** A [user-assigned label]($docs/bis/guide/fundamentals/element-fundamentals.md#userlabel) for this element. */\n userLabel?: string;\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this element. */\n jsonProperties?: any;\n}\n\n/** The Id and relationship class of an Element that is somehow related to another Element\n * @public @preview\n */\nexport class RelatedElement implements RelatedElementProps {\n /** The Id of the element to which this element is related. */\n public readonly id: Id64String;\n\n /** The full className of the relationship class. */\n public readonly relClassName?: string;\n\n constructor(props: RelatedElementProps) {\n this.id = Id64.fromJSON(props.id);\n this.relClassName = props.relClassName;\n }\n\n public static fromJSON(json?: RelatedElementProps): RelatedElement | undefined {\n return json ? new RelatedElement(json) : undefined;\n }\n\n /** Used to *null out* an existing navigation relationship. */\n public static readonly none = new RelatedElement({ id: Id64.invalid });\n\n /** Accept the value of a navigation property that might be in the shortened format of just an id or might be in the full RelatedElement format. */\n public static idFromJson(json: any): Id64String {\n if ((typeof json === \"object\") && (\"id\" in json)) {\n const r = RelatedElement.fromJSON(json);\n if (r === undefined)\n throw new IModelError(IModelStatus.BadArg, \"Problem parsing Id64 from json\");\n return r.id;\n }\n return Id64.fromJSON(json);\n }\n\n public toJSON(): RelatedElementProps {\n return {\n id: this.id,\n relClassName: this.relClassName,\n };\n }\n}\n\n/** A [RelatedElement]($common) relationship that describes the [TypeDefinitionElement]($backend) of an element.\n * @public @preview\n */\nexport class TypeDefinition extends RelatedElement {\n}\n\n/** Properties of a [GeometricElement]($backend)\n * @public @preview\n * @extensions\n */\nexport interface GeometricElementProps extends ElementProps {\n /** The id of the category for this geometric element. */\n category: Id64String;\n /** The geometry stream properties */\n geom?: GeometryStreamProps;\n /** Describes how to build the element's GeometryStream, as an alternative to [[geom]]. This is used for insert and update operations only.\n * It is not a persistent property - it will always be undefined in the properties returned by functions that read a persistent element.\n */\n elementGeometryBuilderParams?: ElementGeometryBuilderParams;\n /** The placement properties */\n placement?: PlacementProps;\n}\n\n/** Properties of a [[Placement3d]]\n * @public @preview\n * @extensions\n */\nexport interface Placement3dProps {\n origin: XYZProps;\n angles: YawPitchRollProps;\n bbox?: LowAndHighXYZProps;\n}\n\n/** Properties of a [[Placement2d]]\n * @public @preview\n * @extensions\n */\nexport interface Placement2dProps {\n origin: XYProps;\n angle: AngleProps;\n bbox?: LowAndHighXYProps;\n}\n\n/**\n * @public @preview\n * @extensions\n */\nexport type PlacementProps = Placement2dProps | Placement3dProps;\n\n/** determine if this is Placement2dProps\n * @public @preview\n */\nexport function isPlacement2dProps(props: PlacementProps): props is Placement2dProps {\n return (props as Placement2dProps).angle !== undefined;\n}\n\n/** determine if this is Placement3dProps\n * @public @preview\n */\nexport function isPlacement3dProps(props: PlacementProps): props is Placement3dProps {\n return !isPlacement2dProps(props);\n}\n\n/** Properties that define a [GeometricElement3d]($backend)\n * @public @preview\n * @extensions\n */\nexport interface GeometricElement3dProps extends GeometricElementProps {\n placement?: Placement3dProps;\n typeDefinition?: RelatedElementProps;\n}\n\n/** JSON representation of a [TextAnnotation3d]($backend).\n * @public @preview\n * @extensions\n */\nexport interface TextAnnotation3dProps extends GeometricElement3dProps {\n /** The stringified JSON representation of the text annotation.\n * @see [[TextAnnotationProps]] for the JSON representation.\n * @note Don't set this property directly - use [TextAnnotation3d.setAnnotation]($backend) instead.\n */\n textAnnotationData?: string;\n /** The default [AnnotationTextStyle]($backend) element used by the text annotation.\n * @beta\n */\n defaultTextStyle?: RelatedElementProps;\n}\n\n/** Properties that define a [PhysicalElement]($backend)\n * @public @preview\n * @extensions\n */\nexport interface PhysicalElementProps extends GeometricElement3dProps {\n physicalMaterial?: RelatedElementProps;\n}\n\n/** An enumeration of the different types of [SectionDrawing]($backend)s.\n * @public @preview\n * @extensions\n */\nexport enum SectionType {\n Section = 3,\n Detail = 4,\n Elevation = 5,\n Plan = 6,\n}\n\n/** Properties that define a [Drawing]($backend).\n * @public @preview\n * @extensions\n */\nexport interface DrawingProps extends ElementProps {\n /** A factor used by tools to adjust the size of text in [GeometricElement2d]($backend)s in the associated [DrawingModel]($backend) and to compute the\n * size of the [ViewAttachment]($backend) created when attaching the [Drawing]($backend) to a [Sheet]($backend).\n * Default: 1.\n * @note The scale factor **must** be greater than zero.\n * @public @preview\n */\n scaleFactor?: number;\n}\n\n/** Properties that define a [SectionDrawing]($backend).\n * @public @preview\n * @extensions\n */\nexport interface SectionDrawingProps extends DrawingProps {\n /** The type of section used to generate the drawing. Default: Section. */\n sectionType?: SectionType;\n /** The spatial view from which the section was generated. */\n spatialView?: RelatedElementProps;\n jsonProperties?: {\n /** A transform from the section drawing model's coordinates to spatial coordinates. */\n drawingToSpatialTransform?: TransformProps;\n /** If the section drawing is placed onto a [Sheet]($backend) via a [ViewAttachment]($backend), a transform from the sheet's coordinates to spatial coordinates. */\n sheetToSpatialTransform?: TransformProps;\n /** If the section drawing is placed onto a [Sheet]($backend) via a [ViewAttachment]($backend), JSON representation of a [ClipVector]($geometry) to apply to\n * the sheet graphics when drawn in the context of the spatial view.\n * The ClipVector is in spatial coordinates.\n */\n drawingBoundaryClip?: ClipVectorProps;\n /** If true, when displaying the section drawing as a [DrawingViewState]($frontend), the [[spatialView]] will also be displayed. */\n displaySpatialView?: true;\n };\n}\n\n/** Properties that define a [SectionDrawingLocation]($backend)\n * @public @preview\n * @extensions\n */\nexport interface SectionDrawingLocationProps extends GeometricElement3dProps {\n /** The [ViewDefinition]($backend) to which this location refers. */\n sectionView?: RelatedElementProps;\n}\n\n/** Properties that define a [GeometricElement2d]($backend)\n * @public @preview\n * @extensions\n */\nexport interface GeometricElement2dProps extends GeometricElementProps {\n placement?: Placement2dProps;\n typeDefinition?: RelatedElementProps;\n}\n\n/** Properties that define a [TextAnnotation2d]($backend).\n * @public @preview\n * @extensions\n */\nexport interface TextAnnotation2dProps extends GeometricElement2dProps {\n /** The stringified JSON representation of the text annotation.\n * @see [[TextAnnotationProps]] for the JSON representation.\n * @note Don't set this property directly - use [TextAnnotation2d.setAnnotation]($backend) instead.\n */\n textAnnotationData?: string;\n /** The default [AnnotationTextStyle]($backend) element used by the text annotation.\n * @beta\n */\n defaultTextStyle?: RelatedElementProps;\n}\n\n/** Properties of a [GeometryPart]($backend)\n * @public @preview\n * @extensions\n */\nexport interface GeometryPartProps extends ElementProps {\n geom?: GeometryStreamProps;\n /** Describes how to build the part's GeometryStream, as an alternative to [[geom]]. This is used for insert and update operations only.\n * It is not a persistent property - it will always be undefined in the properties returned by functions that read a persistent part.\n */\n elementGeometryBuilderParams?: ElementGeometryBuilderParamsForPart;\n bbox?: LowAndHighXYZProps;\n}\n\n/** Properties for a [ViewAttachment]($backend)\n * @public @preview\n * @extensions\n */\nexport interface ViewAttachmentProps extends GeometricElement2dProps {\n view: RelatedElementProps;\n jsonProperties?: {\n /** Integer priority in [-500,500]. Where two attachments overlap, the one with the higher priority draws in front of the other. Default: 0. */\n displayPriority?: number;\n /** JSON representation of a [ClipVector]($core-geometry] in sheet coordinate space, used to clip the attachment's graphics on the sheet. */\n clip?: ClipVectorProps;\n /** Options for customizing how the view attachment is displayed on the sheet. */\n displayOptions?: {\n /** If true, the view attachment is always drawn as a raster image. By default, only 3d perspective views are drawn this way (they always *must* be). Default: false. */\n drawAsRaster?: boolean;\n /** If true, and the view attachment is drawn as a raster image, the background color of the view will be preserved. By default the background color of the\n * sheet is used and any background pixels become transparent, allowing the contents of the sheet to show through. Default: false.\n */\n preserveBackground?: boolean;\n };\n };\n}\n\n/** Properties of a [Subject]($backend)\n * @public @preview\n * @extensions\n */\nexport interface SubjectProps extends ElementProps {\n description?: string;\n}\n\n/** Properties of a [SheetBorderTemplate]($backend)\n * @beta\n */\nexport interface SheetBorderTemplateProps extends ElementProps {\n height?: number;\n width?: number;\n}\n\n/** Properties of a [SheetTemplate]($backend)\n * @beta\n */\nexport interface SheetTemplateProps extends ElementProps {\n height?: number;\n width?: number;\n border?: Id64String;\n}\n\n/** Properties of a [Sheet]($backend).\n * @public @preview\n * @extensions\n */\nexport interface SheetProps extends ElementProps {\n width?: number;\n height?: number;\n scale?: number;\n sheetTemplate?: Id64String;\n attachments?: Id64String[];\n}\n\n/** Properties of a [DefinitionElement]($backend)\n * @public @preview\n * @extensions\n */\nexport interface DefinitionElementProps extends ElementProps {\n isPrivate?: boolean;\n}\n\n/** Properties of a [TypeDefinitionElement]($backend)\n * @public @preview\n * @extensions\n */\nexport interface TypeDefinitionElementProps extends DefinitionElementProps {\n recipe?: RelatedElementProps;\n}\n\n/** Properties of a [PhysicalType]($backend)\n * @public @preview\n * @extensions\n */\nexport interface PhysicalTypeProps extends TypeDefinitionElementProps {\n /** The [PhysicalMaterial]($backend) that makes up this physical type. */\n physicalMaterial?: RelatedElementProps;\n}\n\n/** Properties of a [InformationPartitionElement]($backend)\n * @public @preview\n * @extensions\n */\nexport interface InformationPartitionElementProps extends ElementProps {\n description?: string;\n}\n\n/** Options controlling which properties are included or excluded when querying [[DisplayStyleProps]].\n * @see [[ViewStateLoadProps]] and [[ElementLoadOptions]].\n * @public @preview\n * @extensions\n */\nexport interface DisplayStyleLoadProps {\n /** If true, the lists of element Ids in the display style's schedule script will be empty.\n * The element Ids are not required on the frontend for display and can be quite large.\n */\n omitScheduleScriptElementIds?: boolean;\n /** If true, [[DisplayStyleSettingsProps.excludedElements]] will be compressed into a single compact string; otherwise they will be expanded into an array of strings.\n * The number of Ids may be quite large, so the compressed format is preferred, especially when communicating between the backend and frontend.\n */\n compressExcludedElementIds?: boolean;\n}\n\n/** Options controlling which properties are included or excluded when querying [[RenderTimelineProps]].\n * @see [[ElementLoadOptions.renderTimeline]].\n * @public @preview\n * @extensions\n */\nexport interface RenderTimelineLoadProps {\n /** If true, the lists of element Ids in the schedule script will be empty.\n * The element Ids can be extremely numerous and are not required on the frontend for display, so they are omitted by default by [DisplayStyleState.load]($frontend).\n */\n omitScriptElementIds?: boolean;\n}\n\n/** Options used to specify properties to include or exclude when querying [[ElementProps]] with functions like\n * [IModelDb.Elements.getElementProps]($backend) and [IModelConnection.Elements.loadProps]($frontend).\n * @public @preview\n * @extensions\n */\nexport interface ElementLoadOptions {\n /** if true, only load the members of [[ElementProps]], and no members from subclasses */\n onlyBaseProperties?: boolean;\n /** If true, include the [[GeometryStreamProps]] for [[GeometricElementProps]] and [[GeometryPartProps]].\n * Geometry streams can consist of many megabytes worth of JSON, so they are omitted by default.\n */\n wantGeometry?: boolean;\n /** When including a geometry stream containing brep entries, whether to return the raw brep data or proxy geometry, false when undefined */\n /** If true, include [[BRepEntity.DataProps.data]] in the [[GeometryStreamProps]] for [[GeometricElementProps]] and [[GeometryPartProps]].\n * The data is a potentially large base-64-encoded opaque binary blob that cannot be directly inspected or manipulated on the frontend, so it is omitted by default.\n */\n wantBRepData?: boolean;\n /** Options controlling which properties of [[DisplayStyleProps]] to include or exclude. */\n displayStyle?: DisplayStyleLoadProps;\n /** Options controlling which properties of [[RenderTimelineProps]] to include or exclude. */\n renderTimeline?: RenderTimelineLoadProps;\n}\n\n/** Parameters to specify what element to load for functions like [IModelDb.Elements.getElementProps]($backend).\n * @public @preview\n * @extensions\n */\nexport interface ElementLoadProps extends ElementLoadOptions {\n id?: Id64String;\n /** The properties of the Code of the element to load.\n * @note the Value member is required even though it is not declared so here. If no value is supplied, no element will ever be loaded.\n * TODO: change to Required<CodeProps> in Version 4.0\n */\n code?: CodeProps;\n federationGuid?: GuidString;\n}\n\n/** Properties of an [ElementAspect]($backend)\n * @public @preview\n * @extensions\n */\nexport interface ElementAspectProps extends EntityProps {\n element: RelatedElementProps;\n}\n\n/** Properties of an [ExternalSourceAspect]($backend) that stores synchronization information for an element originating from an external source.\n * @public @preview\n * @extensions\n */\nexport interface ExternalSourceAspectProps extends ElementAspectProps {\n /** An element that scopes the combination of `kind` and `identifier` to uniquely identify the object from the external source.\n * @note Warning: in a future major release the `scope` property will be optional, since the scope is intended to be potentially invalid.\n * all references should treat it as potentially undefined, but we cannot change the type yet since that is a breaking change.\n */\n scope: RelatedElementProps;\n /** The identifier of the object in the source repository. */\n identifier: string;\n /** The kind of object within the source repository. */\n kind: string;\n /** An optional value that is typically a version number or a pseudo version number like last modified time.\n * It will be used by the synchronization process to detect that a source object is unchanged so that computing a cryptographic hash can be avoided.\n * If present, this value must be guaranteed to change when any of the source object's content changes.\n */\n version?: string;\n /** The optional cryptographic hash (any algorithm) of the source object's content. If defined, it must be guaranteed to change when the source object's content changes. */\n checksum?: string;\n /** A place where additional JSON properties can be stored. For example, provenance information or properties relating to the synchronization process.\n * @note Warning: if defined, jsonProperties must be a *string*, specifically a valid JSON string.\n * @note Warning: in a future major release, the type of `jsonProperties` will be changed to object, and itwin.js will automatically stringify it when writing to the iModel.\n * This will be a breaking change, since application code will have to change from supplying a string to supplying an object.\n */\n jsonProperties?: any;\n /** The source of the imported/synchronized object. Should point to an instance of [ExternalSource]($backend). */\n source?: RelatedElementProps;\n}\n\n/** Properties of an [ExternalSource]($backend)\n * @beta\n */\nexport interface ExternalSourceProps extends ElementProps {\n repository?: RelatedElementProps;\n connectorName?: string;\n connectorVersion?: string;\n}\n\n/** The role that an attached [ExternalSource]($backend) plays.\n * @beta\n */\nexport enum ExternalSourceAttachmentRole {\n /** The attached [ExternalSource]($backend) provides context. */\n SpecifyContext = 0,\n /** The attached [ExternalSource]($backend) models a part of the whole. */\n SpecifyPart = 1,\n}\n\n/** Properties of an [ExternalSourceAttachment]($backend)\n * @beta\n */\nexport interface ExternalSourceAttachmentProps extends ElementProps {\n attaches?: RelatedElementProps;\n role?: ExternalSourceAttachmentRole;\n translation?: XYZProps;\n yaw?: number;\n pitch?: number;\n roll?: number;\n scale?: XYZProps;\n}\n\n/** Properties of an [ChannelRootAspect]($backend) that identifies an Element as the root of a *channel* which is a subset of the overall iModel hierarchy that is independently maintained.\n * @public @preview\n * @extensions\n */\nexport interface ChannelRootAspectProps extends ElementAspectProps {\n /** The owner of the channel */\n owner: string;\n}\n\n/** Properties of a [LineStyle]($backend)\n * @public @preview\n * @extensions\n */\nexport interface LineStyleProps extends DefinitionElementProps {\n description?: string;\n /** The JSON string line style definition element data [LineStyleDefinition.StyleProps]($backend) */\n data: string;\n}\n\n/** Properties of a [LightLocation]($backend)\n * @internal\n */\nexport interface LightLocationProps extends GeometricElement3dProps {\n enabled?: boolean;\n}\n\n/** The *rank* for a Category\n * @public @preview\n * @extensions\n */\nexport enum Rank {\n /** This category is predefined by the system */\n System = 0,\n /** This category is defined by a schema. Elements in this category are not recognized by system classes. */\n Domain = 1,\n /** This category is defined by an application. Elements in this category are not recognized by system and schema classes. */\n Application = 2,\n /** This category is defined by a user. Elements in this category are not recognized by system, schema, and application classes. */\n User = 3,\n}\n\n/** Parameters of a [Category]($backend)\n * @public @preview\n * @extensions\n */\nexport interface CategoryProps extends DefinitionElementProps {\n rank?: Rank;\n description?: string;\n}\n\n/** Parameters of a [SubCategory]($backend)\n * @public @preview\n * @extensions\n */\nexport interface SubCategoryProps extends DefinitionElementProps {\n appearance?: SubCategoryAppearance.Props;\n description?: string;\n}\n\n/** Parameters of a [UrlLink]($backend)\n * @public @preview\n * @extensions\n */\nexport interface UrlLinkProps extends ElementProps {\n description?: string;\n url?: string;\n}\n\n/** Parameters of a [RepositoryLink]($backend)\n * @public @preview\n * @extensions\n */\nexport interface RepositoryLinkProps extends UrlLinkProps {\n repositoryGuid?: GuidString;\n format?: string;\n}\n\n/** The properties of a [SynchronizationConfigLink]($backend)\n * @beta\n */\nexport interface SynchronizationConfigLinkProps extends UrlLinkProps {\n lastSuccessfulRun?: string;\n}\n\n/** Wire format describing a [RenderTimeline]($backend).\n * @public @preview\n * @extensions\n */\nexport interface RenderTimelineProps extends ElementProps {\n /** An optional human-readable description of the timeline. */\n description?: string;\n /** The stringified JSON representation of the instructions for visualizing change over time.\n * @see [[RenderSchedule.ScriptProps]] for the JSON interface.\n */\n script: string;\n}\n\n/** Properties of a [SheetIndexEntry]($backend).\n * @beta\n*/\nexport interface SheetIndexEntryProps extends ElementProps {\n /** Can be used to prioritize or order members within a SheetIndex or SheetIndexFolder. */\n entryPriority: number;\n}\n\n/** Properties of a [SheetIndexFolder]($backend)\n * @beta\n */\nexport type SheetIndexFolderProps = SheetIndexEntryProps;\n\n/** Properties of a [SheetIndexReference]($backend)\n * @beta\n */\nexport interface SheetIndexReferenceProps extends SheetIndexEntryProps {\n /** The bis:SheetIndex that this bis:SheetIndexReference is pointing to. */\n sheetIndex?: RelatedElementProps;\n}\n\n/** Properties of a [SheetReference]($backend)\n * @beta\n */\nexport interface SheetReferenceProps extends SheetIndexEntryProps {\n /** The bis:Sheet that this bis:SheetReference is pointing to. */\n sheet?: RelatedElementProps;\n}\n\n/** Properties that define an [AnnotationTextStyle]($backend).\n * @beta\n */\nexport interface AnnotationTextStyleProps extends DefinitionElementProps {\n /** An optional human-readable description of the text style.*/\n description?: string;\n /** The stringified JSON representation of the text style.\n * @see [[TextStyleSettingsProps]]\n */\n settings?: string;\n}"]}
|
|
1
|
+
{"version":3,"file":"ElementProps.js","sourceRoot":"","sources":["../../src/ElementProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA2IH,gDAEC;AAKD,gDAEC;AAlJD,sDAAiF;AAQjF,+CAA4C;AAoC5C;;GAEG;AACH,MAAa,cAAc;IACzB,8DAA8D;IAC9C,EAAE,CAAa;IAE/B,oDAAoD;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kB,CAAC,KAAqB;IACtD,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AAoCD;;;GAGG;AACH,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,mDAAW,CAAA;IACX,iDAAU,CAAA;IACV,uDAAa,CAAA;IACb,6CAAQ,CAAA;AACV,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAsSD;;GAEG;AACH,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACtC,gEAAgE;IAChE,mGAAkB,CAAA;IAClB,0EAA0E;IAC1E,6FAAe,CAAA;AACjB,CAAC,EALW,4BAA4B,4CAA5B,4BAA4B,QAKvC;AAyCD;;;GAGG;AACH,IAAY,IASX;AATD,WAAY,IAAI;IACd,gDAAgD;IAChD,mCAAU,CAAA;IACV,4GAA4G;IAC5G,mCAAU,CAAA;IACV,6HAA6H;IAC7H,6CAAe,CAAA;IACf,mIAAmI;IACnI,+BAAQ,CAAA;AACV,CAAC,EATW,IAAI,oBAAJ,IAAI,QASf","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 Entities\n */\n\nimport { GuidString, Id64, Id64String, IModelStatus } from \"@itwin/core-bentley\";\nimport {\n AngleProps, ClipVectorProps, LowAndHighXYProps, LowAndHighXYZProps, TransformProps, XYProps, XYZProps, YawPitchRollProps,\n} from \"@itwin/core-geometry\";\nimport { CodeProps } from \"./Code\";\nimport { EntityProps } from \"./EntityProps\";\nimport { ElementGeometryBuilderParams, ElementGeometryBuilderParamsForPart } from \"./geometry/ElementGeometry\";\nimport { GeometryStreamProps } from \"./geometry/GeometryStream\";\nimport { IModelError } from \"./IModelError\";\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\n\n/** Properties of a NavigationProperty.\n * @public @preview\n * @extensions\n */\nexport interface RelatedElementProps {\n /** The Id of the element to which this element is related. */\n id: Id64String;\n /** The full className of the relationship class. */\n relClassName?: string;\n}\n\n/** Properties of an [Element]($docs/bis/guide/fundamentals/element-fundamentals)\n * @public @preview\n * @extensions\n */\nexport interface ElementProps extends EntityProps {\n /** The Id of the [Model]($docs/bis/guide/fundamentals/model-fundamentals.md) containing this element */\n model: Id64String;\n /** The [Code]($docs/bis/guide/fundamentals/codes.md) for this element */\n code: CodeProps;\n /** The Parent of this element, if defined. */\n parent?: RelatedElementProps;\n /** A [FederationGuid]($docs/bis/guide/fundamentals/element-fundamentals.md#federationguid) assigned to this element.\n * @note On insert, if this is a valid Guid, the value is preserved. If it is `undefined`, a new Guid is created. If it is an invalid Guid (e.g. Guid.empty), the\n * resultant element will have a `null` federationGuid. For update, `undefined` means \"don't change.\"\n */\n federationGuid?: GuidString;\n /** A [user-assigned label]($docs/bis/guide/fundamentals/element-fundamentals.md#userlabel) for this element. */\n userLabel?: string;\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this element. */\n jsonProperties?: any;\n}\n\n/** The Id and relationship class of an Element that is somehow related to another Element\n * @public @preview\n */\nexport class RelatedElement implements RelatedElementProps {\n /** The Id of the element to which this element is related. */\n public readonly id: Id64String;\n\n /** The full className of the relationship class. */\n public readonly relClassName?: string;\n\n constructor(props: RelatedElementProps) {\n this.id = Id64.fromJSON(props.id);\n this.relClassName = props.relClassName;\n }\n\n public static fromJSON(json?: RelatedElementProps): RelatedElement | undefined {\n return json ? new RelatedElement(json) : undefined;\n }\n\n /** Used to *null out* an existing navigation relationship. */\n public static readonly none = new RelatedElement({ id: Id64.invalid });\n\n /** Accept the value of a navigation property that might be in the shortened format of just an id or might be in the full RelatedElement format. */\n public static idFromJson(json: any): Id64String {\n if ((typeof json === \"object\") && (\"id\" in json)) {\n const r = RelatedElement.fromJSON(json);\n if (r === undefined)\n throw new IModelError(IModelStatus.BadArg, \"Problem parsing Id64 from json\");\n return r.id;\n }\n return Id64.fromJSON(json);\n }\n\n public toJSON(): RelatedElementProps {\n return {\n id: this.id,\n relClassName: this.relClassName,\n };\n }\n}\n\n/** A [RelatedElement]($common) relationship that describes the [TypeDefinitionElement]($backend) of an element.\n * @public @preview\n */\nexport class TypeDefinition extends RelatedElement {\n}\n\n/** Properties of a [GeometricElement]($backend)\n * @public @preview\n * @extensions\n */\nexport interface GeometricElementProps extends ElementProps {\n /** The id of the category for this geometric element. */\n category: Id64String;\n /** The geometry stream properties */\n geom?: GeometryStreamProps;\n /** Describes how to build the element's GeometryStream, as an alternative to [[geom]]. This is used for insert and update operations only.\n * It is not a persistent property - it will always be undefined in the properties returned by functions that read a persistent element.\n */\n elementGeometryBuilderParams?: ElementGeometryBuilderParams;\n /** The placement properties */\n placement?: PlacementProps;\n}\n\n/** Properties of a [[Placement3d]]\n * @public @preview\n * @extensions\n */\nexport interface Placement3dProps {\n origin: XYZProps;\n angles: YawPitchRollProps;\n bbox?: LowAndHighXYZProps;\n}\n\n/** Properties of a [[Placement2d]]\n * @public @preview\n * @extensions\n */\nexport interface Placement2dProps {\n origin: XYProps;\n angle: AngleProps;\n bbox?: LowAndHighXYProps;\n}\n\n/**\n * @public @preview\n * @extensions\n */\nexport type PlacementProps = Placement2dProps | Placement3dProps;\n\n/** determine if this is Placement2dProps\n * @public @preview\n */\nexport function isPlacement2dProps(props: PlacementProps): props is Placement2dProps {\n return (props as Placement2dProps).angle !== undefined;\n}\n\n/** determine if this is Placement3dProps\n * @public @preview\n */\nexport function isPlacement3dProps(props: PlacementProps): props is Placement3dProps {\n return !isPlacement2dProps(props);\n}\n\n/** Properties that define a [GeometricElement3d]($backend)\n * @public @preview\n * @extensions\n */\nexport interface GeometricElement3dProps extends GeometricElementProps {\n placement?: Placement3dProps;\n typeDefinition?: RelatedElementProps;\n}\n\n/** JSON representation of a [TextAnnotation3d]($backend).\n * @public @preview\n * @extensions\n */\nexport interface TextAnnotation3dProps extends GeometricElement3dProps {\n /** The stringified versioned JSON representation of the text annotation.\n * @see [[VersionedJSON]] for the JSON representation.\n * @see [[TextAnnotationProps]] for the data model.\n * @note Don't set this property directly - use [TextAnnotation3d.setAnnotation]($backend) instead.\n */\n textAnnotationData?: string;\n /** The default [AnnotationTextStyle]($backend) element used by the text annotation.\n * @beta\n */\n defaultTextStyle?: RelatedElementProps;\n}\n\n/** Properties that define a [PhysicalElement]($backend)\n * @public @preview\n * @extensions\n */\nexport interface PhysicalElementProps extends GeometricElement3dProps {\n physicalMaterial?: RelatedElementProps;\n}\n\n/** An enumeration of the different types of [SectionDrawing]($backend)s.\n * @public @preview\n * @extensions\n */\nexport enum SectionType {\n Section = 3,\n Detail = 4,\n Elevation = 5,\n Plan = 6,\n}\n\n/** Properties that define a [Drawing]($backend).\n * @public @preview\n * @extensions\n */\nexport interface DrawingProps extends ElementProps {\n /** A factor used by tools to adjust the size of text in [GeometricElement2d]($backend)s in the associated [DrawingModel]($backend) and to compute the\n * size of the [ViewAttachment]($backend) created when attaching the [Drawing]($backend) to a [Sheet]($backend).\n * Default: 1.\n * @note The scale factor **must** be greater than zero.\n * @public @preview\n */\n scaleFactor?: number;\n}\n\n/** Properties that define a [SectionDrawing]($backend).\n * @public @preview\n * @extensions\n */\nexport interface SectionDrawingProps extends DrawingProps {\n /** The type of section used to generate the drawing. Default: Section. */\n sectionType?: SectionType;\n /** The spatial view from which the section was generated. */\n spatialView?: RelatedElementProps;\n jsonProperties?: {\n /** A transform from the section drawing model's coordinates to spatial coordinates. */\n drawingToSpatialTransform?: TransformProps;\n /** If the section drawing is placed onto a [Sheet]($backend) via a [ViewAttachment]($backend), a transform from the sheet's coordinates to spatial coordinates. */\n sheetToSpatialTransform?: TransformProps;\n /** If the section drawing is placed onto a [Sheet]($backend) via a [ViewAttachment]($backend), JSON representation of a [ClipVector]($geometry) to apply to\n * the sheet graphics when drawn in the context of the spatial view.\n * The ClipVector is in spatial coordinates.\n */\n drawingBoundaryClip?: ClipVectorProps;\n /** If true, when displaying the section drawing as a [DrawingViewState]($frontend), the [[spatialView]] will also be displayed. */\n displaySpatialView?: true;\n };\n}\n\n/** Properties that define a [SectionDrawingLocation]($backend)\n * @public @preview\n * @extensions\n */\nexport interface SectionDrawingLocationProps extends GeometricElement3dProps {\n /** The [ViewDefinition]($backend) to which this location refers. */\n sectionView?: RelatedElementProps;\n}\n\n/** Properties that define a [GeometricElement2d]($backend)\n * @public @preview\n * @extensions\n */\nexport interface GeometricElement2dProps extends GeometricElementProps {\n placement?: Placement2dProps;\n typeDefinition?: RelatedElementProps;\n}\n\n/** Properties that define a [TextAnnotation2d]($backend).\n * @public @preview\n * @extensions\n */\nexport interface TextAnnotation2dProps extends GeometricElement2dProps {\n /** The stringified versioned JSON representation of the text annotation.\n * @see [[VersionedJSON]] for the JSON representation.\n * @see [[TextAnnotationProps]] for the data model.\n * @note Don't set this property directly - use [TextAnnotation2d.setAnnotation]($backend) instead.\n */\n textAnnotationData?: string;\n /** The default [AnnotationTextStyle]($backend) element used by the text annotation.\n * @beta\n */\n defaultTextStyle?: RelatedElementProps;\n}\n\n/** Properties of a [GeometryPart]($backend)\n * @public @preview\n * @extensions\n */\nexport interface GeometryPartProps extends ElementProps {\n geom?: GeometryStreamProps;\n /** Describes how to build the part's GeometryStream, as an alternative to [[geom]]. This is used for insert and update operations only.\n * It is not a persistent property - it will always be undefined in the properties returned by functions that read a persistent part.\n */\n elementGeometryBuilderParams?: ElementGeometryBuilderParamsForPart;\n bbox?: LowAndHighXYZProps;\n}\n\n/** Properties for a [ViewAttachment]($backend)\n * @public @preview\n * @extensions\n */\nexport interface ViewAttachmentProps extends GeometricElement2dProps {\n view: RelatedElementProps;\n jsonProperties?: {\n /** Integer priority in [-500,500]. Where two attachments overlap, the one with the higher priority draws in front of the other. Default: 0. */\n displayPriority?: number;\n /** JSON representation of a [ClipVector]($core-geometry] in sheet coordinate space, used to clip the attachment's graphics on the sheet. */\n clip?: ClipVectorProps;\n /** Options for customizing how the view attachment is displayed on the sheet. */\n displayOptions?: {\n /** If true, the view attachment is always drawn as a raster image. By default, only 3d perspective views are drawn this way (they always *must* be). Default: false. */\n drawAsRaster?: boolean;\n /** If true, and the view attachment is drawn as a raster image, the background color of the view will be preserved. By default the background color of the\n * sheet is used and any background pixels become transparent, allowing the contents of the sheet to show through. Default: false.\n */\n preserveBackground?: boolean;\n };\n };\n}\n\n/** Properties of a [Subject]($backend)\n * @public @preview\n * @extensions\n */\nexport interface SubjectProps extends ElementProps {\n description?: string;\n}\n\n/** Properties of a [SheetBorderTemplate]($backend)\n * @beta\n */\nexport interface SheetBorderTemplateProps extends ElementProps {\n height?: number;\n width?: number;\n}\n\n/** Properties of a [SheetTemplate]($backend)\n * @beta\n */\nexport interface SheetTemplateProps extends ElementProps {\n height?: number;\n width?: number;\n border?: Id64String;\n}\n\n/** Properties of a [Sheet]($backend).\n * @public @preview\n * @extensions\n */\nexport interface SheetProps extends ElementProps {\n width?: number;\n height?: number;\n scale?: number;\n sheetTemplate?: Id64String;\n attachments?: Id64String[];\n}\n\n/** Properties of a [DefinitionElement]($backend)\n * @public @preview\n * @extensions\n */\nexport interface DefinitionElementProps extends ElementProps {\n isPrivate?: boolean;\n}\n\n/** Properties of a [TypeDefinitionElement]($backend)\n * @public @preview\n * @extensions\n */\nexport interface TypeDefinitionElementProps extends DefinitionElementProps {\n recipe?: RelatedElementProps;\n}\n\n/** Properties of a [PhysicalType]($backend)\n * @public @preview\n * @extensions\n */\nexport interface PhysicalTypeProps extends TypeDefinitionElementProps {\n /** The [PhysicalMaterial]($backend) that makes up this physical type. */\n physicalMaterial?: RelatedElementProps;\n}\n\n/** Properties of a [InformationPartitionElement]($backend)\n * @public @preview\n * @extensions\n */\nexport interface InformationPartitionElementProps extends ElementProps {\n description?: string;\n}\n\n/** Options controlling which properties are included or excluded when querying [[DisplayStyleProps]].\n * @see [[ViewStateLoadProps]] and [[ElementLoadOptions]].\n * @public @preview\n * @extensions\n */\nexport interface DisplayStyleLoadProps {\n /** If true, the lists of element Ids in the display style's schedule script will be empty.\n * The element Ids are not required on the frontend for display and can be quite large.\n */\n omitScheduleScriptElementIds?: boolean;\n /** If true, [[DisplayStyleSettingsProps.excludedElements]] will be compressed into a single compact string; otherwise they will be expanded into an array of strings.\n * The number of Ids may be quite large, so the compressed format is preferred, especially when communicating between the backend and frontend.\n */\n compressExcludedElementIds?: boolean;\n}\n\n/** Options controlling which properties are included or excluded when querying [[RenderTimelineProps]].\n * @see [[ElementLoadOptions.renderTimeline]].\n * @public @preview\n * @extensions\n */\nexport interface RenderTimelineLoadProps {\n /** If true, the lists of element Ids in the schedule script will be empty.\n * The element Ids can be extremely numerous and are not required on the frontend for display, so they are omitted by default by [DisplayStyleState.load]($frontend).\n */\n omitScriptElementIds?: boolean;\n}\n\n/** Options used to specify properties to include or exclude when querying [[ElementProps]] with functions like\n * [IModelDb.Elements.getElementProps]($backend) and [IModelConnection.Elements.loadProps]($frontend).\n * @public @preview\n * @extensions\n */\nexport interface ElementLoadOptions {\n /** if true, only load the members of [[ElementProps]], and no members from subclasses */\n onlyBaseProperties?: boolean;\n /** If true, include the [[GeometryStreamProps]] for [[GeometricElementProps]] and [[GeometryPartProps]].\n * Geometry streams can consist of many megabytes worth of JSON, so they are omitted by default.\n */\n wantGeometry?: boolean;\n /** When including a geometry stream containing brep entries, whether to return the raw brep data or proxy geometry, false when undefined */\n /** If true, include [[BRepEntity.DataProps.data]] in the [[GeometryStreamProps]] for [[GeometricElementProps]] and [[GeometryPartProps]].\n * The data is a potentially large base-64-encoded opaque binary blob that cannot be directly inspected or manipulated on the frontend, so it is omitted by default.\n */\n wantBRepData?: boolean;\n /** Options controlling which properties of [[DisplayStyleProps]] to include or exclude. */\n displayStyle?: DisplayStyleLoadProps;\n /** Options controlling which properties of [[RenderTimelineProps]] to include or exclude. */\n renderTimeline?: RenderTimelineLoadProps;\n}\n\n/** Parameters to specify what element to load for functions like [IModelDb.Elements.getElementProps]($backend).\n * @public @preview\n * @extensions\n */\nexport interface ElementLoadProps extends ElementLoadOptions {\n id?: Id64String;\n /** The properties of the Code of the element to load.\n * @note the Value member is required even though it is not declared so here. If no value is supplied, no element will ever be loaded.\n * TODO: change to Required<CodeProps> in Version 4.0\n */\n code?: CodeProps;\n federationGuid?: GuidString;\n}\n\n/** Properties of an [ElementAspect]($backend)\n * @public @preview\n * @extensions\n */\nexport interface ElementAspectProps extends EntityProps {\n element: RelatedElementProps;\n}\n\n/** Properties of an [ExternalSourceAspect]($backend) that stores synchronization information for an element originating from an external source.\n * @public @preview\n * @extensions\n */\nexport interface ExternalSourceAspectProps extends ElementAspectProps {\n /** An element that scopes the combination of `kind` and `identifier` to uniquely identify the object from the external source.\n * @note Warning: in a future major release the `scope` property will be optional, since the scope is intended to be potentially invalid.\n * all references should treat it as potentially undefined, but we cannot change the type yet since that is a breaking change.\n */\n scope: RelatedElementProps;\n /** The identifier of the object in the source repository. */\n identifier: string;\n /** The kind of object within the source repository. */\n kind: string;\n /** An optional value that is typically a version number or a pseudo version number like last modified time.\n * It will be used by the synchronization process to detect that a source object is unchanged so that computing a cryptographic hash can be avoided.\n * If present, this value must be guaranteed to change when any of the source object's content changes.\n */\n version?: string;\n /** The optional cryptographic hash (any algorithm) of the source object's content. If defined, it must be guaranteed to change when the source object's content changes. */\n checksum?: string;\n /** A place where additional JSON properties can be stored. For example, provenance information or properties relating to the synchronization process.\n * @note Warning: if defined, jsonProperties must be a *string*, specifically a valid JSON string.\n * @note Warning: in a future major release, the type of `jsonProperties` will be changed to object, and itwin.js will automatically stringify it when writing to the iModel.\n * This will be a breaking change, since application code will have to change from supplying a string to supplying an object.\n */\n jsonProperties?: any;\n /** The source of the imported/synchronized object. Should point to an instance of [ExternalSource]($backend). */\n source?: RelatedElementProps;\n}\n\n/** Properties of an [ExternalSource]($backend)\n * @beta\n */\nexport interface ExternalSourceProps extends ElementProps {\n repository?: RelatedElementProps;\n connectorName?: string;\n connectorVersion?: string;\n}\n\n/** The role that an attached [ExternalSource]($backend) plays.\n * @beta\n */\nexport enum ExternalSourceAttachmentRole {\n /** The attached [ExternalSource]($backend) provides context. */\n SpecifyContext = 0,\n /** The attached [ExternalSource]($backend) models a part of the whole. */\n SpecifyPart = 1,\n}\n\n/** Properties of an [ExternalSourceAttachment]($backend)\n * @beta\n */\nexport interface ExternalSourceAttachmentProps extends ElementProps {\n attaches?: RelatedElementProps;\n role?: ExternalSourceAttachmentRole;\n translation?: XYZProps;\n yaw?: number;\n pitch?: number;\n roll?: number;\n scale?: XYZProps;\n}\n\n/** Properties of an [ChannelRootAspect]($backend) that identifies an Element as the root of a *channel* which is a subset of the overall iModel hierarchy that is independently maintained.\n * @public @preview\n * @extensions\n */\nexport interface ChannelRootAspectProps extends ElementAspectProps {\n /** The owner of the channel */\n owner: string;\n}\n\n/** Properties of a [LineStyle]($backend)\n * @public @preview\n * @extensions\n */\nexport interface LineStyleProps extends DefinitionElementProps {\n description?: string;\n /** The JSON string line style definition element data [LineStyleDefinition.StyleProps]($backend) */\n data: string;\n}\n\n/** Properties of a [LightLocation]($backend)\n * @internal\n */\nexport interface LightLocationProps extends GeometricElement3dProps {\n enabled?: boolean;\n}\n\n/** The *rank* for a Category\n * @public @preview\n * @extensions\n */\nexport enum Rank {\n /** This category is predefined by the system */\n System = 0,\n /** This category is defined by a schema. Elements in this category are not recognized by system classes. */\n Domain = 1,\n /** This category is defined by an application. Elements in this category are not recognized by system and schema classes. */\n Application = 2,\n /** This category is defined by a user. Elements in this category are not recognized by system, schema, and application classes. */\n User = 3,\n}\n\n/** Parameters of a [Category]($backend)\n * @public @preview\n * @extensions\n */\nexport interface CategoryProps extends DefinitionElementProps {\n rank?: Rank;\n description?: string;\n}\n\n/** Parameters of a [SubCategory]($backend)\n * @public @preview\n * @extensions\n */\nexport interface SubCategoryProps extends DefinitionElementProps {\n appearance?: SubCategoryAppearance.Props;\n description?: string;\n}\n\n/** Parameters of a [UrlLink]($backend)\n * @public @preview\n * @extensions\n */\nexport interface UrlLinkProps extends ElementProps {\n description?: string;\n url?: string;\n}\n\n/** Parameters of a [RepositoryLink]($backend)\n * @public @preview\n * @extensions\n */\nexport interface RepositoryLinkProps extends UrlLinkProps {\n repositoryGuid?: GuidString;\n format?: string;\n}\n\n/** The properties of a [SynchronizationConfigLink]($backend)\n * @beta\n */\nexport interface SynchronizationConfigLinkProps extends UrlLinkProps {\n lastSuccessfulRun?: string;\n}\n\n/** Wire format describing a [RenderTimeline]($backend).\n * @public @preview\n * @extensions\n */\nexport interface RenderTimelineProps extends ElementProps {\n /** An optional human-readable description of the timeline. */\n description?: string;\n /** The stringified JSON representation of the instructions for visualizing change over time.\n * @see [[RenderSchedule.ScriptProps]] for the JSON interface.\n */\n script: string;\n}\n\n/** Properties of a [SheetIndexEntry]($backend).\n * @beta\n*/\nexport interface SheetIndexEntryProps extends ElementProps {\n /** Can be used to prioritize or order members within a SheetIndex or SheetIndexFolder. */\n entryPriority: number;\n}\n\n/** Properties of a [SheetIndexFolder]($backend)\n * @beta\n */\nexport type SheetIndexFolderProps = SheetIndexEntryProps;\n\n/** Properties of a [SheetIndexReference]($backend)\n * @beta\n */\nexport interface SheetIndexReferenceProps extends SheetIndexEntryProps {\n /** The bis:SheetIndex that this bis:SheetIndexReference is pointing to. */\n sheetIndex?: RelatedElementProps;\n}\n\n/** Properties of a [SheetReference]($backend)\n * @beta\n */\nexport interface SheetReferenceProps extends SheetIndexEntryProps {\n /** The bis:Sheet that this bis:SheetReference is pointing to. */\n sheet?: RelatedElementProps;\n}\n\n/** Properties that define an [AnnotationTextStyle]($backend).\n * @beta\n */\nexport interface AnnotationTextStyleProps extends DefinitionElementProps {\n /** An optional human-readable description of the text style.*/\n description?: string;\n /** The stringified versioned JSON representation of the text style.\n * @see [[VersionedJSON]] for the JSON representation.\n * @see [[TextStyleSettingsProps]] for the data model.\n */\n settings?: string;\n}\n\n/** A string in the format `read.write.minor` where the semantics match those of [ECVersion]($ecschema-metadata).\n * @beta\n */\nexport type ECVersionString = `${string}.${string}.${string}`\n\n/** Wrapper for versioned JSON data.\n * @beta\n */\nexport interface VersionedJSON<T> {\n /** The semver version of the JSON data.\n * Uses the same semantics as [ECVersion]($ecschema-metadata).\n */\n version: ECVersionString;\n /** The JSON data. */\n data: T;\n}"]}
|
|
@@ -65,7 +65,7 @@ export declare abstract class TextBlockComponent {
|
|
|
65
65
|
/** @internal */
|
|
66
66
|
protected constructor(props?: TextBlockComponentProps);
|
|
67
67
|
/** Deviations in individual properties of the [[TextStyleSettings]] in the [AnnotationTextStyle]($backend).
|
|
68
|
-
* For example, if the style uses the "Arial" font, you can override that by settings `styleOverrides.
|
|
68
|
+
* For example, if the style uses the "Arial" font, you can override that by settings `styleOverrides.font.name` to "Comic Sans".
|
|
69
69
|
* @see [[clearStyleOverrides]] to reset this to an empty object.
|
|
70
70
|
*/
|
|
71
71
|
get styleOverrides(): TextStyleSettingsProps;
|
|
@@ -265,13 +265,13 @@ export declare class FieldRun extends TextBlockComponent {
|
|
|
265
265
|
/** Discriminator field for the [[Run]] union. */
|
|
266
266
|
readonly type = "field";
|
|
267
267
|
/** The element and BIS class containing the property described by [[propertyPath]]. */
|
|
268
|
-
|
|
268
|
+
propertyHost: FieldPropertyHost;
|
|
269
269
|
/** Describes how to obtain the property value from [[propertyHost]]. */
|
|
270
|
-
|
|
270
|
+
propertyPath: FieldPropertyPath;
|
|
271
271
|
/** Specifies how to format the property value obtained from [[propertyPath]] into a string to be stored in [[cachedContent]].
|
|
272
272
|
* The specific options used depend upon the [[FieldPropertyType]].
|
|
273
273
|
*/
|
|
274
|
-
|
|
274
|
+
formatOptions?: FieldFormatOptions;
|
|
275
275
|
private _cachedContent;
|
|
276
276
|
/** The field's most recently evaluated display string. */
|
|
277
277
|
get cachedContent(): string;
|
|
@@ -339,23 +339,6 @@ export declare class List extends TextBlockComponent {
|
|
|
339
339
|
stringify(options?: TextBlockStringifyOptions, context?: TextBlockStringifyContext): string;
|
|
340
340
|
equals(other: TextBlockComponent): boolean;
|
|
341
341
|
}
|
|
342
|
-
/** Describes the relative alignment of the content of a [[TextBlock]].
|
|
343
|
-
* @beta
|
|
344
|
-
*/
|
|
345
|
-
export type TextBlockJustification = "left" | "center" | "right";
|
|
346
|
-
/** Describes the margins around the content inside a [[TextBlock]]. It's measured in meters.
|
|
347
|
-
* @beta
|
|
348
|
-
*/
|
|
349
|
-
export interface TextBlockMargins {
|
|
350
|
-
/** The left margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */
|
|
351
|
-
left: number;
|
|
352
|
-
/** The right margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */
|
|
353
|
-
right: number;
|
|
354
|
-
/** The top margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */
|
|
355
|
-
top: number;
|
|
356
|
-
/** The bottom margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */
|
|
357
|
-
bottom: number;
|
|
358
|
-
}
|
|
359
342
|
/** JSON representation of a [[TextBlock]].
|
|
360
343
|
* @beta
|
|
361
344
|
*/
|
|
@@ -365,10 +348,6 @@ export interface TextBlockProps extends TextBlockComponentProps {
|
|
|
365
348
|
* Default: 0
|
|
366
349
|
*/
|
|
367
350
|
width?: number;
|
|
368
|
-
/** The alignment of the document content. Default: "left". */
|
|
369
|
-
justification?: TextBlockJustification;
|
|
370
|
-
/** The margins to surround the document content. Default: 0 margins on all sides */
|
|
371
|
-
margins?: Partial<TextBlockMargins>;
|
|
372
351
|
children?: ParagraphProps[];
|
|
373
352
|
}
|
|
374
353
|
/** Represents a formatted text document consisting of a series of [[Paragraph]]s, each laid out on a separate line and containing their own content.
|
|
@@ -383,10 +362,6 @@ export declare class TextBlock extends TextBlockComponent {
|
|
|
383
362
|
* Default: 0
|
|
384
363
|
*/
|
|
385
364
|
width: number;
|
|
386
|
-
/** The alignment of the document's content. */
|
|
387
|
-
justification: TextBlockJustification;
|
|
388
|
-
/** The margins of the document. */
|
|
389
|
-
margins: TextBlockMargins;
|
|
390
365
|
private constructor();
|
|
391
366
|
clearStyleOverrides(options?: ClearTextStyleOptions): void;
|
|
392
367
|
toJSON(): Text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QAAQ,EAAE,SAAS,EAAE,CAAC;IAEtC;;;OAGG;IACI,KAAK,EAAE,MAAM,CAAC;IAErB,OAAO;IAOS,mBAAmB,CAAC,OAAO,CAAC,EAAE,qBAAqB,GAAG,IAAI;IAI1D,MAAM,IAAI,cAAc;IAQxC,wDAAwD;WAC1C,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,GAAG,SAAS;IAIrE,mEAAmE;IACnE,IAAoB,OAAO,IAAI,OAAO,CAErC;IAEe,KAAK,IAAI,SAAS;IAIlC,qMAAqM;IAC9L,SAAS,CAAC,OAAO,CAAC,EAAE,yBAAyB,GAAG,MAAM;IAI7D;;;;OAIG;IACI,eAAe,CAAC,KAAK,CAAC,EAAE,cAAc,EAAE,YAAY,UAAQ,GAAG,SAAS;IAQ/E;;OAEG;IACI,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI;IAKhB,MAAM,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO;CAuB3D;AAED;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC;AAExE;;;;;;;GAOG;AACH,wBAAiB,0BAA0B,CAAC,MAAM,EAAE,4BAA4B,GAAG,gBAAgB,CAAC;IAAE,MAAM,EAAE,4BAA4B,CAAC;IAAC,KAAK,EAAE,IAAI,GAAG,SAAS,GAAG,GAAG,CAAA;CAAE,CAAC,CAO3K;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CA0BrE"}
|
|
@@ -29,17 +29,17 @@ class TextBlockComponent {
|
|
|
29
29
|
_styleOverrides;
|
|
30
30
|
/** @internal */
|
|
31
31
|
constructor(props) {
|
|
32
|
-
this._styleOverrides =
|
|
32
|
+
this._styleOverrides = structuredClone(props?.styleOverrides ?? {});
|
|
33
33
|
}
|
|
34
34
|
/** Deviations in individual properties of the [[TextStyleSettings]] in the [AnnotationTextStyle]($backend).
|
|
35
|
-
* For example, if the style uses the "Arial" font, you can override that by settings `styleOverrides.
|
|
35
|
+
* For example, if the style uses the "Arial" font, you can override that by settings `styleOverrides.font.name` to "Comic Sans".
|
|
36
36
|
* @see [[clearStyleOverrides]] to reset this to an empty object.
|
|
37
37
|
*/
|
|
38
38
|
get styleOverrides() {
|
|
39
39
|
return this._styleOverrides;
|
|
40
40
|
}
|
|
41
41
|
set styleOverrides(overrides) {
|
|
42
|
-
this._styleOverrides =
|
|
42
|
+
this._styleOverrides = structuredClone(overrides);
|
|
43
43
|
}
|
|
44
44
|
/** Reset any [[styleOverrides]] applied to this component. */
|
|
45
45
|
clearStyleOverrides(_options) {
|
|
@@ -60,23 +60,14 @@ class TextBlockComponent {
|
|
|
60
60
|
/** Convert this component to its JSON representation. */
|
|
61
61
|
toJSON() {
|
|
62
62
|
return {
|
|
63
|
-
styleOverrides:
|
|
63
|
+
styleOverrides: structuredClone(this.styleOverrides),
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
/** Returns true if `this` is equivalent to `other`. */
|
|
67
67
|
equals(other) {
|
|
68
|
-
const
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
for (const name of myKeys) {
|
|
74
|
-
const key = name;
|
|
75
|
-
if (this.styleOverrides[key] !== other.styleOverrides[key]) {
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return true;
|
|
68
|
+
const mySettings = TextStyle_1.TextStyleSettings.fromJSON(this.styleOverrides);
|
|
69
|
+
const otherSettings = TextStyle_1.TextStyleSettings.fromJSON(other.styleOverrides);
|
|
70
|
+
return mySettings.equals(otherSettings);
|
|
80
71
|
}
|
|
81
72
|
}
|
|
82
73
|
exports.TextBlockComponent = TextBlockComponent;
|
|
@@ -452,7 +443,6 @@ class List extends TextBlockComponent {
|
|
|
452
443
|
}
|
|
453
444
|
}
|
|
454
445
|
exports.List = List;
|
|
455
|
-
;
|
|
456
446
|
/** Represents a formatted text document consisting of a series of [[Paragraph]]s, each laid out on a separate line and containing their own content.
|
|
457
447
|
* No word-wrapping is applied to the document unless a [[width]] greater than zero is specified.
|
|
458
448
|
* @see [[TextAnnotation]] to position a text block as an annotation in 2d or 3d space.
|
|
@@ -465,21 +455,9 @@ class TextBlock extends TextBlockComponent {
|
|
|
465
455
|
* Default: 0
|
|
466
456
|
*/
|
|
467
457
|
width;
|
|
468
|
-
/** The alignment of the document's content. */
|
|
469
|
-
justification;
|
|
470
|
-
/** The margins of the document. */
|
|
471
|
-
margins;
|
|
472
458
|
constructor(props) {
|
|
473
459
|
super(props);
|
|
474
460
|
this.width = props.width ?? 0;
|
|
475
|
-
this.justification = props.justification ?? "left";
|
|
476
|
-
// Assign default margins if not provided
|
|
477
|
-
this.margins = {
|
|
478
|
-
left: props.margins?.left ?? 0,
|
|
479
|
-
right: props.margins?.right ?? 0,
|
|
480
|
-
top: props.margins?.top ?? 0,
|
|
481
|
-
bottom: props.margins?.bottom ?? 0,
|
|
482
|
-
};
|
|
483
461
|
this.children = props?.children?.map((para) => Paragraph.create(para)) ?? [];
|
|
484
462
|
}
|
|
485
463
|
clearStyleOverrides(options) {
|
|
@@ -489,8 +467,6 @@ class TextBlock extends TextBlockComponent {
|
|
|
489
467
|
return {
|
|
490
468
|
...super.toJSON(),
|
|
491
469
|
width: this.width,
|
|
492
|
-
justification: this.justification,
|
|
493
|
-
margins: this.margins,
|
|
494
470
|
children: this.children.map((x) => x.toJSON()),
|
|
495
471
|
};
|
|
496
472
|
}
|
|
@@ -535,12 +511,9 @@ class TextBlock extends TextBlockComponent {
|
|
|
535
511
|
if (!super.equals(other)) {
|
|
536
512
|
return false;
|
|
537
513
|
}
|
|
538
|
-
if (this.width !== other.width
|
|
514
|
+
if (this.width !== other.width) {
|
|
539
515
|
return false;
|
|
540
516
|
}
|
|
541
|
-
const marginsAreEqual = Object.entries(this.margins).every(([key, value]) => value === other.margins[key]);
|
|
542
|
-
if (!marginsAreEqual)
|
|
543
|
-
return false;
|
|
544
517
|
if (this.children && other.children) {
|
|
545
518
|
if (this.children.length !== other.children.length) {
|
|
546
519
|
return false;
|