@itwin/core-common 5.1.0-dev.59 → 5.1.0-dev.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/BackgroundMapSettings.d.ts +2 -2
- package/lib/cjs/BackgroundMapSettings.js.map +1 -1
- package/lib/cjs/ClipStyle.d.ts +1 -1
- package/lib/cjs/ClipStyle.d.ts.map +1 -1
- package/lib/cjs/ClipStyle.js.map +1 -1
- package/lib/cjs/EntityProps.d.ts.map +1 -1
- package/lib/cjs/EntityProps.js +2 -0
- package/lib/cjs/EntityProps.js.map +1 -1
- package/lib/cjs/TerrainSettings.d.ts +1 -1
- package/lib/cjs/TerrainSettings.js.map +1 -1
- package/lib/cjs/internal/BackendTypes.d.ts +3 -3
- package/lib/cjs/internal/BackendTypes.d.ts.map +1 -1
- package/lib/cjs/internal/BackendTypes.js.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.d.ts +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.d.ts.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/esm/BackgroundMapSettings.d.ts +2 -2
- package/lib/esm/BackgroundMapSettings.js.map +1 -1
- package/lib/esm/ClipStyle.d.ts +1 -1
- package/lib/esm/ClipStyle.d.ts.map +1 -1
- package/lib/esm/ClipStyle.js.map +1 -1
- package/lib/esm/EntityProps.d.ts.map +1 -1
- package/lib/esm/EntityProps.js +2 -0
- package/lib/esm/EntityProps.js.map +1 -1
- package/lib/esm/TerrainSettings.d.ts +1 -1
- package/lib/esm/TerrainSettings.js.map +1 -1
- package/lib/esm/internal/BackendTypes.d.ts +3 -3
- package/lib/esm/internal/BackendTypes.d.ts.map +1 -1
- package/lib/esm/internal/BackendTypes.js.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.d.ts +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.d.ts.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
- package/package.json +9 -8
|
@@ -58,11 +58,11 @@ export interface BackgroundMapProps {
|
|
|
58
58
|
export interface DeprecatedBackgroundMapProps {
|
|
59
59
|
/** Identifies the source of the map tiles. Currently supported providers are "BingProvider" and "MapBoxProvider".
|
|
60
60
|
* Default value: "BingProvider"
|
|
61
|
-
* @deprecated in 3.
|
|
61
|
+
* @deprecated in 3.6.0 - might be removed in next major version. Use MapImageryProps.backgroundBase.
|
|
62
62
|
*/
|
|
63
63
|
providerName?: string;
|
|
64
64
|
/** Options for customizing the tiles supplied by the provider. If undefined, default values of all members are used.
|
|
65
|
-
* @deprecated in 3.
|
|
65
|
+
* @deprecated in 3.6.0 - might be removed in next major version. Use MapImageryProps.backgroundBase
|
|
66
66
|
*/
|
|
67
67
|
providerData?: {
|
|
68
68
|
/** The type of map graphics to request. Default value: BackgroundMapType.Hybrid. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackgroundMapSettings.js","sourceRoot":"","sources":["../../src/BackgroundMapSettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,mEAAmF;AACnF,qDAA+E;AAC/E,uDAAkE;AAElE;;;;;GAKG;AACH,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,oCAAoC;IACpC,mDAAa,CAAA;IACb,8BAA8B;IAC9B,2CAAS,CAAA;AACX,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AAgED,SAAS,kBAAkB,CAAC,IAAgB;IAC1C,OAAO,SAAS,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC;AAC/D,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAsB;IACnD,IAAI,QAAQ,KAAK,OAAO,KAAK;QAC3B,OAAO,IAAI,CAAC,GAAG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C,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE;YAC5I,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI;YACjC,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;SAC/C,CAAC;QAEF,OAAO,qBAAqB,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC;CACF;AAvJD,sDAuJC","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 DisplayStyles\n */\n\nimport { BackgroundMapProvider, BackgroundMapType } from \"./BackgroundMapProvider\";\nimport { PlanarClipMaskProps, PlanarClipMaskSettings } from \"./PlanarClipMask\";\nimport { TerrainProps, TerrainSettings } from \"./TerrainSettings\";\n\n/** Describes the projection of the background map\n * @see [[BackgroundMapProps]]\n * @see [[DisplayStyleSettingsProps]]\n * @public\n * @extensions\n */\nexport enum GlobeMode {\n /** Display Earth as 3d ellipsoid */\n Ellipsoid = 0,\n /** Display Earth as plane. */\n Plane = 1,\n}\n\n/** In-memory JSON representation of a [[BackgroundMapSettings]].\n * @see [[PersistentBackgroundMapProps]] for the persistent JSON representation.\n * @public\n * @extensions\n */\nexport interface BackgroundMapProps {\n /** The elevation of the map in meters relative the WGS84 ellipsoid. Default value: 0. */\n groundBias?: number;\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden.\n * Default value: false.\n */\n transparency?: number | false;\n /** If set to true, the map tiles will be rendered with depth, allowing them to obscure other geometry. Otherwise, they are always rendered behind all other geometry. Default value: false. */\n useDepthBuffer?: boolean;\n /** If true, terrain heights will be applied to the map; otherwise the map will be rendered as a plane. */\n applyTerrain?: boolean;\n /** Properties associated with terrain display. */\n terrainSettings?: TerrainProps;\n /** Globe Mode. Default value: GlobeMode.Ellipsoid */\n globeMode?: GlobeMode;\n /** If true, the map will be treated as non-locatable - i.e., tools will not interact with it. This is particularly useful when the map is transparent - it\n * allows the user to select elements that are behind the map.\n */\n nonLocatable?: boolean;\n /** A planar mask applied to the map geometry\n * @beta\n */\n planarClipMask?: PlanarClipMaskProps;\n\n /** See [[DeprecatedBackgroundMapProps.providerName]]. */\n providerName?: never;\n /** See [[DeprecatedBackgroundMapProps.providerData]]. */\n providerData?: never;\n}\n\n/** Properties of [[PersistentBackgroundMapProps]] that have been deprecated, but are retained for backwards compatibility.\n * These properties are omitted from [[BackgroundMapProps]] as they are no longer part of the API, but are included in\n * [[PersistentBackgroundMapProps]] because they remain part of the persistence format.\n * @public\n * @extensions\n */\nexport interface DeprecatedBackgroundMapProps {\n /** Identifies the source of the map tiles. Currently supported providers are \"BingProvider\" and \"MapBoxProvider\".\n * Default value: \"BingProvider\"\n * @deprecated in 3.x - might be removed in next major version. Use MapImageryProps.backgroundBase.\n */\n providerName?: string;\n /** Options for customizing the tiles supplied by the provider. If undefined, default values of all members are used.\n * @deprecated in 3.x - might be removed in next major version. Use MapImageryProps.backgroundBase\n */\n providerData?: {\n /** The type of map graphics to request. Default value: BackgroundMapType.Hybrid. */\n mapType?: BackgroundMapType;\n };\n}\n\n/** Persistent JSON representation of a [[BackgroundMapSettings]].\n * @public\n * @extensions\n */\nexport type PersistentBackgroundMapProps = Omit<BackgroundMapProps, keyof DeprecatedBackgroundMapProps> & DeprecatedBackgroundMapProps;\n\nfunction normalizeGlobeMode(mode?: GlobeMode): GlobeMode {\n return GlobeMode.Plane === mode ? mode : GlobeMode.Ellipsoid;\n}\n\nfunction normalizeTransparency(trans?: number | false): number | false {\n if (\"number\" === typeof trans)\n return Math.min(1, Math.max(0, trans));\n\n return false;\n}\n\n/** As part of a [[DisplayStyleSettings]], controls aspects of how the background map is displayed.\n * @see [[DisplayStyleSettings.backgroundMap]] to query or change these settings for a display style.\n * @see [[MapImagerySettings]] to control the type of imagery applied to the background map.\n * @public\n */\nexport class BackgroundMapSettings {\n /** Retained strictly for persistence. */\n private readonly _provider: BackgroundMapProvider;\n\n /** Elevation in meters, relative to WGS84 Ellipsoid.. */\n public readonly groundBias: number;\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden. Default value: false. */\n public readonly transparency: number | false;\n /** If set to true, the map tiles will be rendered with depth, allowing them to obscure other geometry. Otherwise, they are always rendered behind all other geometry. Default value: false. */\n public readonly useDepthBuffer: boolean;\n /** If true, terrain heights will be applied to the map; otherwise the map will be rendered as a plane. */\n public readonly applyTerrain: boolean;\n /** Settings associated with terrain display. */\n public readonly terrainSettings: TerrainSettings;\n /** Globe display mode. */\n public readonly globeMode: GlobeMode;\n /** Planar Mask - used to mask the background map to avoid overlapping with other geometry\n * @beta\n */\n public readonly planarClipMask: PlanarClipMaskSettings;\n private readonly _locatable: boolean;\n /** If false, the map will be treated as non-locatable - i.e., tools will not interact with it. This is particularly useful when the map is transparent - it\n * allows the user to select elements that are behind the map.\n */\n public get locatable(): boolean {\n // Handle legacy TerrainProps.nonLocatable:\n // - If TerrainProps.nonLocatable=true and terrain is on, terrain is not locatable.\n // - Otherwise, use BackgroundMapProps.nonLocatable.\n if (this.applyTerrain && this.terrainSettings.nonLocatable)\n return false;\n\n return this._locatable;\n }\n\n /** If transparency is overridden, the transparency to apply; otherwise, undefined. */\n public get transparencyOverride(): number | undefined { return false !== this.transparency ? this.transparency : undefined; }\n\n private constructor(props: BackgroundMapProps | PersistentBackgroundMapProps) {\n this.groundBias = props.groundBias ?? 0;\n this.transparency = normalizeTransparency(props.transparency);\n this.useDepthBuffer = props.useDepthBuffer ?? false;\n this.applyTerrain = props.applyTerrain ?? false;\n this.terrainSettings = TerrainSettings.fromJSON(props.terrainSettings);\n this.globeMode = normalizeGlobeMode(props.globeMode);\n this._locatable = true !== props.nonLocatable;\n this.planarClipMask = PlanarClipMaskSettings.fromJSON(props.planarClipMask);\n this._provider = BackgroundMapProvider.fromBackgroundMapProps(props);\n }\n\n /** Create settings from their persistent representation. In general, this method should only be used when reading the settings directly from\n * the iModel - otherwise, prefer [[fromJSON]].\n */\n public static fromPersistentJSON(json?: PersistentBackgroundMapProps): BackgroundMapSettings {\n return new this(json ?? {});\n }\n\n /** Construct from JSON, performing validation and applying default values for undefined fields.\n * @see [[fromPersistentJSON]] if you are reading the settings directly from the iModel.\n */\n public static fromJSON(json?: BackgroundMapProps): BackgroundMapSettings {\n return new BackgroundMapSettings(json ?? {});\n }\n\n /** Convert these settings to their in-memory JSON representation.\n * @see [[toPersistentJSON]] if you intend to write the JSON directly to an iModel.\n */\n public toJSON(): BackgroundMapProps {\n const props: BackgroundMapProps = {};\n if (0 !== this.groundBias)\n props.groundBias = this.groundBias;\n if (this.applyTerrain)\n props.applyTerrain = true;\n if (false !== this.transparency)\n props.transparency = this.transparency;\n if (GlobeMode.Ellipsoid !== this.globeMode)\n props.globeMode = this.globeMode;\n if (this.useDepthBuffer)\n props.useDepthBuffer = true;\n if (!this._locatable)\n props.nonLocatable = true;\n\n const terrainSettings = this.terrainSettings.toJSON();\n for (const prop of Object.values(terrainSettings)) {\n if (undefined !== prop) {\n props.terrainSettings = terrainSettings;\n break;\n }\n }\n\n if (this.planarClipMask.isValid)\n props.planarClipMask = this.planarClipMask.toJSON();\n\n return props;\n }\n\n /** Convert these settings to their persistent representation. In general, this method should only be used when writing the settings directly to\n * the iModel - otherwise, prefer [[toJSON]].\n */\n public toPersistentJSON(): PersistentBackgroundMapProps {\n const props = this.toJSON() as PersistentBackgroundMapProps;\n\n // Preserve deprecated imagery provider properties.\n if (\"BingProvider\" !== this._provider.name)\n props.providerName = this._provider.name; // eslint-disable-line @typescript-eslint/no-deprecated\n if (BackgroundMapType.Hybrid !== this._provider.type)\n props.providerData = { mapType: this._provider.type }; // eslint-disable-line @typescript-eslint/no-deprecated\n\n return props;\n }\n\n /** Returns true if these settings are equivalent to the supplied JSON settings. */\n public equalsJSON(json?: BackgroundMapProps): boolean {\n return this.equals(BackgroundMapSettings.fromJSON(json));\n }\n\n /** Returns true if the persistent representation of these settings is equivalent to `json`. */\n public equalsPersistentJSON(json?: PersistentBackgroundMapProps): boolean {\n return this.equals(BackgroundMapSettings.fromPersistentJSON(json));\n }\n\n /** Returns true if these settings are equivalent to `other`. */\n public equals(other: BackgroundMapSettings): boolean {\n return this.groundBias === other.groundBias && this.useDepthBuffer === other.useDepthBuffer && this.transparency === other.transparency\n && this.globeMode === other.globeMode && this._locatable === other._locatable && this.applyTerrain === other.applyTerrain\n && this.terrainSettings.equals(other.terrainSettings) && this.planarClipMask.equals(other.planarClipMask)\n && this._provider.name === other._provider.name && this._provider.type === other._provider.type;\n }\n\n /** Create a copy of this BackgroundMapSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A BackgroundMapSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps?: BackgroundMapProps): BackgroundMapSettings {\n if (undefined === changedProps)\n return this;\n\n const props = {\n groundBias: changedProps.groundBias ?? this.groundBias,\n transparency: changedProps.transparency ?? this.transparency,\n useDepthBuffer: changedProps.useDepthBuffer ?? this.useDepthBuffer,\n globeMode: changedProps.globeMode ?? this.globeMode,\n nonLocatable: changedProps.nonLocatable ?? !this._locatable,\n applyTerrain: changedProps.applyTerrain ?? this.applyTerrain,\n terrainSettings: changedProps.terrainSettings ? this.terrainSettings.clone(changedProps.terrainSettings).toJSON() : this.terrainSettings.toJSON(),\n planarClipMask: changedProps.planarClipMask ? this.planarClipMask.clone(changedProps.planarClipMask).toJSON() : this.planarClipMask.toJSON(),\n providerName: this._provider.name,\n providerData: { mapType: this._provider.type },\n };\n\n return BackgroundMapSettings.fromPersistentJSON(props);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"BackgroundMapSettings.js","sourceRoot":"","sources":["../../src/BackgroundMapSettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC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AI,CAAC,SAAS;YACnD,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,UAAU;YAC3D,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,eAAe,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE;YACjJ,cAAc,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE;YAC5I,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI;YACjC,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;SAC/C,CAAC;QAEF,OAAO,qBAAqB,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC;CACF;AAvJD,sDAuJC","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 DisplayStyles\n */\n\nimport { BackgroundMapProvider, BackgroundMapType } from \"./BackgroundMapProvider\";\nimport { PlanarClipMaskProps, PlanarClipMaskSettings } from \"./PlanarClipMask\";\nimport { TerrainProps, TerrainSettings } from \"./TerrainSettings\";\n\n/** Describes the projection of the background map\n * @see [[BackgroundMapProps]]\n * @see [[DisplayStyleSettingsProps]]\n * @public\n * @extensions\n */\nexport enum GlobeMode {\n /** Display Earth as 3d ellipsoid */\n Ellipsoid = 0,\n /** Display Earth as plane. */\n Plane = 1,\n}\n\n/** In-memory JSON representation of a [[BackgroundMapSettings]].\n * @see [[PersistentBackgroundMapProps]] for the persistent JSON representation.\n * @public\n * @extensions\n */\nexport interface BackgroundMapProps {\n /** The elevation of the map in meters relative the WGS84 ellipsoid. Default value: 0. */\n groundBias?: number;\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden.\n * Default value: false.\n */\n transparency?: number | false;\n /** If set to true, the map tiles will be rendered with depth, allowing them to obscure other geometry. Otherwise, they are always rendered behind all other geometry. Default value: false. */\n useDepthBuffer?: boolean;\n /** If true, terrain heights will be applied to the map; otherwise the map will be rendered as a plane. */\n applyTerrain?: boolean;\n /** Properties associated with terrain display. */\n terrainSettings?: TerrainProps;\n /** Globe Mode. Default value: GlobeMode.Ellipsoid */\n globeMode?: GlobeMode;\n /** If true, the map will be treated as non-locatable - i.e., tools will not interact with it. This is particularly useful when the map is transparent - it\n * allows the user to select elements that are behind the map.\n */\n nonLocatable?: boolean;\n /** A planar mask applied to the map geometry\n * @beta\n */\n planarClipMask?: PlanarClipMaskProps;\n\n /** See [[DeprecatedBackgroundMapProps.providerName]]. */\n providerName?: never;\n /** See [[DeprecatedBackgroundMapProps.providerData]]. */\n providerData?: never;\n}\n\n/** Properties of [[PersistentBackgroundMapProps]] that have been deprecated, but are retained for backwards compatibility.\n * These properties are omitted from [[BackgroundMapProps]] as they are no longer part of the API, but are included in\n * [[PersistentBackgroundMapProps]] because they remain part of the persistence format.\n * @public\n * @extensions\n */\nexport interface DeprecatedBackgroundMapProps {\n /** Identifies the source of the map tiles. Currently supported providers are \"BingProvider\" and \"MapBoxProvider\".\n * Default value: \"BingProvider\"\n * @deprecated in 3.6.0 - might be removed in next major version. Use MapImageryProps.backgroundBase.\n */\n providerName?: string;\n /** Options for customizing the tiles supplied by the provider. If undefined, default values of all members are used.\n * @deprecated in 3.6.0 - might be removed in next major version. Use MapImageryProps.backgroundBase\n */\n providerData?: {\n /** The type of map graphics to request. Default value: BackgroundMapType.Hybrid. */\n mapType?: BackgroundMapType;\n };\n}\n\n/** Persistent JSON representation of a [[BackgroundMapSettings]].\n * @public\n * @extensions\n */\nexport type PersistentBackgroundMapProps = Omit<BackgroundMapProps, keyof DeprecatedBackgroundMapProps> & DeprecatedBackgroundMapProps;\n\nfunction normalizeGlobeMode(mode?: GlobeMode): GlobeMode {\n return GlobeMode.Plane === mode ? mode : GlobeMode.Ellipsoid;\n}\n\nfunction normalizeTransparency(trans?: number | false): number | false {\n if (\"number\" === typeof trans)\n return Math.min(1, Math.max(0, trans));\n\n return false;\n}\n\n/** As part of a [[DisplayStyleSettings]], controls aspects of how the background map is displayed.\n * @see [[DisplayStyleSettings.backgroundMap]] to query or change these settings for a display style.\n * @see [[MapImagerySettings]] to control the type of imagery applied to the background map.\n * @public\n */\nexport class BackgroundMapSettings {\n /** Retained strictly for persistence. */\n private readonly _provider: BackgroundMapProvider;\n\n /** Elevation in meters, relative to WGS84 Ellipsoid.. */\n public readonly groundBias: number;\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden. Default value: false. */\n public readonly transparency: number | false;\n /** If set to true, the map tiles will be rendered with depth, allowing them to obscure other geometry. Otherwise, they are always rendered behind all other geometry. Default value: false. */\n public readonly useDepthBuffer: boolean;\n /** If true, terrain heights will be applied to the map; otherwise the map will be rendered as a plane. */\n public readonly applyTerrain: boolean;\n /** Settings associated with terrain display. */\n public readonly terrainSettings: TerrainSettings;\n /** Globe display mode. */\n public readonly globeMode: GlobeMode;\n /** Planar Mask - used to mask the background map to avoid overlapping with other geometry\n * @beta\n */\n public readonly planarClipMask: PlanarClipMaskSettings;\n private readonly _locatable: boolean;\n /** If false, the map will be treated as non-locatable - i.e., tools will not interact with it. This is particularly useful when the map is transparent - it\n * allows the user to select elements that are behind the map.\n */\n public get locatable(): boolean {\n // Handle legacy TerrainProps.nonLocatable:\n // - If TerrainProps.nonLocatable=true and terrain is on, terrain is not locatable.\n // - Otherwise, use BackgroundMapProps.nonLocatable.\n if (this.applyTerrain && this.terrainSettings.nonLocatable)\n return false;\n\n return this._locatable;\n }\n\n /** If transparency is overridden, the transparency to apply; otherwise, undefined. */\n public get transparencyOverride(): number | undefined { return false !== this.transparency ? this.transparency : undefined; }\n\n private constructor(props: BackgroundMapProps | PersistentBackgroundMapProps) {\n this.groundBias = props.groundBias ?? 0;\n this.transparency = normalizeTransparency(props.transparency);\n this.useDepthBuffer = props.useDepthBuffer ?? false;\n this.applyTerrain = props.applyTerrain ?? false;\n this.terrainSettings = TerrainSettings.fromJSON(props.terrainSettings);\n this.globeMode = normalizeGlobeMode(props.globeMode);\n this._locatable = true !== props.nonLocatable;\n this.planarClipMask = PlanarClipMaskSettings.fromJSON(props.planarClipMask);\n this._provider = BackgroundMapProvider.fromBackgroundMapProps(props);\n }\n\n /** Create settings from their persistent representation. In general, this method should only be used when reading the settings directly from\n * the iModel - otherwise, prefer [[fromJSON]].\n */\n public static fromPersistentJSON(json?: PersistentBackgroundMapProps): BackgroundMapSettings {\n return new this(json ?? {});\n }\n\n /** Construct from JSON, performing validation and applying default values for undefined fields.\n * @see [[fromPersistentJSON]] if you are reading the settings directly from the iModel.\n */\n public static fromJSON(json?: BackgroundMapProps): BackgroundMapSettings {\n return new BackgroundMapSettings(json ?? {});\n }\n\n /** Convert these settings to their in-memory JSON representation.\n * @see [[toPersistentJSON]] if you intend to write the JSON directly to an iModel.\n */\n public toJSON(): BackgroundMapProps {\n const props: BackgroundMapProps = {};\n if (0 !== this.groundBias)\n props.groundBias = this.groundBias;\n if (this.applyTerrain)\n props.applyTerrain = true;\n if (false !== this.transparency)\n props.transparency = this.transparency;\n if (GlobeMode.Ellipsoid !== this.globeMode)\n props.globeMode = this.globeMode;\n if (this.useDepthBuffer)\n props.useDepthBuffer = true;\n if (!this._locatable)\n props.nonLocatable = true;\n\n const terrainSettings = this.terrainSettings.toJSON();\n for (const prop of Object.values(terrainSettings)) {\n if (undefined !== prop) {\n props.terrainSettings = terrainSettings;\n break;\n }\n }\n\n if (this.planarClipMask.isValid)\n props.planarClipMask = this.planarClipMask.toJSON();\n\n return props;\n }\n\n /** Convert these settings to their persistent representation. In general, this method should only be used when writing the settings directly to\n * the iModel - otherwise, prefer [[toJSON]].\n */\n public toPersistentJSON(): PersistentBackgroundMapProps {\n const props = this.toJSON() as PersistentBackgroundMapProps;\n\n // Preserve deprecated imagery provider properties.\n if (\"BingProvider\" !== this._provider.name)\n props.providerName = this._provider.name; // eslint-disable-line @typescript-eslint/no-deprecated\n if (BackgroundMapType.Hybrid !== this._provider.type)\n props.providerData = { mapType: this._provider.type }; // eslint-disable-line @typescript-eslint/no-deprecated\n\n return props;\n }\n\n /** Returns true if these settings are equivalent to the supplied JSON settings. */\n public equalsJSON(json?: BackgroundMapProps): boolean {\n return this.equals(BackgroundMapSettings.fromJSON(json));\n }\n\n /** Returns true if the persistent representation of these settings is equivalent to `json`. */\n public equalsPersistentJSON(json?: PersistentBackgroundMapProps): boolean {\n return this.equals(BackgroundMapSettings.fromPersistentJSON(json));\n }\n\n /** Returns true if these settings are equivalent to `other`. */\n public equals(other: BackgroundMapSettings): boolean {\n return this.groundBias === other.groundBias && this.useDepthBuffer === other.useDepthBuffer && this.transparency === other.transparency\n && this.globeMode === other.globeMode && this._locatable === other._locatable && this.applyTerrain === other.applyTerrain\n && this.terrainSettings.equals(other.terrainSettings) && this.planarClipMask.equals(other.planarClipMask)\n && this._provider.name === other._provider.name && this._provider.type === other._provider.type;\n }\n\n /** Create a copy of this BackgroundMapSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A BackgroundMapSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps?: BackgroundMapProps): BackgroundMapSettings {\n if (undefined === changedProps)\n return this;\n\n const props = {\n groundBias: changedProps.groundBias ?? this.groundBias,\n transparency: changedProps.transparency ?? this.transparency,\n useDepthBuffer: changedProps.useDepthBuffer ?? this.useDepthBuffer,\n globeMode: changedProps.globeMode ?? this.globeMode,\n nonLocatable: changedProps.nonLocatable ?? !this._locatable,\n applyTerrain: changedProps.applyTerrain ?? this.applyTerrain,\n terrainSettings: changedProps.terrainSettings ? this.terrainSettings.clone(changedProps.terrainSettings).toJSON() : this.terrainSettings.toJSON(),\n planarClipMask: changedProps.planarClipMask ? this.planarClipMask.clone(changedProps.planarClipMask).toJSON() : this.planarClipMask.toJSON(),\n providerName: this._provider.name,\n providerData: { mapType: this._provider.type },\n };\n\n return BackgroundMapSettings.fromPersistentJSON(props);\n }\n}\n"]}
|
package/lib/cjs/ClipStyle.d.ts
CHANGED
|
@@ -139,7 +139,7 @@ export declare class ClipStyle {
|
|
|
139
139
|
/** The default style, which overrides none of the view's settings. */
|
|
140
140
|
static readonly defaults: ClipStyle;
|
|
141
141
|
private constructor();
|
|
142
|
-
/** @deprecated in 4.
|
|
142
|
+
/** @deprecated in 4.3.0 - will not be removed until after 2026-06-13. Use [[create(style: ClipStyleCreateArgs]] */
|
|
143
143
|
static create(produceCutGeometry: boolean, cutStyle: CutStyle, insideColor?: RgbColor, outsideColor?: RgbColor): ClipStyle;
|
|
144
144
|
/** Create a style from its components. */
|
|
145
145
|
static create(style: ClipStyleCreateArgs): ClipStyle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClipStyle.d.ts","sourceRoot":"","sources":["../../src/ClipStyle.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAG/E;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,+FAA+F;IAC/F,SAAS,CAAC,EAAE,iBAAiB,CAAC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oB,GAAG,IAAI,CAAC;QAEpC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QACxC,IAAI,QAAQ,EAAE,CAAC;YACb,IAAA,qBAAM,EAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;YACvC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC5B,CAAC;QAED,IAAI,IAAI,CAAC,WAAW;YAClB,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;QAEhD,IAAI,IAAI,CAAC,YAAY;YACnB,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;QAElD,IAAI,IAAI,CAAC,iBAAiB;YACxB,KAAK,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,CAAC;QAE5D,OAAO,KAAK,CAAC;IACf,CAAC;IAED,uHAAuH;IACvH,IAAW,eAAe;QACxB,IAAI,IAAI,KAAK,SAAS,CAAC,QAAQ;YAC7B,OAAO,IAAI,CAAC;QAEd,OAAO,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,oBAAoB,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,QAAQ,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC;IACvK,CAAC;;AA/GH,8BAgHC","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 Views\n */\n\nimport { assert, JsonUtils } from \"@itwin/core-bentley\";\nimport { ViewFlagOverrides } from \"./ViewFlags\";\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\nimport { HiddenLine } from \"./HiddenLine\";\nimport { FeatureAppearance, FeatureAppearanceProps } from \"./FeatureSymbology\";\nimport { ColorDef } from \"./ColorDef\";\n\n/** Wire format describing a [[CutStyle]] applied to section-cut geometry produced at intersections with a view's [ClipVector]($core-geometry).\n * @see [[ClipStyleProps.cutStyle]].\n * @public\n * @extensions\n */\nexport interface CutStyleProps {\n /** If defined, overrides aspects of the view's [[ViewFlags]] when drawing the cut geometry. */\n viewflags?: ViewFlagOverrides;\n /** If defined, overrides the view's [[HiddenLine.Settings]] when drawing the cut geometry. */\n hiddenLine?: HiddenLine.SettingsProps;\n /** If defined, overrides aspects of the cut geometry's symbology. */\n appearance?: FeatureAppearanceProps;\n}\n\n/** As part of a [[ClipStyle]], describes how section-cut graphics should be displayed.\n * @note Section-cut graphics are only produced if [[ClipStyle.produceCutGeometry]] is `true`.\n * @public\n */\nexport class CutStyle {\n /** Selectively overrides some of the view's [[ViewFlags]] when drawing the section-cut graphics. */\n public readonly viewflags: Readonly<ViewFlagOverrides>;\n /** If defined, overrides the settings the view uses to draw the edges of the section-cut graphics. */\n public readonly hiddenLine?: HiddenLine.Settings;\n /** If defined, overrides aspects of the symbology of the section-cut graphics. */\n public readonly appearance?: FeatureAppearance;\n\n /** The default CutStyle, configured to draw the section-cut graphics using the view's settings, with no overrides. */\n public static readonly defaults = new CutStyle();\n\n private constructor(viewflags?: Readonly<ViewFlagOverrides>, hiddenLine?: HiddenLine.Settings, appearance?: FeatureAppearance) {\n this.viewflags = viewflags ?? {};\n if (hiddenLine && !hiddenLine.matchesDefaults)\n this.hiddenLine = hiddenLine;\n\n if (appearance && !appearance.matchesDefaults)\n this.appearance = appearance;\n }\n\n /** Create a CutStyle from its components. */\n public static create(viewflags?: Readonly<ViewFlagOverrides>, hiddenLine?: HiddenLine.Settings, appearance?: FeatureAppearance): CutStyle {\n if ((viewflags && JsonUtils.isNonEmptyObject(viewflags)) || (hiddenLine && !hiddenLine.matchesDefaults) || (appearance && !appearance.matchesDefaults))\n return new CutStyle(viewflags, hiddenLine, appearance);\n\n return this.defaults;\n }\n\n public static fromJSON(props?: CutStyleProps): CutStyle {\n if (JsonUtils.isNonEmptyObject(props)) {\n const viewflags = { ...props?.viewflags };\n const hiddenLine = props?.hiddenLine ? HiddenLine.Settings.fromJSON(props.hiddenLine) : undefined;\n const appearance = props?.appearance ? FeatureAppearance.fromJSON(props.appearance) : undefined;\n\n return this.create(viewflags, hiddenLine, appearance);\n } else {\n return this.defaults;\n }\n }\n\n /** Return JSON representation. The representation is `undefined` if this style matches the default style. */\n public toJSON(): CutStyleProps | undefined {\n if (this.matchesDefaults)\n return undefined;\n\n const props: CutStyleProps = {};\n if (JsonUtils.isNonEmptyObject(this.viewflags))\n props.viewflags = this.viewflags;\n\n if (this.hiddenLine && !this.hiddenLine.matchesDefaults)\n props.hiddenLine = this.hiddenLine?.toJSON();\n\n if (this.appearance && !this.appearance.matchesDefaults)\n props.appearance = this.appearance.toJSON();\n\n return props;\n }\n\n /** Returns true if this style matches the default style - that is, it overrides none of the view's settings. */\n public get matchesDefaults(): boolean {\n if (this === CutStyle.defaults)\n return true;\n\n return !JsonUtils.isNonEmptyObject(this.viewflags) && (!this.hiddenLine || this.hiddenLine.matchesDefaults) && (!this.appearance || this.appearance.matchesDefaults);\n }\n}\n\n/** Wire format describing a [[ClipIntersectionStyle]].\n * @see [[ClipStyleProps.ClipIntersectionStyle]].\n * @public\n * @extensions\n */\nexport interface ClipIntersectionStyleProps {\n /** Color to apply to intersection of geometry and clip planes, default white */\n color?: RgbColorProps;\n /** Number of pixels to be considered intersecting the clip plane, default 1 */\n width?: number;\n}\n\n/** As part of a [[ClipStyle]], describes how to colorize geometry intersecting the clip planes.\n * @note Edges are highlighted only if [[ClipStyle.ClipIntersectionStyle]] is `true`.\n * @public\n * @extensions\n */\nexport class ClipIntersectionStyle {\n /** Color to apply to intersection of geometry and clip planes, default white */\n public readonly color: RgbColor;\n /** Number of pixels to be considered intersecting the clip plane, default 1 */\n public readonly width: number;\n\n private constructor(color: RgbColor = RgbColor.fromColorDef(ColorDef.white), width: number = 1) {\n this.color = color;\n this.width = width;\n }\n /** Create a highlight from its components. */\n public static create(color?: RgbColor, width?: number): ClipIntersectionStyle {\n if (!color && !width)\n return this.defaults;\n\n return new ClipIntersectionStyle(color, width);\n }\n\n public static readonly defaults = new ClipIntersectionStyle();\n\n public static fromJSON(props?: ClipIntersectionStyleProps): ClipIntersectionStyle {\n if (props === undefined) {\n return ClipIntersectionStyle.defaults;\n }\n\n const color = props.color ? RgbColor.fromJSON(props.color) : RgbColor.fromColorDef(ColorDef.white);\n const width = props.width ? props.width : 1;\n return new ClipIntersectionStyle(color, width);\n }\n\n /** The JSON representation of this style. It is `undefined` if this style matches the defaults. */\n public toJSON(): ClipIntersectionStyleProps | undefined {\n const props: ClipIntersectionStyleProps = {};\n\n if (this.matchesDefaults) {\n return undefined;\n }\n\n if (this.color)\n props.color = this.color.toJSON();\n\n if (this.width)\n props.width = this.width;\n\n return props;\n }\n\n public get matchesDefaults(): boolean {\n if (this === ClipIntersectionStyle.defaults)\n return true;\n\n return !this.color && !this.width;\n }\n}\n\n/** Arguments supplied to [[ClipStyle.create]].\n * @public\n * @extensions\n */\nexport interface ClipStyleCreateArgs {\n /** If `true`, geometry will be produced at the clip planes in a 3d view.\n * - Solids (closed volumes) will produce facets on the clip planes.\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\n */\n produceCutGeometry?: boolean;\n /** If `true`, intersection of geometry and clip planes will be colorized */\n colorizeIntersection?: boolean;\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\n cutStyle?: CutStyle;\n /** If defined, geometry inside the clip planes will be drawn in this color. */\n insideColor?: RgbColor;\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\n outsideColor?: RgbColor;\n /** Controls the style of the intersection of geometry and clip planes */\n intersectionStyle?: ClipIntersectionStyle;\n}\n\n/** Wire format describing a [[ClipStyle]].\n * @see [[DisplayStyleSettingsProps.clipStyle]].\n * @public\n * @extensions\n */\nexport interface ClipStyleProps {\n /** If `true`, geometry will be produced at the clip planes in a 3d view.\n * - Solids (closed volumes) will produce facets on the clip planes.\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\n */\n produceCutGeometry?: boolean;\n /** If 'true', intersection of geometry and clip planes will be colorized */\n colorizeIntersection?: boolean;\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\n cutStyle?: CutStyleProps;\n /** If defined, geometry inside the clip planes will be drawn in this color. */\n insideColor?: RgbColorProps;\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\n outsideColor?: RgbColorProps;\n /** Controls the style of the intersection of geometry and clip planes */\n intersectionStyle?: ClipIntersectionStyleProps;\n}\n\n/** Describes symbology and behavior applied to a [ClipVector]($core-geometry) when applied to a [ViewState]($frontend) or [[ModelClipGroup]].\n * @see [[DisplayStyleSettings.clipStyle]].\n * @public\n */\nexport class ClipStyle {\n /** If `true`, geometry will be produced at the clip planes.\n * - Solids (closed volumes) will produce facets on the clip planes.\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\n */\n public readonly produceCutGeometry: boolean;\n /** If 'true', intersection of geometry and clip planes will be colorized */\n public readonly colorizeIntersection: boolean;\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\n public readonly cutStyle: CutStyle;\n /** If defined, geometry inside the clip planes will be drawn in this color. */\n public readonly insideColor?: RgbColor;\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\n public readonly outsideColor?: RgbColor;\n /** Controls the style of the intersection of geometry and clip planes */\n public readonly intersectionStyle?: ClipIntersectionStyle;\n\n /** The default style, which overrides none of the view's settings. */\n public static readonly defaults = new ClipStyle(false, false, CutStyle.defaults, undefined, undefined, undefined);\n\n private constructor(produceCutGeometry: boolean, colorizeIntersection: boolean, cutStyle: CutStyle, inside: RgbColor | undefined, outside: RgbColor | undefined, intersectionStyle: ClipIntersectionStyle | undefined) {\n this.produceCutGeometry = produceCutGeometry;\n this.colorizeIntersection = colorizeIntersection;\n this.cutStyle = cutStyle;\n this.insideColor = inside;\n this.outsideColor = outside;\n this.intersectionStyle = intersectionStyle;\n }\n\n /** @deprecated in 4.x - will not be removed until after 2026-06-13. Use [[create(style: ClipStyleCreateArgs]] */\n public static create(produceCutGeometry: boolean, cutStyle: CutStyle, insideColor?: RgbColor, outsideColor?: RgbColor): ClipStyle;\n\n /** Create a style from its components. */\n public static create(style: ClipStyleCreateArgs): ClipStyle;\n\n /** @internal */\n public static create(styleOrProduceCutGeometry: ClipStyleCreateArgs | boolean, cutStyle?: CutStyle, insideColor?: RgbColor, outsideColor?: RgbColor): ClipStyle {\n\n if (typeof styleOrProduceCutGeometry === \"boolean\") {\n cutStyle = cutStyle === undefined ? CutStyle.defaults : cutStyle;\n\n if (!styleOrProduceCutGeometry && cutStyle.matchesDefaults && !insideColor && !outsideColor) {\n return this.defaults;\n }\n\n return new ClipStyle(styleOrProduceCutGeometry, false, cutStyle, insideColor, outsideColor, undefined);\n }\n\n const style = styleOrProduceCutGeometry;\n if (!style.produceCutGeometry && !style.colorizeIntersection && (!style.cutStyle || style.cutStyle.matchesDefaults) && !style.insideColor && !style.outsideColor && !style.intersectionStyle)\n return this.defaults;\n\n const produceCutGeometry = style.produceCutGeometry ? true : false;\n const colorizeIntersection = style.colorizeIntersection ? true : false;\n cutStyle = style.cutStyle === undefined ? CutStyle.defaults : style.cutStyle;\n\n return new ClipStyle(produceCutGeometry, colorizeIntersection, cutStyle, style.insideColor, style.outsideColor, style.intersectionStyle);\n }\n\n public static fromJSON(props?: ClipStyleProps): ClipStyle {\n if (JsonUtils.isNonEmptyObject(props)) {\n const produceCutGeometry = props.produceCutGeometry ?? false;\n const colorizeIntersection = props.colorizeIntersection ? true : false;\n const cutStyle = CutStyle.fromJSON(props.cutStyle);\n const insideColor = props.insideColor ? RgbColor.fromJSON(props.insideColor) : undefined;\n const outsideColor = props.outsideColor ? RgbColor.fromJSON(props.outsideColor) : undefined;\n const intersectionStyle = props.intersectionStyle ? ClipIntersectionStyle.fromJSON(props.intersectionStyle) : undefined;\n\n return this.create({ produceCutGeometry, colorizeIntersection, cutStyle, insideColor, outsideColor, intersectionStyle });\n }\n\n return this.defaults;\n }\n\n /** The JSON representation of this style. It is `undefined` if this style matches the defaults. */\n public toJSON(): ClipStyleProps | undefined {\n if (this.matchesDefaults)\n return undefined;\n\n const props: ClipStyleProps = {};\n if (this.produceCutGeometry)\n props.produceCutGeometry = true;\n\n if (this.colorizeIntersection)\n props.colorizeIntersection = true;\n\n const cutStyle = this.cutStyle.toJSON();\n if (cutStyle) {\n assert(!this.cutStyle.matchesDefaults);\n props.cutStyle = cutStyle;\n }\n\n if (this.insideColor)\n props.insideColor = this.insideColor.toJSON();\n\n if (this.outsideColor)\n props.outsideColor = this.outsideColor.toJSON();\n\n if (this.intersectionStyle)\n props.intersectionStyle = this.intersectionStyle.toJSON();\n\n return props;\n }\n\n /** Returns true if this style matches the [[ClipStyle.defaults]] - that is, it overrides no settings from the view. */\n public get matchesDefaults(): boolean {\n if (this === ClipStyle.defaults)\n return true;\n\n return !this.produceCutGeometry && !this.colorizeIntersection && !this.insideColor && !this.outsideColor && this.cutStyle.matchesDefaults && !this.intersectionStyle;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ClipStyle.js","sourceRoot":"","sources":["../../src/ClipStyle.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAwD;AAExD,yCAAqD;AACrD,6CAA0C;AAC1C,yDAA+E;AAC/E,yCAAsC;AAgBtC;;;GAGG;AACH,MAAa,QAAQ;IACnB,oGAAoG;IACpF,SAAS,CAA8B;IACvD,sGAAsG;IACtF,UAAU,CAAuB;IACjD,kFAA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,CAAC,MAAM,EAAE,CAAC;QACxC,IAAI,QAAQ,EAAE,CAAC;YACb,IAAA,qBAAM,EAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;YACvC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC5B,CAAC;QAED,IAAI,IAAI,CAAC,WAAW;YAClB,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;QAEhD,IAAI,IAAI,CAAC,YAAY;YACnB,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;QAElD,IAAI,IAAI,CAAC,iBAAiB;YACxB,KAAK,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,CAAC;QAE5D,OAAO,KAAK,CAAC;IACf,CAAC;IAED,uHAAuH;IACvH,IAAW,eAAe;QACxB,IAAI,IAAI,KAAK,SAAS,CAAC,QAAQ;YAC7B,OAAO,IAAI,CAAC;QAEd,OAAO,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,oBAAoB,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,QAAQ,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC;IACvK,CAAC;;AA/GH,8BAgHC","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 Views\n */\n\nimport { assert, JsonUtils } from \"@itwin/core-bentley\";\nimport { ViewFlagOverrides } from \"./ViewFlags\";\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\nimport { HiddenLine } from \"./HiddenLine\";\nimport { FeatureAppearance, FeatureAppearanceProps } from \"./FeatureSymbology\";\nimport { ColorDef } from \"./ColorDef\";\n\n/** Wire format describing a [[CutStyle]] applied to section-cut geometry produced at intersections with a view's [ClipVector]($core-geometry).\n * @see [[ClipStyleProps.cutStyle]].\n * @public\n * @extensions\n */\nexport interface CutStyleProps {\n /** If defined, overrides aspects of the view's [[ViewFlags]] when drawing the cut geometry. */\n viewflags?: ViewFlagOverrides;\n /** If defined, overrides the view's [[HiddenLine.Settings]] when drawing the cut geometry. */\n hiddenLine?: HiddenLine.SettingsProps;\n /** If defined, overrides aspects of the cut geometry's symbology. */\n appearance?: FeatureAppearanceProps;\n}\n\n/** As part of a [[ClipStyle]], describes how section-cut graphics should be displayed.\n * @note Section-cut graphics are only produced if [[ClipStyle.produceCutGeometry]] is `true`.\n * @public\n */\nexport class CutStyle {\n /** Selectively overrides some of the view's [[ViewFlags]] when drawing the section-cut graphics. */\n public readonly viewflags: Readonly<ViewFlagOverrides>;\n /** If defined, overrides the settings the view uses to draw the edges of the section-cut graphics. */\n public readonly hiddenLine?: HiddenLine.Settings;\n /** If defined, overrides aspects of the symbology of the section-cut graphics. */\n public readonly appearance?: FeatureAppearance;\n\n /** The default CutStyle, configured to draw the section-cut graphics using the view's settings, with no overrides. */\n public static readonly defaults = new CutStyle();\n\n private constructor(viewflags?: Readonly<ViewFlagOverrides>, hiddenLine?: HiddenLine.Settings, appearance?: FeatureAppearance) {\n this.viewflags = viewflags ?? {};\n if (hiddenLine && !hiddenLine.matchesDefaults)\n this.hiddenLine = hiddenLine;\n\n if (appearance && !appearance.matchesDefaults)\n this.appearance = appearance;\n }\n\n /** Create a CutStyle from its components. */\n public static create(viewflags?: Readonly<ViewFlagOverrides>, hiddenLine?: HiddenLine.Settings, appearance?: FeatureAppearance): CutStyle {\n if ((viewflags && JsonUtils.isNonEmptyObject(viewflags)) || (hiddenLine && !hiddenLine.matchesDefaults) || (appearance && !appearance.matchesDefaults))\n return new CutStyle(viewflags, hiddenLine, appearance);\n\n return this.defaults;\n }\n\n public static fromJSON(props?: CutStyleProps): CutStyle {\n if (JsonUtils.isNonEmptyObject(props)) {\n const viewflags = { ...props?.viewflags };\n const hiddenLine = props?.hiddenLine ? HiddenLine.Settings.fromJSON(props.hiddenLine) : undefined;\n const appearance = props?.appearance ? FeatureAppearance.fromJSON(props.appearance) : undefined;\n\n return this.create(viewflags, hiddenLine, appearance);\n } else {\n return this.defaults;\n }\n }\n\n /** Return JSON representation. The representation is `undefined` if this style matches the default style. */\n public toJSON(): CutStyleProps | undefined {\n if (this.matchesDefaults)\n return undefined;\n\n const props: CutStyleProps = {};\n if (JsonUtils.isNonEmptyObject(this.viewflags))\n props.viewflags = this.viewflags;\n\n if (this.hiddenLine && !this.hiddenLine.matchesDefaults)\n props.hiddenLine = this.hiddenLine?.toJSON();\n\n if (this.appearance && !this.appearance.matchesDefaults)\n props.appearance = this.appearance.toJSON();\n\n return props;\n }\n\n /** Returns true if this style matches the default style - that is, it overrides none of the view's settings. */\n public get matchesDefaults(): boolean {\n if (this === CutStyle.defaults)\n return true;\n\n return !JsonUtils.isNonEmptyObject(this.viewflags) && (!this.hiddenLine || this.hiddenLine.matchesDefaults) && (!this.appearance || this.appearance.matchesDefaults);\n }\n}\n\n/** Wire format describing a [[ClipIntersectionStyle]].\n * @see [[ClipStyleProps.ClipIntersectionStyle]].\n * @public\n * @extensions\n */\nexport interface ClipIntersectionStyleProps {\n /** Color to apply to intersection of geometry and clip planes, default white */\n color?: RgbColorProps;\n /** Number of pixels to be considered intersecting the clip plane, default 1 */\n width?: number;\n}\n\n/** As part of a [[ClipStyle]], describes how to colorize geometry intersecting the clip planes.\n * @note Edges are highlighted only if [[ClipStyle.ClipIntersectionStyle]] is `true`.\n * @public\n * @extensions\n */\nexport class ClipIntersectionStyle {\n /** Color to apply to intersection of geometry and clip planes, default white */\n public readonly color: RgbColor;\n /** Number of pixels to be considered intersecting the clip plane, default 1 */\n public readonly width: number;\n\n private constructor(color: RgbColor = RgbColor.fromColorDef(ColorDef.white), width: number = 1) {\n this.color = color;\n this.width = width;\n }\n /** Create a highlight from its components. */\n public static create(color?: RgbColor, width?: number): ClipIntersectionStyle {\n if (!color && !width)\n return this.defaults;\n\n return new ClipIntersectionStyle(color, width);\n }\n\n public static readonly defaults = new ClipIntersectionStyle();\n\n public static fromJSON(props?: ClipIntersectionStyleProps): ClipIntersectionStyle {\n if (props === undefined) {\n return ClipIntersectionStyle.defaults;\n }\n\n const color = props.color ? RgbColor.fromJSON(props.color) : RgbColor.fromColorDef(ColorDef.white);\n const width = props.width ? props.width : 1;\n return new ClipIntersectionStyle(color, width);\n }\n\n /** The JSON representation of this style. It is `undefined` if this style matches the defaults. */\n public toJSON(): ClipIntersectionStyleProps | undefined {\n const props: ClipIntersectionStyleProps = {};\n\n if (this.matchesDefaults) {\n return undefined;\n }\n\n if (this.color)\n props.color = this.color.toJSON();\n\n if (this.width)\n props.width = this.width;\n\n return props;\n }\n\n public get matchesDefaults(): boolean {\n if (this === ClipIntersectionStyle.defaults)\n return true;\n\n return !this.color && !this.width;\n }\n}\n\n/** Arguments supplied to [[ClipStyle.create]].\n * @public\n * @extensions\n */\nexport interface ClipStyleCreateArgs {\n /** If `true`, geometry will be produced at the clip planes in a 3d view.\n * - Solids (closed volumes) will produce facets on the clip planes.\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\n */\n produceCutGeometry?: boolean;\n /** If `true`, intersection of geometry and clip planes will be colorized */\n colorizeIntersection?: boolean;\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\n cutStyle?: CutStyle;\n /** If defined, geometry inside the clip planes will be drawn in this color. */\n insideColor?: RgbColor;\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\n outsideColor?: RgbColor;\n /** Controls the style of the intersection of geometry and clip planes */\n intersectionStyle?: ClipIntersectionStyle;\n}\n\n/** Wire format describing a [[ClipStyle]].\n * @see [[DisplayStyleSettingsProps.clipStyle]].\n * @public\n * @extensions\n */\nexport interface ClipStyleProps {\n /** If `true`, geometry will be produced at the clip planes in a 3d view.\n * - Solids (closed volumes) will produce facets on the clip planes.\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\n */\n produceCutGeometry?: boolean;\n /** If 'true', intersection of geometry and clip planes will be colorized */\n colorizeIntersection?: boolean;\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\n cutStyle?: CutStyleProps;\n /** If defined, geometry inside the clip planes will be drawn in this color. */\n insideColor?: RgbColorProps;\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\n outsideColor?: RgbColorProps;\n /** Controls the style of the intersection of geometry and clip planes */\n intersectionStyle?: ClipIntersectionStyleProps;\n}\n\n/** Describes symbology and behavior applied to a [ClipVector]($core-geometry) when applied to a [ViewState]($frontend) or [[ModelClipGroup]].\n * @see [[DisplayStyleSettings.clipStyle]].\n * @public\n */\nexport class ClipStyle {\n /** If `true`, geometry will be produced at the clip planes.\n * - Solids (closed volumes) will produce facets on the clip planes.\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\n */\n public readonly produceCutGeometry: boolean;\n /** If 'true', intersection of geometry and clip planes will be colorized */\n public readonly colorizeIntersection: boolean;\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\n public readonly cutStyle: CutStyle;\n /** If defined, geometry inside the clip planes will be drawn in this color. */\n public readonly insideColor?: RgbColor;\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\n public readonly outsideColor?: RgbColor;\n /** Controls the style of the intersection of geometry and clip planes */\n public readonly intersectionStyle?: ClipIntersectionStyle;\n\n /** The default style, which overrides none of the view's settings. */\n public static readonly defaults = new ClipStyle(false, false, CutStyle.defaults, undefined, undefined, undefined);\n\n private constructor(produceCutGeometry: boolean, colorizeIntersection: boolean, cutStyle: CutStyle, inside: RgbColor | undefined, outside: RgbColor | undefined, intersectionStyle: ClipIntersectionStyle | undefined) {\n this.produceCutGeometry = produceCutGeometry;\n this.colorizeIntersection = colorizeIntersection;\n this.cutStyle = cutStyle;\n this.insideColor = inside;\n this.outsideColor = outside;\n this.intersectionStyle = intersectionStyle;\n }\n\n /** @deprecated in 4.3.0 - will not be removed until after 2026-06-13. Use [[create(style: ClipStyleCreateArgs]] */\n public static create(produceCutGeometry: boolean, cutStyle: CutStyle, insideColor?: RgbColor, outsideColor?: RgbColor): ClipStyle;\n\n /** Create a style from its components. */\n public static create(style: ClipStyleCreateArgs): ClipStyle;\n\n /** @internal */\n public static create(styleOrProduceCutGeometry: ClipStyleCreateArgs | boolean, cutStyle?: CutStyle, insideColor?: RgbColor, outsideColor?: RgbColor): ClipStyle {\n\n if (typeof styleOrProduceCutGeometry === \"boolean\") {\n cutStyle = cutStyle === undefined ? CutStyle.defaults : cutStyle;\n\n if (!styleOrProduceCutGeometry && cutStyle.matchesDefaults && !insideColor && !outsideColor) {\n return this.defaults;\n }\n\n return new ClipStyle(styleOrProduceCutGeometry, false, cutStyle, insideColor, outsideColor, undefined);\n }\n\n const style = styleOrProduceCutGeometry;\n if (!style.produceCutGeometry && !style.colorizeIntersection && (!style.cutStyle || style.cutStyle.matchesDefaults) && !style.insideColor && !style.outsideColor && !style.intersectionStyle)\n return this.defaults;\n\n const produceCutGeometry = style.produceCutGeometry ? true : false;\n const colorizeIntersection = style.colorizeIntersection ? true : false;\n cutStyle = style.cutStyle === undefined ? CutStyle.defaults : style.cutStyle;\n\n return new ClipStyle(produceCutGeometry, colorizeIntersection, cutStyle, style.insideColor, style.outsideColor, style.intersectionStyle);\n }\n\n public static fromJSON(props?: ClipStyleProps): ClipStyle {\n if (JsonUtils.isNonEmptyObject(props)) {\n const produceCutGeometry = props.produceCutGeometry ?? false;\n const colorizeIntersection = props.colorizeIntersection ? true : false;\n const cutStyle = CutStyle.fromJSON(props.cutStyle);\n const insideColor = props.insideColor ? RgbColor.fromJSON(props.insideColor) : undefined;\n const outsideColor = props.outsideColor ? RgbColor.fromJSON(props.outsideColor) : undefined;\n const intersectionStyle = props.intersectionStyle ? ClipIntersectionStyle.fromJSON(props.intersectionStyle) : undefined;\n\n return this.create({ produceCutGeometry, colorizeIntersection, cutStyle, insideColor, outsideColor, intersectionStyle });\n }\n\n return this.defaults;\n }\n\n /** The JSON representation of this style. It is `undefined` if this style matches the defaults. */\n public toJSON(): ClipStyleProps | undefined {\n if (this.matchesDefaults)\n return undefined;\n\n const props: ClipStyleProps = {};\n if (this.produceCutGeometry)\n props.produceCutGeometry = true;\n\n if (this.colorizeIntersection)\n props.colorizeIntersection = true;\n\n const cutStyle = this.cutStyle.toJSON();\n if (cutStyle) {\n assert(!this.cutStyle.matchesDefaults);\n props.cutStyle = cutStyle;\n }\n\n if (this.insideColor)\n props.insideColor = this.insideColor.toJSON();\n\n if (this.outsideColor)\n props.outsideColor = this.outsideColor.toJSON();\n\n if (this.intersectionStyle)\n props.intersectionStyle = this.intersectionStyle.toJSON();\n\n return props;\n }\n\n /** Returns true if this style matches the [[ClipStyle.defaults]] - that is, it overrides no settings from the view. */\n public get matchesDefaults(): boolean {\n if (this === ClipStyle.defaults)\n return true;\n\n return !this.produceCutGeometry && !this.colorizeIntersection && !this.insideColor && !this.outsideColor && this.cutStyle.matchesDefaults && !this.intersectionStyle;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityProps.d.ts","sourceRoot":"","sources":["../../src/EntityProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAQ,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAIvD;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,KAAK,CAAC;IACpC,mIAAmI;IACnI,aAAa,EAAE,MAAM,CAAC;IACtB,+FAA+F;IAC/F,EAAE,CAAC,EAAE,UAA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Q,EAAE,MAAM,GAAG,gBAAgB,CAAA;KAAE,CAAC;gBAGlD,OAAO,EAAE,mBAAmB;CAehD"}
|
package/lib/cjs/EntityProps.js
CHANGED
|
@@ -32,6 +32,7 @@ var PrimitiveTypeCode;
|
|
|
32
32
|
* @beta
|
|
33
33
|
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use the `Property` class from @itwin/ecschema-metadata` instead.
|
|
34
34
|
*/
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
35
36
|
class PropertyMetaData {
|
|
36
37
|
primitiveType;
|
|
37
38
|
structName;
|
|
@@ -118,6 +119,7 @@ exports.PropertyMetaData = PropertyMetaData;
|
|
|
118
119
|
* @beta
|
|
119
120
|
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `EntityClass` class from `@itwin/ecschema-metadata` instead.
|
|
120
121
|
*/
|
|
122
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
121
123
|
class EntityMetaData {
|
|
122
124
|
/** The Id of the class in the [[IModelDb]] from which the metadata was obtained. */
|
|
123
125
|
classId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityProps.js","sourceRoot":"","sources":["../../src/EntityProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AACvD,wDAAwD;AACxD,iDAAgD;AA6DhD;;GAEG;AACH,IAAY,iBAYX;AAZD,WAAY,iBAAiB;IAC3B,2EAAoB,CAAA;IACpB,+DAAc,CAAA;IACd,iEAAe,CAAA;IACf,mEAAgB,CAAA;IAChB,gEAAc,CAAA;IACd,kEAAe,CAAA;IACf,4DAAY,CAAA;IACZ,kEAAe,CAAA;IACf,kEAAe,CAAA;IACf,gEAAc,CAAA;IACd,sEAAiB,CAAA;AACnB,CAAC,EAZW,iBAAiB,iCAAjB,iBAAiB,QAY5B;AA4DD;;;GAGG;AACH,MAAa,gBAAgB;IACpB,aAAa,CAAqB;IAClC,U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,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;QACjD,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QAErB,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,mCAAmC;YAC9E,4DAA4D;YAC5D,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,IAAI,gBAAgB,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;QACjF,CAAC;IACH,CAAC;CACF;AAjCD,wCAiCC","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 { Id64, Id64String } from \"@itwin/core-bentley\";\nimport { Point2d, Point3d } from \"@itwin/core-geometry\";\nimport { RelatedElement } from \"./ElementProps\";\n\n/** The persistent format of an [Entity]($backend), also used as the \"wire format\" when transmitting information about entities\n * between the backend and frontend.\n * EntityProps and all of its sub-types like [[ElementProps]] are \"plain old Javascript objects\" - that is, objects containing\n * no methods and no properties of `class` type.\n * @public @preview\n * @extensions\n */\nexport interface EntityProps {\n /** A non-existent property used to discriminate between [[EntityProps]] and [Entity]($backend).\n * @see [Entity.isInstanceOfEntity]($backend).\n */\n readonly isInstanceOfEntity?: never;\n /** The full name of the [ECClass]($docs/bis/guide/references/glossary/#ecclass) for this entity, in the form \"Schema:ClassName\" */\n classFullName: string;\n /** The Id of the entity. Must be present for SELECT, UPDATE, or DELETE, ignored for INSERT. */\n id?: Id64String;\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this Entity. */\n jsonProperties?: { [key: string]: any };\n}\n\n/** Specifies the source and target elements of a [[Relationship]] instance.\n * @public @preview\n * @extensions\n */\nexport interface SourceAndTarget {\n sourceId: Id64String;\n targetId: Id64String;\n}\n\n/** Properties that are common to all types of link table ECRelationships\n * @public @preview\n * @extensions\n */\nexport interface RelationshipProps extends EntityProps, SourceAndTarget {\n}\n\n/** Parameters for performing a query on [Entity]($backend) classes.\n * @public @preview\n * @extensions\n */\nexport interface EntityQueryParams {\n /** The sql className, in the form \"Schema.ClassName\", of the class to search. */\n from?: string;\n /** Set to true to limit results to *not* include sub-classes of \"from\" class */\n only?: boolean;\n /** Optional \"WHERE\" clause to filter entities. Note: do *not* include the \"WHERE\" keyword. */\n where?: string;\n /** Optional \"ORDERBY\" clause to sort results. Note: do *not* include the \"ORDERBY\" keyword. */\n orderBy?: string;\n /** Optional \"LIMIT\" clause to limit the number of rows returned. */\n limit?: number;\n /** Optional \"OFFSET\" clause. Only valid if Limit is also present. */\n offset?: number;\n /** Bindings for parameterized values.\n * @see [[ECSqlStatement.bindValues]]\n */\n bindings?: any[] | object;\n}\n\n/** The primitive types of an Entity property.\n * @beta\n */\nexport enum PrimitiveTypeCode {\n Uninitialized = 0x00,\n Binary = 0x101,\n Boolean = 0x201,\n DateTime = 0x301,\n Double = 0x401,\n Integer = 0x501,\n Long = 0x601,\n Point2d = 0x701, // eslint-disable-line @typescript-eslint/no-shadow\n Point3d = 0x801, // eslint-disable-line @typescript-eslint/no-shadow\n String = 0x901,\n IGeometry = 0xa01, // Used for Bentley.Geometry.Common.IGeometry types\n}\n\n/** A callback function to process properties of an Entity\n * @beta\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `PropertyHandler` from `@itwin/ecschema-metadata` instead.\n *\n * @example\n * ```typescript\n * // Current usage:\n * const callback: PropertyCallback = (name: string, propMetaData: PropertyMetaData) => {\n * console.log(`Property name: ${name}, Property type: ${propMetaData.primitiveType}`);\n * };\n *\n * // Replacement:\n * const callback: PropertyHandler = (propName: string, property: Property) => {\n * console.log(`Property name: ${propName}, Property type: ${property.propertyType}`);\n * };\n * ```\n */\nexport type PropertyCallback = (name: string, meta: PropertyMetaData) => void;\n\n/** A custom attribute instance\n * @beta\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `CustomAttribute` interface from `@itwin/ecschema-metadata` instead.\n */\nexport interface CustomAttribute {\n /** The class of the CustomAttribute */\n ecclass: string;\n /** An object whose properties correspond by name to the properties of this custom attribute instance. */\n properties: { [propName: string]: any };\n}\n\ntype FactoryFunc = (jsonObj: any) => any;\n\n/**\n * @beta\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `@itwin/ecschema-metadata` instead.\n */\nexport interface PropertyMetaDataProps {\n primitiveType?: number;\n structName?: string;\n extendedType?: string;\n description?: string;\n displayLabel?: string;\n minimumValue?: any;\n maximumValue?: any;\n minimumLength?: number;\n maximumLength?: number;\n readOnly?: boolean;\n kindOfQuantity?: string;\n isCustomHandled?: boolean;\n isCustomHandledOrphan?: boolean;\n minOccurs?: number;\n maxOccurs?: number;\n direction?: string;\n relationshipClass?: string;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n customAttributes?: CustomAttribute[];\n}\n\n/** Metadata for a property.\n * @beta\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use the `Property` class from @itwin/ecschema-metadata` instead.\n */\nexport class PropertyMetaData implements PropertyMetaDataProps {\n public primitiveType?: PrimitiveTypeCode;\n public structName?: string;\n public extendedType?: string;\n public description?: string;\n public displayLabel?: string;\n public minimumValue?: any;\n public maximumValue?: any;\n public minimumLength?: number;\n public maximumLength?: number;\n public readOnly?: boolean;\n public kindOfQuantity?: string;\n public isCustomHandled?: boolean;\n public isCustomHandledOrphan?: boolean;\n public minOccurs?: number;\n public maxOccurs?: number;\n public direction?: string;\n public relationshipClass?: string;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public customAttributes?: CustomAttribute[];\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public constructor(jsonObj: PropertyMetaDataProps) {\n this.primitiveType = jsonObj.primitiveType;\n if (jsonObj.structName)\n this.structName = jsonObj.structName;\n this.extendedType = jsonObj.extendedType;\n this.description = jsonObj.description;\n this.displayLabel = jsonObj.displayLabel;\n if (undefined !== jsonObj.minimumValue)\n this.minimumValue = jsonObj.minimumValue;\n if (undefined !== jsonObj.maximumValue)\n this.maximumValue = jsonObj.maximumValue;\n if (undefined !== jsonObj.minimumLength)\n this.minimumLength = jsonObj.minimumLength;\n if (undefined !== jsonObj.maximumLength)\n this.maximumLength = jsonObj.maximumLength;\n this.readOnly = jsonObj.readOnly;\n this.kindOfQuantity = jsonObj.kindOfQuantity;\n this.isCustomHandled = jsonObj.isCustomHandled;\n if (undefined !== jsonObj.minOccurs)\n this.minOccurs = jsonObj.minOccurs;\n if (undefined !== jsonObj.maxOccurs)\n this.maxOccurs = jsonObj.maxOccurs;\n this.direction = jsonObj.direction;\n this.relationshipClass = jsonObj.relationshipClass;\n this.customAttributes = jsonObj.customAttributes;\n }\n\n /** Create a typed value, or array of values, from a factory and an input object */\n private createValueOrArray(func: FactoryFunc, jsonObj: any) {\n if (undefined === this.minOccurs)\n return func(jsonObj); // not an array\n\n const val: any = [];\n jsonObj.forEach((element: any) => val.push(func(element)));\n return val;\n }\n\n /** construct a single property from an input object according to this metadata */\n public createProperty(jsonObj: any): any {\n if (jsonObj === undefined)\n return undefined;\n\n if (undefined !== this.primitiveType) {\n switch (this.primitiveType) {\n case PrimitiveTypeCode.Boolean:\n case PrimitiveTypeCode.Double:\n case PrimitiveTypeCode.Integer:\n case PrimitiveTypeCode.String:\n return jsonObj; // this works even for arrays or strings that are JSON because the parsed JSON is already the right type\n\n case PrimitiveTypeCode.Point2d:\n return this.createValueOrArray((obj) => Point2d.fromJSON(obj), jsonObj);\n\n case PrimitiveTypeCode.Point3d:\n return this.createValueOrArray((obj) => Point3d.fromJSON(obj), jsonObj);\n }\n }\n if (this.isNavigation)\n return jsonObj.id !== undefined ? new RelatedElement(jsonObj) : Id64.fromJSON(jsonObj);\n\n return jsonObj;\n }\n\n /** Return `true` if this property is a NavigationProperty. */\n public get isNavigation(): boolean {\n return (this.direction !== undefined); // the presence of `direction` means it is a navigation property\n }\n}\n\n/**\n * @beta\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `@itwin/ecschema-metadata` instead.\n */\nexport interface EntityMetaDataProps {\n classId: Id64String;\n ecclass: string;\n description?: string;\n modifier?: string;\n displayLabel?: string;\n /** The base classes from which this class derives. If more than one, the first is the super class and the others are [mixins]($docs/bis/ec/ec-mixin-class). */\n baseClasses: string[];\n /** The Custom Attributes for this class */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n customAttributes?: CustomAttribute[];\n /** An object whose properties correspond by name to the properties of this class. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n properties: { [propName: string]: PropertyMetaData };\n}\n\n/** Metadata for an Entity.\n * @beta\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `EntityClass` class from `@itwin/ecschema-metadata` instead.\n */\nexport class EntityMetaData implements EntityMetaDataProps {\n /** The Id of the class in the [[IModelDb]] from which the metadata was obtained. */\n public readonly classId: Id64String;\n /** The Entity name */\n public readonly ecclass: string;\n public readonly description?: string;\n public readonly modifier?: string;\n public readonly displayLabel?: string;\n /** The base class that this class is derives from. If more than one, the first is the actual base class and the others are mixins. */\n public readonly baseClasses: string[];\n /** The Custom Attributes for this class */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public readonly customAttributes?: CustomAttribute[];\n /** An object whose properties correspond by name to the properties of this class. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public readonly properties: { [propName: string]: PropertyMetaData };\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public constructor(jsonObj: EntityMetaDataProps) {\n this.classId = jsonObj.classId;\n this.ecclass = jsonObj.ecclass;\n this.description = jsonObj.description;\n this.modifier = jsonObj.modifier;\n this.displayLabel = jsonObj.displayLabel;\n this.baseClasses = jsonObj.baseClasses;\n this.customAttributes = jsonObj.customAttributes;\n this.properties = {};\n\n for (const propName in jsonObj.properties) { // eslint-disable-line guard-for-in\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this.properties[propName] = new PropertyMetaData(jsonObj.properties[propName]);\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"EntityProps.js","sourceRoot":"","sources":["../../src/EntityProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AACvD,wDAAwD;AACxD,iDAAgD;AA6DhD;;GAEG;AACH,IAAY,iBAYX;AAZD,WAAY,iBAAiB;IAC3B,2EAAoB,CAAA;IACpB,+DAAc,CAAA;IACd,iEAAe,CAAA;IACf,mEAAgB,CAAA;IAChB,gEAAc,CAAA;IACd,kEAAe,CAAA;IACf,4DAAY,CAAA;IACZ,kEAAe,CAAA;IACf,kEAAe,CAAA;IACf,gEAAc,CAAA;IACd,sEAAiB,CAAA;AACnB,CAAC,EAZW,iBAAiB,iCAAjB,iBAAiB,QAY5B;AA4DD;;;GAGG;AACH,4DAA4D;AAC5D,MAAa,gBAAgB;IACpB,aAAa,CAAqB;IAClC,UAAU,CAAU;IACpB,YAAY,CAAU;IACtB,WAAW,CAAU;IACrB,YAAY,CAAU;IACtB,YAAY,CAAO;IACnB,YAAY,CAAO;IACnB,aAAa,CAAU;IACvB,aAAa,CAAU;IACvB,QAAQ,CAAW;IACnB,cAAc,CAAU;IACxB,eAAe,CAAW;IAC1B,qBAAqB,CAAW;IAChC,SAAS,CAAU;IACnB,SAAS,CAAU;IACnB,SAAS,CAAU;IACnB,iBAAiB,CAAU;IAClC,4DAA4D;IACrD,gBAAgB,CAAqB;IAE5C,4DAA4D;IAC5D,YAAmB,OAA8B;QAC/C,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;QAC3C,IAAI,OAAO,CAAC,UAAU;YACpB,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACvC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC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H,4DAA4D;AAC5D,MAAa,cAAc;IACzB,oFAAoF;IACpE,OAAO,CAAa;IACpC,sBAAsB;IACN,OAAO,CAAS;IAChB,WAAW,CAAU;IACrB,QAAQ,CAAU;IAClB,YAAY,CAAU;IACtC,uIAAuI;IACvH,WAAW,CAAW;IACtC,2CAA2C;IAC3C,4DAA4D;IAC5C,gBAAgB,CAAqB;IACrD,qFAAqF;IACrF,4DAA4D;IAC5C,UAAU,CAA2C;IAErE,4DAA4D;IAC5D,YAAmB,OAA4B;QAC7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;QACjD,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QAErB,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,mCAAmC;YAC9E,4DAA4D;YAC5D,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,IAAI,gBAAgB,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;QACjF,CAAC;IACH,CAAC;CACF;AAjCD,wCAiCC","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 { Id64, Id64String } from \"@itwin/core-bentley\";\nimport { Point2d, Point3d } from \"@itwin/core-geometry\";\nimport { RelatedElement } from \"./ElementProps\";\n\n/** The persistent format of an [Entity]($backend), also used as the \"wire format\" when transmitting information about entities\n * between the backend and frontend.\n * EntityProps and all of its sub-types like [[ElementProps]] are \"plain old Javascript objects\" - that is, objects containing\n * no methods and no properties of `class` type.\n * @public @preview\n * @extensions\n */\nexport interface EntityProps {\n /** A non-existent property used to discriminate between [[EntityProps]] and [Entity]($backend).\n * @see [Entity.isInstanceOfEntity]($backend).\n */\n readonly isInstanceOfEntity?: never;\n /** The full name of the [ECClass]($docs/bis/guide/references/glossary/#ecclass) for this entity, in the form \"Schema:ClassName\" */\n classFullName: string;\n /** The Id of the entity. Must be present for SELECT, UPDATE, or DELETE, ignored for INSERT. */\n id?: Id64String;\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this Entity. */\n jsonProperties?: { [key: string]: any };\n}\n\n/** Specifies the source and target elements of a [[Relationship]] instance.\n * @public @preview\n * @extensions\n */\nexport interface SourceAndTarget {\n sourceId: Id64String;\n targetId: Id64String;\n}\n\n/** Properties that are common to all types of link table ECRelationships\n * @public @preview\n * @extensions\n */\nexport interface RelationshipProps extends EntityProps, SourceAndTarget {\n}\n\n/** Parameters for performing a query on [Entity]($backend) classes.\n * @public @preview\n * @extensions\n */\nexport interface EntityQueryParams {\n /** The sql className, in the form \"Schema.ClassName\", of the class to search. */\n from?: string;\n /** Set to true to limit results to *not* include sub-classes of \"from\" class */\n only?: boolean;\n /** Optional \"WHERE\" clause to filter entities. Note: do *not* include the \"WHERE\" keyword. */\n where?: string;\n /** Optional \"ORDERBY\" clause to sort results. Note: do *not* include the \"ORDERBY\" keyword. */\n orderBy?: string;\n /** Optional \"LIMIT\" clause to limit the number of rows returned. */\n limit?: number;\n /** Optional \"OFFSET\" clause. Only valid if Limit is also present. */\n offset?: number;\n /** Bindings for parameterized values.\n * @see [[ECSqlStatement.bindValues]]\n */\n bindings?: any[] | object;\n}\n\n/** The primitive types of an Entity property.\n * @beta\n */\nexport enum PrimitiveTypeCode {\n Uninitialized = 0x00,\n Binary = 0x101,\n Boolean = 0x201,\n DateTime = 0x301,\n Double = 0x401,\n Integer = 0x501,\n Long = 0x601,\n Point2d = 0x701, // eslint-disable-line @typescript-eslint/no-shadow\n Point3d = 0x801, // eslint-disable-line @typescript-eslint/no-shadow\n String = 0x901,\n IGeometry = 0xa01, // Used for Bentley.Geometry.Common.IGeometry types\n}\n\n/** A callback function to process properties of an Entity\n * @beta\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `PropertyHandler` from `@itwin/ecschema-metadata` instead.\n *\n * @example\n * ```typescript\n * // Current usage:\n * const callback: PropertyCallback = (name: string, propMetaData: PropertyMetaData) => {\n * console.log(`Property name: ${name}, Property type: ${propMetaData.primitiveType}`);\n * };\n *\n * // Replacement:\n * const callback: PropertyHandler = (propName: string, property: Property) => {\n * console.log(`Property name: ${propName}, Property type: ${property.propertyType}`);\n * };\n * ```\n */\nexport type PropertyCallback = (name: string, meta: PropertyMetaData) => void;\n\n/** A custom attribute instance\n * @beta\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `CustomAttribute` interface from `@itwin/ecschema-metadata` instead.\n */\nexport interface CustomAttribute {\n /** The class of the CustomAttribute */\n ecclass: string;\n /** An object whose properties correspond by name to the properties of this custom attribute instance. */\n properties: { [propName: string]: any };\n}\n\ntype FactoryFunc = (jsonObj: any) => any;\n\n/**\n * @beta\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `@itwin/ecschema-metadata` instead.\n */\nexport interface PropertyMetaDataProps {\n primitiveType?: number;\n structName?: string;\n extendedType?: string;\n description?: string;\n displayLabel?: string;\n minimumValue?: any;\n maximumValue?: any;\n minimumLength?: number;\n maximumLength?: number;\n readOnly?: boolean;\n kindOfQuantity?: string;\n isCustomHandled?: boolean;\n isCustomHandledOrphan?: boolean;\n minOccurs?: number;\n maxOccurs?: number;\n direction?: string;\n relationshipClass?: string;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n customAttributes?: CustomAttribute[];\n}\n\n/** Metadata for a property.\n * @beta\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use the `Property` class from @itwin/ecschema-metadata` instead.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport class PropertyMetaData implements PropertyMetaDataProps {\n public primitiveType?: PrimitiveTypeCode;\n public structName?: string;\n public extendedType?: string;\n public description?: string;\n public displayLabel?: string;\n public minimumValue?: any;\n public maximumValue?: any;\n public minimumLength?: number;\n public maximumLength?: number;\n public readOnly?: boolean;\n public kindOfQuantity?: string;\n public isCustomHandled?: boolean;\n public isCustomHandledOrphan?: boolean;\n public minOccurs?: number;\n public maxOccurs?: number;\n public direction?: string;\n public relationshipClass?: string;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public customAttributes?: CustomAttribute[];\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public constructor(jsonObj: PropertyMetaDataProps) {\n this.primitiveType = jsonObj.primitiveType;\n if (jsonObj.structName)\n this.structName = jsonObj.structName;\n this.extendedType = jsonObj.extendedType;\n this.description = jsonObj.description;\n this.displayLabel = jsonObj.displayLabel;\n if (undefined !== jsonObj.minimumValue)\n this.minimumValue = jsonObj.minimumValue;\n if (undefined !== jsonObj.maximumValue)\n this.maximumValue = jsonObj.maximumValue;\n if (undefined !== jsonObj.minimumLength)\n this.minimumLength = jsonObj.minimumLength;\n if (undefined !== jsonObj.maximumLength)\n this.maximumLength = jsonObj.maximumLength;\n this.readOnly = jsonObj.readOnly;\n this.kindOfQuantity = jsonObj.kindOfQuantity;\n this.isCustomHandled = jsonObj.isCustomHandled;\n if (undefined !== jsonObj.minOccurs)\n this.minOccurs = jsonObj.minOccurs;\n if (undefined !== jsonObj.maxOccurs)\n this.maxOccurs = jsonObj.maxOccurs;\n this.direction = jsonObj.direction;\n this.relationshipClass = jsonObj.relationshipClass;\n this.customAttributes = jsonObj.customAttributes;\n }\n\n /** Create a typed value, or array of values, from a factory and an input object */\n private createValueOrArray(func: FactoryFunc, jsonObj: any) {\n if (undefined === this.minOccurs)\n return func(jsonObj); // not an array\n\n const val: any = [];\n jsonObj.forEach((element: any) => val.push(func(element)));\n return val;\n }\n\n /** construct a single property from an input object according to this metadata */\n public createProperty(jsonObj: any): any {\n if (jsonObj === undefined)\n return undefined;\n\n if (undefined !== this.primitiveType) {\n switch (this.primitiveType) {\n case PrimitiveTypeCode.Boolean:\n case PrimitiveTypeCode.Double:\n case PrimitiveTypeCode.Integer:\n case PrimitiveTypeCode.String:\n return jsonObj; // this works even for arrays or strings that are JSON because the parsed JSON is already the right type\n\n case PrimitiveTypeCode.Point2d:\n return this.createValueOrArray((obj) => Point2d.fromJSON(obj), jsonObj);\n\n case PrimitiveTypeCode.Point3d:\n return this.createValueOrArray((obj) => Point3d.fromJSON(obj), jsonObj);\n }\n }\n if (this.isNavigation)\n return jsonObj.id !== undefined ? new RelatedElement(jsonObj) : Id64.fromJSON(jsonObj);\n\n return jsonObj;\n }\n\n /** Return `true` if this property is a NavigationProperty. */\n public get isNavigation(): boolean {\n return (this.direction !== undefined); // the presence of `direction` means it is a navigation property\n }\n}\n\n/**\n * @beta\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `@itwin/ecschema-metadata` instead.\n */\nexport interface EntityMetaDataProps {\n classId: Id64String;\n ecclass: string;\n description?: string;\n modifier?: string;\n displayLabel?: string;\n /** The base classes from which this class derives. If more than one, the first is the super class and the others are [mixins]($docs/bis/ec/ec-mixin-class). */\n baseClasses: string[];\n /** The Custom Attributes for this class */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n customAttributes?: CustomAttribute[];\n /** An object whose properties correspond by name to the properties of this class. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n properties: { [propName: string]: PropertyMetaData };\n}\n\n/** Metadata for an Entity.\n * @beta\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `EntityClass` class from `@itwin/ecschema-metadata` instead.\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport class EntityMetaData implements EntityMetaDataProps {\n /** The Id of the class in the [[IModelDb]] from which the metadata was obtained. */\n public readonly classId: Id64String;\n /** The Entity name */\n public readonly ecclass: string;\n public readonly description?: string;\n public readonly modifier?: string;\n public readonly displayLabel?: string;\n /** The base class that this class is derives from. If more than one, the first is the actual base class and the others are mixins. */\n public readonly baseClasses: string[];\n /** The Custom Attributes for this class */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public readonly customAttributes?: CustomAttribute[];\n /** An object whose properties correspond by name to the properties of this class. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public readonly properties: { [propName: string]: PropertyMetaData };\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public constructor(jsonObj: EntityMetaDataProps) {\n this.classId = jsonObj.classId;\n this.ecclass = jsonObj.ecclass;\n this.description = jsonObj.description;\n this.modifier = jsonObj.modifier;\n this.displayLabel = jsonObj.displayLabel;\n this.baseClasses = jsonObj.baseClasses;\n this.customAttributes = jsonObj.customAttributes;\n this.properties = {};\n\n for (const propName in jsonObj.properties) { // eslint-disable-line guard-for-in\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this.properties[propName] = new PropertyMetaData(jsonObj.properties[propName]);\n }\n }\n}\n"]}
|
|
@@ -73,7 +73,7 @@ export declare class TerrainSettings {
|
|
|
73
73
|
* @internal
|
|
74
74
|
*/
|
|
75
75
|
get nonLocatable(): true | undefined;
|
|
76
|
-
/** @deprecated in 4.5.
|
|
76
|
+
/** @deprecated in 4.5.0 - will not be removed until after 2026-06-13. Use the overload that takes [[TerrainProps]]. */
|
|
77
77
|
constructor(providerName?: string, exaggeration?: number, applyLighting?: boolean, heightOrigin?: number, heightOriginMode?: TerrainHeightOriginMode);
|
|
78
78
|
constructor(props?: TerrainProps);
|
|
79
79
|
static fromJSON(json?: TerrainProps): TerrainSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TerrainSettings.js","sourceRoot":"","sources":["../../src/TerrainSettings.ts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AgB,EAAE,YAAY,CAAC,gBAAgB,IAAI,IAAI,CAAC,gBAAgB;SACzE,CAAC;QAEF,OAAO,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;CACF;AA/HD,0CA+HC","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 DisplayStyles\n */\n\nimport { BackgroundMapProps } from \"./BackgroundMapSettings\";\nimport { CesiumTerrainAssetId } from \"./CesiumIonAssets\";\n\n\n/** JSON representation of the settings of the terrain applied to background map display by a [[DisplayStyle]].\n * @see [[DisplayStyleSettingsProps]]\n * @see [[BackgroundMapProps]]\n * @public\n * @extensions\n */\nexport interface TerrainProps {\n /** Identifies the [TerrainProvider]($frontend) that will supply terrain meshes.\n * If omitted, it defaults to \"CesiumWorldTerrain\".\n */\n providerName?: string;\n /** Identifies the specific terrain data source to be supplied by the [TerrainProvider]($frontend) identified by [[providerName]],\n * for those providers that support multiple data sources.\n * For example, the \"CesiumWorldTerrain\" provider uses this field to store a [[CesiumTerrainAssetId]].\n * Default value: an empty string.\n */\n dataSource?: string;\n /** A value greater than one will cause terrain height to be exaggerated/scaled.false (or 1.0) indicate no exaggeration. Default value: 1.0 */\n exaggeration?: number;\n /** Applying lighting can help to visualize subtle terrain variation. Default value: true */\n applyLighting?: boolean;\n /** Origin value - height of the IModel origin at the project center as defined by heightOriginMode. Default value: 0.0 */\n heightOrigin?: number;\n /** Determines how/if the heightOrigin is applied to the terrain height. Default value: Geodetic */\n heightOriginMode?: TerrainHeightOriginMode;\n /** If true, the terrain will not be locatable. Otherwise, [[BackgroundMapProps.nonLocatable]] will determine whether terrain is locatable.\n * @internal use [[BackgroundMapProps.nonLocatable]]. Retained for backwards compatibility only.\n */\n nonLocatable?: boolean;\n}\n\n/** Correction modes for terrain height\n * @see [[TerrainProps]]\n * @public\n * @extensions\n */\nexport enum TerrainHeightOriginMode {\n /** Height value indicates the geodetic height of the IModel origin (also referred to as ellipsoidal or GPS height) */\n Geodetic = 0,\n /** Height value indicates the geoidal height of the IModel origin (commonly referred to as sea level). */\n Geoid = 1,\n /** Height value indicates the height of the IModel origin relative to ground level at project center. */\n Ground = 2,\n}\n\n/** Normalized version of [[TerrainProps]] for which provider has been validated and default values of all members are used.\n * @public\n */\nexport class TerrainSettings {\n private _nonLocatable: true | undefined;\n /** Identifies the [TerrainProvider]($frontend) that will supply terrain meshes.\n * Defaults to \"CesiumWorldTerrain\".\n */\n public readonly providerName: string;\n /** Identifies the specific terrain data source to be supplied by the [TerrainProvider]($frontend) identified by [[providerName]],\n * for those providers that support multiple data sources.\n * For example, the \"CesiumWorldTerrain\" provider uses this field to store a [[CesiumTerrainAssetId]].\n * Default value: an empty string.\n */\n public readonly dataSource: string;\n /** A value greater than one will cause terrain height to be exaggerated/scaled. 1.0 indicates no exaggeration. Default value: 1.0 */\n public readonly exaggeration: number;\n /** Applying lighting can help to visualize subtle terrain variations. Default value: false */\n public readonly applyLighting: boolean;\n /** Origin value - height of the IModel origin at the project center as defined by heightOriginMode. Default value 0.0 */\n public readonly heightOrigin: number;\n /** Determines how/if the heightOrigin is applied to the terrain height. Default value: Geodetic */\n public readonly heightOriginMode: TerrainHeightOriginMode;\n /** Optionally overrides [[BackgroundMapSettings.locatable]]. For backwards compatibility only.\n * @see [[TerrainProps.nonLocatable]].\n * @internal\n */\n public get nonLocatable(): true | undefined {\n return this._nonLocatable;\n }\n\n /** @deprecated in 4.5.x - will not be removed until after 2026-06-13. Use the overload that takes [[TerrainProps]]. */\n constructor(providerName?: string, exaggeration?: number, applyLighting?: boolean, heightOrigin?: number, heightOriginMode?: TerrainHeightOriginMode);\n\n constructor(props?: TerrainProps);\n\n /** @internal */\n constructor(providerNameOrProps: string | TerrainProps | undefined, exaggeration?: number, applyLighting?: boolean, heightOrigin?: number, heightOriginMode?: TerrainHeightOriginMode) {\n let providerName;\n let dataSource;\n let nonLocatable;\n if (typeof providerNameOrProps === \"string\") {\n providerName = providerNameOrProps;\n } else if (providerNameOrProps) {\n ({ providerName, dataSource, exaggeration, applyLighting, heightOrigin, heightOriginMode, nonLocatable } = providerNameOrProps);\n }\n\n this.providerName = providerName ?? \"CesiumWorldTerrain\";\n this.dataSource = dataSource ?? \"\";\n this.exaggeration = Math.min(100, Math.max(0.1, exaggeration ?? 1.0));\n this.applyLighting = applyLighting ?? false;\n this.heightOrigin = heightOrigin ?? 0.0;\n\n if (true === nonLocatable)\n this._nonLocatable = true;\n\n switch (heightOriginMode) {\n case TerrainHeightOriginMode.Ground:\n case TerrainHeightOriginMode.Geoid:\n this.heightOriginMode = heightOriginMode;\n break;\n default:\n this.heightOriginMode = TerrainHeightOriginMode.Geodetic;\n break;\n }\n }\n\n public static fromJSON(json?: TerrainProps) {\n return new TerrainSettings(json);\n }\n\n /** Create settings that obtain terrain from a [Cesium ION asset](https://cesium.com/platform/cesium-ion/content/) such as\n * one of those defined by [[CesiumTerrainAssetId]].\n * @note You must ensure your Cesium ION account has access to the specified asset.\n */\n public static fromCesiumIonAsset(assetId: string = CesiumTerrainAssetId.Default, options?: Omit<TerrainProps, \"providerName\" | \"dataSource\">): TerrainSettings {\n return TerrainSettings.fromJSON({\n ...options,\n dataSource: assetId,\n });\n }\n\n public toJSON(): TerrainProps {\n const props: TerrainProps = { heightOriginMode: this.heightOriginMode };\n if (\"CesiumWorldTerrain\" !== this.providerName)\n props.providerName = this.providerName;\n if (this.dataSource)\n props.dataSource = this.dataSource;\n if (1 !== this.exaggeration)\n props.exaggeration = this.exaggeration;\n if (this.nonLocatable)\n props.nonLocatable = true;\n if (this.applyLighting)\n props.applyLighting = true;\n if (0 !== this.heightOrigin)\n props.heightOrigin = this.heightOrigin;\n\n return props;\n }\n\n public equals(other: TerrainSettings): boolean {\n return this.providerName === other.providerName && this.dataSource === other.dataSource && this.exaggeration === other.exaggeration && this.applyLighting === other.applyLighting\n && this.heightOrigin === other.heightOrigin && this.heightOriginMode === other.heightOriginMode && this.nonLocatable === other.nonLocatable;\n }\n\n /** Returns true if these settings are equivalent to the supplied JSON settings. */\n public equalsJSON(json?: BackgroundMapProps): boolean {\n return this.equals(TerrainSettings.fromJSON(json));\n }\n\n /** Create a copy of this TerrainSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A TerrainSettings with all of its properties set to match those of`this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps?: TerrainProps): TerrainSettings {\n if (undefined === changedProps)\n return this;\n\n const props = {\n providerName: changedProps.providerName ?? this.providerName,\n dataSource: changedProps.dataSource ?? this.dataSource,\n exaggeration: changedProps.exaggeration ?? this.exaggeration,\n nonLocatable: changedProps.nonLocatable ?? this.nonLocatable,\n applyLighting: changedProps.applyLighting ?? this.applyLighting,\n heightOrigin: changedProps.heightOrigin ?? this.heightOrigin,\n heightOriginMode: changedProps.heightOriginMode ?? this.heightOriginMode,\n };\n\n return TerrainSettings.fromJSON(props);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TerrainSettings.js","sourceRoot":"","sources":["../../src/TerrainSettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,uDAAyD;AAkCzD;;;;GAIG;AACH,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,sHAAsH;IACtH,6EAAY,CAAA;IACZ,0GAA0G;IAC1G,uEAAS,CAAA;IACT,yGAAyG;IACzG,yEAAU,CAAA;AACZ,CAAC,EAPW,uBAAuB,uCAAvB,uBAAuB,QAOlC;AAED;;GAEG;AACH,MAAa,eAAe;IAClB,aAAa,CAAmB;IACxC;;OAEG;IACa,YAAY,CAAS;IACrC;;;;OAIG;IACa,UAAU,CAAS;IACnC,qIAAqI;IACrH,YAAY,CAAS;IACrC,+FAA+F;IAC/E,aAAa,CAAU;IACvC,yHAAyH;IACzG,YAAY,CAAS;IACrC,mGAAmG;IACnF,g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AgB,KAAK,KAAK,CAAC,gBAAgB,IAAI,IAAI,CAAC,YAAY,KAAK,KAAK,CAAC,YAAY,CAAC;IAChJ,CAAC;IAED,mFAAmF;IAC5E,UAAU,CAAC,IAAyB;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IACrD,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,YAA2B;QACtC,IAAI,SAAS,KAAK,YAAY;YAC5B,OAAO,IAAI,CAAC;QAEd,MAAM,KAAK,GAAG;YACZ,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,UAAU,EAAE,YAAY,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU;YACtD,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,aAAa,EAAE,YAAY,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa;YAC/D,YAAY,EAAE,YAAY,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAC5D,gBAAgB,EAAE,YAAY,CAAC,gBAAgB,IAAI,IAAI,CAAC,gBAAgB;SACzE,CAAC;QAEF,OAAO,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;CACF;AA/HD,0CA+HC","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 DisplayStyles\n */\n\nimport { BackgroundMapProps } from \"./BackgroundMapSettings\";\nimport { CesiumTerrainAssetId } from \"./CesiumIonAssets\";\n\n\n/** JSON representation of the settings of the terrain applied to background map display by a [[DisplayStyle]].\n * @see [[DisplayStyleSettingsProps]]\n * @see [[BackgroundMapProps]]\n * @public\n * @extensions\n */\nexport interface TerrainProps {\n /** Identifies the [TerrainProvider]($frontend) that will supply terrain meshes.\n * If omitted, it defaults to \"CesiumWorldTerrain\".\n */\n providerName?: string;\n /** Identifies the specific terrain data source to be supplied by the [TerrainProvider]($frontend) identified by [[providerName]],\n * for those providers that support multiple data sources.\n * For example, the \"CesiumWorldTerrain\" provider uses this field to store a [[CesiumTerrainAssetId]].\n * Default value: an empty string.\n */\n dataSource?: string;\n /** A value greater than one will cause terrain height to be exaggerated/scaled.false (or 1.0) indicate no exaggeration. Default value: 1.0 */\n exaggeration?: number;\n /** Applying lighting can help to visualize subtle terrain variation. Default value: true */\n applyLighting?: boolean;\n /** Origin value - height of the IModel origin at the project center as defined by heightOriginMode. Default value: 0.0 */\n heightOrigin?: number;\n /** Determines how/if the heightOrigin is applied to the terrain height. Default value: Geodetic */\n heightOriginMode?: TerrainHeightOriginMode;\n /** If true, the terrain will not be locatable. Otherwise, [[BackgroundMapProps.nonLocatable]] will determine whether terrain is locatable.\n * @internal use [[BackgroundMapProps.nonLocatable]]. Retained for backwards compatibility only.\n */\n nonLocatable?: boolean;\n}\n\n/** Correction modes for terrain height\n * @see [[TerrainProps]]\n * @public\n * @extensions\n */\nexport enum TerrainHeightOriginMode {\n /** Height value indicates the geodetic height of the IModel origin (also referred to as ellipsoidal or GPS height) */\n Geodetic = 0,\n /** Height value indicates the geoidal height of the IModel origin (commonly referred to as sea level). */\n Geoid = 1,\n /** Height value indicates the height of the IModel origin relative to ground level at project center. */\n Ground = 2,\n}\n\n/** Normalized version of [[TerrainProps]] for which provider has been validated and default values of all members are used.\n * @public\n */\nexport class TerrainSettings {\n private _nonLocatable: true | undefined;\n /** Identifies the [TerrainProvider]($frontend) that will supply terrain meshes.\n * Defaults to \"CesiumWorldTerrain\".\n */\n public readonly providerName: string;\n /** Identifies the specific terrain data source to be supplied by the [TerrainProvider]($frontend) identified by [[providerName]],\n * for those providers that support multiple data sources.\n * For example, the \"CesiumWorldTerrain\" provider uses this field to store a [[CesiumTerrainAssetId]].\n * Default value: an empty string.\n */\n public readonly dataSource: string;\n /** A value greater than one will cause terrain height to be exaggerated/scaled. 1.0 indicates no exaggeration. Default value: 1.0 */\n public readonly exaggeration: number;\n /** Applying lighting can help to visualize subtle terrain variations. Default value: false */\n public readonly applyLighting: boolean;\n /** Origin value - height of the IModel origin at the project center as defined by heightOriginMode. Default value 0.0 */\n public readonly heightOrigin: number;\n /** Determines how/if the heightOrigin is applied to the terrain height. Default value: Geodetic */\n public readonly heightOriginMode: TerrainHeightOriginMode;\n /** Optionally overrides [[BackgroundMapSettings.locatable]]. For backwards compatibility only.\n * @see [[TerrainProps.nonLocatable]].\n * @internal\n */\n public get nonLocatable(): true | undefined {\n return this._nonLocatable;\n }\n\n /** @deprecated in 4.5.0 - will not be removed until after 2026-06-13. Use the overload that takes [[TerrainProps]]. */\n constructor(providerName?: string, exaggeration?: number, applyLighting?: boolean, heightOrigin?: number, heightOriginMode?: TerrainHeightOriginMode);\n\n constructor(props?: TerrainProps);\n\n /** @internal */\n constructor(providerNameOrProps: string | TerrainProps | undefined, exaggeration?: number, applyLighting?: boolean, heightOrigin?: number, heightOriginMode?: TerrainHeightOriginMode) {\n let providerName;\n let dataSource;\n let nonLocatable;\n if (typeof providerNameOrProps === \"string\") {\n providerName = providerNameOrProps;\n } else if (providerNameOrProps) {\n ({ providerName, dataSource, exaggeration, applyLighting, heightOrigin, heightOriginMode, nonLocatable } = providerNameOrProps);\n }\n\n this.providerName = providerName ?? \"CesiumWorldTerrain\";\n this.dataSource = dataSource ?? \"\";\n this.exaggeration = Math.min(100, Math.max(0.1, exaggeration ?? 1.0));\n this.applyLighting = applyLighting ?? false;\n this.heightOrigin = heightOrigin ?? 0.0;\n\n if (true === nonLocatable)\n this._nonLocatable = true;\n\n switch (heightOriginMode) {\n case TerrainHeightOriginMode.Ground:\n case TerrainHeightOriginMode.Geoid:\n this.heightOriginMode = heightOriginMode;\n break;\n default:\n this.heightOriginMode = TerrainHeightOriginMode.Geodetic;\n break;\n }\n }\n\n public static fromJSON(json?: TerrainProps) {\n return new TerrainSettings(json);\n }\n\n /** Create settings that obtain terrain from a [Cesium ION asset](https://cesium.com/platform/cesium-ion/content/) such as\n * one of those defined by [[CesiumTerrainAssetId]].\n * @note You must ensure your Cesium ION account has access to the specified asset.\n */\n public static fromCesiumIonAsset(assetId: string = CesiumTerrainAssetId.Default, options?: Omit<TerrainProps, \"providerName\" | \"dataSource\">): TerrainSettings {\n return TerrainSettings.fromJSON({\n ...options,\n dataSource: assetId,\n });\n }\n\n public toJSON(): TerrainProps {\n const props: TerrainProps = { heightOriginMode: this.heightOriginMode };\n if (\"CesiumWorldTerrain\" !== this.providerName)\n props.providerName = this.providerName;\n if (this.dataSource)\n props.dataSource = this.dataSource;\n if (1 !== this.exaggeration)\n props.exaggeration = this.exaggeration;\n if (this.nonLocatable)\n props.nonLocatable = true;\n if (this.applyLighting)\n props.applyLighting = true;\n if (0 !== this.heightOrigin)\n props.heightOrigin = this.heightOrigin;\n\n return props;\n }\n\n public equals(other: TerrainSettings): boolean {\n return this.providerName === other.providerName && this.dataSource === other.dataSource && this.exaggeration === other.exaggeration && this.applyLighting === other.applyLighting\n && this.heightOrigin === other.heightOrigin && this.heightOriginMode === other.heightOriginMode && this.nonLocatable === other.nonLocatable;\n }\n\n /** Returns true if these settings are equivalent to the supplied JSON settings. */\n public equalsJSON(json?: BackgroundMapProps): boolean {\n return this.equals(TerrainSettings.fromJSON(json));\n }\n\n /** Create a copy of this TerrainSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A TerrainSettings with all of its properties set to match those of`this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps?: TerrainProps): TerrainSettings {\n if (undefined === changedProps)\n return this;\n\n const props = {\n providerName: changedProps.providerName ?? this.providerName,\n dataSource: changedProps.dataSource ?? this.dataSource,\n exaggeration: changedProps.exaggeration ?? this.exaggeration,\n nonLocatable: changedProps.nonLocatable ?? this.nonLocatable,\n applyLighting: changedProps.applyLighting ?? this.applyLighting,\n heightOrigin: changedProps.heightOrigin ?? this.heightOrigin,\n heightOriginMode: changedProps.heightOriginMode ?? this.heightOriginMode,\n };\n\n return TerrainSettings.fromJSON(props);\n }\n}\n"]}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
import type { Readable, Writable } from "stream";
|
|
5
5
|
import type { Buffer } from "buffer";
|
|
6
6
|
/** BackendReadable and BackendWritable are not tagged internal for deprecated public RPC APIs which reference these types. */
|
|
7
|
-
/** @public @deprecated in 3.
|
|
7
|
+
/** @public @deprecated in 3.4.5 - might be removed in next major version. This type was mistakenly made public in the common scope. */
|
|
8
8
|
export type BackendReadable = Readable;
|
|
9
|
-
/** @public @deprecated in 3.
|
|
9
|
+
/** @public @deprecated in 3.4.5 - might be removed in next major version. This type was mistakenly made public in the common scope. */
|
|
10
10
|
export type BackendWritable = Writable;
|
|
11
|
-
/** @internal @deprecated in 3.
|
|
11
|
+
/** @internal @deprecated in 3.4.5 - might be removed in next major version. This type was mistakenly made public in the common scope. */
|
|
12
12
|
export type BackendBuffer = Buffer;
|
|
13
13
|
//# sourceMappingURL=BackendTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackendTypes.d.ts","sourceRoot":"","sources":["../../../src/internal/BackendTypes.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AASrC,8HAA8H;AAC9H,
|
|
1
|
+
{"version":3,"file":"BackendTypes.d.ts","sourceRoot":"","sources":["../../../src/internal/BackendTypes.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AASrC,8HAA8H;AAC9H,uIAAuI;AACvI,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;AAEvC,uIAAuI;AACvI,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;AAEvC,yIAAyI;AACzI,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackendTypes.js","sourceRoot":"","sources":["../../../src/internal/BackendTypes.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 Utils\n */\n\nimport type { Readable, Writable } from \"stream\"; // Must be \"import type\" to avoid webpack polyfill errors\nimport type { Buffer } from \"buffer\"; // Must be \"import type\" to avoid webpack polyfill errors\n\n/*\nIMPORTANT:\nThis is a temporary source file for backwards compatibility only.\nDo not add any new types to this file.\nAll types here will be removed in 4.0\n*/\n\n/** BackendReadable and BackendWritable are not tagged internal for deprecated public RPC APIs which reference these types. */\n/** @public @deprecated in 3.
|
|
1
|
+
{"version":3,"file":"BackendTypes.js","sourceRoot":"","sources":["../../../src/internal/BackendTypes.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 Utils\n */\n\nimport type { Readable, Writable } from \"stream\"; // Must be \"import type\" to avoid webpack polyfill errors\nimport type { Buffer } from \"buffer\"; // Must be \"import type\" to avoid webpack polyfill errors\n\n/*\nIMPORTANT:\nThis is a temporary source file for backwards compatibility only.\nDo not add any new types to this file.\nAll types here will be removed in 4.0\n*/\n\n/** BackendReadable and BackendWritable are not tagged internal for deprecated public RPC APIs which reference these types. */\n/** @public @deprecated in 3.4.5 - might be removed in next major version. This type was mistakenly made public in the common scope. */\nexport type BackendReadable = Readable;\n\n/** @public @deprecated in 3.4.5 - might be removed in next major version. This type was mistakenly made public in the common scope. */\nexport type BackendWritable = Writable;\n\n/** @internal @deprecated in 3.4.5 - might be removed in next major version. This type was mistakenly made public in the common scope. */\nexport type BackendBuffer = Buffer;\n"]}
|
|
@@ -81,7 +81,7 @@ export declare abstract class IModelReadRpcInterface extends RpcInterface {
|
|
|
81
81
|
getViewStateData(_iModelToken: IModelRpcProps, _viewDefinitionId: string, _options?: ViewStateLoadProps): Promise<ViewStateProps>;
|
|
82
82
|
readFontJson(_iModelToken: IModelRpcProps): Promise<FontMapProps>;
|
|
83
83
|
getToolTipMessage(_iModelToken: IModelRpcProps, _elementId: string): Promise<string[]>;
|
|
84
|
-
/** @deprecated in 3.
|
|
84
|
+
/** @deprecated in 3.3.0 - might be removed in next major version. Use ViewStore apis. */
|
|
85
85
|
getViewThumbnail(_iModelToken: IModelRpcProps, _viewId: string): Promise<Uint8Array>;
|
|
86
86
|
getDefaultViewId(_iModelToken: IModelRpcProps): Promise<Id64String>;
|
|
87
87
|
getCustomViewState3dData(_iModelToken: IModelRpcProps, _options: CustomViewState3dCreatorOptions): Promise<CustomViewState3dProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelReadRpcInterface.d.ts","sourceRoot":"","sources":["../../../src/rpc/IModelReadRpcInterface.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,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AE,GAAG,OAAO,CAAC,GAAG,CAAC;CACnJ"}
|
|
@@ -63,7 +63,7 @@ class IModelReadRpcInterface extends RpcInterface_1.RpcInterface {
|
|
|
63
63
|
async getViewStateData(_iModelToken, _viewDefinitionId, _options) { return this.forward(arguments); }
|
|
64
64
|
async readFontJson(_iModelToken) { return this.forward(arguments); } // eslint-disable-line @typescript-eslint/no-deprecated
|
|
65
65
|
async getToolTipMessage(_iModelToken, _elementId) { return this.forward(arguments); }
|
|
66
|
-
/** @deprecated in 3.
|
|
66
|
+
/** @deprecated in 3.3.0 - might be removed in next major version. Use ViewStore apis. */
|
|
67
67
|
async getViewThumbnail(_iModelToken, _viewId) { return this.forward(arguments); }
|
|
68
68
|
async getDefaultViewId(_iModelToken) { return this.forward(arguments); }
|
|
69
69
|
async getCustomViewState3dData(_iModelToken, _options) { return this.forward(arguments); }
|